mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 06:08:52 +00:00
VBB: normalize some fares
This commit is contained in:
parent
11b3908135
commit
0a98f7c3cf
1 changed files with 14 additions and 2 deletions
|
@ -22,6 +22,7 @@ import java.util.Set;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import de.schildbach.pte.dto.Fare;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
|
|
||||||
import okhttp3.HttpUrl;
|
import okhttp3.HttpUrl;
|
||||||
|
@ -103,8 +104,19 @@ public class VbbProvider extends AbstractHafasClientInterfaceProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String normalizeFareName(final String fareName) {
|
protected String normalizeFareName(String name) {
|
||||||
return fareName.replaceAll("Tarifgebiet ", "");
|
name = name.replaceAll("Tarifgebiet ", "");
|
||||||
|
name = name.replaceAll("Einzelfahrausweis", "Einzel");
|
||||||
|
name = name.replaceAll("24-Stunden-Karte", "24 Stunden");
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean hideFare(final Fare fare) {
|
||||||
|
final String name = fare.name;
|
||||||
|
if (name.contains("Zeitkarte"))
|
||||||
|
return true;
|
||||||
|
return super.hideFare(fare);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue