Hi Enam

My apologies for misinterpreting. 2.3.x is in a flux state where the old 
filter interfaces are deprecated, but many of the other apis ( like 
FeatureStore ) have not transitioned over to the new ones. So the bottom 
line is you can safely cast the org.opengis filter returned by the 
factory to a org.geotools filter.

-Justin

Enam wrote:
> I'll clarify my post a bit:
> 
> I'm not trying to upgrade to trunk. The question was that
> org.geotools.data.FeatureStore in geotools 2.3 doesn't have the method:
> 
> removeFeatures (org.opengis.filter.Filter).
> 
> Instead it has removeFeatures (org.geotools.filter.Filter). As a result,
> when I try to use FeatureId, returned by FilterFactory.featureId(Filter), I
> get a compile error as included in my previous email. 
> 
> Regards,
> Enamul Haque
> 
> 
> 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();
>> }
>>
>>
>> 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 ?
>>
>> 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