/** * @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public DocumentReference(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** * @generated * @param jcas JCas to which this Feature Structure belongs */ public DocumentReference(JCas jcas) { super(jcas); readObject(); }
return Optional.of(new Frequency(jCas)); case "DocumentReference": return Optional.of(new DocumentReference(jCas)); case "Location": return Optional.of(new Location(jCas));
@Test public void test() throws Exception { jCas.setDocumentText( "Document 123 was produced, and complemented letters 56, 59 and 57, 12 is not a resolution."); processJCas(); assertEquals(2, JCasUtil.select(jCas, DocumentReference.class).size()); DocumentReference dr1 = JCasUtil.selectByIndex(jCas, DocumentReference.class, 0); assertEquals("Document 123", dr1.getCoveredText()); DocumentReference dr2 = JCasUtil.selectByIndex(jCas, DocumentReference.class, 1); assertEquals("letters 56, 59 and 57", dr2.getCoveredText()); } }
/** * Internal - constructor used by generator * * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public DocumentReference(int addr, TOP_Type type) { super(addr, type); readObject(); }
return Optional.of(new Frequency(jCas)); case "DocumentReference": return Optional.of(new DocumentReference(jCas)); case "Location": return Optional.of(new Location(jCas));
/** * @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public DocumentReference(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** * Internal - constructor used by generator * * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public DocumentReference(int addr, TOP_Type type) { super(addr, type); readObject(); }
@Override public void map(JCas jCas, Element element, AnnotationCollector collector) { switch (element.tagName().toLowerCase()) { case "time": collector.add(new Temporal(jCas)); break; case "meter": collector.add(new Quantity(jCas)); break; case "dfn": collector.add(new Buzzword(jCas)); break; case "address": collector.add(new Location(jCas)); break; case "abbr": collector.add(new Buzzword(jCas)); break; case "cite": collector.add(new DocumentReference(jCas)); break; default: return; } } }
/** * @generated * @param jcas JCas to which this Feature Structure belongs */ public DocumentReference(JCas jcas) { super(jcas); readObject(); }
@Override public void map(JCas jCas, Element element, AnnotationCollector collector) { switch (element.tagName().toLowerCase()) { case "time": collector.add(new Temporal(jCas)); break; case "meter": collector.add(new Quantity(jCas)); break; case "dfn": collector.add(new Buzzword(jCas)); break; case "address": collector.add(new Location(jCas)); break; case "abbr": collector.add(new Buzzword(jCas)); break; case "cite": collector.add(new DocumentReference(jCas)); break; default: return; } } }