@Test public void test() throws Exception { URL resource = getClass().getResource("rlug.mbox"); String filePath = Paths.get(resource.toURI()).toString(); BaleenCollectionReader bcr = getCollectionReader(MboxReader.PARAM_MBOX, filePath); assertTrue(bcr.doHasNext()); bcr.getNext(jCas.getCas()); assertTrue(getSource(jCas).endsWith("#1")); assertNotNull(jCas.getDocumentText()); jCas.reset(); assertTrue(bcr.doHasNext()); bcr.getNext(jCas.getCas()); assertTrue(getSource(jCas).endsWith("#2")); assertNotNull(jCas.getDocumentText()); jCas.reset(); assertTrue(bcr.doHasNext()); bcr.getNext(jCas.getCas()); assertTrue(getSource(jCas).endsWith("#3")); assertNotNull(jCas.getDocumentText()); jCas.reset(); assertTrue(bcr.doHasNext()); bcr.getNext(jCas.getCas()); assertTrue(getSource(jCas).endsWith("#4")); assertNotNull(jCas.getDocumentText()); jCas.reset(); assertTrue(bcr.doHasNext()); bcr.getNext(jCas.getCas()); assertTrue(getSource(jCas).endsWith("#5")); assertNotNull(jCas.getDocumentText()); jCas.reset(); assertFalse(bcr.doHasNext()); bcr.close(); }
@Override public boolean doHasNext() throws IOException, CollectionException { return !attachments.isEmpty() || mboxIterator.hasNext(); }
MboxReader extends BaleenCollectionReader { @Override public boolean doHasNext() throws IOException, CollectionException { return !attachments.isEmpty() || mboxIterator.hasNext(); } }
MboxReader extends BaleenCollectionReader { @Override public boolean doHasNext() throws IOException, CollectionException { return !attachments.isEmpty() || mboxIterator.hasNext(); }  }
MboxReader extends BaleenCollectionReader { @Override public boolean doHasNext() throws IOException, CollectionException { return !attachments.isEmpty() || mboxIterator.hasNext(); }  @Override boolean doHasNext(); }
MboxReader extends BaleenCollectionReader { @Override public boolean doHasNext() throws IOException, CollectionException { return !attachments.isEmpty() || mboxIterator.hasNext(); }  @Override boolean doHasNext(); static final String PARAM_MBOX; static final String PARAM_CHARSET; static final String PARAM_MAX_SIZE; static final String PARAM_IGNORE; }