org.apache.axis2.om.impl.dom
Class ChildNode

java.lang.Object
  extended byorg.apache.axis2.om.impl.dom.NodeImpl
      extended byorg.apache.axis2.om.impl.dom.ChildNode
All Implemented Interfaces:
org.w3c.dom.Node, org.w3c.dom.NodeList, OMNode, OMNodeEx
Direct Known Subclasses:
CharacterImpl, ParentNode

public abstract class ChildNode
extends NodeImpl

Author:
Ruchith Fernando (ruchith.fernando@gmail.com)

Field Summary
protected  ChildNode nextSibling
           
protected  ParentNode parentNode
           
protected  ChildNode previousSubling
           
 
Fields inherited from class org.apache.axis2.om.impl.dom.NodeImpl
builder, done, FIRSTCHILD, flags, nodeType, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED
 
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
 
Fields inherited from interface org.apache.axis2.om.OMNode
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE
 
Constructor Summary
protected ChildNode()
           
protected ChildNode(DocumentImpl ownerDocument)
           
 
Method Summary
 OMNode detach()
          Removes a node (and all of its children) from its containing parent.
 void discard()
          Discards a node.
 OMNode getNextOMSibling()
          default behavior, overriden in ChildNode
 org.w3c.dom.Node getNextSibling()
          The next child of this node's parent, or null if none
 OMContainer getParent()
          Returns the parent containing node.
 org.w3c.dom.Node getParentNode()
           
 OMNode getPreviousOMSibling()
          default behavior, overriden in ChildNode
 org.w3c.dom.Node getPreviousSibling()
          The previous child of this node's parent, or null if none
 void insertSiblingAfter(OMNode sibling)
          Insert the given sibling next to this item
 void insertSiblingBefore(OMNode sibling)
          Insert the given sibling before this item
 void setNextOMSibling(OMNode node)
           
 void setParent(OMContainer element)
           
 void setPreviousOMSibling(OMNode node)
           
 
Methods inherited from class org.apache.axis2.om.impl.dom.NodeImpl
appendChild, build, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLength, getLocalName, getNamespaceURI, getNodeValue, getOwnerDocument, getPrefix, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeWithCache, setComplete, setNodeValue, setOwnerDocument, setPrefix, setTextContent, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
getNodeName, getNodeType
 
Methods inherited from interface org.apache.axis2.om.impl.OMNodeEx
serialize, serializeAndConsume, setType
 
Methods inherited from interface org.apache.axis2.om.OMNode
getType
 

Field Detail

previousSubling

protected ChildNode previousSubling

nextSibling

protected ChildNode nextSibling

parentNode

protected ParentNode parentNode
Constructor Detail

ChildNode

protected ChildNode(DocumentImpl ownerDocument)

ChildNode

protected ChildNode()
Method Detail

getNextOMSibling

public OMNode getNextOMSibling()
                        throws OMException
Description copied from class: NodeImpl
default behavior, overriden in ChildNode

Specified by:
getNextOMSibling in interface OMNode
Overrides:
getNextOMSibling in class NodeImpl
Throws:
OMException

getNextSibling

public org.w3c.dom.Node getNextSibling()
Description copied from class: NodeImpl
The next child of this node's parent, or null if none

Specified by:
getNextSibling in interface org.w3c.dom.Node
Overrides:
getNextSibling in class NodeImpl

getPreviousOMSibling

public OMNode getPreviousOMSibling()
Description copied from class: NodeImpl
default behavior, overriden in ChildNode

Specified by:
getPreviousOMSibling in interface OMNode
Overrides:
getPreviousOMSibling in class NodeImpl

getPreviousSibling

public org.w3c.dom.Node getPreviousSibling()
Description copied from class: NodeImpl
The previous child of this node's parent, or null if none

Specified by:
getPreviousSibling in interface org.w3c.dom.Node
Overrides:
getPreviousSibling in class NodeImpl

setNextOMSibling

public void setNextOMSibling(OMNode node)
Specified by:
setNextOMSibling in interface OMNodeEx
Overrides:
setNextOMSibling in class NodeImpl

setPreviousOMSibling

public void setPreviousOMSibling(OMNode node)
Specified by:
setPreviousOMSibling in interface OMNodeEx
Overrides:
setPreviousOMSibling in class NodeImpl

getParent

public OMContainer getParent()
                      throws OMException
Description copied from interface: OMNode
Returns the parent containing node.

Returns the parent container, which may be either an OMDocument or OMElement.

Specified by:
getParent in interface OMNode
Overrides:
getParent in class NodeImpl
Throws:
OMException

getParentNode

public org.w3c.dom.Node getParentNode()
Specified by:
getParentNode in interface org.w3c.dom.Node
Overrides:
getParentNode in class NodeImpl

setParent

public void setParent(OMContainer element)

detach

public OMNode detach()
              throws OMException
Description copied from interface: OMNode
Removes a node (and all of its children) from its containing parent.

Removes a node from its parent. Partially complete nodes will be completed before they are detached from the model. A node cannot be detached until its next sibling has been identified, so that the next sibling and parent can be updated appropriately.

Specified by:
detach in interface OMNode
Overrides:
detach in class NodeImpl
Throws:
OMException

discard

public void discard()
             throws OMException
Description copied from interface: OMNode
Discards a node.

Discard goes to the parser level and if the element is not completely built, then it will be completely skipped at the parser level.

Throws:
OMException

insertSiblingAfter

public void insertSiblingAfter(OMNode sibling)
                        throws OMException
Insert the given sibling next to this item

Specified by:
insertSiblingAfter in interface OMNode
Overrides:
insertSiblingAfter in class NodeImpl
Throws:
OMException

insertSiblingBefore

public void insertSiblingBefore(OMNode sibling)
                         throws OMException
Insert the given sibling before this item

Specified by:
insertSiblingBefore in interface OMNode
Overrides:
insertSiblingBefore in class NodeImpl
Throws:
OMException