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

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

public class GZIPCompression
extends Activity

This activity compresses data from another activity producing the data in GZIPped form and also metadata about the compression.

It has one input and two outputs. The meta data output has a format analogous to the following example: <gzipCompressionMetadata> <checksum type="adler32" value="7615263"/> </gzipCompressionMetadata>

Author:
The OGSA-DAI Project Team

Constructor Summary
GZIPCompression()
          Constructs a request to compress GZIP data from another activity.
 
Method Summary
protected  java.lang.String generateXML()
          Generates the XML representing the activity.
 java.lang.String getChecksumType()
          Get the checksum type.
 long getChecksumValue()
          Get the checksum value.
 ActivityOutput getCompressedDataOutput()
          Gets the activity's compressed data output.
 ActivityOutput getMetaDataOutput()
          Gets the activity's meta data output.
 void setChecksumType(ZIPChecksum checksumType)
          Set the GZIP checksum type.
 void setInput(ActivityOutput input)
          Sets the name of the output that will provide the specified input to 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

GZIPCompression

public GZIPCompression()
Constructs a request to compress GZIP data from another activity.

Method Detail

setChecksumType

public void setChecksumType(ZIPChecksum checksumType)
Set the GZIP checksum type.

Parameters:
checksumType -
Throws:
java.lang.IllegalArgumentException - If type is null.

getChecksumValue

public long getChecksumValue()
                      throws ActivityOutputException,
                             DataFormatException
Get the checksum value.

Returns:
checksum value.
Throws:
DataFormatException - If the output data is not in the expected format.
ActivityOutputException - If there is no output data.

getChecksumType

public java.lang.String getChecksumType()
                                 throws ActivityOutputException,
                                        DataFormatException
Get the checksum type.

Returns:
checksum type.
Throws:
DataFormatException - If the output data is not in the expected format.
ActivityOutputException - If there is no output data.

setInput

public void setInput(ActivityOutput input)
Sets the name of the output that will provide the specified input to this activity.

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

getCompressedDataOutput

public ActivityOutput getCompressedDataOutput()
Gets the activity's compressed data output.

Returns:
the compressed data output.

getMetaDataOutput

public ActivityOutput getMetaDataOutput()
Gets the activity's meta data output.

Returns:
the meta data output.

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
See Also:
Activity.generateXML()