Package org.apache.axiom.om.impl
Class OMNavigator
java.lang.Object
org.apache.axiom.om.impl.OMNavigator
Refer to the test, org.apache.axiom.om.OMNavigatorTest, to find out how to use features like
isNavigable, isComplete and step.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor OMNavigator.OMNavigator(OMSerializable node) Constructor OMNavigator. -
Method Summary
Modifier and TypeMethodDescriptiongetNext()Get the next information item.voidinit(OMSerializable node) Method init.booleanReturns the completed status.booleanReturns the navigable status.next()Get the next node.voidsetDataSourceIsLeaf(boolean value) Indicate if an OMSourcedElement with a OMDataSource should be considered as an interior element node or as a leaf.voidstep()This is a very special method.booleanvisited()Method visited.
-
Field Details
-
node
Field node
-
-
Constructor Details
-
OMNavigator
public OMNavigator()Constructor OMNavigator. -
OMNavigator
Constructor OMNavigator.- Parameters:
node-
-
-
Method Details
-
init
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
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
Get the next node. This method only exists for compatibility with existing code. It may throw aClassCastExceptionif an attempt is made to use it on a navigator that was created from anOMDocument.- 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. -
isCompleted
public boolean isCompleted()Returns the completed status.- Returns:
- Returns boolean.
-