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.Collection;
19: import org.opengis.filter.Id;
20: import org.opengis.filter.identity.FeatureId;
21: import org.geotools.feature.Feature;
22:
23: /**
24: * Defines a feature ID filter, which holds a list of feature IDs. This filter
25: * stores a series of feature IDs, which are used to distinguish features
26: * uniquely.
27: *
28: * @author Rob Hranac, TOPP
29: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/filter/FidFilter.java $
30: * @version $Id: FidFilter.java 22571 2006-11-02 19:23:07Z jdeolive $
31: *
32: * @deprecated use {@link org.opengis.filter.identity.FeatureId}
33: */
34: public interface FidFilter extends Filter, Id {
35: /**
36: * Determines whether or not the given feature's ID matches this filter.
37: *
38: * @param feature Specified feature to examine.
39: *
40: * @return <tt>true</tt> if the feature's ID matches an fid held by this
41: * filter, <tt>false</tt> otherwise.
42: *
43: * @deprecated use {@link org.opengis.filter.Filter#evaluate(Feature)}
44: */
45: boolean contains(Feature feature);
46:
47: /**
48: * Adds a feature ID to the filter.
49: *
50: * @param fid A single feature ID.
51: */
52: void addFid(String fid);
53:
54: /**
55: * Returns all the fids in this filter.
56: *
57: * @return An array of all the fids in this filter.
58: * @deprecated use {@link FeatureId#getIDs()}
59: */
60: String[] getFids();
61:
62: /**
63: * Adds a collection of feature IDs to the filter.
64: *
65: * @param fidsToAdd A collection of feature IDs.
66: */
67: void addAllFids(Collection fidsToAdd);
68:
69: /**
70: * Removes a collection of feature IDs from the filter.
71: *
72: * @param fidsToRemove A collection of feature IDs.
73: */
74: void removeAllFids(Collection fidsToRemove);
75:
76: /**
77: * Removes a feature ID from the filter.
78: *
79: * @param fid A single feature ID.
80: */
81: void removeFid(String fid);
82: }
|