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 @@ -335,7 +335,8 @@ protected void fillAbstandMastMitte(final TableRow row,
s -> {
final SignalSideDistance signalSideDistances = sideDistancesSignal
.computeIfAbsent(s,
SignalSideDistance::new);
ele -> new SignalSideDistance(ele,
getSideDistanceMastType()));
final Set<SideDistance> distances = switch (linksrechts) {
case ENUM_LINKS_RECHTS_LINKS -> signalSideDistances
.getSideDistancesLeft();
Expand All @@ -354,6 +355,8 @@ protected void fillAbstandMastMitte(final TableRow row,
}, null, ITERABLE_FILLING_SEPARATOR));
}

protected abstract List<ENUMBefestigungArt> getSideDistanceMastType();

protected abstract ColumnDescriptor getFundamentHoeheColumn();

protected abstract ColumnDescriptor getArtRegelzeichnungColumn();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/
package org.eclipse.set.feature.table.pt1.ssks;

import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.*;
import static org.eclipse.set.ppmodel.extensions.BasisAttributExtensions.getContainer;
import static org.eclipse.set.ppmodel.extensions.EObjectExtensions.getNullableObject;
import static org.eclipse.set.ppmodel.extensions.PunktObjektExtensions.getSinglePoint;
Expand Down Expand Up @@ -93,21 +92,11 @@ public String toString() {
}
}

private final List<ENUMBefestigungArt> relevantMastType = List.of(
ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_MAST_HOCH,
ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_MAST_NIEDRIG,
ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_SONSTIGE_HOCH,
ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_SONSTIGE_NIEDRIG,
ENUM_BEFESTIGUNG_ART_SONDERANORDNUNG_MAST_HOCH,
ENUM_BEFESTIGUNG_ART_SONDERANORDNUNG_MAST_NIEDRIG,
ENUM_BEFESTIGUNG_ART_PFOSTEN_HOCH,
ENUM_BEFESTIGUNG_ART_PFOSTEN_NIEDRIG,
ENUM_BEFESTIGUNG_ART_ARBEITSBUEHNE, ENUM_BEFESTIGUNG_ART_OL_MAST,
ENUM_BEFESTIGUNG_ART_WAND, ENUM_BEFESTIGUNG_ART_DACH_DECKE);
final Signal signal;
private final Set<SideDistance> sideDistancesRight = new HashSet<>();

private final Set<SideDistance> sideDistancesLeft = new HashSet<>();
private final List<ENUMBefestigungArt> relevantMastType;

/**
* Max distance from main track to neighbor track
Expand All @@ -117,9 +106,13 @@ public String toString() {
/**
* @param signal
* the Signal
* @param relevantMastType
* the relevant mast type for calculate side distance
*/
public SignalSideDistance(final Signal signal) {
public SignalSideDistance(final Signal signal,
final List<ENUMBefestigungArt> relevantMastType) {
this.signal = signal;
this.relevantMastType = relevantMastType;
getSideDistance();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@ import static extension org.eclipse.set.ppmodel.extensions.StellelementExtension
import static extension org.eclipse.set.ppmodel.extensions.UnterbringungExtensions.*
import static extension org.eclipse.set.ppmodel.extensions.UrObjectExtensions.*
import static extension org.eclipse.set.utils.math.BigDecimalExtensions.*
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_PFOSTEN_HOCH
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_DACH_DECKE
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_REGELANORDNUNG_MAST_NIEDRIG
import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_WAND
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_PFOSTEN_NIEDRIG
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_OL_MAST
import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.ENUM_BEFESTIGUNG_ART_SONDERANORDNUNG_MAST_NIEDRIG

/**
* Table transformation for a Signaltabelle (Ssks).
Expand Down Expand Up @@ -1226,5 +1238,19 @@ class SsksTransformator extends AbstractSignalTableTransform {
[throw new RuntimeException(e)]
)
}

override protected getSideDistanceMastType() {
return List.of(ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_MAST_HOCH,
ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_MAST_NIEDRIG,
ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_SONSTIGE_HOCH,
ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_SONSTIGE_NIEDRIG,
ENUM_BEFESTIGUNG_ART_SONDERANORDNUNG_MAST_HOCH,
ENUM_BEFESTIGUNG_ART_SONDERANORDNUNG_MAST_NIEDRIG,
ENUM_BEFESTIGUNG_ART_PFOSTEN_HOCH,
ENUM_BEFESTIGUNG_ART_PFOSTEN_NIEDRIG,
ENUM_BEFESTIGUNG_ART_ARBEITSBUEHNE,
ENUM_BEFESTIGUNG_ART_OL_MAST, ENUM_BEFESTIGUNG_ART_WAND,
ENUM_BEFESTIGUNG_ART_DACH_DECKE);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,25 @@
package org.eclipse.set.feature.table.pt1.sskx;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;

import org.eclipse.e4.core.services.events.IEventBroker;
import org.eclipse.nebula.widgets.nattable.sort.SortDirectionEnum;
import org.eclipse.set.basis.constants.Events;
import org.eclipse.set.core.services.enumtranslation.EnumTranslationService;
import org.eclipse.set.core.services.graph.BankService;
import org.eclipse.set.feature.table.PlanPro2TableTransformationService;
import org.eclipse.set.feature.table.pt1.AbstractPlanPro2TableTransformationService;
import org.eclipse.set.feature.table.pt1.messages.Messages;
import org.eclipse.set.model.planpro.Signale.Signal;
import org.eclipse.set.model.tablemodel.RowGroup;
import org.eclipse.set.ppmodel.extensions.container.MultiContainer_AttributeGroup;
import org.eclipse.set.ppmodel.extensions.utils.TableNameInfo;
import org.eclipse.set.utils.table.TableModelTransformator;
import org.eclipse.set.utils.table.sorting.ComparatorBuilder.CellComparatorType;
import org.eclipse.set.utils.table.sorting.TableRowGroupComparator;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.event.Event;
Expand Down Expand Up @@ -111,4 +117,18 @@ protected List<String> getTopologicalColumnPosition() {
protected Map<Class<?>, String> getFootnotesColumnReferences() {
return Collections.emptyMap();
}

@Override
public Comparator<RowGroup> getRowGroupComparator() {
return TableRowGroupComparator.builder().sortByRouteAndKm(obj -> {
if (obj instanceof final Signal signal) {
return signal;
}
return null;
})
.sort(SskxColumns.Bezeichnung_Signal,
CellComparatorType.LEXICOGRAPHICAL,
SortDirectionEnum.ASC)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
*/
package org.eclipse.set.feature.table.pt1.sskx;

import static org.eclipse.set.model.planpro.Signale.ENUMBefestigungArt.*;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;
Expand All @@ -35,6 +37,7 @@
import org.eclipse.set.model.planpro.Signalbegriffe_Ril_301.OzBk;
import org.eclipse.set.model.planpro.Signalbegriffe_Ril_301.Ra12;
import org.eclipse.set.model.planpro.Signalbegriffe_Struktur.Signalbegriff_ID_TypeClass;
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.Signal;
Expand Down Expand Up @@ -249,6 +252,22 @@ protected void handledThrowException(final TMFactory factory,
// do nothing
}

@Override
protected List<ENUMBefestigungArt> getSideDistanceMastType() {
return List.of(ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_MAST_HOCH,
ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_MAST_NIEDRIG,
ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_SONSTIGE_HOCH,
ENUM_BEFESTIGUNG_ART_REGELANORDNUNG_SONSTIGE_NIEDRIG,
ENUM_BEFESTIGUNG_ART_SONDERANORDNUNG_MAST_HOCH,
ENUM_BEFESTIGUNG_ART_SONDERANORDNUNG_MAST_NIEDRIG,
ENUM_BEFESTIGUNG_ART_PFOSTEN_HOCH,
ENUM_BEFESTIGUNG_ART_PFOSTEN_NIEDRIG,
ENUM_BEFESTIGUNG_ART_ARBEITSBUEHNE,
ENUM_BEFESTIGUNG_ART_OL_MAST, ENUM_BEFESTIGUNG_ART_WAND,
ENUM_BEFESTIGUNG_ART_DACH_DECKE,
ENUM_BEFESTIGUNG_ART_SCHIENENFUSS);
}

private List<String> transformSignalbegriffeBezeichnung(
final Signal signal) {
final List<ENUMGeltungsbereich> geltungsbereich = signal.getSignalReal()
Expand Down Expand Up @@ -313,6 +332,11 @@ private static List<String> getSignalbegriffeBezeichnung(
final String bezeichnung = function
.apply(signalBegriffe);
if (bezeichnung != null && !bezeichnung.isEmpty()) {
if (signalBegriffe.getSymbol() != null
&& !signalBegriffe.getSymbol().isEmpty()) {
return String.format("%s (%s)", bezeichnung, //$NON-NLS-1$
signalBegriffe.getSymbol());
}
return bezeichnung;
}
}
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Mastmitte - Gleismitte
Signal";Strecke​;km​​;Gleis​​​;Lichtraum-profil​​​​;Über-höhung​​​​​;Links​​​​​​;Rechts​​​​​​​;Befestigung​​​​​​​​;"Regelzeichnung
Nr. (Bild)​​​​​​​​​";"Art/
Rz. Nr. (Bild)​​​​​​​​​​";"Höhe
u. SO​​​​​​​​​​​";Bezeichnung​​​​​​​​​​​​;"Regelzeichnung
u. SO​​​​​​​​​​​";Bezeichnung (Symbol)​​​​​​​​​​​​;"Regelzeichnung
Nr. (Bild)​​​​​​​​​​​​​";Bemerkung​​​​​​​​​​​​​​
;;;;;;mm;mm;mm;;;;mm;;;
1;"<p style=""text-align:left""><span>Lf ​7 ​&#39;12&#39; ​km: ​117,100</span></p>";"<p style=""text-align:center""><span>8980</span></p>";"<p style=""text-align:right""><span>117,100</span></p>";"<p style=""text-align:center""><span>(1)​</span></p>";"<p style=""text-align:center""><span>GC</span></p>";"<p style=""text-align:center""><span>67</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span>sonstige ​Regelanordnung ​hoch</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span>Lf ​7</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:left""></p>"
2;"<p style=""text-align:left""><span>Lf ​7 ​&#39;16&#39; ​km: ​117,100</span></p>";"<p style=""text-align:center""><span>8980</span></p>";"<p style=""text-align:right""><span>117,100</span></p>";"<p style=""text-align:center""><span>(1)​</span></p>";"<p style=""text-align:center""><span>GC</span></p>";"<p style=""text-align:center""><span>67</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span>sonstige ​Regelanordnung ​hoch</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span>Lf ​7</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:left""></p>"
1;"<p style=""text-align:left""><span>Lf ​7 ​&#39;12&#39; ​km: ​117,100</span></p>";"<p style=""text-align:center""><span>8980</span></p>";"<p style=""text-align:right""><span>117,100</span></p>";"<p style=""text-align:center""><span>(1)​</span></p>";"<p style=""text-align:center""><span>GC</span></p>";"<p style=""text-align:center""><span>67</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span>sonstige ​Regelanordnung ​hoch</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span>Lf ​7 ​(12)​</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:left""></p>"
2;"<p style=""text-align:left""><span>Lf ​7 ​&#39;16&#39; ​km: ​117,100</span></p>";"<p style=""text-align:center""><span>8980</span></p>";"<p style=""text-align:right""><span>117,100</span></p>";"<p style=""text-align:center""><span>(1)​</span></p>";"<p style=""text-align:center""><span>GC</span></p>";"<p style=""text-align:center""><span>67</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span>sonstige ​Regelanordnung ​hoch</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span>Lf ​7 ​(16)​</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:left""></p>"
3;"<p style=""text-align:left""><span>Vorsignalbake ​km: ​117,730</span></p>";"<p style=""text-align:center""><span>8980</span></p>";"<p style=""text-align:right""><span>117,730</span></p>";"<p style=""text-align:center""><span>(1)​</span></p>";"<p style=""text-align:center""><span>GC</span></p>";"<p style=""text-align:center""><span>0</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span>Pfahl</span></p>";"<p style=""text-align:center""><span>S ​526.2.6 ​(1)​</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span>Ne ​3 ​3str</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:left""></p>"
4;"<p style=""text-align:left""><span>Vorsignalbake ​km: ​117,805</span></p>";"<p style=""text-align:center""><span>8980</span></p>";"<p style=""text-align:right""><span>117,805</span></p>";"<p style=""text-align:center""><span>(1)​</span></p>";"<p style=""text-align:center""><span>GC</span></p>";"<p style=""text-align:center""><span>0</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span>Pfahl</span></p>";"<p style=""text-align:center""><span>S ​526.2.6 ​(1)​</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span>Ne ​3 ​2str</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:left""></p>"
5;"<p style=""text-align:left""><span style=""color:rgb(255, 0, 0)"">Vorsignalbake ​km: ​117,880</span></p>";"<p style=""text-align:center""><span>8980</span></p>";"<p style=""text-align:right""><span>117,880</span></p>";"<p style=""text-align:center""><span>(1)​</span></p>";"<p style=""text-align:center""><span>GC</span></p>";"<p style=""text-align:center""><span>0</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span>Pfahl</span></p>";"<p style=""text-align:center""><span>S ​526.2.6 ​(1)​</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:center""><span>Ne ​3 ​1str</span></p>";"<p style=""text-align:center""><span></span></p>";"<p style=""text-align:left""></p>"
Loading
Loading