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:
andreas.schildbach@gmail.com 2011-05-18 08:34:27 +00:00
parent d9f29be183
commit 39e343d3ab

View file

@ -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);
}