mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-13 08:10:46 +00:00
fixed parsing of odvNameElem for nearbyStations
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@372 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
23da0f645e
commit
2b3d10d953
1 changed files with 9 additions and 8 deletions
|
@ -310,14 +310,13 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
||||||
XmlPullUtil.next(pp);
|
XmlPullUtil.next(pp);
|
||||||
while (XmlPullUtil.test(pp, "odvNameElem"))
|
while (XmlPullUtil.test(pp, "odvNameElem"))
|
||||||
{
|
{
|
||||||
final int stopId = Integer.parseInt(pp.getAttributeValue(null, "stopID"));
|
final Location location = processOdvNameElem(pp);
|
||||||
XmlPullUtil.enter(pp, "odvNameElem");
|
if (location.type == LocationType.STATION)
|
||||||
final String location = normalizeLocationName(pp.getText());
|
{
|
||||||
XmlPullUtil.exit(pp, "odvNameElem");
|
final Station newStation = new Station(location.id, location.name, location.lat, location.lon, 0, null, null);
|
||||||
|
if (!stations.contains(newStation))
|
||||||
final Station newStation = new Station(stopId, location, 0, 0, 0, null, null);
|
stations.add(newStation);
|
||||||
if (!stations.contains(newStation))
|
}
|
||||||
stations.add(newStation);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new NearbyStationsResult(stations);
|
return new NearbyStationsResult(stations);
|
||||||
|
@ -559,6 +558,8 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
||||||
return 'R' + str;
|
return 'R' + str;
|
||||||
if (type.equals("MBS")) // Montafonerbahn
|
if (type.equals("MBS")) // Montafonerbahn
|
||||||
return 'R' + str;
|
return 'R' + str;
|
||||||
|
if (type.equals("SES")) // EGP - die Städtebahn GmbH
|
||||||
|
return 'R' + str;
|
||||||
if (type.equals("Abellio-Zug")) // Abellio
|
if (type.equals("Abellio-Zug")) // Abellio
|
||||||
return 'R' + str;
|
return 'R' + str;
|
||||||
if (type.equals("KBS")) // Kursbuchstrecke
|
if (type.equals("KBS")) // Kursbuchstrecke
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue