public class JCasIterator extends Object implements Iterator<JCas>
| Constructor and Description |
|---|
JCasIterator(CollectionReader aReader,
AnalysisEngine... aEngines)
Iterate over the documents loaded by the CollectionReader, running the AnalysisEngine on each
one before yielding them.
|
JCasIterator(CollectionReader aReader,
TypeSystemDescription aTypeSystemDescription)
Iterate over the documents loaded by the CollectionReader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
collectionProcessComplete() |
void |
destroy() |
boolean |
hasNext() |
boolean |
isSelfComplete() |
boolean |
isSelfDestroy() |
JCas |
next() |
void |
remove() |
void |
setSelfComplete(boolean aSelfComplete)
Send a collectionProcessComplete call to analysis engines when the reader has no further CASes
to produce.
|
void |
setSelfDestroy(boolean aSelfDestroy)
Send a destroy call to analysis engines when the reader has no further CASes to produce or if
an error occurs.
|
public JCasIterator(CollectionReader aReader, AnalysisEngine... aEngines) throws CASException, ResourceInitializationException
aReader - The CollectionReader for loading documents.aEngines - The AnalysisEngines for processing documents.CASExceptionResourceInitializationExceptionpublic JCasIterator(CollectionReader aReader, TypeSystemDescription aTypeSystemDescription) throws CASException, ResourceInitializationException
aReader - The CollectionReader for loading documents.aTypeSystemDescription - a type system descriptionCASExceptionResourceInitializationExceptionpublic void collectionProcessComplete()
throws AnalysisEngineProcessException
AnalysisEngineProcessExceptionpublic void destroy()
public boolean isSelfComplete()
public void setSelfComplete(boolean aSelfComplete)
public boolean isSelfDestroy()
public void setSelfDestroy(boolean aSelfDestroy)
Copyright © 2012–2013 The Apache Software Foundation. All rights reserved.