Skip to content

Commit

Permalink
Clean up after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Jun 3, 2024
1 parent f2c82fb commit 410284c
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.opentripplanner.transit.model.timetable.TripOnServiceDate;
import org.opentripplanner.transit.model.timetable.TripTimes;
import org.opentripplanner.transit.model.timetable.TripTimesFactory;
import org.opentripplanner.transit.model.timetable.TripTimesStringBuilder;
import org.opentripplanner.transit.service.DefaultTransitService;
import org.opentripplanner.transit.service.StopModel;
import org.opentripplanner.transit.service.TransitModel;
Expand Down Expand Up @@ -207,6 +208,32 @@ public TimetableSnapshot getTimetableSnapshot() {
}
}

public String getRealtimeTimetable(String tripId) {
return getRealtimeTimetable(id(tripId), SERVICE_DATE);
}

public String getRealtimeTimetable(Trip trip) {
return getRealtimeTimetable(trip.getId(), SERVICE_DATE);
}

public String getRealtimeTimetable(FeedScopedId tripId, LocalDate serviceDate) {
var tt = getTripTimesForTrip(tripId, serviceDate);
var pattern = getPatternForTrip(tripId);

return TripTimesStringBuilder.encodeTripTimes(tt, pattern);
}

public String getScheduledTimetable(String tripId) {
return getScheduledTimetable(id(tripId));
}

public String getScheduledTimetable(FeedScopedId tripId) {
var pattern = getPatternForTrip(tripId);
var tt = pattern.getScheduledTimetable().getTripTimes(tripId);

return TripTimesStringBuilder.encodeTripTimes(tt, pattern);
}

// SIRI updates

public UpdateResult applyEstimatedTimetableWithFuzzyMatcher(
Expand Down

0 comments on commit 410284c

Please sign in to comment.