Class SOAPElementImpl<T extends org.apache.axiom.om.OMElement>

All Implemented Interfaces:
jakarta.xml.soap.Node, jakarta.xml.soap.SOAPElement, Element, Node
Direct Known Subclasses:
DetailEntryImpl, SOAPBodyElementImpl, SOAPBodyImpl, SOAPEnvelopeImpl, SOAPFaultElementImpl, SOAPHeaderElementImpl, SOAPHeaderImpl

public class SOAPElementImpl<T extends org.apache.axiom.om.OMElement> extends NodeImpl<Element,T> implements jakarta.xml.soap.SOAPElement
  • Constructor Details

    • SOAPElementImpl

      public SOAPElementImpl(T element)
  • 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 this SOAPElement object.

      Specified by:
      addAttribute in interface jakarta.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:
      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:
      addChildElement in interface jakarta.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:
      addChildElement in interface jakarta.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:
      addChildElement in interface jakarta.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:
      addChildElement in interface jakarta.xml.soap.SOAPElement
      Throws:
      jakarta.xml.soap.SOAPException
    • addChildElement

      public jakarta.xml.soap.SOAPElement addChildElement(String localName) throws jakarta.xml.soap.SOAPException
      Specified by:
      addChildElement in interface jakarta.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:
      addNamespaceDeclaration in interface jakarta.xml.soap.SOAPElement
      Throws:
      jakarta.xml.soap.SOAPException
    • addTextNode

      public jakarta.xml.soap.SOAPElement addTextNode(String text) throws jakarta.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 jakarta.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:
      jakarta.xml.soap.SOAPException - if there is an error in creating the new Text object
    • getAllAttributes

      public 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 jakarta.xml.soap.SOAPElement
      Returns:
      an iterator over the names of the attributes
    • getAttributeValue

      public String getAttributeValue(jakarta.xml.soap.Name name)
      Specified by:
      getAttributeValue in interface jakarta.xml.soap.SOAPElement
    • getChildElements

      public 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 jakarta.xml.soap.SOAPElement
      Returns:
      an iterator over Text and SOAPElement contained within this SOAPElement object
    • getChildElements

      public Iterator getChildElements(jakarta.xml.soap.Name name)
      Specified by:
      getChildElements in interface jakarta.xml.soap.SOAPElement
    • getElementName

      public jakarta.xml.soap.Name getElementName()
      Specified by:
      getElementName in interface jakarta.xml.soap.SOAPElement
    • getEncodingStyle

      public String getEncodingStyle()
      Specified by:
      getEncodingStyle in interface jakarta.xml.soap.SOAPElement
    • getNamespacePrefixes

      public Iterator getNamespacePrefixes()
      Specified by:
      getNamespacePrefixes in interface jakarta.xml.soap.SOAPElement
    • getNamespaceURI

      public String getNamespaceURI(String prefix)
      Specified by:
      getNamespaceURI in interface jakarta.xml.soap.SOAPElement
    • getVisibleNamespacePrefixes

      public Iterator getVisibleNamespacePrefixes()
      Specified by:
      getVisibleNamespacePrefixes in interface jakarta.xml.soap.SOAPElement
    • addAttribute

      public jakarta.xml.soap.SOAPElement addAttribute(QName qname, String value) throws jakarta.xml.soap.SOAPException
      Specified by:
      addAttribute in interface jakarta.xml.soap.SOAPElement
      Throws:
      jakarta.xml.soap.SOAPException
    • addChildElement

      public jakarta.xml.soap.SOAPElement addChildElement(QName qname) throws jakarta.xml.soap.SOAPException
      Specified by:
      addChildElement in interface jakarta.xml.soap.SOAPElement
      Throws:
      jakarta.xml.soap.SOAPException
    • createQName

      public QName createQName(String localName, String prefix) throws jakarta.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 jakarta.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

      public Iterator getAllAttributesAsQNames()
      Specified by:
      getAllAttributesAsQNames in interface jakarta.xml.soap.SOAPElement
    • getAttributeValue

      public String getAttributeValue(QName qname)
      Specified by:
      getAttributeValue in interface jakarta.xml.soap.SOAPElement
    • getChildElements

      public Iterator getChildElements(QName qname)
      Specified by:
      getChildElements in interface jakarta.xml.soap.SOAPElement
    • getElementQName

      public QName getElementQName()
      Specified by:
      getElementQName in interface jakarta.xml.soap.SOAPElement
    • removeAttribute

      public boolean removeAttribute(QName qname)
      Specified by:
      removeAttribute in interface jakarta.xml.soap.SOAPElement
    • setElementQName

      public jakarta.xml.soap.SOAPElement setElementQName(QName newName) throws jakarta.xml.soap.SOAPException
      Specified by:
      setElementQName in interface jakarta.xml.soap.SOAPElement
      Throws:
      jakarta.xml.soap.SOAPException
    • removeAttribute

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

      public void removeContents()
      Specified by:
      removeContents in interface jakarta.xml.soap.SOAPElement
    • removeNamespaceDeclaration

      public boolean removeNamespaceDeclaration(String prefix)
      Specified by:
      removeNamespaceDeclaration in interface jakarta.xml.soap.SOAPElement
    • setEncodingStyle

      public void setEncodingStyle(String encodingStyle) throws jakarta.xml.soap.SOAPException
      Sets the encoding style for this SOAPElement object to one specified.
      Specified by:
      setEncodingStyle in interface jakarta.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

      public String getAttribute(String name)
      Specified by:
      getAttribute in interface Element
    • getAttributeNode

      public Attr getAttributeNode(String name)
      Specified by:
      getAttributeNode in interface Element
    • getAttributeNodeNS

      public Attr getAttributeNodeNS(String namespaceURI, String localName)
      Specified by:
      getAttributeNodeNS in interface Element
    • getAttributeNS

      public String getAttributeNS(String namespaceURI, String localName)
      Specified by:
      getAttributeNS in interface Element
    • getElementsByTagName

      public NodeList getElementsByTagName(String name)
      Specified by:
      getElementsByTagName in interface Element
    • getElementsByTagNameNS

      public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
      Specified by:
      getElementsByTagNameNS in interface Element
    • getTagName

      public String getTagName()
      Specified by:
      getTagName in interface Element
    • hasAttribute

      public boolean hasAttribute(String name)
      Specified by:
      hasAttribute in interface Element
    • hasAttributeNS

      public boolean hasAttributeNS(String namespaceURI, String localName)
      Specified by:
      hasAttributeNS in interface Element
    • removeAttribute

      public void removeAttribute(String name) throws DOMException
      Specified by:
      removeAttribute in interface Element
      Throws:
      DOMException
    • removeAttributeNode

      public Attr removeAttributeNode(Attr attr) throws DOMException
      Specified by:
      removeAttributeNode in interface Element
      Throws:
      DOMException
    • removeAttributeNS

      public void removeAttributeNS(String namespaceURI, String localName) throws DOMException
      Specified by:
      removeAttributeNS in interface Element
      Throws:
      DOMException
    • setAttribute

      public void setAttribute(String name, String value) throws DOMException
      Specified by:
      setAttribute in interface Element
      Throws:
      DOMException
    • setAttributeNode

      public Attr setAttributeNode(Attr attr) throws DOMException
      Specified by:
      setAttributeNode in interface Element
      Throws:
      DOMException
    • setAttributeNodeNS

      public Attr setAttributeNodeNS(Attr attr) throws DOMException
      Specified by:
      setAttributeNodeNS in interface Element
      Throws:
      DOMException
    • setAttributeNS

      public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException
      Specified by:
      setAttributeNS in interface Element
      Throws:
      DOMException
    • getValue

      public String getValue()
      Returns the the value of the immediate child of this Node object if a child exists and its value is text.
      Specified by:
      getValue in interface jakarta.xml.soap.Node
      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
    • clone

      protected Object clone() throws CloneNotSupportedException
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException
    • setValue

      public 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. 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:
      setValue in interface jakarta.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

      public String toString()
      Overrides:
      toString in class Object
    • copyContents

      protected void copyContents(SOAPElementImpl childEle, Node child) throws jakarta.xml.soap.SOAPException
      Throws:
      jakarta.xml.soap.SOAPException