org.apache.uima.analysis_engine.impl
Class JCasIteratorWrapper

java.lang.Object
  extended by 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


Constructor Summary
JCasIteratorWrapper(CasIterator aCasIterator)
           
 
Method Summary
 boolean hasNext()
          Checks if there are more JCASes to be returned by the iterator.
 JCas next()
          Gets the next JCAS from the iterator.
 void release()
          Releases any CASes owned by this JCasIterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCasIteratorWrapper

public JCasIteratorWrapper(CasIterator aCasIterator)
Method Detail

hasNext

public boolean hasNext()
                throws AnalysisEngineProcessException
Description copied from interface: JCasIterator
Checks if there are more JCASes to be returned by the iterator.

Specified by:
hasNext in interface JCasIterator
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: JCasIterator
Gets the next JCAS from the iterator.

Specified by:
next in interface JCasIterator
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: JCasIterator
Releases 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:
release in interface JCasIterator


Copyright © 2011. All Rights Reserved.