org.geotools.filter.spatial
Class ContainsImpl

Object
  extended by FilterAbstract
      extended by AbstractFilter
          extended by BinaryComparisonAbstract
              extended by GeometryFilterImpl
                  extended by AbstractPreparedGeometryFilter
                      extended by ContainsImpl
All Implemented Interfaces:
FilterType, GeometryFilter, BinaryComparisonOperator, Filter, BinarySpatialOperator, BoundedSpatialOperator, Contains, SpatialOperator

public class ContainsImpl
extends AbstractPreparedGeometryFilter
implements Contains


Nested Class Summary
 
Nested classes/interfaces inherited from class AbstractPreparedGeometryFilter
AbstractPreparedGeometryFilter.Literals
 
Field Summary
 
Fields inherited from class AbstractPreparedGeometryFilter
cacheValue, leftPreppedGeom, literals, rightPreppedGeom
 
Fields inherited from class BinaryComparisonAbstract
expression1, expression2
 
Fields inherited from class AbstractFilter
filterType, permissiveConstruction
 
Fields inherited from class FilterAbstract
factory
 
Fields inherited from interface Contains
NAME
 
Fields inherited from interface Filter
EXCLUDE, INCLUDE
 
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
ContainsImpl(FilterFactory factory, Expression e1, Expression e2)
           
 
Method Summary
 Object accept(FilterVisitor visitor, Object extraData)
          Subclass should override, default implementation just returns extraData
protected  boolean basicEvaluate(Geometry left, Geometry right)
          Performs the calculation on the two geometries.
 boolean evaluate(Object feature)
           
 
Methods inherited from class AbstractPreparedGeometryFilter
setExpression1, setExpression2
 
Methods inherited from class GeometryFilterImpl
addLeftGeometry, addRightGeometry, equals, evaluate, getLeftGeometry, getLeftGeometry, getRightGeometry, getRightGeometry, hashCode, toString, validate
 
Methods inherited from class BinaryComparisonAbstract
and, comparable, 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 BinarySpatialOperator
getExpression1, getExpression2
 
Methods inherited from interface GeometryFilter
contains
 
Methods inherited from interface Filter
accept, and, getFilterType, not, or
 

Constructor Detail

ContainsImpl

public ContainsImpl(FilterFactory factory,
                    Expression e1,
                    Expression e2)
Method Detail

evaluate

public boolean evaluate(Object feature)
Specified by:
evaluate in interface Filter

basicEvaluate

protected boolean basicEvaluate(Geometry left,
                                Geometry right)
Description copied from class: AbstractPreparedGeometryFilter
Performs the calculation on the two geometries. This is used to calculate the cached value in the case that both geometries are Literals. But in practice it is useful to extract this functionality into its own method.

Specified by:
basicEvaluate in class AbstractPreparedGeometryFilter
Parameters:
left - the geometry on the left of the equations (the geometry obtained from evaluating Expression1)
right - the geometry on the right of the equations (the geometry obtained from evaluating Expression2)
Returns:
true if the filter evaluates to true for the two geometries

accept

public Object accept(FilterVisitor visitor,
                     Object extraData)
Description copied from class: FilterAbstract
Subclass should override, default implementation just returns extraData

Specified by:
accept in interface Filter
Overrides:
accept in class FilterAbstract


Copyright © 1996-2009 Geotools. All Rights Reserved.