Class JCasMultiplier_ImplBase
java.lang.Object
org.apache.uima.analysis_component.AnalysisComponent_ImplBase
org.apache.uima.analysis_component.JCasMultiplier_ImplBase
- All Implemented Interfaces:
AnalysisComponent
Base class to be extended by CAS Multipliers that use the
CAS interface. A CAS Multiplier
can produce multiplie output CASes while processing an input CAS. See AnalysisComponent
for a description of how the framework calls the methods on this interface.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the maximum number of CAS instances that this CAS Multiplier expects to use at the same time.protected final JCasGets an empty JCas that this CAS Multiplier can then populate.Returns the specific CAS interface that this AnalysisComponent requires the framework to pass to itsAnalysisComponent.process(AbstractCas)method.final voidprocess(AbstractCas aCAS) Inputs a CAS to the AnalysisComponent.abstract voidThis method should be overridden by subclasses.Methods inherited from class org.apache.uima.analysis_component.AnalysisComponent_ImplBase
batchProcessComplete, collectionProcessComplete, destroy, getContext, getLogger, getResultSpecification, initialize, reconfigure, setResultSpecificationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.uima.analysis_component.AnalysisComponent
hasNext, next
-
Constructor Details
-
JCasMultiplier_ImplBase
public JCasMultiplier_ImplBase()
-
-
Method Details
-
getRequiredCasInterface
Description copied from interface:AnalysisComponentReturns the specific CAS interface that this AnalysisComponent requires the framework to pass to itsAnalysisComponent.process(AbstractCas)method.- Returns:
- the required CAS interface. This must specify a subtype of
AbstractCas.
-
getCasInstancesRequired
public int getCasInstancesRequired()Returns the maximum number of CAS instances that this CAS Multiplier expects to use at the same time. Returns a default value of 1, which will be sufficient for most CAS Multipliers. Only if there is a clear need should this be overridden to return something greater than 1.- Returns:
- the number of CAS instances required by this AnalysisComponent.
-
process
Description copied from interface:AnalysisComponentInputs a CAS to the AnalysisComponent. The AnalysisComponent "owns" this CAS until such time asAnalysisComponent.hasNext()is called and returns false or untilprocessis called again (see class description).- Parameters:
aCAS- A CAS that this AnalysisComponent should process. The framework will ensure that aCAS implements the specific CAS interface specified by theAnalysisComponent.getRequiredCasInterface()method.- Throws:
AnalysisEngineProcessException- if a problem occurs during processing
-
process
This method should be overridden by subclasses. Inputs a JCAS to the AnalysisComponent. The AnalysisComponent "owns" this JCAS until such time asAnalysisComponent.hasNext()is called and returns false, or until theprocessmethod is called again (seeAnalysisComponentfor details).- Parameters:
aJCas- a JCAS that this AnalysisComponent should process.- Throws:
AnalysisEngineProcessException- if a problem occurs during processing
-
getEmptyJCas
Gets an empty JCas that this CAS Multiplier can then populate.- Returns:
- an empty JCas
-