Package org.geotools.filter.visitor
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
-
-
Constructor Summary
Constructors Constructor Description DefaultFilterVisitor()
-
Method Summary
-
-
-
Method Detail
-
visit
public Object visit(ExcludeFilter filter, Object data)
Description copied from interface:FilterVisitor
VisitFilter.EXCLUDE
(often used during data structure transformations).- Specified by:
visit
in interfaceFilterVisitor
- Parameters:
filter
-Filter.EXCLUDE
.data
- Value object provided to visitor- Returns:
- subclass supplied
-
visit
public Object visit(IncludeFilter filter, Object data)
Description copied from interface:FilterVisitor
VisitFilter.INCLUDE
(often used during data structure transformations).- Specified by:
visit
in interfaceFilterVisitor
- Parameters:
filter
-Filter.INCLUDE
.data
- Value object provided to visitor- Returns:
- subclass supplied
-
visit
public Object visit(And filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Id filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Not filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Or filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsBetween filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsEqualTo filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsNotEqualTo filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsGreaterThan filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsGreaterThanOrEqualTo filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsLessThan filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsLessThanOrEqualTo filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsLike filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsNull filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsNil filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(BBOX filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Beyond filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Contains filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Crosses filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Disjoint filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(DWithin filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Equals filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Intersects filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Overlaps filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Touches filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Within filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visitNullFilter
public Object visitNullFilter(Object data)
Description copied from interface:FilterVisitor
Used to account for anull
filter value.This is particularly used during data structure transofrmations, however the use of
null
is not recommended. Please make use of Filter.NONE and Filter.ALL as placeholder objects that communicate intent.- Specified by:
visitNullFilter
in interfaceFilterVisitor
- Parameters:
data
- Value object provided to visitor- Returns:
- subclass defined
-
visit
public Object visit(NilExpression expression, Object data)
Description copied from interface:ExpressionVisitor
Used to visit a Expression.NIL, also called fornull
where an expression is expected.This is particularly useful when doing data transformations, as an example when using a StyleSymbolizer Expression.NIL can be used to represent the default stroke color.
- Specified by:
visit
in interfaceExpressionVisitor
- Returns:
- implementation specific
-
visit
public Object visit(Add expression, Object data)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(Divide expression, Object data)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(Function expression, Object data)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(Literal expression, Object data)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(Multiply expression, Object data)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(PropertyName expression, Object data)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(Subtract expression, Object data)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(After after, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(AnyInteracts anyInteracts, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Before before, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Begins begins, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(BegunBy begunBy, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(During during, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(EndedBy endedBy, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Ends ends, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Meets meets, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(MetBy metBy, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(OverlappedBy overlappedBy, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(TContains contains, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(TEquals equals, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(TOverlaps contains, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(NativeFilter filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
-