org.geotools.filter
Interface BetweenFilter

All Superinterfaces:
org.opengis.filter.BinaryComparisonOperator, CompareFilter, Filter, org.opengis.filter.Filter, FilterType, org.opengis.filter.PropertyIsBetween
All Known Implementing Classes:
BetweenFilterImpl

public interface BetweenFilter
extends CompareFilter, org.opengis.filter.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.

Version:
$Id: BetweenFilter.java 18021 2006-02-14 20:36:18Z jdeolive $
Author:
Rob Hranac, TOPP

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

Method Detail

contains

public boolean contains(Feature 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

public org.opengis.filter.expression.Expression getExpression1()
Deprecated. use PropertyIsBetween.getLowerBoundary()

Specified by:
getExpression1 in interface org.opengis.filter.BinaryComparisonOperator

getExpression2

public org.opengis.filter.expression.Expression getExpression2()
Deprecated. use PropertyIsBetween.getUpperBoundary()()

Specified by:
getExpression2 in interface org.opengis.filter.BinaryComparisonOperator

setExpression1

public void setExpression1(org.opengis.filter.expression.Expression expression)
Deprecated. use PropertyIsBetween.setLowerBoundary(Expression)()

Specified by:
setExpression1 in interface org.opengis.filter.BinaryComparisonOperator

setExpression2

public void setExpression2(org.opengis.filter.expression.Expression expression)
Deprecated. use PropertyIsBetween.setUpperBoundary(Expression)()

Specified by:
setExpression2 in interface org.opengis.filter.BinaryComparisonOperator

getMiddleValue

public 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

public 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.
Task:
REVISIT: rename to setMiddleValue? You can't have more than 1.


Copyright © GeoTools. All Rights Reserved.