org.apache.axiom.om.impl.llom
Class OMNodeImpl

java.lang.Object
  extended by org.apache.axiom.om.impl.llom.OMSerializableImpl
      extended by org.apache.axiom.om.impl.llom.OMNodeImpl
All Implemented Interfaces:
IChildNode, OMNodeEx, OMInformationItem, OMNode, OMSerializable
Direct Known Subclasses:
OMElementImpl, OMLeafNode

public abstract class OMNodeImpl
extends OMSerializableImpl
implements IChildNode

Class OMNodeImpl


Field Summary
protected  OMNodeImpl nextSibling
          Field nextSibling
protected  IContainer parent
          Field parent
protected  OMNodeImpl previousSibling
          Field previousSibling
 
Fields inherited from class org.apache.axiom.om.impl.llom.OMSerializableImpl
factory
 
Fields inherited from interface org.apache.axiom.om.OMNode
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE
 
Constructor Summary
OMNodeImpl(OMFactory factory)
          Constructor OMNodeImpl
 
Method Summary
 void buildWithAttachments()
          Parses this node and builds the object structure in memory.
 OMInformationItem clone(OMCloneOptions options)
           
 OMNode detach()
          Removes this information item and its children, from the model completely.
 IParentNode getIParentNode()
           
 OMNode getNextOMSibling()
          Returns the next sibling.
 OMNode getNextOMSiblingIfAvailable()
           
 OMContainer getParent()
          Returns the immediate parent of the node.
 OMNode getPreviousOMSibling()
          Gets the previous sibling.
 void insertSiblingAfter(OMNode sibling)
          Inserts a sibling just after the current information item.
 void insertSiblingBefore(OMNode sibling)
          Inserts a sibling just before the current information item.
 void internalSerialize(javax.xml.stream.XMLStreamWriter writer)
           
 void internalSerializeAndConsume(javax.xml.stream.XMLStreamWriter writer)
           
 void setNextOMSibling(OMNode node)
          Method setNextOMSibling.
 void setParent(OMContainer element)
          Method setParent.
 void setPreviousOMSibling(OMNode previousSibling)
          Method setPreviousOMSibling.
 
Methods inherited from class org.apache.axiom.om.impl.llom.OMSerializableImpl
close, getBuilder, getOMFactory, internalSerialize, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.axiom.om.impl.OMNodeEx
internalSerialize, setComplete
 
Methods inherited from interface org.apache.axiom.om.OMNode
discard, getType, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume
 
Methods inherited from interface org.apache.axiom.om.OMSerializable
build, close, isComplete, serialize, serialize, serializeAndConsume
 
Methods inherited from interface org.apache.axiom.om.OMInformationItem
getOMFactory
 

Field Detail

parent

protected IContainer parent
Field parent


nextSibling

protected OMNodeImpl nextSibling
Field nextSibling


previousSibling

protected OMNodeImpl previousSibling
Field previousSibling

Constructor Detail

OMNodeImpl

public OMNodeImpl(OMFactory factory)
Constructor OMNodeImpl

Parameters:
factory - The OMFactory that created this
Method Detail

getParent

public OMContainer getParent()
Returns the immediate parent of the node. Parent is always an Element.

Specified by:
getParent in interface OMNode
Returns:
Returns OMContainer.
Throws:
OMException

getIParentNode

public IParentNode getIParentNode()
Specified by:
getIParentNode in interface IChildNode

setParent

public void setParent(OMContainer element)
Method setParent.

Specified by:
setParent in interface OMNodeEx
Parameters:
element -

getNextOMSibling

public OMNode getNextOMSibling()
                        throws OMException
Returns the next sibling. This can be an OMAttribute or OMText or OMElement for others.

Specified by:
getNextOMSibling in interface OMNode
Returns:
Returns OMNode.
Throws:
OMException

getNextOMSiblingIfAvailable

public OMNode getNextOMSiblingIfAvailable()
Specified by:
getNextOMSiblingIfAvailable in interface OMNodeEx

setNextOMSibling

public void setNextOMSibling(OMNode node)
Method setNextOMSibling.

Specified by:
setNextOMSibling in interface OMNodeEx
Parameters:
node -

detach

public OMNode detach()
              throws OMException
Removes this information item and its children, from the model completely.

Specified by:
detach in interface OMNode
Throws:
OMException

insertSiblingAfter

public void insertSiblingAfter(OMNode sibling)
                        throws OMException
Inserts a sibling just after the current information item.

Specified by:
insertSiblingAfter in interface OMNode
Parameters:
sibling -
Throws:
OMException

insertSiblingBefore

public void insertSiblingBefore(OMNode sibling)
                         throws OMException
Inserts a sibling just before the current information item.

Specified by:
insertSiblingBefore in interface OMNode
Parameters:
sibling -
Throws:
OMException

getPreviousOMSibling

public OMNode getPreviousOMSibling()
Gets the previous sibling.

Specified by:
getPreviousOMSibling in interface OMNode
Returns:
boolean

setPreviousOMSibling

public void setPreviousOMSibling(OMNode previousSibling)
Method setPreviousOMSibling.

Specified by:
setPreviousOMSibling in interface OMNodeEx
Parameters:
previousSibling -

buildWithAttachments

public void buildWithAttachments()
Parses this node and builds the object structure in memory. AXIOM supports two levels of deffered building. First is deffered building of AXIOM using StAX. Second level is the deffered building of attachments. AXIOM reads in the attachements from the stream only when user asks by calling getDataHandler(). build() method builds the OM without the attachments. buildAll() builds the OM together with attachement data. This becomes handy when user wants to free the input stream.

Specified by:
buildWithAttachments in interface OMNode

internalSerialize

public void internalSerialize(javax.xml.stream.XMLStreamWriter writer)
                       throws javax.xml.stream.XMLStreamException
Specified by:
internalSerialize in interface OMNodeEx
Throws:
javax.xml.stream.XMLStreamException

internalSerializeAndConsume

public void internalSerializeAndConsume(javax.xml.stream.XMLStreamWriter writer)
                                 throws javax.xml.stream.XMLStreamException
Specified by:
internalSerializeAndConsume in interface OMNodeEx
Throws:
javax.xml.stream.XMLStreamException

clone

public OMInformationItem clone(OMCloneOptions options)
Specified by:
clone in interface OMInformationItem


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.