mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-15 09:00:36 +00:00
parse one more 'service down' message
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@114 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
5052532dc9
commit
e28029c8df
1 changed files with 7 additions and 6 deletions
|
@ -363,11 +363,12 @@ public class SbbProvider implements NetworkProvider
|
|||
|
||||
private static final Pattern P_DEPARTURES_HEAD_COARSE = Pattern.compile(".*?" //
|
||||
+ "(?:" //
|
||||
+ "<p class=\"qs\">\n(.+?)\n</p>.*?" //
|
||||
+ "(?:(.+)|(an dieser Haltestelle keines)).*?" //
|
||||
+ "<p class=\"qs\">\n(.+?)\n</p>.*?" // head
|
||||
+ "(?:(.+)|(an dieser Haltestelle keines)).*?" // departures
|
||||
+ "<p class=\"links\">\n(.+?)\n</p>" //
|
||||
+ "|(Informationen zu)|(Verbindung zum Server konnte leider nicht hergestellt werden))" //
|
||||
+ ".*?" //
|
||||
+ "|(Informationen zu)" // messages
|
||||
+ "|(Verbindung zum Server konnte leider nicht hergestellt werden|kann vom Server derzeit leider nicht bearbeitet werden)" // messages
|
||||
+ ").*?" //
|
||||
, Pattern.DOTALL);
|
||||
private static final Pattern P_DEPARTURES_HEAD_FINE = Pattern.compile("" //
|
||||
+ "<b>(.*?)</b><br />\n" // location
|
||||
|
@ -494,8 +495,6 @@ public class SbbProvider implements NetworkProvider
|
|||
|
||||
private static char normalizeType(final String type)
|
||||
{
|
||||
// TODO ARZ
|
||||
|
||||
final String ucType = type.toUpperCase();
|
||||
|
||||
if (ucType.equals("EC")) // EuroCity
|
||||
|
@ -536,6 +535,8 @@ public class SbbProvider implements NetworkProvider
|
|||
return 'I';
|
||||
if (ucType.equals("FYR")) // Fyra, Amsterdam-Schiphol-Rotterdam
|
||||
return 'I';
|
||||
if (ucType.equals("ARZ")) // Frankreich, Nacht
|
||||
return 'I';
|
||||
|
||||
if (ucType.equals("R"))
|
||||
return 'R';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue