Use of FilterCapabilities
Description
Environment
Type | Key | Summary | Priority | Story Points | Assignee | Status |
---|---|---|---|---|---|---|
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned |
Activity
Not a bug but a RFE, too old and nobody bothered.
Killing it.
CodeHaus Comment From: groldan - Time: Wed, 26 Nov 2008 14:24:51 -0600
---------------------
Hi Jody, I guess the missing bit for a wider adoption of org.opengis.filter.FitlerCapabilities is the port of PostPreProcessFilterSplittingVisitor, which I've done for WFS 1.1.
Yet, porting the test suite for it leads to failures since both IsFullySupportedFilterVisitor and IsSupportedFilterVisitor implement the following:
public Object visit( Function function, Object extraData ) {
ScalarCapabilities scalar = capabilities.getScalarCapabilities();
if( scalar == null ) return false;
ArithmeticOperators operators = scalar.getArithmeticOperators();
if( operators == null ) return false;
Functions functions = operators.getFunctions();
if( functions == null ) return false;
// Note that only function name is checked here
FunctionName found = functions.getFunctionName( function.getName() );
if( found == null ) return false;
return found.getArgumentCount() == function.getParameters().size();
}
Note that the last method's line compares the number of arguments in the function instance and the FunctionName declared argument count. I know arg count is a hot topic and not sure if we already solved it. Yet, I keep on thinking this last check is unnecessary and we should be ok with just matching the function name, since as per the spec and our implementation too there can't exist two functions with the same name and different number of arguments.
And since when adding support for a function to an org.geotools.filter.Capabilities FitlerCapabilities wrapper I cannot know the number of arguments beforehand.. what about eliminating that last check and returning true if the function names match?
CodeHaus Comment From: jgarnett - Time: Thu, 20 Dec 2007 00:47:54 -0600
---------------------
This work is now committed on trunk, and will await public review before being closed.
The goal here is to have a Capabilities wrapper around a opengis FilterCapabilities data structure that we can use as method compatible replacement for the old FilterCapabilities class:
The proposal page is here:
http://docs.codehaus.org/display/GEOTOOLS/Use+of+FilterCapabilities - http://docs.codehaus.org/display/GEOTOOLS/Use+of+FilterCapabilities