Class OMNodeImpl

java.lang.Object
org.apache.axiom.om.impl.llom.OMSerializableImpl
org.apache.axiom.om.impl.llom.OMNodeImpl
All Implemented Interfaces:
org.apache.axiom.om.impl.OMNodeEx, org.apache.axiom.om.OMNode, org.apache.axiom.om.OMSerializable
Direct Known Subclasses:
OMCommentImpl, OMDocTypeImpl, OMElementImpl, OMProcessingInstructionImpl, OMTextImpl

public abstract class OMNodeImpl extends OMSerializableImpl implements org.apache.axiom.om.OMNode, org.apache.axiom.om.impl.OMNodeEx
Class OMNodeImpl
  • Field Details

    • parent

      protected org.apache.axiom.om.impl.OMContainerEx parent
      Field parent
    • nextSibling

      protected OMNodeImpl nextSibling
      Field nextSibling
    • previousSibling

      protected OMNodeImpl previousSibling
      Field previousSibling
    • nodeType

      protected int nodeType
      Field nodeType
  • Constructor Details

    • OMNodeImpl

      public OMNodeImpl(org.apache.axiom.om.OMFactory factory)
      Constructor OMNodeImpl
      Parameters:
      factory - The OMFactory that created this
    • OMNodeImpl

      public OMNodeImpl(org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory, boolean done)
      For a node to exist there must be a parent.
      Parameters:
      parent - Parent OMContainer of this node
      factory - The OMFactory that created this
  • Method Details

    • getParent

      public org.apache.axiom.om.OMContainer getParent()
      Returns the immediate parent of the node. Parent is always an Element.
      Specified by:
      getParent in interface org.apache.axiom.om.OMNode
      Returns:
      Returns OMContainer.
      Throws:
      org.apache.axiom.om.OMException
    • setParent

      public void setParent(org.apache.axiom.om.OMContainer element)
      Method setParent.
      Specified by:
      setParent in interface org.apache.axiom.om.impl.OMNodeEx
      Parameters:
      element -
    • getNextOMSibling

      public org.apache.axiom.om.OMNode getNextOMSibling() throws org.apache.axiom.om.OMException
      Returns the next sibling. This can be an OMAttribute or OMText or OMElement for others.
      Specified by:
      getNextOMSibling in interface org.apache.axiom.om.OMNode
      Returns:
      Returns OMNode.
      Throws:
      org.apache.axiom.om.OMException
    • getNextOMSiblingIfAvailable

      public org.apache.axiom.om.OMNode getNextOMSiblingIfAvailable()
      Specified by:
      getNextOMSiblingIfAvailable in interface org.apache.axiom.om.impl.OMNodeEx
    • setNextOMSibling

      public void setNextOMSibling(org.apache.axiom.om.OMNode node)
      Method setNextOMSibling.
      Specified by:
      setNextOMSibling in interface org.apache.axiom.om.impl.OMNodeEx
      Parameters:
      node -
    • setComplete

      public void setComplete(boolean state)
      Method setComplete.
      Specified by:
      setComplete in interface org.apache.axiom.om.impl.OMNodeEx
      Specified by:
      setComplete in class OMSerializableImpl
      Parameters:
      state -
    • detach

      public org.apache.axiom.om.OMNode detach() throws org.apache.axiom.om.OMException
      Removes this information item and its children, from the model completely.
      Specified by:
      detach in interface org.apache.axiom.om.OMNode
      Throws:
      org.apache.axiom.om.OMException
    • insertSiblingAfter

      public void insertSiblingAfter(org.apache.axiom.om.OMNode sibling) throws org.apache.axiom.om.OMException
      Inserts a sibling just after the current information item.
      Specified by:
      insertSiblingAfter in interface org.apache.axiom.om.OMNode
      Parameters:
      sibling -
      Throws:
      org.apache.axiom.om.OMException
    • insertSiblingBefore

      public void insertSiblingBefore(org.apache.axiom.om.OMNode sibling) throws org.apache.axiom.om.OMException
      Inserts a sibling just before the current information item.
      Specified by:
      insertSiblingBefore in interface org.apache.axiom.om.OMNode
      Parameters:
      sibling -
      Throws:
      org.apache.axiom.om.OMException
    • getType

      public int getType()
      Gets the type of node, as this is the super class of all the nodes.
      Specified by:
      getType in interface org.apache.axiom.om.OMNode
      Returns:
      Returns the type of node as indicated by setType(int)
      See Also:
    • setType

      public void setType(int nodeType) throws org.apache.axiom.om.OMException
      Method setType.
      Specified by:
      setType in interface org.apache.axiom.om.impl.OMNodeEx
      Parameters:
      nodeType -
      Throws:
      org.apache.axiom.om.OMException
    • getPreviousOMSibling

      public org.apache.axiom.om.OMNode getPreviousOMSibling()
      Gets the previous sibling.
      Specified by:
      getPreviousOMSibling in interface org.apache.axiom.om.OMNode
      Returns:
      boolean
    • setPreviousOMSibling

      public void setPreviousOMSibling(org.apache.axiom.om.OMNode previousSibling)
      Method setPreviousOMSibling.
      Specified by:
      setPreviousOMSibling in interface org.apache.axiom.om.impl.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 org.apache.axiom.om.OMNode
    • importNode

      protected org.apache.axiom.om.OMNode importNode(org.apache.axiom.om.OMNode child)
      This method is intended only to be used by Axiom intenals when merging Objects from different Axiom implementations to the LLOM implementation.
      Parameters:
      child -
    • internalSerialize

      public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException
      Specified by:
      internalSerialize in interface org.apache.axiom.om.impl.OMNodeEx
      Throws:
      XMLStreamException
    • internalSerializeAndConsume

      public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException
      Specified by:
      internalSerializeAndConsume in interface org.apache.axiom.om.impl.OMNodeEx
      Throws:
      XMLStreamException