mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-17 12:29:49 +00:00
De-select 'on demand' by default for Brandenburg
This commit is contained in:
parent
0cf4832aed
commit
d8ca50189d
1 changed files with 15 additions and 0 deletions
|
@ -20,6 +20,7 @@ package de.schildbach.pte;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
|
@ -41,6 +42,14 @@ public class VbbProvider extends AbstractHafasProvider
|
||||||
{
|
{
|
||||||
public static final NetworkId NETWORK_ID = NetworkId.VBB;
|
public static final NetworkId NETWORK_ID = NetworkId.VBB;
|
||||||
private static final String API_BASE = "http://fahrinfo.vbb.de/bin/";
|
private static final String API_BASE = "http://fahrinfo.vbb.de/bin/";
|
||||||
|
private static final Set<Product> ALL_EXCEPT_HIGHSPEED_AND_ONDEMAND;
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
ALL_EXCEPT_HIGHSPEED_AND_ONDEMAND = new HashSet<Product>(Product.ALL);
|
||||||
|
ALL_EXCEPT_HIGHSPEED_AND_ONDEMAND.remove(Product.HIGH_SPEED_TRAIN);
|
||||||
|
ALL_EXCEPT_HIGHSPEED_AND_ONDEMAND.remove(Product.ON_DEMAND);
|
||||||
|
}
|
||||||
|
|
||||||
public VbbProvider()
|
public VbbProvider()
|
||||||
{
|
{
|
||||||
|
@ -172,6 +181,12 @@ public class VbbProvider extends AbstractHafasProvider
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
return xmlQueryDepartures(uri.toString(), stationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<Product> defaultProducts()
|
||||||
|
{
|
||||||
|
return ALL_EXCEPT_HIGHSPEED_AND_ONDEMAND;
|
||||||
|
}
|
||||||
|
|
||||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||||
{
|
{
|
||||||
final StringBuilder uri = new StringBuilder(getStopEndpoint);
|
final StringBuilder uri = new StringBuilder(getStopEndpoint);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue