mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 17:39:49 +00:00
more lines
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@235 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
b5d2f81b1a
commit
dcf181c0c3
1 changed files with 20 additions and 0 deletions
|
@ -174,8 +174,10 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
|||
private static final Pattern P_LINE_RE = Pattern.compile("RE\\d+");
|
||||
private static final Pattern P_LINE_RB = Pattern.compile("RB\\d+");
|
||||
private static final Pattern P_LINE_VB = Pattern.compile("VB\\d+");
|
||||
private static final Pattern P_LINE_OE = Pattern.compile("OE\\d+");
|
||||
private static final Pattern P_LINE_R = Pattern.compile("R\\d+(/R\\d+|\\(z\\))?");
|
||||
private static final Pattern P_LINE_U = Pattern.compile("U\\d+");
|
||||
private static final Pattern P_LINE_NUMBER = Pattern.compile("\\d+");
|
||||
|
||||
protected String parseLine(final String number, final String symbol, final String mot)
|
||||
{
|
||||
|
@ -250,6 +252,8 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
|||
return 'R' + str;
|
||||
if (type.equals("OE")) // Ostdeutsche Eisenbahn
|
||||
return 'R' + str;
|
||||
if (P_LINE_OE.matcher(type).matches())
|
||||
return 'R' + str;
|
||||
if (type.equals("MR")) // Märkische Regiobahn
|
||||
return 'R' + str;
|
||||
if (type.equals("OLA")) // Ostseeland Verkehr
|
||||
|
@ -360,9 +364,23 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
|||
return 'R' + str;
|
||||
if (type.equals("KBS")) // Kursbuchstrecke
|
||||
return 'R' + str;
|
||||
if (type.equals("Zug"))
|
||||
return 'R' + str;
|
||||
if (type.equals("ÖBB"))
|
||||
return 'R' + str;
|
||||
if (type.equals("CD"))
|
||||
return 'R' + str;
|
||||
if (type.equals("PR"))
|
||||
return 'R' + str;
|
||||
if (type.equals("KD")) // Koleje Dolnośląskie (Niederschlesische Eisenbahn)
|
||||
return 'R' + str;
|
||||
if (type.equals("VIAMO"))
|
||||
return 'R' + str;
|
||||
|
||||
if (type.equals("BSB")) // Breisgau-S-Bahn
|
||||
return 'S' + str;
|
||||
if (type.equals("RER")) // Réseau Express Régional, Frankreich
|
||||
return 'S' + str;
|
||||
|
||||
if (P_LINE_U.matcher(type).matches())
|
||||
return 'U' + str;
|
||||
|
@ -374,6 +392,8 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
|||
|
||||
if (type.length() == 0)
|
||||
return "?";
|
||||
if (P_LINE_NUMBER.matcher(type).matches())
|
||||
return "?";
|
||||
|
||||
throw new IllegalArgumentException("cannot normalize: " + number);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue