uk.org.ogsadai.client.toolkit.activity.transform
Class BytesToTempFile

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.activity.RequestComponent
        |
        +--uk.org.ogsadai.client.toolkit.activity.Activity
              |
              +--uk.org.ogsadai.client.toolkit.activity.transform.BytesToTempFile

public class BytesToTempFile
extends Activity

This activity takes an stream of byte arrays and writes them to a temporary file on the server. A reference to this file is written to the output.

This activity is useful when writing BLOBs to relational databases. The output of this activity can be passed to one of the parameterized inputs of the SQLUpdateStatement activity in order to write BLOBS to a database.

The activity has a one input. This input passed blocks of type byte[]. The bytes in the input blocks will be written to the temporary file in the order in which they are received.

The activity has one output to which the java.io.File object that refers to the temporary file.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
 
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity
 
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent
 
Constructor Summary
BytesToTempFile(ActivityOutput input)
          Constructs the activity.
 
Method Summary
protected  java.lang.String generateXML()
          Generates the XML representing the activity.
 ActivityOutput getOutput()
          Gets the activity's only output.
 void setInput(ActivityOutput input)
          Sets the input of this activity to be the output from another activity that will provide the data to be aggregated.
 
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.Activity
addInput, addOutput, addOutputs, getDataResourceID, getInputParameters, getOutputParameters, getOutputs, replaceSpecialCharacters, setDataResourceID, setInput
 
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent
getDataService, getName, getSession, setDataService, setSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values
Constructor Detail

BytesToTempFile

public BytesToTempFile(ActivityOutput input)
Constructs the activity.

Parameters:
input - Output from another activity that will provide input to this activity.
Throws:
java.lang.IllegalArgumentException - If argument is null.
Method Detail

getOutput

public ActivityOutput getOutput()
Gets the activity's only output.

Returns:
the activity output

setInput

public final void setInput(ActivityOutput input)
Sets the input of this activity to be the output from another activity that will provide the data to be aggregated.

Parameters:
input - Output from another activity.
Throws:
java.lang.IllegalArgumentException - If the argument is null.

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