public class SOAPDocumentImpl extends Object implements SOAPDocument, Node, Document
Modifier and Type | Field and Description |
---|---|
protected static Logger |
log |
static String |
SAAJ_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 and Description |
---|
SOAPDocumentImpl(SOAPPartImpl enclosingDocument) |
Modifier and Type | Method and Description |
---|---|
Node |
adoptNode(Node source) |
Node |
appendChild(Node newChild) |
Node |
cloneNode(boolean deep) |
short |
compareDocumentPosition(Node other) |
Attr |
createAttribute(String name) |
Attr |
createAttributeNS(String namespaceURI,
String qualifiedName) |
CDATASection |
createCDATASection(String data) |
Comment |
createComment(String data) |
DocumentFragment |
createDocumentFragment() |
Element |
createElement(String tagName) |
Element |
createElementNS(String namespaceURI,
String qualifiedName) |
EntityReference |
createEntityReference(String name) |
ProcessingInstruction |
createProcessingInstruction(String target,
String data) |
Text |
createTextNode(String data) |
void |
detachNode()
Removes this
Node object from the tree. |
protected Element |
doGetDocumentElement() |
Node |
find(Node node)
Find a soap wrapper for w3c dom node.
|
Node |
findIfPresent(Node node)
If corresponding soap wrapper exists for w3c dom node it is returned,
if not passed dom element is returned.
|
NamedNodeMap |
getAttributes() |
String |
getBaseURI() |
NodeList |
getChildNodes() |
DocumentType |
getDoctype() |
SOAPDocumentImpl |
getDocument() |
Element |
getDocumentElement() |
String |
getDocumentURI() |
DOMConfiguration |
getDomConfig() |
Document |
getDomDocument() |
Document |
getDomElement() |
Node |
getDomNode(Node node)
Extracts w3c dom node from corresponding soap wrapper.
|
Element |
getElementById(String elementId) |
NodeList |
getElementsByTagName(String tagname) |
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName) |
Object |
getFeature(String feature,
String version) |
Node |
getFirstChild() |
DOMImplementation |
getImplementation() |
String |
getInputEncoding() |
Node |
getLastChild() |
String |
getLocalName() |
String |
getNamespaceURI() |
Node |
getNextSibling() |
String |
getNodeName() |
short |
getNodeType() |
String |
getNodeValue() |
Document |
getOwnerDocument() |
SOAPElement |
getParentElement()
Returns the parent element of this
Node object. |
Node |
getParentNode() |
String |
getPrefix() |
Node |
getPreviousSibling() |
SOAPPartImpl |
getSOAPPart() |
boolean |
getStrictErrorChecking() |
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. |
String |
getXmlEncoding() |
boolean |
getXmlStandalone() |
String |
getXmlVersion() |
boolean |
hasAttributes() |
boolean |
hasChildNodes() |
Node |
importNode(Node importedNode,
boolean deep) |
Node |
insertBefore(Node newChild,
Node refChild) |
boolean |
isDefaultNamespace(String namespaceURI) |
boolean |
isEqualNode(Node arg) |
boolean |
isSameNode(Node other) |
boolean |
isSupported(String feature,
String version) |
String |
lookupNamespaceURI(String prefix) |
String |
lookupPrefix(String namespaceURI) |
void |
normalize() |
void |
normalizeDocument() |
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. |
void |
register(Node node)
|
void |
registerChildNodes(Node parentNode,
boolean deep)
If the parentNode is not registered to domToSoap, create soap wapper for parentNode and register it to domToSoap
If deep = true, also register all children transitively of parentNode to domToSoap map.
|
Node |
removeChild(Node oldChild) |
Node |
renameNode(Node n,
String namespaceURI,
String qualifiedName) |
Node |
replaceChild(Node newChild,
Node oldChild) |
void |
setDocumentURI(String documentURI) |
void |
setNodeValue(String nodeValue) |
void |
setParentElement(SOAPElement parent)
Sets the parent of this
Node object to the given
SOAPElement object. |
void |
setPrefix(String prefix) |
void |
setStrictErrorChecking(boolean strictErrorChecking) |
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 |
setXmlStandalone(boolean xmlStandalone) |
void |
setXmlVersion(String xmlVersion) |
public static final String SAAJ_NODE
protected static final Logger log
public SOAPDocumentImpl(SOAPPartImpl enclosingDocument)
public SOAPPartImpl getSOAPPart()
getSOAPPart
in interface SOAPDocument
public SOAPDocumentImpl getDocument()
getDocument
in interface SOAPDocument
public DocumentType getDoctype()
getDoctype
in interface Document
public DOMImplementation getImplementation()
getImplementation
in interface Document
public Element getDocumentElement()
getDocumentElement
in interface Document
protected Element doGetDocumentElement()
public Element createElement(String tagName) throws DOMException
createElement
in interface Document
DOMException
public DocumentFragment createDocumentFragment()
createDocumentFragment
in interface Document
public Text createTextNode(String data)
createTextNode
in interface Document
public Comment createComment(String data)
createComment
in interface Document
public CDATASection createCDATASection(String data) throws DOMException
createCDATASection
in interface Document
DOMException
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException
createProcessingInstruction
in interface Document
DOMException
public Attr createAttribute(String name) throws DOMException
createAttribute
in interface Document
DOMException
public EntityReference createEntityReference(String name) throws DOMException
createEntityReference
in interface Document
DOMException
public NodeList getElementsByTagName(String tagname)
getElementsByTagName
in interface Document
public Node importNode(Node importedNode, boolean deep) throws DOMException
importNode
in interface Document
DOMException
public void registerChildNodes(Node parentNode, boolean deep)
parentNode
- node to wrapdeep
- wrap child nodes transitivelypublic Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException
createElementNS
in interface Document
DOMException
public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException
createAttributeNS
in interface Document
DOMException
public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS
in interface Document
public Element getElementById(String elementId)
getElementById
in interface Document
public String getInputEncoding()
getInputEncoding
in interface Document
public String getXmlEncoding()
getXmlEncoding
in interface Document
public boolean getXmlStandalone()
getXmlStandalone
in interface Document
public void setXmlStandalone(boolean xmlStandalone) throws DOMException
setXmlStandalone
in interface Document
DOMException
public String getXmlVersion()
getXmlVersion
in interface Document
public void setXmlVersion(String xmlVersion) throws DOMException
setXmlVersion
in interface Document
DOMException
public boolean getStrictErrorChecking()
getStrictErrorChecking
in interface Document
public void setStrictErrorChecking(boolean strictErrorChecking)
setStrictErrorChecking
in interface Document
public String getDocumentURI()
getDocumentURI
in interface Document
public void setDocumentURI(String documentURI)
setDocumentURI
in interface Document
public Node adoptNode(Node source) throws DOMException
adoptNode
in interface Document
DOMException
public DOMConfiguration getDomConfig()
getDomConfig
in interface Document
public void normalizeDocument()
normalizeDocument
in interface Document
public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException
renameNode
in interface Document
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 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 Document getDomDocument()
public void register(Node node)
Node
- Node
.
In SAAJ, elements in DOM are expected to be interfaces of SAAJ, on the other hand in JDKs Xerces,
they are casted to internal impl classes. After removal of SAAJ dependency
to JDKs internal classes elements in DOM can never be both of them.node
- SAAJ wrapper node for w3c DOM nodepublic Node find(Node node)
node
- w3c dom node nullablepublic Node findIfPresent(Node node)
node
- w3c dom nodepublic Node getDomNode(Node node)
node
- soap or dom nullablepublic Document getDomElement()
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.public void setParentElement(SOAPElement parent) throws SOAPException
Node
Node
object to the given
SOAPElement
object.parent
- 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()
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)
public void detachNode()
Node
Node
object from the tree.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.
Copyright © 2021 JBoss by Red Hat. All rights reserved.