private void updateCurationView(final CurationContainer curationContainer, final SourceListView curationViewItem, AjaxRequestTarget aTarget, JCas jCas) { Sentence currentSent = WebAnnoCasUtil.getCurrentSentence(jCas, curationViewItem.getBegin(), curationViewItem.getEnd()); state.setFirstVisibleUnit(WebAnnoCasUtil.findWindowStartCenteringOnSelection(jCas, currentSent, curationViewItem.getBegin(), state.getProject(), state.getDocument(), state.getPreferences().getWindowSize())); curationContainer.setBratAnnotatorModel(state); onChange(aTarget); }
public SentenceLink(String aId, IModel<SourceListView> aModel) { super(aId, aModel); setBody(Model.of(aModel.getObject().getSentenceNumber().toString())); }
jCases, begin, end); SourceListView curationSegment = new SourceListView(); curationSegment.setBegin(begin); curationSegment.setEnd(end); curationSegment.setSentenceNumber(segmentNumber.get(begin)); if (diff.hasDifferences() || !diff.getIncompleteConfigurationSets().isEmpty()) { curationSegment.setSentenceState(SentenceState.DISAGREE); curationSegment.setSentenceState(SentenceState.DISAGREE); curationSegment.setSentenceState(SentenceState.AGREE); curationSegment.setSentenceState(SentenceState.AGREE); curationSegment.getSentenceAddress().put(username, segmentAdress.get(username).get(begin));
diff = CasDiff2.doDiffSingle(annotationService, state.getProject(), entryTypes, LinkCompareBehavior.LINK_ROLE_AS_LABEL, jCases, aCurationSegment.getCurationBegin(), aCurationSegment.getCurationEnd()); LinkCompareBehavior.LINK_ROLE_AS_LABEL, jCases, aCurationSegment.getBegin(), aCurationSegment.getEnd());
if (curationViewItem.getSentenceNumber() == state.getFocusUnitIndex()) { aTag.append("class", "current", " "); String cC = curationViewItem.getSentenceState().getValue(); if (cC != null) { aTag.append("class", "disagree", " "); if (curationViewItem.getSentenceNumber() >= fSn && curationViewItem.getSentenceNumber() <= lSn) { aTag.append("class", "in-range", " ");
add(sidebarCell); curationView = new SourceListView();
jCases, begin, end); SourceListView curationSegment = new SourceListView(); curationSegment.setBegin(begin); curationSegment.setEnd(end); curationSegment.setSentenceNumber(segmentNumber.get(begin)); if (diff.hasDifferences() || !diff.getIncompleteConfigurationSets().isEmpty()) { curationSegment.setSentenceState(SentenceState.DISAGREE); curationSegment.setSentenceState(SentenceState.DISAGREE); curationSegment.setSentenceState(SentenceState.AGREE); curationSegment.setSentenceState(SentenceState.AGREE); curationSegment.getSentenceAddress().put(username, segmentAdress.get(username).get(begin));
diff = CasDiff2.doDiffSingle(annotationService, state.getProject(), entryTypes, LinkCompareBehavior.LINK_ROLE_AS_LABEL, jCases, aCurationSegment.getCurationBegin(), aCurationSegment.getCurationEnd()); LinkCompareBehavior.LINK_ROLE_AS_LABEL, jCases, aCurationSegment.getBegin(), aCurationSegment.getEnd());
if (curationViewItem.getSentenceNumber() == state.getFocusUnitIndex()) { aTag.append("class", "current", " "); String cC = curationViewItem.getSentenceState().getValue(); if (cC != null) { aTag.append("class", "disagree", " "); if (curationViewItem.getSentenceNumber() >= fSn && curationViewItem.getSentenceNumber() <= lSn) { aTag.append("class", "in-range", " ");
add(sidebarCell); curationView = new SourceListView();
private void updateCurationView(final CurationContainer curationContainer, final SourceListView curationViewItem, AjaxRequestTarget aTarget, JCas jCas) { Sentence currentSent = WebAnnoCasUtil.getCurrentSentence(jCas, curationViewItem.getBegin(), curationViewItem.getEnd()); state.setFirstVisibleUnit(WebAnnoCasUtil.findWindowStartCenteringOnSelection(jCas, currentSent, curationViewItem.getBegin(), state.getProject(), state.getDocument(), state.getPreferences().getWindowSize())); curationContainer.setBratAnnotatorModel(state); onChange(aTarget); }
public SentenceLink(String aId, IModel<SourceListView> aModel) { super(aId, aModel); setBody(Model.of(aModel.getObject().getSentenceNumber().toString())); }
@Override public void onClick(AjaxRequestTarget aTarget) { final SourceListView curationViewItem = getModelObject(); curationView = curationViewItem; fSn = 0; try { JCas jCas = curationDocumentService.readCurationCas(state.getDocument()); updateCurationView(CurationPanel.this.getModelObject(), curationViewItem, aTarget, jCas); updatePanel(aTarget, CurationPanel.this.getModelObject()); state.setFocusUnitIndex(curationViewItem.getSentenceNumber()); } catch (UIMAException e) { error("Error: " + ExceptionUtils.getRootCauseMessage(e)); } catch (ClassNotFoundException | AnnotationException | IOException e) { error("Error: " + e.getMessage()); } } }
@Override public void onClick(AjaxRequestTarget aTarget) { final SourceListView curationViewItem = getModelObject(); curationView = curationViewItem; fSn = 0; try { JCas jCas = curationDocumentService.readCurationCas(state.getDocument()); updateCurationView(CurationPanel.this.getModelObject(), curationViewItem, aTarget, jCas); updatePanel(aTarget, CurationPanel.this.getModelObject()); state.setFocusUnitIndex(curationViewItem.getSentenceNumber()); } catch (UIMAException e) { error("Error: " + ExceptionUtils.getRootCauseMessage(e)); } catch (ClassNotFoundException | AnnotationException | IOException e) { error("Error: " + e.getMessage()); } } }