org.gcube.indexmanagement.geoindexupdater
Class GeoIndexUpdaterResource

java.lang.Object
  extended by IndexUpdaterWSResource
      extended by org.gcube.indexmanagement.geoindexupdater.GeoIndexUpdaterResource

public class GeoIndexUpdaterResource
extends IndexUpdaterWSResource

A class which is used to update a Geo index, containing stateful information regarding the update process .

Version:
0.1

Field Summary
static java.lang.String RP_GEOGRAPHICAL_SYSTEM
           
static java.lang.String RP_NUMBER_OF_DECIMALS
           
static java.lang.String RP_UNIT_OF_MEASUREMENT
           
 
Constructor Summary
GeoIndexUpdaterResource()
          Empty constructor.
 
Method Summary
 void add(AddEnvelope[] envelopes)
          Adds an geographical objects into the index by means of an AddEnvelope (stub) array.
 void closeCurrentDeltaFile()
          Closes and uploads the current delta file, and creates a new one.
 java.lang.String getGeographicalSystem()
          Getter method for the GeographicalSystem Resource Property
 GCUBEWSResourceKey getKey()
          Method returning the key (unique id) of the resource as a ResourceKey.
 java.lang.Integer getNumberOfDecimals()
          Getter method for the NumberOfDecimals Resource Property
 java.lang.String getUnitOfMeasurement()
          Getter method for the UnitOfMeasurement Resource Property
 void initialise(java.lang.Object... args)
          This method is used to initialize the resource instance, and must be called before using the resource instance.
 boolean isDeltaComplete()
          A method indicating whether the current delta file is full/complete
 void onResourceRemoval()
           
 void onUpdaterNotificationReceived(org.w3c.dom.Element arg0)
           
 java.util.concurrent.FutureTask<java.lang.Boolean> processResultSet(java.lang.String resultSetLocation)
          Inserts ResultSet of ROWSETS information into an index.
 void setGeographicalSystem(java.lang.String geographicalSystem)
          Setter method for the GeographicalSystem Resource Property
 void setIndexTypeName(java.lang.String indexTypeName)
          
 void setNumberOfDecimals(java.lang.Integer numberOfDecimals)
          Setter method for the NumberOfDecimals Resource Property
 void setUnitOfMeasurement(java.lang.String unitOfMeasurement)
          Setter method for the UnitOfMeasurement Resource Property
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RP_GEOGRAPHICAL_SYSTEM

public static final java.lang.String RP_GEOGRAPHICAL_SYSTEM
See Also:
Constant Field Values

RP_UNIT_OF_MEASUREMENT

public static final java.lang.String RP_UNIT_OF_MEASUREMENT
See Also:
Constant Field Values

RP_NUMBER_OF_DECIMALS

public static final java.lang.String RP_NUMBER_OF_DECIMALS
See Also:
Constant Field Values
Constructor Detail

GeoIndexUpdaterResource

public GeoIndexUpdaterResource()
Empty constructor. Initialization is done through the initialize(...) method.

Method Detail

getKey

public GCUBEWSResourceKey getKey()
Method returning the key (unique id) of the resource as a ResourceKey.

Returns:
ResourceKey - the key/UniqueID of the resource

initialise

public void initialise(java.lang.Object... args)
                throws java.lang.Exception
This method is used to initialize the resource instance, and must be called before using the resource instance.

Parameters:
args[0] - - key GCUBEWSResourceKey - the key of the resource
args[1] - - indexID String - the ID of the index to update
args[2] - - indexTypeID String - the ID of the IndexType of the index
args[3] - - geographicalSystem String - the geographical system used for the Index (WGS_1984, none...)
args[4] - - unitOfMeasurement String - the unit of measurement used in the Index (DD, DecimalDegrees, cm, CentiMeters...)
args[5] - - numberOfDecimals Integer - the maximum number of decimals in the coordinates of objects (usually 4 for decimal degrees).
Throws:
java.lang.Exception

getGeographicalSystem

public java.lang.String getGeographicalSystem()
Getter method for the GeographicalSystem Resource Property

Returns:
String the requested GeographicalSystem identifier

getUnitOfMeasurement

public java.lang.String getUnitOfMeasurement()
Getter method for the UnitOfMeasurement Resource Property

Returns:
String the requested UnitOfMeasurement

getNumberOfDecimals

public java.lang.Integer getNumberOfDecimals()
Getter method for the NumberOfDecimals Resource Property

Returns:
Integer the requested NumberOfDecimals value

setGeographicalSystem

public void setGeographicalSystem(java.lang.String geographicalSystem)
Setter method for the GeographicalSystem Resource Property

Parameters:
indexID - String the new GeographicalSystem identifier

setUnitOfMeasurement

public void setUnitOfMeasurement(java.lang.String unitOfMeasurement)
Setter method for the UnitOfMeasurement Resource Property

Parameters:
indexID - String the new UnitOfMeasurement

setNumberOfDecimals

public void setNumberOfDecimals(java.lang.Integer numberOfDecimals)
Setter method for the NumberOfDecimals Resource Property

Parameters:
numberOfDecimals - Integer the new NumberOfDecimals

setIndexTypeName

public void setIndexTypeName(java.lang.String indexTypeName)
                      throws java.lang.Exception

Throws:
java.lang.Exception

add

public void add(AddEnvelope[] envelopes)
         throws java.lang.Exception
Adds an geographical objects into the index by means of an AddEnvelope (stub) array.

Parameters:
envelopes - AddEnvelope[] - the array of envelopes to insert
Throws:
java.lang.Exception

processResultSet

public java.util.concurrent.FutureTask<java.lang.Boolean> processResultSet(java.lang.String resultSetLocation)
                                                                    throws java.rmi.RemoteException
Inserts ResultSet of ROWSETS information into an index.

Parameters:
resultSetLocation - String - a String representation of the ResultSet EPR
Returns:
ProcessResultSetResponse - empty object.
Throws:
java.rmi.RemoteException

isDeltaComplete

public boolean isDeltaComplete()
A method indicating whether the current delta file is full/complete

Returns:
boolean an indicater of whether the current delta file is full/complete

closeCurrentDeltaFile

public void closeCurrentDeltaFile()
Closes and uploads the current delta file, and creates a new one.


onResourceRemoval

public void onResourceRemoval()

onUpdaterNotificationReceived

public void onUpdaterNotificationReceived(org.w3c.dom.Element arg0)