mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-17 09:49:49 +00:00
split name and place for connections as well
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@654 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
d9f29be183
commit
39e343d3ab
1 changed files with 4 additions and 2 deletions
|
@ -124,7 +124,7 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
+ "</ReqC>";
|
||||
}
|
||||
|
||||
private static final Location parseStation(final XmlPullParser pp)
|
||||
private final Location parseStation(final XmlPullParser pp)
|
||||
{
|
||||
final String type = pp.getName();
|
||||
if ("Station".equals(type))
|
||||
|
@ -133,7 +133,9 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
final int id = Integer.parseInt(pp.getAttributeValue(null, "externalStationNr"));
|
||||
final int x = Integer.parseInt(pp.getAttributeValue(null, "x"));
|
||||
final int y = Integer.parseInt(pp.getAttributeValue(null, "y"));
|
||||
return new Location(LocationType.STATION, id, y, x, null, name);
|
||||
|
||||
final String[] nameAndPlace = splitNameAndPlace(name);
|
||||
return new Location(LocationType.STATION, id, y, x, nameAndPlace[0], nameAndPlace[1]);
|
||||
}
|
||||
throw new IllegalStateException("cannot handle: " + type);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue