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

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

public class GeoImageDataProvider
extends java.lang.Object
implements IDataAccess

Georreferenced image data provider.

Xml definition parameters:

Name Description Required
fileLocation Location of the image file Yes
boundingBox Bounding box for the file. Description format --> "Env[minX:maxX,minY:maxY]" Yes
coordinateReferenceSystem Coordinate reference system for the image in EPSG format code Yes

Sample definition code:

<DataProvider
    class="com.ontimize.util.gis.server.dataproviders.GeoImageDataProvider"
    type="raster">
    <Attribute name="fileLocation" value="images/greenwich_ecuatorial.png" />
    <Attribute name="boundingBox" value="Env[-1.0:1-0, -1.0:1.0]" />
    <Attribute name="coordinateReferenceSystem" value="EPSG:4326" />
</DataProvider>


Field Summary
protected  java.lang.String bboxString
           
protected static java.lang.String BOUNDING_BOX
           
protected  com.vividsolutions.jts.geom.Envelope boundingBox
           
(package private)  java.awt.image.BufferedImage buffImage
           
protected static java.lang.String COORDINATE_REFERENCE_SYSTEM
           
protected  org.opengis.referencing.crs.CoordinateReferenceSystem crs
           
protected  java.lang.String crsCode
           
protected static java.lang.String FILE_LOCATION
           
protected  java.lang.String fileLocation
           
protected  java.io.File imageFile
           
protected  java.net.URL urlLocation
           
 
Constructor Summary
GeoImageDataProvider()
           
GeoImageDataProvider(java.util.Hashtable parameters)
          Data provider for a gis raster layers where the data source is a georreferenced image Parameters in data provider xml definition: - "fileLocation": Location of the image file - "boundingBox": Bounding box for the file.
 
Method Summary
 void delete(java.lang.Object keysValues, int sessionId)
          This method must implement a standard delete operation over the set of records defined by keysValues.
 void initProvider(java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
           
 java.lang.Object insert(java.lang.Object attributesValues, int sessionId)
          This method must implement a standard insert operation with the data contained in attributesValues parameter.
 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
 

Field Detail

FILE_LOCATION

protected static final java.lang.String FILE_LOCATION
See Also:
Constant Field Values

BOUNDING_BOX

protected static final java.lang.String BOUNDING_BOX
See Also:
Constant Field Values

COORDINATE_REFERENCE_SYSTEM

protected static final java.lang.String COORDINATE_REFERENCE_SYSTEM
See Also:
Constant Field Values

fileLocation

protected java.lang.String fileLocation

bboxString

protected java.lang.String bboxString

crsCode

protected java.lang.String crsCode

crs

protected org.opengis.referencing.crs.CoordinateReferenceSystem crs

boundingBox

protected com.vividsolutions.jts.geom.Envelope boundingBox

imageFile

protected java.io.File imageFile

urlLocation

protected java.net.URL urlLocation

buffImage

java.awt.image.BufferedImage buffImage
Constructor Detail

GeoImageDataProvider

public GeoImageDataProvider()

GeoImageDataProvider

public GeoImageDataProvider(java.util.Hashtable parameters)
Data provider for a gis raster layers where the data source is a georreferenced image Parameters in data provider xml definition: - "fileLocation": Location of the image file - "boundingBox": Bounding box for the file. Description format --> "Env[minX:maxX,minY:maxY]" - "coordinateReferenceSystem": Coordinate reference system for the image in EPSG format code --> "EPSG:crsNumber"

Parameters:
parameters - - Parameters Hashtable
Method Detail

initProvider

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

delete

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

Specified by:
delete in interface IDataAccess
Parameters:
keysValues - The conditions that the records to be deleted must fulfill
sessionId - Session Id for this user
Throws:
java.lang.Exception

insert

public java.lang.Object insert(java.lang.Object attributesValues,
                               int sessionId)
                        throws java.lang.Exception
Description copied from interface: IDataAccess
This method must implement a standard insert operation with the data contained in attributesValues parameter.

Specified by:
insert in interface IDataAccess
Parameters:
attributesValues - Data to store
sessionId - Session Id for this user
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
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

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
Parameters:
keysValues - Identifiers for the data
attributes - Data attributes to query
sessionId - Session Id for this user
Returns:
Requested data
Throws:
java.lang.Exception