|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.feature.persistence.memory.MemoryFeatureStore
public class MemoryFeatureStore
FeatureStore implementation that keeps the feature instances in memory.
FeatureStore| Field Summary | |
|---|---|
(package private) DefaultLockManager |
lockManager
|
| Constructor Summary | |
|---|---|
MemoryFeatureStore(ApplicationSchema schema)
Creates a new MemoryFeatureStore for the given ApplicationSchema. |
|
MemoryFeatureStore(URL docURL,
ApplicationSchema schema)
Creates a new MemoryFeatureStore that is backed by the given GML file. |
|
| Method Summary | |
|---|---|
FeatureStoreTransaction |
acquireTransaction()
Acquires transactional access to the feature store. |
(package private) void |
addFeatures(Collection<Feature> features)
Adds the given Feature instances. |
(package private) void |
addGeometriesWithId(Collection<Geometry> geometries)
Adds the given identified Geometry instances. |
void |
destroy()
Called by the container to indicate that this FeatureStore instance is being taken out of service. |
(package private) FeatureCollection |
getCollection(FeatureType ft)
|
Envelope |
getEnvelope(QName ftName)
Returns the envelope for all stored features of the given type. |
LockManager |
getLockManager()
Returns the associated LockManager. |
GMLObject |
getObjectById(String id)
Retrieves the stored object with a certain id. |
ApplicationSchema |
getSchema()
Returns the application schema that this FeatureStore serves. |
CRS |
getStorageSRS()
Returns the native CRS used for storing geometries. |
void |
init()
Called by the container to indicate that this FeatureStore instance is being placed into service. |
boolean |
isAvailable()
Returns whether the store is currently able to perform operations. |
FeatureResultSet |
query(Query query)
Performs the given query and returns the matching features as a FeatureResultSet. |
FeatureResultSet |
query(Query[] queries)
Performs the given queries and returns the matching features as a FeatureResultSet. |
int |
queryHits(Query query)
Returns the number of features that are matched by the given query. |
int |
queryHits(Query[] queries)
Returns the number of features that are matched by the given queries. |
(package private) void |
releaseTransaction(MemoryFeatureStoreTransaction ta)
Returns the transaction to the datastore. |
(package private) void |
removeObject(String id)
|
(package private) void |
setCollection(FeatureType ft,
FeatureCollection fc)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
DefaultLockManager lockManager
| Constructor Detail |
|---|
public MemoryFeatureStore(ApplicationSchema schema)
throws FeatureStoreException
MemoryFeatureStore for the given ApplicationSchema.
schema - application schema, must not be null
FeatureStoreException
public MemoryFeatureStore(URL docURL,
ApplicationSchema schema)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException,
FactoryConfigurationError,
IOException,
FeatureStoreException,
ReferenceResolvingException
MemoryFeatureStore that is backed by the given GML file.
docURL - schema -
XMLStreamException
XMLParsingException
UnknownCRSException
FactoryConfigurationError
IOException
FeatureStoreException
ReferenceResolvingException| Method Detail |
|---|
void addFeatures(Collection<Feature> features)
Feature instances.
features - features
void addGeometriesWithId(Collection<Geometry> geometries)
throws UnknownCRSException
Geometry instances.
geometries - geometries with ids
UnknownCRSExceptionpublic void destroy()
FeatureStoreFeatureStore instance is being taken out of service.
destroy in interface FeatureStorepublic void init()
FeatureStoreFeatureStore instance is being placed into service.
init in interface FeatureStorepublic ApplicationSchema getSchema()
FeatureStoreFeatureStore serves.
getSchema in interface FeatureStorenull
public FeatureResultSet query(Query query)
throws FilterEvaluationException,
FeatureStoreException
FeatureStoreFeatureResultSet.
query in interface FeatureStorequery - query to be performed, must not be null
null
FilterEvaluationException - if the filter contained in the query could not be evaluated
FeatureStoreException - if the query could not be performed
public FeatureResultSet query(Query[] queries)
throws FeatureStoreException,
FilterEvaluationException
FeatureStoreFeatureResultSet.
query in interface FeatureStorequeries - queries to be performed, must not be null and contain at least one entry
null
FeatureStoreException - if the query could not be performed
FilterEvaluationException - if the filter contained in the query could not be evaluated
public int queryHits(Query query)
throws FilterEvaluationException,
FeatureStoreException
FeatureStore
queryHits in interface FeatureStorequery - query to be performed, must not be null
FilterEvaluationException - if the filter contained in the query could not be evaluated
FeatureStoreException - if the query could not be performed
public int queryHits(Query[] queries)
throws FeatureStoreException,
FilterEvaluationException
FeatureStore
queryHits in interface FeatureStorequeries - queries to be performed, must not be null and contain at least one entry
FeatureStoreException - if the query could not be performed
FilterEvaluationException - if the filter contained in the query could not be evaluatedpublic GMLObject getObjectById(String id)
FeatureStoreObject)
getObjectById in interface FeatureStoreid - identifier of the object to be retrieved
Feature or a Geometry) or null if no object with
the given id is known
public FeatureStoreTransaction acquireTransaction()
throws FeatureStoreException
FeatureStore
acquireTransaction in interface FeatureStorenull
FeatureStoreException - if the transactional access could not be acquired or is not implemented for this FeatureStore
void releaseTransaction(MemoryFeatureStoreTransaction ta)
throws FeatureStoreException
acquireTransaction().
The transaction should be terminated, i.e. commit() or rollback() must have been called before.
ta - the DatastoreTransaction to be returned
FeatureStoreExceptionFeatureCollection getCollection(FeatureType ft)
void setCollection(FeatureType ft,
FeatureCollection fc)
void removeObject(String id)
throws FeatureStoreException
FeatureStoreException
public LockManager getLockManager()
throws FeatureStoreException
FeatureStoreLockManager.
getLockManager in interface FeatureStoreLockManager instance, never null
FeatureStoreException - if the FeatureStore does not implement lockingpublic Envelope getEnvelope(QName ftName)
FeatureStore
getEnvelope in interface FeatureStoreftName - name of the feature type, must not be null and must be served by this store
null if the feature type is not knownpublic boolean isAvailable()
FeatureStore
isAvailable in interface FeatureStorepublic CRS getStorageSRS()
FeatureStore
getStorageSRS in interface FeatureStorenull
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||