Package org.camunda.spin.impl.xml.dom
Class DomXmlAttribute
java.lang.Object
org.camunda.spin.Spin<T>
org.camunda.spin.xml.SpinXmlNode<SpinXmlAttribute>
org.camunda.spin.xml.SpinXmlAttribute
org.camunda.spin.impl.xml.dom.DomXmlAttribute
Wrapper of a xml dom attribute.
- Author:
- Sebastian Menski
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDomXmlAttribute
(Attr attributeNode, DomXmlDataFormat dataFormat) Create a new wrapper. -
Method Summary
Modifier and TypeMethodDescriptionProvides the name of the dataformat used by this spin.boolean
hasNamespace
(String namespace) Checks if the node has a given namespace.boolean
Checks if the node has a given prefix.<C> C
Maps XML into specific class<C> C
Maps Xml into specific classname()
Returns the local name of the node without namespace or prefix.Returns the namespace uri of the node and not the prefix.prefix()
Returns the prefix of the node and not the namespace uri.remove()
Removes the attribute.toString()
Returns the wrapped XML attribute value as string representation.unwrap()
Return the wrapped object.value()
Returns the value of the attribute asString
.Sets the value of the attribute.void
writeToWriter
(Writer writer) Writes the wrapped XML attribute value to an existing writer.
-
Field Details
-
attributeNode
-
dataFormat
-
-
Constructor Details
-
DomXmlAttribute
Create a new wrapper.- Parameters:
attributeNode
- the dom xml attribute to wrapdataFormat
- the xml dom data format
-
-
Method Details
-
getDataFormatName
Description copied from class:Spin
Provides the name of the dataformat used by this spin.- Specified by:
getDataFormatName
in classSpin<SpinXmlAttribute>
- Returns:
- the name of the dataformat used by this Spin.
-
unwrap
Description copied from class:Spin
Return the wrapped object. The return type of this method depends on the concrete data format.- Specified by:
unwrap
in classSpin<SpinXmlAttribute>
- Returns:
- the object wrapped by this wrapper.
-
name
Description copied from class:SpinXmlNode
Returns the local name of the node without namespace or prefix.- Specified by:
name
in classSpinXmlNode<SpinXmlAttribute>
- Returns:
- the name of the node
-
namespace
Description copied from class:SpinXmlNode
Returns the namespace uri of the node and not the prefix.- Specified by:
namespace
in classSpinXmlNode<SpinXmlAttribute>
- Returns:
- the namespace of the node
-
prefix
Description copied from class:SpinXmlNode
Returns the prefix of the node and not the namespace uri.- Specified by:
prefix
in classSpinXmlNode<SpinXmlAttribute>
- Returns:
- the prefix of the node
-
hasPrefix
Description copied from class:SpinXmlNode
Checks if the node has a given prefix.- Specified by:
hasPrefix
in classSpinXmlNode<SpinXmlAttribute>
- Parameters:
prefix
- the prefix to check- Returns:
- true if the name has the same prefix
-
hasNamespace
Description copied from class:SpinXmlNode
Checks if the node has a given namespace.- Specified by:
hasNamespace
in classSpinXmlNode<SpinXmlAttribute>
- Parameters:
namespace
- the namespace to check- Returns:
- true if the node has the same namespace
-
value
Description copied from class:SpinXmlAttribute
Returns the value of the attribute asString
.- Specified by:
value
in classSpinXmlAttribute
- Returns:
- the string value of the attribute
-
value
Description copied from class:SpinXmlAttribute
Sets the value of the attribute.- Specified by:
value
in classSpinXmlAttribute
- Parameters:
value
- the value to set- Returns:
- the wrapped xml dom attribute
-
remove
Description copied from class:SpinXmlAttribute
Removes the attribute.- Specified by:
remove
in classSpinXmlAttribute
- Returns:
- the wrapped owner
tree element
-
toString
Description copied from class:SpinXmlAttribute
Returns the wrapped XML attribute value as string representation.- Specified by:
toString
in classSpinXmlAttribute
- Returns:
- the string representation
-
writeToWriter
Description copied from class:SpinXmlAttribute
Writes the wrapped XML attribute value to an existing writer.- Specified by:
writeToWriter
in classSpinXmlAttribute
- Parameters:
writer
- the writer to write to
-
mapTo
Description copied from class:SpinXmlNode
Maps XML into specific class- Specified by:
mapTo
in classSpinXmlNode<SpinXmlAttribute>
- Parameters:
javaClass
- Class to which the Xml should be mapped- Returns:
- mapped Class
-
mapTo
Description copied from class:SpinXmlNode
Maps Xml into specific class- Specified by:
mapTo
in classSpinXmlNode<SpinXmlAttribute>
- Parameters:
javaClass
- canonical name of the class- Returns:
- mapped class
-