|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.io.datastore.Datastore
public abstract class Datastore
A datastore implementation must extend this class.
Describes the access to a datastore that encapsulates the access to a database or file. The
accessible objects are Feature
instances. Primarily, datastores are used as persistence
layer by the WFService
class.
Field Summary | |
---|---|
static int |
SRS_UNDEFINED
|
Constructor Summary | |
---|---|
Datastore()
|
Method Summary | |
---|---|
DatastoreTransaction |
acquireTransaction()
Acquires transactional access to the datastore instance. |
void |
bindSchema(MappedGMLSchema schema)
Adds the given GML application schema to the set of schemas that are handled by this datastore instance. |
protected boolean |
canTransformTo(java.lang.String targetSRS)
Returns whether the datastore is capable of performing a native coordinate transformation (using an SQL function call for example) into the given SRS. |
abstract void |
close()
Closes the datastore so it can free dependent resources. |
void |
configure(DatastoreConfiguration config)
Configures the datastore with the supplied configuration. |
java.util.Set<FeatureId> |
determineFidsToLock(java.util.List<Lock> requestParts)
Determines the ids of all features to be locked by the given parts of a LockFeature
request, this includes all descendant and super features of the targeted features as well. |
abstract AnnotationDocument |
getAnnotationParser()
Returns the datastore specific annotation parser. |
DatastoreConfiguration |
getConfiguration()
Returns the configuration parameters of the datastore. |
MappedFeatureType |
getFeatureType(QualifiedName ftName)
Returns the feature type with the given name. |
MappedGMLSchema[] |
getSchemas()
Returns the GML application schemas that are handled by this datastore. |
abstract FeatureCollection |
performQuery(Query query,
MappedFeatureType[] rootFts)
Performs a query against the datastore. |
abstract FeatureCollection |
performQuery(Query query,
MappedFeatureType[] rootFts,
DatastoreTransaction context)
Performs a query against the datastore (in the given transaction context). |
void |
releaseTransaction(DatastoreTransaction ta)
Returns the transaction to the datastore. |
protected Query |
transformQuery(Query query)
Transforms the incoming Query so that the CoordinateSystem of all spatial
arguments (BBOX, etc.) in the Filter match the SRS of the targeted
MappingGeometryField s. |
protected FeatureCollection |
transformResult(FeatureCollection fc,
java.lang.String targetSRS)
Transforms the FeatureCollection so that the geometries of all contained geometry
properties use the requested SRS. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SRS_UNDEFINED
Constructor Detail |
---|
public Datastore()
Method Detail |
---|
public abstract AnnotationDocument getAnnotationParser()
public void configure(DatastoreConfiguration config) throws DatastoreException
config
- configuration
DatastoreException
public DatastoreConfiguration getConfiguration()
public void bindSchema(MappedGMLSchema schema) throws DatastoreException
Note that this method may be called several times for every GML schema that uses this datastore instance.
schema
- GML application schema to bind
DatastoreException
public MappedGMLSchema[] getSchemas()
public MappedFeatureType getFeatureType(QualifiedName ftName)
ftName
- name of the feature type
Datastore
does
not this feature typepublic abstract void close() throws DatastoreException
DatastoreException
public abstract FeatureCollection performQuery(Query query, MappedFeatureType[] rootFts) throws DatastoreException, UnknownCRSException
query
- query to be performedrootFts
- the root feature types that are queried, more than one type means that the types
are joined
DatastoreException
UnknownCRSException
public abstract FeatureCollection performQuery(Query query, MappedFeatureType[] rootFts, DatastoreTransaction context) throws DatastoreException, UnknownCRSException
query
- query to be performedrootFts
- the root feature types that are queried, more than one type means that the types
are joinedcontext
- context (used to specify the JDBCConnection, for example)
DatastoreException
UnknownCRSException
public java.util.Set<FeatureId> determineFidsToLock(java.util.List<Lock> requestParts) throws DatastoreException
LockFeature
request, this includes all descendant and super features of the targeted features as well.
requestParts
- the parts of a LockFeature
request that this Datastore
is responsible for
DatastoreException
public DatastoreTransaction acquireTransaction() throws DatastoreException
DatastoreException
public void releaseTransaction(DatastoreTransaction ta) throws DatastoreException
acquireTransaction()
). Underlying resources (such as
JDBCConnections are freed).
The transaction should be terminated, i.e. DatastoreTransaction.commit()
or
DatastoreTransaction.rollback()
must have been called before.
ta
- the DatastoreTransaction to be returned
DatastoreException
protected Query transformQuery(Query query)
Query
so that the CoordinateSystem
of all spatial
arguments (BBOX, etc.) in the Filter
match the SRS of the targeted
MappingGeometryField
s.
NOTE: If this transformation can be performed by the backend (e.g. by Oracle Spatial), this
method should be overwritten to return the original input Query
.
query
- query to be transformed
protected FeatureCollection transformResult(FeatureCollection fc, java.lang.String targetSRS)
FeatureCollection
so that the geometries of all contained geometry
properties use the requested SRS.
fc
- feature collection to be transformedtargetSRS
- requested SRS
protected boolean canTransformTo(java.lang.String targetSRS)
Datastore
implementations capable of performing native coordinate
transformations must override this class.
targetSRS
- target spatial reference system (usually "EPSG:XYZ")
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org