Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</div>
</div>
<div class="flex-grow-1 flex-v-container">
<ul wicket:id="layersContainer" class="scrolling flex-content list-group list-group-flush">
<ul wicket:id="layersContainer" class="scrolling preserve-scroll flex-content list-group list-group-flush">
<li wicket:id="layers" class="list-group-item py-0 px-0 border-0">
<div class="px-2 py-1 bg-light-subtle fw-bold sticky-top border-top border-bottom">
<wicket:container wicket:id="layerName"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
import java.util.List;
import java.util.Set;

import org.apache.uima.cas.text.AnnotationFS;
import org.apache.uima.cas.FeatureStructure;
import org.apache.uima.fit.util.FSUtil;
import org.apache.uima.jcas.cas.AnnotationBase;
import org.apache.uima.jcas.tcas.Annotation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -140,8 +141,10 @@ private void collectKeysForLayer(org.apache.uima.cas.CAS aCas, AnnotationLayer a
return;
}

for (var fs : aCas.<Annotation> select(type)) {
if (!overlapping(fs, aWindowBegin, aWindowEnd)) {
// Document-level layers are AnnotationBase subtypes without offsets - they are always
// in the window, so the overlap check applies only to proper Annotations.
for (var fs : aCas.<AnnotationBase> select(type)) {
if (fs instanceof Annotation ann && !overlapping(ann, aWindowBegin, aWindowEnd)) {
continue;
}
for (var info : featureInfos) {
Expand All @@ -163,7 +166,7 @@ private FeatureInfo toFeatureInfo(AnnotationFeature aFeature)
return null;
}

private void extractKeys(FeatureInfo aInfo, AnnotationFS aFs, Set<Key> aOut)
private void extractKeys(FeatureInfo aInfo, FeatureStructure aFs, Set<Key> aOut)
{
var feature = aInfo.feature();
if (!aInfo.isMulti()) {
Expand Down
Loading