mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-18 16:29:51 +00:00
KVV: Remove obsolete line name normalization.
This commit is contained in:
parent
df3bb04c13
commit
1841e97875
1 changed files with 0 additions and 22 deletions
|
@ -19,8 +19,6 @@ package de.schildbach.pte;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
@ -50,8 +48,6 @@ public class KvvProvider extends AbstractEfaProvider {
|
||||||
setSessionCookieName("HASESSIONID");
|
setSessionCookieName("HASESSIONID");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Pattern P_LINE = Pattern.compile("(.*?)\\s+\\([\\w/]+\\)", Pattern.CASE_INSENSITIVE);
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Line parseLine(final @Nullable String id, final @Nullable String network, final @Nullable String mot,
|
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,
|
@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);
|
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);
|
return super.parseLine(id, network, mot, symbol, name, longName, trainType, trainNum, trainName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue