org.geotools.filter
Interface Filter

All Superinterfaces:
Filter, FilterType
All Known Subinterfaces:
BetweenFilter, CompareFilter, FidFilter, GeometryDistanceFilter, GeometryFilter, LikeFilter, LogicFilter, NullFilter
All Known Implementing Classes:
AndImpl, BBOXImpl, BetweenFilterImpl, BeyondImpl, CartesianDistanceFilter, CompareFilterImpl, ContainsImpl, CrossesImpl, DisjointImpl, DWithinImpl, EqualsImpl, FidFilterImpl, GeometryFilterImpl, IntersectsImpl, IsBetweenImpl, IsEqualsToImpl, IsGreaterThanImpl, IsGreaterThanOrEqualToImpl, IsLessThenImpl, IsLessThenOrEqualToImpl, IsNotEqualToImpl, IsNullImpl, LikeFilterImpl, LogicFilterImpl, NotImpl, NullFilterImpl, OrImpl, OverlapsImpl, TouchesImpl, WithinImpl

Deprecated. use Filter

public interface Filter
extends FilterType, Filter

Defines an OpenGIS Filter object, with default behaviors for all methods.

Author:
Rob Hranac, Vision for New York
Module:

Field Summary
static Filter ALL
          Deprecated.  
static Filter NONE
          Deprecated.  
 
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
 
Method Summary
 void accept(FilterVisitor visitor)
          Deprecated. use Filter.accept(FilterVisitor, Object).
 Filter and(Filter filter)
          Deprecated. Implements a logical AND with this filter and returns the merged filter.
 boolean contains(SimpleFeature feature)
          Deprecated. use #evaluate(Feature)
 boolean evaluate(SimpleFeature feature)
          Deprecated. Evaluates the filter against an instance of Feature.
 short getFilterType()
          Deprecated. The enumeration base type system is replaced with a class based type system. An 'instanceof' check should be made instead of calling this method.
 Filter not()
          Deprecated. Implements a logical NOT with this filter and returns the negated filter
 Filter or(Filter filter)
          Deprecated. Implements a logical OR with this filter and returns the merged filter.
 
Methods inherited from interface Filter
accept, evaluate
 

Field Detail

ALL

static final Filter ALL
Deprecated. 

NONE

static final Filter NONE
Deprecated. 
Method Detail

evaluate

boolean evaluate(SimpleFeature feature)
Deprecated. 
Evaluates the filter against an instance of Feature.

Parameters:
feature - The feature being tested.
Returns:
True if the feature is filtered, otherwise false.

contains

boolean contains(SimpleFeature feature)
Deprecated. use #evaluate(Feature)

Determines whether or not a given feature is 'contained by' this filter.

This is the core function of any filter. 'Contains' isn't a very good term for this method because it implies some sort of spatial relationship between the feature and the filter that may or may not exist. We name this method 'contains' only because the usage of 'contains' in this context is common and better terms are lacking. However, users of this method should keep in mind the non-spatial nature of this meaning of 'contains.' For example, a feature may be 'contained by' a filter if one of the feature's non-spatial property values is equal to that of the filter's.

Although some filters can be checked for validity when they are constructed, it is impossible to impose this check on all expressions because of a special feature of the ExpressionAttribute class. This class must hold the pointer (in XPath) to an attribute, but it is not passed the actual attribute (inside a feature) until it calls the isInside class.

To avoid a run-time Exception, this class is typed (ie. Double, Integer, String) when it is created. If the attribute found inside the feature is found not to conform with its stated type, then a MalformedExpressionException is thrown when contains is called. Since ExpressionAttribute classes may be nested inside any filter, all filters must throw this exception. It is left to callers of this method to deal with it gracefully.

Parameters:
feature - Specified feature to examine.
Returns:
True if filter contains passed feature.

and

Filter and(Filter filter)
Deprecated. 
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

Filter or(Filter filter)
Deprecated. 
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

Filter not()
Deprecated. 
Implements a logical NOT with this filter and returns the negated filter

Returns:
Combined filter.

getFilterType

short getFilterType()
Deprecated. The enumeration base type system is replaced with a class based type system. An 'instanceof' check should be made instead of calling this method.

DOCUMENT ME!

Returns:
DOCUMENT ME!
TODO:
Gets a short representation of the type of this filter.

accept

void accept(FilterVisitor visitor)
Deprecated. use Filter.accept(FilterVisitor, Object).

Used by FilterVisitors to perform some action on this filter instance. Typicaly used by Filter decoders, but may also be used by any thing which needs infomration from filter structure. Implementations should always call: visitor.visit(this); It is importatant that this is not left to a parent class unless the parents API is identical.

Parameters:
visitor - The visitor which requires access to this filter, the method must call visitor.visit(this);


Copyright © 1996-2009 Geotools. All Rights Reserved.