org.exist.dom
Class NodeImpl

java.lang.Object
  extended by org.exist.dom.NodeImpl
All Implemented Interfaces:
QNameable, Node
Direct Known Subclasses:
DocumentImpl, StoredNode

public abstract class NodeImpl
extends Object
implements Node, QNameable


Field Summary
 
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
NodeImpl()
           
 
Method Summary
 Node appendChild(Node child)
           
 void appendChildren(Txn transaction, NodeList nodes, int child)
           
 Node cloneNode(boolean deep)
           
 short compareDocumentPosition(Node other)
          ? @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node)
 NamedNodeMap getAttributes()
           
 short getAttributesCount()
           
 String getBaseURI()
          ? @see org.w3c.dom.Node#getBaseURI()
 int getChildCount()
           
 NodeList getChildNodes()
           
 Object getFeature(String feature, String version)
          ? @see org.w3c.dom.Node#getFeature(java.lang.String, java.lang.String)
 Node getFirstChild()
           
 Node getLastChild()
           
 String getLocalName()
           
 String getNamespaceURI()
           
 String getNodeName()
           
 String getNodeValue()
           
 String getPrefix()
           
 String getTextContent()
          ? @see org.w3c.dom.Node#getTextContent()
 Object getUserData(String key)
          ? @see org.w3c.dom.Node#getUserData(java.lang.String)
 boolean hasAttributes()
           
 boolean hasChildNodes()
           
 Node insertAfter(Node newChild, Node refChild)
           
 void insertAfter(Txn transaction, NodeList nodes, Node refChild)
           
 Node insertBefore(Node newChild, Node refChild)
           
 void insertBefore(Txn transaction, NodeList nodes, Node refChild)
           
 boolean isDefaultNamespace(String namespaceURI)
          ? @see org.w3c.dom.Node#isDefaultNamespace(java.lang.String)
 boolean isEqualNode(Node arg)
          ? @see org.w3c.dom.Node#isEqualNode(org.w3c.dom.Node)
 boolean isSameNode(Node other)
          ? @see org.w3c.dom.Node#isSameNode(org.w3c.dom.Node)
 boolean isSupported(String key, String value)
           
 String lookupNamespaceURI(String prefix)
          ? @see org.w3c.dom.Node#lookupNamespaceURI(java.lang.String)
 String lookupPrefix(String namespaceURI)
          ? @see org.w3c.dom.Node#lookupPrefix(java.lang.String)
 void normalize()
           
 Node removeChild(Node oldChild)
           
 Node removeChild(Txn transaction, Node oldChild)
           
 Node replaceChild(Node newChild, Node oldChild)
           
 Node replaceChild(Txn transaction, Node newChild, Node oldChild)
           
 void setAttributes(short attribNum)
          Set the attributes that belong to this node.
 void setNodeName(QName name)
          Set the node name.
 void setNodeValue(String value)
          Set the node value.
 void setPrefix(String prefix)
          Sets the prefix attribute of the NodeImpl object
 void setTextContent(String textContent)
          ? @see org.w3c.dom.Node#setTextContent(java.lang.String)
 Object setUserData(String key, Object data, UserDataHandler handler)
          ? @see org.w3c.dom.Node#setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler)
 boolean supports(String feature, String version)
          Method supports.
 void updateChild(Node oldChild, Node newChild)
           
 StoredNode updateChild(Txn transaction, Node oldChild, Node newChild)
          Update a child node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
getNextSibling, getNodeType, getOwnerDocument, getParentNode, getPreviousSibling
 
Methods inherited from interface org.exist.dom.QNameable
getQName
 

Constructor Detail

NodeImpl

public NodeImpl()
Method Detail

cloneNode

public Node cloneNode(boolean deep)
Specified by:
cloneNode in interface Node
See Also:
Node.cloneNode(boolean)

appendChild

public Node appendChild(Node child)
                 throws DOMException
Specified by:
appendChild in interface Node
Throws:
DOMException
See Also:
Node.appendChild(org.w3c.dom.Node)

removeChild

public Node removeChild(Node oldChild)
                 throws DOMException
Specified by:
removeChild in interface Node
Throws:
DOMException

replaceChild

public Node replaceChild(Node newChild,
                         Node oldChild)
                  throws DOMException
Specified by:
replaceChild in interface Node
Throws:
DOMException
See Also:
Node.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)

updateChild

public void updateChild(Node oldChild,
                        Node newChild)
                 throws DOMException
Throws:
DOMException

insertBefore

public Node insertBefore(Node newChild,
                         Node refChild)
                  throws DOMException
Specified by:
insertBefore in interface Node
Throws:
DOMException
See Also:
Node.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node)

insertAfter

public Node insertAfter(Node newChild,
                        Node refChild)
                 throws DOMException
Throws:
DOMException

appendChildren

public void appendChildren(Txn transaction,
                           NodeList nodes,
                           int child)
                    throws DOMException
Throws:
DOMException

removeChild

public Node removeChild(Txn transaction,
                        Node oldChild)
                 throws DOMException
Throws:
DOMException

replaceChild

public Node replaceChild(Txn transaction,
                         Node newChild,
                         Node oldChild)
                  throws DOMException
Throws:
DOMException

updateChild

public StoredNode updateChild(Txn transaction,
                              Node oldChild,
                              Node newChild)
                       throws DOMException
Update a child node. This method will only update the child node but not its potential descendant nodes.

Parameters:
oldChild -
newChild -
Throws:
DOMException

insertBefore

public void insertBefore(Txn transaction,
                         NodeList nodes,
                         Node refChild)
                  throws DOMException
Throws:
DOMException

insertAfter

public void insertAfter(Txn transaction,
                        NodeList nodes,
                        Node refChild)
                 throws DOMException
Throws:
DOMException

getChildCount

public int getChildCount()

getChildNodes

public NodeList getChildNodes()
Specified by:
getChildNodes in interface Node

getFirstChild

public Node getFirstChild()
Specified by:
getFirstChild in interface Node
See Also:
Node.getFirstChild()

getLastChild

public Node getLastChild()
Specified by:
getLastChild in interface Node
See Also:
Node.getLastChild()

hasAttributes

public boolean hasAttributes()
Specified by:
hasAttributes in interface Node
See Also:
Node.hasAttributes()

getAttributesCount

public short getAttributesCount()

getAttributes

public NamedNodeMap getAttributes()
Specified by:
getAttributes in interface Node
See Also:
Node.getAttributes()

setAttributes

public void setAttributes(short attribNum)
Set the attributes that belong to this node.

Parameters:
attribNum - The new attributes value

getNodeValue

public String getNodeValue()
                    throws DOMException
Specified by:
getNodeValue in interface Node
Throws:
DOMException
See Also:
Node.getNodeValue()

setNodeValue

public void setNodeValue(String value)
                  throws DOMException
Set the node value.

Specified by:
setNodeValue in interface Node
Parameters:
value - The new nodeValue value
Throws:
DOMException - Description of the Exception

hasChildNodes

public boolean hasChildNodes()
Specified by:
hasChildNodes in interface Node
See Also:
Node.hasChildNodes()

setNodeName

public void setNodeName(QName name)
Set the node name.

Parameters:
name - The new nodeName value

isSupported

public boolean isSupported(String key,
                           String value)
Specified by:
isSupported in interface Node
See Also:
Node.isSupported(java.lang.String, java.lang.String)

normalize

public void normalize()
Specified by:
normalize in interface Node
See Also:
Node.normalize()

supports

public boolean supports(String feature,
                        String version)
Method supports.

Parameters:
feature -
version -
Returns:
boolean

getBaseURI

public String getBaseURI()
? @see org.w3c.dom.Node#getBaseURI()

Specified by:
getBaseURI in interface Node

compareDocumentPosition

public short compareDocumentPosition(Node other)
                              throws DOMException
? @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node)

Specified by:
compareDocumentPosition in interface Node
Throws:
DOMException

getTextContent

public String getTextContent()
                      throws DOMException
? @see org.w3c.dom.Node#getTextContent()

Specified by:
getTextContent in interface Node
Throws:
DOMException

setTextContent

public void setTextContent(String textContent)
                    throws DOMException
? @see org.w3c.dom.Node#setTextContent(java.lang.String)

Specified by:
setTextContent in interface Node
Throws:
DOMException

isSameNode

public boolean isSameNode(Node other)
? @see org.w3c.dom.Node#isSameNode(org.w3c.dom.Node)

Specified by:
isSameNode in interface Node

lookupPrefix

public String lookupPrefix(String namespaceURI)
? @see org.w3c.dom.Node#lookupPrefix(java.lang.String)

Specified by:
lookupPrefix in interface Node

isDefaultNamespace

public boolean isDefaultNamespace(String namespaceURI)
? @see org.w3c.dom.Node#isDefaultNamespace(java.lang.String)

Specified by:
isDefaultNamespace in interface Node

lookupNamespaceURI

public String lookupNamespaceURI(String prefix)
? @see org.w3c.dom.Node#lookupNamespaceURI(java.lang.String)

Specified by:
lookupNamespaceURI in interface Node

isEqualNode

public boolean isEqualNode(Node arg)
? @see org.w3c.dom.Node#isEqualNode(org.w3c.dom.Node)

Specified by:
isEqualNode in interface Node

getFeature

public Object getFeature(String feature,
                         String version)
? @see org.w3c.dom.Node#getFeature(java.lang.String, java.lang.String)

Specified by:
getFeature in interface Node

getUserData

public Object getUserData(String key)
? @see org.w3c.dom.Node#getUserData(java.lang.String)

Specified by:
getUserData in interface Node

setUserData

public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler)
? @see org.w3c.dom.Node#setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler)

Specified by:
setUserData in interface Node

getPrefix

public String getPrefix()
Specified by:
getPrefix in interface Node
See Also:
Node.getPrefix()

setPrefix

public void setPrefix(String prefix)
               throws DOMException
Sets the prefix attribute of the NodeImpl object

Specified by:
setPrefix in interface Node
Parameters:
prefix - The new prefix value
Throws:
DOMException - Description of the Exception

getNamespaceURI

public String getNamespaceURI()
Specified by:
getNamespaceURI in interface Node
See Also:
Node.getNamespaceURI()

getLocalName

public String getLocalName()
Specified by:
getLocalName in interface Node
See Also:
Node.getLocalName()

getNodeName

public String getNodeName()
Specified by:
getNodeName in interface Node
See Also:
Node.getNodeName()


Copyright (C) Wolfgang Meier. All rights reserved.