public class ElementImpl extends Object implements SOAPElement, SOAPBodyElement
Modifier and Type | Field and Description |
---|---|
static String |
DSIG_NS |
protected QName |
elementQName |
protected static Logger |
log |
static String |
WSU_NS |
static String |
XENC_NS |
static String |
XML_URI
The XML Namespace ("http://www.w3.org/XML/1998/namespace").
|
static String |
XMLNS_URI
XML Information Set REC
all namespace attributes (including those named xmlns,
whose [prefix] property has no value) have a namespace URI of http://www.w3.org/2000/xmlns/
|
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 |
---|
ElementImpl(SOAPDocumentImpl ownerDoc,
Element domElement) |
ElementImpl(SOAPDocumentImpl ownerDoc,
Name name) |
ElementImpl(SOAPDocumentImpl ownerDoc,
QName name) |
ElementImpl(SOAPDocumentImpl ownerDoc,
String uri,
String qualifiedName) |
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)
Adds an attribute with the specified name and value to this
SOAPElement object. |
protected SOAPElement |
addCDATA(String text) |
SOAPElement |
addChildElement(Name name)
Creates a new
SOAPElement object initialized with the
given Name object and adds the new element to this
SOAPElement object. |
SOAPElement |
addChildElement(QName qname)
Creates a new
SOAPElement object initialized with the given
QName object and adds the new element to this SOAPElement
object. |
SOAPElement |
addChildElement(SOAPElement element)
Add a
SOAPElement as a child of this
SOAPElement instance. |
SOAPElement |
addChildElement(String localName)
Creates a new
SOAPElement object initialized with the
specified local name and adds the new element to this
SOAPElement object. |
SOAPElement |
addChildElement(String localName,
String prefix)
Creates a new
SOAPElement object initialized with the
specified local name and prefix and adds the new element to this
SOAPElement object. |
SOAPElement |
addChildElement(String localName,
String prefix,
String uri)
Creates a new
SOAPElement object initialized with the
specified local name, prefix, and URI and adds the new element to this
SOAPElement object. |
protected SOAPElement |
addElement(Name name) |
protected SOAPElement |
addElement(QName name) |
SOAPElement |
addNamespaceDeclaration(String prefix,
String uri)
Adds a namespace declaration with the specified prefix and URI to this
SOAPElement object. |
protected void |
addNode(Node newElement) |
protected SOAPElement |
addText(String text) |
SOAPElement |
addTextNode(String text)
Creates a new
Text object initialized with the given
String and adds it to this SOAPElement object. |
Node |
appendChild(Node newChild) |
Node |
cloneNode(boolean deep) |
short |
compareDocumentPosition(Node other) |
protected SOAPElement |
convertToSoapElement(Element element) |
protected TextImpl |
convertToSoapText(CharacterData characterData) |
protected SOAPElement |
createElement(Name name) |
protected SOAPElement |
createElement(QName name) |
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 . |
void |
detachNode()
Removes this
Node object from the tree. |
protected Iterator<String> |
doGetNamespacePrefixes(boolean deep) |
void |
ensureNamespaceIsDeclared(String prefix,
String uri) |
protected SOAPElement |
findAndConvertChildElement(NameImpl name) |
protected SOAPElement |
findChild(NameImpl name) |
protected void |
findEncodingStyleAttributeName() |
Iterator<Name> |
getAllAttributes()
Returns an
Iterator over all of the attribute
Name objects in this
SOAPElement object. |
Iterator<QName> |
getAllAttributesAsQNames()
Returns an
Iterator over all of the attributes
in this SOAPElement as QName objects. |
protected static Iterator<Name> |
getAllAttributesFrom(Element element) |
String |
getAttribute(String name) |
Attr |
getAttributeNode(String name) |
Attr |
getAttributeNodeNS(String namespaceURI,
String localName) |
String |
getAttributeNS(String namespaceURI,
String localName) |
NamedNodeMap |
getAttributes() |
String |
getAttributeValue(Name name)
Returns the value of the attribute with the specified name.
|
String |
getAttributeValue(QName qname)
Returns the value of the attribute with the specified qname.
|
protected static String |
getAttributeValueFrom(Element element,
Name name) |
String |
getBaseURI() |
protected Iterator<Node> |
getChildElementNodes() |
Iterator<Node> |
getChildElements()
Returns an
Iterator over all the immediate child
Node s of this element. |
Iterator<Node> |
getChildElements(Name name)
Returns an
Iterator over all the immediate child
Node s of this element with the specified name. |
Iterator<Node> |
getChildElements(QName qname)
Returns an
Iterator over all the immediate child
Node s of this element with the specified qname. |
protected Iterator<Node> |
getChildElementsFrom(Element element) |
NodeList |
getChildNodes() |
Element |
getDomElement() |
Name |
getElementName()
Returns the name of this
SOAPElement object. |
QName |
getElementQName()
Returns the qname of this
SOAPElement object. |
NodeList |
getElementsByTagName(String name) |
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName) |
String |
getEncodingStyle()
Returns the encoding style for this
SOAPElement object. |
Object |
getFeature(String feature,
String version) |
Node |
getFirstChild() |
Node |
getLastChild() |
String |
getLocalName() |
static String |
getLocalPart(String qualifiedName) |
protected Attr |
getNamespaceAttr(String prefix) |
protected static Attr |
getNamespaceAttrFrom(Element element,
String prefix) |
NamespaceContextIterator |
getNamespaceContextNodes() |
NamespaceContextIterator |
getNamespaceContextNodes(boolean traverseStack) |
String |
getNamespacePrefix(String uri) |
Iterator<String> |
getNamespacePrefixes()
Returns an
Iterator over the namespace prefix
String s declared by this element. |
String |
getNamespaceURI() |
String |
getNamespaceURI(String prefix)
Returns the URI of the namespace that has the given prefix.
|
Node |
getNextSibling() |
String |
getNodeName() |
short |
getNodeType() |
String |
getNodeValue() |
Document |
getOwnerDocument() |
SOAPElement |
getParentElement()
Returns the parent element of this
Node object. |
Node |
getParentNode() |
String |
getPrefix() |
static String |
getPrefix(String qualifiedName) |
Node |
getPreviousSibling() |
static String |
getQualifiedName(QName name) |
TypeInfo |
getSchemaTypeInfo() |
SOAPDocumentImpl |
getSoapDocument() |
protected String |
getSOAPNamespace() |
String |
getTagName() |
String |
getTextContent() |
Object |
getUserData(String key) |
String |
getValue()
Returns the value of this node if this is a
Text node or the
value of the immediate child of this node otherwise. |
protected Node |
getValueNode() |
protected Node |
getValueNodeStrict() |
Iterator<String> |
getVisibleNamespacePrefixes()
Returns an
Iterator over the namespace prefix
String s visible to this element. |
boolean |
hasAttribute(String name) |
boolean |
hasAttributeNS(String namespaceURI,
String localName) |
boolean |
hasAttributes() |
boolean |
hasChildNodes() |
protected Element |
importElement(Element element) |
Node |
insertBefore(Node newChild,
Node refChild) |
boolean |
isDefaultNamespace(String namespaceURI) |
boolean |
isEqualNode(Node arg) |
protected boolean |
isNamespaceQualified(Name name) |
protected boolean |
isNamespaceQualified(QName name) |
boolean |
isSameNode(Node other) |
boolean |
isSupported(String feature,
String version) |
String |
lookupNamespaceURI(String prefix) |
String |
lookupPrefix(String namespaceURI) |
void |
normalize() |
void |
recycleNode()
Notifies the implementation that this
Node
object is no longer being used by the application and that the
implementation is free to reuse this object for nodes that may
be created later. |
boolean |
removeAttribute(Name name)
Removes the attribute with the specified name.
|
boolean |
removeAttribute(QName name)
Removes the attribute with the specified qname.
|
void |
removeAttribute(String name) |
Attr |
removeAttributeNode(Attr oldAttr) |
void |
removeAttributeNS(String namespaceURI,
String localName) |
Node |
removeChild(Node oldChild) |
void |
removeContents()
Detaches all children of this
SOAPElement . |
boolean |
removeNamespaceDeclaration(String prefix)
Removes the namespace declaration corresponding to the given prefix.
|
Node |
replaceChild(Node newChild,
Node oldChild) |
protected SOAPElement |
replaceElementWithSOAPElement(Element element,
ElementImpl copy) |
void |
setAttribute(String name,
String value) |
Attr |
setAttributeNode(Attr newAttr) |
Attr |
setAttributeNodeNS(Attr newAttr) |
void |
setAttributeNS(String namespaceURI,
String qualifiedName,
String value) |
SOAPElement |
setElementQName(QName newName)
Changes the name of this
Element to newName if
possible. |
void |
setEncodingStyle(String encodingStyle)
Sets the encoding style for this
SOAPElement object
to one specified. |
protected void |
setEncodingStyleNamespace(String soapNamespace,
String soapNamespacePrefix) |
void |
setIdAttribute(String name,
boolean isId) |
void |
setIdAttributeNode(Attr idAttr,
boolean isId) |
void |
setIdAttributeNS(String namespaceURI,
String localName,
boolean isId) |
void |
setNodeValue(String nodeValue) |
void |
setParentElement(SOAPElement element)
Sets the parent of this
Node object to the given
SOAPElement object. |
void |
setPrefix(String prefix) |
void |
setTextContent(String textContent) |
Object |
setUserData(String key,
Object data,
UserDataHandler handler) |
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.
|
void |
tryToFindEncodingStyleAttributeName() |
public static final String DSIG_NS
public static final String XENC_NS
public static final String WSU_NS
protected QName elementQName
protected static final Logger log
public static final String XMLNS_URI
public static final String XML_URI
public ElementImpl(SOAPDocumentImpl ownerDoc, Name name)
public ElementImpl(SOAPDocumentImpl ownerDoc, QName name)
public ElementImpl(SOAPDocumentImpl ownerDoc, Element domElement)
public ElementImpl(SOAPDocumentImpl ownerDoc, String uri, String qualifiedName)
public String getTagName()
getTagName
in interface Element
public String getAttribute(String name)
getAttribute
in interface Element
public void setAttribute(String name, String value) throws DOMException
setAttribute
in interface Element
DOMException
public void removeAttribute(String name) throws DOMException
removeAttribute
in interface Element
DOMException
public Attr getAttributeNode(String name)
getAttributeNode
in interface Element
public Attr setAttributeNode(Attr newAttr) throws DOMException
setAttributeNode
in interface Element
DOMException
public Attr removeAttributeNode(Attr oldAttr) throws DOMException
removeAttributeNode
in interface Element
DOMException
public NodeList getElementsByTagName(String name)
getElementsByTagName
in interface Element
public String getAttributeNS(String namespaceURI, String localName) throws DOMException
getAttributeNS
in interface Element
DOMException
public Document getOwnerDocument()
getOwnerDocument
in interface Node
public Node insertBefore(Node newChild, Node refChild) throws DOMException
insertBefore
in interface Node
DOMException
public Node replaceChild(Node newChild, Node oldChild) throws DOMException
replaceChild
in interface Node
DOMException
public Node removeChild(Node oldChild) throws DOMException
removeChild
in interface Node
DOMException
public Node appendChild(Node newChild) throws DOMException
appendChild
in interface Node
DOMException
public boolean hasChildNodes()
hasChildNodes
in interface Node
public boolean isSupported(String feature, String version)
isSupported
in interface Node
public String getNamespaceURI()
getNamespaceURI
in interface Node
public void setPrefix(String prefix) throws DOMException
setPrefix
in interface Node
DOMException
public String getLocalName()
getLocalName
in interface Node
public boolean hasAttributes()
hasAttributes
in interface Node
public String getBaseURI()
getBaseURI
in interface Node
public short compareDocumentPosition(Node other) throws DOMException
compareDocumentPosition
in interface Node
DOMException
public String getTextContent() throws DOMException
getTextContent
in interface Node
DOMException
public void setTextContent(String textContent) throws DOMException
setTextContent
in interface Node
DOMException
public boolean isSameNode(Node other)
isSameNode
in interface Node
public String lookupPrefix(String namespaceURI)
lookupPrefix
in interface Node
public boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace
in interface Node
public String lookupNamespaceURI(String prefix)
lookupNamespaceURI
in interface Node
public boolean isEqualNode(Node arg)
isEqualNode
in interface Node
public Object getFeature(String feature, String version)
getFeature
in interface Node
public Object setUserData(String key, Object data, UserDataHandler handler)
setUserData
in interface Node
public Object getUserData(String key)
getUserData
in interface Node
public SOAPElement addChildElement(Name name) throws SOAPException
SOAPElement
SOAPElement
object initialized with the
given Name
object and adds the new element to this
SOAPElement
object.
This method may be deprecated in a future release of SAAJ in favor of addChildElement(javax.xml.namespace.QName)
addChildElement
in interface SOAPElement
name
- a Name
object with the XML name for the
new elementSOAPElement
object that was createdSOAPException
- if there is an error in creating the
SOAPElement
objectSOAPElement.addChildElement(javax.xml.namespace.QName)
public SOAPElement addChildElement(QName qname) throws SOAPException
SOAPElement
SOAPElement
object initialized with the given
QName
object and adds the new element to this SOAPElement
object. The namespace, localname and prefix of the new
SOAPElement
are all taken from the qname
argument.addChildElement
in interface SOAPElement
qname
- a QName
object with the XML name for the
new elementSOAPElement
object that was createdSOAPException
- if there is an error in creating the
SOAPElement
objectSOAPElement.addChildElement(Name)
public SOAPElement addChildElement(String localName) throws SOAPException
SOAPElement
SOAPElement
object initialized with the
specified local name and adds the new element to this
SOAPElement
object.
The new SOAPElement
inherits any in-scope default namespace.addChildElement
in interface SOAPElement
localName
- a String
giving the local name for
the elementSOAPElement
object that was createdSOAPException
- if there is an error in creating the
SOAPElement
objectpublic SOAPElement addChildElement(String localName, String prefix) throws SOAPException
SOAPElement
SOAPElement
object initialized with the
specified local name and prefix and adds the new element to this
SOAPElement
object.addChildElement
in interface SOAPElement
localName
- a String
giving the local name for
the new elementprefix
- a String
giving the namespace prefix for
the new elementSOAPElement
object that was createdSOAPException
- if the prefix
is not valid in the
context of this SOAPElement
or if there is an error in creating the
SOAPElement
objectpublic String getNamespaceURI(String prefix)
SOAPElement
getNamespaceURI
in interface SOAPElement
prefix
- a String
giving the prefix of the namespace
for which to searchString
with the uri of the namespace that has
the given prefixpublic SOAPElement setElementQName(QName newName) throws SOAPException
SOAPElement
Element
to newName
if
possible. SOAP Defined elements such as SOAPEnvelope, SOAPHeader, SOAPBody
etc. cannot have their names changed using this method. Any attempt to do
so will result in a SOAPException being thrown.
Callers should not rely on the element instance being renamed as is.
Implementations could end up copying the content of the
SOAPElement
to a renamed instance.
setElementQName
in interface SOAPElement
newName
- the new name for the Element
.SOAPException
- if changing the name of this Element
is not allowed.public QName createQName(String localName, String prefix) throws SOAPException
SOAPElement
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
.createQName
in interface SOAPElement
localName
- a String
containing the local part of the name.prefix
- a String
containing the prefix for the name.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
SOAPElement.getNamespaceURI(String)
if it were given
prefix
as it's parameter.SOAPException
- if the QName
cannot be created.public NamespaceContextIterator getNamespaceContextNodes()
public NamespaceContextIterator getNamespaceContextNodes(boolean traverseStack)
public SOAPElement addChildElement(String localName, String prefix, String uri) throws SOAPException
SOAPElement
SOAPElement
object initialized with the
specified local name, prefix, and URI and adds the new element to this
SOAPElement
object.addChildElement
in interface SOAPElement
localName
- a String
giving the local name for
the new elementprefix
- a String
giving the namespace prefix for
the new elementuri
- a String
giving the URI of the namespace
to which the new element belongsSOAPElement
object that was createdSOAPException
- if there is an error in creating the
SOAPElement
objectpublic SOAPElement addChildElement(SOAPElement element) throws SOAPException
SOAPElement
SOAPElement
as a child of this
SOAPElement
instance. The SOAPElement
is expected to be created by a
SOAPFactory
. Callers should not rely on the
element instance being added as is into the XML
tree. Implementations could end up copying the content
of the SOAPElement
passed into an instance of
a different SOAPElement
implementation. For
instance if addChildElement()
is called on a
SOAPHeader
, element
will be copied
into an instance of a SOAPHeaderElement
.
The fragment rooted in element
is either added
as a whole or not at all, if there was an error.
The fragment rooted in element
cannot contain
elements named "Envelope", "Header" or "Body" and in the SOAP
namespace. Any namespace prefixes present in the fragment
should be fully resolved using appropriate namespace
declarations within the fragment itself.
addChildElement
in interface SOAPElement
element
- the SOAPElement
to be added as a
new childSOAPException
- if there was an error in adding this
element as a childprotected SOAPElement addElement(Name name) throws SOAPException
SOAPException
protected SOAPElement addElement(QName name) throws SOAPException
SOAPException
protected SOAPElement createElement(Name name)
protected SOAPElement createElement(QName name)
protected void addNode(Node newElement) throws SOAPException
SOAPException
protected SOAPElement findChild(NameImpl name)
protected SOAPElement findAndConvertChildElement(NameImpl name)
public SOAPElement addTextNode(String text) throws SOAPException
SOAPElement
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
object or if it is not legal to
attach it as a child to this
SOAPElement
protected SOAPElement addCDATA(String text) throws SOAPException
SOAPException
protected SOAPElement addText(String text) throws SOAPException
SOAPException
public SOAPElement addAttribute(Name name, String value) throws SOAPException
SOAPElement
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
Attribute, or it is invalid to set
an attribute with Name
name
on this SOAPElement.SOAPElement.addAttribute(javax.xml.namespace.QName, String)
public SOAPElement addAttribute(QName qname, String value) throws SOAPException
SOAPElement
SOAPElement
object.addAttribute
in interface SOAPElement
qname
- a QName
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
Attribute, or it is invalid to set
an attribute with QName
qname
on this SOAPElement.SOAPElement.addAttribute(Name, String)
public SOAPElement addNamespaceDeclaration(String prefix, String uri) throws SOAPException
SOAPElement
SOAPElement
object.addNamespaceDeclaration
in interface SOAPElement
prefix
- a String
giving the prefix of the namespaceuri
- a String
giving the uri of the namespaceSOAPElement
object into which this
namespace declaration was inserted.SOAPException
- if there is an error in creating the
namespacepublic String getAttributeValue(Name name)
SOAPElement
getAttributeValue
in interface SOAPElement
name
- a Name
object with the name of the attributeString
giving the value of the specified
attribute, Null if there is no such attributeSOAPElement.getAttributeValue(javax.xml.namespace.QName)
public String getAttributeValue(QName qname)
SOAPElement
getAttributeValue
in interface SOAPElement
qname
- a QName
object with the qname of the attributeString
giving the value of the specified
attribute, Null if there is no such attributeSOAPElement.getAttributeValue(Name)
public Iterator<Name> getAllAttributes()
SOAPElement
Iterator
over all of the attribute
Name
objects 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.getAllAttributes
in interface SOAPElement
SOAPElement.getAllAttributesAsQNames()
public Iterator<QName> getAllAttributesAsQNames()
SOAPElement
Iterator
over all of the attributes
in this SOAPElement
as QName
objects.
The iterator can be used to get the attribute QName, which can then
be passed to the method getAttributeValue
to retrieve
the value of each attribute.getAllAttributesAsQNames
in interface SOAPElement
SOAPElement.getAllAttributes()
public Iterator<String> getNamespacePrefixes()
SOAPElement
Iterator
over the namespace prefix
String
s declared by this element. The prefixes returned by
this iterator can be passed to the method
getNamespaceURI
to retrieve the URI of each namespace.getNamespacePrefixes
in interface SOAPElement
SOAPElement
objectpublic Iterator<String> getVisibleNamespacePrefixes()
SOAPElement
Iterator
over the namespace prefix
String
s visible to this element. The prefixes returned by
this iterator can be passed to the method
getNamespaceURI
to retrieve the URI of each namespace.getVisibleNamespacePrefixes
in interface SOAPElement
SOAPElement
objectpublic Name getElementName()
SOAPElement
SOAPElement
object.getElementName
in interface SOAPElement
Name
object with the name of this
SOAPElement
objectpublic QName getElementQName()
SOAPElement
SOAPElement
object.getElementQName
in interface SOAPElement
QName
object with the qname of this
SOAPElement
objectSOAPElement.getElementName()
public boolean removeAttribute(Name name)
SOAPElement
removeAttribute
in interface SOAPElement
name
- the Name
object with the name of the
attribute to be removedtrue
if the attribute was
removed successfully; false
if it was notSOAPElement.removeAttribute(javax.xml.namespace.QName)
public boolean removeAttribute(QName name)
SOAPElement
removeAttribute
in interface SOAPElement
name
- the QName
object with the qname of the
attribute to be removedtrue
if the attribute was
removed successfully; false
if it was notSOAPElement.removeAttribute(Name)
public boolean removeNamespaceDeclaration(String prefix)
SOAPElement
removeNamespaceDeclaration
in interface SOAPElement
prefix
- a String
giving the prefix for which
to searchtrue
if the namespace declaration was
removed successfully; false
if it was notpublic Iterator<Node> getChildElements()
SOAPElement
Iterator
over all the immediate child
Node
s of this element. This includes javax.xml.soap.Text
objects as well as SOAPElement
objects.
Calling this method may cause child Element
,
SOAPElement
and org.w3c.dom.Text
nodes to be
replaced by SOAPElement
, SOAPHeaderElement
,
SOAPBodyElement
or javax.xml.soap.Text
nodes as
appropriate for the type of this parent node. As a result the calling
application must treat any existing references to these child nodes that
have been obtained through DOM APIs as invalid and either discard them or
refresh them with the values returned by this Iterator
. This
behavior can be avoided by calling the equivalent DOM APIs. See
javax.xml.soap
for more details.
getChildElements
in interface SOAPElement
SOAPElement
objectprotected SOAPElement convertToSoapElement(Element element)
protected TextImpl convertToSoapText(CharacterData characterData)
protected SOAPElement replaceElementWithSOAPElement(Element element, ElementImpl copy)
public Iterator<Node> getChildElements(Name name)
SOAPElement
Iterator
over all the immediate child
Node
s of this element with the specified name. All of these
children will be SOAPElement
nodes.
Calling this method may cause child Element
,
SOAPElement
and org.w3c.dom.Text
nodes to be
replaced by SOAPElement
, SOAPHeaderElement
,
SOAPBodyElement
or javax.xml.soap.Text
nodes as
appropriate for the type of this parent node. As a result the calling
application must treat any existing references to these child nodes that
have been obtained through DOM APIs as invalid and either discard them or
refresh them with the values returned by this Iterator
. This
behavior can be avoided by calling the equivalent DOM APIs. See
javax.xml.soap
for more details.
getChildElements
in interface SOAPElement
name
- a Name
object with the name of the child
elements to be returnedIterator
object over all the elements
in this SOAPElement
object with the
specified nameSOAPElement.getChildElements(javax.xml.namespace.QName)
public Iterator<Node> getChildElements(QName qname)
SOAPElement
Iterator
over all the immediate child
Node
s of this element with the specified qname. All of these
children will be SOAPElement
nodes.
Calling this method may cause child Element
,
SOAPElement
and org.w3c.dom.Text
nodes to be
replaced by SOAPElement
, SOAPHeaderElement
,
SOAPBodyElement
or javax.xml.soap.Text
nodes as
appropriate for the type of this parent node. As a result the calling
application must treat any existing references to these child nodes that
have been obtained through DOM APIs as invalid and either discard them or
refresh them with the values returned by this Iterator
. This
behavior can be avoided by calling the equivalent DOM APIs. See
javax.xml.soap
for more details.
getChildElements
in interface SOAPElement
qname
- a QName
object with the qname of the child
elements to be returnedIterator
object over all the elements
in this SOAPElement
object with the
specified qnameSOAPElement.getChildElements(Name)
public void removeContents()
SOAPElement
SOAPElement
.
This method is useful for rolling back the construction of partially
completed SOAPHeaders
and SOAPBodys
in
preparation for sending a fault when an error condition is detected. It
is also useful for recycling portions of a document within a SOAP
message.
removeContents
in interface SOAPElement
public void setEncodingStyle(String encodingStyle) throws SOAPException
SOAPElement
SOAPElement
object
to one specified.setEncodingStyle
in interface SOAPElement
encodingStyle
- a String
giving the encoding styleSOAPException
- if setting the encodingStyle is invalid for this SOAPElement.SOAPElement.getEncodingStyle()
public String getEncodingStyle()
SOAPElement
SOAPElement
object.getEncodingStyle
in interface SOAPElement
String
giving the encoding styleSOAPElement.setEncodingStyle(java.lang.String)
public String getValue()
Node
Text
node or the
value of the immediate child of this node otherwise.
If there is an immediate child of this Node
that it is a
Text
node then it's value will be returned. If there is
more than one Text
node then the value of the first
Text
Node will be returned.
Otherwise null
is returned.String
with the text of this node if this is a
Text
node or the text contained by the first
immediate child of this Node
object that is a
Text
object if such a child exists;
null
otherwise.public void setValue(String value)
Node
Text
node, or if
there are no children in which case a child Text
node will be
created.protected Node getValueNodeStrict()
protected Node getValueNode()
public void setParentElement(SOAPElement element) throws SOAPException
Node
Node
object to the given
SOAPElement
object.element
- the SOAPElement
object to be set as
the parent of this Node
objectSOAPException
- if there is a problem in setting the
parent to the given elementNode.getParentElement()
protected void findEncodingStyleAttributeName() throws SOAPException
SOAPException
protected void setEncodingStyleNamespace(String soapNamespace, String soapNamespacePrefix) throws SOAPException
SOAPException
public SOAPElement getParentElement()
Node
Node
object.
This method can throw an UnsupportedOperationException
if the tree is not kept in memory.SOAPElement
object that is the parent of
this Node
object or null
if this
Node
object is rootNode.setParentElement(javax.xml.soap.SOAPElement)
protected String getSOAPNamespace()
public void detachNode()
Node
Node
object from the tree.public void tryToFindEncodingStyleAttributeName()
public void recycleNode()
Node
Node
object is no longer being used by the application and that the
implementation is free to reuse this object for nodes that may
be created later.
Calling the method recycleNode
implies that the method
detachNode
has been called previously.
protected boolean isNamespaceQualified(Name name)
protected boolean isNamespaceQualified(QName name)
public void setAttributeNS(String namespaceURI, String qualifiedName, String value)
setAttributeNS
in interface Element
public void removeAttributeNS(String namespaceURI, String localName) throws DOMException
removeAttributeNS
in interface Element
DOMException
public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException
getAttributeNodeNS
in interface Element
DOMException
public Attr setAttributeNodeNS(Attr newAttr) throws DOMException
setAttributeNodeNS
in interface Element
DOMException
public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException
getElementsByTagNameNS
in interface Element
DOMException
public boolean hasAttribute(String name)
hasAttribute
in interface Element
public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException
hasAttributeNS
in interface Element
DOMException
public TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo
in interface Element
public void setIdAttribute(String name, boolean isId) throws DOMException
setIdAttribute
in interface Element
DOMException
public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException
setIdAttributeNS
in interface Element
DOMException
public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException
setIdAttributeNode
in interface Element
DOMException
public String getNodeName()
getNodeName
in interface Node
public String getNodeValue() throws DOMException
getNodeValue
in interface Node
DOMException
public void setNodeValue(String nodeValue) throws DOMException
setNodeValue
in interface Node
DOMException
public short getNodeType()
getNodeType
in interface Node
public Node getParentNode()
getParentNode
in interface Node
public NodeList getChildNodes()
getChildNodes
in interface Node
public Node getFirstChild()
getFirstChild
in interface Node
public Node getLastChild()
getLastChild
in interface Node
public Node getPreviousSibling()
getPreviousSibling
in interface Node
public Node getNextSibling()
getNextSibling
in interface Node
public NamedNodeMap getAttributes()
getAttributes
in interface Node
public Element getDomElement()
public SOAPDocumentImpl getSoapDocument()
Copyright © 2020 JBoss by Red Hat. All rights reserved.