org.geotools.filter
Class BinaryComparisonAbstract

java.lang.Object
  extended by org.geotools.filter.FilterAbstract
      extended by org.geotools.filter.AbstractFilter
          extended by org.geotools.filter.BinaryComparisonAbstract
All Implemented Interfaces:
FilterType, org.opengis.filter.BinaryComparisonOperator, org.opengis.filter.Filter
Direct Known Subclasses:
CompareFilterImpl, GeometryFilterImpl

public abstract class BinaryComparisonAbstract
extends AbstractFilter
implements org.opengis.filter.BinaryComparisonOperator

Abstract implemention for binary filters.

Author:
Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org

Field Summary
protected  org.opengis.filter.expression.Expression expression1
           
protected  org.opengis.filter.expression.Expression expression2
           
 
Fields inherited from class org.geotools.filter.AbstractFilter
filterType, LOGGER, permissiveConstruction
 
Fields inherited from class org.geotools.filter.FilterAbstract
factory
 
Fields inherited from interface org.opengis.filter.Filter
EXCLUDE, INCLUDE
 
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 BinaryComparisonAbstract(org.opengis.filter.FilterFactory factory)
           
protected BinaryComparisonAbstract(org.opengis.filter.FilterFactory factory, org.opengis.filter.expression.Expression expression1, org.opengis.filter.expression.Expression expression2)
           
protected BinaryComparisonAbstract(org.opengis.filter.FilterFactory factory, org.opengis.filter.expression.Expression expression1, org.opengis.filter.expression.Expression expression2, boolean matchingCase)
           
 
Method Summary
 Filter and(org.opengis.filter.Filter filter)
          Implements a logical AND with this filter and returns the merged filter.
protected  java.lang.Comparable comparable(java.lang.Object value)
          Wraps an object in a Comparable.
protected  java.lang.Object[] eval(java.lang.Object object)
          Convenience method which evaluates the expressions and trys to align the values to be of the same type.
 org.opengis.filter.expression.Expression getExpression1()
           
 org.opengis.filter.expression.Expression getExpression2()
           
 boolean isMatchingCase()
           
 Filter not()
          Implements a logical NOT with this filter and returns the negated filter
 Filter or(org.opengis.filter.Filter filter)
          Implements a logical OR with this filter and returns the merged filter.
 void setExpression1(org.opengis.filter.expression.Expression expression)
           
 void setExpression2(org.opengis.filter.expression.Expression expression)
           
 
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
accept, accepts, eval, eval, eval, evaluate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opengis.filter.Filter
accept, evaluate
 
Methods inherited from interface org.geotools.filter.Filter
evaluate
 

Field Detail

expression1

protected org.opengis.filter.expression.Expression expression1

expression2

protected org.opengis.filter.expression.Expression expression2
Constructor Detail

BinaryComparisonAbstract

protected BinaryComparisonAbstract(org.opengis.filter.FilterFactory factory)

BinaryComparisonAbstract

protected BinaryComparisonAbstract(org.opengis.filter.FilterFactory factory,
                                   org.opengis.filter.expression.Expression expression1,
                                   org.opengis.filter.expression.Expression expression2)

BinaryComparisonAbstract

protected BinaryComparisonAbstract(org.opengis.filter.FilterFactory factory,
                                   org.opengis.filter.expression.Expression expression1,
                                   org.opengis.filter.expression.Expression expression2,
                                   boolean matchingCase)
Method Detail

getExpression1

public org.opengis.filter.expression.Expression getExpression1()
Specified by:
getExpression1 in interface org.opengis.filter.BinaryComparisonOperator

setExpression1

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

getExpression2

public org.opengis.filter.expression.Expression getExpression2()
Specified by:
getExpression2 in interface org.opengis.filter.BinaryComparisonOperator

setExpression2

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

isMatchingCase

public boolean isMatchingCase()
Specified by:
isMatchingCase in interface org.opengis.filter.BinaryComparisonOperator

and

public Filter and(org.opengis.filter.Filter filter)
Description copied from interface: Filter
Implements a logical AND with this filter and returns the merged filter.

Parameters:
filter - The filter to AND with this filter.
Returns:
Combined filter.

or

public Filter or(org.opengis.filter.Filter filter)
Description copied from interface: Filter
Implements a logical OR with this filter and returns the merged filter.

Parameters:
filter - The filter to OR with this filter.
Returns:
Combined filter.

not

public Filter not()
Description copied from interface: Filter
Implements a logical NOT with this filter and returns the negated filter

Returns:
Combined filter.

eval

protected java.lang.Object[] eval(java.lang.Object object)
Convenience method which evaluates the expressions and trys to align the values to be of the same type.

If the values can not be aligned, the original values are returned.

Returns:

comparable

protected final java.lang.Comparable comparable(java.lang.Object value)
Wraps an object in a Comparable.

Parameters:
value - The original value.
Returns:
A comparable


Copyright © 1996-2010 Geotools. All Rights Reserved.