Package org.camunda.spin.xml
Class SpinXmlNode<T extends SpinXmlNode<?>>
java.lang.Object
org.camunda.spin.Spin<T>
org.camunda.spin.xml.SpinXmlNode<T>
- Direct Known Subclasses:
- SpinXmlAttribute,- SpinXmlElement
An element in a tree-oriented XML data format.
- Author:
- Sebastian Menski, Daniel Meyer
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract booleanhasNamespace(String namespace) Checks if the node has a given namespace.abstract booleanChecks if the node has a given prefix.abstract <C> CMaps XML into specific classabstract <C> CMaps Xml into specific classabstract Stringname()Returns the local name of the node without namespace or prefix.abstract StringReturns the namespace uri of the node and not the prefix.abstract Stringprefix()Returns the prefix of the node and not the namespace uri.Methods inherited from class org.camunda.spin.SpingetDataFormatName, JSON, S, S, S, toString, unwrap, writeToWriter, XML
- 
Constructor Details- 
SpinXmlNodepublic SpinXmlNode()
 
- 
- 
Method Details- 
nameReturns the local name of the node without namespace or prefix.- Returns:
- the name of the node
 
- 
namespaceReturns the namespace uri of the node and not the prefix.- Returns:
- the namespace of the node
 
- 
prefixReturns the prefix of the node and not the namespace uri.- Returns:
- the prefix of the node
 
- 
hasPrefixChecks if the node has a given prefix.- Parameters:
- prefix- the prefix to check
- Returns:
- true if the name has the same prefix
 
- 
hasNamespaceChecks if the node has a given namespace.- Parameters:
- namespace- the namespace to check
- Returns:
- true if the node has the same namespace
 
- 
mapToMaps XML into specific class- Specified by:
- mapToin class- Spin<T extends SpinXmlNode<?>>
- Parameters:
- type- Class to which the Xml should be mapped
- Returns:
- mapped Class
- Throws:
- SpinDataFormatException- in case the input cannot be mapped to class for several reasons
 
- 
mapToMaps Xml into specific class- Specified by:
- mapToin class- Spin<T extends SpinXmlNode<?>>
- Parameters:
- canonicalName- canonical name of the class
- Returns:
- mapped class
- Throws:
- SpinDataFormatException- in case the input cannot be mapped to class for several reasons
 
 
-