Package com.pspdfkit.document.library
Interface LibraryIndexingListener
-
- All Implemented Interfaces:
public interface LibraryIndexingListener
Listener to monitor indexing progress.
-
-
Method Summary
Modifier and Type Method Description abstract void
onStartIndexingDocument(@NonNull() String documentUID)
Called when a document starts indexing. abstract void
onFinishIndexingDocument(@NonNull() String documentUID, boolean success)
Called when a document finishes indexing. abstract boolean
enableOnPageIndexedEvents()
Whether onPageIndexed callback should be called for each page indexed. abstract void
onPageIndexed(@NonNull() String documentUID, @IntRange(from = 0) int pageIndex, @NonNull() String text)
Called for each page indexed if enableOnPageIndexedEvents returns true
.-
-
Method Detail
-
onStartIndexingDocument
abstract void onStartIndexingDocument(@NonNull() String documentUID)
Called when a document starts indexing.
- Parameters:
documentUID
- document UID of the document that started indexing.
-
onFinishIndexingDocument
abstract void onFinishIndexingDocument(@NonNull() String documentUID, boolean success)
Called when a document finishes indexing.
- Parameters:
documentUID
- document UID of the document that finished indexing.success
-true
if document indexing finished successfully.
-
enableOnPageIndexedEvents
abstract boolean enableOnPageIndexedEvents()
Whether onPageIndexed callback should be called for each page indexed.
NOTE: This may significantly slow down the indexing progress. Should return
false
if this information is not needed.- Returns:
true
if progress should be reported for each page indexed.
-
onPageIndexed
abstract void onPageIndexed(@NonNull() String documentUID, @IntRange(from = 0) int pageIndex, @NonNull() String text)
Called for each page indexed if enableOnPageIndexedEvents returns
true
.- Parameters:
documentUID
- document UID of the document that's indexing.pageIndex
- 0-indexed page index of the page processed.text
- text on the page that was indexed into the library.
-
-
-
-