Migrate network IDs to constant field.

This commit is contained in:
Andreas Schildbach 2015-02-09 09:57:45 +01:00
parent 695fc56d8e
commit cf651676d2
70 changed files with 130 additions and 480 deletions

View file

@ -37,23 +37,18 @@ import de.schildbach.pte.geo.Berlin;
*/
public final class BvgProvider extends AbstractHafasProvider
{
public static final NetworkId NETWORK_ID = NetworkId.BVG;
private static final String API_BASE = "http://fahrinfo.bvg.de/Fahrinfo/bin/";
private static final String API_BASE_STATION_BOARD = "http://bvg.hafas.de/bin/";
public BvgProvider()
{
super(API_BASE_STATION_BOARD + "stboard.exe/dn", API_BASE + "ajax-getstop.bin/dny", API_BASE + "query.bin/dn", 8, Charsets.UTF_8);
super(NetworkId.BVG, API_BASE_STATION_BOARD + "stboard.exe/dn", API_BASE + "ajax-getstop.bin/dny", API_BASE + "query.bin/dn", 8,
Charsets.UTF_8);
setJsonGetStopsUseWeight(false);
setStyles(STYLES);
}
public NetworkId id()
{
return NETWORK_ID;
}
@Override
protected Product intToProduct(final int value)
{