public class SearchResult extends Object
An instance of SearchResult class is used as return value of Parser.search(String)
and Parser.search(String, com.groupdocs.parser.options.SearchOptions)
methods. See the usage examples there.
Constructor and Description |
---|
SearchResult(int position,
String text,
Integer pageIndex)
Initializes a new instance of the
SearchResult class. |
SearchResult(int position,
String text,
Integer pageIndex,
HighlightItem leftHighlightItem,
HighlightItem rightHighlightItem)
Initializes a new instance of the
SearchResult class. |
Modifier and Type | Method and Description |
---|---|
HighlightItem |
getLeftHighlightItem()
Gets the left highlight.
|
Integer |
getPageIndex()
Gets the page index where the text is found.
|
int |
getPosition()
Gets the position in the document text.
|
HighlightItem |
getRightHighlightItem()
Gets the right highlight.
|
String |
getText()
Gets the text.
|
public SearchResult(int position, String text, Integer pageIndex, HighlightItem leftHighlightItem, HighlightItem rightHighlightItem)
SearchResult
class.position
- The position in the document text.text
- The found text.pageIndex
- The page index where the text is found.leftHighlightItem
- The left highlight.rightHighlightItem
- The right highlight.public SearchResult(int position, String text, Integer pageIndex)
SearchResult
class.position
- The position in the document text.text
- The found text.pageIndex
- The page index where the text is found.public int getPosition()
public String getText()
public Integer getPageIndex()
null
if the seach is performed on the whole document text.public HighlightItem getLeftHighlightItem()
HighlightItem
class; null
if it isn't set.public HighlightItem getRightHighlightItem()
HighlightItem
class; null
if it isn't set.