org.opentripplanner.routing.algorithm.raptoradapter.transit.TripSchedule 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
package org.opentripplanner.routing.algorithm.raptoradapter.transit;
import org.opentripplanner.model.TripPattern;
import org.opentripplanner.routing.trippattern.TripTimes;
import org.opentripplanner.transit.raptor.api.transit.RaptorTripSchedule;
import java.time.LocalDate;
/**
* Extension of RaptorTripSchedule passed through Raptor searches to be able to retrieve the
* original trip from the path when creating itineraries.
*/
public interface TripSchedule extends RaptorTripSchedule {
/**
* TODO OTP2 - Add JavaDoc
*/
TripTimes getOriginalTripTimes();
/**
* TODO OTP2 - Add JavaDoc
*/
TripPattern getOriginalTripPattern();
LocalDate getServiceDate();
/**
* Return {@code true} if this trip is not based on a fixed schedule, but instead a
* frequency based scheduled trip. The {@link #frequencyHeadwayInSeconds()} is only defined for
* such trips.
*/
default boolean isFrequencyBasedTrip() { return false; }
/**
* Return the {@code headway} for a frequency based trip. {@code -999} is returned for "normal"
* scheduled trips, but you should not relay on this. Instead, use the
* {@link #isFrequencyBasedTrip()} method to determine the trip type.
*/
default int frequencyHeadwayInSeconds() { return -999; }
}