Commit 5a894a46 authored by Volker Krause's avatar Volker Krause
Browse files

Also set location types in vehicle layout parsers

parent a8a65d0c
Pipeline #65179 passed with stage
in 25 seconds
......@@ -54,7 +54,8 @@
"identifier": {
"ibnr": "8010205"
},
"name": "Leipzig Hbf"
"name": "Leipzig Hbf",
"type": "Stop"
},
"vehicleLayout": {
"direction": "Backward",
......
......@@ -54,7 +54,8 @@
"identifier": {
"ibnr": "8010205"
},
"name": "Leipzig Hbf"
"name": "Leipzig Hbf",
"type": "Stop"
},
"vehicleLayout": {
"direction": "Backward",
......
......@@ -16,7 +16,8 @@
"identifier": {
"ibnr": "8500010"
},
"name": "Basel SBB"
"name": "Basel SBB",
"type": "Stop"
},
"vehicleLayout": {
"direction": "Backward",
......
......@@ -16,7 +16,8 @@
"identifier": {
"ibnr": "8103000"
},
"name": "Wien Hbf"
"name": "Wien Hbf",
"type": "Stop"
},
"vehicleLayout": {
"direction": "Backward",
......
......@@ -16,6 +16,7 @@
"identifier": {
"ibnr": "8000261"
},
"name": "München Hbf"
"name": "München Hbf",
"type": "Stop"
}
}
......@@ -44,7 +44,8 @@
"identifier": {
"ibnr": "8103000"
},
"name": "Wien Hbf"
"name": "Wien Hbf",
"type": "Stop"
},
"vehicleLayout": {
"direction": "Forward",
......
......@@ -58,6 +58,7 @@ bool DeutscheBahnVehicleLayoutParser::parse(const QByteArray &data)
Location stop;
stop.setName(halt.value(QLatin1String("bahnhofsname")).toString());
stop.setIdentifier(QStringLiteral("ibnr"), halt.value(QLatin1String("evanummer")).toString());
stop.setType(Location::Stop);
Line line;
line.setMode(Line::LongDistanceTrain);
line.setName(vehicle.name());
......
......@@ -133,6 +133,7 @@ bool OebbVehicleLayoutParser::parse(const QByteArray &data)
const auto trainStationObj = obj.value(QLatin1String("trainStation")).toObject();
stop.setName(trainStationObj.value(QLatin1String("name")).toString());
stop.setIdentifier(QStringLiteral("ibnr"), trainStationObj.value(QLatin1String("evaCode")).toString());
stop.setType(Location::Stop);
Line line;
line.setMode(Line::LongDistanceTrain); // TODO is this actually true for ÖBB?
line.setName(obj.value(QLatin1String("trainName")).toString());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment