oracle.sdoapi
Class OraSpatialManager

java.lang.Object
  |
  +--oracle.sdoapi.OraSpatialManager

public class OraSpatialManager
extends java.lang.Object

OraSpatialManager is a catch-all class in this Oracle Spatial Java library that manages:

1. geometry creation via the GeometryFactory interface

2. various adapters that implement the GeometryAdapter interface

3. spatial reference systems that implement the SRManager interface

See Also:
GeometryFactory, GeometryAdapter, SRManager

Constructor Summary
protected OraSpatialManager()
           
 
Method Summary
static boolean deregisterGeometryAdapter(GeometryAdapter geomAdapter)
          De-registers a geometry adapter from the adapter list.
static GeometryAdapter getGeometryAdapter(java.lang.String formatName, java.lang.String formatVersion, java.lang.Class inputType, java.lang.Class outputType, java.lang.Class passthroughOutputType)
          Gets a geometry adapter to handle geometry conversions to/from desired geometry format.
static GeometryAdapter getGeometryAdapter(java.lang.String formatName, java.lang.String formatVersion, java.lang.Class inputType, java.lang.Class outputType, java.lang.Class passthroughOutputType, java.sql.Connection connection)
          Deprecated.  
static GeometryAdapter getGeometryAdapter(java.lang.String formatName, java.lang.String formatVersion, java.lang.Class inputType, java.lang.Class outputType, java.lang.Class passthroughOutputType, oracle.jdbc.OracleConnection connection)
          Gets a geometry adapter to handle geometry conversions to/from desired geometry format.
static GeometryFactory getGeometryFactory()
          Gets a geometry factory for creating various geometry objects.
static GeometryFactory getGeometryFactory(SpatialReference spatialRef)
          Gets a geometry factory for creating various geometry objects.
static GeometryMetaData getGeometryMetaData(java.sql.Connection conn, java.lang.String tableName, java.lang.String columnName)
          Deprecated.  
static GeometryMetaData getGeometryMetaData(java.sql.Connection conn, java.lang.String userName, java.lang.String tableName, java.lang.String columnName)
          Deprecated.  
static GeometryMetaData getGeometryMetaData(oracle.jdbc.OracleConnection conn, java.lang.String tableName, java.lang.String columnName)
          Gets the geometry metadata for geometries in the specified geometry table and column.
static GeometryMetaData getGeometryMetaData(oracle.jdbc.OracleConnection conn, java.lang.String userName, java.lang.String tableName, java.lang.String columnName)
          Gets the geometry metadata for geometries in the specified geometry table and column.
static SRManager getSpatialReferenceManager()
          Gets a spatial reference system manager for creating, loading, and storing various coordinate systems and transforming geometry objects into desired coordinate systems.
static SRManager getSpatialReferenceManager(java.sql.Connection conn)
          Deprecated.  
static SRManager getSpatialReferenceManager(oracle.jdbc.OracleConnection conn)
          Gets a spatial reference system manager for creating, loading, and storing various coordinate systems and transforming geometry objects into desired coordinate systems.
static java.lang.String getVersion()
          Gets the version number as a string
static boolean registerGeometryAdapter(GeometryAdapter geomAdapter)
          Registers a geometry adapter to handle geometry conversions (export/import).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OraSpatialManager

protected OraSpatialManager()
Method Detail

getGeometryMetaData

public static GeometryMetaData getGeometryMetaData(java.sql.Connection conn,
                                                   java.lang.String tableName,
                                                   java.lang.String columnName)
Deprecated.  

Gets the geometry metadata for geometries in the specified geometry table and column.
Parameters:
conn - the JDBC connection
tableName - the geometry table name
columnName - the geometry column name
Returns:
the geometry metadata object which contains information such as envelope, spatial reference system, and dimensional information.

getGeometryMetaData

public static GeometryMetaData getGeometryMetaData(oracle.jdbc.OracleConnection conn,
                                                   java.lang.String tableName,
                                                   java.lang.String columnName)
Gets the geometry metadata for geometries in the specified geometry table and column.
Parameters:
conn - the Oracle JDBC connection
tableName - the geometry table name
columnName - the geometry column name
Returns:
the geometry metadata object which contains information such as envelope, spatial reference system, and dimensional information.

getGeometryMetaData

public static GeometryMetaData getGeometryMetaData(oracle.jdbc.OracleConnection conn,
                                                   java.lang.String userName,
                                                   java.lang.String tableName,
                                                   java.lang.String columnName)
Gets the geometry metadata for geometries in the specified geometry table and column.
Parameters:
conn - the Oracle JDBC connection
userName - the name of user who owns the following geometry table
tableName - the geometry table name
columnName - the geometry column name
Returns:
the geometry metadata object which contains information such as envelope, spatial reference system, and dimensional information.

getGeometryMetaData

public static GeometryMetaData getGeometryMetaData(java.sql.Connection conn,
                                                   java.lang.String userName,
                                                   java.lang.String tableName,
                                                   java.lang.String columnName)
Deprecated.  

Gets the geometry metadata for geometries in the specified geometry table and column.
Parameters:
conn - the JDBC connection
userName - the name of user who owns the following geometry table
tableName - the geometry table name
columnName - the geometry column name
Returns:
the geometry metadata object which contains information such as envelope, spatial reference system, and dimensional information.

getGeometryFactory

public static GeometryFactory getGeometryFactory()
Gets a geometry factory for creating various geometry objects. The geometry factory's default spatial reference system is an empty SRS with an SRID of 0. This translates to a NULL value for SDO_GEOMETRY.SDO_SRID.
Returns:
a reference to Oracle Spatial's GeometryFactory implementation with null as the default spatial reference system (SDO_GEOMETRY.SDO_SRID=NULL)

getGeometryFactory

public static GeometryFactory getGeometryFactory(SpatialReference spatialRef)
Gets a geometry factory for creating various geometry objects. You may specify the geometry factory's spatial reference system here.
Parameters:
spatialRef - user-specified spatial reference system in which geometry objects will be created
Returns:
a reference to Oracle Spatial's GeometryFactory implementation with specified spatial reference system

registerGeometryAdapter

public static boolean registerGeometryAdapter(GeometryAdapter geomAdapter)
Registers a geometry adapter to handle geometry conversions (export/import).
Parameters:
geomAdapter - a geometry adapter instance that can handle geometry conversion to/from some geometry format
Returns:
true if the registration was successful; false otherwise

deregisterGeometryAdapter

public static boolean deregisterGeometryAdapter(GeometryAdapter geomAdapter)
De-registers a geometry adapter from the adapter list.
Parameters:
geomAdapter - the geometry adapter instance to remove from the list
Returns:
true if the de-registration was successful; false otherwise

getGeometryAdapter

public static GeometryAdapter getGeometryAdapter(java.lang.String formatName,
                                                 java.lang.String formatVersion,
                                                 java.lang.Class inputType,
                                                 java.lang.Class outputType,
                                                 java.lang.Class passthroughOutputType)
Gets a geometry adapter to handle geometry conversions to/from desired geometry format.
Parameters:
formatName - geometry format name, such as "WKT"
formatVersion - geometry format version, such as "1.0"
inputType - desired input data type of geometry objects (such as byte[]), or null if the user does not want input support for this geometry format
outputType - desired output data type of geometry objects (such as String), or null if the user does not want output support for this geometry format
passthroughOutputType - desired "pass-through" output data type of geometry objects (such as OutputStream), or null if you do not want "pass-through" output support for this geometry format.
Returns:
a geometry adapter instance that can handle conversions to/from specified geometry format, or null if no adapter is found to satisfy the specification

getGeometryAdapter

public static GeometryAdapter getGeometryAdapter(java.lang.String formatName,
                                                 java.lang.String formatVersion,
                                                 java.lang.Class inputType,
                                                 java.lang.Class outputType,
                                                 java.lang.Class passthroughOutputType,
                                                 java.sql.Connection connection)
Deprecated.  

Gets a geometry adapter to handle geometry conversions to/from desired geometry format. Deprecated. Use OracleConnection instead.
Parameters:
formatName - geometry format name, such as "WKT"
formatVersion - geometry format version, such as "1.0"
inputType - desired input data type of geometry objects (such as byte[]), or null if you do not want input support for this geometry format
outputType - desired output data type of geometry objects (such as String), or null if the user does not want output support for this geometry format
passthroughOutputType - desired "pass-through" output data type of geometry objects (such as OutputStream), or null if you do not want "pass-through" output support for this geometry format.
connection - database connection for an adapter that converts between Geometry and some database format
Returns:
a geometry adapter instance that can handle conversions to/from specified geometry format, or null if no adapter is found to satisfy the specification

getGeometryAdapter

public static GeometryAdapter getGeometryAdapter(java.lang.String formatName,
                                                 java.lang.String formatVersion,
                                                 java.lang.Class inputType,
                                                 java.lang.Class outputType,
                                                 java.lang.Class passthroughOutputType,
                                                 oracle.jdbc.OracleConnection connection)
Gets a geometry adapter to handle geometry conversions to/from desired geometry format.
Parameters:
formatName - geometry format name, such as "WKT"
formatVersion - geometry format version, such as "1.0"
inputType - desired input data type of geometry objects (such as byte[]), or null if the user does not want input support for this geometry format
outputType - desired output data type of geometry objects (such as String), or null if the user does not want output support for this geometry format
passthroughOutputType - desired "pass-through" output data type of geometry objects (such as OutputStream), or null if you do not want "pass-through" output support for this geometry format.
connection - Oracle database connection for an adapter that converts between Geometry and some database format
Returns:
a geometry adapter instance that can handle conversions to/from specified geometry format, or null if no adapter is found to satisfy the specification

getSpatialReferenceManager

public static SRManager getSpatialReferenceManager()
Gets a spatial reference system manager for creating, loading, and storing various coordinate systems and transforming geometry objects into desired coordinate systems.
Returns:
a reference to Oracle Spatial's SRManager implementation

getSpatialReferenceManager

public static SRManager getSpatialReferenceManager(java.sql.Connection conn)
Deprecated.  

Gets a spatial reference system manager for creating, loading, and storing various coordinate systems and transforming geometry objects into desired coordinate systems.
Parameters:
conn - JDBC connection to Oracle Spatial database
Returns:
a reference to Oracle Spatial's SRManager implementation

getSpatialReferenceManager

public static SRManager getSpatialReferenceManager(oracle.jdbc.OracleConnection conn)
Gets a spatial reference system manager for creating, loading, and storing various coordinate systems and transforming geometry objects into desired coordinate systems.
Parameters:
conn - OracleConnection to Oracle Spatial database
Returns:
a reference to Oracle Spatial's SRManager implementation

getVersion

public static final java.lang.String getVersion()
Gets the version number as a string
Returns:
a string in a format of "majorVersion.minorVersion"