VVO: Chemnitz 'C' lines

This commit is contained in:
Andreas Schildbach 2023-01-21 14:34:48 +01:00
parent 0de9148dfe
commit 8b4b8861ba

View file

@ -26,6 +26,8 @@ import de.schildbach.pte.dto.Product;
import okhttp3.HttpUrl;
import java.util.regex.Pattern;
/**
* @author Andreas Schildbach
*/
@ -44,6 +46,8 @@ public class VvoProvider extends AbstractEfaProvider {
setSessionCookieName("VVO-EFA");
}
private static final Pattern P_C_LINE = Pattern.compile("C\\d{1,2}");
@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,
@ -69,6 +73,9 @@ public class VvoProvider extends AbstractEfaProvider {
if ("RB 71".equals(symbol))
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)
return new Line(id, network, Product.BUS, trainName);
}