From c3724d4e95761d7744f8f10cedb2456f5f21f480 Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Sat, 22 Jun 2024 23:35:18 +0200 Subject: [PATCH] #4891 - Exception in sidebar curation mode when document-level annotations exist - Skip over non-text-level annotations while rendering --- .../ui/curation/sidebar/render/CurationSidebarRenderer.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inception/inception-ui-curation/src/main/java/de/tudarmstadt/ukp/inception/ui/curation/sidebar/render/CurationSidebarRenderer.java b/inception/inception-ui-curation/src/main/java/de/tudarmstadt/ukp/inception/ui/curation/sidebar/render/CurationSidebarRenderer.java index 31d59238fb7..cac69664228 100644 --- a/inception/inception-ui-curation/src/main/java/de/tudarmstadt/ukp/inception/ui/curation/sidebar/render/CurationSidebarRenderer.java +++ b/inception/inception-ui-curation/src/main/java/de/tudarmstadt/ukp/inception/ui/curation/sidebar/render/CurationSidebarRenderer.java @@ -33,6 +33,7 @@ import org.apache.uima.cas.CAS; import org.apache.uima.cas.text.AnnotationFS; +import org.apache.uima.jcas.tcas.Annotation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.annotation.Order; @@ -168,6 +169,10 @@ public void render(VDocument aVdoc, RenderRequest aRequest) for (var cfg : cfgSet.getConfigurations()) { var fs = cfg.getRepresentative(casDiff.getCasMap()); + if (!(fs instanceof Annotation)) { + continue; + } + var user = cfg.getRepresentativeCasGroupId(); // We need to pass in *all* the annotation features here because we also to that in