com.sun.org.apache.xerces.internal.dom
abstract public class: ChildNode [javadoc |
source]
java.lang.Object
com.sun.org.apache.xerces.internal.dom.NodeImpl
com.sun.org.apache.xerces.internal.dom.ChildNode
All Implemented Interfaces:
Cloneable, Node, EventTarget, Serializable, NodeList
Direct Known Subclasses:
Header1_1Impl, Body1_1Impl, ElementNSImpl, DeferredDocumentImpl, DocumentImpl, CoreDocumentImpl, ElementImpl, Detail1_2Impl, DetailEntry1_2Impl, DocumentTypeImpl, DeferredElementImpl, EnvelopeImpl, DeferredCDATASectionImpl, DeferredEntityImpl, SOAPDocumentImpl, CDATAImpl, DeferredTextImpl, CharacterDataImpl, ProcessingInstructionImpl, FaultImpl, FaultElementImpl, HeaderElement1_1Impl, PSVIDocumentImpl, EntityReferenceImpl, BodyImpl, HeaderElement1_2Impl, HeaderImpl, FaultElement1_1Impl, DeferredCommentImpl, BodyElement1_2Impl, HeaderElementImpl, Envelope1_1Impl, Detail1_1Impl, TextImpl, TextImpl, DetailImpl, DeferredElementDefinitionImpl, DeferredElementNSImpl, DetailEntryImpl, FaultElement1_2Impl, DocumentFragmentImpl, ParentNode, PSVIElementNSImpl, ElementDefinitionImpl, BodyElement1_1Impl, DeferredDocumentTypeImpl, DeferredProcessingInstructionImpl, CommentImpl, DetailEntry1_1Impl, SOAPDocumentFragment, Fault1_1Impl, Fault1_2Impl, ElementImpl, CDATASectionImpl, EntityImpl, Envelope1_2Impl, Body1_2Impl, Header1_2Impl, DeferredEntityReferenceImpl, CommentImpl, BodyElementImpl
ChildNode inherits from NodeImpl and adds the capability of being a child by
having references to its previous and next siblings.
| Field Summary |
|---|
| static final long | serialVersionUID | Serialization version. |
| transient StringBuffer | fBufferStr | |
| protected ChildNode | previousSibling | Previous sibling. |
| protected ChildNode | nextSibling | Next sibling. |
| Fields inherited from com.sun.org.apache.xerces.internal.dom.NodeImpl: |
|---|
| TREE_POSITION_PRECEDING, TREE_POSITION_FOLLOWING, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_EQUIVALENT, TREE_POSITION_SAME_NODE, TREE_POSITION_DISCONNECTED, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_PRECEDING, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, serialVersionUID, ELEMENT_DEFINITION_NODE, ownerNode, flags, READONLY, SYNCDATA, SYNCCHILDREN, OWNED, FIRSTCHILD, SPECIFIED, IGNORABLEWS, HASSTRING, NORMALIZED, ID |
| Methods from com.sun.org.apache.xerces.internal.dom.NodeImpl: |
|---|
|
addEventListener, appendChild, changed, changes, cloneNode, compareDocumentPosition, compareTreePosition, dispatchEvent, getAttributes, getBaseURI, getChildNodes, getContainer, getElementAncestor, getFeature, getFirstChild, getLastChild, getLength, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeNumber, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getReadOnly, getTextContent, getTextContent, getUserData, getUserData, getUserDataRecord, hasAttributes, hasChildNodes, hasStringValue, hasStringValue, insertBefore, internalIsIgnorableWhitespace, isDefaultNamespace, isEqualNode, isFirstChild, isFirstChild, isIdAttribute, isIdAttribute, isIgnorableWhitespace, isNormalized, isNormalized, isOwned, isOwned, isReadOnly, isReadOnly, isSameNode, isSpecified, isSpecified, isSupported, item, lookupNamespacePrefix, lookupNamespaceURI, lookupPrefix, needsSyncChildren, needsSyncChildren, needsSyncData, needsSyncData, normalize, ownerDocument, parentNode, previousSibling, removeChild, removeEventListener, replaceChild, setNodeValue, setOwnerDocument, setPrefix, setReadOnly, setTextContent, setUserData, setUserData, synchronizeData, toString |
| Method from com.sun.org.apache.xerces.internal.dom.ChildNode Detail: |
public Node cloneNode(boolean deep) {
ChildNode newnode = (ChildNode) super.cloneNode(deep);
// Need to break the association w/ original kids
newnode.previousSibling = null;
newnode.nextSibling = null;
newnode.isFirstChild(false);
return newnode;
}
Returns a duplicate of a given node. You can consider this a
generic "copy constructor" for nodes. The newly returned object should
be completely independent of the source object's subtree, so changes
in one after the clone has been made will not affect the other.
Note: since we never have any children deep is meaningless here,
ParentNode overrides this behavior. |
public Node getNextSibling() {
return nextSibling;
}
The next child of this node's parent, or null if none |
public Node getParentNode() {
// if we have an owner, ownerNode is our parent, otherwise it's
// our ownerDocument and we don't have a parent
return isOwned() ? ownerNode : null;
}
Returns the parent node of this node |
public Node getPreviousSibling() {
// if we are the firstChild, previousSibling actually refers to our
// parent's lastChild, but we hide that
return isFirstChild() ? null : previousSibling;
}
The previous child of this node's parent, or null if none |
final NodeImpl parentNode() {
// if we have an owner, ownerNode is our parent, otherwise it's
// our ownerDocument and we don't have a parent
return isOwned() ? ownerNode : null;
}
|
final ChildNode previousSibling() {
// if we are the firstChild, previousSibling actually refers to our
// parent's lastChild, but we hide that
return isFirstChild() ? null : previousSibling;
}
|