|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.uima.resource.Resource_ImplBase org.apache.uima.resource.ConfigurableResource_ImplBase org.apache.uima.collection.CollectionReader_ImplBase org.apache.ctakes.padtermspotter.cr.RadiologyRecordsCollectionReader
public class RadiologyRecordsCollectionReader
The original code was copied from org.apache.uima.examples.cpe.FileSystemCollectionReader and modified for Mayo use. This collection reader facilitates reading "documents" from a single file. Each line in the document will be considered an entity to be analyzed by the CPE. That is each line will be treated as a "document" and will have its own CAS. Extremely large files will require large memory resources as each line is read into memory upon initialization. This was done to simplify implementation.
Field Summary | |
---|---|
(package private) java.lang.Integer |
filterColunmNumber
|
(package private) java.lang.String |
filterExamTypes
|
(package private) int |
iv_currentIndex
|
(package private) java.lang.String |
iv_delimeter
|
(package private) java.lang.String |
iv_language
|
(package private) java.util.List |
iv_linesFromFile
|
(package private) java.lang.Integer |
numberOfColumns
|
static java.lang.String |
PARAM_COMMENT_STRING
Optional parameter specifies a comment string. |
static java.lang.String |
PARAM_EXAM_COLUMN
The column number of the input file that contains the compare string to parse applicable exam types. |
static java.lang.String |
PARAM_FILTER_EXAMS
Specifies the file which contains the valid types of exams which will be processed by the pipeline. |
static java.lang.String |
PARAM_ID_DELIMETER
Name of optional configuration parameter that specifies a character (or string) that delimits the id of the document from the text of the document. |
static java.lang.String |
PARAM_IGNORE_BLANK_LINES
Optional parameter determines whether a blank line will be processed as a document or will be ignored. |
static java.lang.String |
PARAM_INPUT_FILE_NAME
This parameter will be used the descriptor file to specify the location of the file that will be run through this collection reader. |
static java.lang.String |
PARAM_LANGUAGE
Name of optional configuration parameter that contains the language of the documents in the input directory. |
static java.lang.String |
PARAM_TOTAL_COLUMNS
Number of columns contained in the radiology record. |
Fields inherited from interface org.apache.uima.resource.Resource |
---|
PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_MANAGER, PARAM_CONFIG_PARAM_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT |
Constructor Summary | |
---|---|
RadiologyRecordsCollectionReader()
|
Method Summary | |
---|---|
void |
close()
|
void |
getNext(org.apache.uima.cas.CAS cas)
|
int |
getNumberOfDocuments()
Gets the total number of documents that will be returned by this collection reader. |
org.apache.uima.util.Progress[] |
getProgress()
|
boolean |
hasNext()
|
void |
initialize()
|
Methods inherited from class org.apache.uima.collection.CollectionReader_ImplBase |
---|
destroy, getCasInitializer, getProcessingResourceMetaData, initialize, isConsuming, reconfigure, setCasInitializer, typeSystemInit |
Methods inherited from class org.apache.uima.resource.ConfigurableResource_ImplBase |
---|
getConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValue |
Methods inherited from class org.apache.uima.resource.Resource_ImplBase |
---|
getCasManager, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger, setMetaData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.uima.resource.ConfigurableResource |
---|
getConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValue |
Methods inherited from interface org.apache.uima.resource.Resource |
---|
getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger |
Field Detail |
---|
public static final java.lang.String PARAM_INPUT_FILE_NAME
public static final java.lang.String PARAM_COMMENT_STRING
public static final java.lang.String PARAM_IGNORE_BLANK_LINES
public static final java.lang.String PARAM_LANGUAGE
public static final java.lang.String PARAM_ID_DELIMETER
1234|this is some text
would have an id of 1234 and text this is some text
.
If this parameter is not set, then
the id of a document will be its line number in the file.
public static final java.lang.String PARAM_TOTAL_COLUMNS
public static final java.lang.String PARAM_FILTER_EXAMS
public static final java.lang.String PARAM_EXAM_COLUMN
java.util.List iv_linesFromFile
int iv_currentIndex
java.lang.String iv_language
java.lang.String iv_delimeter
java.lang.Integer numberOfColumns
java.lang.String filterExamTypes
java.lang.Integer filterColunmNumber
Constructor Detail |
---|
public RadiologyRecordsCollectionReader()
Method Detail |
---|
public void initialize() throws org.apache.uima.resource.ResourceInitializationException
initialize
in class org.apache.uima.collection.CollectionReader_ImplBase
org.apache.uima.resource.ResourceInitializationException
public void getNext(org.apache.uima.cas.CAS cas) throws java.io.IOException, org.apache.uima.collection.CollectionException
java.io.IOException
org.apache.uima.collection.CollectionException
public boolean hasNext() throws java.io.IOException, org.apache.uima.collection.CollectionException
java.io.IOException
org.apache.uima.collection.CollectionException
public org.apache.uima.util.Progress[] getProgress()
public int getNumberOfDocuments()
public void close() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |