Class KMLTransformerImpl

java.lang.Object
org.codice.ddf.spatial.kml.transformer.KMLTransformerImpl
All Implemented Interfaces:
ddf.catalog.transform.MetacardTransformer, ddf.catalog.transform.QueryResponseTransformer, KMLTransformer

public class KMLTransformerImpl extends Object implements KMLTransformer
The base Transformer for handling KML requests to take a Metacard or SourceResponse and produce a KML representation. This service attempts to first locate a
invalid reference
KMLEntryTransformer
for a given Metacard based on the metadata-content-type. If no
invalid reference
KMLEntryTransformer
can be found, the default transformation is performed.
Author:
Ashraf Barakat, Ian Barnett, Keith C Wire
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.osgi.framework.BundleContext
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    KMLTransformerImpl(org.osgi.framework.BundleContext bundleContext, String defaultStylingName, KmlStyleMap mapper, ddf.action.ActionProvider actionProvider, KmlMarshaller kmlMarshaller)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected de.micromata.opengis.kml.v_2_2_0.Placemark
    performDefaultTransformation(ddf.catalog.data.Metacard entry)
    The default Transformation from a Metacard to a KML Placemark.
    ddf.catalog.data.BinaryContent
    transform(ddf.catalog.data.Metacard metacard, Map<String,Serializable> arguments)
     
    ddf.catalog.data.BinaryContent
    transform(ddf.catalog.operation.SourceResponse upstreamResponse, Map<String,Serializable> arguments)
     
    de.micromata.opengis.kml.v_2_2_0.Placemark
    transformEntry(Subject user, ddf.catalog.data.Metacard entry, Map<String,Serializable> arguments)
    This will return a KML Placemark (i.e. there are no kml tags) <KML> ---> not included <Placemark> ---> What is returned from this method ... ---> What is returned from this method </Placemark> ---> What is returned from this method </KML> ---> not included

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • context

      protected org.osgi.framework.BundleContext context
  • Constructor Details

    • KMLTransformerImpl

      public KMLTransformerImpl(org.osgi.framework.BundleContext bundleContext, String defaultStylingName, KmlStyleMap mapper, ddf.action.ActionProvider actionProvider, KmlMarshaller kmlMarshaller)
  • Method Details

    • transformEntry

      public de.micromata.opengis.kml.v_2_2_0.Placemark transformEntry(Subject user, ddf.catalog.data.Metacard entry, Map<String,Serializable> arguments) throws ddf.catalog.transform.CatalogTransformerException
      This will return a KML Placemark (i.e. there are no kml tags) <KML> ---> not included <Placemark> ---> What is returned from this method ... ---> What is returned from this method </Placemark> ---> What is returned from this method </KML> ---> not included
      Specified by:
      transformEntry in interface KMLTransformer
      Parameters:
      user -
      entry - - the Metacard to be transformed
      arguments - - additional arguments to assist in the transformation
      Returns:
      Placemark - kml object containing transformed content
      Throws:
      ddf.catalog.transform.CatalogTransformerException
    • performDefaultTransformation

      protected de.micromata.opengis.kml.v_2_2_0.Placemark performDefaultTransformation(ddf.catalog.data.Metacard entry) throws ddf.catalog.transform.CatalogTransformerException
      The default Transformation from a Metacard to a KML Placemark. Protected to easily allow other default transformations.
      Parameters:
      entry - - the Metacard to transform.
      urlToMetacard -
      Returns:
      Throws:
      TransformerException
      ddf.catalog.transform.CatalogTransformerException
    • transform

      public ddf.catalog.data.BinaryContent transform(ddf.catalog.data.Metacard metacard, Map<String,Serializable> arguments) throws ddf.catalog.transform.CatalogTransformerException
      Specified by:
      transform in interface ddf.catalog.transform.MetacardTransformer
      Throws:
      ddf.catalog.transform.CatalogTransformerException
    • transform

      public ddf.catalog.data.BinaryContent transform(ddf.catalog.operation.SourceResponse upstreamResponse, Map<String,Serializable> arguments) throws ddf.catalog.transform.CatalogTransformerException
      Specified by:
      transform in interface ddf.catalog.transform.QueryResponseTransformer
      Throws:
      ddf.catalog.transform.CatalogTransformerException