org.gcube.indexmanagement.geoindexlookup
Class GeoIndexLookupResource

java.lang.Object
  extended by IndexLookupWSResource
      extended by org.gcube.indexmanagement.geoindexlookup.GeoIndexLookupResource

public class GeoIndexLookupResource
extends IndexLookupWSResource

A class containing stateful information regarding an Index replication.

Version:
0.1

Field Summary
static java.lang.String RP_GEOGRAPHICAL_SYSTEM
           
static java.lang.String RP_ISCOMPLETE
           
static java.lang.String RP_NUMBER_OF_DECIMALS
           
static java.lang.String RP_REFINER_INFO
           
static java.lang.String RP_SORTER_INFO
           
static java.lang.String RP_UNIT_OF_MEASUREMENT
           
 
Constructor Summary
GeoIndexLookupResource()
           
 
Method Summary
 void clearIndex()
           
 java.lang.String getGeographicalSystem()
          Getter method for the GeographicalSystem Resource Property
 java.lang.Boolean getIsComplete()
          Getter method for the IsComplete Resource Property
 java.lang.Integer getNumberOfDecimals()
          Getter method for the NumberOfDecimals Resource Property
 RefinerInfoType getRefinerInfo()
          Getter method for the RefinerInfo Resource Property
 SorterInfoType getSorterInfo()
          Getter method for the SorterInfo 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 isReadyToDie()
          A method to check if the resource has finished its tasks and is ready to die.
 void loadPlugins()
          A method used to reload all plugins from the plugin directory.
 void mergeAddition(java.io.File file, java.lang.String cmsID, int docCount)
          Merges the contents of a Addition DeltaFile into the local index replication (add documents).
 void mergeDeletion(java.io.File file, java.lang.String cmsID, int docCount)
          Not implemented.
 void onLoad(java.io.ObjectInputStream ois, boolean firstLoad)
           
 void onLookupNotificationReceived(org.w3c.dom.Element message)
           
 void onResourceRemoval()
           
 void onStore(java.io.ObjectOutputStream oos)
           
 java.lang.String search(java.lang.String cqlQuery, boolean noncomplete)
          Performs a spatial query.
 void setGeographicalSystem(java.lang.String geographicalSystem)
          Setter method for the GeographicalSystem Resource Property
 void setIndexTypeID(java.lang.String indexTypeID)
          Setter method for the IndexTypeName Resource Property
 void setIsComplete(java.lang.Boolean IsComplete)
          Setter method for the IsComplete Resource Property
 void setNumberOfDecimals(java.lang.Integer numberOfDecimals)
          Setter method for the NumberOfDecimals Resource Property
 void setRefinerInfo(RefinerInfoType refinerInfo)
          Setter method for the RefinerInfo Resource Property
 void setSorterInfo(SorterInfoType sorterInfo)
          Setter method for the SorterInfo 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

RP_SORTER_INFO

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

RP_REFINER_INFO

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

RP_ISCOMPLETE

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

GeoIndexLookupResource

public GeoIndexLookupResource()
Method Detail

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] - - collectionID String[] - a list of IDs of the collections to feed from
args[4] - - geographicalSystem String - the geographical system used for the Index (WGS_1984, none...)
args[5] - - unitOfMeasurement String - the unit of measurement used in the Index (DD, DecimalDegrees, cm, CentiMeters...)
args[6] - - numberOfDecimals Integer - the maximum number of decimals in the coordinates of objects (usually 4 for decimal degrees).
Throws:
java.lang.Exception
See Also:
org.gcube.indexmanagement.geoindexmanagement.stubs.GeoIndexManagementFactoryPortType

onStore

public void onStore(java.io.ObjectOutputStream oos)
             throws java.lang.Exception
Throws:
java.lang.Exception

onLoad

public void onLoad(java.io.ObjectInputStream ois,
                   boolean firstLoad)
            throws java.lang.Exception
Throws:
java.lang.Exception

loadPlugins

public void loadPlugins()
A method used to reload all plugins from the plugin directory. Currently loaded will be discarded before the reload.


getSorterInfo

public SorterInfoType getSorterInfo()
Getter method for the SorterInfo Resource Property

Returns:
SorterInfoType the requested SorterInfo

getRefinerInfo

public RefinerInfoType getRefinerInfo()
Getter method for the RefinerInfo Resource Property

Returns:
RefinerInfoType the requested RefinerInfo

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

getIsComplete

public java.lang.Boolean getIsComplete()
Getter method for the IsComplete Resource Property

Returns:
Boolean the requested IsComplete flag

setIsComplete

public void setIsComplete(java.lang.Boolean IsComplete)
                   throws java.lang.Exception
Setter method for the IsComplete Resource Property

Parameters:
IsComplete - Boolean the IsComplete hint
Throws:
java.lang.Exception

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

setSorterInfo

public void setSorterInfo(SorterInfoType sorterInfo)
Setter method for the SorterInfo Resource Property

Parameters:
sorterInfo - SorterInfoType the new SorterInfo

setRefinerInfo

public void setRefinerInfo(RefinerInfoType refinerInfo)
Setter method for the RefinerInfo Resource Property

Parameters:
refinerInfo - RefinerInfoType the new RefinerInfo

setIndexTypeID

public void setIndexTypeID(java.lang.String indexTypeID)
                    throws java.lang.Exception
Setter method for the IndexTypeName Resource Property

Parameters:
indexTypeName - String the new IndexTypeName
Throws:
java.lang.Exception

isReadyToDie

public boolean isReadyToDie()
A method to check if the resource has finished its tasks and is ready to die. Used by the worker thread.

Returns:
true if ready to die

search

public java.lang.String search(java.lang.String cqlQuery,
                               boolean noncomplete)
                        throws java.lang.Exception
Performs a spatial query.

Parameters:
poly - SearchPolygon - A stub containing a polygonal area to search, along with an optional Ranking request and an optional list of Refinement requests.
Returns:
RSLocator - RSLocator of the ResultSet containing the results of the query.
Throws:
java.lang.Exception

mergeAddition

public void mergeAddition(java.io.File file,
                          java.lang.String cmsID,
                          int docCount)
                   throws IndexException
Merges the contents of a Addition DeltaFile into the local index replication (add documents). Required by the DeltaFileMerger interface.

Parameters:
deltaIndex - File - the DeltaFile to be merged into the local index replication
cmsID - String - the ID the retrieved file has in CMS
Throws:
IndexException
See Also:
org.diligentproject.indexservice.storagehandling.DeltaFileMerger

mergeDeletion

public void mergeDeletion(java.io.File file,
                          java.lang.String cmsID,
                          int docCount)
                   throws IndexException
Not implemented. Merges the contents of a Deletion DeltaFile into the local index replication (delete documents). Required by the DeltaFileMerger interface.

Parameters:
deletionFile - File - the DeltaFile to be merged into the local index replication
cmsID - String - the ID the retrieved file has in CMS
Throws:
IndexException
See Also:
org.diligentproject.indexservice.storagehandling.DeltaFileMerger

clearIndex

public void clearIndex()
                throws IndexException
Throws:
IndexException

onResourceRemoval

public void onResourceRemoval()

onLookupNotificationReceived

public void onLookupNotificationReceived(org.w3c.dom.Element message)