com.mizar.mapviewer.provider
Class CustomSpatialProviderSample

java.lang.Object
  extended by com.mizar.mapviewer.provider.CustomSpatialProviderSample
All Implemented Interfaces:
oracle.mapviewer.share.ext.SDataProvider

public class CustomSpatialProviderSample
extends java.lang.Object
implements oracle.mapviewer.share.ext.SDataProvider

This sample provider parses a XML file with the following format <?xml version="1.0" standalone="yes"?> <spatial_data> <data_attributes> <attribute name="city" type="string" /> <attribute name="state_abrv" type="string" /> <attribute name="pop90" type="double" /> </data_attributes> <data_extents> <xmin> -122.49586 </xmin> <ymin> 29.45765 </ymin> <xmax> -73.943849 </xmax> <ymax> 42.3831 </ymax> </data_extents> <geoFeature> <attributes> New York,NY,7322564 </attributes> <geometricProperty> <Point> <coordinates>-73.943849, 40.6698</coordinates> </Point> </geometricProperty> </geoFeature> <geoFeature> ... </geoFeature> ... </spatial_data>


Constructor Summary
CustomSpatialProviderSample()
          empty Constructor.
 
Method Summary
 oracle.mapviewer.share.ext.SDataSet buildDataSet(java.awt.geom.Rectangle2D queryWin, java.lang.String[] nonSpatialColumns, java.util.Properties params)
          Returns the data set (geometries plus attributes) that intersects the query window.
 boolean buildSpatialIndex(java.util.Properties params)
          Builds a spatial index for the data.
 oracle.mapviewer.share.Field[] getAttributeList(java.util.Properties params)
          Returns the data provider attribute list.
 java.awt.geom.Rectangle2D getDataExtents(java.util.Properties params)
          Returns the data extents.
 java.lang.String[] getInitParameterNames()
          Returns the initialization parameters for the provider.
 java.lang.String[] getRuntimeParameterNames()
          Returns runtime parameter names.
 boolean init(java.util.Properties params)
          Initializes the provider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomSpatialProviderSample

public CustomSpatialProviderSample()
empty Constructor.

Method Detail

getInitParameterNames

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

Specified by:
getInitParameterNames in interface oracle.mapviewer.share.ext.SDataProvider
Returns:

getRuntimeParameterNames

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

Specified by:
getRuntimeParameterNames in interface oracle.mapviewer.share.ext.SDataProvider
Returns:

init

public boolean init(java.util.Properties params)
Initializes the provider

Specified by:
init in interface oracle.mapviewer.share.ext.SDataProvider
Parameters:
params - init properties
Returns:

buildDataSet

public oracle.mapviewer.share.ext.SDataSet buildDataSet(java.awt.geom.Rectangle2D queryWin,
                                                        java.lang.String[] nonSpatialColumns,
                                                        java.util.Properties params)
Returns the data set (geometries plus attributes) that intersects the query window. In this sample, the data is loaded on initialization and there is no spatial index for searching. The search is sequential.

Specified by:
buildDataSet in interface oracle.mapviewer.share.ext.SDataProvider
Parameters:
queryWin - search area
nonSpatialColumns - attribute columns
params - runtime properties
Returns:

getAttributeList

public oracle.mapviewer.share.Field[] getAttributeList(java.util.Properties params)
Returns the data provider attribute list.

Specified by:
getAttributeList in interface oracle.mapviewer.share.ext.SDataProvider
Returns:

getDataExtents

public java.awt.geom.Rectangle2D getDataExtents(java.util.Properties params)
Returns the data extents.

Specified by:
getDataExtents in interface oracle.mapviewer.share.ext.SDataProvider
Returns:

buildSpatialIndex

public boolean buildSpatialIndex(java.util.Properties params)
Builds a spatial index for the data. In this sample there is no spatial index. The data is loaded into memry during initialization of the provider.

Specified by:
buildSpatialIndex in interface oracle.mapviewer.share.ext.SDataProvider
Returns: