Package org.apache.axis2.saaj
Class SOAPElementImpl<T extends org.apache.axiom.om.OMElement>
- Direct Known Subclasses:
DetailEntryImpl,SOAPBodyElementImpl,SOAPBodyImpl,SOAPEnvelopeImpl,SOAPFaultElementImpl,SOAPHeaderElementImpl,SOAPHeaderImpl
-
Field Summary
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.xml.soap.SOAPElementaddAttribute(jakarta.xml.soap.Name name, String value) Adds an attribute with the specified name and value to thisSOAPElementobject.jakarta.xml.soap.SOAPElementaddAttribute(QName qname, String value) jakarta.xml.soap.SOAPElementaddChildElement(jakarta.xml.soap.Name name) jakarta.xml.soap.SOAPElementaddChildElement(jakarta.xml.soap.SOAPElement soapElement) jakarta.xml.soap.SOAPElementaddChildElement(String localName) jakarta.xml.soap.SOAPElementaddChildElement(String localName, String prefix) jakarta.xml.soap.SOAPElementaddChildElement(String localName, String prefix, String namespaceURI) jakarta.xml.soap.SOAPElementaddChildElement(QName qname) jakarta.xml.soap.SOAPElementaddNamespaceDeclaration(String prefix, String uri) jakarta.xml.soap.SOAPElementaddTextNode(String text) Creates a newTextobject initialized with the givenStringand adds it to thisSOAPElementobject.protected Objectclone()protected voidcopyContents(SOAPElementImpl childEle, Node child) 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.Returns an iterator over all of the attribute names in thisSOAPElementobject.getAttribute(String name) getAttributeNode(String name) getAttributeNodeNS(String namespaceURI, String localName) getAttributeNS(String namespaceURI, String localName) getAttributeValue(jakarta.xml.soap.Name name) getAttributeValue(QName qname) Returns an iterator over all the immediate content of this element.getChildElements(jakarta.xml.soap.Name name) getChildElements(QName qname) jakarta.xml.soap.NamegetElementsByTagName(String name) getElementsByTagNameNS(String namespaceURI, String localName) getNamespaceURI(String prefix) getValue()Returns the the value of the immediate child of thisNodeobject if a child exists and its value is text.booleanhasAttribute(String name) booleanhasAttributeNS(String namespaceURI, String localName) booleanremoveAttribute(jakarta.xml.soap.Name name) voidremoveAttribute(String name) booleanremoveAttribute(QName qname) removeAttributeNode(Attr attr) voidremoveAttributeNS(String namespaceURI, String localName) voidbooleanremoveNamespaceDeclaration(String prefix) voidsetAttribute(String name, String value) setAttributeNode(Attr attr) setAttributeNodeNS(Attr attr) voidsetAttributeNS(String namespaceURI, String qualifiedName, String value) jakarta.xml.soap.SOAPElementsetElementQName(QName newName) voidsetEncodingStyle(String encodingStyle) Sets the encoding style for this SOAPElement object to one specified.voidIf 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.toString()Methods inherited from class org.apache.axis2.saaj.NodeImpl
detachNode, getParentElement, setParentElementMethods inherited from class org.apache.axis2.saaj.ProxyNode
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, toSAAJNodeListMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.w3c.dom.Element
getSchemaTypeInfo, setIdAttribute, setIdAttributeNode, setIdAttributeNSMethods inherited from interface jakarta.xml.soap.Node
detachNode, getParentElement, recycleNode, setParentElementMethods inherited from interface org.w3c.dom.Node
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
-
Constructor Details
-
SOAPElementImpl
-
-
Method Details
-
addAttribute
public jakarta.xml.soap.SOAPElement addAttribute(jakarta.xml.soap.Name name, String value) throws jakarta.xml.soap.SOAPException Adds an attribute with the specified name and value to thisSOAPElementobject.- Specified by:
addAttributein interfacejakarta.xml.soap.SOAPElement- Parameters:
name- aNameobject with the name of the attributevalue- aStringgiving the value of the attribute- Returns:
- the
SOAPElementobject into which the attribute was inserted - Throws:
jakarta.xml.soap.SOAPException- if there is an error in creating the Attribute
-
addChildElement
public jakarta.xml.soap.SOAPElement addChildElement(jakarta.xml.soap.Name name) throws jakarta.xml.soap.SOAPException - Specified by:
addChildElementin interfacejakarta.xml.soap.SOAPElement- Throws:
jakarta.xml.soap.SOAPException
-
addChildElement
public jakarta.xml.soap.SOAPElement addChildElement(jakarta.xml.soap.SOAPElement soapElement) throws jakarta.xml.soap.SOAPException - Specified by:
addChildElementin interfacejakarta.xml.soap.SOAPElement- Throws:
jakarta.xml.soap.SOAPException
-
addChildElement
public jakarta.xml.soap.SOAPElement addChildElement(String localName, String prefix, String namespaceURI) throws jakarta.xml.soap.SOAPException - Specified by:
addChildElementin interfacejakarta.xml.soap.SOAPElement- Throws:
jakarta.xml.soap.SOAPException
-
addChildElement
public jakarta.xml.soap.SOAPElement addChildElement(String localName, String prefix) throws jakarta.xml.soap.SOAPException - Specified by:
addChildElementin interfacejakarta.xml.soap.SOAPElement- Throws:
jakarta.xml.soap.SOAPException
-
addChildElement
public jakarta.xml.soap.SOAPElement addChildElement(String localName) throws jakarta.xml.soap.SOAPException - Specified by:
addChildElementin interfacejakarta.xml.soap.SOAPElement- Throws:
jakarta.xml.soap.SOAPException
-
addNamespaceDeclaration
public jakarta.xml.soap.SOAPElement addNamespaceDeclaration(String prefix, String uri) throws jakarta.xml.soap.SOAPException - Specified by:
addNamespaceDeclarationin interfacejakarta.xml.soap.SOAPElement- Throws:
jakarta.xml.soap.SOAPException
-
addTextNode
Creates a newTextobject initialized with the givenStringand adds it to thisSOAPElementobject.- Specified by:
addTextNodein interfacejakarta.xml.soap.SOAPElement- Parameters:
text- aStringobject with the textual content to be added- Returns:
- the
SOAPElementobject into which the newTextobject was inserted - Throws:
jakarta.xml.soap.SOAPException- if there is an error in creating the newTextobject
-
getAllAttributes
Returns an iterator over all of the attribute names in thisSOAPElementobject. The iterator can be used to get the attribute names, which can then be passed to the methodgetAttributeValueto retrieve the value of each attribute.- Specified by:
getAllAttributesin interfacejakarta.xml.soap.SOAPElement- Returns:
- an iterator over the names of the attributes
-
getAttributeValue
- Specified by:
getAttributeValuein interfacejakarta.xml.soap.SOAPElement
-
getChildElements
Returns an iterator over all the immediate content of this element. This includesTextobjects as well asSOAPElementobjects.- Specified by:
getChildElementsin interfacejakarta.xml.soap.SOAPElement- Returns:
- an iterator over
TextandSOAPElementcontained within thisSOAPElementobject
-
getChildElements
- Specified by:
getChildElementsin interfacejakarta.xml.soap.SOAPElement
-
getElementName
public jakarta.xml.soap.Name getElementName()- Specified by:
getElementNamein interfacejakarta.xml.soap.SOAPElement
-
getEncodingStyle
- Specified by:
getEncodingStylein interfacejakarta.xml.soap.SOAPElement
-
getNamespacePrefixes
- Specified by:
getNamespacePrefixesin interfacejakarta.xml.soap.SOAPElement
-
getNamespaceURI
- Specified by:
getNamespaceURIin interfacejakarta.xml.soap.SOAPElement
-
getVisibleNamespacePrefixes
- Specified by:
getVisibleNamespacePrefixesin interfacejakarta.xml.soap.SOAPElement
-
addAttribute
public jakarta.xml.soap.SOAPElement addAttribute(QName qname, String value) throws jakarta.xml.soap.SOAPException - Specified by:
addAttributein interfacejakarta.xml.soap.SOAPElement- Throws:
jakarta.xml.soap.SOAPException
-
addChildElement
public jakarta.xml.soap.SOAPElement addChildElement(QName qname) throws jakarta.xml.soap.SOAPException - Specified by:
addChildElementin interfacejakarta.xml.soap.SOAPElement- Throws:
jakarta.xml.soap.SOAPException
-
createQName
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:
createQNamein interfacejakarta.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:
jakarta.xml.soap.SOAPException- - if the QName cannot be created.- Since:
- SAAJ 1.3
-
getAllAttributesAsQNames
- Specified by:
getAllAttributesAsQNamesin interfacejakarta.xml.soap.SOAPElement
-
getAttributeValue
- Specified by:
getAttributeValuein interfacejakarta.xml.soap.SOAPElement
-
getChildElements
- Specified by:
getChildElementsin interfacejakarta.xml.soap.SOAPElement
-
getElementQName
- Specified by:
getElementQNamein interfacejakarta.xml.soap.SOAPElement
-
removeAttribute
- Specified by:
removeAttributein interfacejakarta.xml.soap.SOAPElement
-
setElementQName
public jakarta.xml.soap.SOAPElement setElementQName(QName newName) throws jakarta.xml.soap.SOAPException - Specified by:
setElementQNamein interfacejakarta.xml.soap.SOAPElement- Throws:
jakarta.xml.soap.SOAPException
-
removeAttribute
public boolean removeAttribute(jakarta.xml.soap.Name name) - Specified by:
removeAttributein interfacejakarta.xml.soap.SOAPElement
-
removeContents
public void removeContents()- Specified by:
removeContentsin interfacejakarta.xml.soap.SOAPElement
-
removeNamespaceDeclaration
- Specified by:
removeNamespaceDeclarationin interfacejakarta.xml.soap.SOAPElement
-
setEncodingStyle
Sets the encoding style for this SOAPElement object to one specified.- Specified by:
setEncodingStylein interfacejakarta.xml.soap.SOAPElement- Parameters:
encodingStyle- - a String giving the encoding style- Throws:
IllegalArgumentException- - if there was a problem in the encoding style being set. SOAPException - if setting the encodingStyle is invalid for this SOAPElement.jakarta.xml.soap.SOAPException
-
getAttribute
- Specified by:
getAttributein interfaceElement
-
getAttributeNode
- Specified by:
getAttributeNodein interfaceElement
-
getAttributeNodeNS
- Specified by:
getAttributeNodeNSin interfaceElement
-
getAttributeNS
- Specified by:
getAttributeNSin interfaceElement
-
getElementsByTagName
- Specified by:
getElementsByTagNamein interfaceElement
-
getElementsByTagNameNS
- Specified by:
getElementsByTagNameNSin interfaceElement
-
getTagName
- Specified by:
getTagNamein interfaceElement
-
hasAttribute
- Specified by:
hasAttributein interfaceElement
-
hasAttributeNS
- Specified by:
hasAttributeNSin interfaceElement
-
removeAttribute
- Specified by:
removeAttributein interfaceElement- Throws:
DOMException
-
removeAttributeNode
- Specified by:
removeAttributeNodein interfaceElement- Throws:
DOMException
-
removeAttributeNS
- Specified by:
removeAttributeNSin interfaceElement- Throws:
DOMException
-
setAttribute
- Specified by:
setAttributein interfaceElement- Throws:
DOMException
-
setAttributeNode
- Specified by:
setAttributeNodein interfaceElement- Throws:
DOMException
-
setAttributeNodeNS
- Specified by:
setAttributeNodeNSin interfaceElement- Throws:
DOMException
-
setAttributeNS
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException - Specified by:
setAttributeNSin interfaceElement- Throws:
DOMException
-
getValue
Returns the the value of the immediate child of thisNodeobject if a child exists and its value is text.- Specified by:
getValuein interfacejakarta.xml.soap.Node- Returns:
- a
Stringwith the text of the immediate child of thisNodeobject if (1) there is a child and (2) the child is aTextobject;nullotherwise
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
setValue
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.- Specified by:
setValuein interfacejakarta.xml.soap.Node- Parameters:
value- the text to set- Throws:
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
-
toString
-
copyContents
protected void copyContents(SOAPElementImpl childEle, Node child) throws jakarta.xml.soap.SOAPException - Throws:
jakarta.xml.soap.SOAPException
-