Timetables provide most of the TripPattern functionality. Each TripPattern may possess more than one Timetable when stop time updates are being applied: one for the scheduled stop times, one for each snapshot of updated stop times, another for a working buffer of updated stop times, etc.
TODO OTP2 - Move this to package: org.opentripplanner.model - after as Entur NeTEx PRs are merged. - Also consider moving its dependencies in: org.opentripplanner.routing - The NEW Timetable should not have any dependencies to
| name | data type | description |
|---|---|---|
| pattern | TripPattern | A circular reference between TripPatterns and their scheduled (non-updated) timetables. |
| tripTimes | array of TripTimes | Contains one TripTimes object for each scheduled trip (even cancelled ones) and possibly additional TripTimes objects for unscheduled trips. Frequency entries are stored separately. |
| frequencyEntries | array of FrequencyEntry | Contains one FrequencyEntry object for each block of frequency-based trips. |
| serviceDate | string | The ServiceDate for which this (updated) timetable is valid. If null, then it is valid for all dates. |
| direction | Direction | The direction for all the trips in this pattern. |
| representativeTripTimes | TripTimes |
Example
{
"pattern" : {
"name" : "...",
"route" : {
"agency" : { },
"operator" : { },
"branding" : { },
"groupsOfRoutes" : [ { }, { } ],
"shortName" : "...",
"longName" : { },
"mode" : "FUNICULAR",
"description" : "...",
"gtfsType" : 12345,
"gtfsSortOrder" : 12345,
"netexSubmode" : { },
"url" : "...",
"color" : "...",
"textColor" : "...",
"bikesAllowed" : "NOT_ALLOWED",
"flexibleLineType" : "...",
"name" : "...",
"id" : { }
},
"mode" : "MONORAIL",
"stopPattern" : {
"size" : 12345
},
"geometry" : {
"coordinate" : { },
"boundary" : { },
"empty" : true,
"boundaryDimension" : 12345,
"coordinateSequence" : { },
"coordinates" : [ { }, { } ],
"ring" : true,
"length" : 12345.0,
"numPoints" : 12345,
"closed" : true,
"startPoint" : { },
"endPoint" : { },
"geometryType" : "...",
"dimension" : 12345,
"envelope" : { },
"rectangle" : true,
"centroid" : { },
"simple" : true,
"interiorPoint" : { },
"factory" : { },
"valid" : true,
"precisionModel" : { },
"envelopeInternal" : { },
"area" : 12345.0,
"userData" : { },
"numGeometries" : 12345,
"SRID" : 12345
},
"stops" : [ {
"id" : { },
"geometry" : { },
"lon" : 12345.0,
"parentStation" : { },
"netexVehicleSubmode" : { },
"wheelchairAccessibility" : "NO_INFORMATION",
"stationOrStopId" : { },
"code" : "...",
"timeZone" : "...",
"lat" : 12345.0,
"platformCode" : "...",
"fareZones" : [ { }, { } ],
"index" : 12345,
"description" : { },
"gtfsVehicleType" : "GONDOLA",
"name" : { },
"partOfStation" : true,
"coordinate" : { },
"url" : { },
"priority" : "ALLOWED",
"firstZoneAsString" : "..."
}, {
"id" : { },
"geometry" : { },
"lon" : 12345.0,
"parentStation" : { },
"netexVehicleSubmode" : { },
"wheelchairAccessibility" : "NOT_POSSIBLE",
"stationOrStopId" : { },
"code" : "...",
"timeZone" : "...",
"lat" : 12345.0,
"platformCode" : "...",
"fareZones" : [ { }, { } ],
"index" : 12345,
"description" : { },
"gtfsVehicleType" : "AIRPLANE",
"name" : { },
"partOfStation" : true,
"coordinate" : { },
"url" : { },
"priority" : "RECOMMENDED",
"firstZoneAsString" : "..."
} ],
"direction" : "INBOUND",
"scheduledTimetable" : {
"pattern" : { },
"tripTimes" : [ { }, { } ],
"frequencyEntries" : [ { }, { } ],
"serviceDate" : "...",
"direction" : "UNKNOWN",
"representativeTripTimes" : { }
},
"createdByRealtimeUpdater" : true,
"originalTripPattern" : { },
"tripHeadsign" : { },
"feedId" : "...",
"routingTripPattern" : {
"pattern" : { },
"boardingPossible" : { },
"alightingPossible" : { },
"wheelchairAccessible" : { }
},
"id" : {
"feedId" : "...",
"id" : "..."
}
},
"tripTimes" : [ {
"wheelchairAccessibility" : "POSSIBLE",
"scheduled" : true,
"canceled" : true,
"realTimeState" : "MODIFIED",
"numStops" : 12345,
"serviceCode" : 12345,
"trip" : {
"operator" : { },
"route" : { },
"serviceId" : { },
"shortName" : "...",
"mode" : "TRAM",
"netexSubMode" : { },
"headsign" : { },
"shapeId" : { },
"direction" : "OUTBOUND",
"bikesAllowed" : "UNKNOWN",
"wheelchairBoarding" : "NO_INFORMATION",
"gtfsBlockId" : "...",
"gtfsFareId" : "...",
"netexInternalPlanningCode" : "...",
"netexAlteration" : "EXTRA_JOURNEY",
"id" : { }
}
}, {
"wheelchairAccessibility" : "POSSIBLE",
"scheduled" : true,
"canceled" : true,
"realTimeState" : "UPDATED",
"numStops" : 12345,
"serviceCode" : 12345,
"trip" : {
"operator" : { },
"route" : { },
"serviceId" : { },
"shortName" : "...",
"mode" : "BUS",
"netexSubMode" : { },
"headsign" : { },
"shapeId" : { },
"direction" : "OUTBOUND",
"bikesAllowed" : "ALLOWED",
"wheelchairBoarding" : "NO_INFORMATION",
"gtfsBlockId" : "...",
"gtfsFareId" : "...",
"netexInternalPlanningCode" : "...",
"netexAlteration" : "EXTRA_JOURNEY",
"id" : { }
}
} ],
"frequencyEntries" : [ {
"startTime" : 12345,
"endTime" : 12345,
"headway" : 12345,
"exactTimes" : true,
"tripTimes" : {
"wheelchairAccessibility" : "NOT_POSSIBLE",
"scheduled" : true,
"canceled" : true,
"realTimeState" : "CANCELED",
"numStops" : 12345,
"serviceCode" : 12345,
"trip" : { }
}
}, {
"startTime" : 12345,
"endTime" : 12345,
"headway" : 12345,
"exactTimes" : true,
"tripTimes" : {
"wheelchairAccessibility" : "POSSIBLE",
"scheduled" : true,
"canceled" : true,
"realTimeState" : "ADDED",
"numStops" : 12345,
"serviceCode" : 12345,
"trip" : { }
}
} ],
"serviceDate" : "...",
"direction" : "ANTICLOCKWISE",
"representativeTripTimes" : {
"wheelchairAccessibility" : "NO_INFORMATION",
"scheduled" : true,
"canceled" : true,
"realTimeState" : "ADDED",
"numStops" : 12345,
"serviceCode" : 12345,
"trip" : {
"operator" : { },
"route" : { },
"serviceId" : { },
"shortName" : "...",
"mode" : "RAIL",
"netexSubMode" : { },
"headsign" : { },
"shapeId" : { },
"direction" : "CLOCKWISE",
"bikesAllowed" : "NOT_ALLOWED",
"wheelchairBoarding" : "NOT_POSSIBLE",
"gtfsBlockId" : "...",
"gtfsFareId" : "...",
"netexInternalPlanningCode" : "...",
"netexAlteration" : "CANCELLATION",
"id" : { }
}
}
}