Class OMNavigator

java.lang.Object
org.apache.axiom.om.impl.OMNavigator

public class OMNavigator extends Object
Refer to the test, org.apache.axiom.om.OMNavigatorTest, to find out how to use features like isNavigable, isComplete and step.
  • Field Details

  • Constructor Details

    • OMNavigator

      public OMNavigator()
      Constructor OMNavigator.
    • OMNavigator

      public OMNavigator(OMSerializable node)
      Constructor OMNavigator.
      Parameters:
      node -
  • Method Details

    • init

      public void init(OMSerializable node)
      Method init.
      Parameters:
      node -
    • setDataSourceIsLeaf

      public void setDataSourceIsLeaf(boolean value)
      Indicate if an OMSourcedElement with a OMDataSource should be considered as an interior element node or as a leaf.
      Parameters:
      value - boolean
    • getNext

      public OMSerializable getNext()
      Get the next information item.
      Returns:
      the next information item in the sequence of preorder traversal. Note however that a container (document or element) is treated slightly differently. Once the container is passed it returns the same item in the next encounter as well.
    • next

      public OMNode next()
      Get the next node. This method only exists for compatibility with existing code. It may throw a ClassCastException if an attempt is made to use it on a navigator that was created from an OMDocument.
      Returns:
      the next node
      See Also:
    • visited

      public boolean visited()
      Method visited.
      Returns:
      Returns boolean.
    • step

      public void step()
      This is a very special method. This allows the navigator to step once it has reached the existing OM. At this point the isNavigable method will return false but the isComplete method may return false which means that the navigating the given element is not complete and the navigator cannot proceed.
    • isNavigable

      public boolean isNavigable()
      Returns the navigable status.
      Returns:
      Returns boolean.
    • isCompleted

      public boolean isCompleted()
      Returns the completed status.
      Returns:
      Returns boolean.