mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 08:49:58 +00:00
update api base for Brandenburg
This commit is contained in:
parent
2115628e0e
commit
8f5c96f661
1 changed files with 23 additions and 2 deletions
|
@ -34,11 +34,11 @@ import de.schildbach.pte.util.ParserUtils;
|
|||
public class VbbProvider extends AbstractHafasProvider
|
||||
{
|
||||
public static final NetworkId NETWORK_ID = NetworkId.VBB;
|
||||
private static final String API_BASE = "http://www.vbb-fahrinfo.de/hafas/";
|
||||
private static final String API_BASE = "http://fahrinfo.vbb.de/bin/";
|
||||
|
||||
public VbbProvider()
|
||||
{
|
||||
super(API_BASE + "query.exe/dn", 7, null);
|
||||
super(API_BASE + "query.exe/dn", 7, null, UTF_8, UTF_8);
|
||||
}
|
||||
|
||||
public NetworkId id()
|
||||
|
@ -55,6 +55,27 @@ public class VbbProvider extends AbstractHafasProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected char intToProduct(final int value)
|
||||
{
|
||||
if (value == 1)
|
||||
return 'S';
|
||||
if (value == 2)
|
||||
return 'U';
|
||||
if (value == 4)
|
||||
return 'T';
|
||||
if (value == 8)
|
||||
return 'B';
|
||||
if (value == 16)
|
||||
return 'F';
|
||||
if (value == 32)
|
||||
return 'I';
|
||||
if (value == 64)
|
||||
return 'R';
|
||||
|
||||
throw new IllegalArgumentException("cannot handle: " + value);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue