mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-18 16:29:51 +00:00
parse 'service down' message
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@113 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
3c614f03b3
commit
5052532dc9
1 changed files with 7 additions and 2 deletions
|
@ -417,8 +417,9 @@ public class RmvProvider implements NetworkProvider
|
|||
+ "<p class=\"qs\">\n(.*?)</p>\n" // head
|
||||
+ "(.*?)<p class=\"links\">.*?" // departures
|
||||
+ "input=(\\d+).*?" // locationId
|
||||
+ "|(Eingabe kann nicht interpretiert))" //
|
||||
+ ".*?", Pattern.DOTALL);
|
||||
+ "|(Eingabe kann nicht interpretiert)" // messages
|
||||
+ "|(Internal Error)" // messages
|
||||
+ ").*?", Pattern.DOTALL);
|
||||
private static final Pattern P_DEPARTURES_HEAD_FINE = Pattern.compile("" //
|
||||
+ "<b>(.*?)</b><br />.*?" //
|
||||
+ "Abfahrt (\\d+:\\d+).*?" //
|
||||
|
@ -444,6 +445,8 @@ public class RmvProvider implements NetworkProvider
|
|||
// messages
|
||||
if (mHeadCoarse.group(4) != null)
|
||||
return new QueryDeparturesResult(uri, Status.INVALID_STATION);
|
||||
else if (mHeadCoarse.group(5) != null)
|
||||
return new QueryDeparturesResult(uri, Status.SERVICE_DOWN);
|
||||
|
||||
final int stationId = Integer.parseInt(mHeadCoarse.group(3));
|
||||
|
||||
|
@ -568,6 +571,8 @@ public class RmvProvider implements NetworkProvider
|
|||
return "BALT" + type.substring(3) + number;
|
||||
if (type.equals("LTaxi"))
|
||||
return "BLTaxi" + number;
|
||||
if (type.equals("AT")) // AnschlußSammelTaxi
|
||||
return "BAT" + number;
|
||||
if (type.equals("SCH"))
|
||||
return "FSCH" + number;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue