use of gov.wa.wsdot.ferries.schedule.SchedTerminalCombo in project onebusaway-gtfs-modules by OneBusAway.
the class WSFScheduleService method setBlockIdsFromSchedResponse.
private void setBlockIdsFromSchedResponse(SchedResponse resp) {
List<SchedTerminalCombo> combos = resp.getTerminalCombos().getValue().getSchedTerminalCombo();
for (SchedTerminalCombo stc : combos) {
String depart = stc.getDepartingTerminalID().toString();
String arrive = stc.getArrivingTerminalID().toString();
for (SchedTime sched : schedTime(stc)) {
long time = ts(sched.getDepartingTime());
Trip trip = _tripResolutionService.resolve(depart, time, arrive);
if (trip != null) {
trip.setBlockId(sched.getVesselID().toString());
} else {
_log.warn("Skipping schedTime due to no matching trip {}", sched.toString());
}
}
}
}
Aggregations