mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 16:59:51 +00:00
unknown lines
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@89 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
d7c3ba543a
commit
990202fc29
1 changed files with 3 additions and 0 deletions
|
@ -583,6 +583,7 @@ public class MvvProvider implements NetworkProvider
|
|||
private static final Pattern P_NORMALIZE_LINE_STADTBUS = Pattern.compile("1\\d{2}");
|
||||
private static final Pattern P_NORMALIZE_LINE_NACHTBUS = Pattern.compile("N[48]\\d");
|
||||
private static final Pattern P_NORMALIZE_LINE_REGIONALBUS = Pattern.compile("\\d{3}[A-Z]?");
|
||||
private static final Pattern P_NORMALIZE_LINE_NUMBER = Pattern.compile("\\d{4}");
|
||||
|
||||
private String normalizeLine(final String product, final String line)
|
||||
{
|
||||
|
@ -630,6 +631,8 @@ public class MvvProvider implements NetworkProvider
|
|||
return "I" + line;
|
||||
if (line.startsWith("CNL "))
|
||||
return "I" + line;
|
||||
if (P_NORMALIZE_LINE_NUMBER.matcher(line).matches())
|
||||
return "?" + line;
|
||||
|
||||
throw new IllegalStateException("cannot normalize null product, line " + line);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue