com.ontimize.util.gis.server.dataproviders
Class OntimizePointProvider
java.lang.Object
com.ontimize.util.gis.server.dataproviders.BasicOntimizeDataProvider
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>
| 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 |
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OntimizePointProvider
public OntimizePointProvider()
OntimizePointProvider
public OntimizePointProvider(java.util.Hashtable parameters)
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 dataattributes - Data attributes to querysessionId - 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 fulfillattributesValues - The data for updating the records tosessionId - Session Id for this user
- Throws:
java.lang.Exception