org.geotools.filter
Class BinaryComparisonAbstract

Object
  extended by FilterAbstract
      extended by AbstractFilter
          extended by BinaryComparisonAbstract
All Implemented Interfaces:
FilterType, BinaryComparisonOperator, Filter
Direct Known Subclasses:
CompareFilterImpl, GeometryFilterImpl

public abstract class BinaryComparisonAbstract
extends AbstractFilter
implements BinaryComparisonOperator

Abstract implemention for binary filters.

Author:
Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
Module:
modules/library/main (gt-main.jar)

Field Summary
protected  Expression expression1
           
protected  Expression expression2
           
 
Fields inherited from class AbstractFilter
filterType, LOGGER, permissiveConstruction
 
Fields inherited from class FilterAbstract
factory
 
Fields inherited from interface Filter
EXCLUDE, INCLUDE
 
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
 
Constructor Summary
protected BinaryComparisonAbstract(FilterFactory factory)
           
protected BinaryComparisonAbstract(FilterFactory factory, Expression expression1, Expression expression2)
           
protected BinaryComparisonAbstract(FilterFactory factory, Expression expression1, Expression expression2, boolean matchingCase)
           
 
Method Summary
 Filter and(Filter filter)
           
protected  Comparable comparable(Object value)
          Wraps an object in a Comparable.
protected  Object[] eval(Object object)
          Convenience method which evaluates the expressions and trys to align the values to be of the same type.
 Expression getExpression1()
           
 Expression getExpression2()
           
 boolean isMatchingCase()
           
 Filter not()
           
 Filter or(Filter filter)
           
 void setExpression1(Expression expression)
           
 void setExpression2(Expression expression)
           
 
Methods inherited from class AbstractFilter
accept, contains, getFilterType, isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter
 
Methods inherited from class FilterAbstract
accept, accepts, eval, eval, eval, evaluate
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Filter
accept, evaluate
 
Methods inherited from interface Filter
evaluate
 

Field Detail

expression1

protected Expression expression1

expression2

protected Expression expression2
Constructor Detail

BinaryComparisonAbstract

protected BinaryComparisonAbstract(FilterFactory factory)

BinaryComparisonAbstract

protected BinaryComparisonAbstract(FilterFactory factory,
                                   Expression expression1,
                                   Expression expression2)

BinaryComparisonAbstract

protected BinaryComparisonAbstract(FilterFactory factory,
                                   Expression expression1,
                                   Expression expression2,
                                   boolean matchingCase)
Method Detail

getExpression1

public Expression getExpression1()
Specified by:
getExpression1 in interface BinaryComparisonOperator

setExpression1

public void setExpression1(Expression expression)

getExpression2

public Expression getExpression2()
Specified by:
getExpression2 in interface BinaryComparisonOperator

setExpression2

public void setExpression2(Expression expression)

isMatchingCase

public boolean isMatchingCase()
Specified by:
isMatchingCase in interface BinaryComparisonOperator

and

public Filter and(Filter filter)

or

public Filter or(Filter filter)

not

public Filter not()

eval

protected Object[] eval(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 Comparable comparable(Object value)
Wraps an object in a Comparable.

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


Copyright © 1996-2009 Geotools. All Rights Reserved.