public abstract class BaseLeoCollectionReader extends org.apache.uima.collection.CollectionReader_ImplBase implements LeoCollectionReaderInterface
| Modifier and Type | Field and Description |
|---|---|
protected List<TextFilter> |
filters
List of filters to be applied to the text before adding to the CAS as document text.
|
protected String[] |
textFilters |
| Constructor and Description |
|---|
BaseLeoCollectionReader() |
| Modifier and Type | Method and Description |
|---|---|
<T extends BaseLeoCollectionReader> |
addFilters(String... textFilters)
Add the list of textFilters classes from a String list.
|
<T extends BaseLeoCollectionReader> |
addFilters(TextFilter... textFilters)
Add one or more text filters to the list of filters to be applied to the
document text before adding to the CAS.
|
void |
close() |
org.apache.uima.collection.CollectionReaderDescription |
generateCollectionReaderDescription()
Generate a new CollectionReaderDescription from the CollectionReader parameters and values.
|
List<TextFilter> |
getFilters()
Return the list of filters for this reader.
|
abstract void |
getNext(org.apache.uima.cas.CAS aCAS) |
abstract boolean |
hasNext() |
void |
initialize()
This method is called during initialization, and does nothing by default.
|
org.apache.uima.collection.CollectionReader |
produceCollectionReader()
Generate a new CollectionReaderDescription from the current reader and reader parameters.
|
destroy, getCasInitializer, getProcessingResourceMetaData, initialize, isConsuming, reconfigure, setCasInitializer, typeSystemInitgetConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValuegetCasManager, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger, setMetaDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProgressprotected List<TextFilter> filters
@LeoConfigurationParameter(description="TextFilter classes that will be used to filter the text") protected String[] textFilters
public void initialize()
throws org.apache.uima.resource.ResourceInitializationException
initialize in class org.apache.uima.collection.CollectionReader_ImplBaseorg.apache.uima.resource.ResourceInitializationException - if a failure occurs during initialization.public abstract void getNext(org.apache.uima.cas.CAS aCAS)
throws org.apache.uima.collection.CollectionException,
IOException
getNext in interface org.apache.uima.collection.CollectionReaderaCAS - the CAS to populate with the next document;org.apache.uima.collection.CollectionException - if there is a problem getting the next and populating the CAS.IOExceptionpublic abstract boolean hasNext()
throws IOException,
org.apache.uima.collection.CollectionException
hasNext in interface org.apache.uima.collection.base_cpm.BaseCollectionReaderIOExceptionorg.apache.uima.collection.CollectionExceptionpublic <T extends BaseLeoCollectionReader> T addFilters(String... textFilters) throws ClassNotFoundException, IllegalAccessException, InstantiationException
textFilters - List of class names, each of which is a TextFilterClassNotFoundException - if one of the filter classes cannot be foundIllegalAccessException - if the filter class cannot be accessedInstantiationException - if the filter class cannot be instantiated.public <T extends BaseLeoCollectionReader> T addFilters(TextFilter... textFilters)
textFilters - One or more filters to be added to the listpublic List<TextFilter> getFilters()
public void close()
throws IOException
close in interface org.apache.uima.collection.base_cpm.BaseCollectionReaderIOException - if the underlying reader throws an IOException closing.BaseCollectionReader.close()public org.apache.uima.collection.CollectionReader produceCollectionReader()
throws org.apache.uima.resource.ResourceInitializationException
produceCollectionReader in interface LeoCollectionReaderInterfaceorg.apache.uima.resource.ResourceInitializationException - if there is an error creating the descriptorpublic org.apache.uima.collection.CollectionReaderDescription generateCollectionReaderDescription()
throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException - if there is an error creating the descriptorCopyright © 2018 Department of Veterans Affairs. All Rights Reserved.