mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-15 09:00:36 +00:00
Update API base and fix products for Bremen, Bremerhaven & Osnabrück.
This commit is contained in:
parent
05b5a56cd5
commit
f0a665076a
1 changed files with 30 additions and 3 deletions
|
@ -25,13 +25,13 @@ import de.schildbach.pte.dto.Product;
|
||||||
public class VbnProvider extends AbstractHafasProvider
|
public class VbnProvider extends AbstractHafasProvider
|
||||||
{
|
{
|
||||||
public static final NetworkId NETWORK_ID = NetworkId.VBN;
|
public static final NetworkId NETWORK_ID = NetworkId.VBN;
|
||||||
private static final String API_BASE = "http://www.fahrplaner.de/hafas/";
|
private static final String API_BASE = "http://fahrplaner.vbn.de/hafas/";
|
||||||
|
|
||||||
public VbnProvider()
|
public VbnProvider()
|
||||||
{
|
{
|
||||||
super(API_BASE + "stboard.exe/dn", API_BASE + "ajax-getstop.exe/dny", API_BASE + "query.exe/dn", 10);
|
super(API_BASE + "stboard.exe/dn", API_BASE + "ajax-getstop.exe/dny", API_BASE + "query.exe/dn", 10, UTF_8);
|
||||||
|
|
||||||
setStationBoardHasStationTable(false);
|
setStationBoardHasStationTable(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public NetworkId id()
|
public NetworkId id()
|
||||||
|
@ -39,6 +39,33 @@ public class VbnProvider extends AbstractHafasProvider
|
||||||
return NETWORK_ID;
|
return NETWORK_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected char intToProduct(final int value)
|
||||||
|
{
|
||||||
|
if (value == 1)
|
||||||
|
return 'I';
|
||||||
|
if (value == 2)
|
||||||
|
return 'I';
|
||||||
|
if (value == 4)
|
||||||
|
return 'R';
|
||||||
|
if (value == 8)
|
||||||
|
return 'R';
|
||||||
|
if (value == 16)
|
||||||
|
return 'S';
|
||||||
|
if (value == 32)
|
||||||
|
return 'B';
|
||||||
|
if (value == 64)
|
||||||
|
return 'F';
|
||||||
|
if (value == 128)
|
||||||
|
return 'U';
|
||||||
|
if (value == 256)
|
||||||
|
return 'T';
|
||||||
|
if (value == 512)
|
||||||
|
return 'P';
|
||||||
|
|
||||||
|
throw new IllegalArgumentException("cannot handle: " + value);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue