public class

TextSearchResult

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.TextSearchResult

Class Overview

TextSearchResult is used by the TextSearch class for returning a search result. Note that users should always query the result code using method getCode() before using other information. Only when the code is 'e_found', is other information valid.

Summary

Constants
int e_done Codes that indicate why the search process returns.
int e_found The Constant e_found.
int e_page The Constant e_page.
Public Constructors
TextSearchResult(int cd, int pn, String rs, String as, long hlts_impl)
Constructor.
Public Methods
String getAmbientStr()
Get the ambient string that surrounds the found string.
int getCode()
Get the code indicating the reason that the search process returns.
Highlights getHighlights()
Get the Highlight info that is associated with the found string.
int getPageNum()
Get the number of the page the found instance is on.
String getResultStr()
Get the found string that matches the input pattern.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int e_done

Codes that indicate why the search process returns.

Constant Value: 0 (0x00000000)

public static final int e_found

The Constant e_found.

Constant Value: 2 (0x00000002)

public static final int e_page

The Constant e_page.

Constant Value: 1 (0x00000001)

Public Constructors

public TextSearchResult (int cd, int pn, String rs, String as, long hlts_impl)

Constructor.

Parameters
cd search process return code
pn page number
rs result string
as ambient string
hlts_impl highlight_impl

Public Methods

public String getAmbientStr ()

Get the ambient string that surrounds the found string.

Returns
  • string surrounds the found string

public int getCode ()

Get the code indicating the reason that the search process returns.

Returns
  • search process return code

public Highlights getHighlights ()

Get the Highlight info that is associated with the found string.

Returns
  • the highlights

public int getPageNum ()

Get the number of the page the found instance is on.

Returns
  • page number

public String getResultStr ()

Get the found string that matches the input pattern.

Returns
  • the result string