com.levigo.jadice.document
Class AbstractFormatReaderProcessor

java.lang.Object
  extended by com.levigo.jadice.document.AbstractFormatReaderProcessor
All Implemented Interfaces:
FormatReaderProcessor

public abstract class AbstractFormatReaderProcessor
extends Object
implements FormatReaderProcessor


Constructor Summary
AbstractFormatReaderProcessor()
           
 
Method Summary
 void cancel()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.levigo.jadice.document.FormatReaderProcessor
attachPageSegment, expectedPageCountDetermined, readStarted
 

Constructor Detail

AbstractFormatReaderProcessor

public AbstractFormatReaderProcessor()
Method Detail

processPageSegment

public void processPageSegment(PageSegment pageSegment,
                               int pageIndex,
                               DocumentLayer layer,
                               Map<String,Object> pageProperties,
                               Metadata pageMetadata)
Description copied from interface: FormatReaderProcessor
Receive a PageSegment from the format reader. This method is called by FormatReaders whenever they have read a page.

Specified by:
processPageSegment in interface FormatReaderProcessor
Parameters:
pageSegment - the page segment that has been read
pageIndex - the zero-based index of the page within the source stream
layer - 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
See Also:
DocumentLayer.DEFAULT, DocumentLayer.ANNOTATIONS, DocumentLayer.BACKGROUND, DocumentLayer.FORM

processDocumentProperty

public void processDocumentProperty(String key,
                                    Object value)
Description copied from interface: FormatReaderProcessor
Receive a key-value-pair to be applied as a user property to the target document.

Specified by:
processDocumentProperty in interface FormatReaderProcessor
Parameters:
key - the property key
value - the property value

processDocumentMetadata

public void processDocumentMetadata(Metadata metadata)
Description copied from interface: FormatReaderProcessor
Receive document meta-data to be applied to the target document.

Specified by:
processDocumentMetadata in interface FormatReaderProcessor
Parameters:
metadata - the metadata

isCancelRequested

public boolean isCancelRequested()
Description copied from interface: FormatReaderProcessor
Return whether the reader shall abort the read.

Specified by:
isCancelRequested in interface FormatReaderProcessor
Returns:
true, if the read shall be aborted, false otherwise.

cancel

public void cancel()


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.