Package org.geotools.filter
Class FilterCapabilities
Object
FilterCapabilities
Represents the Filter capabilities that are supported by a SQLEncoder
Each SQLEncoder class should have one static FilterCapabilities, representing the filter encoding operations that it can successfully perform.
This class is used as one big mask to detect filters that cannot be performed
- Author:
- Chris Holmes, TOPP TODO: check if possible to deprecate @ deprecated use
FilterCapabilities
.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
Mask for Filter.EXCLUDEstatic final long
Scalar Mask for between opelongionstatic final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
Scalar Mask for function operationsstatic final long
Scalar Mask for like operationstatic final long
static final long
static final long
static final long
Scalar Mask for logical operationstatic final FilterCapabilities
static final long
Mask for no operationstatic final long
Mask for Filter.INCLUDEstatic final long
Scalar Mask for null check operationstatic final long
Scalar Mask for simple arithmetic operationsstatic final long
Scalar Mask for simple comparison operationsstatic final FilterCapabilities
static final long
Spatial Mask for bbox operationstatic final long
Spatial Mask for beyond operationstatic final long
Spatial Mask for contains operationstatic final long
Spatial Mask for crosses operationstatic final long
Spatial Mask for disjoint operationstatic final long
Spatial Mask for dwithin operationstatic final long
Spatial Mask for equals operationstatic final long
Spatial Mask for intersect operationstatic final long
Spatial Mask for overlaps operationstatic final long
Spatial Mask for touches operationstatic final long
Spatial Mask for within operation -
Constructor Summary
ConstructorsConstructorDescriptionFilterCapabilities
(long filterCapabilitiesType) FilterCapabilities
(Class type) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAll
(FilterCapabilities capabilities) Add all the capabilities in the provided FilterCapabilities to this capabilities.void
addType
(long type) Adds a new support type to capabilities.void
Adds a new support type to capabilities.void
Adds a new support type to capabilities.convertFilterTypeToMask
(short type) Returns the mask that is equivalent to the FilterType constant.static FilterCapabilities
findFunction
(String name) Translates a String into an object that represents function expressionstatic FilterCapabilities
findOperation
(String name) Translates a String into an object that represents the operationboolean
fullySupports
(Filter filter) Determines if the filter and all its sub filters are supported.long
long
boolean
boolean
Determines if the filter passed in is supported.boolean
supports
(FilterCapabilities type)
-
Field Details
-
NO_OP
public static final long NO_OPMask for no operation- See Also:
-
NONE
public static final long NONEMask for Filter.INCLUDE- See Also:
-
ALL
public static final long ALLMask for Filter.EXCLUDE- See Also:
-
SPATIAL_BBOX
public static final long SPATIAL_BBOXSpatial Mask for bbox operation- See Also:
-
SPATIAL_EQUALS
public static final long SPATIAL_EQUALSSpatial Mask for equals operation- See Also:
-
SPATIAL_DISJOINT
public static final long SPATIAL_DISJOINTSpatial Mask for disjoint operation- See Also:
-
SPATIAL_INTERSECT
public static final long SPATIAL_INTERSECTSpatial Mask for intersect operation- See Also:
-
SPATIAL_TOUCHES
public static final long SPATIAL_TOUCHESSpatial Mask for touches operation- See Also:
-
SPATIAL_CROSSES
public static final long SPATIAL_CROSSESSpatial Mask for crosses operation- See Also:
-
SPATIAL_WITHIN
public static final long SPATIAL_WITHINSpatial Mask for within operation- See Also:
-
SPATIAL_CONTAINS
public static final long SPATIAL_CONTAINSSpatial Mask for contains operation- See Also:
-
SPATIAL_OVERLAPS
public static final long SPATIAL_OVERLAPSSpatial Mask for overlaps operation- See Also:
-
SPATIAL_BEYOND
public static final long SPATIAL_BEYONDSpatial Mask for beyond operation- See Also:
-
SPATIAL_DWITHIN
public static final long SPATIAL_DWITHINSpatial Mask for dwithin operation- See Also:
-
LIKE
public static final long LIKEScalar Mask for like operation- See Also:
-
BETWEEN
public static final long BETWEENScalar Mask for between opelongion- See Also:
-
NULL_CHECK
public static final long NULL_CHECKScalar Mask for null check operation- See Also:
-
SIMPLE_ARITHMETIC
public static final long SIMPLE_ARITHMETICScalar Mask for simple arithmetic operations- See Also:
-
FUNCTIONS
public static final long FUNCTIONSScalar Mask for function operations- See Also:
-
COMPARE_EQUALS
public static final long COMPARE_EQUALS- See Also:
-
COMPARE_GREATER_THAN
public static final long COMPARE_GREATER_THAN- See Also:
-
COMPARE_GREATER_THAN_EQUAL
public static final long COMPARE_GREATER_THAN_EQUAL- See Also:
-
COMPARE_LESS_THAN
public static final long COMPARE_LESS_THAN- See Also:
-
COMPARE_LESS_THAN_EQUAL
public static final long COMPARE_LESS_THAN_EQUAL- See Also:
-
COMPARE_NOT_EQUALS
public static final long COMPARE_NOT_EQUALS- See Also:
-
FID
public static final long FID- See Also:
-
LOGIC_AND
public static final long LOGIC_AND- See Also:
-
LOGIC_NOT
public static final long LOGIC_NOT- See Also:
-
LOGIC_OR
public static final long LOGIC_OR- See Also:
-
LOGICAL
public static final long LOGICALScalar Mask for logical operation- See Also:
-
SIMPLE_COMPARISONS
public static final long SIMPLE_COMPARISONSScalar Mask for simple comparison operations- See Also:
-
SIMPLE_COMPARISONS_OPENGIS
-
LOGICAL_OPENGIS
-
-
Constructor Details
-
FilterCapabilities
public FilterCapabilities(long filterCapabilitiesType) -
FilterCapabilities
public FilterCapabilities() -
FilterCapabilities
-
-
Method Details
-
addType
public void addType(long type) Adds a new support type to capabilities.- Parameters:
type
- The one of the masks enumerated in this class
-
addType
Adds a new support type to capabilities. For 2.2 only function expression support is added this way. As of geotools 2.3 this will be the supported way of adding to Filtercapabilities.- Parameters:
type
- the Class that indicates the new support.
-
addType
Adds a new support type to capabilities. For 2.2 only function expression support is added this way. As of geotools 2.3 this will be the supported way of adding to Filtercapabilities.- Parameters:
type
- the Class that indicates the new support.
-
addAll
Add all the capabilities in the provided FilterCapabilities to this capabilities.- Parameters:
capabilities
- capabilities to add.
-
convertFilterTypeToMask
Returns the mask that is equivalent to the FilterType constant.- Parameters:
type
- a constant fromFilterType
- Returns:
- the mask that is equivalent to the FilterType constant.
-
supports
Determines if the filter passed in is supported.- Parameters:
filter
- The Filter to be tested.- Returns:
- true if supported, false otherwise.
-
fullySupports
Determines if the filter and all its sub filters are supported. Is most important for logic filters, as they are the only ones with subFilters. Null filters should not be used here, if nothing should be filtered than Filter.INCLUDE can be used. Embedded nulls can be a particular source of problems, buried in logic filters.- Parameters:
filter
- the filter to be tested.- Returns:
- true if all sub filters are supported, false otherwise.
- Throws:
IllegalArgumentException
- If a null filter is passed in. As this function is recursive a null in a logic filter will also cause an error.
-
supports
-
supports
-
getScalarOps
public long getScalarOps() -
getSpatialOps
public long getSpatialOps() -
findOperation
Translates a String into an object that represents the operation- Parameters:
name
- String, operation name- Returns:
- one of the
FilterCapabilities
constants
-
findFunction
Translates a String into an object that represents function expression- Parameters:
name
- String, expression name- Returns:
- one of the
FilterCapabilities
constants
-