org.deegree.services.wpvs.io.db
Class PostgisBackend

java.lang.Object
  extended by org.deegree.services.wpvs.io.ModelBackend<G>
      extended by org.deegree.services.wpvs.io.db.DBBackend<org.postgis.PGgeometry>
          extended by org.deegree.services.wpvs.io.db.PostgisBackend
All Implemented Interfaces:
Resource, RenderableStore

public class PostgisBackend
extends DBBackend<org.postgis.PGgeometry>

The PostgisBackend class adds postgis specific methods to the model backend.

Version:
$Revision: 30127 $, $Date: 2011-03-22 11:11:12 +0100 (Tue, 22 Mar 2011) $
Author:
Rutger Bezema, last edited by: $Author: aschmitz $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.deegree.services.wpvs.io.ModelBackend
ModelBackend.Type
 
Constructor Summary
PostgisBackend(String connectionID, ModelBackend.Type type)
           
 
Method Summary
 org.postgis.PGgeometry createBackendEnvelope(Envelope geometry, int dimension)
           
 Envelope createEnvelope(org.postgis.PGgeometry geometry)
          Create an envelope from the given Geometry type.
 void destroy()
          Usually called by the ResourceManager upon workspace shutdown.
protected  Envelope getDatasetEnvelope(Connection con, String tableName, String geomColumn)
          Should return the envelope in WPVS scene coordinates, not in world coordinates.
protected  String getDriverPrefix()
           
 void init(DeegreeWorkspace workspace)
          Usually called by the ResourceManager upon workspace startup.
 
Methods inherited from class org.deegree.services.wpvs.io.db.DBBackend
delete, flush, getBackendInfo, getConnection, getDeSerializedObjectForUUID, getDeSerializedObjectsForSQL, insert, isBillboard, loadBuildings, loadEntities, loadProtoTypes, loadTrees
 
Methods inherited from class org.deegree.services.wpvs.io.ModelBackend
getBaseCRS, getBuildingSerializer, getInstance, getPrototypeSerializer, getSerializerForType, getTreeSerializer, getWPVSTranslationVector, setWPVSBaseCRS, setWPVSTranslationVector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgisBackend

public PostgisBackend(String connectionID,
                      ModelBackend.Type type)
Parameters:
connectionID - pointing to the configured database connection.
type -
Method Detail

createEnvelope

public Envelope createEnvelope(org.postgis.PGgeometry geometry)
Description copied from class: ModelBackend
Create an envelope from the given Geometry type.

Specified by:
createEnvelope in class ModelBackend<org.postgis.PGgeometry>
Returns:
the envelope

createBackendEnvelope

public org.postgis.PGgeometry createBackendEnvelope(Envelope geometry,
                                                    int dimension)
Specified by:
createBackendEnvelope in class ModelBackend<org.postgis.PGgeometry>
dimension - of the result geometry
Returns:
an envelope created from the given geometry

getDriverPrefix

protected String getDriverPrefix()
Specified by:
getDriverPrefix in class ModelBackend<org.postgis.PGgeometry>
Returns:
the prefix of the backend, which should be prefixed to the hosturl.

getDatasetEnvelope

protected Envelope getDatasetEnvelope(Connection con,
                                      String tableName,
                                      String geomColumn)
                               throws SQLException
Description copied from class: DBBackend
Should return the envelope in WPVS scene coordinates, not in world coordinates.

Specified by:
getDatasetEnvelope in class DBBackend<org.postgis.PGgeometry>
Returns:
the envelope of the given dataset.
Throws:
SQLException

destroy

public void destroy()
Description copied from interface: Resource
Usually called by the ResourceManager upon workspace shutdown.


init

public void init(DeegreeWorkspace workspace)
          throws ResourceInitException
Description copied from interface: Resource
Usually called by the ResourceManager upon workspace startup.

Parameters:
workspace - the workspace the resource belongs to, may be null
Throws:
ResourceInitException


Copyright © 2011. All Rights Reserved.