@Test public void test() throws Exception { // http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2586251/?tool=pubmed Article article = new PmcNxmlParser() .parse(ResourceHelper.getInputStream("src/test/resources/pmc/33147.xml")); // "src/test/resources/pmc/e-67-o1696.xml")); // "src/test/resources/99846.nxml")); String text = PmcNxmlHelper.extractText(article); LOG.debug(text.substring(0, 100)); }
@Test public void test() throws Exception { File zip = ResourceHelper.getFile("directoryIterator/zipFileIterator.zip"); ZipFileIterator iterator = new ZipFileIterator(zip); for (int i = 0; i < 3; i++) { assertTrue(iterator.hasNext()); File file = iterator.next(); assertEquals("test", asText(file).substring(0, 4)); } assertFalse(iterator.hasNext()); }