Skip to content

Commit 0c150d9

Browse files
AddTopological cell in tables (#1923)
* Add Topological cell * update * Ssks: update Topological Column
1 parent 7d1717c commit 0c150d9

File tree

13 files changed

+75
-20
lines changed

13 files changed

+75
-20
lines changed

java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/sskp/SskpTransformator.xtend

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ class SskpTransformator extends AbstractPlanPro2TableModelTransformator {
180180
if (dwegV === 0) {
181181
return ""
182182
}
183-
183+
184+
if (dwegV > 40 || (dwegV <= 40 && inclination <= 0)) {
185+
addTopologicalCell(instance, cols.getColumn(PZB_Schutzstrecke_Soll))
186+
}
187+
184188
if (dwegV > 60) {
185189
return '''«AgateRounding.roundUp(ADDITION_SCHUTZSTRECKE_SOLL_60 - inclination * multipleValue * 200)»'''
186190
} else if (dwegV <= 60 && dwegV > 40) {

java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssks/SsksTransformationService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
package org.eclipse.set.feature.table.pt1.ssks;
1010

1111
import static org.eclipse.nebula.widgets.nattable.sort.SortDirectionEnum.ASC;
12+
import static org.eclipse.set.feature.table.pt1.ssks.SsksColumns.Lichtraumprofil;
1213
import static org.eclipse.set.feature.table.pt1.ssks.SsksColumns.Schaltkasten_Entfernung;
14+
import static org.eclipse.set.feature.table.pt1.ssks.SsksColumns.Ueberhoehung;
1315
import static org.eclipse.set.utils.table.sorting.ComparatorBuilder.CellComparatorType.EMPTY_LAST;
1416
import static org.eclipse.set.utils.table.sorting.ComparatorBuilder.CellComparatorType.LEXICOGRAPHICAL;
1517

@@ -119,6 +121,6 @@ protected String getShortcut() {
119121

120122
@Override
121123
protected List<String> getTopologicalColumnPosition() {
122-
return List.of(Schaltkasten_Entfernung);
124+
return List.of(Schaltkasten_Entfernung, Lichtraumprofil, Ueberhoehung);
123125
}
124126
}

java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssks/SsksTransformator.xtend

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -502,14 +502,20 @@ class SsksTransformator extends AbstractPlanPro2TableModelTransformator {
502502
cols.getColumn(Fundament_Art_Regelzeichnung),
503503
signalRahmen,
504504
[
505-
val regelzeichnung = map[fundament].filterNull.
506-
flatMap[IDRegelzeichnung].map [
507-
value?.fillRegelzeichnung
508-
].filterNull
509505
val fundament = map[
510506
fundament?.signalBefestigungAllg?.
511507
fundamentArt
512508
].filterNull.map[translate].filterNull
509+
if (!fundament.nullOrEmpty) {
510+
return fundament.toSet
511+
}
512+
513+
row.addTopologicalCell(cols.getColumn(Fundament_Art_Regelzeichnung))
514+
val regelzeichnung = map[getFundament].filterNull.
515+
flatMap[IDRegelzeichnung].map [
516+
value?.fillRegelzeichnung
517+
].filterNull
518+
513519
return (regelzeichnung + fundament).toSet
514520
],
515521
null,

java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/sskw/SskwTransformationService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
package org.eclipse.set.feature.table.pt1.sskw;
1010

1111
import static org.eclipse.nebula.widgets.nattable.sort.SortDirectionEnum.ASC;
12+
import static org.eclipse.set.feature.table.pt1.sskw.SskwColumns.Freimeldung_Fma;
13+
import static org.eclipse.set.feature.table.pt1.sskw.SskwColumns.Weiche_Antriebe;
1214
import static org.eclipse.set.utils.table.sorting.ComparatorBuilder.CellComparatorType.MIXED_STRING;
1315

14-
import java.util.Collections;
1516
import java.util.Comparator;
1617
import java.util.List;
1718

@@ -85,7 +86,7 @@ protected String getShortcut() {
8586

8687
@Override
8788
protected List<String> getTopologicalColumnPosition() {
88-
return Collections.emptyList();
89+
return List.of(Freimeldung_Fma, Weiche_Antriebe);
8990
}
9091

9192
}

java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/sskw/SskwTransformator.xtend

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ class SskwTransformator extends AbstractPlanPro2TableModelTransformator {
360360
[
361361
val isPMaxL = element.
362362
isGeschwindigkeitPMax(element.topKanteL)
363+
if (isPMaxL) {
364+
instance.addTopologicalCell(
365+
cols.getColumn(Weiche_v_zul_W_Links))
366+
}
363367
wKrGspKomponenten.map[zungenpaar].
364368
printGeschwindingkeitL(isPMaxL)
365369
]
@@ -369,6 +373,10 @@ class SskwTransformator extends AbstractPlanPro2TableModelTransformator {
369373
[
370374
val isPMaxL = element.
371375
isGeschwindigkeitPMax(element.topKanteL)
376+
if (isPMaxL) {
377+
instance.addTopologicalCell(
378+
cols.getColumn(Weiche_v_zul_W_Links))
379+
}
372380
wKrGspKomponenten.filter [
373381
zungenpaar?.kreuzungsgleis?.wert ==
374382
ENUM_LINKS_RECHTS_RECHTS
@@ -395,6 +403,10 @@ class SskwTransformator extends AbstractPlanPro2TableModelTransformator {
395403
[
396404
val isPMaxR = element.
397405
isGeschwindigkeitPMax(element.topKanteR)
406+
if (isPMaxR) {
407+
instance.addTopologicalCell(
408+
cols.getColumn(Weiche_v_zul_W_Rechts))
409+
}
398410
wKrGspKomponenten.map [
399411
zungenpaar
400412
].printGeschwindingkeitR(isPMaxR)
@@ -405,6 +417,10 @@ class SskwTransformator extends AbstractPlanPro2TableModelTransformator {
405417
[
406418
val isPMaxR = element.
407419
isGeschwindigkeitPMax(element.topKanteR)
420+
if (isPMaxR) {
421+
instance.addTopologicalCell(
422+
cols.getColumn(Weiche_v_zul_W_Rechts))
423+
}
408424
wKrGspKomponenten.filter [
409425
zungenpaar?.kreuzungsgleis?.wert ==
410426
ENUM_LINKS_RECHTS_LINKS
@@ -437,6 +453,8 @@ class SskwTransformator extends AbstractPlanPro2TableModelTransformator {
437453
fillingIterableCase(
438454
[art_ekw],
439455
[
456+
instance.addTopologicalCell(
457+
cols.getColumn(Kreuzung_v_zul_K_Links))
440458
val isPMaxL = element.
441459
isGeschwindigkeitPMax(element.topKanteL)
442460
getKreuzungEKWGroup(wKrGspKomponenten,
@@ -447,6 +465,8 @@ class SskwTransformator extends AbstractPlanPro2TableModelTransformator {
447465
fillingIterableCase(
448466
[art_dkw && exKrLinksKomponenten],
449467
[
468+
instance.addTopologicalCell(
469+
cols.getColumn(Kreuzung_v_zul_K_Links))
450470
val isPMaxL = element.
451471
isGeschwindigkeitPMax(element.topKanteL)
452472
krLinksKomponenten.map [
@@ -459,6 +479,10 @@ class SskwTransformator extends AbstractPlanPro2TableModelTransformator {
459479
[
460480
val isPMaxL = element.
461481
isGeschwindigkeitPMax(element.topKanteL)
482+
if (isPMaxL) {
483+
instance.addTopologicalCell(
484+
cols.getColumn(Kreuzung_v_zul_K_Links))
485+
}
462486
wKrGspKomponenten.map[kreuzung].
463487
printGeschwindingkeitL(isPMaxL)
464488
]
@@ -485,6 +509,8 @@ class SskwTransformator extends AbstractPlanPro2TableModelTransformator {
485509
fillingIterableCase(
486510
[art_ekw],
487511
[
512+
instance.addTopologicalCell(
513+
cols.getColumn(Kreuzung_v_zul_K_Rechts))
488514
val isPMaxR = element.
489515
isGeschwindigkeitPMax(element.topKanteR)
490516
getKreuzungEKWGroup(wKrGspKomponenten,
@@ -495,6 +521,8 @@ class SskwTransformator extends AbstractPlanPro2TableModelTransformator {
495521
fillingIterableCase(
496522
[art_dkw && exKrRechtsKomponenten],
497523
[
524+
instance.addTopologicalCell(
525+
cols.getColumn(Kreuzung_v_zul_K_Rechts))
498526
val isPMaxR = element.
499527
isGeschwindigkeitPMax(element.topKanteR)
500528
krRechtsKomponenten.map [
@@ -507,6 +535,10 @@ class SskwTransformator extends AbstractPlanPro2TableModelTransformator {
507535
[
508536
val isPMaxR = element.
509537
isGeschwindigkeitPMax(element.topKanteR)
538+
if (isPMaxR) {
539+
instance.addTopologicalCell(
540+
cols.getColumn(Kreuzung_v_zul_K_Rechts))
541+
}
510542
wKrGspKomponenten.map[kreuzung].
511543
printGeschwindingkeitR(isPMaxR)
512544
]

java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/sskz/SskzTransformationService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
*/
1111
package org.eclipse.set.feature.table.pt1.sskz;
1212

13-
import java.util.Collections;
1413
import java.util.List;
1514

1615
import org.eclipse.e4.core.services.events.IEventBroker;
@@ -102,6 +101,6 @@ protected String getShortcut() {
102101

103102
@Override
104103
protected List<String> getTopologicalColumnPosition() {
105-
return Collections.emptyList();
104+
return List.of(SskzColumns.Ueberhoehung);
106105
}
107106
}

java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssla/SslaTransformationService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
package org.eclipse.set.feature.table.pt1.ssla;
1010

1111
import static org.eclipse.nebula.widgets.nattable.sort.SortDirectionEnum.ASC;
12+
import static org.eclipse.set.feature.table.pt1.ssla.SslaColumns.*;
1213
import static org.eclipse.set.utils.table.sorting.ComparatorBuilder.CellComparatorType.LEXICOGRAPHICAL;
1314

14-
import java.util.Collections;
1515
import java.util.Comparator;
1616
import java.util.List;
1717

@@ -85,7 +85,8 @@ protected String getShortcut() {
8585

8686
@Override
8787
protected List<String> getTopologicalColumnPosition() {
88-
return Collections.emptyList();
88+
return List.of(Bezeichnung, Fahrweg_Start, Fahrweg_Ziel,
89+
Durchrutschweg_Ziel, Unterwegssignal);
8990
}
9091

9192
}

java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/sslb/SslbTransformationService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ protected String getShortcut() {
8989

9090
@Override
9191
protected List<String> getTopologicalColumnPosition() {
92-
return List.of(SslbColumns.Streckenfreimeldung);
92+
return List.of(SslbColumns.Streckenfreimeldung,
93+
SslbColumns.Anrueckabschnitt_Bezeichnung,
94+
SslbColumns.Anrueckabschnitt_Anordnung);
9395
}
9496

9597
}

java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/ssld/SsldTransformationService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
package org.eclipse.set.feature.table.pt1.ssld;
1010

1111
import static org.eclipse.nebula.widgets.nattable.sort.SortDirectionEnum.ASC;
12+
import static org.eclipse.set.feature.table.pt1.ssld.SsldColumns.*;
1213
import static org.eclipse.set.utils.table.sorting.ComparatorBuilder.CellComparatorType.MIXED_STRING;
1314

1415
import java.util.Comparator;
@@ -89,8 +90,8 @@ protected String getShortcut() {
8990

9091
@Override
9192
protected List<String> getTopologicalColumnPosition() {
92-
return List.of(SsldColumns.Freigemeldet,
93-
SsldColumns.Aufloeseabschnitt_Laenge);
93+
return List.of(Freigemeldet, Aufloeseabschnitt_Laenge, Laenge_Ist,
94+
massgebende_Neigung, relevante_FmA, v_Aufwertung_Verzicht);
9495
}
9596

9697
}

java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/sslr/SslrTransformationService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ protected String getShortcut() {
7878

7979
@Override
8080
protected List<String> getTopologicalColumnPosition() {
81-
return List.of(SslrColumns.Fahrweg_Entscheidungsweiche);
81+
return List.of(SslrColumns.Fahrweg_Entscheidungsweiche,
82+
SslrColumns.Abhaengiger_BUe);
8283
}
8384
}

0 commit comments

Comments
 (0)