public void init(AjaxRequestTarget aTarget, CurationContainer aCC) throws UIMAException, ClassNotFoundException, IOException { commonUpdate(); suggestionViewPanel.init(aTarget, aCC, annotationSelectionByUsernameAndAddress, curationView); }
public void updatePanel(AjaxRequestTarget aTarget, CurationContainer aCC) throws UIMAException, ClassNotFoundException, IOException, AnnotationException { commonUpdate(); // Render the main annotation editor (upper part) annotationEditor.requestRender(aTarget); // Render the user annotation segments (lower part) suggestionViewPanel.updatePanel(aTarget, aCC, annotationSelectionByUsernameAndAddress, curationView); // Render the sentence list sidebar aTarget.add(sentencesListView); }
setOutputMarkupId(true); add(sentenceListView);
JCas annotatorCas = getAnnotatorCas(state, aAnnotationSelectionByUsernameAndAddress, sourceDocument, jCases); Map<String, Map<VID, AnnotationState>> annoStates = calcColors(state, aCurationSegment, annotatorCas, jCases); ColoringStrategy curationColoringStrategy = makeColoringStrategy( annoStates.get(seg.getUsername())); getCollectionInformation(annotationService, aCurationContainer)); seg.setDocumentResponse( render(jCas, state, curationColoringStrategy)); seg.setAnnotatorState(state); seg.setSelectionByUsernameAndAddress( error("Unable to render: " + e.getMessage()); LOG.error("Unable to render", e);
private void mergeSpan(IRequestParameters aRequest, UserAnnotationSegment aCurationUserSegment, JCas aJcas) throws AnnotationException, UIMAException, ClassNotFoundException, IOException { AnnotationDocument clickedAnnotationDocument; AnnotatorState state = aCurationUserSegment.getAnnotatorState(); if (state.getMode().equals(Mode.AUTOMATION) || state.getMode().equals(Mode.CORRECTION)) { // createSpan / getJCas do not require an annotation document in this mode clickedAnnotationDocument = null; } else { SourceDocument sourceDocument = aCurationUserSegment.getAnnotatorState().getDocument(); clickedAnnotationDocument = documentService.getAnnotationDocument(sourceDocument, aCurationUserSegment.getUsername()); } int address = aRequest.getParameterValue(PARAM_ID).toInt(); String spanType = removePrefix(aRequest.getParameterValue(PARAM_TYPE).toString()); createSpan(spanType, state, aJcas, clickedAnnotationDocument, address); }
suggestionViewPanel.setOutputMarkupPlaceholderTag(true); suggestionViewPanel.add(LambdaBehavior.visibleWhen(() -> state.getDocument() != null)); add(suggestionViewPanel);
suggestionView.setOutputMarkupId(true); add(suggestionView);
addSuggestionColor(state.getProject(), state.getMode(), jCases, annoStates, d, false, false); addSuggestionColor(state.getProject(), state.getMode(), jCases, annoStates, i, true, false); all.removeAll(i); addSuggestionColor(state.getProject(), state.getMode(), jCases, annoStates, all, false, true); return annoStates;
JCas annotatorCas = getAnnotatorCas(state, aAnnotationSelectionByUsernameAndAddress, sourceDocument, jCases); Map<String, Map<VID, AnnotationState>> annoStates = calcColors(state, aCurationSegment, annotatorCas, jCases); ColoringStrategy curationColoringStrategy = makeColoringStrategy( annoStates.get(seg.getUsername())); getCollectionInformation(annotationService, aCurationContainer)); seg.setDocumentResponse( render(jCas, state, curationColoringStrategy)); seg.setAnnotatorState(state); seg.setSelectionByUsernameAndAddress( error("Unable to render: " + e.getMessage()); LOG.error("Unable to render", e);
private void mergeSpan(IRequestParameters aRequest, UserAnnotationSegment aCurationUserSegment, JCas aJcas) throws AnnotationException, UIMAException, ClassNotFoundException, IOException { AnnotationDocument clickedAnnotationDocument; AnnotatorState state = aCurationUserSegment.getAnnotatorState(); if (state.getMode().equals(Mode.AUTOMATION) || state.getMode().equals(Mode.CORRECTION)) { // createSpan / getJCas do not require an annotation document in this mode clickedAnnotationDocument = null; } else { SourceDocument sourceDocument = aCurationUserSegment.getAnnotatorState().getDocument(); clickedAnnotationDocument = documentService.getAnnotationDocument(sourceDocument, aCurationUserSegment.getUsername()); } int address = aRequest.getParameterValue(PARAM_ID).toInt(); String spanType = removePrefix(aRequest.getParameterValue(PARAM_TYPE).toString()); createSpan(spanType, state, aJcas, clickedAnnotationDocument, address); }
suggestionViewPanel.setOutputMarkupPlaceholderTag(true); suggestionViewPanel.add(LambdaBehavior.visibleWhen(() -> state.getDocument() != null)); add(suggestionViewPanel);
addSuggestionColor(state.getProject(), state.getMode(), jCases, annoStates, d, false, false); addSuggestionColor(state.getProject(), state.getMode(), jCases, annoStates, i, true, false); all.removeAll(i); addSuggestionColor(state.getProject(), state.getMode(), jCases, annoStates, all, false, true); return annoStates;
JCas annotatorCas = getAnnotatorCas(state, aAnnotationSelectionByUsernameAndAddress, sourceDocument, jCases); Map<String, Map<VID, AnnotationState>> annoStates = calcColors(state, aCurationSegment, annotatorCas, jCases); ColoringStrategy curationColoringStrategy = makeColoringStrategy( annoStates.get(username)); seg.setAnnotatorState(state); seg.setCollectionData( getCollectionInformation(annotationService, aCurationContainer)); seg.setDocumentResponse( render(jCas, state, curationColoringStrategy)); seg.setSelectionByUsernameAndAddress(aAnnotationSelectionByUsernameAndAddress); segments.add(seg);
public void updatePanel(AjaxRequestTarget aTarget, CurationContainer aCC) throws UIMAException, ClassNotFoundException, IOException, AnnotationException { commonUpdate(); // Render the main annotation editor (upper part) annotationEditor.requestRender(aTarget); // Render the user annotation segments (lower part) suggestionViewPanel.updatePanel(aTarget, aCC, annotationSelectionByUsernameAndAddress, curationView); // Render the sentence list sidebar aTarget.add(sentencesListView); }
public void init(AjaxRequestTarget aTarget, CurationContainer aCC) throws UIMAException, ClassNotFoundException, IOException { commonUpdate(); suggestionViewPanel.init(aTarget, aCC, annotationSelectionByUsernameAndAddress, curationView); }
setOutputMarkupId(true); add(sentenceListView);
JCas annotatorCas = getAnnotatorCas(state, aAnnotationSelectionByUsernameAndAddress, sourceDocument, jCases); Map<String, Map<VID, AnnotationState>> annoStates = calcColors(state, aCurationSegment, annotatorCas, jCases); ColoringStrategy curationColoringStrategy = makeColoringStrategy( annoStates.get(username)); seg.setAnnotatorState(state); seg.setCollectionData( getCollectionInformation(annotationService, aCurationContainer)); seg.setDocumentResponse( render(jCas, state, curationColoringStrategy)); seg.setSelectionByUsernameAndAddress(aAnnotationSelectionByUsernameAndAddress); segments.add(seg);
private void actionToggleScriptDirection(AjaxRequestTarget aTarget) throws Exception { getModelObject().toggleScriptDirection(); annotationEditor.requestRender(aTarget); curationContainer.setBratAnnotatorModel(getModelObject()); suggestionView.updatePanel(aTarget, curationContainer, annotationSelectionByUsernameAndAddress, curationSegment); }
suggestionView.init(aTarget, curationContainer, annotationSelectionByUsernameAndAddress, curationSegment); update(aTarget);
private void actionToggleScriptDirection(AjaxRequestTarget aTarget) throws Exception { getModelObject().toggleScriptDirection(); annotationEditor.requestRender(aTarget); curationContainer.setBratAnnotatorModel(getModelObject()); suggestionView.updatePanel(aTarget, curationContainer, annotationSelectionByUsernameAndAddress, curationSegment); }