mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 16:59:51 +00:00
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:
parent
a26e762a6b
commit
e2b9bc96a9
23 changed files with 114 additions and 98 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue