mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 22:28:51 +00:00
VVO: Chemnitz 'C' lines
This commit is contained in:
parent
0de9148dfe
commit
8b4b8861ba
1 changed files with 7 additions and 0 deletions
|
@ -26,6 +26,8 @@ import de.schildbach.pte.dto.Product;
|
||||||
|
|
||||||
import okhttp3.HttpUrl;
|
import okhttp3.HttpUrl;
|
||||||
|
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
*/
|
*/
|
||||||
|
@ -44,6 +46,8 @@ public class VvoProvider extends AbstractEfaProvider {
|
||||||
setSessionCookieName("VVO-EFA");
|
setSessionCookieName("VVO-EFA");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final Pattern P_C_LINE = Pattern.compile("C\\d{1,2}");
|
||||||
|
|
||||||
@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,
|
||||||
final @Nullable String symbol, final @Nullable String name, final @Nullable String longName,
|
final @Nullable String symbol, final @Nullable String name, final @Nullable String longName,
|
||||||
|
@ -69,6 +73,9 @@ public class VvoProvider extends AbstractEfaProvider {
|
||||||
if ("RB 71".equals(symbol))
|
if ("RB 71".equals(symbol))
|
||||||
return new Line(id, network, Product.REGIONAL_TRAIN, "RB71");
|
return new Line(id, network, Product.REGIONAL_TRAIN, "RB71");
|
||||||
|
|
||||||
|
if (P_C_LINE.matcher(symbol).matches())
|
||||||
|
return new Line(id, network, Product.TRAM, symbol);
|
||||||
|
|
||||||
if ("Fernbus".equals(trainName) && trainNum == null)
|
if ("Fernbus".equals(trainName) && trainNum == null)
|
||||||
return new Line(id, network, Product.BUS, trainName);
|
return new Line(id, network, Product.BUS, trainName);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue