Package org.geotools.filter.visitor
Class AbstractSearchFilterVisitor
- Object
-
- AbstractSearchFilterVisitor
-
- All Implemented Interfaces:
ExpressionVisitor
,FilterVisitor
public abstract class AbstractSearchFilterVisitor extends Object implements FilterVisitor, ExpressionVisitor
SearchFilterVisitor is a base class used to optimize finding specific information in the filter data structure.This differs slightly form the DefaultFilterVisitor case in that you can abandon the depth first traversal at any point by returning true from found( object ).
Most implementations accept the default functionality which simply checks if data is non null. This allows you to simply return an object from any method the moment you have found what you are looking for.
- Author:
- Jody Garnett
-
-
Constructor Summary
Constructors Constructor Description AbstractSearchFilterVisitor()
-
Method Summary
-
-
-
Method Detail
-
found
protected boolean found(Object data)
Check if data is found (ie non null).- Returns:
- true if the item is found and we can now stop
-
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 extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(AnyInteracts anyInteracts, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Before before, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Begins begins, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(BegunBy begunBy, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(During during, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(EndedBy endedBy, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Ends ends, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Meets meets, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(MetBy metBy, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(OverlappedBy overlappedBy, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(TContains contains, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(TEquals equals, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(TOverlaps contains, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
protected Object visit(BinaryTemporalOperator filter, Object data)
-
visit
public Object visit(NativeFilter filter, Object data)
- Specified by:
visit
in interfaceFilterVisitor
-
-