org.geotools.feature.collection
Class BaseSimpleFeatureCollection

Object
  extended by BaseFeatureCollection<SimpleFeatureType,SimpleFeature>
      extended by BaseSimpleFeatureCollection
All Implemented Interfaces:
SimpleFeatureCollection, FeatureCollection<SimpleFeatureType,SimpleFeature>
Direct Known Subclasses:
SubFeatureCollection

public abstract class BaseSimpleFeatureCollection
extends BaseFeatureCollection<SimpleFeatureType,SimpleFeature>
implements SimpleFeatureCollection


Field Summary
 
Fields inherited from class BaseFeatureCollection
id, schema
 
Constructor Summary
protected BaseSimpleFeatureCollection(SimpleFeatureType schema)
           
 
Method Summary
abstract  SimpleFeatureIterator features()
          Subclasses required to implement this method to traverse FeatureCollection contents.
 SimpleFeatureCollection sort(SortBy order)
          Obtained sorted contents, only implemented for SimpleFeature at present.
 SimpleFeatureCollection subCollection(Filter filter)
          Convenience implementation that just wraps this collection into a FilteringFeatureCollection.
 
Methods inherited from class BaseFeatureCollection
accepts, contains, containsAll, getBounds, getID, getSchema, isEmpty, size, toArray, toArray
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface FeatureCollection
accepts, contains, containsAll, getBounds, getID, getSchema, isEmpty, size, toArray, toArray
 

Constructor Detail

BaseSimpleFeatureCollection

protected BaseSimpleFeatureCollection(SimpleFeatureType schema)
Method Detail

features

public abstract SimpleFeatureIterator features()
Subclasses required to implement this method to traverse FeatureCollection contents.

Note that FeatureIterator.close() is available to clean up after any resource use required during traversal.

Specified by:
features in interface SimpleFeatureCollection
Specified by:
features in interface FeatureCollection<SimpleFeatureType,SimpleFeature>
Specified by:
features in class BaseFeatureCollection<SimpleFeatureType,SimpleFeature>
Returns:
A FeatureIterator.

subCollection

public SimpleFeatureCollection subCollection(Filter filter)
Description copied from class: BaseFeatureCollection
Convenience implementation that just wraps this collection into a FilteringFeatureCollection. Subclasses might want to override this in case the filter can be cascaded to their data sources.

Specified by:
subCollection in interface SimpleFeatureCollection
Specified by:
subCollection in interface FeatureCollection<SimpleFeatureType,SimpleFeature>
Overrides:
subCollection in class BaseFeatureCollection<SimpleFeatureType,SimpleFeature>
Returns:
SimpleFeatureCollection identified as subset.
See Also:
FeatureList

sort

public SimpleFeatureCollection sort(SortBy order)
Description copied from class: BaseFeatureCollection
Obtained sorted contents, only implemented for SimpleFeature at present.

This method only supports SimpleFeature at present, consider use of FeatureSource.features( Query ).

Specified by:
sort in interface SimpleFeatureCollection
Specified by:
sort in interface FeatureCollection<SimpleFeatureType,SimpleFeature>
Overrides:
sort in class BaseFeatureCollection<SimpleFeatureType,SimpleFeature>
Parameters:
order - Sort order
Returns:
FeatureCollection sorted in the indicated order


Copyright © 1996-2014 Geotools. All Rights Reserved.