public class TimetableSnapshot extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
TimetableSnapshot.SortedTimetableComparator |
protected class |
TimetableSnapshot.TripIdAndServiceDate
Class to use as key in HashMap containing trip id and service date
|
Constructor and Description |
---|
TimetableSnapshot() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear all data of snapshot
|
TimetableSnapshot |
commit()
This produces a small delay of typically around 50ms, which is almost entirely due to
the indexing step.
|
TimetableSnapshot |
commit(boolean force) |
TripPattern |
getLastAddedTripPattern(String tripId,
org.onebusaway.gtfs.model.calendar.ServiceDate serviceDate)
Get the last added trip pattern given a trip id (without agency) and a service date as
a result of a call to
update(TripPattern, TripTimes, ServiceDate) with trip times of
a trip that didn't exist yet in the trip pattern. |
boolean |
isDirty() |
boolean |
purgeExpiredData(org.onebusaway.gtfs.model.calendar.ServiceDate serviceDate)
Removes all Timetables which are valid for a ServiceDate on-or-before the one supplied.
|
Timetable |
resolve(TripPattern pattern,
org.onebusaway.gtfs.model.calendar.ServiceDate serviceDate)
Returns an updated timetable for the specified pattern if one is available in this snapshot,
or the originally scheduled timetable if there are no updates in this snapshot.
|
String |
toString() |
boolean |
update(TripPattern pattern,
TripTimes updatedTripTimes,
org.onebusaway.gtfs.model.calendar.ServiceDate serviceDate)
Update the trip times of one trip in a timetable of a trip pattern.
|
public Timetable resolve(TripPattern pattern, org.onebusaway.gtfs.model.calendar.ServiceDate serviceDate)
public TripPattern getLastAddedTripPattern(String tripId, org.onebusaway.gtfs.model.calendar.ServiceDate serviceDate)
update(TripPattern, TripTimes, ServiceDate)
with trip times of
a trip that didn't exist yet in the trip pattern.tripId
- trip id (without agency)serviceDate
- service datepublic boolean update(TripPattern pattern, TripTimes updatedTripTimes, org.onebusaway.gtfs.model.calendar.ServiceDate serviceDate)
pattern
- trip patternupdatedTripTimes
- updated trip timesserviceDate
- service day for which this update is validpublic TimetableSnapshot commit()
public TimetableSnapshot commit(boolean force)
public void clear()
public boolean purgeExpiredData(org.onebusaway.gtfs.model.calendar.ServiceDate serviceDate)
public boolean isDirty()
Copyright © 2015. All rights reserved.