org.geotools.feature.collection
Interface RandomFeatureAccess

All Superinterfaces:
FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
All Known Implementing Classes:
MemoryFeatureCollection, SubFeatureList

public interface RandomFeatureAccess
extends FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>

Access Feature content using Feature "Id".

Many FeatureCollection classes will make use of this API to avoid unnecessary caching of content. Supporting this interface will allow SubCollections to occur based on FeatureIds, with a suitable improvement in memory consumption.

For an addition improvement in memory comsumption SubCollections may use of a sparse reprsentation where only (beginId,endId] ranges are kept in memory.

Author:
Jody Garnett, Refractions Research Inc.

Method Summary
 org.opengis.feature.simple.SimpleFeature getFeatureMember(java.lang.String id)
          Access Feature content by feature id.
 org.opengis.feature.simple.SimpleFeature removeFeatureMember(java.lang.String id)
          Optional Method
 
Methods inherited from interface org.geotools.feature.FeatureCollection
accepts, add, addAll, addAll, addListener, clear, close, close, contains, containsAll, features, getBounds, getID, getSchema, isEmpty, iterator, purge, remove, removeAll, removeListener, retainAll, size, sort, subCollection, toArray, toArray
 

Method Detail

getFeatureMember

org.opengis.feature.simple.SimpleFeature getFeatureMember(java.lang.String id)
                                                          throws java.util.NoSuchElementException
Access Feature content by feature id.

Parameters:
id -
Returns:
Feature with the indicated or id
Throws:
java.util.NoSuchElementException - if a Feature with the indicated id is not present

removeFeatureMember

org.opengis.feature.simple.SimpleFeature removeFeatureMember(java.lang.String id)
Optional Method



Copyright © 1996-2010 Geotools. All Rights Reserved.