Class ZipCompression

java.lang.Object
org.codice.ddf.catalog.transformer.zip.ZipCompression
All Implemented Interfaces:
ddf.catalog.transform.QueryResponseTransformer

public class ZipCompression extends Object implements ddf.catalog.transform.QueryResponseTransformer
  • Constructor Details

    • ZipCompression

      public ZipCompression(org.osgi.framework.BundleContext bundleContext, List<org.osgi.framework.ServiceReference> metacardTransformers)
  • Method Details

    • transform

      public ddf.catalog.data.BinaryContent transform(ddf.catalog.operation.SourceResponse sourceResponse, Map<String,Serializable> arguments) throws ddf.catalog.transform.CatalogTransformerException
      Transforms a SourceResponse with a list of Metacards into a BinaryContent item with an InputStream. This transformation expects a key-value pair "fileName"-zipFileName to be present.
      Specified by:
      transform in interface ddf.catalog.transform.QueryResponseTransformer
      Parameters:
      sourceResponse - - a SourceResponse with a list of Metacards to compress
      arguments - - a map of arguments to use for processing. This method expects "fileName" to be set
      Returns:
      - a BinaryContent item with the InputStream for the Zip file
      Throws:
      ddf.catalog.transform.CatalogTransformerException - when the transformation fails