uk.org.ogsadai.client.toolkit.activity.indexedfiles
Class IndexedFileSearch

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.activity.RequestComponent
        |
        +--uk.org.ogsadai.client.toolkit.activity.Activity
              |
              +--uk.org.ogsadai.client.toolkit.activity.indexedfiles.IndexedFileSearch

public class IndexedFileSearch
extends Activity

This activity evaluates a search activity across an indexed set of files. It has no input and two outputs. The getStatusOutput() method can be used to obtain the search results from the activity. The search results contain the number of matching documents and, for each matching document, all fields that are stored in the index. The getDataOutput() method can be used to obtain the data output from the activity. This data output specifies the location of the data that is not stored in the index.


Constructor Summary
IndexedFileSearch()
          Constructs a search activity
IndexedFileSearch(java.lang.String query)
          Constructs search activity with the given expression
IndexedFileSearch(java.lang.String query, java.lang.String index)
          Constructs search activity with the given query expression which will be run across the given index
 
Method Summary
protected  java.lang.String generateXML()
          Generates the XML representing the activity.
 ActivityOutput getDataOutput()
          Gets the activity's data output.
 java.lang.String getIndex()
           
 java.lang.String getQuery()
          Get the query expression
 long getResultCount()
           
 ActivityOutput getSearchStatus()
          Gets the activity's search status output.
 void setIndex(java.lang.String index)
          Sets the index directory.
 void setQuery(java.lang.String query)
          Set the query expression
 
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.Activity
addInput, addOutput, addOutputs, getDataResourceID, getDataServiceStub, getInputParameters, getOutputParameters, getOutputs, replaceSpecialCharacters, setDataResourceID, setDataServiceStub, setInput
 
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexedFileSearch

public IndexedFileSearch()
Constructs a search activity


IndexedFileSearch

public IndexedFileSearch(java.lang.String query)
Constructs search activity with the given expression

Parameters:
query - the query expression

IndexedFileSearch

public IndexedFileSearch(java.lang.String query,
                         java.lang.String index)
Constructs search activity with the given query expression which will be run across the given index

Parameters:
query - the query expression
index - the index directory to search
Method Detail

getQuery

public java.lang.String getQuery()
Get the query expression

Returns:
the query expression

setQuery

public void setQuery(java.lang.String query)
Set the query expression

Parameters:
query - A string containing the query expression

getIndex

public java.lang.String getIndex()
Returns:
the index that will be used for this search

setIndex

public void setIndex(java.lang.String index)
Sets the index directory.

Parameters:
index - The index to use for searching

getDataOutput

public ActivityOutput getDataOutput()
Gets the activity's data output.

Returns:
the activity output.

getSearchStatus

public ActivityOutput getSearchStatus()
Gets the activity's search status output.

Returns:
the search status.

getResultCount

public long getResultCount()
                    throws ActivityOutputException,
                           DataFormatException
ActivityOutputException
DataFormatException

generateXML

protected java.lang.String generateXML()
Description copied from class: RequestComponent
Generates the XML representing the activity. This XML can then be inserted into a perform document that is sent to a data service.

Specified by:
generateXML in class Activity
Returns:
the XML for the activity