org.geotools.feature.collection
Interface RandomFeatureAccess

All Superinterfaces:
java.util.Collection, Feature, FeatureCollection, FeatureResults, ResourceCollection
All Known Implementing Classes:
MemoryFeatureCollection, SubFeatureList

public interface RandomFeatureAccess
extends FeatureCollection

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.

Nested Class Summary
 
Nested classes inherited from class org.geotools.feature.Feature
Feature.NULL
 
Method Summary
 Feature getFeatureMember(java.lang.String id)
          Access Feature content by feature id.
 Feature removeFeatureMember(java.lang.String id)
          Optional Method
 
Methods inherited from interface org.geotools.feature.FeatureCollection
accepts, addListener, close, close, features, getFeatureType, getSchema, removeListener, sort, subCollection
 
Methods inherited from interface org.geotools.data.collection.ResourceCollection
iterator, purge
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface org.geotools.data.FeatureResults
collection, getBounds, getCount, reader
 
Methods inherited from interface org.geotools.feature.Feature
getAttribute, getAttribute, getAttributes, getBounds, getDefaultGeometry, getID, getNumberOfAttributes, getParent, setAttribute, setAttribute, setDefaultGeometry, setParent
 

Method Detail

getFeatureMember

public Feature 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

public Feature removeFeatureMember(java.lang.String id)
Optional Method



Copyright © GeoTools. All Rights Reserved.