On Sunday 17 May 2009 22:05:17 Andrea Aime wrote:
> I looked into jjtree-javacc usage. There are two
> use cases for this module, the main module, and the
> cql module.
>
> In the main module it's used by an old text expression
> parser that is marked as deprecated (ExpressionBuilder).
> I'd say, let's just remove it and in the few places
> where it's used, let's just build filters by code
> (cql cannot be used in main, that would cause a
> circular dependency).
>
> In the cql module it's used and I don't see an
> easy way to remove it. In particular, the parsing
> design fights again the jjtree/javacc standard
> practice and tries to replace the standard Node
> interface with a custom made one (instead of
> asking jjtree to extend a user provided base
> class)
> This is not supported by the Mojo version of the
> jjtree plugin, and results in compile failures.
> Mauricio, how hard would it be to fix this issue
> in your opinion?
I think the main problem is the circular dependency. The cql implementation is
not the problem.
In the in src/main/java we could remove
org.geotools.filter
ExpressionBuilder
org.geotools.filter.function
FunctionTestSupport (it is not used)
Thus cql is only required by
org.gotools.filter.visitor
EnvironmentVariableResolver
public Filter resolve(Filter filter, double mapScale) throws
/*ParseException, */CQLException {
String input = filter.toString();
input = input.replaceAll("sld:MapScaleDenominator", ""+mapScale);
// Filter output = (Filter)ExpressionBuilder.parse(input);
Filter output = (Filter)CQL.toFilter(input);
return output;
}
public Filter resolve(Filter filter, double mapScale) throws
/*ParseException, */CQLException {
String input = filter.toString();
input = input.replaceAll("sld:MapScaleDenominator", ""+mapScale);
// Filter output = (Filter)ExpressionBuilder.parse(input);
Filter output = (Filter)CQL.toFilter(input);
return output;
}
Is possible move EnvironmentVariableResolver to other module to avoid the
circular dependency? (It look like an util class)
cheers
--
Mauricio Pazos
www.axios.es
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel