ExtensionElementImpl

class ExtensionElementImpl implements ExtensionElement

An implementation of ExtensionElement.

Author:cyng

Fields

soapEnvelope

protected final SOAPEnvelope soapEnvelope

The javax.xml.soap.SOAPEnvelope encapsulating this ExtensionElement

Constructors

ExtensionElementImpl

ExtensionElementImpl(SOAPEnvelope soapEnvelope, SOAPElement soapElement)

Construct an ExtensionElement using the given SOAPEnvelope and SOAPElement

ExtensionElementImpl

ExtensionElementImpl(SOAPEnvelope soapEnvelope, String localName, boolean isHeaderElement)

Construct an ExtensionElement using the given SOAPEnvelope and whose namespace and URI are equal to that of SOAP extension element as defined in ebXML Messaging Service Specification

ExtensionElementImpl

ExtensionElementImpl(SOAPEnvelope soapEnvelope, String localName, String prefix, String uri, boolean isHeaderElement, boolean createSOAPElement)

Construct an ExtensionElement using the given SOAPEnvelope and the specified namespace and URI. Change the default namespace and URI of this ExtensionElement to the new one so that subsequent added children elements will inherit the new namespace and URI.

Methods

addAttribute

public ExtensionElement addAttribute(String localName, String value)

Add an attribute whose namespace is the same as this ExtensionElement

addAttribute

public ExtensionElement addAttribute(String localName, String prefix, String uri, String value)

Add a namespace qualified attribute

addAttribute

public Element addAttribute(Name name, String value)

Add an attribute of the given name and value to this Element. If the namespace is found to be non-null, non-empty and different from the current Element, the namespace is declared.

addChildElement

public ExtensionElement addChildElement(String localName)

Add a child element without text node value and whose namespace is the same as this ExtensionElement, i.e., the parent

addChildElement

public ExtensionElement addChildElement(String localName, String value)

Add a child element with the specified value and whose namespace is the same as this ExtensionElement, i.e., the parent

addChildElement

public ExtensionElement addChildElement(String localName, String prefix, String uri)

Add a child element without text node value and with the specified namespace

addChildElement

public ExtensionElement addChildElement(String localName, String prefix, String uri, String value)

Add a child element with the specified value and namespace. Change the default namespace and URI of this ExtensionElement to the new one so that subsequent added children elements will inherit the new namespace and URI.

addChildElement

public Element addChildElement(Element child)

Add a child element to this Element

getAllAttributes

public Iterator getAllAttributes()

Get all attributes of this Element. Each Iterator entry is in the form of Map.Entry representing a (javax.xml.soap.Name name, String value) pair.

getAttributeValue

public String getAttributeValue(String localName)

Get an attribute whose namespace is the same as this ExtensionElement

getAttributeValue

public String getAttributeValue(String localName, String prefix, String uri)

Get an attribute with the specified prefix and namespace

getAttributeValue

public String getAttributeValue(Name name)

Get the attribute value of the specified attribute name

getChildElements

public Iterator getChildElements(String localName)

Get all descendant child elements of the specified localName whose namespace is the same as this ExtensionElement, in the order in which they are encountered in a preorder traversal of this ExtensionElement tree. Each Iterator entry is in the form of an javax.xml.soap.SOAPElement.

getChildElements

public Iterator getChildElements(Name name)

Get all descendant child elements of the specified javax.xml.soap.Name, in the order in which they are encountered in a preorder traversal of this Element tree. Each Iterator entry is in the form of an javax.xml.soap.SOAPElement.

getChildElements

public Iterator getChildElements()

Get all immediate child elements in the form of an javax.xml.soap.SOAPElement in each Iterator entry

getElementName

public Name getElementName()

Get the element name of this Element

getSOAPElement

public SOAPElement getSOAPElement()

Return the javax.xml.soap.SOAPElement representation of this Element

getValue

public String getValue()

Get the text node value of this Element. Returns null if it does not exist.