Victor Mauricio Pazos wrote: > Hi Jody, I am not sure about if I understand exactly your question. But if > the > following code: > > //create the filter > filter =filterFactory.createCompareFilter(CompareFilter.COMPARE_GREATER_THAN); > FeatureType featureType = features.getFeatures().getSchema(); > filter.addLeftValue(filterFactory.createAttributeExpression("POP_2000")); > filter.addRightValue(filterFactory.createLiteralExpression(100000)); > > //count filtered features > col = features.getFeatures(filter); > > it is going to replace by a nicer code using CQL like: > > col = features.getFeatures("POP_2000 > 100000"); > > I see the filters creation problems will be hidden, then the name of modules > responsible of creation will be part of the internal behavior, and we only > must take into account the new class name (currently named FilterBuilder) > as "CQL" or "CQLParser" (maybe others) into the internal documentation > (important to geotools developer). On the other hand Demo/intro and the user > docs should talk about "CQL" as language (consistent with OGC). > > I lost something? > Well what we lost was your input on the DataAccess API - so your example is not going to happen just now.
Let's try this one: // Option 1: CQL is a utility class with static method using default factory col = features.getFeatures( CQL.filter( "POP_2000 > 100000" ) ); // Option 2: Use with your own FilterFactory CQL cql = new CQL( filterFactory ); col = features.getFeatures( cql.parse( "POP_2000 > 10000" ) ); If you want we can write up a proposal for FeatureSource.features( String query, String queryLanguage ) again ... I would like it so we can support SQL as in Gabriels community schema branch .... ie. source.features( sql, "SFSQL" ); Jody ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel