Typically, developers do not implement this interface directly. There are several abstract classes that you can inherit from depending on the function that your component performs and which CAS interface it uses:
The framework interacts with AnalysisComponents as follows:
true
if the AnalysisComponent intends to produce new output CASes, or false
if the AnalysisComponent will not produce new output CASes.true
, the framework will then call the {@link #next()} method.next
method, can create a new CAS by calling {@link UimaContext#getEmptyCas(Class)} (or instead, one of the helper methods in the ImplBaseclass that it extended). It then populates the empty CAS and returns it.hasNext()
returns false.process
is called until the time when hasNext
returns false, the AnalysisComponent "owns" the CAS that was passed to process
. The AnalysisComponent is permitted to make changes to this CAS. Once hasNext
returns false, the AnalysisComponent releases control of the initial CAS. This means that the AnalysisComponent must finish all updates to the initial CAS prior to returning false from hasNext. However, if the process
method is called a second time, before hasNext
has returned false, this is a signal to the AnalysisComponent to cancel all processing of the previous CAS and begin processing the new CAS instead.
|
|