|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractDataStore
CollectionDataStore
public class CollectionDataStore
Simple data store wrapper for feature collections. Allows to use feature collections in the user interface layer and everything else where a data store or a feature source is needed.
| Field Summary |
|---|
| Fields inherited from class AbstractDataStore |
|---|
isWriteable, listenerManager, LOGGER |
| Constructor Summary | |
|---|---|
CollectionDataStore(FeatureCollection<SimpleFeatureType,SimpleFeature> collection)
Builds a data store wrapper on top of a feature collection |
|
CollectionDataStore(SimpleFeatureType schema)
Builds a data store wrapper around an empty collection. |
|
| Method Summary | |
|---|---|
protected ReferencedEnvelope |
getBounds(Query query)
Computes the bounds of the features for the specified feature type that satisfy the query provided that there is a fast way to get that result. |
protected ReferencedEnvelope |
getBoundsInternal(Query query)
|
FeatureCollection<SimpleFeatureType,SimpleFeature> |
getCollection()
Returns the feature collection held by this data store |
protected int |
getCount(Query query)
Gets the number of the features that would be returned by this query for the specified feature type. |
FeatureReader<SimpleFeatureType,SimpleFeature> |
getFeatureReader(String typeName)
Provides FeatureReader typeName. |
SimpleFeatureType |
getSchema(String typeName)
Retrive schema information for typeName |
String[] |
getTypeNames()
helper method for retrieving all the names. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionDataStore(SimpleFeatureType schema)
collection - public CollectionDataStore(FeatureCollection<SimpleFeatureType,SimpleFeature> collection)
collection - | Method Detail |
|---|
public String[] getTypeNames()
AbstractDataStore
getTypeNames in interface DataStoregetTypeNames in class AbstractDataStoreDataStoreDataStore.getTypeNames()
public SimpleFeatureType getSchema(String typeName)
throws IOException
AbstractDataStore
getSchema in interface DataStoregetSchema in class AbstractDataStoretypeName - the feature type name
IOException - if typeName is not availableDataStore.getSchema(java.lang.String)
public FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReader(String typeName)
throws IOException
typeName.
Implements getFeatureReader contract for AbstractDataStore.
getFeatureReader in class AbstractDataStoretypeName -
IOException - If typeName could not be found
DataSourceException - See IOExceptionAbstractDataStore.getFeatureSource(java.lang.String)public FeatureCollection<SimpleFeatureType,SimpleFeature> getCollection()
protected ReferencedEnvelope getBounds(Query query)
throws SchemaNotFoundException
AbstractDataStoreWill return null if there is not fast way to compute the bounds. Since it's based on some kind of header/cached information, it's not guaranteed to be real bound of the features
getBounds in class AbstractDataStoreSchemaNotFoundExceptionorg.geotools.data.AbstractDataStore#getBounds(java.lang.String,
org.geotools.data.Query)protected ReferencedEnvelope getBoundsInternal(Query query)
query -
protected int getCount(Query query)
throws IOException
AbstractDataStore
If getBounds(Query) returns -1 due to expense consider
using getFeatures(Query).getCount() as a an alternative.
getCount in class AbstractDataStorequery - Contains the Filter and MaxFeatures to find the bounds for.
-1
if count is too expensive to calculate or any errors or occur.
IOExceptionorg.geotools.data.AbstractDataStore#getCount(java.lang.String, org.geotools.data.Query)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||