|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FormatReaderProcessor
Caveat: levigo reserves the right to add methods to this interface with future releases.
Therefore we strongly recommend sub-classing AbstractFormatReaderProcessor
instead of
directly implementing this interface. Doing so shields implementors from the need to extend their
implementations should this interface be extended.
Method Summary | |
---|---|
void |
attachPageSegment(PageSegment pageSegment,
int streamIndex,
int pageIndex,
DocumentLayer layer,
Map<String,Object> pageProperties,
Metadata pageMetadata)
Attach a PageSegment to a page that has been loaded earlier within the same read
operation. |
void |
expectedPageCountDetermined(int totalExpectedPageCount)
|
boolean |
isCancelRequested()
Return whether the reader shall abort the read. |
void |
processDocumentMetadata(Metadata metadata)
Receive document meta-data to be applied to the target document. |
void |
processDocumentProperty(String key,
Object value)
Receive a key-value-pair to be applied as a user property to the target document. |
void |
processPageSegment(PageSegment pageSegment,
int pageIndex,
DocumentLayer layer,
Map<String,Object> pageProperties,
Metadata pageMetadata)
Receive a PageSegment from the format reader. |
void |
readStarted(int pageIndex)
|
Method Detail |
---|
void processPageSegment(PageSegment pageSegment, int pageIndex, DocumentLayer layer, Map<String,Object> pageProperties, Metadata pageMetadata)
FormatReader
s
whenever they have read a page.
pageSegment
- the page segment that has been readpageIndex
- the zero-based index of the page within the source streamlayer
- the layer to which this page segment pertains to. The layer must be one
of the default layers defined in DocumentLayer
.pageProperties
- a map of page properties to be applied to the target page or
null
pageMetadata
- the page meta-data to be added to the target page or null
DocumentLayer.DEFAULT
,
DocumentLayer.ANNOTATIONS
,
DocumentLayer.BACKGROUND
,
DocumentLayer.FORM
void attachPageSegment(PageSegment pageSegment, int streamIndex, int pageIndex, DocumentLayer layer, Map<String,Object> pageProperties, Metadata pageMetadata)
PageSegment
to a page that has been loaded earlier within the same read
operation. The page to which the segment should be attached is identified by the given
streamIndex and pageIndex.
pageSegment
- the page segment that should be attachedstreamIndex
- the zero-based index of the source stream from which a segment on the target
page must have been readpageIndex
- the zero-based index of the page within the source stream from which a segment
on the target page must have been readlayer
- the layer to which this page segment pertains to. The layer must be one
of the default layers defined in DocumentLayer
.pageProperties
- a map of page properties to be applied to the target page or
null
pageMetadata
- the page meta-data to be added to the target page or null
IllegalArgumentException
- if there is already a page segment at the identified page and
layer.DocumentLayer.DEFAULT
,
DocumentLayer.ANNOTATIONS
,
DocumentLayer.BACKGROUND
,
DocumentLayer.FORM
void processDocumentProperty(String key, Object value)
key
- the property keyvalue
- the property valuevoid processDocumentMetadata(Metadata metadata)
metadata
- the metadataboolean isCancelRequested()
true
, if the read shall be aborted, false
otherwise.void readStarted(int pageIndex)
void expectedPageCountDetermined(int totalExpectedPageCount)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |