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 @@ -160,7 +160,7 @@ public interface CacheId {
* Compares strings numerical.
*/
public static final MixedStringComparator NUMERIC_COMPARATOR = new MixedStringComparator(
"(?<numberPrefix>-)?(?<numberN>[0-9]+)(,(?<numberD>[0-9]+))?");
"(?<numberPrefix>-)?(?<numberN>[0-9]+)(.(?<numberD>[0-9]+))?");

/**
* The id of the attachment viewer part.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0.
*
*
* SPDX-License-Identifier: EPL-2.0
*
*/
Expand Down Expand Up @@ -367,7 +367,7 @@ class SszsTransformator extends AbstractPlanPro2TableModelTransformator {
ITERABLE_FILLING_SEPARATOR
)

// O: Sszs.ETCS_Gefahrpunkt.Bezeichnung:
// O: Sszs.ETCS_Gefahrpunkt.Bezeichnung
fillConditional(
row,
cols.getColumn(Gefahrpunkt_Bezeichnung),
Expand Down Expand Up @@ -396,7 +396,10 @@ class SszsTransformator extends AbstractPlanPro2TableModelTransformator {
[ETCSGefahrpunktabstandAbweichend?.wert?.toTableDecimal]
),
new Case<ETCS_Signal>(
[IDETCSGefahrpunkt2?.value !== null],
[
IDETCSGefahrpunkt2?.value !== null &&
IDETCSGefahrpunkt?.value !== null
],
[
row.addTopologicalCell(
cols.getColumn(Abstand_vom_Signal))
Expand All @@ -406,17 +409,22 @@ class SszsTransformator extends AbstractPlanPro2TableModelTransformator {
val distanceToETCSGefahrpunkt2 = distanceToSignal(
IDETCSGefahrpunkt2?.value?.IDMarkanteStelle?.value).
toTableDecimal
return '''«distanceToETCSGefahrpunkt»(«distanceToETCSGefahrpunkt2»)'''
return '''«distanceToETCSGefahrpunkt» («distanceToETCSGefahrpunkt2»)'''

]
),
new Case<ETCS_Signal>(
[IDETCSGefahrpunkt2?.value === null],
[
IDETCSGefahrpunkt2?.value === null &&
IDETCSGefahrpunkt?.value !== null
],
[
row.addTopologicalCell(
cols.getColumn(Abstand_vom_Signal))
distanceToSignal(
IDETCSGefahrpunkt?.value?.IDMarkanteStelle?.value).
toTableDecimal

]
)
)
Expand Down Expand Up @@ -503,9 +511,9 @@ class SszsTransformator extends AbstractPlanPro2TableModelTransformator {
return ""
}
val distanceValue = distance.get
return distanceValue <= 5 ||
distanceValue >= -3 ? "0" : AgateRounding.roundUp(
distanceValue).toString
return distanceValue <= 5 || distanceValue >= -3
? "0"
: AgateRounding.roundUp(distanceValue).toString
]
)

Expand Down Expand Up @@ -775,9 +783,8 @@ class SszsTransformator extends AbstractPlanPro2TableModelTransformator {
if (distances.compareTo(BigDecimal.ZERO) == 0) {
return fma -> 0.0
}
return topGraph.isInWirkrichtungOfSignal(signal, fma)
? fma -> distances.doubleValue
: fma -> -distances.doubleValue
return topGraph.isInWirkrichtungOfSignal(signal, fma) ? fma ->
distances.doubleValue : fma -> -distances.doubleValue
].filterNull
if (distanceToSignal.empty) {
return Optional.empty
Expand Down
Loading