Search in sources :

Example 1 with AfterDocumentResetEvent

use of de.tudarmstadt.ukp.clarin.webanno.api.event.AfterDocumentResetEvent in project webanno by webanno.

the class DocumentServiceImpl method resetAnnotationCas.

@Override
public void resetAnnotationCas(SourceDocument aDocument, User aUser) throws UIMAException, IOException {
    AnnotationDocument adoc = getAnnotationDocument(aDocument, aUser);
    JCas jcas = createOrReadInitialCas(aDocument);
    writeAnnotationCas(jcas, aDocument, aUser, false);
    applicationEventPublisher.publishEvent(new AfterDocumentResetEvent(this, adoc, jcas));
}
Also used : JCas(org.apache.uima.jcas.JCas) AnnotationDocument(de.tudarmstadt.ukp.clarin.webanno.model.AnnotationDocument) AfterDocumentResetEvent(de.tudarmstadt.ukp.clarin.webanno.api.event.AfterDocumentResetEvent)

Aggregations

AfterDocumentResetEvent (de.tudarmstadt.ukp.clarin.webanno.api.event.AfterDocumentResetEvent)1 AnnotationDocument (de.tudarmstadt.ukp.clarin.webanno.model.AnnotationDocument)1 JCas (org.apache.uima.jcas.JCas)1