Class DomXmlDataFormatWriter
java.lang.Object
org.camunda.spin.impl.xml.dom.format.DomXmlDataFormatWriter
- All Implemented Interfaces:
DataFormatWriter
A writer for XML DOM.
- Author:
- Daniel Meyer
-
Field Summary
Modifier and TypeFieldDescriptionprotected DomXmlDataFormat
protected Templates
protected static final DomXmlLogger
protected static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Transformer
Returns a configured transformer to write XML and apply indentation (pretty-print) to the xml.protected Transformer
Returns a configured transformer to write XML as is.protected Templates
Return aTemplates
instance for formatting configuration.protected void
setFormattingTemplates
(Templates formattingTemplates) Set theTemplates
which used for creating the transformer.protected void
writeResult
(StreamResult streamResult, Object input) void
writeToWriter
(Writer writer, Object input) Writes the internal representation, as provided byinput
to the suppliedwriter
according to the data format that the implementation belongs to.
-
Field Details
-
LOG
-
STRIP_SPACE_XSL
- See Also:
-
domXmlDataFormat
-
formattingTemplates
-
-
Constructor Details
-
DomXmlDataFormatWriter
-
-
Method Details
-
writeToWriter
Description copied from interface:DataFormatWriter
Writes the internal representation, as provided byinput
to the suppliedwriter
according to the data format that the implementation belongs to. For example, an XML data format writer writes XML.- Specified by:
writeToWriter
in interfaceDataFormatWriter
- Parameters:
writer
- The writer to write the output toinput
- The object to write. Can be safely cast to the internal format of the data format.
-
writeResult
-
reloadFormattingTemplates
Return aTemplates
instance for formatting configuration. Uses the configuredTransformerFactory
from theDomXmlDataFormat
. Uses the formatting configuration from theDomXmlDataFormat
if defined, falls back to a default otherwise.- Returns:
- the templates instance for the formatting configuration.
-
setFormattingTemplates
Set theTemplates
which used for creating the transformer.- Parameters:
formattingTemplates
-
-
getFormattingTransformer
Returns a configured transformer to write XML and apply indentation (pretty-print) to the xml.- Returns:
- the XML configured transformer
- Throws:
SpinXmlElementException
- if no new transformer can be created
-
getTransformer
Returns a configured transformer to write XML as is.- Returns:
- the XML configured transformer
- Throws:
SpinXmlElementException
- if no new transformer can be created
-