mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-08 11:28:48 +00:00
implemented missing methods
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@770 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
3df0425f5d
commit
959fff56db
1 changed files with 45 additions and 2 deletions
|
@ -87,7 +87,46 @@ public class SeProvider extends AbstractHafasProvider
|
||||||
@Override
|
@Override
|
||||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException();
|
if (product == 'I')
|
||||||
|
{
|
||||||
|
productBits.setCharAt(0, '1'); // Flyg
|
||||||
|
productBits.setCharAt(1, '1'); // Snabbtåg
|
||||||
|
}
|
||||||
|
else if (product == 'R')
|
||||||
|
{
|
||||||
|
productBits.setCharAt(2, '1'); // Tåg
|
||||||
|
productBits.setCharAt(4, '1'); // Lokaltåg
|
||||||
|
}
|
||||||
|
else if (product == 'S')
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else if (product == 'U')
|
||||||
|
{
|
||||||
|
productBits.setCharAt(5, '1'); // Tunnelbana
|
||||||
|
}
|
||||||
|
else if (product == 'T')
|
||||||
|
{
|
||||||
|
productBits.setCharAt(6, '1'); // Spårvagn
|
||||||
|
}
|
||||||
|
else if (product == 'B')
|
||||||
|
{
|
||||||
|
productBits.setCharAt(3, '1'); // Expressbuss
|
||||||
|
productBits.setCharAt(7, '1'); // Buss
|
||||||
|
}
|
||||||
|
else if (product == 'P')
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else if (product == 'F')
|
||||||
|
{
|
||||||
|
productBits.setCharAt(8, '1'); // Båt
|
||||||
|
}
|
||||||
|
else if (product == 'C')
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new IllegalArgumentException("cannot handle: " + product);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Pattern P_SPLIT_NAME_KN = Pattern.compile("(.*?) \\((.*?) kn\\)");
|
private static final Pattern P_SPLIT_NAME_KN = Pattern.compile("(.*?) \\((.*?) kn\\)");
|
||||||
|
@ -163,6 +202,10 @@ public class SeProvider extends AbstractHafasProvider
|
||||||
@Override
|
@Override
|
||||||
protected char normalizeType(final String type)
|
protected char normalizeType(final String type)
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException();
|
final char t = super.normalizeType(type);
|
||||||
|
if (t != 0)
|
||||||
|
return t;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue