org.geotools.filter
Class IsBetweenImpl

java.lang.Object
  extended by org.geotools.filter.FilterAbstract
      extended by org.geotools.filter.AbstractFilter
          extended by org.geotools.filter.BinaryComparisonAbstract
              extended by org.geotools.filter.CompareFilterImpl
                  extended by org.geotools.filter.IsBetweenImpl
All Implemented Interfaces:
BetweenFilter, CompareFilter, FilterType, org.opengis.filter.BinaryComparisonOperator, org.opengis.filter.Filter, org.opengis.filter.PropertyIsBetween

public class IsBetweenImpl
extends CompareFilterImpl
implements BetweenFilter

Straight implementation of GeoAPI interface.

Author:
Justin Deoliveira, The Open Planning Project

Field Summary
 
Fields inherited from class org.geotools.filter.BinaryComparisonAbstract
expression1, expression2
 
Fields inherited from class org.geotools.filter.AbstractFilter
filterType, permissiveConstruction
 
Fields inherited from class org.geotools.filter.FilterAbstract
factory
 
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
 
Fields inherited from interface org.opengis.filter.Filter
EXCLUDE, INCLUDE
 
Fields inherited from interface org.opengis.filter.PropertyIsBetween
NAME
 
Constructor Summary
protected IsBetweenImpl(org.opengis.filter.FilterFactory factory, org.opengis.filter.expression.Expression lower, org.opengis.filter.expression.Expression expression, org.opengis.filter.expression.Expression upper)
           
 
Method Summary
 java.lang.Object accept(org.opengis.filter.FilterVisitor visitor, java.lang.Object extraData)
          Used by FilterVisitors to perform some action on this filter instance.
 void addMiddleValue(Expression middleValue)
          Deprecated. use setExpression(Expression)
 boolean evaluate(java.lang.Object feature)
           
 org.opengis.filter.expression.Expression getExpression()
           
 org.opengis.filter.expression.Expression getLowerBoundary()
           
 Expression getMiddleValue()
          Deprecated. use getExpression()
 org.opengis.filter.expression.Expression getUpperBoundary()
           
 void setExpression(org.opengis.filter.expression.Expression expression)
           
 void setLowerBoundary(org.opengis.filter.expression.Expression lowerBoundary)
           
 void setUpperBoundary(org.opengis.filter.expression.Expression upperBoundary)
           
 java.lang.String toString()
          Returns a string representation of this filter.
 
Methods inherited from class org.geotools.filter.CompareFilterImpl
addLeftValue, addRightValue, compare, equals, evaluate, getLeftValue, getRightValue, hashCode, setExpression1, setExpression2
 
Methods inherited from class org.geotools.filter.BinaryComparisonAbstract
and, comparable, eval, getExpression1, getExpression2, isMatchingCase, not, or
 
Methods inherited from class org.geotools.filter.AbstractFilter
accept, contains, getFilterType, isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter
 
Methods inherited from class org.geotools.filter.FilterAbstract
accepts, eval, eval, eval
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.geotools.filter.BetweenFilter
contains, getExpression1, getExpression2, setExpression1, setExpression2
 
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.BinaryComparisonOperator
isMatchingCase
 

Constructor Detail

IsBetweenImpl

protected IsBetweenImpl(org.opengis.filter.FilterFactory factory,
                        org.opengis.filter.expression.Expression lower,
                        org.opengis.filter.expression.Expression expression,
                        org.opengis.filter.expression.Expression upper)
Method Detail

getExpression

public org.opengis.filter.expression.Expression getExpression()
Specified by:
getExpression in interface org.opengis.filter.PropertyIsBetween

setExpression

public void setExpression(org.opengis.filter.expression.Expression expression)

evaluate

public boolean evaluate(java.lang.Object feature)
Specified by:
evaluate in interface org.opengis.filter.Filter

accept

public java.lang.Object accept(org.opengis.filter.FilterVisitor visitor,
                               java.lang.Object extraData)
Description copied from class: CompareFilterImpl
Used by FilterVisitors to perform some action on this filter instance. Typicaly used by Filter decoders, but may also be used by any thing which needs infomration from filter structure. Implementations should always call: visitor.visit(this); It is importatant that this is not left to a parent class unless the parents API is identical.

Specified by:
accept in interface org.opengis.filter.Filter
Specified by:
accept in class CompareFilterImpl
Parameters:
visitor - The visitor which requires access to this filter, the method must call visitor.visit(this);

getLowerBoundary

public org.opengis.filter.expression.Expression getLowerBoundary()
Specified by:
getLowerBoundary in interface org.opengis.filter.PropertyIsBetween

setLowerBoundary

public void setLowerBoundary(org.opengis.filter.expression.Expression lowerBoundary)

getUpperBoundary

public org.opengis.filter.expression.Expression getUpperBoundary()
Specified by:
getUpperBoundary in interface org.opengis.filter.PropertyIsBetween

setUpperBoundary

public void setUpperBoundary(org.opengis.filter.expression.Expression upperBoundary)

getMiddleValue

public final Expression getMiddleValue()
Deprecated. use getExpression()

Description copied from interface: BetweenFilter
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.

Specified by:
getMiddleValue in interface BetweenFilter
Returns:
the expression in the middle.

addMiddleValue

public void addMiddleValue(Expression middleValue)
Deprecated. use setExpression(Expression)

Description copied from interface: BetweenFilter
Sets the values to be compared as between the left and right values.

Specified by:
addMiddleValue in interface BetweenFilter
Parameters:
middleValue - The expression to be compared.

toString

public java.lang.String toString()
Description copied from class: CompareFilterImpl
Returns a string representation of this filter.

Overrides:
toString in class CompareFilterImpl
Returns:
String representation of the compare filter.


Copyright © 1996-2010 Geotools. All Rights Reserved.