Interface CasProcessor
- All Known Subinterfaces:
- AnalysisEngine,- CasConsumer,- CasDataConsumer,- CasDataProcessor,- CasObjectProcessor,- TextAnalysisEngine
- All Known Implementing Classes:
- AggregateAnalysisEngine_impl,- AnalysisEngineImplBase,- AnalysisEngineProcessorAdapter,- AnalysisEngineServiceAdapter,- AnnotationWriter,- CasConsumer_ImplBase,- CasDataConsumer_ImplBase,- CasObjectNetworkCasProcessorImpl,- CasProcessorAnnotator,- InlineXmlCasConsumer,- JCasProcessorAnnotator,- MultiprocessingAnalysisEngine_impl,- NetworkCasProcessorImpl,- PearAnalysisEngineWrapper,- PrimitiveAnalysisEngine_impl,- UimacppAnalysisEngineImpl,- VinciAnalysisEngineServiceAdapter,- XCasWriterCasConsumer,- XmiWriterCasConsumer
public interface CasProcessor
Base interface for a component that can process a CAS. This includes both components that modify
 the CAS (such as an 
AnalysisEngine as well as those that
 do not (such as a CasConsumer). Whether the CasProcessor
 modifies the CAS can be determined by calling its isReadOnly() method.
 
 CasProcessors can be "plugged into" the
 CollectionProcessingManager.
 
CAS Processors should not directly implement this interface; instead they should implement one of its subinterfaces:
- CasDataProcessor- for CAS processors that want to interact directly with the- CasData. This works best for simple processors that do not need the indexing or strong typing features provided by the CAS container.
- CasObjectProcessor- for CAS processors that want to use the full- CASimplementation.
CasObjectProcessor.
 
 All CAS processors must publish their metadata via the getProcessingResourceMetaData()
 method.
- 
Method SummaryModifier and TypeMethodDescriptionvoidbatchProcessComplete(ProcessTrace aTrace) Completes the processing of a batch.voidCompletes the processing of an entire collection.Gets the metadata that describes thisCasProcesor.booleanGets whether this is a read-only CAS Processor, which does not modify the CAS.booleanGets whether this is a stateless CAS Processor.
- 
Method Details- 
isStatelessboolean isStateless()Gets whether this is a stateless CAS Processor. Stateless CAS Processors do not maintain any data between calls to their process methods.- Returns:
- true if this CAS processor is stateless, false if it is stateful.
 
- 
isReadOnlyboolean isReadOnly()Gets whether this is a read-only CAS Processor, which does not modify the CAS.- Returns:
- true if this CAS processor does not modify the CAS, false if it does.
 
- 
getProcessingResourceMetaDataProcessingResourceMetaData getProcessingResourceMetaData()Gets the metadata that describes thisCasProcesor.- Returns:
- an object containing all metadata for this CasProcessor
 
- 
batchProcessCompleteCompletes the processing of a batch. A collection may be divided into one or more batches - it is up to the CollectionProcessingManager or the application to determine the number and size of batches.- Parameters:
- aTrace- an object that records information, such as timing, about this method's execution.
- Throws:
- ResourceProcessException- if an exception occurs during processing
- IOException- if an I/O failure occurs
 
- 
collectionProcessCompleteCompletes the processing of an entire collection.- Parameters:
- aTrace- an object that records information, such as timing, about this method's execution.
- Throws:
- ResourceProcessException- if an exception occurs during processing
- IOException- if an I/O failure occurs
 
 
-