oracle.sdoapi.adapter
Interface GeometryAdapter

All Known Implementing Classes:
AdapterSDO

public interface GeometryAdapter


Method Summary
 java.lang.Object exportGeometry(java.lang.Class ouputType, Geometry geom)
          Converts a Geometry object to an object of the specified output class.
 void exportGeometry(java.lang.Object ouputObject, Geometry geom)
          Converts a Geometry object to an object of the specified output class.
 SpatialReference getDefaultSRS()
          Gets the default reference system for this adapter.
 java.lang.String getFormatName()
          Returns as a String the format name that the adapter converts from/to.
 java.lang.String getFormatVersion()
          Returns as a String the format version number that the adapter converts from/to.
 java.lang.Class[] getSupportedInputTypes()
          Returns the input types supported.
 java.lang.Class[] getSupportedOutputTypes()
          Returns the output types supported for function exportGeometry(Class, Geometry):Object.
 java.lang.Class[] getSupportedPassthroughOutputTypes()
          Returns the output types supported for function exportGeometry(Object, Geometry):void.
 Geometry importGeometry(java.lang.Object inputSource)
          Converts the specified object to a Geometry object.
 Geometry importGeometry(java.lang.Object inputSource, int nDim)
          Converts the specified object to a Geometry object.
 boolean inputTypeSupported(java.lang.Class inputType)
          Returns whether a given input type is supported.
 boolean outputTypeSupported(java.lang.Class outputType)
          Returns whether a given output type is supported for function exportGeometry(Class, Geometry):Object.
 boolean passthroughOutputTypeSupported(java.lang.Class outputType)
          Returns whether a given output type is supported for function exportGeometry(Object, Geometry):void.
 void setDefaultSRS(SpatialReference srs)
          Sets the default reference system for this adapter.
 

Method Detail

exportGeometry

public java.lang.Object exportGeometry(java.lang.Class ouputType,
                                       Geometry geom)
                                throws GeometryOutputTypeNotSupportedException,
                                       InvalidGeometryException
Converts a Geometry object to an object of the specified output class. There are two signatures of this function. This signature lets the caller specify an output type (as java.lang.Class). An output object of this class will be newly created. If a Geometry is converted to some text format (such as XML), then the output type might be String.

If the output should be written to an already existing object (such as a stream), the other signature exportGeometry(Object, Geometry) should be used.


exportGeometry

public void exportGeometry(java.lang.Object ouputObject,
                           Geometry geom)
                    throws GeometryOutputTypeNotSupportedException,
                           InvalidGeometryException
Converts a Geometry object to an object of the specified output class. There are two signatures of this function. This signature lets the caller specify an output object. The output of the conversion will be written to the specified object. If a Geometry is converted to some text format (such as XML), then the output type might be 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.


importGeometry

public Geometry importGeometry(java.lang.Object inputSource)
                        throws GeometryInputTypeNotSupportedException,
                               InvalidGeometryException
Converts the specified object to a Geometry object. For certain input types (such as stream) the input object might contain several objects to convert. This function will only convert the one object that begins at the current position. The caller must make sure that the next byte read from such a stream is the first byte of the object to be converted.

importGeometry

public Geometry importGeometry(java.lang.Object inputSource,
                               int nDim)
                        throws GeometryInputTypeNotSupportedException,
                               InvalidGeometryException
Converts the specified object to a Geometry object. For certain input types (such as stream) the input object might contain several objects to convert. This function will only convert the one object that begins at the current position. The caller must make sure that the next byte read from such a stream is the first byte of the object to be converted.

The dimensionality of the object is specified for external formats that do not include this information. This can happen when the data was initially meant to be used by a single special application that knows how to interpret it.


inputTypeSupported

public boolean inputTypeSupported(java.lang.Class inputType)
Returns whether a given input type is supported. For an adapter converting from a native database data object type (for example), a String might not be a natural input type.

outputTypeSupported

public boolean outputTypeSupported(java.lang.Class outputType)
Returns whether a given output type is supported for function exportGeometry(Class, Geometry):Object. For an adapter converting to a native database data object type (for example), a String might not be a natural output type.

passthroughOutputTypeSupported

public boolean passthroughOutputTypeSupported(java.lang.Class outputType)
Returns whether a given output type is supported for function exportGeometry(Object, Geometry):void. For an adapter converting to a native database data object type (for example), a String might not be a natural output type.

getSupportedInputTypes

public java.lang.Class[] getSupportedInputTypes()
Returns the input types supported.

getSupportedOutputTypes

public java.lang.Class[] getSupportedOutputTypes()
Returns the output types supported for function exportGeometry(Class, Geometry):Object.

getSupportedPassthroughOutputTypes

public java.lang.Class[] getSupportedPassthroughOutputTypes()
Returns the output types supported for function exportGeometry(Object, Geometry):void.

getFormatName

public java.lang.String getFormatName()
Returns as a String the format name that the adapter converts from/to.

getFormatVersion

public java.lang.String getFormatVersion()
Returns as a String the format version number that the adapter converts from/to.

setDefaultSRS

public void setDefaultSRS(SpatialReference srs)
Sets the default reference system for this adapter.

getDefaultSRS

public SpatialReference getDefaultSRS()
Gets the default reference system for this adapter.