The FilterToSQL is still encoding information twice; once into a
FilterCapabilities data structure (that is used to quickly perform mask
based tests; problem is it is no longer quick as producing the number
involves instance of tests). It is also fatal in a few spots if you are
just working with opengis Filter.
Gabriel did a great job of making ArcSDEDataStore org.geotools.Filter
free; problem is this super class is dragging things back down. My
problem is we are splitting up information about what SQL can be
supported in FilterToSQL .. between the actual visitor used for
encoding; and this FilterCapabilities class:
Consider FilterToSQL.encode( filter ):
> if (getCapabilities().fullySupports(filter)) {
> try {
> out.write("WHERE ");
> filter.accept(this, null);
>
> //out.write(";");
> } catch (java.io.IOException ioe) {
> LOGGER.warning("Unable to export filter" + ioe);
> throw new FilterToSQLException("Problem writing
> filter: ", ioe);
> }
> } else {
> throw new FilterToSQLException("Filter type not supported");
> }
This method should be:
try {
out.write("WHERE ");
filter.accept(this, null);
//out.write(";");
} catch (java.io.IOException ioe) {
LOGGER.warning("Unable to export filter" + ioe);
throw new FilterToSQLException("Problem writing filter:
", ioe);
}
}
And let the visitor produce the:
throw new FilterToSQLException("Filter type not supported");
Am I missing something here?
To offer a transition strategy I will set up a Capabilities class that
has the fullySupports( filter ) method and be constructed from an
opengis FilterCapabilities data structure.
Jody
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel