public abstract class AnnotationReader<T> extends Object implements Iterable<T>, IResetableIterator<T>
Modifier and Type | Field and Description |
---|---|
protected String |
corpusName |
protected int |
currentAnnotationId |
protected ResourceManager |
resourceManager |
Constructor and Description |
---|
AnnotationReader(ResourceManager rm)
ResourceManager must provide a value for
CorpusReaderConfigurator .CORPUS_NAME, plus
whatever is required by derived class for its initializeReader() and reset() methods. |
Modifier and Type | Method and Description |
---|---|
abstract String |
generateReport()
generate a human-readable report of annotations read from the source file (plus whatever
other relevant statistics the user should know about).
|
abstract boolean |
hasNext()
is there another annotation object to return?
|
protected abstract void |
initializeReader()
called by constructor to perform subclass-specific initialization.
|
Iterator<T> |
iterator() |
abstract T |
next()
return the next annotation object.
|
void |
remove() |
void |
reset()
override this to conform to whatever the derived class's state mechanism requires.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
forEachRemaining
protected final String corpusName
protected final ResourceManager resourceManager
protected int currentAnnotationId
public AnnotationReader(ResourceManager rm)
CorpusReaderConfigurator
.CORPUS_NAME, plus
whatever is required by derived class for its initializeReader() and reset() methods.rm
- ResourceManager with constructor arguments.protected abstract void initializeReader()
public void reset()
reset
in interface IResetableIterator<T>
public abstract boolean hasNext()
public abstract T next()
public void remove()
public abstract String generateReport()
Copyright © 2017. All rights reserved.