public class AnnotationWriter extends CasConsumer_ImplBase implements CasConsumer
PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_MANAGER, PARAM_CONFIG_PARAM_SETTINGS, PARAM_EXTERNAL_OVERRIDE_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT
Constructor and Description |
---|
AnnotationWriter() |
Modifier and Type | Method and Description |
---|---|
void |
batchProcessComplete(ProcessTrace aTrace)
Completes the processing of a batch.
|
void |
collectionProcessComplete(ProcessTrace aTrace)
Completes the processing of an entire collection.
|
void |
destroy()
Releases all resources held by this
Resource . |
void |
initialize()
Initializes this CAS Consumer with the parameters specified in the
descriptor.
|
void |
processCas(CAS aCAS)
Process a single CAS.
|
void |
reconfigure()
Notifies this CAS Consumer that its configuration parameter settings have been changed.
|
getProcessingResourceMetaData, initialize, isReadOnly, isStateless, processCas, typeSystemInit
getConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValue
getCasManager, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger, setMetaData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isReadOnly
getConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValue
getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, initialize, setLogger
processCas, typeSystemInit
getProcessingResourceMetaData, isStateless
public void initialize() throws ResourceInitializationException
initialize
in class CasConsumer_ImplBase
ResourceInitializationException
- if there is error in
initializing the resourcespublic void processCas(CAS aCAS) throws ResourceProcessException
CasObjectProcessor
processCas
in interface CasObjectProcessor
aCAS
- the CAS to be processed. Additional information may be added to this CAS (if this CAS
processor is not read-only
).ResourceProcessException
- if processing failspublic void batchProcessComplete(ProcessTrace aTrace) throws ResourceProcessException, IOException
CasProcessor
batchProcessComplete
in interface CasProcessor
batchProcessComplete
in class CasConsumer_ImplBase
aTrace
- an object that records information, such as timing, about this method's execution.ResourceProcessException
- if an exception occurs during processingIOException
- if an I/O failure occursCasProcessor.batchProcessComplete(org.apache.uima.util.ProcessTrace)
public void collectionProcessComplete(ProcessTrace aTrace) throws ResourceProcessException, IOException
CasProcessor
collectionProcessComplete
in interface CasProcessor
collectionProcessComplete
in class CasConsumer_ImplBase
aTrace
- an object that records information, such as timing, about this method's execution.ResourceProcessException
- if an exception occurs during processingIOException
- if an I/O failure occursCasProcessor.collectionProcessComplete(org.apache.uima.util.ProcessTrace)
public void reconfigure() throws ResourceConfigurationException
CasConsumer_ImplBase
CasConsumer_ImplBase.destroy()
followed by CasConsumer_ImplBase.initialize()
. CAS
Consumers that have expensive initialization that does not need to be redone whenever
configuration parameters change may wish to override this method to provide a more efficient
implementation.reconfigure
in interface ConfigurableResource
reconfigure
in class CasConsumer_ImplBase
ResourceConfigurationException
- if the configuration is not validConfigurableResource_ImplBase.reconfigure()
public void destroy()
Resource
Resource
.destroy
in interface Resource
destroy
in class CasConsumer_ImplBase
Resource.destroy()
Copyright © 2006–2023 The Apache Software Foundation. All rights reserved.