|
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.postgis.PostGISFeatureStore
public class PostGISFeatureStore
FeatureStore implementation that uses a PostGIS/PostgreSQL database as backend.
FeatureStore| Field Summary | |
|---|---|
(package private) Map<QName,Envelope> |
ftNameToBBox
|
(package private) CRS |
storageSRS
|
| Constructor Summary | |
|---|---|
PostGISFeatureStore(ApplicationSchema schema,
String jdbcConnId,
String dbSchema,
CRS storageSRS,
Map<QName,FeatureTypeMapping> relMapping)
Creates a new PostGISFeatureStore for the given ApplicationSchema. |
|
| Method Summary | |
|---|---|
FeatureStoreTransaction |
acquireTransaction()
Acquires transactional access to the feature store. |
PostGISFeatureStoreTransaction |
acquireTransaction(Connection conn)
|
void |
destroy()
Called by the container to indicate that this FeatureStore instance is being taken out of service. |
(package private) Geometry |
getCompatibleGeometry(Geometry literal)
Returns a transformed version of the given Geometry in the storage CRS. |
(package private) Geometry |
getCompatibleGeometry(Geometry literal,
CRS crs)
Returns a transformed version of the given Geometry in the specified CRS. |
Envelope |
getEnvelope(QName ftName)
Returns the envelope for all stored features of the given type. |
(package private) short |
getFtId(QName ftName)
|
LockManager |
getLockManager()
Returns the associated LockManager. |
(package private) FeatureTypeMapping |
getMapping(QName ftName)
Returns the relational mapping for the given feature type name. |
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. |
(package private) String |
qualifyTableName(String tableName)
Returns the given table name qualified with the db schema. |
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(PostGISFeatureStoreTransaction ta)
Returns the transaction to the datastore. |
(package private) void |
setEnvelope(FeatureType ft,
Envelope ftEnv)
Sets the envelope for the given feature type. |
(package private) org.postgis.PGgeometry |
toPGPolygon(Envelope envelope,
int srid)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
final Map<QName,Envelope> ftNameToBBox
final CRS storageSRS
| Constructor Detail |
|---|
public PostGISFeatureStore(ApplicationSchema schema,
String jdbcConnId,
String dbSchema,
CRS storageSRS,
Map<QName,FeatureTypeMapping> relMapping)
PostGISFeatureStore for the given ApplicationSchema.
schema - schema information, must not be nulljdbcConnId - id of the deegree DB connection pool, must not be nulldbSchema - name of the database schema, can be null (-> public schema)storageSRS - srs used for stored geometries, must not be nullrelMapping - key: feature type name, value: relational mapping information for feature type, may be
null| Method Detail |
|---|
FeatureTypeMapping getMapping(QName ftName)
ftName - name of the feature type
null (no relational mapping)
public PostGISFeatureStoreTransaction acquireTransaction(Connection conn)
throws FeatureStoreException
FeatureStoreException
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 FeatureStorepublic void destroy()
FeatureStoreFeatureStore instance is being taken out of service.
destroy in interface FeatureStorepublic 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 known
void setEnvelope(FeatureType ft,
Envelope ftEnv)
ft - feature type, must not be nullftEnv - envelope, must not be null and use EPSG:4326
public LockManager getLockManager()
throws FeatureStoreException
FeatureStoreLockManager.
getLockManager in interface FeatureStoreLockManager instance, never null
FeatureStoreException - if the FeatureStore does not implement locking
public GMLObject getObjectById(String id)
throws FeatureStoreException
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
FeatureStoreException - if the query could not be performedpublic ApplicationSchema getSchema()
FeatureStoreFeatureStore serves.
getSchema in interface FeatureStorenullpublic CRS getStorageSRS()
FeatureStore
getStorageSRS in interface FeatureStorenull
public void init()
throws FeatureStoreException
FeatureStoreFeatureStore instance is being placed into service.
init in interface FeatureStoreFeatureStoreException - if the initialization failsString qualifyTableName(String tableName)
tableName - name of the table to be qualified
nullpublic boolean isAvailable()
FeatureStore
isAvailable in interface FeatureStore
public FeatureResultSet query(Query query)
throws FeatureStoreException,
FilterEvaluationException
FeatureStoreFeatureResultSet.
query in interface FeatureStorequery - 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 evaluated
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 FeatureStoreException,
FilterEvaluationException
FeatureStore
queryHits in interface FeatureStorequery - 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 evaluated
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 evaluated
Geometry getCompatibleGeometry(Geometry literal)
throws FilterEvaluationException
Geometry in the storage CRS.
literal -
null
FilterEvaluationException
Geometry getCompatibleGeometry(Geometry literal,
CRS crs)
throws FilterEvaluationException
Geometry in the specified CRS.
literal - crs -
null
FilterEvaluationException
void releaseTransaction(PostGISFeatureStoreTransaction ta)
throws FeatureStoreException
acquireTransaction().
The transaction should be terminated, i.e. commit() or rollback() must have been called before.
ta - the PostGISFeatureStoreTransaction to be returned
FeatureStoreExceptionshort getFtId(QName ftName)
org.postgis.PGgeometry toPGPolygon(Envelope envelope,
int srid)
|
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 | |||||||||