01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.filter;
17:
18: import java.util.Iterator;
19: import org.opengis.filter.BinaryLogicOperator;
20: import org.geotools.feature.Feature;
21:
22: /**
23: * Defines a logic filter (the only filter type that contains other filters).
24: * This filter holds one or more filters together and relates them logically
25: * with an internally defined type (AND, OR, NOT).
26: *
27: * @author Rob Hranac, TOPP
28: * @author Chris Holmes, TOPP
29: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/filter/LogicFilter.java $
30: * @version $Id: LogicFilter.java 22600 2006-11-04 09:37:58Z jgarnett $
31: *
32: * @deprecated use {@link org.opengis.filter.BinaryLogicOperator}
33: */
34: public interface LogicFilter extends Filter, BinaryLogicOperator {
35: /**
36: * Determines whether the feature matches the appropriate logic
37: * relationships.
38: *
39: * @param feature Specified feature to examine.
40: *
41: * @return Flag confirming whether or not this feature is inside the
42: * filter.
43: *
44: * @deprecated use {@link Filter#evaluate(Feature)}.
45: */
46: boolean contains(Feature feature);
47:
48: /**
49: * Gets an iterator for the filters held by this logic filter.
50: *
51: * @return the iterator of the filters.
52: */
53: Iterator getFilterIterator();
54:
55: /**
56: * Adds a sub filter to this filter.
57: *
58: * @param filter Specified filter to add to the sub filter list.
59: *
60: * @throws IllegalFilterException Does not conform to logic filter
61: * structure
62: *
63: * @task REVISIT: make all filters immutable. This should return a new
64: * filter.
65: */
66: void addFilter(org.opengis.filter.Filter filter)
67: throws IllegalFilterException;
68: }
|