mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 17:39:49 +00:00
make footway arrival clickable
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@131 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
1ab51c23f5
commit
d9499a3329
7 changed files with 35 additions and 23 deletions
|
@ -288,6 +288,8 @@ public class SbbProvider implements NetworkProvider
|
|||
final Matcher mDetFine = P_CONNECTION_DETAILS_FINE.matcher(set);
|
||||
if (mDetFine.matches())
|
||||
{
|
||||
final int departureId = mDetFine.group(1) != null ? Integer.parseInt(mDetFine.group(1)) : 0;
|
||||
|
||||
final String departure = ParserUtils.resolveEntities(mDetFine.group(2));
|
||||
|
||||
Date departureDate = mDetFine.group(3) != null ? ParserUtils.parseDate(mDetFine.group(3)) : null;
|
||||
|
@ -298,6 +300,8 @@ public class SbbProvider implements NetworkProvider
|
|||
|
||||
final String lineType = mDetFine.group(6);
|
||||
|
||||
final int arrivalId = mDetFine.group(9) != null ? Integer.parseInt(mDetFine.group(9)) : 0;
|
||||
|
||||
final String arrival = ParserUtils.resolveEntities(mDetFine.group(10));
|
||||
|
||||
Date arrivalDate = mDetFine.group(11) != null ? ParserUtils.parseDate(mDetFine.group(11)) : null;
|
||||
|
@ -308,7 +312,8 @@ public class SbbProvider implements NetworkProvider
|
|||
|
||||
if (!lineType.equals("fuss") && !lineType.equals("transfer"))
|
||||
{
|
||||
final int departureId = Integer.parseInt(mDetFine.group(1));
|
||||
if (departureId == 0)
|
||||
throw new IllegalStateException("departureId");
|
||||
|
||||
final Date departureTime = ParserUtils.joinDateTime(departureDate, ParserUtils.parseTime(mDetFine.group(4)));
|
||||
|
||||
|
@ -316,7 +321,8 @@ public class SbbProvider implements NetworkProvider
|
|||
|
||||
final String line = normalizeLine(lineType, ParserUtils.resolveEntities(mDetFine.group(7)));
|
||||
|
||||
final int arrivalId = Integer.parseInt(mDetFine.group(9));
|
||||
if (arrivalId == 0)
|
||||
throw new IllegalStateException("arrivalId");
|
||||
|
||||
final Date arrivalTime = ParserUtils.joinDateTime(arrivalDate, ParserUtils.parseTime(mDetFine.group(12)));
|
||||
|
||||
|
@ -330,7 +336,7 @@ public class SbbProvider implements NetworkProvider
|
|||
{
|
||||
final int min = Integer.parseInt(mDetFine.group(8));
|
||||
|
||||
final Connection.Footway footway = new Connection.Footway(min, departure, arrival);
|
||||
final Connection.Footway footway = new Connection.Footway(min, departureId, departure, arrivalId, arrival);
|
||||
connection.parts.add(footway);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue