public class SOAPElementImpl<T extends org.apache.axiom.om.OMElement> extends SAAJNode<org.w3c.dom.Element,T> implements javax.xml.soap.SOAPElement
omTarget, parentElement, targetATTRIBUTE_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| Constructor and Description |
|---|
SOAPElementImpl(T element) |
| Modifier and Type | Method and Description |
|---|---|
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 namespaceURI) |
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. |
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. |
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) |
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) |
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() |
java.util.Iterator |
getNamespacePrefixes() |
java.lang.String |
getNamespaceURI(java.lang.String prefix) |
org.w3c.dom.Node |
getNextSibling()
dom Node method
|
javax.xml.soap.SOAPElement |
getParentElement()
Returns the parent element of this
Node object. |
org.w3c.dom.Node |
getParentNode() |
org.w3c.dom.Node |
getPreviousSibling() |
java.lang.String |
getTagName() |
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 |
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) |
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 |
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() |
appendChild, appendElement, appendText, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNodeName, getNodeType, getNodeValue, getOMTarget, getOwnerDocument, getParent, getPrefix, getSchemaTypeInfo, getTarget, getTextContent, getType, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, recycleNode, removeChild, replaceChild, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setPrefix, setTextContent, setType, setUserData, toSAAJNodeListequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSchemaTypeInfo, setIdAttribute, setIdAttributeNode, setIdAttributeNSappendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getPrefix, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDatapublic SOAPElementImpl(T element)
public javax.xml.soap.SOAPElement addAttribute(javax.xml.soap.Name name,
java.lang.String value)
throws javax.xml.soap.SOAPException
SOAPElement object.
addAttribute in interface javax.xml.soap.SOAPElementname - a Name object with the name of the attributevalue - a String giving the value of the attributeSOAPElement object into which the attribute was insertedjavax.xml.soap.SOAPException - if there is an error in creating the Attributepublic javax.xml.soap.SOAPElement addChildElement(javax.xml.soap.Name name)
throws javax.xml.soap.SOAPException
addChildElement in interface javax.xml.soap.SOAPElementjavax.xml.soap.SOAPExceptionpublic javax.xml.soap.SOAPElement addChildElement(javax.xml.soap.SOAPElement soapElement)
throws javax.xml.soap.SOAPException
addChildElement in interface javax.xml.soap.SOAPElementjavax.xml.soap.SOAPExceptionpublic javax.xml.soap.SOAPElement addChildElement(java.lang.String localName,
java.lang.String prefix,
java.lang.String namespaceURI)
throws javax.xml.soap.SOAPException
addChildElement in interface javax.xml.soap.SOAPElementjavax.xml.soap.SOAPExceptionpublic javax.xml.soap.SOAPElement addChildElement(java.lang.String localName,
java.lang.String prefix)
throws javax.xml.soap.SOAPException
addChildElement in interface javax.xml.soap.SOAPElementjavax.xml.soap.SOAPExceptionpublic javax.xml.soap.SOAPElement addChildElement(java.lang.String localName)
throws javax.xml.soap.SOAPException
addChildElement in interface javax.xml.soap.SOAPElementjavax.xml.soap.SOAPExceptionpublic javax.xml.soap.SOAPElement addNamespaceDeclaration(java.lang.String prefix,
java.lang.String uri)
throws javax.xml.soap.SOAPException
addNamespaceDeclaration in interface javax.xml.soap.SOAPElementjavax.xml.soap.SOAPExceptionpublic javax.xml.soap.SOAPElement addTextNode(java.lang.String text)
throws javax.xml.soap.SOAPException
Text object initialized with the given String and
adds it to this SOAPElement object.addTextNode in interface javax.xml.soap.SOAPElementtext - a String object with the textual content to be addedSOAPElement object into which the new Text object was
insertedjavax.xml.soap.SOAPException - if there is an error in creating the new Text objectpublic java.util.Iterator getAllAttributes()
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.getAllAttributes in interface javax.xml.soap.SOAPElementpublic java.lang.String getAttributeValue(javax.xml.soap.Name name)
getAttributeValue in interface javax.xml.soap.SOAPElementpublic java.util.Iterator getChildElements()
Text objects as well as SOAPElement objects.getChildElements in interface javax.xml.soap.SOAPElementText and SOAPElement contained within this
SOAPElement objectpublic java.util.Iterator getChildElements(javax.xml.soap.Name name)
getChildElements in interface javax.xml.soap.SOAPElementpublic javax.xml.soap.Name getElementName()
getElementName in interface javax.xml.soap.SOAPElementpublic java.lang.String getEncodingStyle()
getEncodingStyle in interface javax.xml.soap.SOAPElementpublic java.util.Iterator getNamespacePrefixes()
getNamespacePrefixes in interface javax.xml.soap.SOAPElementpublic java.lang.String getNamespaceURI(java.lang.String prefix)
getNamespaceURI in interface javax.xml.soap.SOAPElementpublic java.util.Iterator getVisibleNamespacePrefixes()
getVisibleNamespacePrefixes in interface javax.xml.soap.SOAPElementpublic javax.xml.soap.SOAPElement addAttribute(javax.xml.namespace.QName qname,
java.lang.String value)
throws javax.xml.soap.SOAPException
addAttribute in interface javax.xml.soap.SOAPElementjavax.xml.soap.SOAPExceptionpublic javax.xml.soap.SOAPElement addChildElement(javax.xml.namespace.QName qname)
throws javax.xml.soap.SOAPException
addChildElement in interface javax.xml.soap.SOAPElementjavax.xml.soap.SOAPExceptionpublic javax.xml.namespace.QName createQName(java.lang.String localName,
java.lang.String prefix)
throws javax.xml.soap.SOAPException
createQName in interface javax.xml.soap.SOAPElementlocalName - - a String containing the local part of the name. prefix - a String
containing the prefix for the name.javax.xml.soap.SOAPException - - if the QName cannot be created.public java.util.Iterator getAllAttributesAsQNames()
getAllAttributesAsQNames in interface javax.xml.soap.SOAPElementpublic java.lang.String getAttributeValue(javax.xml.namespace.QName qname)
getAttributeValue in interface javax.xml.soap.SOAPElementpublic java.util.Iterator getChildElements(javax.xml.namespace.QName qname)
getChildElements in interface javax.xml.soap.SOAPElementpublic javax.xml.namespace.QName getElementQName()
getElementQName in interface javax.xml.soap.SOAPElementpublic boolean removeAttribute(javax.xml.namespace.QName qname)
removeAttribute in interface javax.xml.soap.SOAPElementpublic javax.xml.soap.SOAPElement setElementQName(javax.xml.namespace.QName newName)
throws javax.xml.soap.SOAPException
setElementQName in interface javax.xml.soap.SOAPElementjavax.xml.soap.SOAPExceptionpublic boolean removeAttribute(javax.xml.soap.Name name)
removeAttribute in interface javax.xml.soap.SOAPElementpublic void removeContents()
removeContents in interface javax.xml.soap.SOAPElementpublic boolean removeNamespaceDeclaration(java.lang.String prefix)
removeNamespaceDeclaration in interface javax.xml.soap.SOAPElementpublic void setEncodingStyle(java.lang.String encodingStyle)
throws javax.xml.soap.SOAPException
setEncodingStyle in interface javax.xml.soap.SOAPElementencodingStyle - - a String giving the encoding stylejava.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.SOAPExceptionpublic java.lang.String getAttribute(java.lang.String name)
getAttribute in interface org.w3c.dom.Elementpublic org.w3c.dom.Attr getAttributeNode(java.lang.String name)
getAttributeNode in interface org.w3c.dom.Elementpublic org.w3c.dom.Attr getAttributeNodeNS(java.lang.String namespaceURI,
java.lang.String localName)
getAttributeNodeNS in interface org.w3c.dom.Elementpublic java.lang.String getAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
getAttributeNS in interface org.w3c.dom.Elementpublic org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
getElementsByTagName in interface org.w3c.dom.Elementpublic org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
getElementsByTagNameNS in interface org.w3c.dom.Elementpublic java.lang.String getTagName()
getTagName in interface org.w3c.dom.Elementpublic boolean hasAttribute(java.lang.String name)
hasAttribute in interface org.w3c.dom.Elementpublic boolean hasAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
hasAttributeNS in interface org.w3c.dom.Elementpublic void removeAttribute(java.lang.String name)
throws org.w3c.dom.DOMException
removeAttribute in interface org.w3c.dom.Elementorg.w3c.dom.DOMExceptionpublic org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr attr)
throws org.w3c.dom.DOMException
removeAttributeNode in interface org.w3c.dom.Elementorg.w3c.dom.DOMExceptionpublic void removeAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
throws org.w3c.dom.DOMException
removeAttributeNS in interface org.w3c.dom.Elementorg.w3c.dom.DOMExceptionpublic void setAttribute(java.lang.String name,
java.lang.String value)
throws org.w3c.dom.DOMException
setAttribute in interface org.w3c.dom.Elementorg.w3c.dom.DOMExceptionpublic org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr attr)
throws org.w3c.dom.DOMException
setAttributeNode in interface org.w3c.dom.Elementorg.w3c.dom.DOMExceptionpublic org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr attr)
throws org.w3c.dom.DOMException
setAttributeNodeNS in interface org.w3c.dom.Elementorg.w3c.dom.DOMExceptionpublic void setAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName,
java.lang.String value)
throws org.w3c.dom.DOMException
setAttributeNS in interface org.w3c.dom.Elementorg.w3c.dom.DOMExceptionpublic javax.xml.soap.SOAPElement getParentElement()
Node object. This method can throw an
UnsupportedOperationException if the tree is not kept in memory.getParentElement in class SAAJNode<org.w3c.dom.Element,T extends org.apache.axiom.om.OMElement>SOAPElement object that is the parent of this Node
object or null if this Node object is rootjava.lang.UnsupportedOperationException - if the whole tree is not kept in memorysetParentElement(javax.xml.soap.SOAPElement)public void setParentElement(javax.xml.soap.SOAPElement parent)
throws javax.xml.soap.SOAPException
SAAJNodeNode object to the given SOAPElement
object.setParentElement in class SAAJNode<org.w3c.dom.Element,T extends org.apache.axiom.om.OMElement>parent - the SOAPElement object to be set as the parent of this
Node objectjavax.xml.soap.SOAPException - if there is a problem in setting the parent to the given elementgetParentElement()public java.lang.String getValue()
Node object if a child
exists and its value is text.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 otherwiseprotected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic org.w3c.dom.Node getParentNode()
getParentNode in interface org.w3c.dom.NodegetParentNode in class SAAJNode<org.w3c.dom.Element,T extends org.apache.axiom.om.OMElement>public org.w3c.dom.Node getNextSibling()
getNextSibling in interface org.w3c.dom.Nodepublic org.w3c.dom.Node getPreviousSibling()
getPreviousSibling in interface org.w3c.dom.Nodepublic void setValue(java.lang.String value)
value - the text to setjava.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 nodepublic void detachNode()
SAAJNodeNode object from the tree. Once removed, this node can be garbage
collected if there are no application references to it.detachNode in class SAAJNode<org.w3c.dom.Element,T extends org.apache.axiom.om.OMElement>public org.apache.axiom.om.OMNode detach()
public java.lang.String toString()
toString in class java.lang.Objectprotected void copyContents(SOAPElementImpl childEle, org.w3c.dom.Node child) throws javax.xml.soap.SOAPException
javax.xml.soap.SOAPExceptionCopyright © 2004-2015 The Apache Software Foundation. All Rights Reserved.