uk.org.ogsadai.activity.indexedfiles
Class AddAndIndexFileActivityConfiguration

java.lang.Object
  |
  +--uk.org.ogsadai.activity.indexedfiles.AddAndIndexFileActivityConfiguration
All Implemented Interfaces:
ActivityConfiguration

public class AddAndIndexFileActivityConfiguration
extends java.lang.Object
implements ActivityConfiguration

Author:
The OGSA-DAI Team.

This class processes a configuration document for the AddAndIndexFileActivity. The configuration document has the following format:

Element configuration - root element which contains one or more of the following: For example:
 <configuration>
   <fileIndexer implementation="uk.org.ogsadai.activity.indexedfiles.SwissProtIndexWriter"
                filetype="SwissProt"
                analyzer="org.apache.lucene.analysis.standard.StandardAnalyzer" />
   <fileIndexer implementation="uk.org.ogsadai.activity.indexedfiles.OMIMIndexWriter"
                filetype="OMIM"
                analyzer="org.apache.lucene.analysis.standard.StandardAnalyzer" />
 </configuration>
 

Constructor Summary
AddAndIndexFileActivityConfiguration()
          Constructor - calls superclass constructor.
 
Method Summary
 java.lang.String getAnalyzer(java.lang.String filetype)
          Returns the analyzer that is associated with this file type.
 java.lang.String getIndexHelperClass(java.lang.String filetype)
          Returns the class name of the helper class used for indexing this file type.
 void initialise(org.w3c.dom.Document document)
          Initialises the activity configuration and parses the configuration document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddAndIndexFileActivityConfiguration

public AddAndIndexFileActivityConfiguration()
Constructor - calls superclass constructor.

Method Detail

initialise

public void initialise(org.w3c.dom.Document document)
                throws ActivityConfigurationException
Initialises the activity configuration and parses the configuration document.

Specified by:
initialise in interface ActivityConfiguration
Parameters:
document - The Document containing the activity configuration information.
Throws:
ActivityConfigurationException - If there is a problem initialising the ActivityConfiguration object. This may be caused by the document containing invalid information, or perhaps by a system problem within the initialisation code.
See Also:
ActivityConfiguration.initialise(org.w3c.dom.Document)

getAnalyzer

public java.lang.String getAnalyzer(java.lang.String filetype)
Returns the analyzer that is associated with this file type.

Parameters:
filetype - A String that identifies the flat file type (case insensitive).
Returns:
the class name of the analyzer that will be used for indexing

getIndexHelperClass

public java.lang.String getIndexHelperClass(java.lang.String filetype)
Returns the class name of the helper class used for indexing this file type.

Parameters:
filetype - A String that identifies the flat file type (case insensitive)
Returns:
the class name of indexing strategy that will be used for indexing