[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] Simple Filter editor for UDIG
|
Jesse Eichar wrote:
A filter editor needs to be created for UDIG. All we need at the
moment is implementation for the following methods:
ProjectFactoryImpl.convertFilterToString(EDataType, Object)
and
ProjectFactoryImpl.createFilterFromString(EDataType eDataType, String
initialValue)
This will allow the filters to be saved and loaded if desired and
edited in the properties view.
Oh, the methods should ensure that no exceptions are thrown. This
causes some poor behaviour if someone types in the wrong string.
Here is a link to a test case for ExpressionBuilder and
ExpresssionCompiler -
http://svn.geotools.org/geotools/trunk/gt/module/main/test/org/geotools/filter/ExpressionBuilderTest.java
And here is the bit we care about:
Expression exp = (Expression)ExpressionBuilder.parse(in);
Expression out = (Expression)ExpressionBuilder.parse(exp.toString());
assertEquals(exp.getValue(testFeature), out.getValue(testFeature));
JG