KVV: Remove obsolete line name normalization.

This commit is contained in:
Andreas Schildbach 2018-12-10 14:39:04 +01:00
parent df3bb04c13
commit 1841e97875

View file

@ -19,8 +19,6 @@ package de.schildbach.pte;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.annotation.Nullable;
@ -50,8 +48,6 @@ public class KvvProvider extends AbstractEfaProvider {
setSessionCookieName("HASESSIONID");
}
private static final Pattern P_LINE = Pattern.compile("(.*?)\\s+\\([\\w/]+\\)", Pattern.CASE_INSENSITIVE);
@Override
protected Line parseLine(final @Nullable String id, final @Nullable String network, final @Nullable String mot,
@Nullable String symbol, @Nullable String name, @Nullable String longName, final @Nullable String trainType,
@ -61,24 +57,6 @@ public class KvvProvider extends AbstractEfaProvider {
return new Line(id, network, Product.BUS, symbol);
}
if (symbol != null) {
final Matcher m = P_LINE.matcher(symbol);
if (m.matches())
symbol = m.group(1);
}
if (name != null) {
final Matcher m = P_LINE.matcher(name);
if (m.matches())
name = m.group(1);
}
if (longName != null) {
final Matcher m = P_LINE.matcher(longName);
if (m.matches())
longName = m.group(1);
}
return super.parseLine(id, network, mot, symbol, name, longName, trainType, trainNum, trainName);
}