Location now has constructor without geo coordinates

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@417 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2010-12-26 19:21:12 +00:00
parent a26e762a6b
commit e2b9bc96a9
23 changed files with 114 additions and 98 deletions

View file

@ -95,7 +95,7 @@ public class SbbProvider extends AbstractHafasProvider
+ "|(Verbindung zum Server konnte leider nicht hergestellt werden|kann vom Server derzeit leider nicht bearbeitet werden)" // messages
+ ").*?" //
, Pattern.DOTALL);
private static final Pattern P_DEPARTURES_HEAD_FINE = Pattern.compile("" //
private static final Pattern P_DEPARTURES_HEAD_FINE = Pattern.compile("" //
+ "<strong>([^<]*)</strong>(?:<br />)?\n" // location
+ "Abfahrt (\\d{1,2}:\\d{2})\n" // time
+ "Uhr, (\\d{2}\\.\\d{2}\\.\\d{2})\n" // date
@ -134,8 +134,8 @@ public class SbbProvider extends AbstractHafasProvider
if (mHeadFine.matches())
{
final String location = ParserUtils.resolveEntities(mHeadFine.group(1));
final Date currentTime = ParserUtils.joinDateTime(ParserUtils.parseDate(mHeadFine.group(3)), ParserUtils
.parseTime(mHeadFine.group(2)));
final Date currentTime = ParserUtils.joinDateTime(ParserUtils.parseDate(mHeadFine.group(3)),
ParserUtils.parseTime(mHeadFine.group(2)));
final int locationId = Integer.parseInt(mHeadFine.group(4));
final List<Departure> departures = new ArrayList<Departure>(8);
// String oldZebra = null;
@ -180,7 +180,7 @@ public class SbbProvider extends AbstractHafasProvider
}
}
return new QueryDeparturesResult(new Location(LocationType.STATION, locationId, 0, 0, location), departures, null);
return new QueryDeparturesResult(new Location(LocationType.STATION, locationId, location), departures, null);
}
else
{