mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 08:49:58 +00:00
query more connections for Switzerland and Belgium
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@318 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
039168e55f
commit
6811870b0e
13 changed files with 49 additions and 49 deletions
|
@ -233,9 +233,26 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
+ "<RFlags b=\"0\" chExtension=\"0\" f=\"4\" sMode=\"N\"/>" //
|
||||
+ "</ConReq>";
|
||||
|
||||
return queryConnections(request, from, via, to);
|
||||
}
|
||||
|
||||
public QueryConnectionsResult queryMoreConnections(final String context) throws IOException
|
||||
{
|
||||
final String request = "<ConScrReq scr=\"F\" nrCons=\"4\">" //
|
||||
+ "<ConResCtxt>" + context + "</ConResCtxt>" //
|
||||
+ "</ConScrReq>";
|
||||
|
||||
return queryConnections(request, null, null, null);
|
||||
}
|
||||
|
||||
private QueryConnectionsResult queryConnections(final String request, final Location from, final Location via, final Location to)
|
||||
throws IOException
|
||||
{
|
||||
// System.out.println(request);
|
||||
// System.out.println(ParserUtils.scrape(apiUri, true, wrap(request), null, false));
|
||||
|
||||
final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyyMMdd");
|
||||
|
||||
InputStream is = null;
|
||||
try
|
||||
{
|
||||
|
@ -263,7 +280,7 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
}
|
||||
|
||||
XmlPullUtil.require(pp, "ConResCtxt");
|
||||
final String sessionId = XmlPullUtil.text(pp);
|
||||
final String context = XmlPullUtil.text(pp);
|
||||
XmlPullUtil.require(pp, "ConnectionList");
|
||||
XmlPullUtil.enter(pp);
|
||||
|
||||
|
@ -456,7 +473,7 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
|
||||
XmlPullUtil.exit(pp);
|
||||
|
||||
return new QueryConnectionsResult(null, from, via, to, null, null, connections);
|
||||
return new QueryConnectionsResult(null, from, via, to, context, connections);
|
||||
}
|
||||
catch (final XmlPullParserException x)
|
||||
{
|
||||
|
@ -663,11 +680,6 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
return P_WHITESPACE.matcher(str).replaceAll("");
|
||||
}
|
||||
|
||||
public QueryConnectionsResult queryMoreConnections(String uri) throws IOException
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public GetConnectionDetailsResult getConnectionDetails(String connectionUri) throws IOException
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue