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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDomXmlAttribute(Attr attributeNode, DomXmlDataFormat dataFormat) Create a new wrapper. -
Method Summary
Modifier and TypeMethodDescriptionProvides the name of the dataformat used by this spin.booleanhasNamespace(String namespace) Checks if the node has a given namespace.booleanChecks if the node has a given prefix.<C> CMaps XML into specific class<C> CMaps 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.voidwriteToWriter(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:SpinProvides the name of the dataformat used by this spin.- Specified by:
getDataFormatNamein classSpin<SpinXmlAttribute>- Returns:
- the name of the dataformat used by this Spin.
-
unwrap
Description copied from class:SpinReturn the wrapped object. The return type of this method depends on the concrete data format.- Specified by:
unwrapin classSpin<SpinXmlAttribute>- Returns:
- the object wrapped by this wrapper.
-
name
Description copied from class:SpinXmlNodeReturns the local name of the node without namespace or prefix.- Specified by:
namein classSpinXmlNode<SpinXmlAttribute>- Returns:
- the name of the node
-
namespace
Description copied from class:SpinXmlNodeReturns the namespace uri of the node and not the prefix.- Specified by:
namespacein classSpinXmlNode<SpinXmlAttribute>- Returns:
- the namespace of the node
-
prefix
Description copied from class:SpinXmlNodeReturns the prefix of the node and not the namespace uri.- Specified by:
prefixin classSpinXmlNode<SpinXmlAttribute>- Returns:
- the prefix of the node
-
hasPrefix
Description copied from class:SpinXmlNodeChecks if the node has a given prefix.- Specified by:
hasPrefixin classSpinXmlNode<SpinXmlAttribute>- Parameters:
prefix- the prefix to check- Returns:
- true if the name has the same prefix
-
hasNamespace
Description copied from class:SpinXmlNodeChecks if the node has a given namespace.- Specified by:
hasNamespacein classSpinXmlNode<SpinXmlAttribute>- Parameters:
namespace- the namespace to check- Returns:
- true if the node has the same namespace
-
value
Description copied from class:SpinXmlAttributeReturns the value of the attribute asString.- Specified by:
valuein classSpinXmlAttribute- Returns:
- the string value of the attribute
-
value
Description copied from class:SpinXmlAttributeSets the value of the attribute.- Specified by:
valuein classSpinXmlAttribute- Parameters:
value- the value to set- Returns:
- the wrapped xml dom attribute
-
remove
Description copied from class:SpinXmlAttributeRemoves the attribute.- Specified by:
removein classSpinXmlAttribute- Returns:
- the wrapped owner
tree element
-
toString
Description copied from class:SpinXmlAttributeReturns the wrapped XML attribute value as string representation.- Specified by:
toStringin classSpinXmlAttribute- Returns:
- the string representation
-
writeToWriter
Description copied from class:SpinXmlAttributeWrites the wrapped XML attribute value to an existing writer.- Specified by:
writeToWriterin classSpinXmlAttribute- Parameters:
writer- the writer to write to
-
mapTo
Description copied from class:SpinXmlNodeMaps XML into specific class- Specified by:
mapToin classSpinXmlNode<SpinXmlAttribute>- Parameters:
javaClass- Class to which the Xml should be mapped- Returns:
- mapped Class
-
mapTo
Description copied from class:SpinXmlNodeMaps Xml into specific class- Specified by:
mapToin classSpinXmlNode<SpinXmlAttribute>- Parameters:
javaClass- canonical name of the class- Returns:
- mapped class
-