|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectanl.aida.reader.AbstractAIDAComponentReader
public abstract class AbstractAIDAComponentReader
Abstract implementation of AIDAComponentReader that processes a ReaderResult into a CAS by iterating over a "standard" index and retreiving the results. Subclasses are responsible for producing the ReaderResult.
Field Summary | |
---|---|
protected IndexIterator |
indexIter
|
protected java.lang.String[] |
lineItems
|
protected java.lang.String |
location
|
protected java.util.List<ReaderResultProcessor> |
processors
|
protected java.util.Date |
startDate
|
Fields inherited from interface anl.aida.reader.AIDAComponentReader |
---|
MESSAGE_DIGEST |
Constructor Summary | |
---|---|
AbstractAIDAComponentReader()
|
Method Summary | |
---|---|
protected void |
checkDate(java.util.Date date)
Checks if the date is before the cache start date and logs a warning. |
void |
close()
Closes this MIFSComponentReader and any resources it may have opened. |
protected java.lang.String |
getDocumentURL()
Gets the URL of the current document. |
protected abstract java.lang.String |
getIndexFileKey()
Gets the name of the parameter key for the index file. |
void |
getNext(org.apache.uima.cas.CAS cas)
Gets the next document etc. |
protected abstract ReaderResult |
getNextResult()
Gets the next ReaderResult. |
boolean |
hasNext()
Gets whether or not this MIFSComponentReader has more documents to process. |
void |
initialize(org.apache.uima.resource.ConfigurableResource resource,
java.util.Date cacheStartDate)
Initializes this MIFSComponentReader, optionally using the resource. |
protected void |
postNext()
Called at the completion of getNext(CAS) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IndexIterator indexIter
protected java.lang.String[] lineItems
protected java.lang.String location
protected java.util.List<ReaderResultProcessor> processors
protected java.util.Date startDate
Constructor Detail |
---|
public AbstractAIDAComponentReader()
Method Detail |
---|
public void getNext(org.apache.uima.cas.CAS cas) throws java.io.IOException, org.apache.uima.collection.CollectionException
AIDAComponentReader
getNext
in interface AIDAComponentReader
cas
- the CAS to put the document into
java.io.IOException
- if there is an error reading the document
org.apache.uima.collection.CollectionException
- if there is an error reading the documentprotected void checkDate(java.util.Date date)
date
- the date to checkprotected abstract ReaderResult getNextResult() throws java.io.IOException
java.io.IOException
- if there is an error getting the resultprotected java.lang.String getDocumentURL()
protected void postNext() throws java.io.IOException
getNext(CAS)
java.io.IOException
- if there is an error getting the resultpublic void close() throws java.io.IOException
AIDAComponentReader
close
in interface AIDAComponentReader
java.io.IOException
- if there is an error closing the reader.public boolean hasNext() throws java.io.IOException, org.apache.uima.collection.CollectionException
AIDAComponentReader
hasNext
in interface AIDAComponentReader
java.io.IOException
- if there is an error in determining if there are more docs to process.
org.apache.uima.collection.CollectionException
protected abstract java.lang.String getIndexFileKey()
public void initialize(org.apache.uima.resource.ConfigurableResource resource, java.util.Date cacheStartDate) throws org.apache.uima.resource.ResourceInitializationException
AIDAComponentReader
initialize
in interface AIDAComponentReader
resource
- the resource to use for configuration
org.apache.uima.resource.ResourceInitializationException
- if there is an error initializing
the reader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |