|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--uk.org.ogsadai.activity.Activity
|
+--uk.org.ogsadai.activity.files.AbstractFileActivity
|
+--uk.org.ogsadai.activity.indexedfiles.SearchIndexedFileActivity
Searches an index that has been built by the Jakarta Lucene full-text search engine. This activity produces two outputs, one containing the search results and the other containing the locations of each matching document. See the activity user documentation for more details: OGSADAI/doc/interaction/activities/indexedfiles/searchIndexedFileActivity.html
| Field Summary | |
private static java.lang.String |
ANALYZER_CLASS_NAME
Jakarta Lucene analyzer class name |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private static DAILogger |
LOG
Logger object for logging in this class |
private int |
mCursor
Cursor for matching documents |
private BlockWriter |
mDocumentLocationsOutput
Activity output 1 - location of each matching document. |
private org.apache.lucene.search.Hits |
mHits
Matching documents |
private java.io.File |
mIndex
Index directory |
private java.lang.String |
mIndexName
Name of index directory |
private org.apache.lucene.search.Query |
mQuery
Parsed query object |
private java.lang.String |
mQueryExpression
Query expression (Jakarta Lucene) |
private org.apache.lucene.search.IndexSearcher |
mSearcher
Searcher |
private BlockWriter |
mSearchResultsOutput
Activity output 2 - searchResult elements describing matching fields. |
| Fields inherited from class uk.org.ogsadai.activity.files.AbstractFileActivity |
mCredentials, mFileAccessProvider, mTopDir |
| Fields inherited from class uk.org.ogsadai.activity.Activity |
mContext, mExternalInputs, mExternalOutputs, mInternalInputs, mInternalOutputs |
| Constructor Summary | |
SearchIndexedFileActivity(org.w3c.dom.Element element)
|
|
| Method Summary | |
protected void |
cleanUp()
This method can be overridden by any Activity
implementations that need to free up resources in the event of
an error or intermediate termination of the activity
processing. |
void |
initialise()
Gets the data resource accessor for the files data resource according to whether the users credentials permit this access. |
protected void |
processBlock()
Performs an iteration of the processing of an activity. |
protected void |
processFirst()
This method is called during the first iteration of processing an activity. |
| Methods inherited from class uk.org.ogsadai.activity.Activity |
connectsTo, createOutputPipe, getActivityConfiguration, getActivityName, getCause, getName, getObservableStatus, getProperties, getSession, getStatus, hasActivityConfiguration, hasProperties, process, setActivityName, setCompleted, setError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static final DAILogger LOG
private static final java.lang.String ANALYZER_CLASS_NAME
private java.lang.String mQueryExpression
private org.apache.lucene.search.Query mQuery
private java.io.File mIndex
private java.lang.String mIndexName
private org.apache.lucene.search.IndexSearcher mSearcher
private org.apache.lucene.search.Hits mHits
private int mCursor
private BlockWriter mDocumentLocationsOutput
private BlockWriter mSearchResultsOutput
| Constructor Detail |
public SearchIndexedFileActivity(org.w3c.dom.Element element)
throws ActivityCreationException,
ActivitySpecificationException
| Method Detail |
public void initialise()
throws ActivitySpecificationException,
ActivityExecutionException
AbstractFileActivity
initialise in class AbstractFileActivityActivitySpecificationException - If the user is not permitted to access the resource.
ActivityExecutionException - If some internal problem occurs.Activity.initialise()protected void processFirst()
Activity
processFirst in class Activityprotected void processBlock()
ActivitysetCompleted method to indicate that
processing is complete, or the setError method if
an error occurs that will prevent the processing from
completing.
processBlock in class Activityprotected void cleanUp()
ActivityActivity
implementations that need to free up resources in the event of
an error or intermediate termination of the activity
processing.
cleanUp in class Activity
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||