
org.opentripplanner.street.search.request.StreetSearchRequestMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
The newest version!
package org.opentripplanner.street.search.request;
import java.time.Instant;
import org.opentripplanner.routing.api.request.RouteRequest;
public class StreetSearchRequestMapper {
public static StreetSearchRequestBuilder map(RouteRequest opt) {
return StreetSearchRequest
.of()
.withStartTime(opt.dateTime())
.withPreferences(opt.preferences())
.withWheelchair(opt.wheelchair())
.withFrom(opt.from())
.withTo(opt.to());
}
public static StreetSearchRequestBuilder mapToTransferRequest(RouteRequest opt) {
return StreetSearchRequest
.of()
.withStartTime(Instant.ofEpochSecond(0))
.withPreferences(opt.preferences())
.withWheelchair(opt.wheelchair())
.withMode(opt.journey().transfer().mode());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy