@PipeBitInfo(name="Files in Dir Cycle Reader", description="Reads document texts from text files in a directory, repeating for a number of iterations.", role=READER, products=DOCUMENT_ID) public class FilesInDirectoryCollectionCyclicalReads extends FilesInDirectoryCollectionReader
Modifier and Type | Field and Description |
---|---|
static String |
PARAM_ENCODING
Name of configuration parameter that contains the character encoding used
by the input files.
|
static String |
PARAM_EXTENSIONS
Name of optional configuration parameter that specifies the extensions
of the files that the collection reader will read.
|
static String |
PARAM_INPUTDIR
Name of configuration parameter that must be set to the path of
a directory containing input files.
|
static String |
PARAM_LANGUAGE
Name of optional configuration parameter that contains the language of
the documents in the input directory.
|
static String |
PARAM_NUMREADS
Arguement to equate to # of times it should read the files.
|
static String |
PARAM_RECURSE |
iv_currentIndex, iv_files
Constructor and Description |
---|
FilesInDirectoryCollectionCyclicalReads() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
getNext(org.apache.uima.cas.CAS aCAS) |
int |
getNumberOfDocuments()
Gets the total number of documents that will be returned by this
collection reader.
|
org.apache.uima.util.Progress[] |
getProgress() |
boolean |
hasNext()
Similar to 'org.apache.uima.collection.CollectionReader' method hasNext() except
interations represents the actual number of documents to be processed, so if the
total number of documents in a queue is more than the 'Iterations' value then only
the iteration amount will be processed.
|
void |
initialize() |
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 PARAM_INPUTDIR
public static final String PARAM_ENCODING
public static final String PARAM_LANGUAGE
public static final String PARAM_EXTENSIONS
'.'
.public static final String PARAM_NUMREADS
public static final String PARAM_RECURSE
public FilesInDirectoryCollectionCyclicalReads()
public void initialize() throws org.apache.uima.resource.ResourceInitializationException
initialize
in class FilesInDirectoryCollectionReader
org.apache.uima.resource.ResourceInitializationException
CollectionReader_ImplBase.initialize()
public boolean hasNext()
hasNext
in interface org.apache.uima.collection.base_cpm.BaseCollectionReader
hasNext
in class FilesInDirectoryCollectionReader
BaseCollectionReader.hasNext()
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 FilesInDirectoryCollectionReader
IOException
org.apache.uima.collection.CollectionException
CollectionReader.getNext(org.apache.uima.cas.CAS)
public void close() throws IOException
close
in interface org.apache.uima.collection.base_cpm.BaseCollectionReader
close
in class FilesInDirectoryCollectionReader
IOException
BaseCollectionReader.close()
public org.apache.uima.util.Progress[] getProgress()
getProgress
in interface org.apache.uima.collection.base_cpm.BaseCollectionReader
getProgress
in class FilesInDirectoryCollectionReader
BaseCollectionReader.getProgress()
public int getNumberOfDocuments()
getNumberOfDocuments
in class FilesInDirectoryCollectionReader
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.