Timetable Data Type

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

Implemented Interfaces
Serializable
Properties
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 ServiceDate 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.

Example

{
  "pattern" : {
    "name" : "...",
    "route" : {
      "branding" : { },
      "agency" : { },
      "operator" : { },
      "shortName" : "...",
      "longName" : "...",
      "desc" : "...",
      "gtfsType" : 12345,
      "mode" : "TRAM",
      "url" : "...",
      "color" : "...",
      "textColor" : "...",
      "bikesAllowed" : "ALLOWED",
      "sortOrderSet" : true,
      "sortOrder" : 12345,
      "flexibleLineType" : "...",
      "name" : "...",
      "netexSubmode" : "...",
      "id" : { }
    },
    "mode" : "TRAM",
    "netexSubmode" : "...",
    "geometry" : {
      "closed" : true,
      "endPoint" : { },
      "dimension" : 12345,
      "empty" : true,
      "numPoints" : 12345,
      "geometryType" : "...",
      "coordinateSequence" : { },
      "length" : 12345.0,
      "boundaryDimension" : 12345,
      "startPoint" : { },
      "coordinates" : [ { }, { } ],
      "coordinate" : { },
      "boundary" : { },
      "ring" : true,
      "numGeometries" : 12345,
      "precisionModel" : { },
      "interiorPoint" : { },
      "rectangle" : true,
      "area" : 12345.0,
      "envelopeInternal" : { },
      "centroid" : { },
      "factory" : { },
      "SRID" : 12345,
      "simple" : true,
      "userData" : { },
      "envelope" : { },
      "valid" : true
    },
    "stops" : [ {
      "geometry" : { },
      "parentStation" : { },
      "platformCode" : "...",
      "name" : "...",
      "partOfStation" : true,
      "lon" : 12345.0,
      "firstZoneAsString" : "...",
      "description" : "...",
      "vehicleSubmode" : "...",
      "fareZones" : [ { }, { } ],
      "priority" : "PREFERRED",
      "timeZone" : { },
      "url" : "...",
      "code" : "...",
      "wheelchairBoarding" : "POSSIBLE",
      "lat" : 12345.0,
      "id" : { },
      "coordinate" : { },
      "vehicleType" : "GONDOLA"
    }, {
      "geometry" : { },
      "parentStation" : { },
      "platformCode" : "...",
      "name" : "...",
      "partOfStation" : true,
      "lon" : 12345.0,
      "firstZoneAsString" : "...",
      "description" : "...",
      "vehicleSubmode" : "...",
      "fareZones" : [ { }, { } ],
      "priority" : "PREFERRED",
      "timeZone" : { },
      "url" : "...",
      "code" : "...",
      "wheelchairBoarding" : "NOT_POSSIBLE",
      "lat" : 12345.0,
      "id" : { },
      "coordinate" : { },
      "vehicleType" : "COACH"
    } ],
    "direction" : "ANTICLOCKWISE",
    "scheduledTimetable" : {
      "pattern" : { },
      "tripTimes" : [ { }, { } ],
      "frequencyEntries" : [ { }, { } ],
      "serviceDate" : { },
      "direction" : "OUTBOUND"
    },
    "createdByRealtimeUpdater" : true,
    "services" : {
      "empty" : true
    },
    "tripHeadsign" : "...",
    "feedId" : "...",
    "id" : {
      "feedId" : "...",
      "id" : "..."
    }
  },
  "tripTimes" : [ {
    "scheduled" : true,
    "canceled" : true,
    "realTimeState" : "UPDATED",
    "numStops" : 12345,
    "serviceCode" : 12345,
    "trip" : {
      "operator" : { },
      "tripOperator" : { },
      "route" : { },
      "serviceId" : { },
      "mode" : "BUS",
      "netexSubmode" : "...",
      "tripShortName" : "...",
      "internalPlanningCode" : "...",
      "tripHeadsign" : "...",
      "routeShortName" : "...",
      "direction" : "UNKNOWN",
      "blockId" : "...",
      "shapeId" : { },
      "wheelchairAccessible" : 12345,
      "bikesAllowed" : "UNKNOWN",
      "fareId" : "...",
      "tripAlteration" : "CANCELLATION",
      "id" : { }
    }
  }, {
    "scheduled" : true,
    "canceled" : true,
    "realTimeState" : "MODIFIED",
    "numStops" : 12345,
    "serviceCode" : 12345,
    "trip" : {
      "operator" : { },
      "tripOperator" : { },
      "route" : { },
      "serviceId" : { },
      "mode" : "GONDOLA",
      "netexSubmode" : "...",
      "tripShortName" : "...",
      "internalPlanningCode" : "...",
      "tripHeadsign" : "...",
      "routeShortName" : "...",
      "direction" : "OUTBOUND",
      "blockId" : "...",
      "shapeId" : { },
      "wheelchairAccessible" : 12345,
      "bikesAllowed" : "NOT_ALLOWED",
      "fareId" : "...",
      "tripAlteration" : "CANCELLATION",
      "id" : { }
    }
  } ],
  "frequencyEntries" : [ {
    "startTime" : 12345,
    "endTime" : 12345,
    "headway" : 12345,
    "exactTimes" : true,
    "tripTimes" : {
      "scheduled" : true,
      "canceled" : true,
      "realTimeState" : "UPDATED",
      "numStops" : 12345,
      "serviceCode" : 12345,
      "trip" : { }
    },
    "minDeparture" : 12345,
    "maxArrival" : 12345
  }, {
    "startTime" : 12345,
    "endTime" : 12345,
    "headway" : 12345,
    "exactTimes" : true,
    "tripTimes" : {
      "scheduled" : true,
      "canceled" : true,
      "realTimeState" : "CANCELED",
      "numStops" : 12345,
      "serviceCode" : 12345,
      "trip" : { }
    },
    "minDeparture" : 12345,
    "maxArrival" : 12345
  } ],
  "serviceDate" : {
    "year" : 12345,
    "month" : 12345,
    "day" : 12345,
    "minMax" : true
  },
  "direction" : "UNKNOWN"
}