deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.io.datastore.sde
Class SDEDatastore

java.lang.Object
  extended by org.deegree.io.datastore.Datastore
      extended by org.deegree.io.datastore.sde.SDEDatastore

public class SDEDatastore
extends Datastore

Datastore implementation for an ESRI SDE database.

Version:
$Revision: 12032 $, $Date: 2008-05-29 18:27:00 +0200 (Do, 29. Mai 2008) $
Author:
Christoph Pollmann, last edited by: $Author: mschneider $

Constructor Summary
SDEDatastore()
           
 
Method Summary
protected  SDEConnection acquireConnection()
          Returns the database connection requested for.
 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.
 void close()
          Closes the datastore so it can free dependent resources.
 void configure(DatastoreConfiguration config)
          Configures the datastore with the supplied configuration.
 Geometry convertDBToDegreeGeometry(Object value)
          Converts a database specific geometry Object from the ResultSet to a deegree Geometry.
 Object convertDegreeToDBGeometry(Geometry geometry)
          Converts a deegree Geometry to a database specific geometry Object.
 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.
 SDEWhereBuilder getWhereBuilder(MappedFeatureType[] rootFts, String[] aliases, Filter filter, TableAliasGenerator aliasGenerator)
          Returns a specific WhereBuilder implementation for SDE.
 FeatureCollection performQuery(Query query, MappedFeatureType[] rootFts)
          Performs a query against the datastore.
 FeatureCollection performQuery(Query query, MappedFeatureType[] rootFts, DatastoreTransaction context)
          Performs a query against the datastore (in the given transaction context).
 com.esri.sde.sdk.client.SeQuery prepareStatement(SDEConnection conn, StatementBuffer statementBuffer)
          Converts the StatementBuffer into a PreparedStatement, which is initialized and ready to be performed.
protected  void releaseConnection(SDEConnection conn)
          Releases the connection.
 void releaseTransaction(DatastoreTransaction ta)
          Returns the transaction to the datastore.
 
Methods inherited from class org.deegree.io.datastore.Datastore
canTransformTo, determineFidsToLock, transformQuery, transformResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDEDatastore

public SDEDatastore()
Method Detail

getAnnotationParser

public AnnotationDocument getAnnotationParser()
Description copied from class: Datastore
Returns the datastore specific annotation parser.

Specified by:
getAnnotationParser in class Datastore
Returns:
the datastore specific annotation parser

configure

public void configure(DatastoreConfiguration config)
               throws DatastoreException
Description copied from class: Datastore
Configures the datastore with the supplied configuration.

Overrides:
configure in class Datastore
Parameters:
config - configuration
Throws:
DatastoreException

getConfiguration

public DatastoreConfiguration getConfiguration()
Description copied from class: Datastore
Returns the configuration parameters of the datastore.

Overrides:
getConfiguration in class Datastore
Returns:
the configuration parameters of the datastore

bindSchema

public void bindSchema(MappedGMLSchema schema)
                throws DatastoreException
Description copied from class: Datastore
Adds the given GML application schema to the set of schemas that are handled by this datastore instance.

Note that this method may be called several times for every GML schema that uses this datastore instance.

Overrides:
bindSchema in class Datastore
Parameters:
schema - GML application schema to bind
Throws:
DatastoreException

getSchemas

public MappedGMLSchema[] getSchemas()
Description copied from class: Datastore
Returns the GML application schemas that are handled by this datastore.

Overrides:
getSchemas in class Datastore
Returns:
the GML application schemas that are handled by this datastore

getFeatureType

public MappedFeatureType getFeatureType(QualifiedName ftName)
Description copied from class: Datastore
Returns the feature type with the given name.

Overrides:
getFeatureType in class Datastore
Parameters:
ftName - name of the feature type
Returns:
the feature type with the given name, or null if the Datastore does not this feature type

close

public void close()
           throws DatastoreException
Description copied from class: Datastore
Closes the datastore so it can free dependent resources.

Specified by:
close in class Datastore
Throws:
DatastoreException

performQuery

public FeatureCollection performQuery(Query query,
                                      MappedFeatureType[] rootFts)
                               throws DatastoreException
Description copied from class: Datastore
Performs a query against the datastore.

Specified by:
performQuery in class Datastore
Parameters:
query - query to be performed
rootFts - the root feature types that are queried, more than one type means that the types are joined
Returns:
requested feature instances
Throws:
DatastoreException

acquireTransaction

public DatastoreTransaction acquireTransaction()
                                        throws DatastoreException
Description copied from class: Datastore
Acquires transactional access to the datastore instance. There's only one active transaction per datastore allowed.

Overrides:
acquireTransaction in class Datastore
Returns:
transaction object that allows to perform transactions operations on the datastore
Throws:
DatastoreException

getWhereBuilder

public SDEWhereBuilder getWhereBuilder(MappedFeatureType[] rootFts,
                                       String[] aliases,
                                       Filter filter,
                                       TableAliasGenerator aliasGenerator)
                                throws DatastoreException
Returns a specific WhereBuilder implementation for SDE.

Parameters:
rootFts -
aliases -
filter -
aliasGenerator -
Returns:
a specific WhereBuilder implementation for SDE.
Throws:
DatastoreException

convertDBToDegreeGeometry

public Geometry convertDBToDegreeGeometry(Object value)
                                   throws DatastoreException
Converts a database specific geometry Object from the ResultSet to a deegree Geometry.

Parameters:
value -
Returns:
corresponding deegree geometry
Throws:
DatastoreException

convertDegreeToDBGeometry

public Object convertDegreeToDBGeometry(Geometry geometry)
                                 throws DatastoreException
Converts a deegree Geometry to a database specific geometry Object.

Parameters:
geometry -
Returns:
corresponding database specific geometry object
Throws:
DatastoreException

acquireConnection

protected SDEConnection acquireConnection()
                                   throws DatastoreException
Returns the database connection requested for.

Returns:
Connection
Throws:
DatastoreException

releaseConnection

protected void releaseConnection(SDEConnection conn)
                          throws DatastoreException
Releases the connection.

Parameters:
conn - Connection to be released.
Throws:
DatastoreException

prepareStatement

public com.esri.sde.sdk.client.SeQuery prepareStatement(SDEConnection conn,
                                                        StatementBuffer statementBuffer)
Converts the StatementBuffer into a PreparedStatement, which is initialized and ready to be performed.

Parameters:
conn - connection to be used to create the PreparedStatement
statementBuffer -
Returns:
the PreparedStatment, ready to be performed

performQuery

public FeatureCollection performQuery(Query query,
                                      MappedFeatureType[] rootFts,
                                      DatastoreTransaction context)
                               throws DatastoreException
Description copied from class: Datastore
Performs a query against the datastore (in the given transaction context).

Specified by:
performQuery in class Datastore
Parameters:
query - query to be performed
rootFts - the root feature types that are queried, more than one type means that the types are joined
context - context (used to specify the JDBCConnection, for example)
Returns:
requested feature instances
Throws:
DatastoreException

releaseTransaction

public void releaseTransaction(DatastoreTransaction ta)
                        throws DatastoreException
Description copied from class: Datastore
Returns the transaction to the datastore. This makes the transaction available to other clients again (via Datastore.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.

Overrides:
releaseTransaction in class Datastore
Parameters:
ta - the DatastoreTransaction to be returned
Throws:
DatastoreException

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org