mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-18 16:29:51 +00:00
support product selection for XML API based connection queries
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@706 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
f442cd5ead
commit
e10e60cb41
22 changed files with 630 additions and 5 deletions
|
@ -65,6 +65,53 @@ public class RmvProvider extends AbstractHafasProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
{
|
||||
if (product == 'I')
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // ICE
|
||||
}
|
||||
else if (product == 'R')
|
||||
{
|
||||
productBits.setCharAt(1, '1'); // Zug
|
||||
productBits.setCharAt(2, '1'); // Zug
|
||||
productBits.setCharAt(10, '1'); // Zug
|
||||
}
|
||||
else if (product == 'S')
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // S-Bahn
|
||||
}
|
||||
else if (product == 'U')
|
||||
{
|
||||
productBits.setCharAt(4, '1'); // U-Bahn
|
||||
}
|
||||
else if (product == 'T')
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // Straßenbahn
|
||||
}
|
||||
else if (product == 'B')
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Niederflurbus
|
||||
productBits.setCharAt(7, '1'); // Bus
|
||||
}
|
||||
else if (product == 'P')
|
||||
{
|
||||
productBits.setCharAt(9, '1'); // AST/Rufbus
|
||||
}
|
||||
else if (product == 'F')
|
||||
{
|
||||
productBits.setCharAt(8, '1'); // Fähre/Schiff
|
||||
}
|
||||
else if (product == 'C')
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new IllegalArgumentException("cannot handle: " + product);
|
||||
}
|
||||
}
|
||||
|
||||
private static final String[] PLACES = { "Frankfurt (Main)", "Offenbach (Main)", "Mainz", "Wiesbaden", "Marburg", "Kassel", "Hanau", "Göttingen",
|
||||
"Darmstadt", "Aschaffenburg", "Berlin", "Fulda" };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue