Package org.apache.uima.fit.component
Class CasDumpWriter
java.lang.Object
org.apache.uima.analysis_component.AnalysisComponent_ImplBase
org.apache.uima.analysis_component.Annotator_ImplBase
org.apache.uima.analysis_component.CasAnnotator_ImplBase
org.apache.uima.fit.component.CasConsumer_ImplBase
org.apache.uima.fit.component.CasDumpWriter
- All Implemented Interfaces:
org.apache.uima.analysis_component.AnalysisComponent
Dumps CAS content to a text file. This is useful when setting up test cases which contain a
reference output to which an actually produced CAS is compared. The format produced by this
component is more easily comparable than a XCAS or XMI format.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Pattern exclusion prefix.static final String
Pattern inclusion prefix.static final String
Include/exclude features according to the following patterns.static final String
Output file.static final String
Sort increasing by begin, decreasing by end, increasing by name instead of relying on index order.static final String
Include/exclude specified UIMA types in the output.static final String
Whether to dump the content of theCAS.getDocumentAnnotation()
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
initialize
(org.apache.uima.UimaContext context) void
process
(org.apache.uima.cas.CAS aCAS) Methods inherited from class org.apache.uima.analysis_component.CasAnnotator_ImplBase
getRequiredCasInterface, process, typeSystemInit
Methods inherited from class org.apache.uima.analysis_component.Annotator_ImplBase
getCasInstancesRequired, hasNext, next
Methods inherited from class org.apache.uima.analysis_component.AnalysisComponent_ImplBase
batchProcessComplete, destroy, getContext, getLogger, getResultSpecification, reconfigure, setResultSpecification
-
Field Details
-
INCLUDE_PREFIX
Pattern inclusion prefix.- See Also:
-
EXCLUDE_PREFIX
Pattern exclusion prefix.- See Also:
-
PARAM_OUTPUT_FILE
Output file. If multiple CASes as processed, their contents are concatenated into this file. Mind that a test case using this consumer with multiple CASes requires a reader which produced the CASes always in the same order. When this file is set to "-", the dump does toSystem.out
(default).- See Also:
-
PARAM_WRITE_DOCUMENT_META_DATA
Whether to dump the content of theCAS.getDocumentAnnotation()
.- See Also:
-
PARAM_FEATURE_PATTERNS
Include/exclude features according to the following patterns. Mind that the patterns do not actually match feature names but lines produced byFeatureStructure.toString()
.- See Also:
-
PARAM_TYPE_PATTERNS
Include/exclude specified UIMA types in the output.- See Also:
-
PARAM_SORT
Sort increasing by begin, decreasing by end, increasing by name instead of relying on index order.- See Also:
-
-
Constructor Details
-
CasDumpWriter
public CasDumpWriter()
-
-
Method Details
-
initialize
public void initialize(org.apache.uima.UimaContext context) throws org.apache.uima.resource.ResourceInitializationException - Specified by:
initialize
in interfaceorg.apache.uima.analysis_component.AnalysisComponent
- Overrides:
initialize
in classCasConsumer_ImplBase
- Throws:
org.apache.uima.resource.ResourceInitializationException
-
process
public void process(org.apache.uima.cas.CAS aCAS) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException - Specified by:
process
in classorg.apache.uima.analysis_component.CasAnnotator_ImplBase
- Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException
-
collectionProcessComplete
public void collectionProcessComplete()- Specified by:
collectionProcessComplete
in interfaceorg.apache.uima.analysis_component.AnalysisComponent
- Overrides:
collectionProcessComplete
in classorg.apache.uima.analysis_component.AnalysisComponent_ImplBase
-