git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@931 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2012-01-30 23:01:47 +00:00
parent 156b4d9097
commit dec41ee91b
2 changed files with 4 additions and 23 deletions

View file

@ -1753,8 +1753,6 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
return 'B';
if ("LT".equals(ucType)) // Linien-Taxi
return 'B';
if ("BUVB".equals(ucType)) // BuVB
return 'B';
// if ("N".equals(normalizedType)) // Nachtbus
// return "B" + normalizedName;

View file

@ -310,31 +310,12 @@ public class RmvProvider extends AbstractHafasProvider
@Override
protected Line parseLineWithoutType(final String line)
{
if (line == null || line.length() == 0)
return null;
final Matcher m = P_NORMALIZE_LINE.matcher(line);
if (m.matches())
{
final String type = m.group(1);
final String number = m.group(2).replace(" ", "");
if (type.startsWith("Bus"))
return newLine("B" + type.substring(3) + number);
final char normalizedType = normalizeType(type);
if (normalizedType != 0)
return newLine(normalizedType + type + number);
throw new IllegalStateException("cannot normalize type '" + type + "' number '" + number + "' line '" + line + "'");
}
if ("11".equals(line))
return newLine("T11");
if ("12".equals(line))
return newLine("T12");
throw new IllegalStateException("cannot normalize line '" + line + "'");
return super.parseLineWithoutType(line);
}
@Override
@ -347,7 +328,9 @@ public class RmvProvider extends AbstractHafasProvider
if ("B".equals(ucType))
return 'B';
if ("BuFB".equals(ucType))
if ("BUFB".equals(ucType)) // BuFB
return 'B';
if ("BUVB".equals(ucType)) // BuVB
return 'B';
if ("LTAXI".equals(ucType))
return 'B';