Hi Andrea,

giving a run at simplifying filters for jdbc datastores (for instance, postgis) 
I have some doubts on where it'd be best to do so, since I'm not an expert on 
the jdbc datastores I thought I may use your thoughts once more to not mess it 
up :)

So, we have this nice issue (http://jira.codehaus.org/browse/GEOT-2182) about 
wiping out invalid fids that aims to fix what seems to be a pretty common 
mistake on WFS's, send a fid filter over typeName1 with a fid like 
"typeName2.someting" and you'll still get a non empty result (I have seen the 
defect on a commercial one).

But for jdbc ones I guess we should add a isValid(String fid):boolean method to 
FIDMapper and then feed the SimplifyingFilterVisitor with an adaptor 
FIDMapper->FIDValidator.
This way related things keep close instead of requiring a big switch statement 
in order to decide which validation strategy is appropriate for a given 
fidmapper.

Now, about where to apply this, for postgis I guess it would be at 
DefaultSQLBuilder.splitFilter(Filter filter), but I couldn't find out where to 
get the FIDMapper in use at this point. The closer I get to is that SQLBuilder 
contains a SQLEncoder which in turn has a setFidMapper(FIDMapper) mehod, but 
no getter. So... I'm open to any suggestion on how we should better hanlde 
this for postgis and jdbc in general. please?

Cheers,

Gabriel

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to