Package com.sun.xml.messaging.saaj.soap
Class SOAPDocumentImpl
- java.lang.Object
-
- com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl
-
- All Implemented Interfaces:
SOAPDocument
,jakarta.xml.soap.Node
,Document
,Node
public class SOAPDocumentImpl extends Object implements SOAPDocument, jakarta.xml.soap.Node, Document
-
-
Field Summary
Fields Modifier and Type Field Description protected static Logger
log
static String
SAAJ_NODE
-
Fields inherited from interface org.w3c.dom.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 Summary
Constructors Constructor Description SOAPDocumentImpl(SOAPPartImpl enclosingDocument)
-
Method Summary
-
-
-
Field Detail
-
SAAJ_NODE
public static final String SAAJ_NODE
- See Also:
- Constant Field Values
-
log
protected static final Logger log
-
-
Constructor Detail
-
SOAPDocumentImpl
public SOAPDocumentImpl(SOAPPartImpl enclosingDocument)
-
-
Method Detail
-
getSOAPPart
public SOAPPartImpl getSOAPPart()
- Specified by:
getSOAPPart
in interfaceSOAPDocument
-
getDocument
public SOAPDocumentImpl getDocument()
- Specified by:
getDocument
in interfaceSOAPDocument
-
getDoctype
public DocumentType getDoctype()
- Specified by:
getDoctype
in interfaceDocument
-
getImplementation
public DOMImplementation getImplementation()
- Specified by:
getImplementation
in interfaceDocument
-
getDocumentElement
public Element getDocumentElement()
- Specified by:
getDocumentElement
in interfaceDocument
-
doGetDocumentElement
protected Element doGetDocumentElement()
-
createElement
public Element createElement(String tagName) throws DOMException
- Specified by:
createElement
in interfaceDocument
- Throws:
DOMException
-
createDocumentFragment
public DocumentFragment createDocumentFragment()
- Specified by:
createDocumentFragment
in interfaceDocument
-
createTextNode
public Text createTextNode(String data)
- Specified by:
createTextNode
in interfaceDocument
-
createComment
public Comment createComment(String data)
- Specified by:
createComment
in interfaceDocument
-
createCDATASection
public CDATASection createCDATASection(String data) throws DOMException
- Specified by:
createCDATASection
in interfaceDocument
- Throws:
DOMException
-
createProcessingInstruction
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException
- Specified by:
createProcessingInstruction
in interfaceDocument
- Throws:
DOMException
-
createAttribute
public Attr createAttribute(String name) throws DOMException
- Specified by:
createAttribute
in interfaceDocument
- Throws:
DOMException
-
createEntityReference
public EntityReference createEntityReference(String name) throws DOMException
- Specified by:
createEntityReference
in interfaceDocument
- Throws:
DOMException
-
getElementsByTagName
public NodeList getElementsByTagName(String tagname)
- Specified by:
getElementsByTagName
in interfaceDocument
-
importNode
public Node importNode(Node importedNode, boolean deep) throws DOMException
- Specified by:
importNode
in interfaceDocument
- Throws:
DOMException
-
registerChildNodes
public 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.- Parameters:
parentNode
- node to wrapdeep
- wrap child nodes transitively
-
createElementNS
public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException
- Specified by:
createElementNS
in interfaceDocument
- Throws:
DOMException
-
createAttributeNS
public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException
- Specified by:
createAttributeNS
in interfaceDocument
- Throws:
DOMException
-
getElementsByTagNameNS
public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
- Specified by:
getElementsByTagNameNS
in interfaceDocument
-
getElementById
public Element getElementById(String elementId)
- Specified by:
getElementById
in interfaceDocument
-
getInputEncoding
public String getInputEncoding()
- Specified by:
getInputEncoding
in interfaceDocument
-
getXmlEncoding
public String getXmlEncoding()
- Specified by:
getXmlEncoding
in interfaceDocument
-
getXmlStandalone
public boolean getXmlStandalone()
- Specified by:
getXmlStandalone
in interfaceDocument
-
setXmlStandalone
public void setXmlStandalone(boolean xmlStandalone) throws DOMException
- Specified by:
setXmlStandalone
in interfaceDocument
- Throws:
DOMException
-
getXmlVersion
public String getXmlVersion()
- Specified by:
getXmlVersion
in interfaceDocument
-
setXmlVersion
public void setXmlVersion(String xmlVersion) throws DOMException
- Specified by:
setXmlVersion
in interfaceDocument
- Throws:
DOMException
-
getStrictErrorChecking
public boolean getStrictErrorChecking()
- Specified by:
getStrictErrorChecking
in interfaceDocument
-
setStrictErrorChecking
public void setStrictErrorChecking(boolean strictErrorChecking)
- Specified by:
setStrictErrorChecking
in interfaceDocument
-
getDocumentURI
public String getDocumentURI()
- Specified by:
getDocumentURI
in interfaceDocument
-
setDocumentURI
public void setDocumentURI(String documentURI)
- Specified by:
setDocumentURI
in interfaceDocument
-
adoptNode
public Node adoptNode(Node source) throws DOMException
- Specified by:
adoptNode
in interfaceDocument
- Throws:
DOMException
-
getDomConfig
public DOMConfiguration getDomConfig()
- Specified by:
getDomConfig
in interfaceDocument
-
normalizeDocument
public void normalizeDocument()
- Specified by:
normalizeDocument
in interfaceDocument
-
renameNode
public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException
- Specified by:
renameNode
in interfaceDocument
- Throws:
DOMException
-
getNodeName
public String getNodeName()
- Specified by:
getNodeName
in interfaceNode
-
getNodeValue
public String getNodeValue() throws DOMException
- Specified by:
getNodeValue
in interfaceNode
- Throws:
DOMException
-
setNodeValue
public void setNodeValue(String nodeValue) throws DOMException
- Specified by:
setNodeValue
in interfaceNode
- Throws:
DOMException
-
getNodeType
public short getNodeType()
- Specified by:
getNodeType
in interfaceNode
-
getParentNode
public Node getParentNode()
- Specified by:
getParentNode
in interfaceNode
-
getChildNodes
public NodeList getChildNodes()
- Specified by:
getChildNodes
in interfaceNode
-
getFirstChild
public Node getFirstChild()
- Specified by:
getFirstChild
in interfaceNode
-
getLastChild
public Node getLastChild()
- Specified by:
getLastChild
in interfaceNode
-
getPreviousSibling
public Node getPreviousSibling()
- Specified by:
getPreviousSibling
in interfaceNode
-
getNextSibling
public Node getNextSibling()
- Specified by:
getNextSibling
in interfaceNode
-
getAttributes
public NamedNodeMap getAttributes()
- Specified by:
getAttributes
in interfaceNode
-
getOwnerDocument
public Document getOwnerDocument()
- Specified by:
getOwnerDocument
in interfaceNode
-
insertBefore
public Node insertBefore(Node newChild, Node refChild) throws DOMException
- Specified by:
insertBefore
in interfaceNode
- Throws:
DOMException
-
replaceChild
public Node replaceChild(Node newChild, Node oldChild) throws DOMException
- Specified by:
replaceChild
in interfaceNode
- Throws:
DOMException
-
removeChild
public Node removeChild(Node oldChild) throws DOMException
- Specified by:
removeChild
in interfaceNode
- Throws:
DOMException
-
appendChild
public Node appendChild(Node newChild) throws DOMException
- Specified by:
appendChild
in interfaceNode
- Throws:
DOMException
-
hasChildNodes
public boolean hasChildNodes()
- Specified by:
hasChildNodes
in interfaceNode
-
isSupported
public boolean isSupported(String feature, String version)
- Specified by:
isSupported
in interfaceNode
-
getNamespaceURI
public String getNamespaceURI()
- Specified by:
getNamespaceURI
in interfaceNode
-
setPrefix
public void setPrefix(String prefix) throws DOMException
- Specified by:
setPrefix
in interfaceNode
- Throws:
DOMException
-
getLocalName
public String getLocalName()
- Specified by:
getLocalName
in interfaceNode
-
hasAttributes
public boolean hasAttributes()
- Specified by:
hasAttributes
in interfaceNode
-
getBaseURI
public String getBaseURI()
- Specified by:
getBaseURI
in interfaceNode
-
compareDocumentPosition
public short compareDocumentPosition(Node other) throws DOMException
- Specified by:
compareDocumentPosition
in interfaceNode
- Throws:
DOMException
-
getTextContent
public String getTextContent() throws DOMException
- Specified by:
getTextContent
in interfaceNode
- Throws:
DOMException
-
setTextContent
public void setTextContent(String textContent) throws DOMException
- Specified by:
setTextContent
in interfaceNode
- Throws:
DOMException
-
isSameNode
public boolean isSameNode(Node other)
- Specified by:
isSameNode
in interfaceNode
-
lookupPrefix
public String lookupPrefix(String namespaceURI)
- Specified by:
lookupPrefix
in interfaceNode
-
isDefaultNamespace
public boolean isDefaultNamespace(String namespaceURI)
- Specified by:
isDefaultNamespace
in interfaceNode
-
lookupNamespaceURI
public String lookupNamespaceURI(String prefix)
- Specified by:
lookupNamespaceURI
in interfaceNode
-
isEqualNode
public boolean isEqualNode(Node arg)
- Specified by:
isEqualNode
in interfaceNode
-
getFeature
public Object getFeature(String feature, String version)
- Specified by:
getFeature
in interfaceNode
-
setUserData
public Object setUserData(String key, Object data, UserDataHandler handler)
- Specified by:
setUserData
in interfaceNode
-
getUserData
public Object getUserData(String key)
- Specified by:
getUserData
in interfaceNode
-
getDomDocument
public Document getDomDocument()
-
register
public void register(jakarta.xml.soap.Node node)
Insert a mapping information forNode
-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.- Parameters:
node
- SAAJ wrapper node for w3c DOM node
-
find
public jakarta.xml.soap.Node find(Node node)
Find a soap wrapper for w3c dom node.- Parameters:
node
- w3c dom node nullable- Returns:
- soap wrapper for w3c dom node
-
findIfPresent
public Node findIfPresent(Node node)
If corresponding soap wrapper exists for w3c dom node it is returned, if not passed dom element is returned.- Parameters:
node
- w3c dom node- Returns:
- soap wrapper or passed w3c dom node if not found
-
getDomNode
public Node getDomNode(Node node)
Extracts w3c dom node from corresponding soap wrapper.- Parameters:
node
- soap or dom nullable- Returns:
- dom node
-
getDomElement
public Document getDomElement()
-
getValue
public String getValue()
- Specified by:
getValue
in interfacejakarta.xml.soap.Node
-
setValue
public void setValue(String value)
- Specified by:
setValue
in interfacejakarta.xml.soap.Node
-
setParentElement
public void setParentElement(jakarta.xml.soap.SOAPElement parent) throws jakarta.xml.soap.SOAPException
- Specified by:
setParentElement
in interfacejakarta.xml.soap.Node
- Throws:
jakarta.xml.soap.SOAPException
-
getParentElement
public jakarta.xml.soap.SOAPElement getParentElement()
- Specified by:
getParentElement
in interfacejakarta.xml.soap.Node
-
detachNode
public void detachNode()
- Specified by:
detachNode
in interfacejakarta.xml.soap.Node
-
recycleNode
public void recycleNode()
- Specified by:
recycleNode
in interfacejakarta.xml.soap.Node
-
-