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:
andreas.schildbach@gmail.com 2011-06-15 15:32:20 +00:00
parent 36185b840c
commit 83a83b516e

View file

@ -1685,17 +1685,21 @@ public abstract class AbstractEfaProvider implements NetworkProvider
final String destinationName = normalizeLocationName(pp.getAttributeValue(null, "destination"));
final Location destination = destinationIdStr.length() > 0 ? new Location(LocationType.STATION,
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")))
lineStr = "BAST";
lineLabel = "BAST";
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);
final Line line = new Line(null, lineStr, lineColors(lineStr));
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");
final Line line = new Line(lineId, lineLabel, lineColors(lineLabel));
if (XmlPullUtil.test(pp, "itdRBLControlled"))
XmlPullUtil.next(pp);
if (XmlPullUtil.test(pp, "itdInfoTextList"))