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

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

public class AddAndIndexFile
extends Activity

This activity adds a flat file to a file system data resource and indexes it. Please ensure that the following values are set before the activity is performed:


Constructor Summary
AddAndIndexFile()
          Default constructor.
AddAndIndexFile(java.lang.String filename, java.lang.String dirname)
          Constructs the activity.
 
Method Summary
protected  java.lang.String generateXML()
          Generates the XML representing the activity.
 java.lang.String getDirectory()
          Gets the directory where the new file will be placed.
 java.lang.String[] getFields()
          Return the indexed fields.
 java.lang.String getFilename()
          Gets the name of the new file.
 java.lang.String getFiletype()
          Gets the type of flat file that is being indexed.
 java.lang.String getIndex()
          Return the directory where the index will be placed.
 void setFields(java.lang.String[] fields)
          Set the indexed fields.
 void setFile(java.lang.String filename, java.lang.String directory)
          Sets the name of the new file within the data resource.
 void setFiletype(java.lang.String filetype)
          Sets the type of the flat file.
 void setIndex(java.lang.String index)
          Sets the directory where the index will be placed.
 void setInput(ActivityOutput input)
          Sets the input stream of this activity.
 
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

AddAndIndexFile

public AddAndIndexFile()
Default constructor. Creates a new AddAndIndexFile activity.


AddAndIndexFile

public AddAndIndexFile(java.lang.String filename,
                       java.lang.String dirname)
Constructs the activity.

Parameters:
filename - the name of the file that is added to the file system
dirname - the directed where the new file will be placed
Method Detail

setFile

public void setFile(java.lang.String filename,
                    java.lang.String directory)
Sets the name of the new file within the data resource.

Parameters:
filename - the name of the new file

setFiletype

public void setFiletype(java.lang.String filetype)
Sets the type of the flat file.

Parameters:
filetype - a String, one of the flat file types that the service supports.

getFiletype

public java.lang.String getFiletype()
Gets the type of flat file that is being indexed.

Returns:
String the type of the flat file

getFilename

public java.lang.String getFilename()
Gets the name of the new file.

Returns:
String the name of the file

getDirectory

public java.lang.String getDirectory()
Gets the directory where the new file will be placed.

Returns:
Returns the directory of the new file within the data resource.

setInput

public void setInput(ActivityOutput input)
Sets the input stream of this activity.

Parameters:
input - an ActivityOutput from another activity, for example a delivery activity
Throws:
java.lang.IllegalArgumentException - if the argument is null

getIndex

public java.lang.String getIndex()
Return the directory where the index will be placed.

Returns:
Returns the index directory

setIndex

public void setIndex(java.lang.String index)
Sets the directory where the index will be placed.

Parameters:
index - The index directory, relative to the root of the file system data resource.

setFields

public void setFields(java.lang.String[] fields)
Set the indexed fields.

Parameters:
fields - an array of String, names of the fields that will be indexed

getFields

public java.lang.String[] getFields()
Return the indexed fields.

Returns:
String[] the names of the fields that will be indexed

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