LOG.warn("Missing TripDescriptor in gtfs-rt trip update: \n{}", tripUpdate);
continue;
}
ServiceDate serviceDate = new ServiceDate();
TripDescriptor tripDescriptor = tripUpdate.getTrip();
if (tripDescriptor.hasStartDate()) {
try {
serviceDate = ServiceDate.parseString(tripDescriptor.getStartDate());
} catch (ParseException e) {
LOG.warn("Failed to parse startDate in gtfs-rt trip update: \n{}", tripUpdate);
continue;
}
}
uIndex += 1;
LOG.debug("trip update #{} ({} updates) :",
uIndex, tripUpdate.getStopTimeUpdateCount());
LOG.trace("{}", tripUpdate);
boolean applied = false;
if (tripDescriptor.hasScheduleRelationship()) {
switch(tripDescriptor.getScheduleRelationship()) {
case SCHEDULED:
applied = handleScheduledTrip(tripUpdate, feedId, serviceDate);
break;
case ADDED:
applied = handleAddedTrip(tripUpdate, feedId, serviceDate);