@Override public void upgradeCorrectionCas(CAS aCas, SourceDocument aDocument) throws UIMAException, IOException { annotationService.upgradeCas(aCas, aDocument, CORRECTION_USER); }
@Override public void upgradeCurationCas(CAS aCas, SourceDocument aDocument) throws UIMAException, IOException { annotationService.upgradeCas(aCas, aDocument, CURATION_USER); }
@Override public void upgradeCorrectionCas(CAS aCas, SourceDocument aDocument) throws UIMAException, IOException { annotationService.upgradeCas(aCas, aDocument, CORRECTION_USER); }
@Override public void repair(Project aProject, CAS aCas, List<LogMessage> aMessages) { try { annotationService.upgradeCas(aCas, aProject); aMessages.add(LogMessage.info(this, "CAS upgraded.")); } catch (UIMAException | IOException e) { log.error("Unabled to access JCas", e); aMessages.add(LogMessage.error(this, "Unabled to access JCas", e.getMessage())); } } }
public void upgradeCasAndSave(SourceDocument aDocument, String aUsername) throws IOException { User user = userRepository.get(aUsername); if (documentService.existsAnnotationDocument(aDocument, user)) { AnnotationDocument annotationDocument = documentService.getAnnotationDocument(aDocument, user); try { CAS cas = documentService.readAnnotationCas(annotationDocument).getCas(); annotationService.upgradeCas(cas, annotationDocument); documentService.writeAnnotationCas(cas.getJCas(), annotationDocument, false); } catch (Exception e) { // no need to catch, it is acceptable that no curation document // exists to be upgraded while there are annotation documents } } }
public void upgradeCasAndSave(SourceDocument aDocument, String aUsername) throws IOException { User user = userRepository.get(aUsername); if (documentService.existsAnnotationDocument(aDocument, user)) { AnnotationDocument annotationDocument = documentService.getAnnotationDocument(aDocument, user); try { CAS cas = documentService.readAnnotationCas(annotationDocument).getCas(); annotationService.upgradeCas(cas, annotationDocument); documentService.writeAnnotationCas(cas.getJCas(), annotationDocument, false); } catch (Exception e) { // no need to catch, it is acceptable that no curation document // exists to be upgraded while there are annotation documents } } }
.getAnnotationDocument(aDocument, logedInUser); jCas = aDocumentService.readAnnotationCas(logedInUserAnnotationDocument); annotationService.upgradeCas(jCas.getCas(), logedInUserAnnotationDocument); aCorrectionDocumentService.writeCorrectionCas(jCas, aDocument); aDocumentService.createOrGetAnnotationDocument(aDocument, logedInUser)); annotationService.upgradeCas(jCas.getCas(), aDocumentService.createOrGetAnnotationDocument(aDocument, logedInUser)); aCorrectionDocumentService.writeCorrectionCas(jCas, aDocument);
.getAnnotationDocument(aDocument, logedInUser); jCas = aDocumentService.readAnnotationCas(logedInUserAnnotationDocument); annotationService.upgradeCas(jCas.getCas(), logedInUserAnnotationDocument); aCorrectionDocumentService.writeCorrectionCas(jCas, aDocument); aDocumentService.createOrGetAnnotationDocument(aDocument, logedInUser)); annotationService.upgradeCas(jCas.getCas(), aDocumentService.createOrGetAnnotationDocument(aDocument, logedInUser)); aCorrectionDocumentService.writeCorrectionCas(jCas, aDocument);
try { JCas cas = casStorageService.readCas(doc, ann.getUser()); annotationService.upgradeCas(cas.getCas(), doc, ann.getUser()); casStorageService.writeCas(doc, cas, ann.getUser()); annotationService.upgradeCas(cas.getCas(), doc, CURATION_USER); casStorageService.writeCas(doc, cas, CURATION_USER);
try { JCas cas = casStorageService.readCas(doc, ann.getUser()); annotationService.upgradeCas(cas.getCas(), doc, ann.getUser()); casStorageService.writeCas(doc, cas, ann.getUser()); annotationService.upgradeCas(cas.getCas(), doc, CURATION_USER); casStorageService.writeCas(doc, cas, CURATION_USER);
annotationService.upgradeCas(editorCas.getCas(), annotationDocument); correctionDocumentService.upgradeCorrectionCas(correctionCas.getCas(), state.getDocument());
annotationService.upgradeCas(editorCas.getCas(), annotationDocument);
annotationService.upgradeCas(editorCas.getCas(), annotationDocument); correctionDocumentService.upgradeCorrectionCas(correctionCas.getCas(), state.getDocument());
annotationService.upgradeCas(editorCas.getCas(), annotationDocument); correctionDocumentService.upgradeCorrectionCas(correctionCas.getCas(), state.getDocument());