use of de.tudarmstadt.ukp.clarin.webanno.api.annotation.rendering.event.RenderAnnotationsEvent in project webanno by webanno.
the class BratAnnotationEditor method render.
private void render(GetDocumentResponse response, JCas aJCas) {
VDocument vdoc = new VDocument();
preRenderer.render(vdoc, getModelObject(), aJCas, getLayersToRender());
// Fire render event into backend
extensionRegistry.fireRender(aJCas, getModelObject(), vdoc);
// Fire render event into UI
Page page = (Page) RequestCycle.get().find(IPageRequestHandler.class).getPage();
if (page == null) {
page = getPage();
}
send(page, Broadcast.BREADTH, new RenderAnnotationsEvent(RequestCycle.get().find(IPartialPageRequestHandler.class), aJCas, getModelObject(), vdoc));
if (isHighlightEnabled()) {
AnnotatorState state = getModelObject();
if (state.getSelection().getAnnotation().isSet()) {
vdoc.add(new VAnnotationMarker(VMarker.FOCUS, state.getSelection().getAnnotation()));
}
}
BratRenderer.render(response, getModelObject(), vdoc, aJCas, annotationService);
}
Aggregations