mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-13 00:08:49 +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);
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue