com.ontimize.util.gis.server.dataproviders
Class OntimizePointProvider

java.lang.Object
  extended by com.ontimize.util.gis.server.dataproviders.BasicOntimizeDataProvider
      extended by com.ontimize.util.gis.server.dataproviders.OntimizePointProvider
All Implemented Interfaces:
IDataAccess, IDataProvider

public class OntimizePointProvider
extends BasicOntimizeDataProvider
implements IDataAccess

Points vectorial data provider. It uses an Ontimize entities without a binary column to save geograhpic data.
It only needs two columns indicating the x and y positions (long/lat).

Xml definition parameters:

Name Description Required
entity_name Related Ontimize entity name Yes
keys Primary keys entity columns.Separated by ";" Yes
data_columns Columns containing other layer data (separated by ";"). This parameter will contain extra data fields that may be useful on gis data display. No
bbox_columns List of columns containing the bounding box of the layer data.
For points layer: x position and y position.
For lines and polygons: minmum x, maximum x, minimumy and maximum y.
Yes

Sample definition code:

<DataProvider
    class="com.ontimize.util.gis.server.dataproviders.OntimizePointsProvider"
        type="vectorial">
        <Attribute name="entity_name" value="ELocations" />
        <Attribute name="keys" value="locationid" />
        <Attribute name="bbox_columns" value="posx;posy" />
        <Attribute name="geometry_type" value="point" />
 </DataProvider>


Field Summary
 
Fields inherited from class com.ontimize.util.gis.server.dataproviders.BasicOntimizeDataProvider
BBOX_COLUMNS, bboxColumns, DATA_COLUMNS, dataColumns, ENTITY_NAME, entityName, GEOMETRY_COLUMN, geometryColumn, geometryType, KEYS_COLUMNS, keysColumns, providerEntity, queryColumns, REFERENCE_LOCATOR, referenceLocator, serverSide
 
Constructor Summary
OntimizePointProvider()
           
OntimizePointProvider(java.util.Hashtable parameters)
           
 
Method Summary
 void initProvider(java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
           
 java.lang.Object query(java.lang.Object keysValues, java.lang.Object attributes, int sessionId)
          This method must implement a standard query operation returning the set of data that matches the conditions specified by the keysValues parameter.
 void update(java.lang.Object keysValues, java.lang.Object attributesValues, int sessionId)
          This method must implement a standard update operation with the data specified in attributesValues over the set of records defined by keysValues.
 
Methods inherited from class com.ontimize.util.gis.server.dataproviders.BasicOntimizeDataProvider
addBoundingBoxToSearch, addParentKeysToSearch, delete, insert, reprojectBBoxColumns, reprojectGeometryVector, setBBoxColumnsFromGeometry, setBBoxColumnsFromGeometryVector, setOntimizeNullValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ontimize.util.gis.server.interfaces.IDataAccess
delete, insert
 

Constructor Detail

OntimizePointProvider

public OntimizePointProvider()

OntimizePointProvider

public OntimizePointProvider(java.util.Hashtable parameters)
Method Detail

initProvider

public void initProvider(java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
Specified by:
initProvider in interface IDataProvider
Overrides:
initProvider in class BasicOntimizeDataProvider

query

public java.lang.Object query(java.lang.Object keysValues,
                              java.lang.Object attributes,
                              int sessionId)
                       throws java.lang.Exception
Description copied from interface: IDataProvider
This method must implement a standard query operation returning the set of data that matches the conditions specified by the keysValues parameter. The attributes defines which attributes (or columns if data is obtained from a database) must be recovered, and keysValues specifies which set of records must be recovered.

Specified by:
query in interface IDataProvider
Overrides:
query in class BasicOntimizeDataProvider
Parameters:
keysValues - Identifiers for the data
attributes - Data attributes to query
sessionId - Session Id for this user
Returns:
Requested data
Throws:
java.lang.Exception

update

public void update(java.lang.Object keysValues,
                   java.lang.Object attributesValues,
                   int sessionId)
            throws java.lang.Exception
Description copied from interface: IDataAccess
This method must implement a standard update operation with the data specified in attributesValues over the set of records defined by keysValues. So, only the records that comply with the conditions specified by keysValues will be updated to the new values specified by attributesValues.

Specified by:
update in interface IDataAccess
Overrides:
update in class BasicOntimizeDataProvider
Parameters:
keysValues - The conditions that the records to be updated must fulfill
attributesValues - The data for updating the records to
sessionId - Session Id for this user
Throws:
java.lang.Exception