mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-18 08:19:51 +00:00
use Product enum in queryConnections()
This commit is contained in:
parent
9653a0420f
commit
29f719db5a
97 changed files with 547 additions and 376 deletions
|
@ -26,6 +26,7 @@ import java.util.regex.Pattern;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.util.ParserUtils;
|
||||
|
||||
|
@ -78,37 +79,37 @@ public class VbbProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(5, '1');
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(6, '1');
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1');
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(1, '1');
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(2, '1');
|
||||
}
|
||||
else if (product == 'B' || product == 'P')
|
||||
else if (product == Product.BUS || product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(3, '1');
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(4, '1');
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue