Package org.geotools.filter.visitor
Class AbstractFilterVisitor
- Object
-
- AbstractFilterVisitor
-
- All Implemented Interfaces:
FilterVisitor
public class AbstractFilterVisitor extends Object implements FilterVisitor
Base implementation of the FilterVisitor used for inorder traversal of expressions.This class implements the full FilterVisitor interface and will visit every 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 expression types you are interested in. Remember to call the super method if you want to ensure that the entire filter tree is still visited.
You may still need to implement FilterVisitor directly if the visit order set out in this class does not meet your needs. This class visits in sequence i.e. Left - Middle - Right for all expressions which have sub-expressions.
- Author:
- James Macgill, Penn State, Justin Deoliveira, The Open Planning Project
-
-
Constructor Summary
Constructors Constructor Description AbstractFilterVisitor()
Empty constructorAbstractFilterVisitor(ExpressionVisitor expressionVisitor)
Constructs the filter visitor with an expression visitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
Object
visit(And filter, Object data)
Visits elements of filter.getChildren().protected Object
visit(BinaryComparisonOperator filter, Object data)
Visits filter.getExpression1(), and filter.getExpression2() if an expression visitor was set.protected Object
visit(BinaryLogicOperator filter, Object data)
Visits elements of filter.getChildren().Object
visit(ExcludeFilter filter, Object data)
Does nothing; will return provided data unmodified.Object
visit(Id filter, Object data)
Does nothing.Object
visit(IncludeFilter filter, Object data)
Does nothing; will return provided data unmodified.Object
visit(NativeFilter filter, Object extraData)
Object
visit(Not filter, Object data)
Visits filter.getFilter().Object
visit(Or filter, Object data)
Visits elements of filter.getChildren().Object
visit(PropertyIsBetween filter, Object data)
Visits filter.getLowerBoundary(),filter.getExpression(),filter.getUpperBoundary() if an expression visitor was set.Object
visit(PropertyIsEqualTo filter, Object data)
Visits filter.getExpression1(), and filter.getExpression2() if an expression visitor was set.Object
visit(PropertyIsGreaterThanOrEqualTo filter, Object data)
Visits filter.getExpression1(), and filter.getExpression2() if an expression visitor was set.Object
visit(PropertyIsGreaterThan filter, Object data)
Visits filter.getExpression1(), and filter.getExpression2() if an expression visitor was set.Object
visit(PropertyIsLessThanOrEqualTo filter, Object data)
Visits filter.getExpression1(), and filter.getExpression2() if an expression visitor was set.Object
visit(PropertyIsLessThan filter, Object data)
Visits filter.getExpression1(), and filter.getExpression2() if an expression visitor was set.Object
visit(PropertyIsLike filter, Object data)
Visits filter.getExpression() if an expression visitor was set.Object
visit(PropertyIsNil filter, Object extraData)
Visits filter.getExpression() if an expression visitor was set.Object
visit(PropertyIsNotEqualTo filter, Object data)
Visits filter.getExpression1(), and filter.getExpression2() if an expression visitor was set.Object
visit(PropertyIsNull filter, Object data)
Visits filter.getExpression() if an expression visitor was set.Object
visit(BBOX filter, Object data)
does nothingObject
visit(Beyond filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.protected Object
visit(BinarySpatialOperator filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.Object
visit(Contains filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.Object
visit(Crosses filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.Object
visit(Disjoint filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.Object
visit(DWithin filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.Object
visit(Equals filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.Object
visit(Intersects filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.Object
visit(Overlaps filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.Object
visit(Touches filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.Object
visit(Within filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.Object
visit(After after, Object extraData)
Object
visit(AnyInteracts anyInteracts, Object extraData)
Object
visit(Before before, Object extraData)
Object
visit(Begins begins, Object extraData)
Object
visit(BegunBy begunBy, Object extraData)
protected Object
visit(BinaryTemporalOperator filter, Object data)
Object
visit(During during, Object extraData)
Object
visit(EndedBy endedBy, Object extraData)
Object
visit(Ends ends, Object extraData)
Object
visit(Meets meets, Object extraData)
Object
visit(MetBy metBy, Object extraData)
Object
visit(OverlappedBy overlappedBy, Object extraData)
Object
visit(TContains contains, Object extraData)
Object
visit(TEquals equals, Object extraData)
Object
visit(TOverlaps contains, Object extraData)
Object
visitNullFilter(Object data)
Does nothing.
-
-
-
Constructor Detail
-
AbstractFilterVisitor
public AbstractFilterVisitor()
Empty constructor
-
AbstractFilterVisitor
public AbstractFilterVisitor(ExpressionVisitor expressionVisitor)
Constructs the filter visitor with an expression visitor.Using this constructor allows expressions of a filter to be visited as well.
-
-
Method Detail
-
visit
public Object visit(IncludeFilter filter, Object data)
Does nothing; will return provided data unmodified.- Specified by:
visit
in interfaceFilterVisitor
- Parameters:
filter
-Filter.INCLUDE
.data
- Value object provided to visitor- Returns:
- subclass supplied
-
visit
public Object visit(ExcludeFilter filter, Object data)
Does nothing; will return provided data unmodified.- Specified by:
visit
in interfaceFilterVisitor
- Parameters:
filter
-Filter.EXCLUDE
.data
- Value object provided to visitor- Returns:
- subclass supplied
-
visitNullFilter
public Object visitNullFilter(Object data)
Does nothing.- Specified by:
visitNullFilter
in interfaceFilterVisitor
- Parameters:
data
- Value object provided to visitor- Returns:
- subclass defined
-
visit
public Object visit(PropertyIsBetween filter, Object data)
Visits filter.getLowerBoundary(),filter.getExpression(),filter.getUpperBoundary() if an expression visitor was set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
protected Object visit(BinaryComparisonOperator filter, Object data)
Visits filter.getExpression1(), and filter.getExpression2() if an expression visitor was set.
-
visit
public Object visit(PropertyIsEqualTo filter, Object data)
Visits filter.getExpression1(), and filter.getExpression2() if an expression visitor was set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsNotEqualTo filter, Object data)
Visits filter.getExpression1(), and filter.getExpression2() if an expression visitor was set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsLessThan filter, Object data)
Visits filter.getExpression1(), and filter.getExpression2() if an expression visitor was set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsLessThanOrEqualTo filter, Object data)
Visits filter.getExpression1(), and filter.getExpression2() if an expression visitor was set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsGreaterThan filter, Object data)
Visits filter.getExpression1(), and filter.getExpression2() if an expression visitor was set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsGreaterThanOrEqualTo filter, Object data)
Visits filter.getExpression1(), and filter.getExpression2() if an expression visitor was set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(BBOX filter, Object data)
does nothing- Specified by:
visit
in interfaceFilterVisitor
-
visit
protected Object visit(BinarySpatialOperator filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.
-
visit
public Object visit(Beyond filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Contains filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Crosses filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Disjoint filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(DWithin filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Equals filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Intersects filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Overlaps filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Touches filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Within filter, Object data)
Visits filter.getExpression1(),filter.getExpression2() if an expression visitor has been set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsLike filter, Object data)
Visits filter.getExpression() if an expression visitor was set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
protected Object visit(BinaryLogicOperator filter, Object data)
Visits elements of filter.getChildren().
-
visit
public Object visit(And filter, Object data)
Visits elements of filter.getChildren().- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Or filter, Object data)
Visits elements of filter.getChildren().- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Not filter, Object data)
Visits filter.getFilter().- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsNull filter, Object data)
Visits filter.getExpression() if an expression visitor was set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsNil filter, Object extraData)
Visits filter.getExpression() if an expression visitor was set.- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Id filter, Object data)
Does nothing.- Specified by:
visit
in interfaceFilterVisitor
-
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 extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
-