mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-17 14:49:50 +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
|
@ -258,9 +258,8 @@ public class SbbProvider extends AbstractHafasProvider
|
|||
final Matcher mHead = P_CONNECTIONS_HEAD.matcher(page);
|
||||
if (mHead.matches())
|
||||
{
|
||||
final String from = ParserUtils.resolveEntities(mHead.group(1));
|
||||
final Date currentDate = ParserUtils.parseDate(mHead.group(2));
|
||||
final String to = ParserUtils.resolveEntities(mHead.group(3));
|
||||
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(3)));
|
||||
final String linkEarlier = mHead.group(4) != null ? ParserUtils.resolveEntities(mHead.group(4)) : null;
|
||||
final String linkLater = mHead.group(5) != null ? ParserUtils.resolveEntities(mHead.group(5)) : null;
|
||||
final List<Connection> connections = new ArrayList<Connection>();
|
||||
|
@ -287,7 +286,7 @@ public class SbbProvider extends AbstractHafasProvider
|
|||
.parseTime(mConFine.group(5)));
|
||||
final String link = uri + "#" + id; // TODO use print link?
|
||||
|
||||
final Connection connection = new Connection(id, link, departureTime, arrivalTime, null, null, 0, from, 0, to,
|
||||
final Connection connection = new Connection(id, link, departureTime, arrivalTime, null, null, 0, from.name, 0, to.name,
|
||||
new ArrayList<Connection.Part>(1));
|
||||
connections.add(connection);
|
||||
}
|
||||
|
@ -368,7 +367,7 @@ public class SbbProvider extends AbstractHafasProvider
|
|||
}
|
||||
}
|
||||
|
||||
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