Class CasDataConsumer_ImplBase
- java.lang.Object
-
- org.apache.uima.resource.Resource_ImplBase
-
- org.apache.uima.resource.ConfigurableResource_ImplBase
-
- org.apache.uima.collection.base_cpm.CasDataConsumer_ImplBase
-
- All Implemented Interfaces:
CasDataConsumer,CasDataProcessor,CasProcessor,ConfigurableResource,Resource
public abstract class CasDataConsumer_ImplBase extends ConfigurableResource_ImplBase implements CasDataConsumer
Base class from which to extend when writing CAS Consumers that use theCasDatainterface to access the CAS.
-
-
Field Summary
-
Fields inherited from interface org.apache.uima.resource.Resource
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 Summary
Constructors Constructor Description CasDataConsumer_ImplBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Releases all resources held by thisResource.ProcessingResourceMetaDatagetProcessingResourceMetaData()Gets the metadata that describes thisCasProcesor.voidinitialize()This method is called during initialization, and does nothing by default.booleaninitialize(ResourceSpecifier aSpecifier, java.util.Map<java.lang.String,java.lang.Object> aAdditionalParams)Called by the framework to initialize this CAS Consumer.booleanisReadOnly()Gets whether this is a read-only CAS Processor, which does not modify the CAS.booleanisStateless()Gets whether this is a stateless CAS Processor.-
Methods inherited from class org.apache.uima.resource.ConfigurableResource_ImplBase
getConfigParameterValue, getConfigParameterValue, reconfigure, setConfigParameterValue, setConfigParameterValue
-
Methods inherited from class org.apache.uima.resource.Resource_ImplBase
getCasManager, getLogger, getMetaData, getRelativePathResolver, getResourceManager, getUimaContext, getUimaContextAdmin, loadUserClass, loadUserClassOrThrow, setContextHolder, setContextHolderX, setLogger, setMetaData, withContextHolder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.uima.collection.base_cpm.CasDataConsumer
batchProcessComplete, collectionProcessComplete
-
Methods inherited from interface org.apache.uima.collection.base_cpm.CasDataProcessor
process, process
-
Methods inherited from interface org.apache.uima.resource.ConfigurableResource
getConfigParameterValue, getConfigParameterValue, reconfigure, setConfigParameterValue, setConfigParameterValue
-
Methods inherited from interface org.apache.uima.resource.Resource
getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger
-
-
-
-
Method Detail
-
initialize
public boolean initialize(ResourceSpecifier aSpecifier, java.util.Map<java.lang.String,java.lang.Object> aAdditionalParams) throws ResourceInitializationException
Called by the framework to initialize this CAS Consumer. Subclasses should NOT override this method; instead they should override the zero-argumentinitialize()method and access metadata via thegetProcessingResourceMetaData()method. This method is non-final only for legacy reasons.- Specified by:
initializein interfaceResource- Overrides:
initializein classResource_ImplBase- Parameters:
aSpecifier- specifies how to create a resource or locate an existing resource service.aAdditionalParams- a Map containing additional parameters. May benullif there are no parameters. Each class that implements this interface can decide what additional parameters it supports.- Returns:
- true if and only if initialization completed successfully. Returns false if the given
ResourceSpecifieris not of an appropriate type for this Resource. If theResourceSpecifieris of an appropriate type but is invalid or if some other failure occurs, an exception should be thrown. - Throws:
ResourceInitializationException- if a failure occurs during initialization.- See Also:
Resource.initialize(org.apache.uima.resource.ResourceSpecifier, java.util.Map)
-
initialize
public void initialize() throws ResourceInitializationExceptionThis method is called during initialization, and does nothing by default. Subclasses should override it to perform one-time startup logic.- Throws:
ResourceInitializationException- if a failure occurs during initialization.
-
destroy
public void destroy()
Description copied from interface:ResourceReleases all resources held by thisResource.- Specified by:
destroyin interfaceResource- Overrides:
destroyin classResource_ImplBase- See Also:
Resource.destroy()
-
isStateless
public boolean isStateless()
Description copied from interface:CasProcessorGets whether this is a stateless CAS Processor. Stateless CAS Processors do not maintain any data between calls to their process methods.- Specified by:
isStatelessin interfaceCasProcessor- Returns:
- true if this CAS processor is stateless, false if it is stateful.
- See Also:
CasProcessor.isStateless()
-
isReadOnly
public boolean isReadOnly()
Description copied from interface:CasProcessorGets whether this is a read-only CAS Processor, which does not modify the CAS.- Specified by:
isReadOnlyin interfaceCasProcessor- Returns:
- true if this CAS processor does not modify the CAS, false if it does.
- See Also:
CasProcessor.isReadOnly()
-
getProcessingResourceMetaData
public ProcessingResourceMetaData getProcessingResourceMetaData()
Description copied from interface:CasProcessorGets the metadata that describes thisCasProcesor.- Specified by:
getProcessingResourceMetaDatain interfaceCasProcessor- Returns:
- an object containing all metadata for this CasProcessor
- See Also:
CasProcessor.getProcessingResourceMetaData()
-
-