org.gcube.indexmanagement.fulltextindexlookup
Class FullTextIndexLookupService

java.lang.Object
  extended by org.gcube.indexmanagement.fulltextindexlookup.FullTextIndexLookupService

public class FullTextIndexLookupService
extends java.lang.Object

FullTextIndexLookupService implements functionality needed to query a FullText index. It also implements methods for retrieving global statistics for such an index. Each instance of the service will create a local copy of an index. Every FullTextIndexLookupService instance (reosurce) must be connected to exactly one FullTextIndexManagementService instance (resource), though many Lookup instances may be connected to the same Management instance.

Version:
0.1

Constructor Summary
FullTextIndexLookupService()
          Constructor - sets up some variables and creates a logging instance
 
Method Summary
 java.lang.String createStatistics(CreateStatistics empty)
          Creates per term statistics for the entire index.
 boolean expandIndex(int newPartitionStartPoint)
          Expands the index with a new partition.
 java.lang.String getIndexTypeName(GetIndexTypeID empty)
          Gets the IndexType name of a FullTextIndexManagement WS resource
 java.lang.String query(SearchQuery query)
          Performs a query on the local index.
 SetIndexTypeIDResponse setIndexTypeName(java.lang.String indexTypeName)
          Sets the IndexType of a FullTextIndexManagement WS resource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FullTextIndexLookupService

public FullTextIndexLookupService()
                           throws java.rmi.RemoteException
Constructor - sets up some variables and creates a logging instance

Throws:
java.rmi.RemoteException
Method Detail

query

public java.lang.String query(SearchQuery query)
                       throws java.rmi.RemoteException
Performs a query on the local index. If this is a head-partition, sub-partitions will also be queried.

Parameters:
queryString - String - the query to be performed (currently using lucene syntax)
Returns:
String - representation of the EPR for a resultset service which holds the results of the query.
Throws:
java.rmi.RemoteException

createStatistics

public java.lang.String createStatistics(CreateStatistics empty)
                                  throws java.rmi.RemoteException
Creates per term statistics for the entire index. Statistics are stored in an xml file comressed in a zip archive.

Returns:
String - CMS ID of the created statistics zip file
Throws:
java.rmi.RemoteException

setIndexTypeName

public SetIndexTypeIDResponse setIndexTypeName(java.lang.String indexTypeName)
                                        throws java.rmi.RemoteException
Sets the IndexType of a FullTextIndexManagement WS resource

Parameters:
indexTypeName - String - the name of the new IndexType
Returns:
SetIndexTypeResponse - empty instance
Throws:
java.rmi.RemoteException

getIndexTypeName

public java.lang.String getIndexTypeName(GetIndexTypeID empty)
                                  throws java.rmi.RemoteException
Gets the IndexType name of a FullTextIndexManagement WS resource

Parameters:
empty - GetIndexType - empty instance
Returns:
String - The name of the requested IndexType
Throws:
java.rmi.RemoteException

expandIndex

public boolean expandIndex(int newPartitionStartPoint)
                    throws java.rmi.RemoteException
Expands the index with a new partition.

Parameters:
newPartitionStartPoint - int - the starting point of the new partition (delta file number/idx)
Returns:
boolean - true if expansion was successful
Throws:
java.rmi.RemoteException