public class KMLTransformerImpl extends Object implements KMLTransformer
Metacard
or SourceResponse
and produce a KML representation. This service attempts to first locate a KMLEntryTransformer
for a given Metacard
based on the metadata-content-type. If no
KMLEntryTransformer
can be found, the default transformation is performed.Modifier and Type | Field and Description |
---|---|
protected org.osgi.framework.BundleContext |
context |
protected static MimeType |
KML_MIMETYPE |
Constructor and Description |
---|
KMLTransformerImpl(org.osgi.framework.BundleContext bundleContext,
String defaultStylingName,
KmlStyleMap mapper,
ActionProvider actionProvider) |
Modifier and Type | Method and Description |
---|---|
static de.micromata.opengis.kml.v_2_2_0.Document |
encloseDoc(de.micromata.opengis.kml.v_2_2_0.Placemark placemark,
de.micromata.opengis.kml.v_2_2_0.Style style,
String documentId,
String docName)
Encapsulate the kml content (placemarks, etc.) with a style in a KML Document element If either
content or style are null, they will be in the resulting Document
|
static de.micromata.opengis.kml.v_2_2_0.Kml |
encloseKml(de.micromata.opengis.kml.v_2_2_0.Document doc,
String docId,
String docName)
Wrap KML document with the opening and closing kml tags
|
protected de.micromata.opengis.kml.v_2_2_0.Placemark |
performDefaultTransformation(Metacard entry,
String url)
The default Transformation from a
Metacard to a KML Placemark . |
BinaryContent |
transform(Metacard metacard,
Map<String,Serializable> arguments)
Transforms the provided
Metacard into a BinaryContent |
BinaryContent |
transform(SourceResponse upstreamResponse,
Map<String,Serializable> arguments)
Transforms the list of results into the
BinaryContent . |
de.micromata.opengis.kml.v_2_2_0.Placemark |
transformEntry(Subject user,
Metacard entry,
Map<String,Serializable> arguments)
This will return a KML Placemark (i.e.
|
protected static final MimeType KML_MIMETYPE
protected org.osgi.framework.BundleContext context
public KMLTransformerImpl(org.osgi.framework.BundleContext bundleContext, String defaultStylingName, KmlStyleMap mapper, ActionProvider actionProvider)
public static de.micromata.opengis.kml.v_2_2_0.Document encloseDoc(de.micromata.opengis.kml.v_2_2_0.Placemark placemark, de.micromata.opengis.kml.v_2_2_0.Style style, String documentId, String docName) throws IllegalArgumentException
kml
- style
- documentId
- which should be the metacard idIllegalArgumentException
public static de.micromata.opengis.kml.v_2_2_0.Kml encloseKml(de.micromata.opengis.kml.v_2_2_0.Document doc, String docId, String docName)
document
- folderId
- which should be the subscription id if it existspublic de.micromata.opengis.kml.v_2_2_0.Placemark transformEntry(Subject user, Metacard entry, Map<String,Serializable> arguments) throws CatalogTransformerException
<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
transformEntry
in interface KMLTransformer
user
- entry
- - the Metacard
to be transformedarguments
- - additional arguments to assist in the transformationCatalogTransformerException
protected de.micromata.opengis.kml.v_2_2_0.Placemark performDefaultTransformation(Metacard entry, String url) throws CatalogTransformerException
Metacard
to a KML Placemark
. Protected to
easily allow other default transformations.entry
- - the Metacard
to transform.urlToMetacard
- TransformerException
CatalogTransformerException
public BinaryContent transform(Metacard metacard, Map<String,Serializable> arguments) throws CatalogTransformerException
MetacardTransformer
Metacard
into a BinaryContent
transform
in interface MetacardTransformer
metacard
- the Metacard
to be transformedarguments
- any arguments to be used in the transformation. Keys are specific to each
MetacardTransformer
implementationBinaryContent
the result of the Metacard
transformationCatalogTransformerException
- if the Metacard
can not be transformedpublic BinaryContent transform(SourceResponse upstreamResponse, Map<String,Serializable> arguments) throws CatalogTransformerException
QueryResponseTransformer
BinaryContent
.transform
in interface QueryResponseTransformer
arguments
- the arguments that may be used to execute the transformCatalogTransformerException
- if the response cannot be transformedThis work is licensed under a Creative Commons Attribution 4.0 International License.