mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 23:28:48 +00:00
special handling for Tunnelbana
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@922 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
af6a358e6a
commit
5eb81d40ae
1 changed files with 5 additions and 0 deletions
|
@ -201,6 +201,7 @@ public class SeProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Pattern P_NORMALIZE_LINE_BUS = Pattern.compile("Buss\\s*(.*)");
|
private static final Pattern P_NORMALIZE_LINE_BUS = Pattern.compile("Buss\\s*(.*)");
|
||||||
|
private static final Pattern P_NORMALIZE_LINE_SUBWAY = Pattern.compile("Tunnelbana\\s*(.*)");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Line parseLineAndType(final String line)
|
protected Line parseLineAndType(final String line)
|
||||||
|
@ -209,6 +210,10 @@ public class SeProvider extends AbstractHafasProvider
|
||||||
if (mBus.matches())
|
if (mBus.matches())
|
||||||
return newLine('B' + mBus.group(1));
|
return newLine('B' + mBus.group(1));
|
||||||
|
|
||||||
|
final Matcher mSubway = P_NORMALIZE_LINE_SUBWAY.matcher(line);
|
||||||
|
if (mSubway.matches())
|
||||||
|
return newLine("UT" + mSubway.group(1));
|
||||||
|
|
||||||
return newLine('?' + line);
|
return newLine('?' + line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue