Our API allows to exclude some well known tables. For example the PostGIS one
excludes geometry_columns and geography_columns:

@Override
    public boolean includeTable(String schemaName, String tableName,
            Connection cx) throws SQLException {
        if (tableName.equals("geometry_columns")) {
            return false;
        } else if (tableName.startsWith("spatial_ref_sys")) {
            return false;
        } else if (tableName.equals("geography_columns")) {
            return false;
        }

        // others?
        return true;
    }


Someone need to find the patterens for the system tables in Oracle that we're
listing but should not be and add them to the already long list of exclusions
we have:

@Override
    public boolean includeTable(String schemaName, String tableName,
Connection cx)
            throws SQLException {

        if (tableName.endsWith("$"))  {
            return false;
        } else if (tableName.startsWith("BIN$"))  { // Added to ignore
some Oracle 10g tables
            return false;
        } else if (tableName.startsWith("XDB$"))  {
            return false;
        } else if (tableName.startsWith("DR$"))  {
            return false;
        } else if (tableName.startsWith("DEF$"))  {
            return false;
        } else if (tableName.startsWith("SDO_"))  {
            return false;
        } else if (tableName.startsWith("WM$"))  {
            return false;
        } else if (tableName.startsWith("WK$"))  {
            return false;
        } else if (tableName.startsWith("AW$"))  {
            return false;
        } else if (tableName.startsWith("AQ$"))  {
            return false;
        } else if (tableName.startsWith("APPLY$"))  {
            return false;
        } else if (tableName.startsWith("REPCAT$"))  {
            return false;
        } else if (tableName.startsWith("CWM$"))  {
            return false;
        } else if (tableName.startsWith("CWM2$"))  {
            return false;
        } else if (tableName.startsWith("EXF$"))  {
            return false;
        } else if (tableName.startsWith("DM$"))  {
            return false;
        }

        return true;
    }


Cheers
Andrea

On Tue, Oct 12, 2010 at 2:24 AM, Paul Joyce <[email protected]> wrote:
>> Nothing funny with that. People want to publish also geometryless tables
>> with WFS
>
>> occasionally, so we list everything we find.
>
> It’s usual with Oracle to filter out all the system tables, since by default
> a user can see a lot of them, but they are rarely useful to an application
> end user. If you make an Oracle connection with ESRI, Intergraph, etc, they
> filter out tables owned by SYS, SYSTEM, MDSYS, XDB, etc, plus tables with
> names containing $, tables ending in _SDOGEOM, etc, etc.
>
> What do you think, should GeoServer also filter out the system tables? An
> option on the data store?



-- 
-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584962313
fax:     +39 0584962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-----------------------------------------------------

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to