oracle.mapviewer.share.ext
Interface SDataProvider


public interface SDataProvider

This interface defines a generic Spatial data provider. A SDataProvider provides the interface through which application can write a custom spatial data provider. The data produced by such a data provider will be used to generate the styled features for rendering in custom themes.
An SDataProvider implementation must be registered with MapViewer by adding an entry in the mapViewerConfig.xml file.


Method Summary
 SDataSet buildDataSet(java.awt.geom.Rectangle2D queryWin, java.lang.String[] nonSpatialColumns, java.lang.String queryCondition, java.lang.Object[] bindingParameters, java.util.Properties params)
          This method creates and returns an instance of SDataSet which contains all the Spatial data produced by this provider, based on the given parameters for a specific incoming map request.
 boolean buildSpatialIndex(java.util.Properties params)
          Builds a spatial index on the data set.
 boolean canBuildSpatialIndex()
          Returns if provider can build spatial indexes.
 void clearCache()
          Clears provider internal caches (if provider implement caches).
 Field[] getAttributeList(java.util.Properties params)
          Returns the list of existing attributes for this data provider.
 java.awt.geom.Rectangle2D getDataExtents(java.util.Properties params)
          Returns the data set spatial extent MBR.
 java.lang.String[] getInitParameterNames()
          Returns the initialization parameters for the provider.
 java.lang.String[] getParametersToQuerySpatialMetadata()
          Returns the parameter names that can be used to query for spatial tables.
 java.lang.String getRuntimeParameterHintValue(java.lang.String runtimeParam)
          Returns a value that gives a hint for the runtime parameter value.
 java.lang.String[] getRuntimeParameterNames()
          Returns runtime parameter names.
 java.lang.String[][] getSpatialTables(java.util.Properties params)
          Returns the spatial tables and spatial columns.
 boolean init(java.util.Properties params)
          This method is used to set the initialization parameters for the specific data provider.
 

Method Detail

getInitParameterNames

java.lang.String[] getInitParameterNames()
Returns the initialization parameters for the provider.

Returns:
String[] - array with initialization parameter names

getRuntimeParameterNames

java.lang.String[] getRuntimeParameterNames()
Returns runtime parameter names. Runtime parameters are additional parameters that the provider may use when retrieving the data objects.

Returns:
String[] - array with runtime parameter names

getRuntimeParameterHintValue

java.lang.String getRuntimeParameterHintValue(java.lang.String runtimeParam)
Returns a value that gives a hint for the runtime parameter value.

Parameters:
runtimeParam -
Returns:
a String representing the hint value, or null if no hint is available

init

boolean init(java.util.Properties params)
This method is used to set the initialization parameters for the specific data provider.

Parameters:
params - - parameters to be used by the initialization method.
Returns:
boolean - true if success; false otherwise

buildDataSet

SDataSet buildDataSet(java.awt.geom.Rectangle2D queryWin,
                      java.lang.String[] nonSpatialColumns,
                      java.lang.String queryCondition,
                      java.lang.Object[] bindingParameters,
                      java.util.Properties params)
This method creates and returns an instance of SDataSet which contains all the Spatial data produced by this provider, based on the given parameters for a specific incoming map request.
MapViewer calls this method on the custom theme producer implementation.

Parameters:
queryWin - the search area to retrieve spatial objects. The window is assumed to be already on data provider spatial reference system.
nonSpatialColumns - - the list of attributes that will return with objects.
queryCondition - - query condition expression (may have binding parameters).
bindingParameters - - binding variables for query condition with binding parameters.
params - - parameters that the provider may use to retrieve the data.
Returns:
SDataObject - an instance of SDataSet class; null if failed.

getAttributeList

Field[] getAttributeList(java.util.Properties params)
Returns the list of existing attributes for this data provider.

Parameters:
params - parameters that the provider may use to get the attribute list.
Returns:
Field[] - array of attributes for this provider.

getDataExtents

java.awt.geom.Rectangle2D getDataExtents(java.util.Properties params)
Returns the data set spatial extent MBR.

Parameters:
params - parameters that the provider may use to get the data extents
Returns:
Rectangle2D - data spatial extent for this provider.

buildSpatialIndex

boolean buildSpatialIndex(java.util.Properties params)
Builds a spatial index on the data set.

Parameters:
params - parameters that the provider may use to build the spatial index.
Returns:
boolean - true if saptial index creation is successful.

clearCache

void clearCache()
Clears provider internal caches (if provider implement caches).


canBuildSpatialIndex

boolean canBuildSpatialIndex()
Returns if provider can build spatial indexes. If true, means that buildSpatialIndex method can be called.

Returns:

getParametersToQuerySpatialMetadata

java.lang.String[] getParametersToQuerySpatialMetadata()
Returns the parameter names that can be used to query for spatial tables.

Returns:

getSpatialTables

java.lang.String[][] getSpatialTables(java.util.Properties params)
Returns the spatial tables and spatial columns.

Parameters:
params - must define the parameters returned from getParametersToQuerySpatialMetadata.
Returns:
an array list defining the table name(index [0]) and spatial column (index[1])