org.geotools.filter
Interface BetweenFilter

All Superinterfaces:
BinaryComparisonOperator, CompareFilter, Filter, FilterType, PropertyIsBetween
All Known Implementing Classes:
BetweenFilterImpl, IsBetweenImpl

Deprecated. use PropertyIsBetween

public interface BetweenFilter
extends CompareFilter, PropertyIsBetween

Defines a 'between' filter (which is a specialized compare filter). A between filter is just shorthand for a less-than-or-equal filter ANDed with a greater-than-or-equal filter. Arguably, this would be better handled using those constructs, but the OGC filter specification creates its own object for this, so we do as well. An important note here is that a between filter is actually a math filter, so its outer (left and right) expressions must be math expressions. This is enforced by the FilterAbstract class, which considers a BETWEEN operator to be a math filter.

Author:
Rob Hranac, TOPP
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
 
Fields inherited from interface PropertyIsBetween
NAME
 
Method Summary
 void addMiddleValue(Expression middleValue)
          Deprecated. use PropertyIsBetween#setExpression(Expression)
 boolean contains(SimpleFeature feature)
          Deprecated. use org.opengis.filter.Filter#evaluate(Feature)
 Expression getExpression1()
          Deprecated. use PropertyIsBetween.getLowerBoundary()
 Expression getExpression2()
          Deprecated. use PropertyIsBetween.getUpperBoundary()()
 Expression getMiddleValue()
          Deprecated. use PropertyIsBetween.getExpression()
 void setExpression1(Expression expression)
          Deprecated. use PropertyIsBetween#setLowerBoundary(Expression)()
 void setExpression2(Expression expression)
          Deprecated. use PropertyIsBetween#setUpperBoundary(Expression)()
 
Methods inherited from interface CompareFilter
addLeftValue, addRightValue, getLeftValue, getRightValue
 
Methods inherited from interface Filter
accept, and, evaluate, getFilterType, not, or
 
Methods inherited from interface Filter
accept, evaluate
 
Methods inherited from interface BinaryComparisonOperator
isMatchingCase
 
Methods inherited from interface Filter
accept, evaluate
 
Methods inherited from interface PropertyIsBetween
getExpression, getLowerBoundary, getUpperBoundary
 

Method Detail

contains

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

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

Specified by:
contains in interface CompareFilter
Parameters:
feature - Specified feature to examine.
Returns:
Whether or not this feature is inside the filter.

getExpression1

Expression getExpression1()
Deprecated. use PropertyIsBetween.getLowerBoundary()

Specified by:
getExpression1 in interface BinaryComparisonOperator

getExpression2

Expression getExpression2()
Deprecated. use PropertyIsBetween.getUpperBoundary()()

Specified by:
getExpression2 in interface BinaryComparisonOperator

setExpression1

void setExpression1(Expression expression)
Deprecated. use PropertyIsBetween#setLowerBoundary(Expression)()


setExpression2

void setExpression2(Expression expression)
Deprecated. use PropertyIsBetween#setUpperBoundary(Expression)()


getMiddleValue

Expression getMiddleValue()
Deprecated. use PropertyIsBetween.getExpression()

Gets the middle value of the between. Should generally be an AttributeExpression: 1 <= area <= 200 makes sense, 1 <= 200 <= area should just use a less-than-or-equal filter.

Returns:
the expression in the middle.

addMiddleValue

void addMiddleValue(Expression middleValue)
Deprecated. use PropertyIsBetween#setExpression(Expression)

Sets the values to be compared as between the left and right values.

Parameters:
middleValue - The expression to be compared.
TODO:
REVISIT: rename to setMiddleValue? You can't have more than 1.


Copyright © 1996-2009 Geotools. All Rights Reserved.