|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.activity.indexedfiles.AddAndIndexFileActivityConfiguration
This class processes a configuration document for the AddAndIndexFileActivity.
The configuration document has the following format:
Elementconfiguration
- root element which contains one or more of the following:
fileIndexer
- definition of the classes used for indexing a certain filetype
filetype
- a name for the type of flat file. This name is the identifier used in the perform document. File types are not case sensitive.implementation
- a class implementing the uk.org.ogsadai.activity.indexedfiles.FlatFileIndexWriter
interface for this particular flat file type.analyzer
- a class which extends org.apache.lucene.analysis.Analyzer
and which will be used for indexing this particular flat file type.<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>
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE Copyright statement |
private static DAILogger |
LOG Logger object for logging in this class |
private java.util.Map |
mAnalyzers Map from file types to file analyzer class names |
private java.util.Map |
mIndexers Map from file types to file indexer class names |
private java.lang.String |
mName Activity name |
Constructor Summary | |
AddAndIndexFileActivityConfiguration(java.lang.String name) Constructor. |
Method Summary | |
java.lang.String |
getAnalyzer(java.lang.String filetype) Returns the analyzer that is associated with this file type. |
private java.lang.String |
getAttribute(java.lang.String name, org.w3c.dom.Element element) Gets the attribute of an element. |
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) Parses the configuration document, initialising any fields that are necessary for the accessor methods to operate. |
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 java.util.Map mIndexers
private java.util.Map mAnalyzers
private java.lang.String mName
Constructor Detail |
public AddAndIndexFileActivityConfiguration(java.lang.String name)
name
- Activity nameMethod Detail |
public void initialise(org.w3c.dom.Document document) throws ActivityConfigurationException
ActivityConfiguration
ActivityCreator
class.
initialise
in interface ActivityConfiguration
document
- The Document
containing the activity configuration information.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.public java.lang.String getAnalyzer(java.lang.String filetype)
filetype
- A string that identifies the flat file type (case insensitive).public java.lang.String getIndexHelperClass(java.lang.String filetype)
filetype
- A string that identifies the flat file type (case insensitive)private java.lang.String getAttribute(java.lang.String name, org.w3c.dom.Element element) throws ActivityConfigurationException
name
- Name of the attributeelement
- An lement containing the attributeActivityConfigurationException
- If the attribute does not exist or is empty
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |