|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.uima.analysis_component.AnalysisComponent_ImplBase org.apache.uima.uimacpp.UimacppAnalysisComponent
public class UimacppAnalysisComponent
Constructor Summary | |
---|---|
UimacppAnalysisComponent(ResourceCreationSpecifier aeDescription,
org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase ae)
|
Method Summary | |
---|---|
void |
batchProcessComplete()
Completes the processing of a batch of CASes. |
void |
collectionProcessComplete()
Notifies this AnalysisComponent that processing of an entire collection has been completed. |
void |
destroy()
Frees all resources held by this AnalysisComponent. |
protected void |
finalize()
|
int |
getCasInstancesRequired()
Returns the maximum number of CAS instances that this AnalysisComponent expects to use at the same time. |
protected CAS |
getEmptyCAS()
|
static int |
getLoggingLevel()
Get the logging level of the logger for TAFAnnotator. |
Class<CAS> |
getRequiredCasInterface()
Returns the specific CAS interface that this AnalysisComponent requires the framework to pass to its AnalysisComponent.process(AbstractCas) method. |
boolean |
hasNext()
Asks if this AnalysisComponent has another CAS to output. |
void |
initialize(UimaContext context)
Performs any startup tasks required by this component. |
static void |
log(int msglevel,
String sourceClass,
String sourceMethod,
String message)
|
AbstractCas |
next()
Gets the next output CAS. |
void |
process(AbstractCas aCAS)
Inputs a CAS to the AnalysisComponent. |
void |
process(CAS aCAS)
|
void |
process(CAS cas,
ResultSpecification aResultSpec)
|
void |
reconfigure()
Notifies this AnalysisComponent that its configuration parameters have changed. |
void |
typeSystemInit(TypeSystem ts)
|
Methods inherited from class org.apache.uima.analysis_component.AnalysisComponent_ImplBase |
---|
getContext, getResultSpecification, setResultSpecification |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UimacppAnalysisComponent(ResourceCreationSpecifier aeDescription, org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase ae)
Method Detail |
---|
public void initialize(UimaContext context) throws ResourceInitializationException
AnalysisComponent
The framework supplies this AnalysisComponent with a reference to the UimaContext
that
it will use, for example to access configuration settings or resources. This AnalysisComponent
should store a reference to its the UimaContext
for later use.
initialize
in interface AnalysisComponent
initialize
in class AnalysisComponent_ImplBase
context
- Provides access to services and resources managed by the framework. This includes
configuration parameters, logging, and access to external resources.
ResourceInitializationException
org.apache.uima.analysis_engine.annotator.BaseAnnotator#initialize(org.apache.uima.cas.CAS,
org.apache.uima.analysis_engine.annotator.AnnotatorContext)
public void typeSystemInit(TypeSystem ts) throws AnnotatorConfigurationException, AnnotatorInitializationException
AnnotatorConfigurationException
AnnotatorInitializationException
org.apache.uima.analysis_engine.annotator.BaseAnnotator#typeSystemInit()
public void reconfigure()
AnalysisComponent_ImplBase
AnalysisComponent_ImplBase.destroy()
followed by AnalysisComponent_ImplBase.initialize(UimaContext)
. Subclasses can
override to provide more efficient reconfiguration logic if necessary.
reconfigure
in interface AnalysisComponent
reconfigure
in class AnalysisComponent_ImplBase
org.apache.uima.analysis_engine.annotator.BaseAnnotator#reconfigure(java.lang.String[])
public void process(CAS cas, ResultSpecification aResultSpec) throws AnnotatorProcessException
AnnotatorProcessException
org.apache.uima.analysis_engine.annotator.BaseAnnotator#process(org.apache.uima.analysis_engine.ResultSpecification)
public void process(CAS aCAS) throws AnalysisEngineProcessException
AnalysisEngineProcessException
public void process(AbstractCas aCAS) throws AnalysisEngineProcessException
AnalysisComponent
AnalysisComponent.hasNext()
is called and returns false or until process
is called again
(see class description).
aCAS
- A CAS that this AnalysisComponent should process. The framework will ensure that aCAS
implements the specific CAS interface specified by the
AnalysisComponent.getRequiredCasInterface()
method.
AnalysisEngineProcessException
- if a problem occurs during processingpublic boolean hasNext() throws AnalysisEngineProcessException
AnalysisComponent
AnalysisComponent.next()
should retrieve the next output CAS. When this method returns false,
the AnalysisComponent gives up control of the initial CAS that was passed to its
AnalysisComponent.process(AbstractCas)
method.
AnalysisEngineProcessException
- if a problem occurs during processingpublic AbstractCas next() throws AnalysisEngineProcessException
AnalysisComponent
AnalysisComponent.hasNext()
and checking that it returns true.
The AnalysisComponent can obtain a new CAS by calling UimaContext.getEmptyCas(Class)
(or instead, one of the helper methods in the ImplBase class that it extended).
AnalysisEngineProcessException
- if a problem occurs during processingpublic Class<CAS> getRequiredCasInterface()
AnalysisComponent
AnalysisComponent.process(AbstractCas)
method.
AbstractCas
.public int getCasInstancesRequired()
AnalysisComponent
public void batchProcessComplete() throws AnalysisEngineProcessException
AnalysisComponent
batchProcessComplete
is to give this AnalysisComponent the change to flush
information from memory to persistent storage. In the event of an error, this allows the
processing to be restarted from the end of the last completed batch.
If this component's descriptor declares that it is recoverable
, then this
component is required to be restartable from the end of the last completed batch.
batchProcessComplete
in interface AnalysisComponent
batchProcessComplete
in class AnalysisComponent_ImplBase
AnalysisEngineProcessException
- if this component encounters a problem in flushing its state to persistent storagepublic void collectionProcessComplete() throws AnalysisEngineProcessException
AnalysisComponent
collectionProcessComplete
in interface AnalysisComponent
collectionProcessComplete
in class AnalysisComponent_ImplBase
AnalysisEngineProcessException
- if this component encounters a problem in its end-of-collection processingpublic void destroy()
AnalysisComponent
destroy
in interface AnalysisComponent
destroy
in class AnalysisComponent_ImplBase
BaseAnnotator.destroy()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public static int getLoggingLevel()
public static void log(int msglevel, String sourceClass, String sourceMethod, String message)
protected CAS getEmptyCAS()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |