Package com.sun.xml.messaging.saaj.soap
Class SOAPDocumentImpl
- java.lang.Object
-
- com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl
-
- All Implemented Interfaces:
SOAPDocument,javax.xml.soap.Node,Document,Node
public class SOAPDocumentImpl extends Object implements SOAPDocument, javax.xml.soap.Node, Document
-
-
Field Summary
Fields Modifier and Type Field Description protected static Loggerlogstatic StringSAAJ_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:
getSOAPPartin interfaceSOAPDocument
-
getDocument
public SOAPDocumentImpl getDocument()
- Specified by:
getDocumentin interfaceSOAPDocument
-
getDoctype
public DocumentType getDoctype()
- Specified by:
getDoctypein interfaceDocument
-
getImplementation
public DOMImplementation getImplementation()
- Specified by:
getImplementationin interfaceDocument
-
getDocumentElement
public Element getDocumentElement()
- Specified by:
getDocumentElementin interfaceDocument
-
doGetDocumentElement
protected Element doGetDocumentElement()
-
createElement
public Element createElement(String tagName) throws DOMException
- Specified by:
createElementin interfaceDocument- Throws:
DOMException
-
createDocumentFragment
public DocumentFragment createDocumentFragment()
- Specified by:
createDocumentFragmentin interfaceDocument
-
createTextNode
public Text createTextNode(String data)
- Specified by:
createTextNodein interfaceDocument
-
createComment
public Comment createComment(String data)
- Specified by:
createCommentin interfaceDocument
-
createCDATASection
public CDATASection createCDATASection(String data) throws DOMException
- Specified by:
createCDATASectionin interfaceDocument- Throws:
DOMException
-
createProcessingInstruction
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException
- Specified by:
createProcessingInstructionin interfaceDocument- Throws:
DOMException
-
createAttribute
public Attr createAttribute(String name) throws DOMException
- Specified by:
createAttributein interfaceDocument- Throws:
DOMException
-
createEntityReference
public EntityReference createEntityReference(String name) throws DOMException
- Specified by:
createEntityReferencein interfaceDocument- Throws:
DOMException
-
getElementsByTagName
public NodeList getElementsByTagName(String tagname)
- Specified by:
getElementsByTagNamein interfaceDocument
-
importNode
public Node importNode(Node importedNode, boolean deep) throws DOMException
- Specified by:
importNodein 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:
createElementNSin interfaceDocument- Throws:
DOMException
-
createAttributeNS
public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException
- Specified by:
createAttributeNSin interfaceDocument- Throws:
DOMException
-
getElementsByTagNameNS
public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
- Specified by:
getElementsByTagNameNSin interfaceDocument
-
getElementById
public Element getElementById(String elementId)
- Specified by:
getElementByIdin interfaceDocument
-
getInputEncoding
public String getInputEncoding()
- Specified by:
getInputEncodingin interfaceDocument
-
getXmlEncoding
public String getXmlEncoding()
- Specified by:
getXmlEncodingin interfaceDocument
-
getXmlStandalone
public boolean getXmlStandalone()
- Specified by:
getXmlStandalonein interfaceDocument
-
setXmlStandalone
public void setXmlStandalone(boolean xmlStandalone) throws DOMException- Specified by:
setXmlStandalonein interfaceDocument- Throws:
DOMException
-
getXmlVersion
public String getXmlVersion()
- Specified by:
getXmlVersionin interfaceDocument
-
setXmlVersion
public void setXmlVersion(String xmlVersion) throws DOMException
- Specified by:
setXmlVersionin interfaceDocument- Throws:
DOMException
-
getStrictErrorChecking
public boolean getStrictErrorChecking()
- Specified by:
getStrictErrorCheckingin interfaceDocument
-
setStrictErrorChecking
public void setStrictErrorChecking(boolean strictErrorChecking)
- Specified by:
setStrictErrorCheckingin interfaceDocument
-
getDocumentURI
public String getDocumentURI()
- Specified by:
getDocumentURIin interfaceDocument
-
setDocumentURI
public void setDocumentURI(String documentURI)
- Specified by:
setDocumentURIin interfaceDocument
-
adoptNode
public Node adoptNode(Node source) throws DOMException
- Specified by:
adoptNodein interfaceDocument- Throws:
DOMException
-
getDomConfig
public DOMConfiguration getDomConfig()
- Specified by:
getDomConfigin interfaceDocument
-
normalizeDocument
public void normalizeDocument()
- Specified by:
normalizeDocumentin interfaceDocument
-
renameNode
public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException
- Specified by:
renameNodein interfaceDocument- Throws:
DOMException
-
getNodeName
public String getNodeName()
- Specified by:
getNodeNamein interfaceNode
-
getNodeValue
public String getNodeValue() throws DOMException
- Specified by:
getNodeValuein interfaceNode- Throws:
DOMException
-
setNodeValue
public void setNodeValue(String nodeValue) throws DOMException
- Specified by:
setNodeValuein interfaceNode- Throws:
DOMException
-
getNodeType
public short getNodeType()
- Specified by:
getNodeTypein interfaceNode
-
getParentNode
public Node getParentNode()
- Specified by:
getParentNodein interfaceNode
-
getChildNodes
public NodeList getChildNodes()
- Specified by:
getChildNodesin interfaceNode
-
getFirstChild
public Node getFirstChild()
- Specified by:
getFirstChildin interfaceNode
-
getLastChild
public Node getLastChild()
- Specified by:
getLastChildin interfaceNode
-
getPreviousSibling
public Node getPreviousSibling()
- Specified by:
getPreviousSiblingin interfaceNode
-
getNextSibling
public Node getNextSibling()
- Specified by:
getNextSiblingin interfaceNode
-
getAttributes
public NamedNodeMap getAttributes()
- Specified by:
getAttributesin interfaceNode
-
getOwnerDocument
public Document getOwnerDocument()
- Specified by:
getOwnerDocumentin interfaceNode
-
insertBefore
public Node insertBefore(Node newChild, Node refChild) throws DOMException
- Specified by:
insertBeforein interfaceNode- Throws:
DOMException
-
replaceChild
public Node replaceChild(Node newChild, Node oldChild) throws DOMException
- Specified by:
replaceChildin interfaceNode- Throws:
DOMException
-
removeChild
public Node removeChild(Node oldChild) throws DOMException
- Specified by:
removeChildin interfaceNode- Throws:
DOMException
-
appendChild
public Node appendChild(Node newChild) throws DOMException
- Specified by:
appendChildin interfaceNode- Throws:
DOMException
-
hasChildNodes
public boolean hasChildNodes()
- Specified by:
hasChildNodesin interfaceNode
-
isSupported
public boolean isSupported(String feature, String version)
- Specified by:
isSupportedin interfaceNode
-
getNamespaceURI
public String getNamespaceURI()
- Specified by:
getNamespaceURIin interfaceNode
-
setPrefix
public void setPrefix(String prefix) throws DOMException
- Specified by:
setPrefixin interfaceNode- Throws:
DOMException
-
getLocalName
public String getLocalName()
- Specified by:
getLocalNamein interfaceNode
-
hasAttributes
public boolean hasAttributes()
- Specified by:
hasAttributesin interfaceNode
-
getBaseURI
public String getBaseURI()
- Specified by:
getBaseURIin interfaceNode
-
compareDocumentPosition
public short compareDocumentPosition(Node other) throws DOMException
- Specified by:
compareDocumentPositionin interfaceNode- Throws:
DOMException
-
getTextContent
public String getTextContent() throws DOMException
- Specified by:
getTextContentin interfaceNode- Throws:
DOMException
-
setTextContent
public void setTextContent(String textContent) throws DOMException
- Specified by:
setTextContentin interfaceNode- Throws:
DOMException
-
isSameNode
public boolean isSameNode(Node other)
- Specified by:
isSameNodein interfaceNode
-
lookupPrefix
public String lookupPrefix(String namespaceURI)
- Specified by:
lookupPrefixin interfaceNode
-
isDefaultNamespace
public boolean isDefaultNamespace(String namespaceURI)
- Specified by:
isDefaultNamespacein interfaceNode
-
lookupNamespaceURI
public String lookupNamespaceURI(String prefix)
- Specified by:
lookupNamespaceURIin interfaceNode
-
isEqualNode
public boolean isEqualNode(Node arg)
- Specified by:
isEqualNodein interfaceNode
-
getFeature
public Object getFeature(String feature, String version)
- Specified by:
getFeaturein interfaceNode
-
setUserData
public Object setUserData(String key, Object data, UserDataHandler handler)
- Specified by:
setUserDatain interfaceNode
-
getUserData
public Object getUserData(String key)
- Specified by:
getUserDatain interfaceNode
-
getDomDocument
public Document getDomDocument()
-
register
public void register(javax.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 javax.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:
getValuein interfacejavax.xml.soap.Node
-
setValue
public void setValue(String value)
- Specified by:
setValuein interfacejavax.xml.soap.Node
-
setParentElement
public void setParentElement(javax.xml.soap.SOAPElement parent) throws javax.xml.soap.SOAPException- Specified by:
setParentElementin interfacejavax.xml.soap.Node- Throws:
javax.xml.soap.SOAPException
-
getParentElement
public javax.xml.soap.SOAPElement getParentElement()
- Specified by:
getParentElementin interfacejavax.xml.soap.Node
-
detachNode
public void detachNode()
- Specified by:
detachNodein interfacejavax.xml.soap.Node
-
recycleNode
public void recycleNode()
- Specified by:
recycleNodein interfacejavax.xml.soap.Node
-
-