public class DTMNodeProxy extends Object implements Node, Document, Text, Element, Attr, ProcessingInstruction, Comment, DocumentFragment
DTMNodeProxy presents a DOM Node API front-end to the DTM model.
It does _not_ attempt to address the "node identity" question; no effort is made to prevent the creation of multiple proxies referring to a single DTM node. Users can create a mechanism for managing this, or relinquish the use of "==" and use the .sameNodeAs() mechanism, which is under consideration for future versions of the DOM.
DTMNodeProxy may be subclassed further to present specific DOM node types.
org.w3c.dom| Modifier and Type | Field and Description |
|---|---|
DTM |
dtm
The DTM for this node.
|
protected String |
fDocumentURI |
| Constructor and Description |
|---|
DTMNodeProxy(DTM dtm,
int node)
Create a DTMNodeProxy Node representing a specific Node in a DTM
|
public final DTM dtm
protected String fDocumentURI
public DTMNodeProxy(DTM dtm, int node)
dtm - The DTM Reference, must be non-null.node - The DTM node handle.public final int getDTMNodeNumber()
public final boolean equals(Node node)
node - A DTM node proxy reference.public final String getNodeName()
getNodeName in interface Nodepublic final String getTarget()
getTarget in interface ProcessingInstructionpublic final String getLocalName()
getLocalName in interface Nodepublic final void setPrefix(String prefix) throws DOMException
setPrefix in interface NodeDOMExceptionpublic final String getNamespaceURI()
getNamespaceURI in interface Nodepublic final boolean isSupported(String feature, String version)
isSupported in interface Nodepublic final String getNodeValue() throws DOMException
getNodeValue in interface NodeDOMExceptionpublic final void setNodeValue(String nodeValue) throws DOMException
setNodeValue in interface NodeDOMExceptionpublic final short getNodeType()
getNodeType in interface Nodepublic final Node getParentNode()
getParentNode in interface Nodepublic final NodeList getChildNodes()
getChildNodes in interface Nodepublic final Node getFirstChild()
getFirstChild in interface Nodepublic final Node getLastChild()
getLastChild in interface Nodepublic final Node getPreviousSibling()
getPreviousSibling in interface Nodepublic final Node getNextSibling()
getNextSibling in interface Nodepublic final NamedNodeMap getAttributes()
getAttributes in interface Nodepublic boolean hasAttribute(String name)
hasAttribute in interface Elementpublic boolean hasAttributeNS(String namespaceURI, String localName)
hasAttributeNS in interface Elementpublic final Document getOwnerDocument()
getOwnerDocument in interface Nodepublic final Node insertBefore(Node newChild, Node refChild) throws DOMException
insertBefore in interface NodeDOMExceptionpublic final Node replaceChild(Node newChild, Node oldChild) throws DOMException
replaceChild in interface NodeDOMExceptionpublic final Node removeChild(Node oldChild) throws DOMException
removeChild in interface NodeDOMExceptionpublic final Node appendChild(Node newChild) throws DOMException
appendChild in interface NodeDOMExceptionpublic final boolean hasChildNodes()
hasChildNodes in interface Nodepublic final DocumentType getDoctype()
getDoctype in interface Documentpublic final DOMImplementation getImplementation()
getImplementation in interface Documentpublic final Element getDocumentElement()
getDocumentElement in interface Documentpublic final Element createElement(String tagName) throws DOMException
createElement in interface DocumentDOMExceptionpublic final DocumentFragment createDocumentFragment()
createDocumentFragment in interface Documentpublic final Text createTextNode(String data)
createTextNode in interface Documentpublic final Comment createComment(String data)
createComment in interface Documentpublic final CDATASection createCDATASection(String data) throws DOMException
createCDATASection in interface DocumentDOMExceptionpublic final ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException
createProcessingInstruction in interface DocumentDOMExceptionpublic final Attr createAttribute(String name) throws DOMException
createAttribute in interface DocumentDOMExceptionpublic final EntityReference createEntityReference(String name) throws DOMException
createEntityReference in interface DocumentDOMExceptionpublic final NodeList getElementsByTagName(String tagname)
getElementsByTagName in interface DocumentgetElementsByTagName in interface Elementpublic final Node importNode(Node importedNode, boolean deep) throws DOMException
importNode in interface DocumentDOMExceptionpublic final Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException
createElementNS in interface DocumentDOMExceptionpublic final Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException
createAttributeNS in interface DocumentDOMExceptionpublic final NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS in interface DocumentgetElementsByTagNameNS in interface Elementpublic final Element getElementById(String elementId)
getElementById in interface Documentpublic final Text splitText(int offset) throws DOMException
splitText in interface TextDOMExceptionpublic final String getData() throws DOMException
getData in interface CharacterDatagetData in interface ProcessingInstructionDOMExceptionpublic final void setData(String data) throws DOMException
setData in interface CharacterDatasetData in interface ProcessingInstructionDOMExceptionpublic final int getLength()
getLength in interface CharacterDatapublic final String substringData(int offset, int count) throws DOMException
substringData in interface CharacterDataDOMExceptionpublic final void appendData(String arg) throws DOMException
appendData in interface CharacterDataDOMExceptionpublic final void insertData(int offset,
String arg)
throws DOMException
insertData in interface CharacterDataDOMExceptionpublic final void deleteData(int offset,
int count)
throws DOMException
deleteData in interface CharacterDataDOMExceptionpublic final void replaceData(int offset,
int count,
String arg)
throws DOMException
replaceData in interface CharacterDataDOMExceptionpublic final String getTagName()
getTagName in interface Elementpublic final String getAttribute(String name)
getAttribute in interface Elementpublic final void setAttribute(String name, String value) throws DOMException
setAttribute in interface ElementDOMExceptionpublic final void removeAttribute(String name) throws DOMException
removeAttribute in interface ElementDOMExceptionpublic final Attr getAttributeNode(String name)
getAttributeNode in interface Elementpublic final Attr setAttributeNode(Attr newAttr) throws DOMException
setAttributeNode in interface ElementDOMExceptionpublic final Attr removeAttributeNode(Attr oldAttr) throws DOMException
removeAttributeNode in interface ElementDOMExceptionpublic boolean hasAttributes()
hasAttributes in interface Nodepublic final String getAttributeNS(String namespaceURI, String localName)
getAttributeNS in interface Elementpublic final void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException
setAttributeNS in interface ElementDOMExceptionpublic final void removeAttributeNS(String namespaceURI, String localName) throws DOMException
removeAttributeNS in interface ElementDOMExceptionpublic final Attr getAttributeNodeNS(String namespaceURI, String localName)
getAttributeNodeNS in interface Elementpublic final Attr setAttributeNodeNS(Attr newAttr) throws DOMException
setAttributeNodeNS in interface ElementDOMExceptionpublic final boolean getSpecified()
getSpecified in interface Attrpublic final Element getOwnerElement()
getOwnerElement in interface Attrpublic Node adoptNode(Node source) throws DOMException
adoptNode in interface DocumentDOMExceptionpublic String getInputEncoding()
getInputEncoding in interface Documentpublic boolean getStrictErrorChecking()
getStrictErrorChecking in interface Documentpublic void setStrictErrorChecking(boolean strictErrorChecking)
setStrictErrorChecking in interface Documentpublic Object setUserData(String key, Object data, UserDataHandler handler)
setUserData in interface Nodepublic Object getUserData(String key)
getUserData in interface Nodepublic Object getFeature(String feature, String version)
getFeature in interface Nodepublic boolean isEqualNode(Node arg)
isEqualNode in interface Nodepublic String lookupNamespaceURI(String specifiedPrefix)
lookupNamespaceURI in interface Nodepublic boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace in interface Nodepublic String lookupPrefix(String namespaceURI)
lookupPrefix in interface Nodepublic boolean isSameNode(Node other)
isSameNode in interface Nodepublic void setTextContent(String textContent) throws DOMException
setTextContent in interface NodeDOMExceptionpublic String getTextContent() throws DOMException
getTextContent in interface NodeDOMExceptionpublic short compareDocumentPosition(Node other) throws DOMException
compareDocumentPosition in interface NodeDOMExceptionpublic String getBaseURI()
getBaseURI in interface Nodepublic Node renameNode(Node n, String namespaceURI, String name) throws DOMException
renameNode in interface DocumentDOMExceptionpublic void normalizeDocument()
normalizeDocument in interface Documentpublic DOMConfiguration getDomConfig()
getDomConfig in interface Documentpublic void setDocumentURI(String documentURI)
setDocumentURI in interface Documentpublic String getDocumentURI()
getDocumentURI in interface Documentpublic Text replaceWholeText(String content) throws DOMException
replaceWholeText in interface TextDOMExceptionpublic String getWholeText()
getWholeText in interface Textpublic boolean isElementContentWhitespace()
isElementContentWhitespace in interface Textpublic void setIdAttribute(String name, boolean makeId)
setIdAttribute in interface Elementpublic void setIdAttributeNode(Attr at, boolean makeId)
setIdAttributeNode in interface Elementpublic void setIdAttributeNS(String namespaceURI, String localName, boolean makeId)
setIdAttributeNS in interface Elementpublic TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo in interface AttrgetSchemaTypeInfo in interface Elementpublic String getXmlEncoding()
getXmlEncoding in interface Documentpublic boolean getXmlStandalone()
getXmlStandalone in interface Documentpublic void setXmlStandalone(boolean xmlStandalone)
throws DOMException
setXmlStandalone in interface DocumentDOMExceptionpublic String getXmlVersion()
getXmlVersion in interface Documentpublic void setXmlVersion(String xmlVersion) throws DOMException
setXmlVersion in interface DocumentDOMExceptionCopyright © 2022. All rights reserved.