org.apache.axis2.saaj
Class SOAPElementImpl

java.lang.Object
  extended by org.apache.axiom.om.impl.dom.NodeImpl
      extended by org.apache.axis2.saaj.NodeImplEx
          extended by org.apache.axis2.saaj.SOAPElementImpl
All Implemented Interfaces:
java.lang.Cloneable, javax.xml.soap.SOAPElement, org.apache.axiom.om.impl.OMNodeEx, org.apache.axiom.om.OMNode, org.apache.axiom.om.OMSerializable, org.w3c.dom.Element, org.w3c.dom.Node, org.w3c.dom.NodeList
Direct Known Subclasses:
DetailEntryImpl, SOAPBodyElementImpl, SOAPBodyImpl, SOAPEnvelopeImpl, SOAPFaultElementImpl, SOAPHeaderElementImpl, SOAPHeaderImpl

public class SOAPElementImpl
extends NodeImplEx
implements javax.xml.soap.SOAPElement


Field Summary
protected  org.apache.axiom.om.impl.dom.ElementImpl element
          Using a delegate because we can't extend from org.apache.axiom.om.impl.dom.ElementImpl since this class must extend SNodeImpl
 
Fields inherited from class org.apache.axis2.saaj.NodeImplEx
parentElement
 
Fields inherited from class org.apache.axiom.om.impl.dom.NodeImpl
builder, done, factory, FIRSTCHILD, flags, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Fields inherited from interface org.apache.axiom.om.OMNode
DTD_NODE, PI_NODE, SPACE_NODE
 
Constructor Summary
SOAPElementImpl(org.apache.axiom.om.impl.dom.ElementImpl element)
           
 
Method Summary
 javax.xml.soap.SOAPElement addAttribute(javax.xml.soap.Name name, java.lang.String value)
          Adds an attribute with the specified name and value to this SOAPElement object.
 javax.xml.soap.SOAPElement addAttribute(javax.xml.namespace.QName qname, java.lang.String value)
           
 javax.xml.soap.SOAPElement addChildElement(javax.xml.soap.Name name)
           
 javax.xml.soap.SOAPElement addChildElement(javax.xml.namespace.QName qname)
           
 javax.xml.soap.SOAPElement addChildElement(javax.xml.soap.SOAPElement soapElement)
           
 javax.xml.soap.SOAPElement addChildElement(java.lang.String localName)
           
 javax.xml.soap.SOAPElement addChildElement(java.lang.String localName, java.lang.String prefix)
           
 javax.xml.soap.SOAPElement addChildElement(java.lang.String localName, java.lang.String prefix, java.lang.String uri)
           
 javax.xml.soap.SOAPElement addNamespaceDeclaration(java.lang.String prefix, java.lang.String uri)
           
 javax.xml.soap.SOAPElement addTextNode(java.lang.String text)
          Creates a new Text object initialized with the given String and adds it to this SOAPElement object.
 org.w3c.dom.Node appendChild(org.w3c.dom.Node child)
           
protected  org.w3c.dom.Element appendElement(org.apache.axiom.om.impl.dom.ElementImpl child)
           
protected  org.w3c.dom.Text appendText(org.w3c.dom.Text child)
           
protected  java.lang.Object clone()
           
protected  void copyContents(SOAPElementImpl childEle, org.w3c.dom.Node child)
           
 javax.xml.namespace.QName createQName(java.lang.String localName, java.lang.String prefix)
          Creates a QName whose namespace URI is the one associated with the parameter, prefix, in the context of this SOAPElement.
 org.apache.axiom.om.OMNode detach()
           
 void detachNode()
          Removes this Node object from the tree.
 void discard()
           
 java.util.Iterator getAllAttributes()
          Returns an iterator over all of the attribute names in this SOAPElement object.
 java.util.Iterator getAllAttributesAsQNames()
           
 java.lang.String getAttribute(java.lang.String name)
           
 org.w3c.dom.Attr getAttributeNode(java.lang.String name)
           
 org.w3c.dom.Attr getAttributeNodeNS(java.lang.String namespaceURI, java.lang.String localName)
           
 java.lang.String getAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
           
 org.w3c.dom.NamedNodeMap getAttributes()
          Returns the collection of attributes associated with this node, or null if none.
 java.lang.String getAttributeValue(javax.xml.soap.Name name)
           
 java.lang.String getAttributeValue(javax.xml.namespace.QName qname)
           
 java.util.Iterator getChildElements()
          Returns an iterator over all the immediate content of this element.
 java.util.Iterator getChildElements(javax.xml.soap.Name name)
           
 java.util.Iterator getChildElements(javax.xml.namespace.QName qname)
           
 org.w3c.dom.NodeList getChildNodes()
           
 org.apache.axiom.om.impl.dom.ElementImpl getElement()
           
 javax.xml.soap.Name getElementName()
           
 javax.xml.namespace.QName getElementQName()
           
 org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
           
 org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
           
 java.lang.String getEncodingStyle()
           
 org.w3c.dom.Node getFirstChild()
           
 org.w3c.dom.Node getLastChild()
          Method getLastChild
 java.lang.String getLocalName()
           
 java.util.Iterator getNamespacePrefixes()
           
 java.lang.String getNamespaceURI()
           
 java.lang.String getNamespaceURI(java.lang.String prefix)
           
 org.w3c.dom.Node getNextSibling()
          dom Node method
 java.lang.String getNodeName()
           
 short getNodeType()
           
 org.w3c.dom.Document getOwnerDocument()
          Find the Document that this Node belongs to (the document in whose context the Node was created).
 javax.xml.soap.SOAPElement getParentElement()
          Returns the parent element of this Node object.
 org.w3c.dom.Node getParentNode()
           
 java.lang.String getPrefix()
           
 org.w3c.dom.Node getPreviousSibling()
           
 java.lang.String getTagName()
           
 java.lang.String getTextContent()
           
 java.lang.String getValue()
          Returns the the value of the immediate child of this Node object if a child exists and its value is text.
 java.util.Iterator getVisibleNamespacePrefixes()
           
 boolean hasAttribute(java.lang.String name)
           
 boolean hasAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
           
 boolean hasChildNodes()
           
 void internalSerialize(javax.xml.stream.XMLStreamWriter writer, boolean cache)
           
 boolean removeAttribute(javax.xml.soap.Name name)
           
 boolean removeAttribute(javax.xml.namespace.QName qname)
           
 void removeAttribute(java.lang.String name)
           
 org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr attr)
           
 void removeAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
           
 org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
           
 void removeContents()
           
 boolean removeNamespaceDeclaration(java.lang.String prefix)
           
 void setAttribute(java.lang.String name, java.lang.String value)
           
 org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr attr)
           
 org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr attr)
           
 void setAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName, java.lang.String value)
           
 javax.xml.soap.SOAPElement setElementQName(javax.xml.namespace.QName newName)
           
 void setEncodingStyle(java.lang.String encodingStyle)
          Sets the encoding style for this SOAPElement object to one specified.
 void setParent(org.apache.axiom.om.OMContainer parentElement)
           
 void setParentElement(javax.xml.soap.SOAPElement parent)
          Sets the parent of this Node object to the given SOAPElement object.
 void setValue(java.lang.String value)
          If this is a Text node then this method will set its value, otherwise it sets the value of the immediate (Text) child of this node.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.axis2.saaj.NodeImplEx
getParent, getSchemaTypeInfo, getType, recycleNode, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setType
 
Methods inherited from class org.apache.axiom.om.impl.dom.NodeImpl
build, buildWithAttachments, cloneNode, close, compareDocumentPosition, getBaseURI, getFeature, getLength, getNextOMSibling, getNextOMSiblingIfAvailable, getNodeValue, getOMFactory, getPreviousOMSibling, getUserData, hasAttributes, insertBefore, insertSiblingAfter, insertSiblingBefore, internalSerialize, internalSerializeAndConsume, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, replaceChild, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNextOMSibling, setNodeValue, setOwnerDocument, setPrefix, setPreviousOMSibling, setTextContent, setUserData
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.xml.soap.Node
recycleNode
 
Methods inherited from interface org.w3c.dom.Node
cloneNode, compareDocumentPosition, getBaseURI, getFeature, getNodeValue, getUserData, hasAttributes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 
Methods inherited from interface org.w3c.dom.Element
getSchemaTypeInfo, setIdAttribute, setIdAttributeNode, setIdAttributeNS
 
Methods inherited from interface org.w3c.dom.Node
cloneNode, compareDocumentPosition, getBaseURI, getFeature, getNodeValue, getUserData, hasAttributes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Field Detail

element

protected org.apache.axiom.om.impl.dom.ElementImpl element
Using a delegate because we can't extend from org.apache.axiom.om.impl.dom.ElementImpl since this class must extend SNodeImpl

Constructor Detail

SOAPElementImpl

public SOAPElementImpl(org.apache.axiom.om.impl.dom.ElementImpl element)
Method Detail

discard

public void discard()
             throws org.apache.axiom.om.OMException
Specified by:
discard in interface org.apache.axiom.om.OMNode
Throws:
org.apache.axiom.om.OMException

internalSerialize

public void internalSerialize(javax.xml.stream.XMLStreamWriter writer,
                              boolean cache)
                       throws javax.xml.stream.XMLStreamException
Specified by:
internalSerialize in interface org.apache.axiom.om.impl.OMNodeEx
Throws:
javax.xml.stream.XMLStreamException

addAttribute

public javax.xml.soap.SOAPElement addAttribute(javax.xml.soap.Name name,
                                               java.lang.String value)
                                        throws javax.xml.soap.SOAPException
Adds an attribute with the specified name and value to this SOAPElement object.

Specified by:
addAttribute in interface javax.xml.soap.SOAPElement
Parameters:
name - a Name object with the name of the attribute
value - a String giving the value of the attribute
Returns:
the SOAPElement object into which the attribute was inserted
Throws:
javax.xml.soap.SOAPException - if there is an error in creating the Attribute

addChildElement

public javax.xml.soap.SOAPElement addChildElement(javax.xml.soap.Name name)
                                           throws javax.xml.soap.SOAPException
Specified by:
addChildElement in interface javax.xml.soap.SOAPElement
Throws:
javax.xml.soap.SOAPException

addChildElement

public javax.xml.soap.SOAPElement addChildElement(javax.xml.soap.SOAPElement soapElement)
                                           throws javax.xml.soap.SOAPException
Specified by:
addChildElement in interface javax.xml.soap.SOAPElement
Throws:
javax.xml.soap.SOAPException

getLocalName

public java.lang.String getLocalName()
Specified by:
getLocalName in interface org.w3c.dom.Node
Overrides:
getLocalName in class org.apache.axiom.om.impl.dom.NodeImpl

getNamespaceURI

public java.lang.String getNamespaceURI()
Specified by:
getNamespaceURI in interface org.w3c.dom.Node
Overrides:
getNamespaceURI in class org.apache.axiom.om.impl.dom.NodeImpl

getPrefix

public java.lang.String getPrefix()
Specified by:
getPrefix in interface org.w3c.dom.Node
Overrides:
getPrefix in class org.apache.axiom.om.impl.dom.NodeImpl

addChildElement

public javax.xml.soap.SOAPElement addChildElement(java.lang.String localName,
                                                  java.lang.String prefix,
                                                  java.lang.String uri)
                                           throws javax.xml.soap.SOAPException
Specified by:
addChildElement in interface javax.xml.soap.SOAPElement
Throws:
javax.xml.soap.SOAPException

addChildElement

public javax.xml.soap.SOAPElement addChildElement(java.lang.String localName,
                                                  java.lang.String prefix)
                                           throws javax.xml.soap.SOAPException
Specified by:
addChildElement in interface javax.xml.soap.SOAPElement
Throws:
javax.xml.soap.SOAPException

addChildElement

public javax.xml.soap.SOAPElement addChildElement(java.lang.String localName)
                                           throws javax.xml.soap.SOAPException
Specified by:
addChildElement in interface javax.xml.soap.SOAPElement
Throws:
javax.xml.soap.SOAPException

addNamespaceDeclaration

public javax.xml.soap.SOAPElement addNamespaceDeclaration(java.lang.String prefix,
                                                          java.lang.String uri)
                                                   throws javax.xml.soap.SOAPException
Specified by:
addNamespaceDeclaration in interface javax.xml.soap.SOAPElement
Throws:
javax.xml.soap.SOAPException

addTextNode

public javax.xml.soap.SOAPElement addTextNode(java.lang.String text)
                                       throws javax.xml.soap.SOAPException
Creates a new Text object initialized with the given String and adds it to this SOAPElement object.

Specified by:
addTextNode in interface javax.xml.soap.SOAPElement
Parameters:
text - a String object with the textual content to be added
Returns:
the SOAPElement object into which the new Text object was inserted
Throws:
javax.xml.soap.SOAPException - if there is an error in creating the new Text object

getAllAttributes

public java.util.Iterator getAllAttributes()
Returns an iterator over all of the attribute names in this SOAPElement object. The iterator can be used to get the attribute names, which can then be passed to the method getAttributeValue to retrieve the value of each attribute.

Specified by:
getAllAttributes in interface javax.xml.soap.SOAPElement
Returns:
an iterator over the names of the attributes

getAttributeValue

public java.lang.String getAttributeValue(javax.xml.soap.Name name)
Specified by:
getAttributeValue in interface javax.xml.soap.SOAPElement

getChildElements

public java.util.Iterator getChildElements()
Returns an iterator over all the immediate content of this element. This includes Text objects as well as SOAPElement objects.

Specified by:
getChildElements in interface javax.xml.soap.SOAPElement
Returns:
an iterator over Text and SOAPElement contained within this SOAPElement object

getChildElements

public java.util.Iterator getChildElements(javax.xml.soap.Name name)
Specified by:
getChildElements in interface javax.xml.soap.SOAPElement

getElementName

public javax.xml.soap.Name getElementName()
Specified by:
getElementName in interface javax.xml.soap.SOAPElement

getEncodingStyle

public java.lang.String getEncodingStyle()
Specified by:
getEncodingStyle in interface javax.xml.soap.SOAPElement

getNamespacePrefixes

public java.util.Iterator getNamespacePrefixes()
Specified by:
getNamespacePrefixes in interface javax.xml.soap.SOAPElement

getNamespaceURI

public java.lang.String getNamespaceURI(java.lang.String prefix)
Specified by:
getNamespaceURI in interface javax.xml.soap.SOAPElement

getVisibleNamespacePrefixes

public java.util.Iterator getVisibleNamespacePrefixes()
Specified by:
getVisibleNamespacePrefixes in interface javax.xml.soap.SOAPElement

addAttribute

public javax.xml.soap.SOAPElement addAttribute(javax.xml.namespace.QName qname,
                                               java.lang.String value)
                                        throws javax.xml.soap.SOAPException
Specified by:
addAttribute in interface javax.xml.soap.SOAPElement
Throws:
javax.xml.soap.SOAPException

addChildElement

public javax.xml.soap.SOAPElement addChildElement(javax.xml.namespace.QName qname)
                                           throws javax.xml.soap.SOAPException
Specified by:
addChildElement in interface javax.xml.soap.SOAPElement
Throws:
javax.xml.soap.SOAPException

createQName

public javax.xml.namespace.QName createQName(java.lang.String localName,
                                             java.lang.String prefix)
                                      throws javax.xml.soap.SOAPException
Creates a QName whose namespace URI is the one associated with the parameter, prefix, in the context of this SOAPElement. The remaining elements of the new QName are taken directly from the parameters, localName and prefix.

Specified by:
createQName in interface javax.xml.soap.SOAPElement
Parameters:
localName - - a String containing the local part of the name. prefix - a String containing the prefix for the name.
Returns:
a QName with the specified localName and prefix, and with a namespace that is associated with the prefix in the context of this SOAPElement. This namespace will be the same as the one that would be returned by getNamespaceURI(String) if it were given prefix as its parameter.
Throws:
javax.xml.soap.SOAPException - - if the QName cannot be created.
Since:
SAAJ 1.3

getAllAttributesAsQNames

public java.util.Iterator getAllAttributesAsQNames()
Specified by:
getAllAttributesAsQNames in interface javax.xml.soap.SOAPElement

getAttributeValue

public java.lang.String getAttributeValue(javax.xml.namespace.QName qname)
Specified by:
getAttributeValue in interface javax.xml.soap.SOAPElement

getChildElements

public java.util.Iterator getChildElements(javax.xml.namespace.QName qname)
Specified by:
getChildElements in interface javax.xml.soap.SOAPElement

getElementQName

public javax.xml.namespace.QName getElementQName()
Specified by:
getElementQName in interface javax.xml.soap.SOAPElement

removeAttribute

public boolean removeAttribute(javax.xml.namespace.QName qname)
Specified by:
removeAttribute in interface javax.xml.soap.SOAPElement

setElementQName

public javax.xml.soap.SOAPElement setElementQName(javax.xml.namespace.QName newName)
                                           throws javax.xml.soap.SOAPException
Specified by:
setElementQName in interface javax.xml.soap.SOAPElement
Throws:
javax.xml.soap.SOAPException

removeAttribute

public boolean removeAttribute(javax.xml.soap.Name name)
Specified by:
removeAttribute in interface javax.xml.soap.SOAPElement

removeContents

public void removeContents()
Specified by:
removeContents in interface javax.xml.soap.SOAPElement

removeNamespaceDeclaration

public boolean removeNamespaceDeclaration(java.lang.String prefix)
Specified by:
removeNamespaceDeclaration in interface javax.xml.soap.SOAPElement

setEncodingStyle

public void setEncodingStyle(java.lang.String encodingStyle)
                      throws javax.xml.soap.SOAPException
Sets the encoding style for this SOAPElement object to one specified.

Specified by:
setEncodingStyle in interface javax.xml.soap.SOAPElement
Parameters:
encodingStyle - - a String giving the encoding style
Throws:
java.lang.IllegalArgumentException - - if there was a problem in the encoding style being set. SOAPException - if setting the encodingStyle is invalid for this SOAPElement.
javax.xml.soap.SOAPException

setParent

public void setParent(org.apache.axiom.om.OMContainer parentElement)
Specified by:
setParent in interface org.apache.axiom.om.impl.OMNodeEx

getAttribute

public java.lang.String getAttribute(java.lang.String name)
Specified by:
getAttribute in interface org.w3c.dom.Element

getAttributeNode

public org.w3c.dom.Attr getAttributeNode(java.lang.String name)
Specified by:
getAttributeNode in interface org.w3c.dom.Element

getAttributeNodeNS

public org.w3c.dom.Attr getAttributeNodeNS(java.lang.String namespaceURI,
                                           java.lang.String localName)
Specified by:
getAttributeNodeNS in interface org.w3c.dom.Element

getAttributeNS

public java.lang.String getAttributeNS(java.lang.String namespaceURI,
                                       java.lang.String localName)
Specified by:
getAttributeNS in interface org.w3c.dom.Element

getElementsByTagName

public org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
Specified by:
getElementsByTagName in interface org.w3c.dom.Element

getElementsByTagNameNS

public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
                                                   java.lang.String localName)
Specified by:
getElementsByTagNameNS in interface org.w3c.dom.Element

getTagName

public java.lang.String getTagName()
Specified by:
getTagName in interface org.w3c.dom.Element

hasAttribute

public boolean hasAttribute(java.lang.String name)
Specified by:
hasAttribute in interface org.w3c.dom.Element

hasAttributeNS

public boolean hasAttributeNS(java.lang.String namespaceURI,
                              java.lang.String localName)
Specified by:
hasAttributeNS in interface org.w3c.dom.Element

removeAttribute

public void removeAttribute(java.lang.String name)
                     throws org.w3c.dom.DOMException
Specified by:
removeAttribute in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

removeAttributeNode

public org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr attr)
                                     throws org.w3c.dom.DOMException
Specified by:
removeAttributeNode in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

removeAttributeNS

public void removeAttributeNS(java.lang.String namespaceURI,
                              java.lang.String localName)
                       throws org.w3c.dom.DOMException
Specified by:
removeAttributeNS in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
                  throws org.w3c.dom.DOMException
Specified by:
setAttribute in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

setAttributeNode

public org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr attr)
                                  throws org.w3c.dom.DOMException
Specified by:
setAttributeNode in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

setAttributeNodeNS

public org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr attr)
                                    throws org.w3c.dom.DOMException
Specified by:
setAttributeNodeNS in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

setAttributeNS

public void setAttributeNS(java.lang.String namespaceURI,
                           java.lang.String qualifiedName,
                           java.lang.String value)
                    throws org.w3c.dom.DOMException
Specified by:
setAttributeNS in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

getNodeName

public java.lang.String getNodeName()
Specified by:
getNodeName in interface org.w3c.dom.Node

getNodeType

public short getNodeType()
Specified by:
getNodeType in interface org.w3c.dom.Node

getElement

public org.apache.axiom.om.impl.dom.ElementImpl getElement()

getParentElement

public javax.xml.soap.SOAPElement getParentElement()
Returns the parent element of this Node object. This method can throw an UnsupportedOperationException if the tree is not kept in memory.

Overrides:
getParentElement in class NodeImplEx
Returns:
the SOAPElement object that is the parent of this Node object or null if this Node object is root
Throws:
java.lang.UnsupportedOperationException - if the whole tree is not kept in memory
See Also:
setParentElement(javax.xml.soap.SOAPElement)

setParentElement

public void setParentElement(javax.xml.soap.SOAPElement parent)
                      throws javax.xml.soap.SOAPException
Description copied from class: NodeImplEx
Sets the parent of this Node object to the given SOAPElement object.

Overrides:
setParentElement in class NodeImplEx
Parameters:
parent - the SOAPElement object to be set as the parent of this Node object
Throws:
javax.xml.soap.SOAPException - if there is a problem in setting the parent to the given element
See Also:
getParentElement()

getOwnerDocument

public org.w3c.dom.Document getOwnerDocument()
Find the Document that this Node belongs to (the document in whose context the Node was created). The Node may or may not

Specified by:
getOwnerDocument in interface org.w3c.dom.Node
Overrides:
getOwnerDocument in class org.apache.axiom.om.impl.dom.NodeImpl

getValue

public java.lang.String getValue()
Returns the the value of the immediate child of this Node object if a child exists and its value is text.

Overrides:
getValue in class NodeImplEx
Returns:
a String with the text of the immediate child of this Node object if (1) there is a child and (2) the child is a Text object; null otherwise

getTextContent

public java.lang.String getTextContent()
                                throws org.w3c.dom.DOMException
Specified by:
getTextContent in interface org.w3c.dom.Node
Overrides:
getTextContent in class org.apache.axiom.om.impl.dom.NodeImpl
Throws:
org.w3c.dom.DOMException

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

getFirstChild

public org.w3c.dom.Node getFirstChild()
Specified by:
getFirstChild in interface org.w3c.dom.Node
Overrides:
getFirstChild in class org.apache.axiom.om.impl.dom.NodeImpl

getLastChild

public org.w3c.dom.Node getLastChild()
Method getLastChild

Specified by:
getLastChild in interface org.w3c.dom.Node
Overrides:
getLastChild in class org.apache.axiom.om.impl.dom.NodeImpl
See Also:
Node.getLastChild()

getParentNode

public org.w3c.dom.Node getParentNode()
Specified by:
getParentNode in interface org.w3c.dom.Node
Overrides:
getParentNode in class org.apache.axiom.om.impl.dom.NodeImpl

getNextSibling

public org.w3c.dom.Node getNextSibling()
dom Node method

Specified by:
getNextSibling in interface org.w3c.dom.Node
Overrides:
getNextSibling in class org.apache.axiom.om.impl.dom.NodeImpl

getPreviousSibling

public org.w3c.dom.Node getPreviousSibling()
Specified by:
getPreviousSibling in interface org.w3c.dom.Node
Overrides:
getPreviousSibling in class org.apache.axiom.om.impl.dom.NodeImpl

getChildNodes

public org.w3c.dom.NodeList getChildNodes()
Specified by:
getChildNodes in interface org.w3c.dom.Node
Overrides:
getChildNodes in class org.apache.axiom.om.impl.dom.NodeImpl

hasChildNodes

public boolean hasChildNodes()
Specified by:
hasChildNodes in interface org.w3c.dom.Node
Overrides:
hasChildNodes in class org.apache.axiom.om.impl.dom.NodeImpl

setValue

public void setValue(java.lang.String value)
If this is a Text node then this method will set its value, otherwise it sets the value of the immediate (Text) child of this node. The value of the immediate child of this node can be set only if, there is one child node and that node is a Text node, or if there are no children in which case a child Text node will be created.

Parameters:
value - the text to set
Throws:
java.lang.IllegalStateException - if the node is not a Text node and either has more than one child node or has a child node that is not a Text node

detachNode

public void detachNode()
Description copied from class: NodeImplEx
Removes this Node object from the tree. Once removed, this node can be garbage collected if there are no application references to it.

Overrides:
detachNode in class NodeImplEx

detach

public org.apache.axiom.om.OMNode detach()
Specified by:
detach in interface org.apache.axiom.om.OMNode
Overrides:
detach in class NodeImplEx

getAttributes

public org.w3c.dom.NamedNodeMap getAttributes()
Returns the collection of attributes associated with this node, or null if none. At this writing, Element is the only type of node which will ever have attributes.

Specified by:
getAttributes in interface org.w3c.dom.Node
Overrides:
getAttributes in class org.apache.axiom.om.impl.dom.NodeImpl
See Also:
ElementImpl

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

removeChild

public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
                             throws org.w3c.dom.DOMException
Specified by:
removeChild in interface org.w3c.dom.Node
Overrides:
removeChild in class org.apache.axiom.om.impl.dom.NodeImpl
Throws:
org.w3c.dom.DOMException

appendChild

public org.w3c.dom.Node appendChild(org.w3c.dom.Node child)
                             throws org.w3c.dom.DOMException
Specified by:
appendChild in interface org.w3c.dom.Node
Overrides:
appendChild in class org.apache.axiom.om.impl.dom.NodeImpl
Throws:
org.w3c.dom.DOMException

appendText

protected org.w3c.dom.Text appendText(org.w3c.dom.Text child)
                               throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException

appendElement

protected org.w3c.dom.Element appendElement(org.apache.axiom.om.impl.dom.ElementImpl child)
                                     throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException

copyContents

protected void copyContents(SOAPElementImpl childEle,
                            org.w3c.dom.Node child)
                     throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.