mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-13 16:20:34 +00:00
Fix products for Belgium
This commit is contained in:
parent
40871c35b7
commit
2bc8d7cd87
1 changed files with 22 additions and 0 deletions
|
@ -56,6 +56,27 @@ public class SncbProvider extends AbstractHafasProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected char intToProduct(final int value)
|
||||
{
|
||||
if (value == 1)
|
||||
return 'I';
|
||||
if (value == 4)
|
||||
return 'I';
|
||||
if (value == 32)
|
||||
return 'B';
|
||||
if (value == 64)
|
||||
return 'R';
|
||||
if (value == 256)
|
||||
return 'U';
|
||||
if (value == 512)
|
||||
return 'B';
|
||||
if (value == 1024)
|
||||
return 'T';
|
||||
|
||||
throw new IllegalArgumentException("cannot handle: " + value);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
|
@ -78,6 +99,7 @@ public class SncbProvider extends AbstractHafasProvider
|
|||
}
|
||||
else if (product == Product.BUS || product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // Bus
|
||||
productBits.setCharAt(9, '1'); // Bus
|
||||
}
|
||||
else if (product == Product.FERRY || product == Product.CABLECAR)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue