org.apache.tuscany.sca.databinding.xml
Class SimpleXmlNodeImpl

java.lang.Object
  extended by org.apache.tuscany.sca.databinding.xml.SimpleXmlNodeImpl
All Implemented Interfaces:
XmlNode
Direct Known Subclasses:
BeanXMLStreamReaderImpl.BeanXmlNodeImpl

public class SimpleXmlNodeImpl
extends java.lang.Object
implements XmlNode


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.tuscany.sca.databinding.xml.XmlNode
XmlNode.Type
 
Field Summary
protected  javax.xml.namespace.QName name
           
protected  XmlNode.Type type
           
protected  java.lang.Object value
           
 
Constructor Summary
SimpleXmlNodeImpl(javax.xml.namespace.QName name, java.lang.Object value)
           
SimpleXmlNodeImpl(javax.xml.namespace.QName name, java.lang.Object value, XmlNode.Type type)
           
 
Method Summary
 java.util.List<XmlNode> attributes()
          Returns the attributes of the element as an List.
 java.util.Iterator<XmlNode> children()
          Returns the children of the receiver as an Iterator.
 javax.xml.namespace.QName getName()
          Return the QName of the element.
 XmlNode.Type getType()
          Return the type of the XML node
 java.lang.String getValue()
          Return the text value of the leaf element
 java.util.Map<java.lang.String,java.lang.String> namespaces()
          Returns a map of prefix to namespace URI
 void setType(XmlNode.Type type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected XmlNode.Type type

name

protected javax.xml.namespace.QName name

value

protected java.lang.Object value
Constructor Detail

SimpleXmlNodeImpl

public SimpleXmlNodeImpl(javax.xml.namespace.QName name,
                         java.lang.Object value)

SimpleXmlNodeImpl

public SimpleXmlNodeImpl(javax.xml.namespace.QName name,
                         java.lang.Object value,
                         XmlNode.Type type)
Method Detail

attributes

public java.util.List<XmlNode> attributes()
Description copied from interface: XmlNode
Returns the attributes of the element as an List. Namespace declarations should be excluded.

Specified by:
attributes in interface XmlNode
Returns:
See Also:
XmlNode.attributes()

children

public java.util.Iterator<XmlNode> children()
Description copied from interface: XmlNode
Returns the children of the receiver as an Iterator.

Specified by:
children in interface XmlNode
See Also:
XmlNode.children()

getName

public javax.xml.namespace.QName getName()
Description copied from interface: XmlNode
Return the QName of the element. If it's for a text node, the name is null.

Specified by:
getName in interface XmlNode
Returns:
See Also:
XmlNode.getName()

getValue

public java.lang.String getValue()
Description copied from interface: XmlNode
Return the text value of the leaf element

Specified by:
getValue in interface XmlNode
Returns:
See Also:
XmlNode.getValue()

namespaces

public java.util.Map<java.lang.String,java.lang.String> namespaces()
Description copied from interface: XmlNode
Returns a map of prefix to namespace URI

Specified by:
namespaces in interface XmlNode
Returns:
See Also:
XmlNode.namespaces()

getType

public XmlNode.Type getType()
Description copied from interface: XmlNode
Return the type of the XML node

Specified by:
getType in interface XmlNode
Returns:

setType

public void setType(XmlNode.Type type)