mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 00:30:31 +00:00
NetworkProvider: queryTrips() now uses a TripOptions field for products, optimize, walkSpeed, accessibilty and options.
The old queryTrips() variant is now deprecated.
This commit is contained in:
parent
af94ee8724
commit
79ff93b80f
23 changed files with 263 additions and 208 deletions
|
@ -67,6 +67,7 @@ import de.schildbach.pte.dto.Stop;
|
|||
import de.schildbach.pte.dto.SuggestLocationsResult;
|
||||
import de.schildbach.pte.dto.SuggestedLocation;
|
||||
import de.schildbach.pte.dto.Trip;
|
||||
import de.schildbach.pte.dto.TripOptions;
|
||||
import de.schildbach.pte.exception.ParserException;
|
||||
import de.schildbach.pte.util.ParserUtils;
|
||||
|
||||
|
@ -148,10 +149,9 @@ public abstract class AbstractHafasClientInterfaceProvider extends AbstractHafas
|
|||
|
||||
@Override
|
||||
public QueryTripsResult queryTrips(final Location from, final @Nullable Location via, final Location to,
|
||||
final Date date, final boolean dep, final @Nullable Set<Product> products,
|
||||
final @Nullable Optimize optimize, final @Nullable WalkSpeed walkSpeed,
|
||||
final @Nullable Accessibility accessibility, final @Nullable Set<Option> options) throws IOException {
|
||||
return jsonTripSearch(from, via, to, date, dep, products, walkSpeed, null);
|
||||
final Date date, final boolean dep, final @Nullable TripOptions options) throws IOException {
|
||||
return jsonTripSearch(from, via, to, date, dep, options != null ? options.products : null,
|
||||
options != null ? options.walkSpeed : null, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue