mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 17:39:49 +00:00
construct line id in cases where unavailable
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@701 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
36185b840c
commit
83a83b516e
1 changed files with 9 additions and 5 deletions
|
@ -1685,17 +1685,21 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
||||||
final String destinationName = normalizeLocationName(pp.getAttributeValue(null, "destination"));
|
final String destinationName = normalizeLocationName(pp.getAttributeValue(null, "destination"));
|
||||||
final Location destination = destinationIdStr.length() > 0 ? new Location(LocationType.STATION,
|
final Location destination = destinationIdStr.length() > 0 ? new Location(LocationType.STATION,
|
||||||
Integer.parseInt(destinationIdStr), null, destinationName) : new Location(LocationType.ANY, 0, null, destinationName);
|
Integer.parseInt(destinationIdStr), null, destinationName) : new Location(LocationType.ANY, 0, null, destinationName);
|
||||||
final String lineStr;
|
final String lineLabel;
|
||||||
if ("AST".equals(pp.getAttributeValue(null, "symbol")))
|
if ("AST".equals(pp.getAttributeValue(null, "symbol")))
|
||||||
lineStr = "BAST";
|
lineLabel = "BAST";
|
||||||
else
|
else
|
||||||
lineStr = parseLine(pp.getAttributeValue(null, "motType"), pp.getAttributeValue(null, "shortname"),
|
lineLabel = parseLine(pp.getAttributeValue(null, "motType"), pp.getAttributeValue(null, "shortname"),
|
||||||
pp.getAttributeValue(null, "name"), null);
|
pp.getAttributeValue(null, "name"), null);
|
||||||
final Line line = new Line(null, lineStr, lineColors(lineStr));
|
|
||||||
|
|
||||||
XmlPullUtil.enter(pp, "itdMeansOfTransport");
|
XmlPullUtil.enter(pp, "itdMeansOfTransport");
|
||||||
|
XmlPullUtil.require(pp, "motDivaParams");
|
||||||
|
final String lineId = XmlPullUtil.attr(pp, "network") + ':' + XmlPullUtil.attr(pp, "line") + ':'
|
||||||
|
+ XmlPullUtil.attr(pp, "supplement") + ':' + XmlPullUtil.attr(pp, "direction") + ':'
|
||||||
|
+ XmlPullUtil.attr(pp, "project");
|
||||||
XmlPullUtil.exit(pp, "itdMeansOfTransport");
|
XmlPullUtil.exit(pp, "itdMeansOfTransport");
|
||||||
|
|
||||||
|
final Line line = new Line(lineId, lineLabel, lineColors(lineLabel));
|
||||||
|
|
||||||
if (XmlPullUtil.test(pp, "itdRBLControlled"))
|
if (XmlPullUtil.test(pp, "itdRBLControlled"))
|
||||||
XmlPullUtil.next(pp);
|
XmlPullUtil.next(pp);
|
||||||
if (XmlPullUtil.test(pp, "itdInfoTextList"))
|
if (XmlPullUtil.test(pp, "itdInfoTextList"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue