Interface MetacardMarshaller

All Known Implementing Classes:
MetacardMarshallerImpl

public interface MetacardMarshaller
MetacardMarshaller transforms a Metacard to a StringWriter.
  • Method Summary

    Modifier and Type
    Method
    Description
    marshal(ddf.catalog.data.Metacard metacard)
    Transform a Metacard into an XML String.
    marshal(ddf.catalog.data.Metacard metacard, Map<String,Serializable> arguments)
    Transform a Metacard into an XML String.
  • Method Details

    • marshal

      String marshal(ddf.catalog.data.Metacard metacard) throws org.xmlpull.v1.XmlPullParserException, IOException, ddf.catalog.transform.CatalogTransformerException
      Transform a Metacard into an XML String.

      Convenience method that always produces xml string with XML declaration prepended.

      Parameters:
      metacard - the Metacard instance to transform.
      Returns:
      String
      Throws:
      org.xmlpull.v1.XmlPullParserException
      IOException
      ddf.catalog.transform.CatalogTransformerException
    • marshal

      String marshal(ddf.catalog.data.Metacard metacard, Map<String,Serializable> arguments) throws org.xmlpull.v1.XmlPullParserException, IOException, ddf.catalog.transform.CatalogTransformerException
      Transform a Metacard into an XML String.

      Use the map of arguments to configure the xml output. For example, to turn off the XML declaration, do arguments.put("OMIT_XML_DECLARATION", Boolean.TRUE).

      Parameters:
      metacard - the Metacard instance to transform.
      arguments - map of arguments.
      Returns:
      String
      Throws:
      org.xmlpull.v1.XmlPullParserException
      IOException
      ddf.catalog.transform.CatalogTransformerException