|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.dtm.ref.DTMNodeProxy
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
Nested Class Summary | |
(package private) static class |
DTMNodeProxy.DTMNodeProxyImplementation
Inner class to support getDOMImplementation. |
Field Summary | |
DTM |
dtm
The DTM for this node. |
(package private) static org.w3c.dom.DOMImplementation |
implementation
The DOMImplementation object |
(package private) int |
node
The DTM node handle. |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
(package private) |
DTMNodeProxy(DTM dtm,
int node)
Create a DTMNodeProxy Node representing a specific Node in a DTM |
Method Summary | |
org.w3c.dom.Node |
adoptNode(org.w3c.dom.Node source)
NEEDSDOC Method adoptNode NEEDSDOC @param source NEEDSDOC (adoptNode) @return |
org.w3c.dom.Node |
appendChild(org.w3c.dom.Node newChild)
|
void |
appendData(String arg)
|
org.w3c.dom.Node |
cloneNode(boolean deep)
|
org.w3c.dom.Attr |
createAttribute(String name)
|
org.w3c.dom.Attr |
createAttributeNS(String namespaceURI,
String qualifiedName)
|
org.w3c.dom.CDATASection |
createCDATASection(String data)
|
org.w3c.dom.Comment |
createComment(String data)
|
org.w3c.dom.DocumentFragment |
createDocumentFragment()
|
org.w3c.dom.Element |
createElement(String tagName)
|
org.w3c.dom.Element |
createElementNS(String namespaceURI,
String qualifiedName)
|
org.w3c.dom.EntityReference |
createEntityReference(String name)
|
org.w3c.dom.ProcessingInstruction |
createProcessingInstruction(String target,
String data)
|
org.w3c.dom.Text |
createTextNode(String data)
|
void |
deleteData(int offset,
int count)
|
boolean |
equals(org.w3c.dom.Node node)
Test for equality based on node number. |
boolean |
equals(Object node)
Test for equality based on node number. |
String |
getAttribute(String name)
|
org.w3c.dom.Attr |
getAttributeNode(String name)
|
org.w3c.dom.Attr |
getAttributeNodeNS(String namespaceURI,
String localName)
|
String |
getAttributeNS(String namespaceURI,
String localName)
|
org.w3c.dom.NamedNodeMap |
getAttributes()
|
org.w3c.dom.NodeList |
getChildNodes()
|
String |
getData()
|
org.w3c.dom.DocumentType |
getDoctype()
|
org.w3c.dom.Element |
getDocumentElement()
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. |
DTM |
getDTM()
NON-DOM: Return the DTM model |
int |
getDTMNodeNumber()
NON-DOM: Return the DTM node number |
org.w3c.dom.Element |
getElementById(String elementId)
|
org.w3c.dom.NodeList |
getElementsByTagName(String tagname)
|
org.w3c.dom.NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName)
|
String |
getEncoding()
EXPERIMENTAL! |
org.w3c.dom.Node |
getFirstChild()
|
org.w3c.dom.DOMImplementation |
getImplementation()
|
org.w3c.dom.Node |
getLastChild()
|
int |
getLength()
|
String |
getLocalName()
|
String |
getName()
|
String |
getNamespaceURI()
|
org.w3c.dom.Node |
getNextSibling()
|
String |
getNodeName()
|
short |
getNodeType()
|
String |
getNodeValue()
|
org.w3c.dom.Document |
getOwnerDocument()
|
org.w3c.dom.Element |
getOwnerElement()
Get the owner element of an attribute. |
org.w3c.dom.Node |
getOwnerNode()
|
org.w3c.dom.Node |
getParentNode()
|
String |
getPrefix()
|
org.w3c.dom.Node |
getPreviousSibling()
|
boolean |
getSpecified()
|
boolean |
getStandalone()
EXPERIMENTAL! |
boolean |
getStrictErrorChecking()
EXPERIMENTAL! |
String |
getStringValue()
|
String |
getTagName()
|
String |
getTarget()
A PI's "target" states what processor channel the PI's data should be directed to. |
String |
getValue()
|
String |
getVersion()
EXPERIMENTAL! |
boolean |
hasAttribute(String name)
Method hasAttribute |
boolean |
hasAttributeNS(String name,
String x)
Method hasAttributeNS |
boolean |
hasAttributes()
Introduced in DOM Level 2. |
boolean |
hasChildNodes()
|
org.w3c.dom.Node |
importNode(org.w3c.dom.Node importedNode,
boolean deep)
|
org.w3c.dom.Node |
insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
|
void |
insertData(int offset,
String arg)
|
boolean |
isSupported(String feature,
String version)
Ask whether we support a given DOM feature. |
void |
normalize()
|
void |
removeAttribute(String name)
|
org.w3c.dom.Attr |
removeAttributeNode(org.w3c.dom.Attr oldAttr)
|
void |
removeAttributeNS(String namespaceURI,
String localName)
|
org.w3c.dom.Node |
removeChild(org.w3c.dom.Node oldChild)
|
org.w3c.dom.Node |
replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild)
|
void |
replaceData(int offset,
int count,
String arg)
|
boolean |
sameNodeAs(org.w3c.dom.Node other)
FUTURE DOM: Test node identity, in lieu of Node==Node |
void |
setAttribute(String name,
String value)
|
org.w3c.dom.Attr |
setAttributeNode(org.w3c.dom.Attr newAttr)
|
org.w3c.dom.Attr |
setAttributeNodeNS(org.w3c.dom.Attr newAttr)
|
void |
setAttributeNS(String namespaceURI,
String qualifiedName,
String value)
|
void |
setData(String data)
|
void |
setEncoding(String encoding)
EXPERIMENTAL! |
void |
setNodeValue(String nodeValue)
|
void |
setPrefix(String prefix)
|
void |
setStandalone(boolean standalone)
EXPERIMENTAL! |
void |
setStrictErrorChecking(boolean strictErrorChecking)
EXPERIMENTAL! |
void |
setValue(String value)
|
void |
setVersion(String version)
EXPERIMENTAL! |
org.w3c.dom.Text |
splitText(int offset)
|
String |
substringData(int offset,
int count)
|
boolean |
supports(String feature,
String version)
Ask whether we support a given DOM feature. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public DTM dtm
int node
static final org.w3c.dom.DOMImplementation implementation
Constructor Detail |
DTMNodeProxy(DTM dtm, int node)
dtm
- The DTM Reference, must be non-null.node
- The DTM node handle.Method Detail |
public final DTM getDTM()
public final int getDTMNodeNumber()
public final boolean equals(org.w3c.dom.Node node)
node
- A DTM node proxy reference.
public final boolean equals(Object node)
equals
in class Object
node
- A DTM node proxy reference.
Object.hashCode()
,
Hashtable
public final boolean sameNodeAs(org.w3c.dom.Node other)
other
-
public final String getNodeName()
getNodeName
in interface org.w3c.dom.Node
Node
public final String getTarget()
In XML, a PI's "target" is the first (whitespace-delimited) token following the "" token that begins the PI.
In HTML, target is always null.
Note that getNodeName is aliased to getTarget.
getTarget
in interface org.w3c.dom.ProcessingInstruction
public final String getLocalName()
getLocalName
in interface org.w3c.dom.Node
as of DOM Level 2
public final String getPrefix()
getPrefix
in interface org.w3c.dom.Node
as of DOM Level 2
public final void setPrefix(String prefix) throws org.w3c.dom.DOMException
setPrefix
in interface org.w3c.dom.Node
prefix
-
org.w3c.dom.DOMException
as of DOM Level 2 -- DTMNodeProxy is read-only
public final String getNamespaceURI()
getNamespaceURI
in interface org.w3c.dom.Node
as of DOM Level 2
public final boolean supports(String feature, String version)
feature
- version
-
public final boolean isSupported(String feature, String version)
isSupported
in interface org.w3c.dom.Node
feature
- version
-
as of DOM Level 2
public final String getNodeValue() throws org.w3c.dom.DOMException
getNodeValue
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
Node
public final String getStringValue() throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public final void setNodeValue(String nodeValue) throws org.w3c.dom.DOMException
setNodeValue
in interface org.w3c.dom.Node
nodeValue
-
org.w3c.dom.DOMException
-- DTMNodeProxy is read-only
public final short getNodeType()
getNodeType
in interface org.w3c.dom.Node
Node
public final org.w3c.dom.Node getParentNode()
getParentNode
in interface org.w3c.dom.Node
Node
public final org.w3c.dom.Node getOwnerNode()
Node
public final org.w3c.dom.NodeList getChildNodes()
getChildNodes
in interface org.w3c.dom.Node
Node
public final org.w3c.dom.Node getFirstChild()
getFirstChild
in interface org.w3c.dom.Node
Node
public final org.w3c.dom.Node getLastChild()
getLastChild
in interface org.w3c.dom.Node
Node
public final org.w3c.dom.Node getPreviousSibling()
getPreviousSibling
in interface org.w3c.dom.Node
Node
public final org.w3c.dom.Node getNextSibling()
getNextSibling
in interface org.w3c.dom.Node
Node
public final org.w3c.dom.NamedNodeMap getAttributes()
getAttributes
in interface org.w3c.dom.Node
Node
public boolean hasAttribute(String name)
hasAttribute
in interface org.w3c.dom.Element
name
- (hasAttribute) @returnpublic boolean hasAttributeNS(String name, String x)
hasAttributeNS
in interface org.w3c.dom.Element
name
- x
- (hasAttributeNS) @returnpublic final org.w3c.dom.Document getOwnerDocument()
getOwnerDocument
in interface org.w3c.dom.Node
Node
public final org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild) throws org.w3c.dom.DOMException
insertBefore
in interface org.w3c.dom.Node
newChild
- refChild
-
org.w3c.dom.DOMException
-- DTMNodeProxy is read-only
public final org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
replaceChild
in interface org.w3c.dom.Node
newChild
- oldChild
-
org.w3c.dom.DOMException
-- DTMNodeProxy is read-only
public final org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
removeChild
in interface org.w3c.dom.Node
oldChild
-
org.w3c.dom.DOMException
-- DTMNodeProxy is read-only
public final org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild) throws org.w3c.dom.DOMException
appendChild
in interface org.w3c.dom.Node
newChild
-
org.w3c.dom.DOMException
-- DTMNodeProxy is read-only
public final boolean hasChildNodes()
hasChildNodes
in interface org.w3c.dom.Node
Node
public final org.w3c.dom.Node cloneNode(boolean deep)
cloneNode
in interface org.w3c.dom.Node
deep
-
-- DTMNodeProxy is read-only
public final org.w3c.dom.DocumentType getDoctype()
getDoctype
in interface org.w3c.dom.Document
Document
public final org.w3c.dom.DOMImplementation getImplementation()
getImplementation
in interface org.w3c.dom.Document
Document
public final org.w3c.dom.Element getDocumentElement()
getDocumentElement
in interface org.w3c.dom.Document
Document
public final org.w3c.dom.Element createElement(String tagName) throws org.w3c.dom.DOMException
createElement
in interface org.w3c.dom.Document
tagName
-
org.w3c.dom.DOMException
Document
public final org.w3c.dom.DocumentFragment createDocumentFragment()
createDocumentFragment
in interface org.w3c.dom.Document
Document
public final org.w3c.dom.Text createTextNode(String data)
createTextNode
in interface org.w3c.dom.Document
data
-
Document
public final org.w3c.dom.Comment createComment(String data)
createComment
in interface org.w3c.dom.Document
data
-
Document
public final org.w3c.dom.CDATASection createCDATASection(String data) throws org.w3c.dom.DOMException
createCDATASection
in interface org.w3c.dom.Document
data
-
org.w3c.dom.DOMException
Document
public final org.w3c.dom.ProcessingInstruction createProcessingInstruction(String target, String data) throws org.w3c.dom.DOMException
createProcessingInstruction
in interface org.w3c.dom.Document
target
- data
-
org.w3c.dom.DOMException
Document
public final org.w3c.dom.Attr createAttribute(String name) throws org.w3c.dom.DOMException
createAttribute
in interface org.w3c.dom.Document
name
-
org.w3c.dom.DOMException
Document
public final org.w3c.dom.EntityReference createEntityReference(String name) throws org.w3c.dom.DOMException
createEntityReference
in interface org.w3c.dom.Document
name
-
org.w3c.dom.DOMException
Document
public final org.w3c.dom.NodeList getElementsByTagName(String tagname)
getElementsByTagName
in interface org.w3c.dom.Document
tagname
-
Document
public final org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode, boolean deep) throws org.w3c.dom.DOMException
importNode
in interface org.w3c.dom.Document
importedNode
- deep
-
org.w3c.dom.DOMException
as of DOM Level 2 -- DTMNodeProxy is read-only
public final org.w3c.dom.Element createElementNS(String namespaceURI, String qualifiedName) throws org.w3c.dom.DOMException
createElementNS
in interface org.w3c.dom.Document
namespaceURI
- qualifiedName
-
org.w3c.dom.DOMException
as of DOM Level 2
public final org.w3c.dom.Attr createAttributeNS(String namespaceURI, String qualifiedName) throws org.w3c.dom.DOMException
createAttributeNS
in interface org.w3c.dom.Document
namespaceURI
- qualifiedName
-
org.w3c.dom.DOMException
as of DOM Level 2
public final org.w3c.dom.NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS
in interface org.w3c.dom.Document
namespaceURI
- localName
-
as of DOM Level 2
public final org.w3c.dom.Element getElementById(String elementId)
getElementById
in interface org.w3c.dom.Document
elementId
-
as of DOM Level 2
public final org.w3c.dom.Text splitText(int offset) throws org.w3c.dom.DOMException
splitText
in interface org.w3c.dom.Text
offset
-
org.w3c.dom.DOMException
Text
public final String getData() throws org.w3c.dom.DOMException
getData
in interface org.w3c.dom.CharacterData
org.w3c.dom.DOMException
CharacterData
public final void setData(String data) throws org.w3c.dom.DOMException
setData
in interface org.w3c.dom.CharacterData
data
-
org.w3c.dom.DOMException
CharacterData
public final int getLength()
getLength
in interface org.w3c.dom.CharacterData
CharacterData
public final String substringData(int offset, int count) throws org.w3c.dom.DOMException
substringData
in interface org.w3c.dom.CharacterData
offset
- count
-
org.w3c.dom.DOMException
CharacterData
public final void appendData(String arg) throws org.w3c.dom.DOMException
appendData
in interface org.w3c.dom.CharacterData
arg
-
org.w3c.dom.DOMException
CharacterData
public final void insertData(int offset, String arg) throws org.w3c.dom.DOMException
insertData
in interface org.w3c.dom.CharacterData
offset
- arg
-
org.w3c.dom.DOMException
CharacterData
public final void deleteData(int offset, int count) throws org.w3c.dom.DOMException
deleteData
in interface org.w3c.dom.CharacterData
offset
- count
-
org.w3c.dom.DOMException
CharacterData
public final void replaceData(int offset, int count, String arg) throws org.w3c.dom.DOMException
replaceData
in interface org.w3c.dom.CharacterData
offset
- count
- arg
-
org.w3c.dom.DOMException
CharacterData
public final String getTagName()
getTagName
in interface org.w3c.dom.Element
Element
public final String getAttribute(String name)
getAttribute
in interface org.w3c.dom.Element
name
-
Element
public final void setAttribute(String name, String value) throws org.w3c.dom.DOMException
setAttribute
in interface org.w3c.dom.Element
name
- value
-
org.w3c.dom.DOMException
Element
public final void removeAttribute(String name) throws org.w3c.dom.DOMException
removeAttribute
in interface org.w3c.dom.Element
name
-
org.w3c.dom.DOMException
Element
public final org.w3c.dom.Attr getAttributeNode(String name)
getAttributeNode
in interface org.w3c.dom.Element
name
-
Element
public final org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr newAttr) throws org.w3c.dom.DOMException
setAttributeNode
in interface org.w3c.dom.Element
newAttr
-
org.w3c.dom.DOMException
Element
public final org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr oldAttr) throws org.w3c.dom.DOMException
removeAttributeNode
in interface org.w3c.dom.Element
oldAttr
-
org.w3c.dom.DOMException
Element
public boolean hasAttributes()
hasAttributes
in interface org.w3c.dom.Node
public final void normalize()
normalize
in interface org.w3c.dom.Node
Element
public final String getAttributeNS(String namespaceURI, String localName)
getAttributeNS
in interface org.w3c.dom.Element
namespaceURI
- localName
-
Element
public final void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws org.w3c.dom.DOMException
setAttributeNS
in interface org.w3c.dom.Element
namespaceURI
- qualifiedName
- value
-
org.w3c.dom.DOMException
Element
public final void removeAttributeNS(String namespaceURI, String localName) throws org.w3c.dom.DOMException
removeAttributeNS
in interface org.w3c.dom.Element
namespaceURI
- localName
-
org.w3c.dom.DOMException
Element
public final org.w3c.dom.Attr getAttributeNodeNS(String namespaceURI, String localName)
getAttributeNodeNS
in interface org.w3c.dom.Element
namespaceURI
- localName
-
Element
public final org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr newAttr) throws org.w3c.dom.DOMException
setAttributeNodeNS
in interface org.w3c.dom.Element
newAttr
-
org.w3c.dom.DOMException
Element
public final String getName()
getName
in interface org.w3c.dom.Attr
Attr
public final boolean getSpecified()
getSpecified
in interface org.w3c.dom.Attr
Attr
public final String getValue()
getValue
in interface org.w3c.dom.Attr
Attr
public final void setValue(String value)
setValue
in interface org.w3c.dom.Attr
value
- Attr
public final org.w3c.dom.Element getOwnerElement()
getOwnerElement
in interface org.w3c.dom.Attr
as of DOM Level 2
public org.w3c.dom.Node adoptNode(org.w3c.dom.Node source) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public String getEncoding()
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying, as part of the XML declaration, the encoding
of this document. This is null
when unspecified.
public void setEncoding(String encoding)
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying, as part of the XML declaration, the encoding
of this document. This is null
when unspecified.
public boolean getStandalone()
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying, as part of the XML declaration, whether this document is standalone.
public void setStandalone(boolean standalone)
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying, as part of the XML declaration, whether this document is standalone.
public boolean getStrictErrorChecking()
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying whether errors checking is enforced or not.
When set to false
, the implementation is free to not
test every possible error case normally defined on DOM operations,
and not raise any DOMException
. In case of error, the
behavior is undefined. This attribute is true
by
defaults.
public void setStrictErrorChecking(boolean strictErrorChecking)
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying whether errors checking is enforced or not.
When set to false
, the implementation is free to not
test every possible error case normally defined on DOM operations,
and not raise any DOMException
. In case of error, the
behavior is undefined. This attribute is true
by
defaults.
public String getVersion()
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying, as part of the XML declaration, the version
number of this document. This is null
when unspecified.
public void setVersion(String version)
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying, as part of the XML declaration, the version
number of this document. This is null
when unspecified.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |