From 2b3d10d9537035aad5071cee9c24832eeac72cad Mon Sep 17 00:00:00 2001 From: "andreas.schildbach" Date: Thu, 2 Dec 2010 08:51:24 +0000 Subject: [PATCH] fixed parsing of odvNameElem for nearbyStations git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@372 0924bc21-9374-b0fa-ee44-9ff1593b38f0 --- src/de/schildbach/pte/AbstractEfaProvider.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/de/schildbach/pte/AbstractEfaProvider.java b/src/de/schildbach/pte/AbstractEfaProvider.java index c20da1e1..e824f077 100644 --- a/src/de/schildbach/pte/AbstractEfaProvider.java +++ b/src/de/schildbach/pte/AbstractEfaProvider.java @@ -310,14 +310,13 @@ public abstract class AbstractEfaProvider implements NetworkProvider XmlPullUtil.next(pp); while (XmlPullUtil.test(pp, "odvNameElem")) { - final int stopId = Integer.parseInt(pp.getAttributeValue(null, "stopID")); - XmlPullUtil.enter(pp, "odvNameElem"); - final String location = normalizeLocationName(pp.getText()); - XmlPullUtil.exit(pp, "odvNameElem"); - - final Station newStation = new Station(stopId, location, 0, 0, 0, null, null); - if (!stations.contains(newStation)) - stations.add(newStation); + final Location location = processOdvNameElem(pp); + if (location.type == LocationType.STATION) + { + final Station newStation = new Station(location.id, location.name, location.lat, location.lon, 0, null, null); + if (!stations.contains(newStation)) + stations.add(newStation); + } } return new NearbyStationsResult(stations); @@ -559,6 +558,8 @@ public abstract class AbstractEfaProvider implements NetworkProvider return 'R' + str; if (type.equals("MBS")) // Montafonerbahn return 'R' + str; + if (type.equals("SES")) // EGP - die Städtebahn GmbH + return 'R' + str; if (type.equals("Abellio-Zug")) // Abellio return 'R' + str; if (type.equals("KBS")) // Kursbuchstrecke