|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.feature.persistence.sql.SQLFeatureStore
public class SQLFeatureStore
FeatureStore
that is backed by a spatial SQL database.
SQLDialect
Constructor Summary | |
---|---|
SQLFeatureStore(SQLFeatureStoreJAXB config,
URL configURL,
SQLDialect dialect)
Creates a new SQLFeatureStore for the given configuration. |
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. |
FeatureStoreCache |
getCache()
Returns the FeatureStoreCache . |
static Geometry |
getCompatibleGeometry(Geometry literal,
ICRS crs)
Returns a transformed version of the given Geometry in the specified CRS. |
protected Connection |
getConnection()
|
String |
getConnId()
|
ParticleConverter<?> |
getConverter(Mapping mapping)
Returns a ParticleConverter for the given Mapping instance from the served
MappedAppSchema . |
SQLDialect |
getDialect()
|
Envelope |
getEnvelope(QName ftName)
Returns the envelope for all stored features of the given type. |
LockManager |
getLockManager()
Returns the associated LockManager . |
FeatureTypeMapping |
getMapping(QName ftName)
Returns the relational mapping for the given feature type name. |
Map<String,String> |
getNamespaceContext()
|
GMLObject |
getObjectById(String id)
Retrieves the stored object with a certain id. |
GMLReferenceResolver |
getResolver()
Returns a resolver instance for resolving references to objects that are stored in this feature store. |
MappedAppSchema |
getSchema()
Returns the application schema that this FeatureStore serves. |
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 SQLFeatureStore(SQLFeatureStoreJAXB config, URL configURL, SQLDialect dialect)
SQLFeatureStore
for the given configuration.
config
- jaxb configuration objectconfigURL
- configuration systemidMethod 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 MappedAppSchema getSchema()
FeatureStore
FeatureStore
serves.
getSchema
in interface FeatureStore
null
public String getConnId()
public FeatureTypeMapping getMapping(QName ftName)
ftName
- name of the feature type, must not be null
null
(no relational mapping)public ParticleConverter<?> getConverter(Mapping mapping)
ParticleConverter
for the given Mapping
instance from the served
MappedAppSchema
.
mapping
- particle mapping, must not be null
null
public 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) throws FeatureStoreException
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)
FeatureStoreException
public 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 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 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 FeatureStoreCache getCache()
FeatureStoreCache
.
null
public GMLReferenceResolver getResolver()
null
public boolean isAvailable()
FeatureStore
isAvailable
in interface FeatureStore
public void destroy()
Resource
ResourceManager
upon workspace shutdown.
destroy
in interface Resource
public 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 Map<String,String> getNamespaceContext()
public static Geometry getCompatibleGeometry(Geometry literal, ICRS crs) throws FilterEvaluationException
Geometry
in the specified CRS.
literal
- crs
-
null
FilterEvaluationException
public FeatureInputStream query(Query query) throws FeatureStoreException, FilterEvaluationException
FeatureStore
FeatureInputStream
.
query
in interface FeatureStore
query
- query to be performed, must not be null
null
FeatureStoreException
- if the query could not be performed
FilterEvaluationException
- if the filter contained in the query could not be evaluatedpublic 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 evaluatedprotected Connection getConnection() throws SQLException
SQLException
public SQLDialect getDialect()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |