textractor.mg4j.document
Class TextractorQueueDocumentIterator
java.lang.Object
textractor.mg4j.document.AbstractTextractorDocumentIterator
textractor.mg4j.document.TextractorQueueDocumentIterator
- All Implemented Interfaces:
- DocumentIterator, Closeable
public final class TextractorQueueDocumentIterator
- extends AbstractTextractorDocumentIterator
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextractorQueueDocumentIterator
public TextractorQueueDocumentIterator(DocumentFactory factory,
SentenceFilter sentenceFilter,
BlockingQueue<Sentence> queue,
Semaphore semaphore,
int loaderThreadCount)
nextDocument
public Document nextDocument()
throws IOException
- Returns the next document.
- Returns:
- the next document, or
null if there are no other
documents.
- Throws:
IOException
nextSentence
public Sentence nextSentence()
- Returns the next textractor document.
- Returns:
- the next document, or
null if there are no other
documents.
close
public void close()
- Closes this document iterator, releasing all resources.
You should always call this method after having finished with this iterator.
Implementations are invited to call this method in a finaliser as a safety net, but since there
is no guarantee as to when finalisers are invoked, you should not depend on this behaviour.
Copyright © 2003-2008 Institute for Computational Biomedicine, All Rights Reserved.