Class DomXmlDataFormatWriter
java.lang.Object
org.operaton.spin.impl.xml.dom.format.DomXmlDataFormatWriter
- All Implemented Interfaces:
DataFormatWriter
A writer for XML DOM.
- Author:
- Daniel Meyer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DomXmlDataFormatprotected Templatesprotected static final DomXmlLoggerprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TransformerReturns a configured transformer to write XML and apply indentation (pretty-print) to the xml.protected TransformerReturns a configured transformer to write XML as is.protected TemplatesReturn aTemplatesinstance for formatting configuration.protected voidsetFormattingTemplates(Templates formattingTemplates) Set theTemplateswhich used for creating the transformer.protected voidwriteResult(StreamResult streamResult, Object input) voidwriteToWriter(Writer writer, Object input) Writes the internal representation, as provided byinputto the suppliedwriteraccording 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:DataFormatWriterWrites the internal representation, as provided byinputto the suppliedwriteraccording to the data format that the implementation belongs to. For example, an XML data format writer writes XML.- Specified by:
writeToWriterin 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 aTemplatesinstance for formatting configuration. Uses the configuredTransformerFactoryfrom theDomXmlDataFormat. Uses the formatting configuration from theDomXmlDataFormatif defined, falls back to a default otherwise.- Returns:
- the templates instance for the formatting configuration.
-
setFormattingTemplates
Set theTemplateswhich 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
-