com.endeca.cas.extension
Interface BinaryContentInputStreamProvider

All Superinterfaces:
BinaryContentProvider

public interface BinaryContentInputStreamProvider
extends BinaryContentProvider

An interface for DataSourceRuntimes to provide access to a record's binary content via an InputStream. The interface consists of a single method to retrieve an InputStream containing the binary content associated with a record. CAS will perform text extraction on the binary content and place the extracted text in the Endeca.Document.Text property of the record. During incremental acquisitions, binary content is processed only for new or updated records. Binary content is not processed if text extraction is not enabled for the acquisition or if there is a problem reading from the InputStream.

The implementation of this interface must be thread-safe. CAS will retrieve binary content for multiple records concurrently and potentially while DataSourceRuntime.runFullAcquisition() is still executing.

See Also:
BinaryContentProvider, BinaryContentFileProvider

Method Summary
 InputStream getBinaryContentInputStream(Record record)
          Retrieves the binary content for the given record.
 

Method Detail

getBinaryContentInputStream

InputStream getBinaryContentInputStream(Record record)
                                        throws ExecutionException
Retrieves the binary content for the given record. The returned InputStream will be automatically closed by CAS. If the InputStream is null, no text extraction will be performed for the record. If there is an error reading from the InputStream, the record will be discarded.

The implementation of this interface must be thread-safe. CAS will retrieve binary content for multiple records concurrently and potentially while DataSourceRuntime.runFullAcquisition() is still executing.

Parameters:
record - The record to get the binary content for
Returns:
An InputStream containing the binary content or null if the record has no binary content
Throws:
ExecutionException - If there is an error retrieving the binary content InputStream associated with the given record. The record will be discarded if an ExecutionException is thrown.
FatalExecutionException - If the BinaryContentInputStreamProvider detects an error that should cause the acquisition to abort.
See Also:
PipelineComponentRuntime.stop()


Copyright © 2011 Endeca. All Rights Reserved.