public class XmiFileCollectionReader extends BaseFileCollectionReader
CollectionReader reader = CollectionReaderFactory
.generateXmiFileSubReader(new File("my-input-directory/xmi/"), true);
XMI Sub readerModifier and Type | Field and Description |
---|---|
static String |
fileExtenstionString
The default file name extension to filter on.
|
filenameFilter, fileNameFilterJSON, fileNameFilterName, inputDirectoryPath, mEncoding, mFileCollection, mFileIndex, mInDir, mRecurse
filters, textFilters
Constructor and Description |
---|
XmiFileCollectionReader()
Default constructor used during UIMA initialization.
|
XmiFileCollectionReader(File inputDirectory,
boolean recurse)
Constructor that sets the inputDirectory and recurse flag.
|
Modifier and Type | Method and Description |
---|---|
void |
getNext(org.apache.uima.cas.CAS aCAS)
De-serialize the next XMI file in the collection.
|
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 fileExtenstionString
public XmiFileCollectionReader()
public XmiFileCollectionReader(File inputDirectory, boolean recurse)
inputDirectory
- Path to the directory that will be searched for files to processrecurse
- If true then recurse into subdirectories.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
- the CAS to populate with the next element of the collection.IOException
- if there is an error reading from the files.org.apache.uima.collection.CollectionException
- if there is an error deserializing the XMI.BaseFileCollectionReader.getNext(org.apache.uima.cas.CAS)
Copyright © 2018 Department of Veterans Affairs. All Rights Reserved.