private String getCollection() { if (getModelObject().getProject() != null) { return "#" + getModelObject().getProject().getName() + "/"; } else { return ""; } }
private String getCollection() { if (getModelObject().getProject() != null) { return "#" + getModelObject().getProject().getName() + "/"; } else { return ""; } }
@Override protected List<SourceDocument> getListOfDocs() { AnnotatorState state = getModelObject(); return new ArrayList<>(documentService .listAnnotatableDocuments(state.getProject(), state.getUser()).keySet()); }
@Override protected List<SourceDocument> getListOfDocs() { AnnotatorState state = getModelObject(); return new ArrayList<>(documentService .listAnnotatableDocuments(state.getProject(), state.getUser()).keySet()); }
@Override protected void onConfigure() { super.onConfigure(); AnnotatorState state = AutomationPage.this.getModelObject(); setVisible(state.getProject() != null && (projectService.isAdmin(state.getProject(), state.getUser()) || !state.getProject().isDisableExport())); } });
@Override protected List<SourceDocument> getListOfDocs() { return curationDocumentService.listCuratableSourceDocuments(getModelObject().getProject()); }
private List<AnnotationLayer> listLayersWithRecommenders() { return recommendationService .listLayersWithEnabledRecommenders(getModelObject().getProject()); }
@Override protected void onConfigure() { super.onConfigure(); AnnotatorState state = CorrectionPage.this.getModelObject(); setVisible(state.getProject() != null && (projectService.isAdmin(state.getProject(), state.getUser()) || !state.getProject().isDisableExport())); } });
@Override protected void onConfigure() { super.onConfigure(); AnnotatorState state = CurationPage.this.getModelObject(); setVisible(state.getProject() != null && (projectService.isAdmin(state.getProject(), state.getUser()) || !state.getProject().isDisableExport())); } });
@Override protected List<SourceDocument> getListOfDocs() { return curationDocumentService.listCuratableSourceDocuments(getModelObject().getProject()); }
public static void savePreference(UserPreferencesService aPrefService, AnnotatorState aState, String aUsername) throws IOException { aPrefService.savePreferences(aState.getProject(), aUsername, aState.getMode(), aState.getPreferences()); } }
@Override protected void onConfigure() { super.onConfigure(); setVisible(getModelObject() != null && getModelObject().getProject() != null); }
private void actionStopSession(AjaxRequestTarget target) { ActiveLearningUserState alState = alStateModel.getObject(); AnnotatorState state = getModelObject(); target.add(mainContainer); // Stop current session alState.setSessionActive(false); applicationEventPublisherHolder.get().publishEvent(new ActiveLearningSessionCompletedEvent( this, state.getProject(), state.getUser().getUsername())); }
private void actionStopSession(AjaxRequestTarget target) { ActiveLearningUserState alState = alStateModel.getObject(); AnnotatorState state = getModelObject(); target.add(mainContainer); // Stop current session alState.setSessionActive(false); applicationEventPublisherHolder.get().publishEvent(new ActiveLearningSessionCompletedEvent( this, state.getProject(), state.getUser().getUsername())); }
private GetCollectionInformationResponse actionGetCollectionInformation() { GetCollectionInformationResponse info = new GetCollectionInformationResponse(); if (getModelObject().getProject() != null) { info.setEntityTypes(BratRenderer .buildEntityTypes(getModelObject().getAnnotationLayers(), annotationService)); } return info; }
private void actionStartSession(AjaxRequestTarget target, Form<?> form) { ActiveLearningUserState alState = alStateModel.getObject(); AnnotatorState state = getModelObject(); // Start new session alState.setSessionActive(true); refreshSuggestions(); moveToNextRecommendation(target, false); applicationEventPublisherHolder.get().publishEvent(new ActiveLearningSessionStartedEvent( this, state.getProject(), state.getUser().getUsername())); }
private void actionStartSession(AjaxRequestTarget target, Form<?> form) { ActiveLearningUserState alState = alStateModel.getObject(); AnnotatorState state = getModelObject(); // Start new session alState.setSessionActive(true); refreshSuggestions(); moveToNextRecommendation(target, false); applicationEventPublisherHolder.get().publishEvent(new ActiveLearningSessionStartedEvent( this, state.getProject(), state.getUser().getUsername())); }
@Override protected void onConfigure() { super.onConfigure(); AnnotatorState state = CurationPage.this.getModelObject(); setEnabled(state.getProject() != null && state.getDocument() != null && !documentService .getSourceDocument(state.getDocument().getProject(), state.getDocument().getName()) .getState().equals(SourceDocumentState.CURATION_FINISHED)); } });
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); }
@Override protected void onConfigure() { super.onConfigure(); AnnotatorState state = CurationPage.this.getModelObject(); setEnabled(state.getProject() != null && state.getDocument() != null && !documentService .getSourceDocument(state.getDocument().getProject(), state.getDocument().getName()) .getState().equals(SourceDocumentState.CURATION_FINISHED)); } });