com.endeca.cas.extension
Interface BinaryContentFileProvider

All Superinterfaces:
BinaryContentProvider

public interface BinaryContentFileProvider
extends BinaryContentProvider

An interface for DataSourceRuntimes to provide access to a record's binary content via the file system. The interface consists of a single method to retrieve a File 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 only processed for new or updated records. Binary content is not processed if text extraction is not enabled for the acquisition.

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, BinaryContentInputStreamProvider

Method Summary
 File getBinaryContentFile(Record record)
          Retrieves the file containing the binary content of the given record.
 

Method Detail

getBinaryContentFile

File getBinaryContentFile(Record record)
                          throws ExecutionException
Retrieves the file containing the binary content of the given record. If the returned File is null, no text extraction will be performed for the record. If the file does not exist, 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:
A File containing the binary content or null if the record has no binary content
Throws:
ExecutionException - If there is an error retrieving the binary content file associated with the given record. The record will be discarded if an ExecutionException is thrown.
FatalExecutionException - If the BinaryContentFileProvider detects an error that should cause the acquisition to abort.
See Also:
PipelineComponentRuntime.stop()


Copyright © 2007, 2012, Oracle and/or its affiliates. All rights reserved.