public abstract class ChildNode extends NodeImpl
| Modifier and Type | Field and Description |
|---|---|
protected ChildNode |
nextSibling |
protected ParentNode |
parentNode |
protected ChildNode |
previousSibling |
builder, done, factory, FIRSTCHILD, flags, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIEDATTRIBUTE_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_NODEDTD_NODE, PI_NODE, SPACE_NODE| Modifier | Constructor and Description |
|---|---|
protected |
ChildNode(DocumentImpl ownerDocument,
OMFactory factory) |
protected |
ChildNode(OMFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
Node |
cloneNode(boolean deep) |
OMNode |
detach()
Removes a node (and all of its children) from its containing parent.
|
void |
discard()
Discards a node.
|
OMNode |
getNextOMSibling()
Default behavior returns null, overriden in ChildNode.
|
OMNode |
getNextOMSiblingIfAvailable()
Get the next sibling if it is available.
|
Node |
getNextSibling()
Returns the next child of this node's parent, or null if none.
|
OMContainer |
getParent()
Returns the parent containing node.
|
Node |
getParentNode() |
OMNode |
getPreviousOMSibling()
Default behavior returns null, overriden in ChildNode.
|
Node |
getPreviousSibling()
Returns the previous child of this node's parent, or null if none.
|
void |
insertSiblingAfter(OMNode sibling)
Inserts the given sibling next to this item.
|
void |
insertSiblingBefore(OMNode sibling)
Inserts the given sibling before this item.
|
void |
setNextOMSibling(OMNode node) |
void |
setParent(OMContainer element) |
void |
setPreviousOMSibling(OMNode node) |
appendChild, build, buildWithAttachments, close, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLength, getLocalName, getNamespaceURI, getNodeValue, getOMFactory, getOwnerDocument, getPrefix, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, internalSerialize, internalSerializeAndConsume, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNodeValue, setOwnerDocument, setPrefix, setTextContent, setUserDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNodeName, getNodeTypeinternalSerialize, setTypeprotected ChildNode previousSibling
protected ChildNode nextSibling
protected ParentNode parentNode
protected ChildNode(DocumentImpl ownerDocument, OMFactory factory)
ownerDocument - protected ChildNode(OMFactory factory)
public OMNode getNextOMSibling() throws OMException
NodeImplgetNextOMSibling in interface OMNodegetNextOMSibling in class NodeImplOMExceptionpublic OMNode getNextOMSiblingIfAvailable()
OMNodeExOMSerializable.isComplete() may return false when called on the sibling.
In contrast to OMNode.getNextOMSibling(), this method will never modify
the state of the underlying parser.getNextOMSiblingIfAvailable in interface OMNodeExgetNextOMSiblingIfAvailable in class NodeImplnull if the node has no next sibling or
the builder has not yet started to build the next siblingpublic Node getNextSibling()
NodeImplgetNextSibling in interface NodegetNextSibling in class NodeImplpublic OMNode getPreviousOMSibling()
NodeImplgetPreviousOMSibling in interface OMNodegetPreviousOMSibling in class NodeImplpublic Node getPreviousSibling()
NodeImplgetPreviousSibling in interface NodegetPreviousSibling in class NodeImplpublic void setNextOMSibling(OMNode node)
setNextOMSibling in interface OMNodeExsetNextOMSibling in class NodeImplpublic void setPreviousOMSibling(OMNode node)
setPreviousOMSibling in interface OMNodeExsetPreviousOMSibling in class NodeImplpublic OMContainer getParent() throws OMException
OMNodeOMDocument or OMElement.getParent in interface OMNodegetParent in class NodeImplOMContainer of the node.OMExceptionpublic Node getParentNode()
getParentNode in interface NodegetParentNode in class NodeImplpublic void setParent(OMContainer element)
public OMNode detach() throws OMException
OMNodedetach in interface OMNodedetach in class NodeImplOMException - If a node is not complete, the detach can trigger further parsing, which may
cause an exception.public void discard()
throws OMException
OMNodeOMExceptionpublic void insertSiblingAfter(OMNode sibling) throws OMException
insertSiblingAfter in interface OMNodeinsertSiblingAfter in class NodeImplsibling - The node that will be added after the current node.OMException - if the current node has no parentpublic void insertSiblingBefore(OMNode sibling) throws OMException
insertSiblingBefore in interface OMNodeinsertSiblingBefore in class NodeImplsibling - The node that will be added before the current node.OMException - if the current node has no parentCopyright © 2004–2016 The Apache Software Foundation. All rights reserved.