public abstract class AbstractOutputFileWriter
extends org.apache.uima.fit.component.CasConsumer_ImplBase
Constructor and Description |
---|
AbstractOutputFileWriter() |
Modifier and Type | Method and Description |
---|---|
protected String |
getOutputDirectory(org.apache.uima.jcas.JCas jcas,
String rootPath,
String documentId) |
protected String |
getSourceFileName(org.apache.uima.jcas.JCas jcas,
String documentId) |
protected String |
getSourceFilePath(org.apache.uima.jcas.JCas jCas) |
protected String |
getSubdirectory(org.apache.uima.jcas.JCas jCas,
String documentId) |
void |
initialize(org.apache.uima.UimaContext context) |
void |
process(org.apache.uima.cas.CAS cas) |
abstract void |
writeFile(org.apache.uima.jcas.JCas jCas,
String outputDir,
String documentId,
String fileName)
Write information into a file named based upon the document id and located based upon the document id prefix.
|
getRequiredCasInterface, process, typeSystemInit
getCasInstancesRequired, hasNext, next
public void initialize(org.apache.uima.UimaContext context) throws org.apache.uima.resource.ResourceInitializationException
initialize
in interface org.apache.uima.analysis_component.AnalysisComponent
initialize
in class org.apache.uima.fit.component.CasConsumer_ImplBase
org.apache.uima.resource.ResourceInitializationException
public void process(org.apache.uima.cas.CAS cas) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
process
in class org.apache.uima.analysis_component.CasAnnotator_ImplBase
org.apache.uima.analysis_engine.AnalysisEngineProcessException
public abstract void writeFile(org.apache.uima.jcas.JCas jCas, String outputDir, String documentId, String fileName) throws IOException
jCas
- ye oldeoutputDir
- output directorydocumentId
- some id for the cas documentfileName
- name for the output fileIOException
- if anything goes wrongprotected String getOutputDirectory(org.apache.uima.jcas.JCas jcas, String rootPath, String documentId)
jcas
- ye olderootPath
- the root path for all output subdirectories and filesdocumentId
- some id for the cas documentprotected String getSubdirectory(org.apache.uima.jcas.JCas jCas, String documentId)
jCas
- ye oldedocumentId
- some id for the cas documentDocumentIdPrefix
stored in the cas, or none if noneprotected String getSourceFilePath(org.apache.uima.jcas.JCas jCas)
jCas
- ye oldeCopyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.