|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
This activity archives data from other activities producing a GZIP archive and also metadata about the compression.
The activity has one input - the data to be compressed - and two outputs - the compressed data and metadata about the compression. The meta data output has a format analogous to the following example:
<gzipCompressionMetadata>
<checksum type="adler32" value="7615263"/>
</gzipCompressionMetadata>
Field Summary | |
private static int |
COMPRESSED_OUTPUT_INDEX
Index of compressed output. |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private ZIPChecksum |
mChecksumType
GZIP checksum type. |
private static int |
META_DATA_OUTPUT_INDEX
Index of meta data output. |
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
|
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
|
Constructor Summary | |
GZIPCompression()
Constructs a request to GZIP archive data from another activities. |
Method Summary | |
protected java.lang.String |
generateXML()
Generates the XML representing the activity. |
java.lang.String |
getChecksumType()
Gets the checksum type from the activity's meta data output. |
long |
getChecksumValue()
Gets the checksum value from the activity's meta data output. |
ActivityOutput |
getCompressedDataOutput()
Gets the activity's compressed data output. |
ActivityOutput |
getMetaDataOutput()
Gets the activity's meta data output. |
void |
setChecksumType(ZIPChecksum checksumType)
Sets the GZIP checksum type. |
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 |
private static final java.lang.String COPYRIGHT_NOTICE
private static final int COMPRESSED_OUTPUT_INDEX
private static final int META_DATA_OUTPUT_INDEX
private ZIPChecksum mChecksumType
Constructor Detail |
public GZIPCompression()
setInput
should be called to set the activity that
provides input to this activity and
setChecksumType
to set the type of the
checksum. If not then the default of Adler will be used.
Method Detail |
public void setChecksumType(ZIPChecksum checksumType)
checksumType
- The checksum type.
java.lang.IllegalArgumentException
- If type
is null
.public final void setInput(ActivityOutput input)
input
- Output from another activity.
java.lang.IllegalArgumentException
- If input
is null
.public ActivityOutput getCompressedDataOutput()
public ActivityOutput getMetaDataOutput()
public long getChecksumValue() throws NoActivityOutputException, DataFormatException
NoActivityOutputException
- if there is no output data or the data has not yet been
processed to this output or the activity that generates
this output has not yet been executed.
DataFormatException
- if the output from the activity cannot be parsed into a
checksum value.public java.lang.String getChecksumType() throws NoActivityOutputException, DataFormatException
NoActivityOutputException
- if there is no output data or the data has not yet been
processed to this output or the activity that generates
this output has not yet been executed.
DataFormatException
- if the output from the activity cannot be parsed into a
checksum type.protected java.lang.String generateXML()
RequestComponent
generateXML
in class Activity
Activity.generateXML()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |