public class TextNavigation extends Navigation
Navigation class used to navigate the text content,
which can search the document and find the matched text and return
TextSelection instance.| Constructor and Description |
|---|
TextNavigation(String pattern,
Document doc)
Construct
TextNavigation with matched condition and
navigation scope. |
TextNavigation(String pattern,
OdfElement element)
Construct
TextNavigation with matched condition and
navigation scope. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Check if has next
TextSelection with satisfied content
pattern. |
boolean |
match(Node element)
Check if the text content of element match the specified matched
condition, which is stated when the
TextNavigation created. |
Selection |
nextSelection()
Get next
TextSelection. |
getNextMatchElement, getNextMatchElementInTreepublic TextNavigation(String pattern, Document doc)
TextNavigation with matched condition and
navigation scope.pattern - the matched pattern Stringdoc - the navigation scopepublic TextNavigation(String pattern, OdfElement element)
TextNavigation with matched condition and
navigation scope.pattern - the matched pattern Stringelement - the ODF element whose content will be navigated.public boolean hasNext()
TextSelection with satisfied content
pattern.hasNext in class NavigationNavigation.hasNext()public Selection nextSelection()
TextSelection.nextSelection in class NavigationSelection resultNavigation.nextSelection()public boolean match(Node element)
TextNavigation created.match in class Navigationelement - navigate this elementCopyright © 2010-2015 The Apache Software Foundation. All Rights Reserved.