From d94230ef6e73d91f973fcf8462e90ca17c128b74 Mon Sep 17 00:00:00 2001 From: Marius Heine Date: Fri, 12 Jun 2026 11:44:01 +0200 Subject: [PATCH 1/4] ignore alleinstehende zusatzsignale in sskx table --- .../table/pt1/sskx/SskxTransformator.java | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/sskx/SskxTransformator.java b/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/sskx/SskxTransformator.java index faeb2e7365..9b2b55b72f 100644 --- a/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/sskx/SskxTransformator.java +++ b/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/sskx/SskxTransformator.java @@ -10,7 +10,19 @@ */ package org.eclipse.set.feature.table.pt1.sskx; -import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.*; +import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_ARBEITSBUEHNE; +import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_DACH_DECKE; +import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_OL_MAST; +import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_PFOSTEN_HOCH; +import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_PFOSTEN_NIEDRIG; +import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_MAST_HOCH; +import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_MAST_NIEDRIG; +import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_SONSTIGE_HOCH; +import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_SONSTIGE_NIEDRIG; +import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_SCHIENENFUSS; +import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_SONDERANORDNUNG_MAST_HOCH; +import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_SONDERANORDNUNG_MAST_NIEDRIG; +import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_WAND; import java.util.LinkedList; import java.util.List; @@ -40,6 +52,7 @@ import org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt; import org.eclipse.set.model.planpro.Signale.ENUMBeleuchtet; import org.eclipse.set.model.planpro.Signale.ENUMGeltungsbereich; +import org.eclipse.set.model.planpro.Signale.ENUMSignalFunktion; import org.eclipse.set.model.planpro.Signale.Signal; import org.eclipse.set.model.planpro.Signale.Signal_Rahmen; import org.eclipse.set.model.planpro.Signale.Signal_Signalbegriff; @@ -103,6 +116,13 @@ private static Predicate generalCondition() { return false; } + if (signal.getSignalReal().getSignalFunktion() != null && signal + .getSignalReal() + .getSignalFunktion() + .getWert() == ENUMSignalFunktion.ENUM_SIGNAL_FUNKTION_ALLEINSTEHENDES_ZUSATZSIGNAL) { + return false; + } + final Set signalbegriffe = SignalExtensions .getSignalbegriffe(signal); return signalbegriffe.stream() From 49322cbfa7cc5dbb643bdae1b0a37d1f89c8012f Mon Sep 17 00:00:00 2001 From: Marius Heine Date: Fri, 12 Jun 2026 12:17:53 +0200 Subject: [PATCH 2/4] improve naming of field as it was confusing --- .../set/feature/table/pt1/ssks/SsksTransformator.xtend | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssks/SsksTransformator.xtend b/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssks/SsksTransformator.xtend index 4c7abc45fa..69cd406dcb 100644 --- a/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssks/SsksTransformator.xtend +++ b/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssks/SsksTransformator.xtend @@ -134,7 +134,7 @@ class SsksTransformator extends AbstractSignalTableTransform { static val SIGNALBEGRIFF_COMPARATOR = new MixedStringComparator( "(?[A-Za-z]*)(?[0-9]*)(?[A-Za-z]*)") - static val inRelevantFiktivFunktion = #[ + static val irrelevantFiktivFunktion = #[ ENUM_FIKTIVES_SIGNAL_FUNKTION_ZUG_START_ZIEL_BK_MIT_ZS_1, ENUM_FIKTIVES_SIGNAL_FUNKTION_ZUG_START_ZIEL_BK_MIT_ZS_7, ENUM_FIKTIVES_SIGNAL_FUNKTION_ZUG_START_ZIEL_NE_14_MIT_ZS_1, @@ -643,7 +643,7 @@ class SsksTransformator extends AbstractSignalTableTransform { private static def boolean isSsksSignal(Signal signal) { if (signal?.signalFiktiv !== null && !signal?.signalFiktiv?.fiktivesSignalFunktion.exists [ - inRelevantFiktivFunktion.contains(it) + irrelevantFiktivFunktion.contains(it) ]) { return true } From 5d080e2ecdbfed06642f3c2bd70ad75ba1f69033 Mon Sep 17 00:00:00 2001 From: Marius Heine Date: Fri, 12 Jun 2026 14:15:21 +0200 Subject: [PATCH 3/4] fix sorting of ssks --- .../set/feature/table/pt1/ssks/SsksTransformationService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssks/SsksTransformationService.java b/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssks/SsksTransformationService.java index 8cd8b3faad..efa26201ea 100644 --- a/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssks/SsksTransformationService.java +++ b/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssks/SsksTransformationService.java @@ -9,6 +9,7 @@ package org.eclipse.set.feature.table.pt1.ssks; import static org.eclipse.nebula.widgets.nattable.sort.SortDirectionEnum.ASC; +import static org.eclipse.nebula.widgets.nattable.sort.SortDirectionEnum.DESC; import static org.eclipse.set.feature.table.pt1.ssks.SsksColumns.*; import static org.eclipse.set.utils.table.sorting.ComparatorBuilder.CellComparatorType.EMPTY_LAST; import static org.eclipse.set.utils.table.sorting.ComparatorBuilder.CellComparatorType.LEXICOGRAPHICAL; @@ -116,8 +117,7 @@ public void handleEvent(final Event event) { public Comparator getRowGroupComparator( final TableType tableType) { return TableRowGroupComparator.builder(tableType) - .sort(Reales_Signal, EMPTY_LAST, ASC) - .sort(Fiktives_Signal, EMPTY_LAST, ASC) + .sort(Fiktives_Signal, EMPTY_LAST, DESC) // It can be directly compare by Column E/F but for consistent // with another table the CompareRouteAndKm will be used. .sortByRouteAndKm(obj -> { From 9b43086458c1356e1b2081f51701aa7ce3b6287d Mon Sep 17 00:00:00 2001 From: Marius Heine Date: Fri, 12 Jun 2026 14:16:19 +0200 Subject: [PATCH 4/4] fix pdf export when there is an alleinstehende Tafel between real and fiktive signals --- .../pt1/ssks/SsksTablePdfExportBuilder.java | 43 ++++++++----------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssks/SsksTablePdfExportBuilder.java b/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssks/SsksTablePdfExportBuilder.java index 89a6031278..b86d8482e7 100644 --- a/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssks/SsksTablePdfExportBuilder.java +++ b/java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssks/SsksTablePdfExportBuilder.java @@ -70,36 +70,31 @@ public void setFopService(final FopService fopService) { @Override public List getPageBreakRowsIndex(final Table table) { final List result = new ArrayList<>(); - List.of(SsksColumns.Fiktives_Signal, SsksColumns.Reales_Signal) - .forEach(columnPosition -> { - final ColumnDescriptor col = TableExtensions - .getColumns(table) - .stream() - .filter(column -> column.getColumnPosition() - .equals(columnPosition)) - .findFirst() - .orElse(null); - final Optional lastRowIndex = getLastRowIndex( - table, col); - if (lastRowIndex.isPresent()) { - result.add(lastRowIndex.get().toString()); - } - }); + List.of(SsksColumns.Fiktives_Signal).forEach(columnPosition -> { + final ColumnDescriptor col = TableExtensions.getColumns(table) + .stream() + .filter(column -> column.getColumnPosition() + .equals(columnPosition)) + .findFirst() + .orElse(null); + final Optional firstRowIndex = getFirstRowIndex(table, + col); + if (firstRowIndex.isPresent()) { + result.add(firstRowIndex.get().toString()); + } + }); return result; } - private static Optional getLastRowIndex(final Table table, + private static Optional getFirstRowIndex(final Table table, final ColumnDescriptor column) { final List> signalEntries = getSignalEntries( table, column); - final Optional> collect = signalEntries - .stream() + final Optional collect = signalEntries.stream() + .map(Map.Entry::getKey) .collect(Collectors - .maxBy(Comparator.comparingInt(Map.Entry::getKey))); - if (collect.isPresent()) { - return Optional.of(collect.get().getKey()); - } - return Optional.empty(); + .minBy(Comparator.comparingInt((i) -> i.intValue()))); + return collect; } private static List> getSignalEntries( @@ -110,7 +105,7 @@ private static List> getSignalEntries( final List tableRows = TableExtensions.getTableRows(table); return tableRows.stream() .collect(Collectors.toMap( - e -> Integer.valueOf(tableRows.indexOf(e) + 1), + e -> Integer.valueOf(tableRows.indexOf(e)), Function.identity())) .entrySet() .parallelStream()