if (!aCorrectionDocumentService.existsCorrectionCas(aDocument)) { try { AnnotationDocument logedInUserAnnotationDocument = aDocumentService jCas = aDocumentService.readAnnotationCas(logedInUserAnnotationDocument); annotationService.upgradeCas(jCas.getCas(), logedInUserAnnotationDocument); aCorrectionDocumentService.writeCorrectionCas(jCas, aDocument); aCorrectionDocumentService.writeCorrectionCas(jCas, aDocument); jCas = aCorrectionDocumentService.readCorrectionCas(aDocument); aCorrectionDocumentService.upgradeCorrectionCas(jCas.getCas(), aDocument);
private JCas createCorrectionCas(JCas mergeJCas, AnnotatorState aState, AnnotationDocument aRandomAnnotationDocument) throws UIMAException, ClassNotFoundException, IOException { User user = userRepository.getCurrentUser(); mergeJCas = documentService.readAnnotationCas(aState.getDocument(), user); correctionDocumentService.writeCorrectionCas(mergeJCas, aRandomAnnotationDocument.getDocument()); updateDocumentTimestampAfterWrite(aState, correctionDocumentService .getCorrectionCasTimestamp(aState.getDocument())); return mergeJCas; } }
loadDocument(d, aAnnotationService, aDocumentService, aCorrectionDocumentService, aBModel.getUser()); JCas jCas = aCorrectionDocumentService.readCorrectionCas(d); aCorrectionDocumentService.writeCorrectionCas(jCas,d);
mergeJCas = correctionDocumentService.readCorrectionCas(aDocument); if (aUpgrade) { correctionDocumentService.upgradeCorrectionCas(mergeJCas.getCas(), aDocument); correctionDocumentService.writeCorrectionCas(mergeJCas, aDocument); updateDocumentTimestampAfterWrite(aState, correctionDocumentService .getCorrectionCasTimestamp(aState.getDocument())); randomAnnotationDocument); updateDocumentTimestampAfterWrite(aState, correctionDocumentService .getCorrectionCasTimestamp(aState.getDocument()));
JCas jCas; try { jCas = aCorrectionDocumentService.readCorrectionCas(document);
automate(jCas, layerFeature, annotations); LOG.info("Predictions found are written to the CAS"); aCorrectionDocumentService.writeCorrectionCas(jCas, document); status.setAnnoDocs(status.getAnnoDocs() - 1); aCorrectionDocumentService.writeCorrectionCas(jCas, document); status.setAnnoDocs(status.getAnnoDocs() - 1);
loadDocument(d, aAnnotationService, aDocumentService, aCorrectionDocumentService, aBModel.getUser()); JCas jCas = aCorrectionDocumentService.readCorrectionCas(d); aCorrectionDocumentService.writeCorrectionCas(jCas,d);
mergeJCas = correctionDocumentService.readCorrectionCas(aDocument); if (aUpgrade) { correctionDocumentService.upgradeCorrectionCas(mergeJCas.getCas(), aDocument); correctionDocumentService.writeCorrectionCas(mergeJCas, aDocument); updateDocumentTimestampAfterWrite(aState, correctionDocumentService .getCorrectionCasTimestamp(aState.getDocument())); randomAnnotationDocument); updateDocumentTimestampAfterWrite(aState, correctionDocumentService .getCorrectionCasTimestamp(aState.getDocument()));
JCas jCas; try { jCas = aCorrectionDocumentService.readCorrectionCas(document);
automate(jCas, layerFeature, annotations); LOG.info("Predictions found are written to the CAS"); aCorrectionDocumentService.writeCorrectionCas(jCas, document); status.setAnnoDocs(status.getAnnoDocs() - 1); aCorrectionDocumentService.writeCorrectionCas(jCas, document); status.setAnnoDocs(status.getAnnoDocs() - 1);
if (!aCorrectionDocumentService.existsCorrectionCas(aDocument)) { try { AnnotationDocument logedInUserAnnotationDocument = aDocumentService jCas = aDocumentService.readAnnotationCas(logedInUserAnnotationDocument); annotationService.upgradeCas(jCas.getCas(), logedInUserAnnotationDocument); aCorrectionDocumentService.writeCorrectionCas(jCas, aDocument); aCorrectionDocumentService.writeCorrectionCas(jCas, aDocument); jCas = aCorrectionDocumentService.readCorrectionCas(aDocument); aCorrectionDocumentService.upgradeCorrectionCas(jCas.getCas(), aDocument);
loadDocument(d, aAnnotationService, aDocumentService, aCorrectionDocumentService, aState.getUser()); JCas jCas = aCorrectionDocumentService.readCorrectionCas(d); aCorrectionDocumentService.writeCorrectionCas(jCas, d);
private JCas getJCas(AnnotatorState aState, AnnotationDocument aDocument) throws IOException { if (aState.getMode().equals(Mode.AUTOMATION) || aState.getMode().equals(Mode.CORRECTION)) { return correctionDocumentService.readCorrectionCas(aState.getDocument()); } else { return documentService.readAnnotationCas(aDocument); } }
private JCas createCorrectionCas(JCas mergeJCas, AnnotatorState aState, AnnotationDocument aRandomAnnotationDocument) throws UIMAException, ClassNotFoundException, IOException { User user = userRepository.getCurrentUser(); mergeJCas = documentService.readAnnotationCas(aState.getDocument(), user); correctionDocumentService.writeCorrectionCas(mergeJCas, aRandomAnnotationDocument.getDocument()); updateDocumentTimestampAfterWrite(aState, correctionDocumentService .getCorrectionCasTimestamp(aState.getDocument())); return mergeJCas; } }
if (correctionDocumentService.existsCorrectionCas(state.getDocument())) { correctionCas = correctionDocumentService.readCorrectionCas(state.getDocument()); correctionDocumentService.upgradeCorrectionCas(correctionCas.getCas(), state.getDocument()); correctionDocumentService.writeCorrectionCas(correctionCas, state.getDocument());
loadDocument(d, aAnnotationService, aDocumentService, aCorrectionDocumentService, aState.getUser()); JCas jCas = aCorrectionDocumentService.readCorrectionCas(d); aCorrectionDocumentService.writeCorrectionCas(jCas, d);
private JCas getJCas(AnnotatorState aState, AnnotationDocument aDocument) throws IOException { if (aState.getMode().equals(Mode.AUTOMATION) || aState.getMode().equals(Mode.CORRECTION)) { return correctionDocumentService.readCorrectionCas(aState.getDocument()); } else { return documentService.readAnnotationCas(aDocument); } }
if (correctionDocumentService.existsCorrectionCas(state.getDocument())) { correctionCas = correctionDocumentService.readCorrectionCas(state.getDocument()); correctionDocumentService.upgradeCorrectionCas(correctionCas.getCas(), state.getDocument()); correctionDocumentService.writeCorrectionCas(correctionCas, state.getDocument());
loadDocument(d, aAnnotationService, aDocumentService, aCorrectionDocumentService, aState.getUser()); JCas jCas = aCorrectionDocumentService.readCorrectionCas(d); aCorrectionDocumentService.writeCorrectionCas(jCas, d);
annotatorCas = correctionDocumentService.readCorrectionCas(sourceDocument);