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

java.lang.Object
  extended by org.apache.axiom.om.impl.llom.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 Summary
protected  OMNode node
          Field node
 
Constructor Summary
OMNavigator()
          Constructor OMNavigator.
OMNavigator(OMNode node)
          Constructor OMNavigator.
 
Method Summary
 void init(OMNode node)
          Method init.
 boolean isCompleted()
          Returns the completed status.
 boolean isNavigable()
          Returns the navigable status.
 OMNode next()
          Gets the next node.
 void step()
          This is a very special method.
 boolean visited()
          Method visited.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

protected OMNode node
Field node

Constructor Detail

OMNavigator

public OMNavigator()
Constructor OMNavigator.


OMNavigator

public OMNavigator(OMNode node)
Constructor OMNavigator.

Parameters:
node -
Method Detail

init

public void init(OMNode node)
Method init.

Parameters:
node -

next

public OMNode next()
Gets the next node.

Returns:
Returns OMnode in the sequence of preorder traversal. Note however that an element node is treated slightly differently. Once the element is passed it returns the same element in the next encounter as well.

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.


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