@Override public void onRender(TypeAdapter aAdapter, VDocument aResponse, Map<AnnotationFS, VArc> aAnnoToArcIdx) { if (aAdapter.getLayer().isCrossSentence()) { return; } try { for (Entry<AnnotationFS, VArc> e : aAnnoToArcIdx.entrySet()) { JCas jcas = e.getKey().getCAS().getJCas(); if (!isBeginInSameSentence(jcas, selectByAddr(jcas, e.getValue().getSource().getId()).getBegin(), selectByAddr(jcas, e.getValue().getTarget().getId()).getBegin())) { aResponse.add(new VComment(new VID(e.getKey()), ERROR, "Crossing sentence bounardies is not permitted.")); } } } catch (CASException e) { throw new IllegalStateException("Unable to obtain JCas"); } }
@Override public void onRender(TypeAdapter aAdapter, VDocument aResponse, Map<AnnotationFS, VArc> aAnnoToArcIdx) { if (aAdapter.getLayer().isCrossSentence()) { return; } try { for (Entry<AnnotationFS, VArc> e : aAnnoToArcIdx.entrySet()) { JCas jcas = e.getKey().getCAS().getJCas(); if (!isBeginInSameSentence(jcas, selectByAddr(jcas, e.getValue().getSource().getId()).getBegin(), selectByAddr(jcas, e.getValue().getTarget().getId()).getBegin())) { aResponse.add(new VComment(new VID(e.getKey()), ERROR, "Crossing sentence bounardies is not permitted.")); } } } catch (CASException e) { throw new IllegalStateException("Unable to obtain JCas"); } }
new Relation(varc.getSource().toString(), varc.getTarget().toString(), color));
new Relation(varc.getSource().getId(), varc.getTarget().getId(), color));
getArgument(varc.getSource(), varc.getTarget()), bratLabelText, color));
getArgument(varc.getSource(), varc.getTarget()), bratLabelText, color));