01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2005-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.feature.iso.collection;
17:
18: import java.util.NoSuchElementException;
19:
20: import org.opengis.feature.Feature;
21: import org.opengis.feature.FeatureCollection;
22:
23: /**
24: * Access Feature content using Feature "Id".
25: * <p>
26: * Many FeatureCollection classes will make use of this
27: * API to avoid unnecessary caching of content. Supporting
28: * this interface will allow SubCollections to occur based
29: * on FeatureIds, with a suitable improvement in memory
30: * consumption.
31: * </p>
32: * <p>
33: * For an addition improvement in memory comsumption SubCollections
34: * may use of a sparse reprsentation where only (beginId,endId] ranges
35: * are kept in memory.
36: * </p>
37: * @author Jody Garnett, Refractions Research Inc.
38: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/unsupported/community-schemas/fm/src/main/java/org/geotools/feature/iso/collection/RandomFeatureAccess.java $
39: */
40: public interface RandomFeatureAccess extends FeatureCollection {
41: /**
42: * Access Feature content by feature id.
43: *
44: * @param id
45: * @return Feature with the indicated or id
46: * @throws NoSuchElementException if a Feature with the indicated id is not present
47: */
48: public Feature getFeatureMember(String id)
49: throws NoSuchElementException;
50:
51: /** Optional Method */
52: public Feature removeFeatureMember(String id);
53: }
|