anl.aida.reader
Class ContentComponentReader

java.lang.Object
  extended by anl.aida.reader.AbstractAIDAComponentReader
      extended by anl.aida.reader.ContentComponentReader
All Implemented Interfaces:
AIDAComponentReader
Direct Known Subclasses:
IndependentReader, NYTimesReader

public abstract class ContentComponentReader
extends AbstractAIDAComponentReader

Abstract class that will builds an AIDAComponentReader around a ContentReader implementation. Subclasses new only implement getContentSource and AbstractAIDAComponentReader.getIndexFileKey.


Field Summary
protected  ContentReader reader
           
 
Fields inherited from class anl.aida.reader.AbstractAIDAComponentReader
indexIter, lineItems, location, processors, startDate
 
Fields inherited from interface anl.aida.reader.AIDAComponentReader
MESSAGE_DIGEST
 
Constructor Summary
ContentComponentReader()
           
 
Method Summary
protected abstract  java.lang.String getCacheDirectoryKey()
          Gets the directory to cache the downloaded content in.
protected abstract  java.lang.String getCacheIndexKey()
          Gets the name of the index file to create when caching the content.
protected abstract  java.lang.String getContentSource()
          Gets the source of the content.
protected  ReaderResult getNextResult()
          Gets the next ReaderResult.
 void initialize(org.apache.uima.resource.ConfigurableResource resource, java.util.Date cacheStartDate)
          Initializes this MIFSComponentReader, optionally using the resource.
 
Methods inherited from class anl.aida.reader.AbstractAIDAComponentReader
checkDate, close, getDocumentURL, getIndexFileKey, getNext, hasNext, postNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reader

protected ContentReader reader
Constructor Detail

ContentComponentReader

public ContentComponentReader()
Method Detail

getNextResult

protected ReaderResult getNextResult()
                              throws java.io.IOException
Description copied from class: AbstractAIDAComponentReader
Gets the next ReaderResult.

Specified by:
getNextResult in class AbstractAIDAComponentReader
Returns:
the next ReaderResult.
Throws:
java.io.IOException - if there is an error getting the result

getContentSource

protected abstract java.lang.String getContentSource()
Gets the source of the content.

Returns:
the source of the content.

getCacheDirectoryKey

protected abstract java.lang.String getCacheDirectoryKey()
Gets the directory to cache the downloaded content in.

Returns:
the directory to cache the downloaded content in.

getCacheIndexKey

protected abstract java.lang.String getCacheIndexKey()
Gets the name of the index file to create when caching the content.

Returns:
the name of the index file to create when caching the content.

initialize

public void initialize(org.apache.uima.resource.ConfigurableResource resource,
                       java.util.Date cacheStartDate)
                throws org.apache.uima.resource.ResourceInitializationException
Description copied from interface: AIDAComponentReader
Initializes this MIFSComponentReader, optionally using the resource.

Specified by:
initialize in interface AIDAComponentReader
Overrides:
initialize in class AbstractAIDAComponentReader
Parameters:
resource - the resource to use for configuration
Throws:
org.apache.uima.resource.ResourceInitializationException - if there is an error initializing the reader