mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 17:39:49 +00:00
parse 'service down'
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@95 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
7c68269268
commit
75a7692e7f
1 changed files with 3 additions and 1 deletions
|
@ -74,7 +74,7 @@ public class OebbProvider implements NetworkProvider
|
|||
+ "(?:" //
|
||||
+ "<table class=\"hafasResult\".*?>(.+?)</table>.*?" //
|
||||
+ "(?:<table cellspacing=\"0\" class=\"hafasResult\".*?>(.+?)</table>|(verkehren an dieser Haltestelle keine))"//
|
||||
+ "|(Eingabe kann nicht interpretiert))" //
|
||||
+ "|(Eingabe kann nicht interpretiert)|(Verbindung zum Server konnte leider nicht hergestellt werden))" //
|
||||
+ ".*?" //
|
||||
, Pattern.DOTALL);
|
||||
private static final Pattern P_DEPARTURES_HEAD_FINE = Pattern.compile(".*?" //
|
||||
|
@ -108,6 +108,8 @@ public class OebbProvider implements NetworkProvider
|
|||
return new QueryDeparturesResult(uri, Status.NO_INFO);
|
||||
else 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 Matcher mHeadFine = P_DEPARTURES_HEAD_FINE.matcher(mHeadCoarse.group(1));
|
||||
if (mHeadFine.matches())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue