mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-06 15:18:49 +00:00
AbstractEfaProvider: Unify handling of mot 13.
This commit is contained in:
parent
e12aa6e684
commit
04f70e03b3
3 changed files with 1 additions and 16 deletions
|
@ -1423,7 +1423,7 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
|
|||
} else if ("11".equals(mot)) {
|
||||
return new Line(id, network, null, ParserUtils.firstNotEmpty(symbol, name));
|
||||
} else if ("13".equals(mot)) {
|
||||
if (("S-Bahn".equals(trainName) || (longName != null && longName.startsWith("S-Bahn"))) && symbol != null)
|
||||
if (symbol != null)
|
||||
return new Line(id, network, Product.SUBURBAN_TRAIN, symbol);
|
||||
} else if ("17".equals(mot)) {
|
||||
if (trainNum == null && trainName != null && trainName.startsWith("Schienenersatz"))
|
||||
|
|
|
@ -49,18 +49,6 @@ public class MerseyProvider extends AbstractEfaProvider {
|
|||
return Product.ALL;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Line parseLine(final @Nullable String id, final @Nullable String network, final @Nullable String mot,
|
||||
final @Nullable String symbol, final @Nullable String name, final @Nullable String longName,
|
||||
final @Nullable String trainType, final @Nullable String trainNum, final @Nullable String trainName) {
|
||||
if ("13".equals(mot)) {
|
||||
if ("OO".equals(trainType) || "Ordinary passenger (o.pas.)".equals(trainName))
|
||||
return new Line(id, network, Product.REGIONAL_TRAIN, "OO" + Strings.nullToEmpty(trainNum));
|
||||
}
|
||||
|
||||
return super.parseLine(id, network, mot, symbol, name, longName, trainType, trainNum, trainName);
|
||||
}
|
||||
|
||||
private static final Pattern P_POSITION_BOUND = Pattern.compile("([NESW]+)-bound", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
@Override
|
||||
|
|
|
@ -71,9 +71,6 @@ public class TlemProvider extends AbstractEfaProvider {
|
|||
if ("1".equals(mot)) {
|
||||
if (trainType == null && ("DLR".equals(trainNum) || "Light Railway".equals(trainName)))
|
||||
return new Line(id, network, Product.SUBURBAN_TRAIN, "DLR");
|
||||
} else if ("13".equals(mot)) {
|
||||
if ("OO".equals(trainType) || "Ordinary passenger (o.pas.)".equals(trainName))
|
||||
return new Line(id, network, Product.REGIONAL_TRAIN, "OO" + Strings.nullToEmpty(trainNum));
|
||||
}
|
||||
|
||||
return super.parseLine(id, network, mot, symbol, name, longName, trainType, trainNum, trainName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue