|
|||||||||||
| 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.ZIPArchive
This activity archives data from other activities producing a ZIP archive and also metadata about the compression.
The activity has one or more inputs - 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:
<zipArchiveMetadata> <checksum type="adler32" value="7615263"/> </zipArchiveMetadata>
| Field Summary | |
private static int |
ARCHIVED_OUTPUT_INDEXIndex of archived output. |
private static java.lang.String |
COPYRIGHT_NOTICECopyright statement |
private static java.lang.String |
INPUT_NAMEInput name |
private ZIPChecksum |
mChecksumTypeZIP checksum type. |
private java.lang.String |
mCommentUser-understandable comment. |
private static int |
META_DATA_OUTPUT_INDEXIndex of meta data output. |
private int |
mLevelZIP archive level. |
| Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
|
| Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
|
| Constructor Summary | |
ZIPArchive()Constructs a request to ZIP archive data from another activities. |
|
| Method Summary | |
void |
addEntry(ActivityOutput input)Sets the input of this activity to be the output from another activity that will provide the data to be tokenized. |
protected java.lang.String |
generateXML()Generates the XML representing the activity. |
ActivityOutput |
getArchivedDataOutput()Gets the activity's archived data output. |
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 |
getMetaDataOutput()Gets the activity's meta data output. |
void |
setChecksumType(ZIPChecksum checksumType)Sets the ZIP checksum type. |
void |
setComment(java.lang.String comment)Sets the ZIP archive comment. |
void |
setLevel(int level)Sets the ZIP archive level. |
| 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 ARCHIVED_OUTPUT_INDEX
private static final int META_DATA_OUTPUT_INDEX
private static final java.lang.String INPUT_NAME
private java.lang.String mComment
private ZIPChecksum mChecksumType
private int mLevel
| Constructor Detail |
public ZIPArchive()
addEntry should be called to set the activity that provides input to this activity and setChecksumType to set the type of the checksum.
| Method Detail |
public void setChecksumType(ZIPChecksum checksumType)
checksumType - The checksum type.java.lang.IllegalArgumentException - If type is null.public void setComment(java.lang.String comment)
comment - A human-readable comment associated with the archive.java.lang.IllegalArgumentException - If the comment is null or greater than 0xFFFF in length.public void setLevel(int level)
level - The level of compression where 0 is the minimum and 9 the maximum.java.lang.IllegalArgumentException - If level is < 0 or > 9.public void addEntry(ActivityOutput input)
input - Output from another activity.java.lang.IllegalArgumentException - If input is null.public ActivityOutput getArchivedDataOutput()
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()
RequestComponentgenerateXML in class ActivityActivity.generateXML()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||