org.geotools.filter.visitor
Class IsSupportedFilterVisitor

Object
  extended by IsSupportedFilterVisitor
All Implemented Interfaces:
ExpressionVisitor, FilterVisitor

public class IsSupportedFilterVisitor
extends Object
implements FilterVisitor, ExpressionVisitor

This visitor will return Boolean.TRUE if the provided filter is supported by the the FilterCapabilities.

This method will look up the right information in the provided FilterCapabilities instance for you depending on the type of filter provided.

Example:


 boolean yes = filter.accepts( IsSupportedFilterVisitor( capabilities ), null );
 
Please consider IsSupportedFilterVisitor if you need to be sure of the entire Filter.

Author:
Jody Garnett (Refractions Research)

Constructor Summary
IsSupportedFilterVisitor(FilterCapabilities capabilities)
           
 
Method Summary
 Object visit(Add expression, Object extraData)
           
 Object visit(After after, Object extraData)
           
 Object visit(And filter, Object extraData)
           
 Object visit(AnyInteracts anyInteracts, Object extraData)
           
 Object visit(BBOX filter, Object extraData)
           
 Object visit(Before before, Object extraData)
           
 Object visit(Begins begins, Object extraData)
           
 Object visit(BegunBy begunBy, Object extraData)
           
 Object visit(Beyond filter, Object extraData)
           
protected  Object visit(BinaryTemporalOperator filter, Object data)
           
 Object visit(Contains filter, Object extraData)
           
 Object visit(Crosses filter, Object extraData)
           
 Object visit(Disjoint filter, Object extraData)
           
 Object visit(Divide expression, Object extraData)
           
 Object visit(During during, Object extraData)
           
 Object visit(DWithin filter, Object extraData)
           
 Object visit(EndedBy endedBy, Object extraData)
           
 Object visit(Ends ends, Object extraData)
           
 Object visit(Equals filter, Object extraData)
           
 Object visit(ExcludeFilter filter, Object extraData)
          INCLUDE and EXCLUDE are never supported
 Object visit(Function function, Object extraData)
           
 Object visit(Id filter, Object extraData)
           
 Object visit(IncludeFilter filter, Object extraData)
          INCLUDE and EXCLUDE are never supported
 Object visit(Intersects filter, Object extraData)
           
 Object visit(Literal expression, Object extraData)
           
 Object visit(Meets meets, Object extraData)
           
 Object visit(MetBy metBy, Object extraData)
           
 Object visit(Multiply expression, Object extraData)
           
 Object visit(NilExpression expression, Object extraData)
          NilExpression is a placeholder and is never supported
 Object visit(Not filter, Object extraData)
           
 Object visit(Or filter, Object extraData)
           
 Object visit(OverlappedBy overlappedBy, Object extraData)
           
 Object visit(Overlaps filter, Object extraData)
           
 Object visit(PropertyIsBetween filter, Object extraData)
           
 Object visit(PropertyIsEqualTo filter, Object extraData)
           
 Object visit(PropertyIsGreaterThan filter, Object extraData)
           
 Object visit(PropertyIsGreaterThanOrEqualTo filter, Object extraData)
           
 Object visit(PropertyIsLessThan filter, Object extraData)
           
 Object visit(PropertyIsLessThanOrEqualTo filter, Object extraData)
           
 Object visit(PropertyIsLike filter, Object extraData)
           
 Object visit(PropertyIsNil filter, Object extraData)
           
 Object visit(PropertyIsNotEqualTo filter, Object extraData)
           
 Object visit(PropertyIsNull filter, Object extraData)
           
 Object visit(PropertyName expression, Object extraData)
          You can override this to perform a sanity check against a provided FeatureType.
 Object visit(Subtract expression, Object extraData)
           
 Object visit(TContains contains, Object extraData)
           
 Object visit(TEquals equals, Object extraData)
           
 Object visit(Touches filter, Object extraData)
           
 Object visit(TOverlaps contains, Object extraData)
           
 Object visit(Within filter, Object extraData)
           
 Object visitNullFilter(Object extraData)
          Used to account for a null filter value.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IsSupportedFilterVisitor

public IsSupportedFilterVisitor(FilterCapabilities capabilities)
Method Detail

visit

public Object visit(ExcludeFilter filter,
                    Object extraData)
INCLUDE and EXCLUDE are never supported

Specified by:
visit in interface FilterVisitor
Parameters:
filter - Filter.EXCLUDE.
extraData - Value object provided to visitor
Returns:
subclass supplied

visit

public Object visit(IncludeFilter filter,
                    Object extraData)
INCLUDE and EXCLUDE are never supported

Specified by:
visit in interface FilterVisitor
Parameters:
filter - Filter.INCLUDE.
extraData - Value object provided to visitor
Returns:
subclass supplied

visit

public Object visit(And filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Id filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Not filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Or filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(PropertyIsBetween filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(PropertyIsEqualTo filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(PropertyIsNotEqualTo filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(PropertyIsGreaterThan filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(PropertyIsGreaterThanOrEqualTo filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(PropertyIsLessThan filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(PropertyIsLessThanOrEqualTo filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(PropertyIsLike filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(PropertyIsNull filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(PropertyIsNil filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(BBOX filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Beyond filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Contains filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Crosses filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Disjoint filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(DWithin filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Equals filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Intersects filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Overlaps filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Touches filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Within filter,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visitNullFilter

public Object visitNullFilter(Object extraData)
Description copied from interface: FilterVisitor
Used to account for a null 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 interface FilterVisitor
Parameters:
extraData - Value object provided to visitor
Returns:
subclass defined

visit

public Object visit(NilExpression expression,
                    Object extraData)
NilExpression is a placeholder and is never supported

Specified by:
visit in interface ExpressionVisitor
Returns:
implementation specific

visit

public Object visit(Add expression,
                    Object extraData)
Specified by:
visit in interface ExpressionVisitor

visit

public Object visit(Divide expression,
                    Object extraData)
Specified by:
visit in interface ExpressionVisitor

visit

public Object visit(Function function,
                    Object extraData)
Specified by:
visit in interface ExpressionVisitor

visit

public Object visit(Literal expression,
                    Object extraData)
Specified by:
visit in interface ExpressionVisitor

visit

public Object visit(Multiply expression,
                    Object extraData)
Specified by:
visit in interface ExpressionVisitor

visit

public Object visit(PropertyName expression,
                    Object extraData)
You can override this to perform a sanity check against a provided FeatureType.

Specified by:
visit in interface ExpressionVisitor

visit

public Object visit(Subtract expression,
                    Object extraData)
Specified by:
visit in interface ExpressionVisitor

visit

public Object visit(After after,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(AnyInteracts anyInteracts,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Before before,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Begins begins,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(BegunBy begunBy,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(During during,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(EndedBy endedBy,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Ends ends,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(Meets meets,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(MetBy metBy,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(OverlappedBy overlappedBy,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(TContains contains,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(TEquals equals,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

public Object visit(TOverlaps contains,
                    Object extraData)
Specified by:
visit in interface FilterVisitor

visit

protected Object visit(BinaryTemporalOperator filter,
                       Object data)


Copyright © 1996-2014 Geotools. All Rights Reserved.