mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-15 09:00:36 +00:00
Fix products for Belgium.
This commit is contained in:
parent
3eed013c47
commit
dc6256df91
1 changed files with 31 additions and 2 deletions
|
@ -59,6 +59,35 @@ public class DsbProvider extends AbstractHafasProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
@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 'B';
|
||||
if (value == 128)
|
||||
return 'B';
|
||||
if (value == 256)
|
||||
return 'B';
|
||||
if (value == 512)
|
||||
return 'F';
|
||||
if (value == 1024)
|
||||
return 'U';
|
||||
|
||||
throw new IllegalArgumentException("cannot handle: " + value);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
|
@ -78,7 +107,7 @@ public class DsbProvider extends AbstractHafasProvider
|
|||
}
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(10, '1'); // U-Bahn
|
||||
productBits.setCharAt(10, '1'); // Metro
|
||||
}
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
|
@ -95,7 +124,7 @@ public class DsbProvider extends AbstractHafasProvider
|
|||
}
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(9, '1'); // Schiff
|
||||
productBits.setCharAt(9, '1'); // Fähre
|
||||
}
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue