public class SimpleTextMerger
extends org.apache.uima.analysis_component.JCasMultiplier_ImplBase
Limitations: if the lastSegment feature is never set to true by the component producing the input CASes, the merger will never produce any output. Also, this implementation relies on the CASes arriving in order, which could be a problem in a mulithreaded framework implementation. The order requirement could be relieved by recording a segment number in the SourceDocumentInformation, but that would also make this example more complicated.
| Modifier and Type | Field and Description |
|---|---|
static String |
MESSAGE_DIGEST |
static String |
MISSING_SOURCE_DOCUMENT_INFO |
static String |
NO_NEXT_CAS |
| Constructor and Description |
|---|
SimpleTextMerger() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
void |
initialize(org.apache.uima.UimaContext aContext) |
org.apache.uima.cas.AbstractCas |
next() |
void |
process(org.apache.uima.jcas.JCas aJCas) |
getCasInstancesRequired, getEmptyJCas, getRequiredCasInterface, processpublic static final String MESSAGE_DIGEST
public static final String MISSING_SOURCE_DOCUMENT_INFO
public static final String NO_NEXT_CAS
public void initialize(org.apache.uima.UimaContext aContext)
throws org.apache.uima.resource.ResourceInitializationException
initialize in interface org.apache.uima.analysis_component.AnalysisComponentinitialize in class org.apache.uima.analysis_component.AnalysisComponent_ImplBaseorg.apache.uima.resource.ResourceInitializationExceptionpublic void process(org.apache.uima.jcas.JCas aJCas)
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
process in class org.apache.uima.analysis_component.JCasMultiplier_ImplBaseorg.apache.uima.analysis_engine.AnalysisEngineProcessExceptionpublic boolean hasNext()
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
org.apache.uima.analysis_engine.AnalysisEngineProcessExceptionpublic org.apache.uima.cas.AbstractCas next()
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
org.apache.uima.analysis_engine.AnalysisEngineProcessExceptionCopyright © 2006–2017 The Apache Software Foundation. All rights reserved.