com.groupdocs.parser.options

Class SearchOptions

    • Constructor Detail

      • SearchOptions

        public SearchOptions(boolean matchCase,
                     boolean matchWholeWord,
                     boolean useRegularExpression,
                     boolean searchByPages,
                     HighlightOptions leftHighlightOptions,
                     HighlightOptions rightHighlightOptions)
        Initializes a new instance of the SearchOptions class.
        Parameters:
        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.
      • SearchOptions

        public 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.
        Parameters:
        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.
      • SearchOptions

        public 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.
        Parameters:
        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.
      • SearchOptions

        public SearchOptions(boolean matchCase,
                     boolean matchWholeWord,
                     boolean useRegularExpression)
        Initializes a new instance of the SearchOptions class which is used to search without highlight extraction.
        Parameters:
        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.
      • SearchOptions

        public 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.
        Parameters:
        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.
      • SearchOptions

        public SearchOptions()
        Initializes a new instance of the SearchOptions class with default values. See remarks for details.

        The following properties have default values:

        • MatchCase: false
        • MatchWholeWord: false
        • UseRegularExpression: false
        • LeftHighlightOptions: null
        • RightHighlightOptions: null
    • Method Detail

      • isMatchCase

        public boolean isMatchCase()
        Gets the value that indicates whether a text case isn't ignored.
        Returns:
        true if a text case isn't ignored; otherwise, false.
      • isMatchWholeWord

        public boolean isMatchWholeWord()
        Gets the value that indicates whether text search is limited by a whole word.
        Returns:
        true if text search is limited by a whole word; otherwise, false.
      • isUseRegularExpression

        public boolean isUseRegularExpression()
        Gets the value that indicates whether a regular expression is used.
        Returns:
        true if a regular expression is used; otherwise, false.
      • isSearchByPages

        public boolean isSearchByPages()
        Gets the value that indicates whether the search is performed by pages.
        Returns:
        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.
      • getLeftHighlightOptions

        public HighlightOptions getLeftHighlightOptions()
        Gets the options for the left highlight.
        Returns:
        An instance of HighlightOptions class; nill if it isn't set.
      • getRightHighlightOptions

        public HighlightOptions getRightHighlightOptions()
        Gets the options for the right highlight.
        Returns:
        An instance of HighlightOptions class; nill if it isn't set.