|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.filter.FilterAbstract org.geotools.filter.AbstractFilter org.geotools.filter.BinaryComparisonAbstract org.geotools.filter.CompareFilterImpl org.geotools.filter.BetweenFilterImpl
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.
Field Summary | |
protected org.opengis.filter.expression.Expression |
middleValue
The 'middle' value, which must be an attribute expression. |
Fields inherited from class org.geotools.filter.BinaryComparisonAbstract |
expression1, expression2 |
Fields inherited from class org.geotools.filter.AbstractFilter |
filterType, permissiveConstruction |
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 |
Constructor Summary | |
protected |
BetweenFilterImpl()
Constructor which flags the operator as between. |
protected |
BetweenFilterImpl(FilterFactory factory)
|
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(org.opengis.filter.expression.Expression) |
boolean |
equals(java.lang.Object oFilter)
Returns true if the passed in object is the same as this filter. |
boolean |
evaluate(Feature feature)
Determines whether or not a given feature is 'inside' this filter. |
org.opengis.filter.expression.Expression |
getExpression()
Gets the middle value of the between. |
org.opengis.filter.expression.Expression |
getLowerBoundary()
Returns the left,lower, or first expression. |
Expression |
getMiddleValue()
Deprecated. use getExpression() |
org.opengis.filter.expression.Expression |
getUpperBoundary()
Returns the right,upper, or second expression. |
int |
hashCode()
Override of hashCode method. |
void |
setExpression(org.opengis.filter.expression.Expression expression)
Sets the expression or middle value. |
void |
setLowerBoundary(org.opengis.filter.expression.Expression lowerBounds)
Sets the left,lower, or first expression. |
void |
setUpperBoundary(org.opengis.filter.expression.Expression upperBounds)
Sets the right,upper, or second expression. |
java.lang.String |
toString()
Returns a string representation of this filter. |
Methods inherited from class org.geotools.filter.CompareFilterImpl |
addLeftValue, addRightValue, compare, getLeftValue, getRightValue, setExpression1, setExpression2 |
Methods inherited from class org.geotools.filter.BinaryComparisonAbstract |
and, getExpression1, getExpression2, not, or |
Methods inherited from class org.geotools.filter.AbstractFilter |
accept, contains, evaluate, getFilterType, isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter |
Methods inherited from class org.geotools.filter.FilterAbstract |
accepts, comparable, 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, getFilterType, not, or |
Methods inherited from interface org.opengis.filter.Filter |
evaluate |
Field Detail |
protected org.opengis.filter.expression.Expression middleValue
Constructor Detail |
protected BetweenFilterImpl(FilterFactory factory)
protected BetweenFilterImpl() throws IllegalFilterException
IllegalFilterException
- Should never happen.Method Detail |
public final void addMiddleValue(Expression middleValue)
setExpression(org.opengis.filter.expression.Expression)
addMiddleValue
in interface BetweenFilter
middleValue
- The expression to be compared.public void setExpression(org.opengis.filter.expression.Expression expression)
setExpression
in interface org.opengis.filter.PropertyIsBetween
public final Expression getMiddleValue()
getExpression()
getMiddleValue
in interface BetweenFilter
public org.opengis.filter.expression.Expression getExpression()
getExpression
in interface org.opengis.filter.PropertyIsBetween
public org.opengis.filter.expression.Expression getLowerBoundary()
getLowerBoundary
in interface org.opengis.filter.PropertyIsBetween
public void setLowerBoundary(org.opengis.filter.expression.Expression lowerBounds)
setLowerBoundary
in interface org.opengis.filter.PropertyIsBetween
public org.opengis.filter.expression.Expression getUpperBoundary()
getUpperBoundary
in interface org.opengis.filter.PropertyIsBetween
public void setUpperBoundary(org.opengis.filter.expression.Expression upperBounds)
setUpperBoundary
in interface org.opengis.filter.PropertyIsBetween
public boolean evaluate(Feature feature)
evaluate
in interface Filter
evaluate
in class CompareFilterImpl
feature
- Specified feature to examine.
public java.lang.String toString()
toString
in class CompareFilterImpl
public boolean equals(java.lang.Object oFilter)
equals
in class CompareFilterImpl
oFilter
- the filter to test for eqaulity.
public int hashCode()
hashCode
in class CompareFilterImpl
public java.lang.Object accept(org.opengis.filter.FilterVisitor visitor, java.lang.Object extraData)
accept
in interface org.opengis.filter.Filter
accept
in class CompareFilterImpl
visitor
- The visitor which requires access to this filter, the
method must call visitor.visit(this);
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |