org.geotools.filter
Interface LogicFilter

All Superinterfaces:
Filter, FilterType
All Known Implementing Classes:
LogicFilterImpl

public interface LogicFilter
extends Filter

Defines a logic filter (the only filter type that contains other filters). This filter holds one or more filters together and relates them logically with an internally defined type (AND, OR, NOT).

Version:
$Id: LogicFilter.java,v 1.4 2003/08/07 21:30:36 cholmesny Exp $
Author:
Rob Hranac, TOPP, Chris Holmes, TOPP

Field Summary
 
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
 
Method Summary
 void addFilter(Filter filter)
          Adds a sub filter to this filter.
 Filter and(Filter filter)
          Implements a logical AND with this filter and returns the merged filter.
 boolean contains(Feature feature)
          Determines whether the feature matches the appropriate logic relationships.
 java.util.Iterator getFilterIterator()
          Gets an iterator for the filters held by this logic filter.
 Filter not()
          Implements a logical NOT with this filter and returns the merged filter.
 Filter or(Filter filter)
          Implements a logical OR with this filter and returns the merged filter.
 
Methods inherited from interface org.geotools.filter.Filter
accept, getFilterType
 

Method Detail

contains

public boolean contains(Feature feature)
Determines whether the feature matches the appropriate logic relationships.

Specified by:
contains in interface Filter
Parameters:
feature - Specified feature to examine.
Returns:
Flag confirming whether or not this feature is inside the filter.

not

public Filter not()
Implements a logical NOT with this filter and returns the merged filter.

Specified by:
not in interface Filter
Returns:
NOTed filter.

and

public Filter and(Filter filter)
Implements a logical AND with this filter and returns the merged filter.

Specified by:
and in interface Filter
Parameters:
filter - Parent of the filter: must implement GMLHandlerGeometry.
Returns:
ANDed filter.

getFilterIterator

public java.util.Iterator getFilterIterator()
Gets an iterator for the filters held by this logic filter.

Returns:
the iterator of the filters.

or

public Filter or(Filter filter)
Implements a logical OR with this filter and returns the merged filter.

Specified by:
or in interface Filter
Parameters:
filter - Parent of the filter: must implement GMLHandlerGeometry.
Returns:
ORed filter.

addFilter

public void addFilter(Filter filter)
               throws IllegalFilterException
Adds a sub filter to this filter.

Parameters:
filter - Specified filter to add to the sub filter list.
Throws:
IllegalFilterException - Does not conform to logic filter structure
Task:
REVISIT: make all filters immutable. This should return a new filter.


Copyright © GeoTools. All Rights Reserved.