public class SOAPElementImpl<T extends org.apache.axiom.om.OMElement> extends NodeImpl<Element,T> implements SOAPElement
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
Constructor and Description |
---|
SOAPElementImpl(T element) |
Modifier and Type | Method and Description |
---|---|
SOAPElement |
addAttribute(Name name,
String value)
Adds an attribute with the specified name and value to this
SOAPElement object. |
SOAPElement |
addAttribute(QName qname,
String value) |
SOAPElement |
addChildElement(Name name) |
SOAPElement |
addChildElement(QName qname) |
SOAPElement |
addChildElement(SOAPElement soapElement) |
SOAPElement |
addChildElement(String localName) |
SOAPElement |
addChildElement(String localName,
String prefix) |
SOAPElement |
addChildElement(String localName,
String prefix,
String namespaceURI) |
SOAPElement |
addNamespaceDeclaration(String prefix,
String uri) |
SOAPElement |
addTextNode(String text)
Creates a new
Text object initialized with the given String and
adds it to this SOAPElement object. |
protected Object |
clone() |
protected void |
copyContents(SOAPElementImpl childEle,
Node child) |
QName |
createQName(String localName,
String prefix)
Creates a QName whose namespace URI is the one associated with the parameter, prefix, in the
context of this SOAPElement.
|
Iterator |
getAllAttributes()
Returns an iterator over all of the attribute names in this
SOAPElement object. |
Iterator |
getAllAttributesAsQNames() |
String |
getAttribute(String name) |
Attr |
getAttributeNode(String name) |
Attr |
getAttributeNodeNS(String namespaceURI,
String localName) |
String |
getAttributeNS(String namespaceURI,
String localName) |
String |
getAttributeValue(Name name) |
String |
getAttributeValue(QName qname) |
Iterator |
getChildElements()
Returns an iterator over all the immediate content of this element.
|
Iterator |
getChildElements(Name name) |
Iterator |
getChildElements(QName qname) |
Name |
getElementName() |
QName |
getElementQName() |
NodeList |
getElementsByTagName(String name) |
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName) |
String |
getEncodingStyle() |
Iterator |
getNamespacePrefixes() |
String |
getNamespaceURI(String prefix) |
String |
getTagName() |
String |
getValue()
Returns the the value of the immediate child of this
Node object if a child
exists and its value is text. |
Iterator |
getVisibleNamespacePrefixes() |
boolean |
hasAttribute(String name) |
boolean |
hasAttributeNS(String namespaceURI,
String localName) |
boolean |
removeAttribute(Name name) |
boolean |
removeAttribute(QName qname) |
void |
removeAttribute(String name) |
Attr |
removeAttributeNode(Attr attr) |
void |
removeAttributeNS(String namespaceURI,
String localName) |
void |
removeContents() |
boolean |
removeNamespaceDeclaration(String prefix) |
void |
setAttribute(String name,
String value) |
Attr |
setAttributeNode(Attr attr) |
Attr |
setAttributeNodeNS(Attr attr) |
void |
setAttributeNS(String namespaceURI,
String qualifiedName,
String value) |
SOAPElement |
setElementQName(QName newName) |
void |
setEncodingStyle(String encodingStyle)
Sets the encoding style for this SOAPElement object to one specified.
|
void |
setValue(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.
|
String |
toString() |
detachNode, getParentElement, setParentElement
appendChild, appendElement, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOMTarget, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, 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, toSAAJNodeList
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
detachNode, getParentElement, recycleNode, setParentElement
getSchemaTypeInfo, setIdAttribute, setIdAttributeNode, setIdAttributeNS
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
public SOAPElementImpl(T element)
public SOAPElement addAttribute(Name name, String value) throws SOAPException
SOAPElement
object.
addAttribute
in interface SOAPElement
name
- a Name
object with the name of the attributevalue
- a String
giving the value of the attributeSOAPElement
object into which the attribute was insertedSOAPException
- if there is an error in creating the Attributepublic SOAPElement addChildElement(Name name) throws SOAPException
addChildElement
in interface SOAPElement
SOAPException
public SOAPElement addChildElement(SOAPElement soapElement) throws SOAPException
addChildElement
in interface SOAPElement
SOAPException
public SOAPElement addChildElement(String localName, String prefix, String namespaceURI) throws SOAPException
addChildElement
in interface SOAPElement
SOAPException
public SOAPElement addChildElement(String localName, String prefix) throws SOAPException
addChildElement
in interface SOAPElement
SOAPException
public SOAPElement addChildElement(String localName) throws SOAPException
addChildElement
in interface SOAPElement
SOAPException
public SOAPElement addNamespaceDeclaration(String prefix, String uri) throws SOAPException
addNamespaceDeclaration
in interface SOAPElement
SOAPException
public SOAPElement addTextNode(String text) throws SOAPException
Text
object initialized with the given String
and
adds it to this SOAPElement
object.addTextNode
in interface SOAPElement
text
- a String
object with the textual content to be addedSOAPElement
object into which the new Text
object was
insertedSOAPException
- if there is an error in creating the new Text
objectpublic 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 SOAPElement
public String getAttributeValue(Name name)
getAttributeValue
in interface SOAPElement
public Iterator getChildElements()
Text
objects as well as SOAPElement
objects.getChildElements
in interface SOAPElement
Text
and SOAPElement
contained within this
SOAPElement
objectpublic Iterator getChildElements(Name name)
getChildElements
in interface SOAPElement
public Name getElementName()
getElementName
in interface SOAPElement
public String getEncodingStyle()
getEncodingStyle
in interface SOAPElement
public Iterator getNamespacePrefixes()
getNamespacePrefixes
in interface SOAPElement
public String getNamespaceURI(String prefix)
getNamespaceURI
in interface SOAPElement
public Iterator getVisibleNamespacePrefixes()
getVisibleNamespacePrefixes
in interface SOAPElement
public SOAPElement addAttribute(QName qname, String value) throws SOAPException
addAttribute
in interface SOAPElement
SOAPException
public SOAPElement addChildElement(QName qname) throws SOAPException
addChildElement
in interface SOAPElement
SOAPException
public QName createQName(String localName, String prefix) throws SOAPException
createQName
in interface SOAPElement
localName
- - a String containing the local part of the name. prefix - a String
containing the prefix for the name.SOAPException
- - if the QName cannot be created.public Iterator getAllAttributesAsQNames()
getAllAttributesAsQNames
in interface SOAPElement
public String getAttributeValue(QName qname)
getAttributeValue
in interface SOAPElement
public Iterator getChildElements(QName qname)
getChildElements
in interface SOAPElement
public QName getElementQName()
getElementQName
in interface SOAPElement
public boolean removeAttribute(QName qname)
removeAttribute
in interface SOAPElement
public SOAPElement setElementQName(QName newName) throws SOAPException
setElementQName
in interface SOAPElement
SOAPException
public boolean removeAttribute(Name name)
removeAttribute
in interface SOAPElement
public void removeContents()
removeContents
in interface SOAPElement
public boolean removeNamespaceDeclaration(String prefix)
removeNamespaceDeclaration
in interface SOAPElement
public void setEncodingStyle(String encodingStyle) throws SOAPException
setEncodingStyle
in interface SOAPElement
encodingStyle
- - a String giving the encoding styleIllegalArgumentException
- - if there was a problem in the encoding style being set. SOAPException - if setting
the encodingStyle is invalid for this SOAPElement.SOAPException
public String getAttribute(String name)
getAttribute
in interface Element
public Attr getAttributeNode(String name)
getAttributeNode
in interface Element
public Attr getAttributeNodeNS(String namespaceURI, String localName)
getAttributeNodeNS
in interface Element
public String getAttributeNS(String namespaceURI, String localName)
getAttributeNS
in interface Element
public NodeList getElementsByTagName(String name)
getElementsByTagName
in interface Element
public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS
in interface Element
public String getTagName()
getTagName
in interface Element
public boolean hasAttribute(String name)
hasAttribute
in interface Element
public boolean hasAttributeNS(String namespaceURI, String localName)
hasAttributeNS
in interface Element
public void removeAttribute(String name) throws DOMException
removeAttribute
in interface Element
DOMException
public Attr removeAttributeNode(Attr attr) throws DOMException
removeAttributeNode
in interface Element
DOMException
public void removeAttributeNS(String namespaceURI, String localName) throws DOMException
removeAttributeNS
in interface Element
DOMException
public void setAttribute(String name, String value) throws DOMException
setAttribute
in interface Element
DOMException
public Attr setAttributeNode(Attr attr) throws DOMException
setAttributeNode
in interface Element
DOMException
public Attr setAttributeNodeNS(Attr attr) throws DOMException
setAttributeNodeNS
in interface Element
DOMException
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException
setAttributeNS
in interface Element
DOMException
public 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 Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public void setValue(String value)
value
- the text to setIllegalStateException
- 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 nodeprotected void copyContents(SOAPElementImpl childEle, Node child) throws SOAPException
SOAPException
Copyright © 2004–2019 The Apache Software Foundation. All rights reserved.