com.ontimize.util.gis.server.interfaces
Interface IDataProvider

All Known Subinterfaces:
IDataAccess
All Known Implementing Classes:
BasicOntimizeDataProvider, FictionVectorialDataProvider, FictionWMSDataProvider, GeoImageDataProvider, GoogleMapsDataProvider, GoogleTilesDataProvider, OntimizePointProvider, OpenStreetMapDataProvider, ShapefileDataProvider, SitgaDataProvider, WFSDataProvider, WMSCatastroDataProvider, WMSDataProvider

public interface IDataProvider

Interface used for only read access data providers.

The classes implementing this interface must have a constructor like
public DataProviderClass(Hashtable parameters)
where the parameters in the hashtable are passed by the Attribute
elements on the data provider xml definition.

Sample code:

<DataProvider
    class="com.test.server.SampleDataProvider"
    type="vectorial">
    <Attribute name="geoField" value="the_geom" />
    <Attribute name="parentKey" value="lineid" />
    <Attribute name="geometryType" value="line" />
</DataProvider>
in this situation the constructor will get a hashtable parameter with the data
{geoField=the_geom; parentKey=lineid; geometryType=line} 


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.
 

Method Detail

query

java.lang.Object query(java.lang.Object keysValues,
                       java.lang.Object attributes,
                       int sessionId)
                       throws java.lang.Exception
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.

Parameters:
keysValues - Identifiers for the data
attributes - Data attributes to query
sessionId - Session Id for this user
Returns:
Requested data
Throws:
java.lang.Exception

initProvider

void initProvider(java.util.Hashtable<java.lang.String,java.lang.Object> parameters)