public class MetacardMarshallerImpl extends Object implements MetacardMarshaller
| Modifier and Type | Field and Description |
|---|---|
static String |
OMIT_XML_DECL |
| Constructor and Description |
|---|
MetacardMarshallerImpl(Parser parser,
PrintWriterProvider writerProvider) |
| Modifier and Type | Method and Description |
|---|---|
String |
marshal(Metacard metacard)
|
String |
marshal(Metacard metacard,
Map<String,Serializable> arguments)
|
public static final String OMIT_XML_DECL
public MetacardMarshallerImpl(Parser parser, PrintWriterProvider writerProvider)
public String marshal(Metacard metacard) throws org.xmlpull.v1.XmlPullParserException, IOException, CatalogTransformerException
MetacardMarshallerMetacard into an XML String.
Convenience method that always produces xml string with XML declaration prepended.
marshal in interface MetacardMarshallermetacard - the Metacard instance to transform.org.xmlpull.v1.XmlPullParserExceptionIOExceptionCatalogTransformerExceptionpublic String marshal(Metacard metacard, Map<String,Serializable> arguments) throws org.xmlpull.v1.XmlPullParserException, IOException, CatalogTransformerException
MetacardMarshallerMetacard 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).
marshal in interface MetacardMarshallermetacard - the Metacard instance to transform.arguments - map of arguments.org.xmlpull.v1.XmlPullParserExceptionIOExceptionCatalogTransformerExceptionThis work is licensed under a Creative Commons Attribution 4.0 International License.