Class DefaultFilterVisitor

Object
DefaultFilterVisitor
All Implemented Interfaces:
ExpressionVisitor, FilterVisitor
Direct Known Subclasses:
FilterAttributeExtractor, GeometryTransformationVisitor, IdCollectorFilterVisitor, IndexedFilterDetectorVisitor, SpatialFilterVisitor, Utils.BBOXFilterExtractor

public abstract class DefaultFilterVisitor extends Object implements FilterVisitor, ExpressionVisitor
Abstract implementation of FilterVisitor that simply walks the data structure.

This class implements the full FilterVisitor interface and will visit every Filter member of a Filter object. This class performs no actions and is not intended to be used directly, instead extend it and overide the methods for the Filter type you are interested in. Remember to call the super method if you want to ensure that the entire filter tree is still visited.


 FilterVisitor allFids = new DefaultFilterVisitor(){
     public Object visit( Id filter, Object data ) {
         Set set = (Set) data;
         set.addAll(filter.getIDs());
         return set;
     }
 };
 Set set = (Set) myFilter.accept(allFids, new HashSet());
 
Author:
Jody