@Test public void webCAGeXMLReaderTest() throws Exception { WSDItem w; WSDResult r; final String webCAGeDirectory = "classpath:/webcage"; LexicalItemConstituent c; CollectionReader reader = createReader( WebCAGeXMLReader.class, WebCAGeXMLReader.PARAM_SOURCE_LOCATION, webCAGeDirectory, WebCAGeXMLReader.PARAM_PATTERNS, new String[] { ResourceCollectionReaderBase.INCLUDE_PREFIX + "*.xml" } ); JCasIterator i = new JCasIterator(reader); assertTrue(i.hasNext()); JCas j = i.next(); System.out.println(DocumentMetaData.get(j).getDocumentId()); System.out.println(j.getDocumentText()); assertTrue(i.hasNext()); j = i.next(); System.out.println(j.getDocumentText()); assertTrue(i.hasNext()); assertEquals(sentence2, j.getDocumentText()); assertEquals("de", j.getDocumentLanguage()); w = JCasUtil.selectByIndex(j, WSDItem.class, 0); assertEquals("Abbruch", w.getCoveredText()); assertEquals("11", w.getId()); assertEquals("Abbruch", w.getSubjectOfDisambiguation()); assertEquals(POS.NOUN.toString(), w.getPos()); j = i.next(); System.out.println(j.getDocumentText()); assertEquals(sentence3, j.getDocumentText()); assertEquals("de", j.getDocumentLanguage()); w = JCasUtil.selectByIndex(j, WSDItem.class, 0); assertEquals("Abbrechen", w.getCoveredText()); assertEquals("1", w.getId()); assertEquals("abbrechen", w.getSubjectOfDisambiguation()); assertEquals(POS.VERB.toString(), w.getPos()); assertEquals(1, w.getConstituents().size()); c = w.getConstituents(0); assertNotNull(c.getConstituentType()); assertEquals("Abbrechen", c.getCoveredText()); assertEquals("1", c.getId()); r = JCasUtil.selectByIndex(j, WSDResult.class, 0); assertEquals(1, r.getSenses().size()); assertEquals("83332", r.getSenses(0).getId()); w = JCasUtil.selectByIndex(j, WSDItem.class, -1); assertEquals("bricht", w.getCoveredText()); assertEquals("abbrechen", w.getSubjectOfDisambiguation()); assertEquals(POS.VERB.toString(), w.getPos()); assertTrue(i.hasNext()); j = i.next(); System.out.println(j.getDocumentText()); assertEquals(sentence4, j.getDocumentText()); r = JCasUtil.selectByIndex(j, WSDResult.class, 0); assertEquals(1, r.getSenses().size()); assertEquals("79948", r.getSenses(0).getId()); w = JCasUtil.selectByIndex(j, WSDItem.class, -1); assertEquals("zocken", w.getCoveredText()); assertEquals("zocken", w.getSubjectOfDisambiguation()); assertEquals(POS.VERB.toString(), w.getPos()); assertFalse(i.hasNext()); }
@Override public boolean hasNext() throws IOException, CollectionException { return textIterator != null && textIterator.hasNext() || super.hasNext(); }
WebCAGeXMLReader extends JCasResourceCollectionReader_ImplBase { @Override public boolean hasNext() throws IOException, CollectionException { return textIterator != null && textIterator.hasNext() || super.hasNext(); } }
WebCAGeXMLReader extends JCasResourceCollectionReader_ImplBase { @Override public boolean hasNext() throws IOException, CollectionException { return textIterator != null && textIterator.hasNext() || super.hasNext(); }  }
WebCAGeXMLReader extends JCasResourceCollectionReader_ImplBase { @Override public boolean hasNext() throws IOException, CollectionException { return textIterator != null && textIterator.hasNext() || super.hasNext(); }  @Override @SuppressWarnings("unchecked") void getNext(JCas jCas); @Override boolean hasNext(); }
WebCAGeXMLReader extends JCasResourceCollectionReader_ImplBase { @Override public boolean hasNext() throws IOException, CollectionException { return textIterator != null && textIterator.hasNext() || super.hasNext(); }  @Override @SuppressWarnings("unchecked") void getNext(JCas jCas); @Override boolean hasNext(); static final String DISAMBIGUATION_METHOD_NAME; static final String PARAM_SENSE_INVENTORY; }