| java.lang.Object org.ozoneDB.OzoneObject org.ozoneDB.xml.dom.NodeImpl
All known Subclasses: org.ozoneDB.xml.dom.ElementDeclImpl, org.ozoneDB.xml.dom.AttrImpl, org.ozoneDB.xml.dom.ParamEntity, org.ozoneDB.xml.dom.NotationImpl, org.ozoneDB.xml.dom.DocumentImpl, org.ozoneDB.xml.dom.EntityImpl, org.ozoneDB.xml.dom.ElementImpl, org.ozoneDB.xml.dom.DocumentFragmentImpl, org.ozoneDB.xml.dom.CharacterDataImpl, org.ozoneDB.xml.dom.EntityReferenceImpl, org.ozoneDB.xml.dom.ProcessingInstructionImpl,
Method Summary | |
final public synchronized Node | appendChild(Node newChild) Insert newChild as the last child of this parent.
If newChild is null, newChild does not belong to this DOM,
or childern are not supported by this node type, an exception is thrown.
newChild is removed from its original parent before adding to this
parent. | protected Node | castNewChild(Node newChild) Checks whether newChild can be added to this node as a child, and
if so, performs a necessary cast. | final protected Node | castOldChild(Node oldChild) Checks whether oldChild is a direct child of this node, and if so,
performs a necessary cast. | public synchronized void | cloneInto(NodeProxy into, boolean deep) This clone method is called after a new node has been constructed to copy
the contents of this node into the new one. | public NamedNodeMap | getAttributes() Return attributes of node. | final public synchronized Node | getChild(int index) Returns the index-th child of this node. | final public int | getChildCount() Returns the number of children in this node. | public NodeList | getChildNodes() Returns a
org.w3c.dom.NodeList object that can be used to traverse
this node's children. | final public Node | getFirstChild() Returns the first child of the node. | final public Node | getLastChild() Returns the last child of the node. | public java.lang.String | getLocalName() | public java.lang.String | getNamespaceURI() | public Node | getNextSibling() Returns the next sibling of this node. | final public String | getNodeName() Returns the name of the node, set from the constructor. | abstract public short | getNodeType() Abstract method must be implemented by each node class. | final public String | getNodeValue() Returns the value of the node. | final public Document | getOwnerDocument() | public Node | getParentNode() Returns the parent node of this node. | public java.lang.String | getPrefix() | public Node | getPreviousSibling() Returns the previous sibling of this node. | public boolean | hasAttributes() | final public boolean | hasChildNodes() Return true if there are any childern to this node. | final public void | init(DocumentProxy owner, String name, String value, boolean checkName) | final public synchronized Node | insertBefore(Node newChild, Node refChild) Insert newChild in this parent, before the existing child
refChild. | final public boolean | isReadOnly() Returns true if node is read-only and cannot be modified, or if node
belongs to a read-only document. | public boolean | isSupported(String s, String s1) | public void | normalize() | protected void | notifyIterators(Node removedChild) Called to notify all the iterators created from this node that a
child of this node has been removed. | public void | readExternal(ObjectInput in) | final public synchronized Node | removeChild(Node oldChild) Remove oldChild from this parent. | final public synchronized Node | replaceChild(Node newChild, Node oldChild) Replace oldChild with newChild, adding the new child and
removing the old one.
If newChild does not belong to this DOM, oldChild is not
a direct child of this parent, or childern are not supported by this node
type, an exception is thrown.
newChild is removed from its original parent before adding to this
parent. | public void | setNextSibling(Node nextNode) | final public void | setNodeName(String nodeName) | public void | setNodeValue(String value) Changes the value of the node. | public synchronized void | setOwnerDocument(Document owner) | public void | setParentNode(Node newParent) | public void | setPrefix(java.lang.String prefix) | public void | setPreviousSibling(Node prevNode) | final public synchronized void | setReadOnly() Renders this node read only, preventing it's contents from being modified.
Attempts to modify the node's contents will throw an exception. | public boolean | supports(java.lang.String feature, java.lang.String version) | boolean | supportsChildern() Returns true if this node supports children. | public void | writeExternal(ObjectOutput out) |
ATTLIST_DECL_NODE | final public static short ATTLIST_DECL_NODE(Code) | | Attributes list declaration node. Not part of the DOM, identifies an
attributes list declaration node appearing in the DTD..
|
ELEMENT_DECL_NODE | final public static short ELEMENT_DECL_NODE(Code) | | Element declaration node. Not part of the DOM, identifies an element
declaration node appearing in the DTD.
|
PARAM_ENTITY_NODE | final public static short PARAM_ENTITY_NODE(Code) | | Parameter entity declaration node. Not part of the DOM, identifies an
internal or external parameter entity declaration node appearing in the
DTD (see
org.openxml.dom.ParamEntity ).
|
_nextNode | NodeProxy _nextNode(Code) | | This node ia part of a double-linked list that belongs to its parent.
This reference identifies the next child in the list. Class access
required by derived classes.
|
_ownerDocument | DocumentProxy _ownerDocument(Code) | | The document owner of this node, or the document itself. If the node belongs
to any document, this will point to that document. For a document this will
point at the document itself (
NodeImpl.getOwnerDocument will return null,
though). Class access required by derived classes.
|
_parent | NodeProxy _parent(Code) | | The parent of this node or null if the node has no parent. Class access
required by derived classes.
|
_prevNode | NodeProxy _prevNode(Code) | | This node ia part of a double-linked list that belongs to its parent.
This reference identifies the previous child in the list. Class access
required by derived classes.
|
serialVersionUID | final static long serialVersionUID(Code) | | |
NodeImpl | protected NodeImpl(DocumentImpl owner, String name, String value, boolean checkName) throws DOMException(Code) | | Hidden constructor creates a new node. Only one constructor is supported,
although cloning is also supported. Owner document must be supplied except
for
DocumentImpl in which case the document itself becomes its
owner. Name must be supplied, either dynamic or static (e.g. "#document#").
If checkName is true, the supplied named is assumed to be a valid
XML name token, one that can contain any Unicode letter and digit, must
start with a letter, and may also contain hyphen, underscore, digit or colon.
Parameters: owner - Document owner of this node, or null Parameters: name - Name of node Parameters: value - Initial value of node or null Parameters: checkName - True if name is an XML name token throws: org.w3c.dom.DOMException - INVALID_CHARACTER_ERRNode name cannot contain whitespaces or non-printable characters |
NodeImpl | protected NodeImpl()(Code) | | |
appendChild | final public synchronized Node appendChild(Node newChild)(Code) | | Insert newChild as the last child of this parent.
If newChild is null, newChild does not belong to this DOM,
or childern are not supported by this node type, an exception is thrown.
newChild is removed from its original parent before adding to this
parent. If newChild is a
org.w3c.dom.DocumentFragment , all
its children are inserted one by one into this parent.
Parameters: newChild - The new child to add The newly inserted child throws: org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERRNode is read-only and cannot be modified throws: org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERRChildren are not supported by this node type, or newChild is nota compatible type for this node See Also: NodeImpl.castNewChild See Also: NodeImpl.castOldChild |
castNewChild | protected Node castNewChild(Node newChild) throws DOMException(Code) | | Checks whether newChild can be added to this node as a child, and
if so, performs a necessary cast. newChild cannot be null and must
belong to this DOM. It is impossible to transfer nodes between different
DOM implementations.
The following rules govern the allowed newChild types:
Any deviation will throw an exception.
Parameters: newChild - New child node newChild cast to type NodeImpl throws: org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERRnewChild is null, does not belong to this DOM, or its node typeis not supported for this parent |
castOldChild | final protected Node castOldChild(Node oldChild) throws DOMException(Code) | | Checks whether oldChild is a direct child of this node, and if so,
performs a necessary cast. oldChild cannot be null.
Parameters: oldChild - Old child node oldChild cast to type NodeImpl throws: org.w3c.dom.DOMException - NOT_FOUND_ERRoldChild is null, or not a direct child of this node |
cloneInto | public synchronized void cloneInto(NodeProxy into, boolean deep)(Code) | | This clone method is called after a new node has been constructed to copy
the contents of this node into the new one. It clones in contents but not
in context, and guarantees that the cloned node will pass the equality
test (see
NodeImpl.equals ).
into must be a valid node of the exact same class as this one.
deep is true if deep cloning (includes all children nodes) is to
be performed. If deep is false, the clone might not pass the
equality test.
Derived classes override and call this method to add per-class variable
copying. This method is called by
NodeImpl.cloneNode and the default
java.lang.Object.clone method.
Contents cloning duplicates the node's name and value, and its children.
It does not duplicate it's context, that is, the node's parent or sibling.
Initially a clone node has no parents or siblings. However, the node does
belong to the same document, since all nodes must belong to some document.
The cloned node is never read-only.
Parameters: into - A node into which to duplicate this one Parameters: deep - True if deep cloning is required |
getChild | final public synchronized Node getChild(int index)(Code) | | Returns the index-th child of this node. This method is used
exclusively by
NodeListImpl .
Parameters: index - Index of child to retrieve The child node or null See Also: NodeListImpl.item(int) |
getChildCount | final public int getChildCount()(Code) | | Returns the number of children in this node. This method is used
exclusively by
NodeListImpl .
Number of childern in this node See Also: NodeListImpl.getLength |
getFirstChild | final public Node getFirstChild()(Code) | | Returns the first child of the node. If node has no children, returns null.
First child or null |
getLastChild | final public Node getLastChild()(Code) | | Returns the last child of the node. If node has no children, returns null.
Last child or null |
getNextSibling | public Node getNextSibling()(Code) | | Returns the next sibling of this node. If node has no next siblings,
returns null.
Next sibling or null |
getNodeName | final public String getNodeName()(Code) | | Returns the name of the node, set from the constructor. Some derived classes
do not have the notion of a name, and will return the same name each time.
They should do so by setting the default name (e.g. "#comment")
in the constructor. This value is never null.
See Also: org.w3c.dom.Node.getNodeName |
getNodeValue | final public String getNodeValue()(Code) | | Returns the value of the node. Depending on the node type, this value
is either the node value (e.g. the text in
org.w3c.dom.Text ),
or always null is node has no notion of a value (e.g.
org.w3c.dom.Element ). For complete list of which node types will return
what, see
NodeImpl.setNodeValue .
Value of node, null if node has no value |
getParentNode | public Node getParentNode()(Code) | | Returns the parent node of this node. Node may not necessarily have a
parent node. If node has been created but not added to any other node,
it will be parentless. The
org.w3c.dom.Document node is always
parentless.
Parent node of this node |
getPreviousSibling | public Node getPreviousSibling()(Code) | | Returns the previous sibling of this node. If node has no previous siblings,
returns null.
Previous sibling or null |
hasAttributes | public boolean hasAttributes()(Code) | | |
hasChildNodes | final public boolean hasChildNodes()(Code) | | Return true if there are any childern to this node. Less intensive than
calling {#link getChildNodes}.
True if node has any children |
insertBefore | final public synchronized Node insertBefore(Node newChild, Node refChild) throws DOMException(Code) | | Insert newChild in this parent, before the existing child
refChild. If refChild is null, insert newChild
as the last child of this parent, akin to calling
NodeImpl.appendChild .
If newChild is null, newChild does not belong to this DOM,
refChild is not a direct child of this node, or childern are not
supported by this node type, an exception is thrown.
newChild is removed from its original parent before adding to this
parent. If newChild is a
org.w3c.dom.DocumentFragment , all
its children are inserted one by one into this parent.
Parameters: newChild - The new child to add Parameters: refChild - Insert new child before this child, or insert at the endif this child is null The newly inserted child throws: org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERRNode is read-only and cannot be modified throws: org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERRChildren are not supported by this node type, or newChild is nota compatible type for this node throws: org.w3c.dom.DOMException - NOT_FOUND_ERRoldChild is not null and not a direct child of this node See Also: NodeImpl.castNewChild See Also: NodeImpl.castOldChild |
isReadOnly | final public boolean isReadOnly()(Code) | | Returns true if node is read-only and cannot be modified, or if node
belongs to a read-only document.
True if node is read-only and cannot be modified See Also: NodeImpl.setReadOnly |
normalize | public void normalize()(Code) | | |
notifyIterators | protected void notifyIterators(Node removedChild)(Code) | | Called to notify all the iterators created from this node that a
child of this node has been removed. Iterators that point at this
child might choose to select another child to point to. This method
is called before the child is removed.
The removed node is a direct child of this node. Affected iterators
are those that point at the document tree directly below this node,
or the tree below one of its parents. Other iterators are not affected
by the change. This method also performs a notification on all the
parents of this node.
Parameters: removedChild - The child node being removed |
removeChild | final public synchronized Node removeChild(Node oldChild) throws DOMException(Code) | | Remove oldChild from this parent. If oldChild is not
a direct child of this parent, or childern are not supported by this node
type, an exception is thrown.
Parameters: oldChild - The child to remove The removed child throws: org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERRNode is read-only and cannot be modified throws: org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERRChildren are not supported by this node type throws: org.w3c.dom.DOMException - NOT_FOUND_ERRoldChild is not a direct child of this node See Also: NodeImpl.castOldChild |
replaceChild | final public synchronized Node replaceChild(Node newChild, Node oldChild) throws DOMException(Code) | | Replace oldChild with newChild, adding the new child and
removing the old one.
If newChild does not belong to this DOM, oldChild is not
a direct child of this parent, or childern are not supported by this node
type, an exception is thrown.
newChild is removed from its original parent before adding to this
parent. If newChild is a
org.w3c.dom.DocumentFragment , all
its children are inserted one by one into this parent.
Parameters: newChild - The new child to add Parameters: oldChild - The old child to take away The old child throws: org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERRNode is read-only and cannot be modified throws: org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERRChildren are not supported by this node type, or newChild is nota compatible type for this node throws: org.w3c.dom.DOMException - NOT_FOUND_ERRoldChild is not a direct child of this node See Also: NodeImpl.castNewChild See Also: NodeImpl.castOldChild |
setNextSibling | public void setNextSibling(Node nextNode)(Code) | | |
setNodeName | final public void setNodeName(String nodeName)(Code) | | |
setNodeValue | public void setNodeValue(String value)(Code) | | Changes the value of the node. Not all node types support the notion of
a value. If the value is not supported by a particular node type, it will
throw an exception when calling this method. The following table specifies
which node types support values:
Element Not supported
Attr Value supported
Text Value supported
CDATASection Value supported
EntityReference Not supported
Entity Not supported
ProcessingInstruction Value supported
Comment Value supported
Document Not supported
DocumentType Not supported
DocumentFragment Not supported
Notation Not supported
For most node types, if the value is set to null,
NodeImpl.getNodeValue will return an empty string instead.
Parameters: value - New value of node throws: org.w3c.dom.DOMExceptionImpl - NO_MODIFICATION_ALLOWED_ERRNode is read-only and cannot be modified throws: org.w3c.dom.DOMExceptionImpl - NO_DATA_ALLOWED_ERRThis node does not support a value |
setOwnerDocument | public synchronized void setOwnerDocument(Document owner)(Code) | | |
setParentNode | public void setParentNode(Node newParent)(Code) | | |
setPreviousSibling | public void setPreviousSibling(Node prevNode)(Code) | | |
setReadOnly | final public synchronized void setReadOnly()(Code) | | Renders this node read only, preventing it's contents from being modified.
Attempts to modify the node's contents will throw an exception. The node's
children are also made read-only.
|
supportsChildern | boolean supportsChildern()(Code) | | Returns true if this node supports children. Other methods query this to
determine whether to properly support childern, return null or throw an
exception in response. The default method returns false.
True if childern supported by this node type |
|
|