Activity - zipArchive
Activity Type: Transformation
Description
Archive and compress the data output from other activities, using the
ZIP compression format.
Example
<zipArchive name="transform">
<comment>
This archive contains my data.
</comment>
<settings checksum="adler32" level="9"/>
<zipEntry from="statementOutput1"/>
<zipEntry from="statementOutput2"/>
<zipEntry from="statementOutput3"/>
<archivedOutput name="myArchivedOutput"/>
<metadataOutput name="myMetadataOutput" />
</zipArchive>
Specification
Element zipArchive:
-
Attribute name - unique name for the
activity within the scope of a request.
-
Element comment (zero or one) -
contains a human-readable comment for the archive.
-
There is a length restriction of 65,535 bytes on this comment
(corresponding to a character limit dependent on the character
encoding).
-
Element settings (optional) - the
control settings for the archive.
-
Attribute checksum - the type of checksum
generate for the compressed data. The checksum can be used for
validation purposes. Legal values of the attribute are:
- adler32 - Adler32 checksum (faster).
- crc32 - CRC32 checksum.
-
Attribute level - level of compression. Only
applicable if deflated archiving method is
selected. Legal values of the attribute are:
-
0 - minimum compression (fastest performance
but largest archive)
- TO
-
9 - maximum
compression (slowest performance but smallest archive).
-
Element zipEntry (one or more) -
data to archive.
-
The data is contained within the element.
-
OR
-
Attribute from - input stream providing the
data.
-
archivedOutput (required) - output
stream for the archived data (bytes).
-
Attribute name - name of this output
stream.
-
metaDataOutput (required) - output
stream for archive meta-data (XML data including the archive type and
the checksum).
-
Attribute name - name of this output
stream.
Input and Output Types
- Input: input - byte[] or java.lang.String or org.w3c.dom.Node
- Output: archivedOutput - byte[]
- Output: metaDataOutput - java.lang.String (XML)
Example:
<zipArchiveMetadata>
<checksum type="adler32" value="1335487260"/>
</zipArchiveMetadata>
Data Resource Accessor
This activity can operate with any data resource accessor.
XML Schema
OGSA-DAI/schema/ogsadai/xsd/activities/zip_archive.xsd
Class
uk.org.ogsadai.activity.transform.ZIPArchiveActivity
Client Toolkit Class
uk.org.ogsadai.client.toolkit.activity.transform.ZIPArchive