Activity - addIndexFile

Activity Type: Indexed Files

Description

Imports a new text file into the file system and generates an index using the full-text search engine Jakarta Lucene.

Example

<addIndexFile name="addfile">
  <fromLocal from="data"/>
  <filename>uniprot.dat</filename>
  <directory>data</directory>
  <filetype>SwissProt</filetype>
  <field>ID</field>
  <field>AC</field>
  <index>index</index>
</addIndexFile>

Specification

Element addIndexFile:

Input and Output Types

Configuration

A configuration file must be provided for this activity. The configuration contains information about the flat file types that can be indexed by this activity and the helper classes used. The location of the configuration file is specified in the activity configuration document.

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>

Element configuration - root element of the configuration:

Warning to Service Deployers

This activity can be used by clients to potentially access any directory on your server below that exposed by the associated OGSA-DAI service.

Data Resource Accessor

This activity requires a data resource accessor that implements the following interface: uk.org.ogsadai.dataresource.FileAccessProvider

Required Libraries

The use of this activity requires the following jar to be loaded on the server:

XML Schema

OGSA-DAI/schema/ogsadai/xsd/activities/add_index_file.xsd

Class

uk.org.ogsadai.activity.indexedfiles.AddAndIndexFileActivity

Client Toolkit Class

uk.org.ogsadai.client.toolkit.activity.indexedfiles.AddAndIndexFile