|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.sdoapi.adapter.AdapterSDO
This class implements the GeometryAdapter interface for the type MDSYS.SDO_GEOMETRY. It does not support all the geometry types that can be stored in an instance of MDSYS.SDO_GEOMETRY in an Oracle database server. AdapterSDO only supports 2-dimensional geometries. It does not support linearly referenced or 3-D or 4-D geometries. This class is intended solely for the conversion between 2-D instances of MDSYS.SDO_GEOMETRY and Java instances of the Geometry heirarchy support by SDOAPI.
Field Summary | |
protected oracle.jdbc.OracleConnection |
m_conn
|
protected java.lang.String |
m_formatName
|
protected java.lang.String |
m_formatVersion
|
protected GeometryFactory |
m_gF
|
protected oracle.sdoapi.adapter.SDOTemplateFactory |
m_sOTF
|
protected SRManager |
m_srManager
|
protected java.lang.Class[] |
m_supportedInputTypes
|
protected java.lang.Class[] |
m_supportedOutputTypes
|
protected java.lang.Class[] |
m_supportedPassthroughOutputTypes
|
Constructor Summary | |
AdapterSDO(java.sql.Connection connection)
Deprecated. |
|
AdapterSDO(GeometryFactory gF1,
java.sql.Connection connection)
Deprecated. |
|
AdapterSDO(GeometryFactory gF1,
oracle.jdbc.OracleConnection connection)
Constructs an AdapterSDO instance given a GeometryFactory and an OracleConnection (oracle.jdbc.OracleConnection). |
|
AdapterSDO(oracle.jdbc.OracleConnection connection)
Constructs an instance of AdapterSDO given an OracleConnection. |
Method Summary | |
java.lang.Object |
exportGeometry(java.lang.Class outputFormat,
Geometry geom)
Creates a STRUCT from an instance of Geometry. |
void |
exportGeometry(java.lang.Object outputObject,
Geometry geom)
Converts a Geometry object to an object of the specified output class. |
oracle.jdbc.OracleConnection |
getConnection()
Gets the Oracle JDBC Connection instance. |
SpatialReference |
getDefaultSRS()
Gets the default Spatial Reference System. |
java.lang.String |
getFormatName()
Gets the format name (which is "SDO"). |
java.lang.String |
getFormatVersion()
Gets the format version. |
java.lang.Class[] |
getSupportedInputTypes()
Gets the supported input types. |
java.lang.Class[] |
getSupportedOutputTypes()
Gets the supported output types. |
java.lang.Class[] |
getSupportedPassthroughOutputTypes()
Gets the supported pass through output types. |
Geometry |
importGeometry(java.lang.Object iObject)
Creates a Geometry instance from a STRUCT |
Geometry |
importGeometry(java.lang.Object iObject,
int nDim)
Creates a Geometry instance from a STRUCT |
boolean |
inputTypeSupported(java.lang.Class inputFormat)
Returns true if the input Class is supported and false otherwise. |
boolean |
outputTypeSupported(java.lang.Class outputFormat)
Returns true if the output Class is supported and false otherwise. |
boolean |
passthroughOutputTypeSupported(java.lang.Class outputFormat)
Returns true if the pass through output Class is supported and false otherwise. |
void |
setConnection(oracle.jdbc.OracleConnection conn)
Sets the Oracle JDBC Connection. |
void |
setDefaultSRS(SpatialReference srs)
Sets the default Spatial Reference System. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final java.lang.Class[] m_supportedInputTypes
protected final java.lang.Class[] m_supportedOutputTypes
protected final java.lang.Class[] m_supportedPassthroughOutputTypes
protected final java.lang.String m_formatName
protected final java.lang.String m_formatVersion
protected oracle.sdoapi.adapter.SDOTemplateFactory m_sOTF
protected GeometryFactory m_gF
protected SRManager m_srManager
protected oracle.jdbc.OracleConnection m_conn
Constructor Detail |
public AdapterSDO(GeometryFactory gF1, java.sql.Connection connection) throws java.sql.SQLException
public AdapterSDO(GeometryFactory gF1, oracle.jdbc.OracleConnection connection) throws java.sql.SQLException
gF1
- an instance of GeometryFactoryconnection
- an instance of oracle.jdbc.OracleConnectionpublic AdapterSDO(java.sql.Connection connection) throws java.sql.SQLException
public AdapterSDO(oracle.jdbc.OracleConnection connection) throws java.sql.SQLException
Method Detail |
public java.lang.Object exportGeometry(java.lang.Class outputFormat, Geometry geom) throws GeometryOutputTypeNotSupportedException, InvalidGeometryException
exportGeometry
in interface GeometryAdapter
outputFormat
- Must be STRUCT.class.
This is the only supported output format.geom
- an instance of Geometrypublic void exportGeometry(java.lang.Object outputObject, Geometry geom) throws GeometryOutputTypeNotSupportedException, InvalidGeometryException
GeometryAdapter
OutputStream
.
Using an already existing object for output adds flexibility. This is also
a straightforward way to write several converted Geometries into a single
object (such as a stream).
If the output of the conversion is needed in a new object, the other
signature exportGeometry(Class, Geometry)
might be more
convenient.
exportGeometry
in interface GeometryAdapter
public Geometry importGeometry(java.lang.Object iObject) throws GeometryInputTypeNotSupportedException, InvalidGeometryException
importGeometry
in interface GeometryAdapter
iObject
- An instance of STRUCT (oracle.sql.STRUCT)public Geometry importGeometry(java.lang.Object iObject, int nDim) throws GeometryInputTypeNotSupportedException, InvalidGeometryException
importGeometry
in interface GeometryAdapter
iObject
- An instance of STRUCT (oracle.sql.STRUCT)nDim
- the dimensionality of the geometry.
This release only supports 2-dimensional geometries.public boolean inputTypeSupported(java.lang.Class inputFormat)
inputTypeSupported
in interface GeometryAdapter
public boolean outputTypeSupported(java.lang.Class outputFormat)
outputTypeSupported
in interface GeometryAdapter
public boolean passthroughOutputTypeSupported(java.lang.Class outputFormat)
passthroughOutputTypeSupported
in interface GeometryAdapter
public java.lang.Class[] getSupportedInputTypes()
getSupportedInputTypes
in interface GeometryAdapter
public java.lang.Class[] getSupportedOutputTypes()
getSupportedOutputTypes
in interface GeometryAdapter
public java.lang.Class[] getSupportedPassthroughOutputTypes()
getSupportedPassthroughOutputTypes
in interface GeometryAdapter
public java.lang.String getFormatName()
getFormatName
in interface GeometryAdapter
public java.lang.String getFormatVersion()
getFormatVersion
in interface GeometryAdapter
public void setDefaultSRS(SpatialReference srs)
setDefaultSRS
in interface GeometryAdapter
srs
- a SpatialReference instancepublic SpatialReference getDefaultSRS()
getDefaultSRS
in interface GeometryAdapter
public void setConnection(oracle.jdbc.OracleConnection conn) throws java.sql.SQLException
conn
- the OracleConnectionpublic oracle.jdbc.OracleConnection getConnection()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |