mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-10 21:38:48 +00:00
lines that follow pattern BusW/540
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@828 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
442cab8fe8
commit
28fc8bdd36
3 changed files with 6 additions and 9 deletions
|
@ -1749,11 +1749,17 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
}
|
||||
}
|
||||
|
||||
private static final Pattern P_LINE_BUS_SPECIAL = Pattern.compile("Bus([A-Z]/[\\dA-Z]+)");
|
||||
|
||||
protected Line normalizeLine(final String line)
|
||||
{
|
||||
if (line == null || line.length() == 0)
|
||||
return null;
|
||||
|
||||
final Matcher mBusSpecial = P_LINE_BUS_SPECIAL.matcher(line);
|
||||
if (mBusSpecial.matches())
|
||||
return newLine('B' + mBusSpecial.group(1));
|
||||
|
||||
final Matcher m = P_NORMALIZE_LINE.matcher(line);
|
||||
if (m.matches())
|
||||
{
|
||||
|
|
|
@ -567,7 +567,6 @@ public final class BahnProvider extends AbstractHafasProvider
|
|||
return 0;
|
||||
}
|
||||
|
||||
private static final Pattern P_LINE_BUS_SPECIAL = Pattern.compile("Bus([A-Z]/[\\dA-Z]+)");
|
||||
private static final Pattern P_LINE_RUSSIA = Pattern
|
||||
.compile("\\d{3}(?:AJ|BJ|DJ|FJ|GJ|IJ|KJ|LJ|NJ|MJ|OJ|RJ|SJ|TJ|VJ|ZJ|CH|KH|ZH|EI|JA|JI|MZ|SH|PC|Y)");
|
||||
private static final Pattern P_LINE_NUMBER = Pattern.compile("\\d{2,5}");
|
||||
|
@ -578,9 +577,6 @@ public final class BahnProvider extends AbstractHafasProvider
|
|||
if ("Schw-B".equals(line)) // Schwebebahn, gilt als "Straßenbahn besonderer Bauart"
|
||||
return newLine('T' + line);
|
||||
|
||||
if (P_LINE_BUS_SPECIAL.matcher(line).matches())
|
||||
return newLine('B' + line);
|
||||
|
||||
if (P_LINE_RUSSIA.matcher(line).matches())
|
||||
return newLine('R' + line);
|
||||
|
||||
|
|
|
@ -894,7 +894,6 @@ public final class BvgProvider extends AbstractHafasProvider
|
|||
private static final Pattern P_LINE_REGIONAL = Pattern.compile("Zug\\s+(\\d+)");
|
||||
private static final Pattern P_LINE_TRAM = Pattern.compile("Tram?\\s+([\\dA-Z/-]+)");
|
||||
private static final Pattern P_LINE_BUS = Pattern.compile("Bus\\s+([\\dA-Z/-]+)");
|
||||
private static final Pattern P_LINE_BUS_SPECIAL = Pattern.compile("Bus([A-F]/\\d+)");
|
||||
private static final Pattern P_LINE_FERRY = Pattern.compile("F\\d+|WT");
|
||||
private static final Pattern P_LINE_NUMBER = Pattern.compile("\\d{4,}");
|
||||
|
||||
|
@ -916,10 +915,6 @@ public final class BvgProvider extends AbstractHafasProvider
|
|||
if (P_LINE_FERRY.matcher(line).matches())
|
||||
return newLine('F' + line);
|
||||
|
||||
final Matcher mBusSpecial = P_LINE_BUS_SPECIAL.matcher(line);
|
||||
if (mBusSpecial.matches())
|
||||
return newLine('B' + mBusSpecial.group(1));
|
||||
|
||||
if (P_LINE_NUMBER.matcher(line).matches())
|
||||
return newLine('R' + line);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue