mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-20 17:29:51 +00:00
Default to binary trips query for Hafas based providers.
This commit is contained in:
parent
6527c89c18
commit
8bcdc7aa14
25 changed files with 103 additions and 483 deletions
|
@ -19,7 +19,6 @@ package de.schildbach.pte;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -32,8 +31,6 @@ 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.dto.QueryTripsContext;
|
||||
import de.schildbach.pte.dto.QueryTripsResult;
|
||||
|
||||
/**
|
||||
* @author Andreas Schildbach
|
||||
|
@ -181,12 +178,6 @@ public class VbbProvider extends AbstractHafasProvider
|
|||
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
|
||||
{
|
||||
final StringBuilder uri = new StringBuilder(getStopEndpoint);
|
||||
|
@ -196,23 +187,9 @@ public class VbbProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void appendCustomTripsQueryBinaryUri(final StringBuilder uri)
|
||||
public Collection<Product> defaultProducts()
|
||||
{
|
||||
uri.append("&h2g-direct=11");
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueryTripsResult queryTrips(final Location from, final Location via, final Location to, final Date date, final boolean dep,
|
||||
final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility, final Set<Option> options)
|
||||
throws IOException
|
||||
{
|
||||
return queryTripsBinary(from, via, to, date, dep, products, walkSpeed, accessibility, options);
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueryTripsResult queryMoreTrips(final QueryTripsContext contextObj, final boolean later) throws IOException
|
||||
{
|
||||
return queryMoreTripsBinary(contextObj, later);
|
||||
return ALL_EXCEPT_HIGHSPEED_AND_ONDEMAND;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue