Hi Enam,

There is a migration guide somewhere which explains how to move from 
2.3.x to trunk but I cant seem to find it on the wiki. Jody? Immediate 
answers inline however.

Enam wrote:
> I'm using Geotools 2.3. I found that FeatureStore on trunk uses
> org.opengis.filter.Filter but geotools 2.3 doesn't use it. At present I
> couldn't find a way to work with FeatureId as below :
> 
> outFeatureStore.removeFeatures(getFilterFactory().featureId(featureIds));
> 
> private static FilterFactory getFilterFactory()
> {
>         return FilterFactoryFinder.createFilterFactory();
> }
> 
replace with CommonFactoryFinder.getFilterFactory( null )
> 
> The above code fragment doesn't compile :
> 
> removeFeatures(org.geotools.filter.Filter) in org.geotools.data.FeatureStore
> cannot be applied to (org.opengis.filter.Filter)
>         outFeatureStore.removeFeatures((Filter)
> getFilterFactory().featureId(featureIds));
>                        ^
> 
> This is kind of awkward because org.geotools.filter.Filter is deprecated and
> on the other hand I can't refrain from using deprecated api. I'd expect to
> get an alternative to removeFeatures method that uses the opengis Filter.
> 
> Is there a way around this problem ?
All the org.geotools.filter.* classes have been replaced with 
org.opengis.filter.* and are part of the geoapi project. So if you 
replace org.geotools.filter.Filter with org.opengis.filter.Filter that 
should do the trick.

-Justin
> 
> Regards,
> Enam


-- 
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------------
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-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to