mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
query history remembers whole Locations
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@250 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
e282106c00
commit
9c7150956a
9 changed files with 53 additions and 45 deletions
|
@ -266,8 +266,8 @@ public final class VbbProvider implements NetworkProvider
|
|||
final Matcher mHead = P_CONNECTIONS_HEAD.matcher(page);
|
||||
if (mHead.matches())
|
||||
{
|
||||
final String from = ParserUtils.resolveEntities(mHead.group(1));
|
||||
final String to = ParserUtils.resolveEntities(mHead.group(2));
|
||||
final Location from = new Location(LocationType.ANY, 0, 0, 0, ParserUtils.resolveEntities(mHead.group(1)));
|
||||
final Location to = new Location(LocationType.ANY, 0, 0, 0, ParserUtils.resolveEntities(mHead.group(2)));
|
||||
final Date currentDate = ParserUtils.parseDate(mHead.group(3));
|
||||
final String linkEarlier = mHead.group(4) != null ? BVG_BASE_URL + ParserUtils.resolveEntities(mHead.group(4)) : null;
|
||||
final String linkLater = mHead.group(5) != null ? BVG_BASE_URL + ParserUtils.resolveEntities(mHead.group(5)) : null;
|
||||
|
@ -294,7 +294,7 @@ public final class VbbProvider implements NetworkProvider
|
|||
arrivalTime = ParserUtils.addDays(arrivalTime, 1);
|
||||
final String line = normalizeLine(ParserUtils.resolveEntities(mConFine.group(4)));
|
||||
final Connection connection = new Connection(ParserUtils.extractId(link), link, departureTime, arrivalTime, line,
|
||||
line != null ? LINES.get(line.charAt(0)) : null, 0, from, 0, to, null);
|
||||
line != null ? LINES.get(line.charAt(0)) : null, 0, from.name, 0, to.name, null);
|
||||
connections.add(connection);
|
||||
}
|
||||
else
|
||||
|
@ -303,7 +303,7 @@ public final class VbbProvider implements NetworkProvider
|
|||
}
|
||||
}
|
||||
|
||||
return new QueryConnectionsResult(uri, from, to, currentDate, linkEarlier, linkLater, connections);
|
||||
return new QueryConnectionsResult(uri, from, null, to, linkEarlier, linkLater, connections);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue