public class SOAPElementImpl extends NodeImpl implements SOAPElement
domNode, soapParent
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
Modifier | Constructor and Description |
---|---|
|
SOAPElementImpl(Name name)
Called by SOAPFactory
|
|
SOAPElementImpl(QName qname)
Called by SOAPFactory
|
protected |
SOAPElementImpl(SOAPElementImpl element)
Copy constructor for converting SOAPElement types
|
|
SOAPElementImpl(String localPart)
Called by SOAPFactory
|
|
SOAPElementImpl(String localPart,
String prefix,
String nsURI)
Called by SOAPFactory
|
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. |
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 child)
Add a SOAPElement as a child of this SOAPElement instance.
|
SOAPElement |
addChildElement(String name)
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.
|
SOAPElement |
addNamespaceDeclaration(String prefix,
String nsURI)
Adds a namespace declaration with the specified prefix and URI to this SOAPElement object.
|
SOAPElement |
addTextNode(String value)
Creates a new Text object initialized with the given String and adds it to this SOAPElement object.
|
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<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. |
String |
getAttribute(String name) |
Attr |
getAttributeNode(String name) |
Attr |
getAttributeNodeNS(String namespaceURI,
String localName) |
String |
getAttributeNS(String namespaceURI,
String localName) |
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.
|
Iterator<Node> |
getChildElements()
Returns an Iterator over all the immediate child Nodes of this element.
|
Iterator<SOAPElement> |
getChildElements(Name name)
Returns an Iterator over all the immediate child Nodes of this element with the specified name.
|
Iterator<SOAPElement> |
getChildElements(QName qname)
Returns an
Iterator over all the immediate child
Node s of this element with the specified qname. |
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.
|
protected SOAPElement |
getFirstChildElementByLocalName(String localName) |
Iterator<String> |
getNamespacePrefixes()
Returns an Iterator over the namespace prefix Strings declared by this element.
|
String |
getNamespaceURI(String prefix)
Returns the URI of the namespace that has the given prefix.
|
TypeInfo |
getSchemaTypeInfo() |
SOAPEnvelope |
getSOAPEnvelope()
Get the SOAPEnvelope for this SOAPElement
|
String |
getTagName() |
Iterator<String> |
getVisibleNamespacePrefixes()
Returns an Iterator over the namespace prefix Strings visible to this element.
|
boolean |
hasAttribute(String name) |
boolean |
hasAttributeNS(String namespaceURI,
String localName) |
boolean |
removeAttribute(Name name)
Removes the attribute with the specified name.
|
boolean |
removeAttribute(QName qname)
Removes the attribute with the specified qname.
|
void |
removeAttribute(String name) |
Attr |
removeAttributeNode(Attr oldAttr) |
void |
removeAttributeNS(String namespaceURI,
String localName) |
void |
removeContents()
Detaches all children of this SOAPElement.
|
boolean |
removeNamespaceDeclaration(String prefix)
Removes the namespace declaration corresponding to the given prefix.
|
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 qname)
Changes the name of this Element to newName if possible.
|
SOAPElement |
setElementQNameInternal(QName qname) |
void |
setEncodingStyle(String encodingStyle)
Sets the encoding style for this SOAPElement object to one specified.
|
void |
setIdAttribute(String name,
boolean isId) |
void |
setIdAttributeNode(Attr idAttr,
boolean isId) |
void |
setIdAttributeNS(String namespaceURI,
String localName,
boolean isId) |
void |
setPrefix(String prefix) |
void |
writeElement(Writer writer)
The default implementation uses a DOMWriter.
|
protected void |
writeElementContent(Writer out) |
appendChild, cloneNode, compareDocumentPosition, detachNode, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, getValue, hasAttributes, hasChildNodes, hashCode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, recycleNode, removeChild, replaceChild, setNodeValue, setParentElement, setTextContent, setUserData, setValue, toString
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue
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, setTextContent, setUserData
public SOAPElementImpl(String localPart)
public SOAPElementImpl(String localPart, String prefix, String nsURI)
public SOAPElementImpl(Name name)
public SOAPElementImpl(QName qname)
protected SOAPElementImpl(SOAPElementImpl element)
public SOAPEnvelope getSOAPEnvelope()
public QName getElementQName()
SOAPElement
SOAPElement
object.getElementQName
in interface SOAPElement
QName
object with the qname of this
SOAPElement
objectSOAPElement.getElementName()
public SOAPElement setElementQName(QName qname) throws SOAPException
setElementQName
in interface SOAPElement
qname
- the new name for the Element.SOAPException
- if changing the name of this Element is not allowed.public SOAPElement setElementQNameInternal(QName qname) throws SOAPException
SOAPException
public SOAPElement addAttribute(Name name, String value) throws SOAPException
addAttribute
in interface SOAPElement
name
- a Name object with the name of the attributevalue
- a String giving the value of the attributeSOAPException
- if there is an error in creating the AttributeSOAPElement.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 addChildElement(String name) throws SOAPException
addChildElement
in interface SOAPElement
name
- a String giving the local name for the elementSOAPException
- if there is an error in creating the SOAPElement objectpublic SOAPElement addChildElement(String localName, String prefix) throws SOAPException
addChildElement
in interface SOAPElement
localName
- a String giving the local name for the new elementprefix
- a String giving the namespace prefix for the new elementSOAPException
- if there is an error in creating the SOAPElement objectpublic SOAPElement addChildElement(String localName, String prefix, String uri) throws SOAPException
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 belongsSOAPException
- if there is an error in creating the SOAPElement objectpublic SOAPElement addChildElement(Name name) throws SOAPException
addChildElement
in interface SOAPElement
name
- a Name object with the XML name for the new elementSOAPException
- 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(SOAPElement child) throws SOAPException
addChildElement
in interface SOAPElement
child
- the SOAPElement to be added as a new childSOAPException
- if there was an error in adding this element as a childpublic SOAPElement addNamespaceDeclaration(String prefix, String nsURI)
addNamespaceDeclaration
in interface SOAPElement
prefix
- a String giving the prefix of the namespacensURI
- a String giving the uri of the namespaceSOAPException
- if there is an error in creating the namespacepublic SOAPElement addTextNode(String value) throws SOAPException
addTextNode
in interface SOAPElement
value
- a String object with the textual content to be addedSOAPException
- 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 SOAPElementpublic Iterator<Name> getAllAttributes()
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 String getAttributeValue(Name name)
getAttributeValue
in interface SOAPElement
name
- a Name object with the name of the 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 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<Node> getChildElements()
getChildElements
in interface SOAPElement
protected SOAPElement getFirstChildElementByLocalName(String localName)
public Iterator<SOAPElement> getChildElements(Name name)
getChildElements
in interface SOAPElement
name
- a Name object with the name of the child elements to be returnedSOAPElement.getChildElements(javax.xml.namespace.QName)
public Iterator<SOAPElement> 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 Name getElementName()
getElementName
in interface SOAPElement
public Iterator<String> getNamespacePrefixes()
getNamespacePrefixes
in interface SOAPElement
public String getNamespaceURI(String prefix)
getNamespaceURI
in interface SOAPElement
prefix
- a String giving the prefix of the namespace for which to searchpublic Iterator<String> getVisibleNamespacePrefixes()
getVisibleNamespacePrefixes
in interface SOAPElement
public boolean removeAttribute(Name name)
removeAttribute
in interface SOAPElement
name
- the Name object with the name of the attribute to be removedSOAPElement.removeAttribute(javax.xml.namespace.QName)
public boolean removeAttribute(QName qname)
SOAPElement
removeAttribute
in interface SOAPElement
qname
- 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 void removeContents()
removeContents
in interface SOAPElement
public boolean removeNamespaceDeclaration(String prefix)
removeNamespaceDeclaration
in interface SOAPElement
prefix
- a String giving the prefix for which to searchpublic String getEncodingStyle()
getEncodingStyle
in interface SOAPElement
SOAPElement.setEncodingStyle(java.lang.String)
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.http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383495
,
http://www.w3.org/TR/soap12-part1/#soapencattr
public String getTagName()
getTagName
in interface Element
public void removeAttribute(String name) throws DOMException
removeAttribute
in interface Element
DOMException
public boolean hasAttribute(String name)
hasAttribute
in interface Element
public String getAttribute(String name)
getAttribute
in interface Element
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 boolean hasAttributeNS(String namespaceURI, String localName)
hasAttributeNS
in interface Element
public Attr getAttributeNode(String name)
getAttributeNode
in interface Element
public Attr removeAttributeNode(Attr oldAttr) throws DOMException
removeAttributeNode
in interface Element
DOMException
public Attr setAttributeNode(Attr newAttr) throws DOMException
setAttributeNode
in interface Element
DOMException
public Attr setAttributeNodeNS(Attr newAttr) throws DOMException
setAttributeNodeNS
in interface Element
DOMException
public NodeList getElementsByTagName(String name)
getElementsByTagName
in interface Element
public String getAttributeNS(String namespaceURI, String localName)
getAttributeNS
in interface Element
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException
setAttributeNS
in interface Element
DOMException
public Attr getAttributeNodeNS(String namespaceURI, String localName)
getAttributeNodeNS
in interface Element
public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS
in interface Element
public TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo
in interface Element
public void setIdAttribute(String name, boolean isId) throws DOMException
setIdAttribute
in interface Element
DOMException
public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException
setIdAttributeNode
in interface Element
DOMException
public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException
setIdAttributeNS
in interface Element
DOMException
public void setPrefix(String prefix) throws DOMException
setPrefix
in interface Node
setPrefix
in class NodeImpl
DOMException
public void writeElement(Writer writer) throws IOException
IOException
protected void writeElementContent(Writer out) throws IOException
IOException
Copyright © 2018 JBoss by Red Hat. All rights reserved.