use of org.corpus_tools.salt.common.STimeline in project ANNIS by korpling.
the class TimelineReconstructor method addTimeline.
private void addTimeline() {
STimeline timeline = graph.createTimeline();
for (SToken virtualTok : graph.getSortedTokenByText()) {
timeline.increasePointOfTime();
// find all spans that are connected to this token and are part of an SOrderRelation
for (SRelation<?, ?> inRel : virtualTok.getInRelations()) {
if (inRel instanceof SSpanningRelation) {
SSpanningRelation spanRel = (SSpanningRelation) inRel;
SSpan overlappingSpan = spanRel.getSource();
if (overlappingSpan != null) {
spans2TimelinePos.put(overlappingSpan, timeline.getEnd());
}
}
}
nodesToDelete.add(virtualTok);
}
}
Aggregations