Hi once again!
I would like to have my own custom filter, which filters every feature
by using its very custom /evaluate/ method.
I was trying to implement my own filter by extending the
AbstractFilterImpl, but I ran into the following:
If I don`t override accept(FilterVisitor
<eclipse-javadoc:%E2%98%82=ShapefileViewer/src%3Cdata%7BTypenameFilter.java%E2%98%83TypenameFilter%7Eaccept%7EQFilterVisitor;%7EQObject;%E2%98%82FilterVisitor>
visitor, Object
<eclipse-javadoc:%E2%98%82=ShapefileViewer/src%3Cdata%7BTypenameFilter.java%E2%98%83TypenameFilter%7Eaccept%7EQFilterVisitor;%7EQObject;%E2%98%82Object>
extraData), I will get NullPointerException
If I try to override accept method, I face the fact that it has very
vague semantics. In my particular case,
I need filter with the following evaluate method:
/@Override
public boolean evaluate(Object featureObj) {
return
((SimpleFeature)featureObj).getID().matches(String.format("%s\\.\\d+",
typeName));
}
/I need this to distinguish features from the different shapefiles at
CompositeCachingFeatureSource (cooked it myself).
How in this case /accept /should be implemented? Maybe I betting on the
wrong horse and other superclass should be used?
Please someone enlighten me...
Or at least tell me, what is accept all about?
Thanks in advance,
Sergey
------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users