Jürgen,

Yes, the filter-and-literal stuff was poorly designed.

I've put a bunch of patches in to minimize the damage and considered
hiring a dutch boy to stick his finger in the cracks.

Basically, what needs to happen is the actual filter class should just
store the literals as strings, and the filter evaluation code should do
any necessary conversion.  The main problem is that the Filter parser
cannot, apriori, know what type the <Literal> elements are, but it
guesses anyways.  Whats needed is the FeatureType that the Filter is
being evaluated against (this can get more complicated if the
FeatureType has <choice> elements in it).

This isnt a giant change, but the problem is that there is a lot of
geotools (and, I'm sure, other code) that relies on the apriori parsing
of the Filter.  There was a recent oracle datastore bug that was being
caused because the Oracle Datastore was assuming that the Filter type
assumptions was correct.  So, there could be a lot of code that would
get subtly screwed over if we actually change this.

I'm hip to see this done (as are a lot of others), but I dont think
anyone's done it because there's a large number of subtle problems that
could be caused!

One possible bandaid would be a function that takes a Filter object and
a FeatureType then 'fixes' all the literals in it.  We'll have to make
sure that this works with the new Feature Model.

NOTE: a single Filter object can work with multiple FeatureTypes, each
wanting different literal types!

dave




----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to