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 | Class and Description |
---|---|
pack-priv static class | DTMNodeProxy.
Inner class to support getDOMImplementation. |
Modifier and Type | Field and Description |
---|---|
protected String | actualEncoding
DOM Level 3 feature: Document actualEncoding |
public DTM | dtm
The DTM for this node. |
private static final String | EMPTYSTRING
The return value as Empty String. |
protected String | fDocumentURI
DOM Level 3 feature: documentURI |
pack-priv static final DOMImplementation | implementation
The DOMImplementation object |
pack-priv int | node
The DTM node handle. |
private String | |
private boolean | |
private String |
Access | Constructor and Description |
---|---|
public | DTMNodeProxy(DTM
The DTM Reference, must be non-null. dtm, int The DTM node handle. node)Create a DTMNodeProxy Node representing a specific Node in a DTM |
Modifier and Type | Method and Description |
---|---|
public Node | adoptNode(Node
The node to move into this document. source)Implements org. NEEDSDOC Method adoptNode NEEDSDOC @param source NEEDSDOC (adoptNode) @return |
public final Node | appendChild(Node newChild)
Implements org. Adds the node |
public final void | appendData(String arg)
Implements org. Append the string to the end of the character data of the node. |
public final Node | cloneNode(boolean deep)
Implements org. Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. |
public short | Returns: Returns how the given node is positioned relatively to this node.The node to compare against this node. other)Implements org. Compares a node with this node with regard to their position in the document. |
public final Attr | createAttribute(String name)
Implements org. Creates an |
public final Attr | createAttributeNS(String namespaceURI, String qualifiedName)
Implements org. Creates an attribute of the given qualified name and namespace URI. |
public final CDATASection | createCDATASection(String data)
Implements org. Creates a |
public final Comment | createComment(String data)
Implements org. Creates a |
public final DocumentFragment | createDocumentFragment()
Implements org. Creates an empty |
public final Element | createElement(String tagName)
Implements org. Creates an element of the type specified. |
public final Element | createElementNS(String namespaceURI, String qualifiedName)
Implements org. Creates an element of the given qualified name and namespace URI. |
public final EntityReference | createEntityReference(String name)
Implements org. Creates an |
public final ProcessingInstruction | createProcessingInstruction(String target, String data)
Implements org. Creates a |
public final Text | createTextNode(String data)
Implements org. Creates a |
public final void | deleteData(int offset, int count)
Implements org. Remove a range of 16-bit units from the node. |
public final boolean | |
public final boolean | Returns: true if the given node has the same handle as this node.A DTM node proxy reference. node)Overrides java. Test for equality based on node number. |
public String | |
public final String | getAttribute(String name)
Implements org. Retrieves an attribute value by name. |
public final Attr | getAttributeNode(String name)
Implements org. Retrieves an attribute node by name. |
public final Attr | getAttributeNodeNS(String namespaceURI, String localName)
Implements org. Retrieves an |
public final String | getAttributeNS(String namespaceURI, String localName)
Implements org. Retrieves an attribute value by local name and namespace URI. |
public final NamedNodeMap | getAttributes()
Implements org. A |
public String | getBaseURI()
Implements org. The absolute base URI of this node or |
public final NodeList | getChildNodes()
Implements org. A |
public final String | getData()
Implements org. The content of this processing instruction. |
public final DocumentType | getDoctype()
Implements org. The Document Type Declaration (see |
public final Element | getDocumentElement()
Implements org. This is a bit of a problem in DTM, since a DTM may be a Document Fragment and hence not have a clear-cut Document Element. |
public String | getDocumentURI()
Implements org. DOM Level 3
The location of the document or |
public DOMConfiguration | getDomConfig()
Implements org. The configuration used when |
public final DTM | |
public final int | |
public final Element | getElementById(String elementId)
Implements org. Returns the |
public final NodeList | getElementsByTagName(String tagname)
Implements org. Returns a |
public final NodeList | getElementsByTagNameNS(String namespaceURI, String localName)
Implements org. Returns a |
public Object | Returns: Returns an object which implements the specialized APIs of the specified feature and version, if any, ornull if
there is no object which implements interfaces associated with that
feature. If the DOMObject returned by this method
implements the Node interface, it must delegate to the
primary core Node and not return results inconsistent
with the primary core Node such as attributes,
childNodes, etc.The name of the feature requested (case-insensitive). feature, String This is the version number of the feature to test. If
the version is version)null or the empty string, supporting
any version of the feature will cause the method to return an
object that supports at least one version of the feature.Implements org. This method returns a specialized object which implements the specialized APIs of the specified feature and version. |
public final Node | |
public final DOMImplementation | getImplementation()
Implements org. The |
public String | |
public final Node | |
public final int | getLength()
Implements org. The number of 16-bit units that are available through |
public final String | getLocalName()
Implements org. Returns the local part of the qualified name of this node. |
public final String | |
public final String | getNamespaceURI()
Implements org. The namespace URI of this node, or |
public final Node | getNextSibling()
Implements org. The node immediately following this node. |
public final String | getNodeName()
Implements org. The name of this node, depending on its type; see the table above. |
public final short | getNodeType()
Implements org. A code representing the type of the underlying object, as defined above. |
public final String | getNodeValue()
Implements org. The value of this node, depending on its type; see the table above. |
public final Document | getOwnerDocument()
Implements org. The |
public final Element | getOwnerElement()
Implements org. Get the owner element of an attribute. |
public final Node | |
public final Node | |
public final String | Returns: The prefix for this node.Implements org. The namespace prefix of this node, or |
public final Node | getPreviousSibling()
Implements org. The node immediately preceding this node. |
public TypeInfo | Returns: TypeInfoImplements org. Method getSchemaTypeInfo. |
public final boolean | getSpecified()
Implements org.
|
public boolean | |
public boolean | |
public final String | |
public final String | |
public final String | getTarget()
Implements org. A PI's "target" states what processor channel the PI's data should be directed to. |
public String | getTextContent()
Implements org. This attribute returns the text content of this node and its descendants. |
public Object | Returns: Returns theDOMObject associated to the given key
on this node, or null if there was none.The key the object is associated to. key)Implements org. Retrieves the object associated to a key on a this node. |
public final String | getValue()
Implements org. On retrieval, the value of the attribute is returned as a string. |
public String | |
public String | getWholeText()
Implements org. DOM Level 3
Returns all text of |
public String | getXmlEncoding()
Implements org. An attribute specifying, as part of the XML declaration, the encoding of this document. |
public boolean | getXmlStandalone()
Implements org. An attribute specifying, as part of the XML declaration, whether this document is standalone. |
public String | getXmlVersion()
Implements org. An attribute specifying, as part of the XML declaration, the version number of this document. |
public boolean | |
public boolean | hasAttributeNS(String namespaceURI, String localName)
Implements org. Method hasAttributeNS |
public boolean | |
public final boolean | hasChildNodes()
Implements org. Returns whether this node has any children. |
public int | |
public final Node | importNode(Node importedNode, boolean deep)
Implements org. Imports a node from another document to this document, without altering or removing the source node from the original document; this method creates a new copy of the source node. |
public final Node | insertBefore(Node newChild, Node refChild)
Implements org. Inserts the node |
public final void | insertData(int offset, String arg)
Implements org. Insert a string at the specified 16-bit unit offset. |
public boolean | Returns: true if the specified namespaceURI
is the default namespace, false otherwise.The namespace URI to look for. namespaceURI)Implements org. DOM Level 3
This method checks if the specified |
public boolean | isElementContentWhitespace()
Implements org. DOM Level 3 Returns whether this text node contains whitespace in element content, often abusively called "ignorable whitespace". |
public boolean | Returns: If the nodes, and possibly subtrees are equal,true otherwise false .The node to compare equality with. arg)Implements org. Tests whether two nodes are equal. |
public boolean | isId()
Implements org. Returns whether this attribute is known to be of type ID (i.e. to contain an identifier for its owner element) or not. |
public boolean | Returns: Returnstrue if the nodes are the same,
false otherwise.The node to test against. other)Implements org. Returns whether this node is the same node as the given one. |
public final boolean | Returns: falseImplements org. Ask whether we support a given DOM feature. |
public String | Returns: th URI for the namespaceThe prefix to look for. If this parameter is
specifiedPrefix)null , the method will return the default namespace URI
if any.Implements org. DOM Level 3 Look up the namespace URI associated to the given prefix, starting from this node. |
public String | Returns: the prefix for the namespaceImplements org. DOM Level 3 Look up the prefix associated to the given namespace URI, starting from this node. |
public final void | normalize()
Implements org. Puts all |
public void | normalizeDocument()
Implements org. DOM Level 3 Normalize document. |
public final void | removeAttribute(String name)
Implements org. Removes an attribute by name. |
public final Attr | removeAttributeNode(Attr oldAttr)
Implements org. Removes the specified attribute node. |
public final void | removeAttributeNS(String namespaceURI, String localName)
Implements org. Removes an attribute by local name and namespace URI. |
public final Node | removeChild(Node oldChild)
Implements org. Removes the child node indicated by |
public Node | renameNode(Node
The node to rename. n, String The new namespace URI. namespaceURI, String The new qualified name. name)Implements org. DOM Level 3 Renaming node |
public final Node | replaceChild(Node newChild, Node oldChild)
Implements org. Replaces the child node |
public final void | replaceData(int offset, int count, String arg)
Implements org. Replace the characters starting at the specified 16-bit unit offset with the specified string. |
public Text | replaceWholeText(String
The content of the replacing content)Text node.Implements org. DOM Level 3 |
public final boolean | Returns: true if the given node has the same handle as this node.FUTURE DOM: Test node identity, in lieu of Node==Node |
public void | setActualEncoding(String value)
DOM Level 3 An attribute specifying the actual encoding of this document. |
public final void | setAttribute(String name, String value)
Implements org. Adds a new attribute. |
public final Attr | setAttributeNode(Attr newAttr)
Implements org. Adds a new attribute node. |
public final Attr | setAttributeNodeNS(Attr newAttr)
Implements org. Adds a new attribute. |
public final void | setAttributeNS(String namespaceURI, String qualifiedName, String value)
Implements org. Adds a new attribute. |
public final void | setData(String data)
Implements org. The content of this processing instruction. |
public void | |
public void | |
public void | |
public void | setIdAttribute(String
The name of the attribute. name, boolean Whether the attribute is a of type ID. makeId)Implements org. DOM Level 3: register the given attribute node as an ID attribute |
public void | setIdAttributeNode(Attr
The attribute node. at, boolean Whether the attribute is a of type ID. makeId)Implements org. DOM Level 3: register the given attribute node as an ID attribute |
public void | setIdAttributeNS(String
The namespace URI of the attribute. namespaceURI, String The local name of the attribute. localName, boolean Whether the attribute is a of type ID. makeId)Implements org. DOM Level 3: register the given attribute node as an ID attribute |
public final void | setNodeValue(String nodeValue)
Implements org. The value of this node, depending on its type; see the table above. |
public final void | setPrefix(String prefix)
Implements org. The namespace prefix of this node, or |
public void | |
public void | setStrictErrorChecking(boolean strictErrorChecking)
Implements org. EXPERIMENTAL! |
public void | setTextContent(String textContent)
Implements org. This attribute returns the text content of this node and its descendants. |
public Object | setUserData(String
The key to associate the object to. key, Object The object to associate to the given key, or
data, UserDataHandler null to remove any existing association to that key.The handler to associate to that key, or
handler)null .Implements org. Associate an object to a key on this node. |
public final void | setValue(String value)
Implements org. On retrieval, the value of the attribute is returned as a string. |
public void | |
public void | |
public void | setXmlStandalone(boolean xmlStandalone)
Implements org. An attribute specifying, as part of the XML declaration, whether this document is standalone. |
public void | setXmlVersion(String xmlVersion)
Implements org. An attribute specifying, as part of the XML declaration, the version number of this document. |
public final Text | splitText(int offset)
Implements org. Breaks this node into two nodes at the specified |
public final String | substringData(int offset, int count)
Implements org. Extracts a range of data from the node. |
public final boolean | |
private final void | traverseChildren(List<Node> listVector, Node tempNode, String tagname, boolean
Private method to be used for recursive iterations to obtain elements by tag name. isTagNameWildCard)
|
private final void |