public class SearchOptions extends Object
An instance of SearchOptions
class is used as parameter in Parser.search(String, SearchOptions)
method.
See the usage examples there.
Learn more:
Constructor and Description |
---|
SearchOptions()
Initializes a new instance of the
SearchOptions class with default values. |
SearchOptions(boolean matchCase,
boolean matchWholeWord,
boolean useRegularExpression)
Initializes a new instance of the
SearchOptions class which is used to search without highlight extraction. |
SearchOptions(boolean matchCase,
boolean matchWholeWord,
boolean useRegularExpression,
boolean searchByPages)
Initializes a new instance of the
SearchOptions class
which is used to search by pages and without highlight extraction. |
SearchOptions(boolean matchCase,
boolean matchWholeWord,
boolean useRegularExpression,
boolean searchByPages,
HighlightOptions leftHighlightOptions,
HighlightOptions rightHighlightOptions)
Initializes a new instance of the
SearchOptions class. |
SearchOptions(boolean matchCase,
boolean matchWholeWord,
boolean useRegularExpression,
HighlightOptions highlightOptions)
Initializes a new instance of the
SearchOptions class which is used to search with the same highlight options for the left and the right highlight extraction. |
SearchOptions(boolean matchCase,
boolean matchWholeWord,
boolean useRegularExpression,
HighlightOptions leftHighlightOptions,
HighlightOptions rightHighlightOptions)
Initializes a new instance of the
SearchOptions class which is used to search
with the highlight options for the left and the right highlight extraction. |
Modifier and Type | Method and Description |
---|---|
HighlightOptions |
getLeftHighlightOptions()
Gets the options for the left highlight.
|
HighlightOptions |
getRightHighlightOptions()
Gets the options for the right highlight.
|
boolean |
isMatchCase()
Gets the value that indicates whether a text case isn't ignored.
|
boolean |
isMatchWholeWord()
Gets the value that indicates whether text search is limited by a whole word.
|
boolean |
isSearchByPages()
Gets the value that indicates whether the search is performed by pages.
|
boolean |
isUseRegularExpression()
Gets the value that indicates whether a regular expression is used.
|
public SearchOptions(boolean matchCase, boolean matchWholeWord, boolean useRegularExpression, boolean searchByPages, HighlightOptions leftHighlightOptions, HighlightOptions rightHighlightOptions)
SearchOptions
class.matchCase
- The value that indicates whether a text case isn't ignored.matchWholeWord
- The value that indicates whether text search is limited by a whole word.useRegularExpression
- The value that indicates whether a regular expression is used.searchByPages
- The value that indicates whether the search is performed by pages.leftHighlightOptions
- The options for the left highlight.rightHighlightOptions
- The options for the right highlight.public SearchOptions(boolean matchCase, boolean matchWholeWord, boolean useRegularExpression, HighlightOptions leftHighlightOptions, HighlightOptions rightHighlightOptions)
SearchOptions
class which is used to search
with the highlight options for the left and the right highlight extraction.matchCase
- The value that indicates whether a text case isn't ignored.matchWholeWord
- The value that indicates whether text search is limited by a whole word.useRegularExpression
- The value that indicates whether a regular expression is used.leftHighlightOptions
- The options for the left highlight.rightHighlightOptions
- The options for the right highlight.public SearchOptions(boolean matchCase, boolean matchWholeWord, boolean useRegularExpression, HighlightOptions highlightOptions)
SearchOptions
class which is used to search with the same highlight options for the left and the right highlight extraction.matchCase
- The value that indicates whether a text case isn't ignored.matchWholeWord
- The value that indicates whether text search is limited by a whole word.useRegularExpression
- The value that indicates whether a regular expression is used.highlightOptions
- The options for both highlights.public SearchOptions(boolean matchCase, boolean matchWholeWord, boolean useRegularExpression)
SearchOptions
class which is used to search without highlight extraction.matchCase
- The value that indicates whether a text case isn't ignored.matchWholeWord
- The value that indicates whether text search is limited by a whole word.useRegularExpression
- The value that indicates whether a regular expression is used.public SearchOptions(boolean matchCase, boolean matchWholeWord, boolean useRegularExpression, boolean searchByPages)
SearchOptions
class
which is used to search by pages and without highlight extraction.matchCase
- The value that indicates whether a text case isn't ignored.matchWholeWord
- The value that indicates whether text search is limited by a whole word.useRegularExpression
- The value that indicates whether a regular expression is used.searchByPages
- The value that indicates whether the search is performed by pages.public SearchOptions()
SearchOptions
class with default values. See remarks for details.
The following properties have default values:
false
false
false
null
null
public boolean isMatchCase()
true
if a text case isn't ignored; otherwise, false
.public boolean isMatchWholeWord()
true
if text search is limited by a whole word; otherwise, false
.public boolean isUseRegularExpression()
true
if a regular expression is used; otherwise, false
.public boolean isSearchByPages()
true
if the search is performed by pages; otherwise, false
and the search is performed on the whole document without including SearchResult.getPageIndex()
property value
in SearchResult
class.public HighlightOptions getLeftHighlightOptions()
HighlightOptions
class; nill
if it isn't set.public HighlightOptions getRightHighlightOptions()
HighlightOptions
class; nill
if it isn't set.