Class JCasIteratorWrapper
- java.lang.Object
-
- org.apache.uima.analysis_engine.impl.JCasIteratorWrapper
-
- All Implemented Interfaces:
JCasIterator
public class JCasIteratorWrapper extends java.lang.Object implements JCasIterator
Wraps a CasIterator as a JCasIterator
-
-
Field Summary
Fields Modifier and Type Field Description (package private) CasIteratormCasIterator
-
Constructor Summary
Constructors Constructor Description JCasIteratorWrapper(CasIterator aCasIterator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Checks if there are more JCASes to be returned by the iterator.JCasnext()Gets the next JCAS from the iterator.voidrelease()Releases any CASes owned by this JCasIterator.
-
-
-
Field Detail
-
mCasIterator
CasIterator mCasIterator
-
-
Constructor Detail
-
JCasIteratorWrapper
public JCasIteratorWrapper(CasIterator aCasIterator)
-
-
Method Detail
-
hasNext
public boolean hasNext() throws AnalysisEngineProcessExceptionDescription copied from interface:JCasIteratorChecks if there are more JCASes to be returned by the iterator.- Specified by:
hasNextin interfaceJCasIterator- Returns:
- true if there are more JCASes to be returned, false if not
- Throws:
AnalysisEngineProcessException- if a failure has occurred during processing. If an exception is thrown, this indicates that processing has aborted, so no further calls to the JCasIterator should be made.
-
next
public JCas next() throws AnalysisEngineProcessException
Description copied from interface:JCasIteratorGets the next JCAS from the iterator.- Specified by:
nextin interfaceJCasIterator- Returns:
- the next JCAS.
- Throws:
AnalysisEngineProcessException- if a failure has occurred during processing. If an exception is thrown, this indicates that processing has aborted, so no further calls to the JCasIterator should be made.
-
release
public void release()
Description copied from interface:JCasIteratorReleases any CASes owned by this JCasIterator. You only need to Call this method if you stop using a CasIterator before you have iterated all the way through.- Specified by:
releasein interfaceJCasIterator
-
-