org.geotools.filter
Interface CompareFilter

All Superinterfaces:
BinaryComparisonOperator, Filter, FilterType
All Known Subinterfaces:
BetweenFilter
All Known Implementing Classes:
BetweenFilterImpl, CompareFilterImpl, IsBetweenImpl, IsEqualsToImpl, IsGreaterThanImpl, IsGreaterThanOrEqualToImpl, IsLessThenImpl, IsLessThenOrEqualToImpl, IsNotEqualToImpl, IsNullImpl

Deprecated. use BinaryComparisonOperator

public interface CompareFilter
extends Filter, BinaryComparisonOperator

Defines a comparison filter (can be a math comparison or generic equals). This filter implements a comparison - of some sort - between two expressions. The comparison may be a math comparison or a generic equals comparison. If it is a math comparison, only math expressions are allowed; if it is an equals comparison, any expression types are allowed. Note that this comparison does not attempt to restrict its expressions to be meaningful. This means that it considers itself a valid filter as long as the expression comparison returns a valid result. It does no checking to see whether or not the expression comparison is meaningful with regard to checking feature attributes. In other words, this is a valid filter: 52 = 92, even though it will always return the same result and could be simplified away. It is up the the filter creator, therefore, to attempt to simplify/make meaningful filter logic.

Author:
Rob Hranac, Vision for New York
Module:
modules/library/api (gt-api.jar)

Field Summary
 
Fields inherited from interface Filter
ALL, NONE
 
Fields inherited from interface FilterType
BETWEEN, COMPARE_EQUALS, COMPARE_GREATER_THAN, COMPARE_GREATER_THAN_EQUAL, COMPARE_LESS_THAN, COMPARE_LESS_THAN_EQUAL, COMPARE_NOT_EQUALS, FID, GEOMETRY_BBOX, GEOMETRY_BEYOND, GEOMETRY_CONTAINS, GEOMETRY_CROSSES, GEOMETRY_DISJOINT, GEOMETRY_DWITHIN, GEOMETRY_EQUALS, GEOMETRY_INTERSECTS, GEOMETRY_OVERLAPS, GEOMETRY_TOUCHES, GEOMETRY_WITHIN, LIKE, LOGIC_AND, LOGIC_NOT, LOGIC_OR, NULL
 
Fields inherited from interface Filter
EXCLUDE, INCLUDE
 
Fields inherited from interface Filter
EXCLUDE, INCLUDE
 
Method Summary
 void addLeftValue(Expression leftValue)
          Deprecated. use BinaryComparisonOperator#setExpression1(Expression)
 void addRightValue(Expression rightValue)
          Deprecated. use BinaryComparisonOperator#setExpression2(Expression)
 boolean contains(SimpleFeature feature)
          Deprecated. use org.opengis.filter.Filter#evaluate(Feature)
 Expression getLeftValue()
          Deprecated. use BinaryComparisonOperator.getExpression1()
 Expression getRightValue()
          Deprecated. use BinaryComparisonOperator.getExpression2()
 
Methods inherited from interface Filter
accept, and, evaluate, getFilterType, not, or
 
Methods inherited from interface Filter
accept, evaluate
 
Methods inherited from interface BinaryComparisonOperator
getExpression1, getExpression2, isMatchingCase
 
Methods inherited from interface Filter
accept, evaluate
 

Method Detail

addLeftValue

void addLeftValue(Expression leftValue)
                  throws IllegalFilterException
Deprecated. use BinaryComparisonOperator#setExpression1(Expression)

Adds the 'left' value to this filter.

Parameters:
leftValue - Expression for 'left' value.
Throws:
IllegalFilterException - Filter is not internally consistent.
TODO:
REVISIT: immutability?

addRightValue

void addRightValue(Expression rightValue)
                   throws IllegalFilterException
Deprecated. use BinaryComparisonOperator#setExpression2(Expression)

Adds the 'right' value to this filter.

Parameters:
rightValue - Expression for 'right' value.
Throws:
IllegalFilterException - Filter is not internally consistent.
TODO:
REVISIT: make immutable.

getLeftValue

Expression getLeftValue()
Deprecated. use BinaryComparisonOperator.getExpression1()

Gets the left expression.

Returns:
The expression on the left of the comparison.

getRightValue

Expression getRightValue()
Deprecated. use BinaryComparisonOperator.getExpression2()

Gets the right expression.

Returns:
The expression on the right of the comparison.

contains

boolean contains(SimpleFeature feature)
Deprecated. use org.opengis.filter.Filter#evaluate(Feature)

Determines whether or not a given feature is 'inside' this filter.

Parameters:
feature - Specified feature to examine.
Returns:
Whether or not this feature is inside the filter.


Copyright © 1996-2010 Geotools. All Rights Reserved.