|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.feature.persistence.shape.ShapeFeatureStore
public class ShapeFeatureStore
FeatureStore
implementation that uses shape files as backend.
FeatureStore
Constructor Summary | |
---|---|
ShapeFeatureStore(String shpName,
ICRS crs,
Charset encoding,
String ftNamespace,
String localFtName,
String ftPrefix,
boolean generateAlphanumericIndexes,
FeatureStoreCache cache,
List<org.deegree.feature.persistence.shape.ShapeFeatureStoreProvider.Mapping> mappings)
Creates a new ShapeFeatureStore instance from the given parameters. |
Method Summary | |
---|---|
FeatureStoreTransaction |
acquireTransaction()
Acquires transactional access to the feature store. |
Envelope |
calcEnvelope(QName ftName)
Recalculates the envelope for all stored features of the given type. |
void |
destroy()
Usually called by the ResourceManager upon workspace shutdown. |
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. |
AppSchema |
getSchema()
Returns the application schema that this FeatureStore serves. |
ICRS |
getStorageCRS()
Returns the CRS used by the shape file. |
void |
init(DeegreeWorkspace workspace)
Usually called by the ResourceManager upon workspace startup. |
boolean |
isAvailable()
Returns whether the store is currently able to perform operations. |
FeatureInputStream |
query(Query query)
Performs the given query and returns the matching features as a FeatureInputStream . |
FeatureInputStream |
query(Query[] queries)
Performs the given queries and returns the matching features as a FeatureInputStream . |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShapeFeatureStore(String shpName, ICRS crs, Charset encoding, String ftNamespace, String localFtName, String ftPrefix, boolean generateAlphanumericIndexes, FeatureStoreCache cache, List<org.deegree.feature.persistence.shape.ShapeFeatureStoreProvider.Mapping> mappings)
ShapeFeatureStore
instance from the given parameters.
shpName
- name of the shape file to be loaded, may omit the ".shp" extension, must not be null
crs
- crs used by the shape file, must not be null
encoding
- encoding used in the dbf file, can be null
(encoding guess mode)ftNamespace
- namespace to be used for the feature type, must not be null
localFtName
- if null, the shape file base name will be usedftPrefix
- generateAlphanumericIndexes
- whether to copy the dbf into a h2 database for indexingcache
- used for caching retrieved feature instances, can be null
(will create a default cache)mappings
- may be null, in which case the original DBF names and 'geometry' will be usedMethod Detail |
---|
public void init(DeegreeWorkspace workspace) throws ResourceInitException
Resource
ResourceManager
upon workspace startup.
init
in interface Resource
workspace
- the workspace the resource belongs to, may be null
ResourceInitException
public FeatureInputStream query(Query query) throws FilterEvaluationException, FeatureStoreException
FeatureStore
FeatureInputStream
.
query
in interface FeatureStore
query
- 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 performedpublic FeatureInputStream query(Query[] queries) throws FeatureStoreException, FilterEvaluationException
FeatureStore
FeatureInputStream
.
query
in interface FeatureStore
queries
- 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 evaluatedpublic int queryHits(Query query) throws FeatureStoreException, FilterEvaluationException
FeatureStore
queryHits
in interface FeatureStore
query
- query to be performed, must not be null
FeatureStoreException
- if the query could not be performed
FilterEvaluationException
- if the filter contained in the query could not be evaluatedpublic int[] queryHits(Query[] queries) throws FeatureStoreException, FilterEvaluationException
FeatureStore
queryHits
in interface FeatureStore
queries
- 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 Envelope getEnvelope(QName ftName) throws FeatureStoreException
FeatureStore
NOTE: This method may return incorrect (cached) results. Use FeatureStore.calcEnvelope(QName)
to force the
recalculation of the Envelope
.
getEnvelope
in interface FeatureStore
ftName
- name of the feature type, must not be null
and must be served by this store
null
if the feature type does not have an envelope
(no geometry properties or no instances)
FeatureStoreException
public Envelope calcEnvelope(QName ftName)
FeatureStore
NOTE: This method may potentially be expensive. Depending on the implementation, it may involve fetching all features of the specified type.
calcEnvelope
in interface FeatureStore
ftName
- name of the feature type, must not be null
and must be served by this store
null
if the feature type does not have an envelope
(no geometry properties or no instances)public void destroy()
Resource
ResourceManager
upon workspace shutdown.
destroy
in interface Resource
public boolean isAvailable()
FeatureStore
isAvailable
in interface FeatureStore
public FeatureStoreTransaction acquireTransaction() throws FeatureStoreException
FeatureStore
acquireTransaction
in interface FeatureStore
null
FeatureStoreException
- if the transactional access could not be acquired or is not implemented for this FeatureStore
public LockManager getLockManager() throws FeatureStoreException
FeatureStore
LockManager
.
getLockManager
in interface FeatureStore
LockManager
instance, or null
if the FeatureStore
does not
implement locking
FeatureStoreException
- if the lock manager could not be acquiredpublic GMLObject getObjectById(String id) throws FeatureStoreException
FeatureStore
getObjectById
in interface FeatureStore
id
- identifier of the object to be retrieved
Feature
or a Geometry
) or null
if no
object with the given id is known
FeatureStoreException
- if the query could not be performedpublic AppSchema getSchema()
FeatureStore
FeatureStore
serves.
getSchema
in interface FeatureStore
null
public ICRS getStorageCRS()
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |