org.odftoolkit.simple.common.navigation
public abstract class Navigation extends Object
Navigation
is used to navigate the document and find the matched
element by user defined conditions.Constructor and Description |
---|
Navigation() |
Modifier and Type | Method and Description |
---|---|
protected Node |
getNextMatchElement(Node startpoint)
Get the next matched element in the whole element tree.
|
protected Node |
getNextMatchElementInTree(Node startpoint,
Node root)
Get the next matched element node in a sub tree
|
abstract boolean |
hasNext()
Return true if document still has more matched
Selection when traversing the document(in other words return true if
getNextMatchElement() would return an element instance rather than return
null) |
abstract boolean |
match(Node element)
Check if the element is a qualified one.
|
abstract Selection |
nextSelection()
Get next
Selection result. |
public abstract boolean hasNext()
Selection
when traversing the document(in other words return true if
getNextMatchElement() would return an element instance rather than return
null)public abstract Selection nextSelection()
Selection
result.Selection
resultpublic abstract boolean match(Node element)
Developers can define their own logic here to determine whether an element satisfies the requirements.
element
- navigate this element node.protected Node getNextMatchElement(Node startpoint)
startpoint
- navigate from the start pointCopyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.