Class DomXmlDataFormat
java.lang.Object
org.camunda.bpm.client.variable.impl.format.xml.DomXmlDataFormat
- All Implemented Interfaces:
DataFormat
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DocumentBuilderFactory
the DocumentBuilderFactory used by the readerprotected static final DomXmlLogger
protected String
protected TransformerFactory
the TransformerFactory instance used by the writer -
Constructor Summary
ConstructorsConstructorDescriptionDomXmlDataFormat
(String name) DomXmlDataFormat
(String name, DocumentBuilderFactory documentBuilderFactory) DomXmlDataFormat
(String name, DocumentBuilderFactory documentBuilderFactory, TransformerFactory transformerFactory) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if this data format can map the provided Java Object.protected javax.xml.bind.Marshaller
createMarshaller
(Class<?>... types) protected javax.xml.bind.Unmarshaller
createUnmarshaller
(Class<?>... types) static DocumentBuilderFactory
static TransformerFactory
getCanonicalTypeName
(Object value) Returns a data-format-specific canonical type name.protected javax.xml.bind.JAXBContext
getContext
(Class<?>... types) protected DocumentBuilder
getName()
Returns the data format name.protected Transformer
static Class<?>
loadClass
(String classname, DataFormat dataFormat) readAsElement
(String value) <T> T
Reads the internal representation of a data format to a java object of the desired class.<T> T
Reads the internal representation of a data format to a java object of the desired class.protected Element
writeAsElement
(Object value) protected void
writeResult
(StreamResult streamResult, Object input) writeValue
(Object value) Writes a java object to a data format's internal data representation.
-
Field Details
-
LOG
-
name
-
documentBuilderFactory
the DocumentBuilderFactory used by the reader -
transformerFactory
the TransformerFactory instance used by the writer
-
-
Constructor Details
-
DomXmlDataFormat
-
DomXmlDataFormat
-
DomXmlDataFormat
public DomXmlDataFormat(String name, DocumentBuilderFactory documentBuilderFactory, TransformerFactory transformerFactory)
-
-
Method Details
-
getName
Description copied from interface:DataFormat
Returns the data format name.- Specified by:
getName
in interfaceDataFormat
-
getDocumentBuilderFactory
-
getTransformerFactory
-
canMap
Description copied from interface:DataFormat
Returns true if this data format can map the provided Java Object.- Specified by:
canMap
in interfaceDataFormat
- Returns:
- true if this object can be mapped.
-
writeValue
Description copied from interface:DataFormat
Writes a java object to a data format's internal data representation.- Specified by:
writeValue
in interfaceDataFormat
- Parameters:
value
- object that is written into internal data representation- Returns:
- the data format's internal representation of that object
-
readValue
Description copied from interface:DataFormat
Reads the internal representation of a data format to a java object of the desired class.- Specified by:
readValue
in interfaceDataFormat
- Parameters:
value
- the object to be readtypeIdentifier
- the class to map the object to- Returns:
- a java object of the specified class that was populated with the input parameter
-
readValue
Description copied from interface:DataFormat
Reads the internal representation of a data format to a java object of the desired class.- Specified by:
readValue
in interfaceDataFormat
- Parameters:
value
- the object to be readcls
- a data-format-specific type identifier that describes the class to map to- Returns:
- a java object of the specified class that was populated with the input parameter
-
getCanonicalTypeName
Description copied from interface:DataFormat
Returns a data-format-specific canonical type name.- Specified by:
getCanonicalTypeName
in interfaceDataFormat
-
writeResult
-
writeAsElement
-
getTransformer
-
readAsElement
-
getDocumentBuilder
-
getContext
-
createMarshaller
-
createUnmarshaller
-
defaultTransformerFactory
-
defaultDocumentBuilderFactory
-
loadClass
-