On Wednesday, September 14, 2011 09:02:13 AM Walter Deane wrote: > Hey guys, > > I am working on a versioning datastore that uses a wrapped JDBCDataStore > and a geogit backend and i wanted to implement a getlog method. > > The current method signature is this: > > SimpleFeatureCollection getLog(String fromVersion, String toVersion, Filter > filter, String[] userIds, int maxRows) > > I am trying to break the filter object done so that I can add to GeoGIT log > calls but I am not that familiar with the Filter api yet. Things that I can > pass through that I want to possible get out of filter include: > > - FeatureId > - daterange > > Looking at the API the FidFilter is deprecated now. So is there a test case > that shows creating and retrieving this from a filter? I am just unsure how > this should be used. What would be a good tutorial or wiki link to get my > head around the way this should be approached in 8?
FilterFactory ff = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints ); Set<FeatureId> idSet = ...; // create a set of FeatureIds Id filter = ff.id(idSet); Have a look at "Handling Section" in http://docs.geotools.org/latest/userguide/library/main/filter.html or using the ECQL Id filter = (Id)ECQL.toFilter( "IN ('river.1', 'river.2')" ); more in http://docs.geotools.org/latest/userguide/library/cql/ecql.html > > Thanks for any tips, > Walter cheers -- Mauricio Pazos ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerry® mobile platform with sessions, labs & more. See new tools and technologies. Register for BlackBerry® DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
