decouple station list object from station dto

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@491 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2011-02-11 17:43:46 +00:00
parent a990586727
commit 240e95d19b
5 changed files with 9 additions and 20 deletions

View file

@ -293,7 +293,7 @@ public abstract class AbstractEfaProvider implements NetworkProvider
{
final Location ownLocation = processOdvNameElem(pp, place);
final Station ownStation = ownLocation.type == LocationType.STATION ? new Station(ownLocation.id, ownLocation.place,
ownLocation.name, null, ownLocation.lat, ownLocation.lon, 0, null, null) : null;
ownLocation.name, null, ownLocation.lat, ownLocation.lon) : null;
final List<Station> stations = new ArrayList<Station>();
@ -310,8 +310,6 @@ public abstract class AbstractEfaProvider implements NetworkProvider
final String parsedPlace = normalizeLocationName(XmlPullUtil.attr(pp, "place"));
final int parsedLon = XmlPullUtil.intAttr(pp, "x");
final int parsedLat = XmlPullUtil.intAttr(pp, "y");
final String parsedDistStr = pp.getAttributeValue(null, "distance");
final int parsedDist = parsedDistStr != null ? Integer.parseInt(parsedDistStr) : 0;
XmlPullUtil.enter(pp, "itdOdvAssignedStop");
final String parsedName = normalizeLocationName(pp.getText());
XmlPullUtil.exit(pp, "itdOdvAssignedStop");
@ -319,8 +317,7 @@ public abstract class AbstractEfaProvider implements NetworkProvider
if (!"WGS84".equals(parsedMapName))
throw new IllegalStateException("unknown mapName: " + parsedMapName);
final Station newStation = new Station(parsedLocationId, parsedPlace, parsedName, parsedLongName, parsedLat, parsedLon,
parsedDist, null, null);
final Station newStation = new Station(parsedLocationId, parsedPlace, parsedName, parsedLongName, parsedLat, parsedLon);
if (!stations.contains(newStation))
stations.add(newStation);
}
@ -358,7 +355,7 @@ public abstract class AbstractEfaProvider implements NetworkProvider
final Location location = processOdvNameElem(pp, place);
if (location.type == LocationType.STATION)
{
final Station newStation = new Station(location.id, null, null, location.name, location.lat, location.lon, 0, null, null);
final Station newStation = new Station(location.id, null, null, location.name, location.lat, location.lon);
if (!stations.contains(newStation))
stations.add(newStation);
}