uk.org.ogsadai.client.toolkit.activity.files
Class FileAppend

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.activity.RequestComponent
        |
        +--uk.org.ogsadai.client.toolkit.activity.Activity
              |
              +--uk.org.ogsadai.client.toolkit.activity.files.FileWriting
                    |
                    +--uk.org.ogsadai.client.toolkit.activity.files.FileAppend

public class FileAppend
extends FileWriting

A file writing activity which appends text to the end of the file or to the end of each line.

A FileAppend activity is semantically equivalent to a FileInsert activity with an offset positioned at the end of the file or line.

If the constructor with a text parameter is not used, it is expected that the setInput method will be called in order to register that the input will be taken from another activity's output. If the constructor with a text parameter is used, any input registered via setInput is ignored.

Author:
The OGSA-DAI Project Team

Field Summary
 
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.files.FileWriting
APPEND, BOF, DELETE, EOF, INSERT, mAction, mFilename, mLength, mMatch, mOffset, mPerLine, mRegexp, mText, NONE_SPECIFIED, PER_FILE, PER_LINE, REPLACE, TO_EOF
 
Constructor Summary
FileAppend(java.lang.String filename, boolean perLine)
          Append text obtained from another activity to the end of a file or to each line of a file.
FileAppend(java.lang.String filename, boolean perLine, java.lang.String text)
          Append particular text to the end of a file or to each line of a file.
 
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.files.FileWriting
actionToString, generateXML, getFilename, getLength, getMatch, getOffset, getRegexp, getText, isPerLine, lengthToString, offsetToString, setFilename, setInput, setLength, setMatch, setOffset, setPerLine, setRegexp, setText, validateParams
 
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

FileAppend

public FileAppend(java.lang.String filename,
                  boolean perLine,
                  java.lang.String text)
Append particular text to the end of a file or to each line of a file.

Parameters:
filename - the file to append to
perLine - true if text is to be appended to each line;
false otherwise
text - the text to append
Throws:
java.lang.IllegalArgumentException - if the filename is null

FileAppend

public FileAppend(java.lang.String filename,
                  boolean perLine)
Append text obtained from another activity to the end of a file or to each line of a file.

Parameters:
filename - the file to append to
perLine - true if text is to be appended to each line;
false otherwise
Throws:
java.lang.IllegalArgumentException - if the filename is null