/** * Create index entries for a single container. * @param container the container to index */ public void processContainer(final Container container) { // TODO: this should be refactored and delegate to container/slice if (!container.isEOF()) { for (final Slice s: container.slices) { if (s.sequenceId == Slice.MULTI_REFERENCE) { final Map<Integer, AlignmentSpan> spans = s.getMultiRefAlignmentSpans(container.header, ValidationStringency.DEFAULT_STRINGENCY); this.entries.addAll(spans.entrySet().stream() .map(e -> new CRAIEntry(e.getKey(), e.getValue().getStart(), e.getValue().getSpan(), container.offset, container.landmarks[s.index], s.size)) .collect(Collectors.toList())); } else { entries.add(s.getCRAIEntry(container.offset)); } } } }