public class FileCollectionReader extends BaseFileCollectionReader
CollectionReader reader = CollectionReaderFactory
.generateFileSubReader(new File("my-input-directory/sub-dir/"), true);
Modifier and Type | Field and Description |
---|---|
static String |
fileExtensionString
Default file extension string.
|
filenameFilter, fileNameFilterJSON, fileNameFilterName, inputDirectoryPath, LOG, mEncoding, mFileCollection, mFileIndex, mInDir, mRecurse
filters, textFilters
Constructor and Description |
---|
FileCollectionReader()
Default constructor used during UIMA initialization.
|
FileCollectionReader(File inputDirectory,
boolean recurse)
Constructor that takes an input directory path and recurse flag as inputs.
|
Modifier and Type | Method and Description |
---|---|
void |
getNext(org.apache.uima.cas.CAS aCAS)
Get the next file to be processed in the pipeline.
|
findFiles, getCollectionSize, getCurrentIndex, getEncoding, getFilenameFilter, getInputDirectory, getProgress, hasNext, initialize, setEncoding, setFilenameFilter, setInputDirectory, setRecurseFlag
addFilters, addFilters, close, generateCollectionReaderDescription, getFilters, produceCollectionReader
destroy, getCasInitializer, getProcessingResourceMetaData, initialize, isConsuming, reconfigure, setCasInitializer, typeSystemInit
getConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValue
getCasManager, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger, setMetaData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final String fileExtensionString
public FileCollectionReader()
public FileCollectionReader(File inputDirectory, boolean recurse)
inputDirectory
- Path to the input directory to be read.recurse
- If true then recursively search sub-directories for files to process.public void getNext(org.apache.uima.cas.CAS aCAS) throws IOException, org.apache.uima.collection.CollectionException
getNext
in interface org.apache.uima.collection.CollectionReader
getNext
in class BaseFileCollectionReader
aCAS
- CAS to be populated with the next document.Exception
- if retrieval of the next file failsIOException
- if there is an error reading the data.org.apache.uima.collection.CollectionException
- if retrieval of the next file failsCopyright © 2018 Department of Veterans Affairs. All Rights Reserved.