Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrects train type for InterCities #302

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/de/schildbach/pte/AbstractEfaProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ protected Line parseLine(final @Nullable String id, final @Nullable String netwo
if (trainName.equals("Nachtbus"))
return new Line(id, network, Product.BUS, str);
if (trainName.equals("Anrufsammeltaxi"))
return new Line(id, network, Product.BUS, str);
return new Line(id, network, Product.ON_DEMAND, str);
if (trainName.equals("Ersatzverkehr"))
return new Line(id, network, Product.BUS, str);
if (trainName.equals("Vienna Airport Lines"))
Expand Down Expand Up @@ -1358,7 +1358,7 @@ protected Line parseLine(final @Nullable String id, final @Nullable String netwo
return new Line(id, network, Product.SUBWAY, name);
} else if ("3".equals(mot) || "4".equals(mot)) {
return new Line(id, network, Product.TRAM, name);
} else if ("5".equals(mot) || "6".equals(mot) || "7".equals(mot) || "10".equals(mot)) {
} else if ("5".equals(mot) || "6".equals(mot) || "7".equals(mot)) {
if ("Schienenersatzverkehr".equals(name))
return new Line(id, network, Product.BUS, "SEV");
else
Expand All @@ -1367,6 +1367,8 @@ protected Line parseLine(final @Nullable String id, final @Nullable String netwo
return new Line(id, network, Product.CABLECAR, name);
} else if ("9".equals(mot)) {
return new Line(id, network, Product.FERRY, name);
} else if ("10".equals(mot)) {
return new Line(id, network, Product.ON_DEMAND, name);
} else if ("11".equals(mot)) {
return new Line(id, network, null, ParserUtils.firstNotEmpty(symbol, name));
} else if ("13".equals(mot)) {
Expand Down
6 changes: 3 additions & 3 deletions src/de/schildbach/pte/VgnProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ protected Line parseLine(final @Nullable String id, final @Nullable String netwo
final @Nullable String trainType, final @Nullable String trainNum, final @Nullable String trainName) {
if ("0".equals(mot)) {
if ("R5(z)".equals(trainNum))
return new Line(id, network, Product.REGIONAL_TRAIN, "R5(z)");
return new Line(id, network, Product.HIGH_SPEED_TRAIN, "R5(z)");
if ("R7(z)".equals(trainNum))
return new Line(id, network, Product.REGIONAL_TRAIN, "R7(z)");
return new Line(id, network, Product.HIGH_SPEED_TRAIN, "R7(z)");
if ("R8(z)".equals(trainNum))
return new Line(id, network, Product.REGIONAL_TRAIN, "R8(z)");
return new Line(id, network, Product.HIGH_SPEED_TRAIN, "R8(z)");
}

return super.parseLine(id, network, mot, symbol, name, longName, trainType, trainNum, trainName);
Expand Down