Warning - bear of little brain playing with the code base :-)

Am trying to understand the new Filter/Expression stuff by updating the 
Geometryless data store in Geotools trunk. Following the upgrade to 2.4 
instructions (which I've fixed a few typos in) I get left with the 
following issues:

1) CompareFilter tells me to use a BinaryComparisonOperator  instead - 
but this is an interface, so I need the equivalent implementation class, 
or a complete re-write
2) addLeft() etc I assume becomes setExpression1() etc
3) The upgrade page suggests that I use:

CompareFilter filter = ff.createCompareFilter(FilterType.COMPARE_GREATER_THAN);

but I cant see FilterType in GeoAPI, only org.geotools.filter

in any event, should I really be using 
FilterFactory.PropertyIsGreaterThan(expr1,expr2)   ?


The upgrade docs mentions a lot of AFTER ( Geotools 2.3)   should this 
be edited to say 2.4?


On a general note - I'd like to help test the docs for the migration 
path here, and the API implementations I guess, but need some more 
insights into the state of play.  In particular I cant find any 
implementations of the new Filter/Expression stuff in any modules within 
gt2 trunk, so am relying totally on the code.

Is this upgrade happening on a different branch, or on someone's machine 
and not yet committed perhaps?

I dont see the upgrade notes can be complete without these additions - 
am I simply pushing it along a bit faster than the docs have got up to.

Any further suggestions on how I can help the transition better?

Rob A





Jody Garnett wrote:
> Justin a QA step for 2.4 should be an optional filter factory (that does 
> not implement GeoTools Filter interface) that we can "Hint" into the 
> system, any datastore that still passes its test wins :-)
>
> Cheers,
> Jody
>   
>> A side effect of how the transition was performed. The benefit was that
>> we had a deprecation cycle so that everyone didn't have to shift
>> immediately. The downside seems to be pain as we flush out where these
>> things are still assuming the old interfaces.
>>
>> I guess the short answer is that any filter that casts to an
>> implementation class or interface is now wrong.
>>
>> -Justin
>>
>> Andrea Aime wrote:
>>   
>>     
>>> Hi,
>>> working on trunk is proving to be "fun" because of the
>>> Geoapi filter mess.
>>> Basically, we have an API that insists
>>> on using Geoapi filters, and implementations that really do
>>> want geotools filters instead.
>>> Usually there's no difference, but too bad INCLUDE and EXCLUDE
>>> are not geotools filters, so when you start using them you're
>>> setting up for disaster.
>>>
>>> Silly example:
>>> FilterFactory ff = ...
>>> Filter newFilter = ff.and(Filter.INCLUDE, myOtherFilter);
>>>
>>> and then try to use newFilter in sql encoders, splitters and the
>>> like and boom, class cast exceptions all over the place.
>>>
>>> Why? Well, you could argue that INCLUDE combined with everything
>>> else should disappear, but the filter factory has no such
>>> logic. I can fix the factory, but are we sure and/or/not are
>>> they only ways include/exclude can be combined into a more
>>> complex filter? I could create AndImpl before and then set
>>> directly INCLUDE as one of the childs...
>>>
>>> Cheers
>>> Andrea
>>>
>>> -------------------------------------------------------------------------
>>> 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
>>>
>>> !DSPAM:1004,45895684163881425493344!
>>>
>>>     
>>>       
>>   
>>     
>
>
> -------------------------------------------------------------------------
> 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
>   



-------------------------------------------------------------------------
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

Reply via email to