org.geotools.filter
Class MultiCompareFilterImpl

Object
  extended by FilterAbstract
      extended by AbstractFilter
          extended by BinaryComparisonAbstract
              extended by CompareFilterImpl
                  extended by MultiCompareFilterImpl
All Implemented Interfaces:
CompareFilter, FilterType, BinaryComparisonOperator, Filter, MultiValuedFilter
Direct Known Subclasses:
IsEqualsToImpl, IsGreaterThanImpl, IsGreaterThanOrEqualToImpl, IsLessThenImpl, IsLessThenOrEqualToImpl, IsNotEqualToImpl

public abstract class MultiCompareFilterImpl
extends CompareFilterImpl

Support for Multi-valued properties when comparing

Author:
Niels Charlier, Curtin University of Technology

Nested Class Summary
 
Nested classes/interfaces inherited from interface MultiValuedFilter
MultiValuedFilter.MatchAction
 
Field Summary
protected  MultiValuedFilter.MatchAction matchAction
           
 
Fields inherited from class BinaryComparisonAbstract
expression1, expression2
 
Fields inherited from class AbstractFilter
filterType, permissiveConstruction
 
Fields inherited from class FilterAbstract
factory
 
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
 
Fields inherited from interface Filter
EXCLUDE, INCLUDE
 
Constructor Summary
protected MultiCompareFilterImpl(FilterFactory factory, Expression e1, Expression e2)
           
protected MultiCompareFilterImpl(FilterFactory factory, Expression e1, Expression e2, boolean matchCase)
           
protected MultiCompareFilterImpl(FilterFactory factory, Expression e1, Expression e2, boolean matchCase, MultiValuedFilter.MatchAction matchAction)
           
protected MultiCompareFilterImpl(FilterFactory factory, Expression e1, Expression e2, MultiValuedFilter.MatchAction matchAction)
           
 
Method Summary
 boolean evaluate(Object feature)
          Give an object, this method determines if the test(s) represented by this filter object are passed.
abstract  boolean evaluateInternal(Object value1, Object value2)
           
 MultiValuedFilter.MatchAction getMatchAction()
          Flag Controlling MatchAction property When one or more of the operands evaluates to multiple values rather than a single value, which action should be taken?
 
Methods inherited from class CompareFilterImpl
accept, addLeftValue, addRightValue, compare, equals, evaluate, getLeftValue, getRightValue, hashCode, setExpression1, setExpression2, toString
 
Methods inherited from class BinaryComparisonAbstract
and, comparable, eval, eval, getExpression1, getExpression2, isMatchingCase, not, or
 
Methods inherited from class AbstractFilter
accept, contains, getFilterType, isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter
 
Methods inherited from class FilterAbstract
accepts, eval, eval, eval
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface CompareFilter
contains
 
Methods inherited from interface Filter
accept, and, getFilterType, not, or
 
Methods inherited from interface BinaryComparisonOperator
getExpression1, getExpression2, isMatchingCase
 

Field Detail

matchAction

protected MultiValuedFilter.MatchAction matchAction
Constructor Detail

MultiCompareFilterImpl

protected MultiCompareFilterImpl(FilterFactory factory,
                                 Expression e1,
                                 Expression e2)

MultiCompareFilterImpl

protected MultiCompareFilterImpl(FilterFactory factory,
                                 Expression e1,
                                 Expression e2,
                                 boolean matchCase)

MultiCompareFilterImpl

protected MultiCompareFilterImpl(FilterFactory factory,
                                 Expression e1,
                                 Expression e2,
                                 MultiValuedFilter.MatchAction matchAction)

MultiCompareFilterImpl

protected MultiCompareFilterImpl(FilterFactory factory,
                                 Expression e1,
                                 Expression e2,
                                 boolean matchCase,
                                 MultiValuedFilter.MatchAction matchAction)
Method Detail

getMatchAction

public MultiValuedFilter.MatchAction getMatchAction()
Description copied from interface: MultiValuedFilter
Flag Controlling MatchAction property When one or more of the operands evaluates to multiple values rather than a single value, which action should be taken? If there are n values for the left operand and m values for the right operand, there are n * m possible combinations that can be compared, ANY - if any of the possible combinations match, the result is true (aggregated OR) ALL - only if all of the possible combinations match, the result is true (aggregated AND) ONE - only if exactly one of the possible combinations match, the result is true (aggregated XOR)

Specified by:
getMatchAction in interface MultiValuedFilter
Overrides:
getMatchAction in class BinaryComparisonAbstract
Returns:
MatchAction flag

evaluate

public final boolean evaluate(Object feature)
Description copied from interface: Filter
Give an object, this method determines if the test(s) represented by this filter object are passed.

This ability is used to allow Queries against both Features and and non spatial data (such as Record) and to express constraints on permissable data values.

Returns:
true if the test(s) are passed for the provided object

evaluateInternal

public abstract boolean evaluateInternal(Object value1,
                                         Object value2)


Copyright © 1996-2014 Geotools. All Rights Reserved.