org.apache.axis2.om
Interface OMNode

All Known Subinterfaces:
OMComment, OMDocType, OMElement, OMNodeEx, OMProcessingInstruction, OMText, SOAPBody, SOAPEnvelope, SOAPFault, SOAPFaultCode, SOAPFaultDetail, SOAPFaultNode, SOAPFaultReason, SOAPFaultRole, SOAPFaultSubCode, SOAPFaultText, SOAPFaultValue, SOAPHeader, SOAPHeaderBlock
All Known Implementing Classes:
OMCommentImpl, OMDocTypeImpl, OMElementImpl, OMNodeImpl, OMProcessingInstructionImpl, OMTextImpl, SOAPBodyImpl, SOAPEnvelopeImpl, SOAPFaultCodeImpl, SOAPFaultDetailImpl, SOAPFaultImpl, SOAPFaultNodeImpl, SOAPFaultReasonImpl, SOAPFaultRoleImpl, SOAPFaultSubCodeImpl, SOAPFaultTextImpl, SOAPFaultValueImpl, SOAPHeaderBlockImpl, SOAPHeaderImpl

public interface OMNode

Interface OMNode


Field Summary
static short CDATA_SECTION_NODE
          The node is a CDATASection.
static short COMMENT_NODE
          The node is a Comment.
static short DTD_NODE
          This node is a DTD.
static short ELEMENT_NODE
          The node is an Element.
static short ENTITY_REFERENCE_NODE
          This node is a Entity Reference.
static short PI_NODE
          This node is a ProcessingInstruction.
static short SPACE_NODE
          This node is a Entity Reference.
static short TEXT_NODE
          The node is a Text node.
 
Method Summary
 void build()
          Builds itself
 OMNode detach()
          This will remove this information item and its children, from the model completely.
 void discard()
          Discards a Node.
 OMNode getNextSibling()
          This will give the next sibling.
 OMContainer getParent()
          This method should return the immediate parent of the node.
 OMNode getPreviousSibling()
          get the previous sibling
 int getType()
          This is to get the type of node, as this is the super class of all the nodes
 void insertSiblingAfter(OMNode sibling)
          This will insert a sibling just after the current information item.
 void insertSiblingBefore(OMNode sibling)
          This will insert a sibling just before the current information item
 boolean isComplete()
          this will indicate whether parser has parsed this information item completely or not.
 void serialize(XMLStreamWriter xmlWriter)
          Serialize the node without caching
 void serializeWithCache(XMLStreamWriter xmlWriter)
          Serialize the node with caching
 

Field Detail

ELEMENT_NODE

public static final short ELEMENT_NODE
The node is an Element.

See Also:
Constant Field Values

TEXT_NODE

public static final short TEXT_NODE
The node is a Text node.


CDATA_SECTION_NODE

public static final short CDATA_SECTION_NODE
The node is a CDATASection.


COMMENT_NODE

public static final short COMMENT_NODE
The node is a Comment.


DTD_NODE

public static final short DTD_NODE
This node is a DTD.


PI_NODE

public static final short PI_NODE
This node is a ProcessingInstruction.


ENTITY_REFERENCE_NODE

public static final short ENTITY_REFERENCE_NODE
This node is a Entity Reference.


SPACE_NODE

public static final short SPACE_NODE
This node is a Entity Reference.

Method Detail

getParent

public OMContainer getParent()
                      throws OMException
This method should return the immediate parent of the node. Parent is always an Element

Returns:
Throws:
OMException

getNextSibling

public OMNode getNextSibling()
                      throws OMException
This will give the next sibling. This can be an OMAttribute for OMAttribute or OMText or OMELement for others.

Returns:
Throws:
OMException

isComplete

public boolean isComplete()
this will indicate whether parser has parsed this information item completely or not. If somethings info are not available in the item, one has to check this attribute to make sure that, this item has been parsed completely or not.

Returns:
boolean

detach

public OMNode detach()
              throws OMException
This will remove this information item and its children, from the model completely. Important to note that this method will detach the OMNode once it is fully built. Half built nodes are not to be detached!

Throws:
OMException

discard

public void discard()
             throws OMException
Discards a Node. Discrad 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
This will insert a sibling just after the current information item.

Parameters:
sibling -
Throws:
OMException

insertSiblingBefore

public void insertSiblingBefore(OMNode sibling)
                         throws OMException
This will insert a sibling just before the current information item

Parameters:
sibling -
Throws:
OMException

getType

public int getType()
            throws OMException
This is to get the type of node, as this is the super class of all the nodes

Returns:
Throws:
OMException

getPreviousSibling

public OMNode getPreviousSibling()
get the previous sibling

Returns:
node

serializeWithCache

public void serializeWithCache(XMLStreamWriter xmlWriter)
                        throws XMLStreamException
Serialize the node with caching

Parameters:
xmlWriter -
Throws:
XMLStreamException
See Also:
#serializeWithCache(org.apache.axis2.om.impl.OMOutputImpl)

serialize

public void serialize(XMLStreamWriter xmlWriter)
               throws XMLStreamException
Serialize the node without caching

Parameters:
xmlWriter -
Throws:
XMLStreamException
See Also:
#serialize(org.apache.axis2.om.impl.OMOutputImpl)

build

public void build()
Builds itself