com.groupdocs.parser.data

Class SearchResult

    • Constructor Detail

      • SearchResult

        public SearchResult(int position,
                            String text,
                            Integer pageIndex,
                            HighlightItem leftHighlightItem,
                            HighlightItem rightHighlightItem)
        Initializes a new instance of the SearchResult class.
        Parameters:
        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.
      • SearchResult

        public SearchResult(int position,
                            String text,
                            Integer pageIndex)
        Initializes a new instance of the SearchResult class.
        Parameters:
        position - The position in the document text.
        text - The found text.
        pageIndex - The page index where the text is found.
    • Method Detail

      • getPosition

        public int getPosition()
        Gets the position in the document text.
        Returns:
        A zero-based index of the start position of the search result.
      • getText

        public String getText()
        Gets the text.
        Returns:
        A string value that respresents the found text.
      • getPageIndex

        public Integer getPageIndex()
        Gets the page index where the text is found.
        Returns:
        A zero-based index of the page where the text is found; null if the seach is performed on the whole document text.
      • getLeftHighlightItem

        public HighlightItem getLeftHighlightItem()
        Gets the left highlight.
        Returns:
        An instance of HighlightItem class; null if it isn't set.
      • getRightHighlightItem

        public HighlightItem getRightHighlightItem()
        Gets the right highlight.
        Returns:
        An instance of HighlightItem class; null if it isn't set.