Package org.geotools.data.complex.filter
Class UnmappingFilterVisitor
- Object
-
- UnmappingFilterVisitor
-
- All Implemented Interfaces:
ExpressionVisitor
,FilterVisitor
public class UnmappingFilterVisitor extends Object implements FilterVisitor, ExpressionVisitor
A Filter visitor that traverse a Filter or Expression made against a complex FeatureType, and that uses the attribute and type mapping information given by a FeatureTypeMapping object to produce an equivalent Filter that operates against the original FeatureType.Usage:
<code> Filter filterOnTargetType = ... FeatureTypeMappings schemaMapping = .... UnMappingFilterVisitor visitor = new UnmappingFilterVisitor(schemaMapping); Filter filterOnSourceType = (Filter)filterOnTargetType.accept(visitor, null); </code>
- Since:
- 2.4
- Author:
- Gabriel Roldan (Axios Engineering), Rini Angreani (CSIRO Earth Science and Resource Engineering)
-
-
Field Summary
Fields Modifier and Type Field Description protected FeatureTypeMapping
mappings
-
Constructor Summary
Constructors Constructor Description UnmappingFilterVisitor(FeatureTypeMapping mappings)
visit(*Expression) holds the unmapped expression here.
-
Method Summary
-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface FilterVisitor
visit
-
-
-
-
Field Detail
-
mappings
protected FeatureTypeMapping mappings
-
-
Constructor Detail
-
UnmappingFilterVisitor
public UnmappingFilterVisitor(FeatureTypeMapping mappings)
visit(*Expression) holds the unmapped expression here. Package visible just for unit tests
-
-
Method Detail
-
visitBinaryComparisonOperator
public Expression[][] visitBinaryComparisonOperator(BinaryComparisonOperator filter)
Returns a CompareFilter of the same type thanfilter
, but built on the unmapped expressions pointing to the surrogate type attributes.- Returns:
- the scalar product of the evaluation of both expressions
-
visitBinarySpatialOp
public Expression[][] visitBinarySpatialOp(BinarySpatialOperator filter)
-
visitBinaryLogicOp
public List<Filter> visitBinaryLogicOp(BinaryLogicOperator filter)
-
visitBinaryExpression
public Expression[][] visitBinaryExpression(BinaryExpression expression)
-
visit
public Object visit(ExcludeFilter filter, Object arg1)
Description copied from interface:FilterVisitor
VisitFilter.EXCLUDE
(often used during data structure transformations).- Specified by:
visit
in interfaceFilterVisitor
- Parameters:
filter
-Filter.EXCLUDE
.arg1
- Value object provided to visitor- Returns:
- subclass supplied
-
visit
public Object visit(IncludeFilter filter, Object arg1)
Description copied from interface:FilterVisitor
VisitFilter.INCLUDE
(often used during data structure transformations).- Specified by:
visit
in interfaceFilterVisitor
- Parameters:
filter
-Filter.INCLUDE
.arg1
- Value object provided to visitor- Returns:
- subclass supplied
-
visit
public Object visit(And filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Id filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Not filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Or filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsBetween filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsEqualTo filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsNotEqualTo filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsGreaterThan filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsGreaterThanOrEqualTo filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsLessThan filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsLessThanOrEqualTo filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsLike filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsNull filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(PropertyIsNil filter, Object extraData)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(BBOX filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Beyond filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Contains filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Crosses filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Disjoint filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(DWithin filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Equals filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Intersects filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Overlaps filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Touches filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visit
public Object visit(Within filter, Object arg1)
- Specified by:
visit
in interfaceFilterVisitor
-
visitNullFilter
public Object visitNullFilter(Object arg0)
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:
arg0
- Value object provided to visitor- Returns:
- subclass defined
-
visit
public Object visit(NilExpression expr, Object arg1)
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 expr, Object arg1)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(Divide expr, Object arg1)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(Function function, Object arg1)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(Literal expr, Object arg1)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(Multiply expr, Object arg1)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public List<Expression> visit(PropertyName expr, Object arg1)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(Subtract expr, Object arg1)
- 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)
-
-