// A trip without stop times is a trip we don't care about
if (stopTimes.isEmpty())
return null;
ShapePoints shapePoints = null;
if (trip.getShapeId() != null)
shapePoints = _shapePointsHelper.getShapePointsForShapeId(trip.getShapeId());
Agency agency = trip.getRoute().getAgency();
TimeZone tz = TimeZone.getTimeZone(agency.getTimezone());
LocalizedServiceId lsid = new LocalizedServiceId(trip.getServiceId(), tz);
TripEntryImpl tripEntry = new TripEntryImpl();
tripEntry.setId(trip.getId());
tripEntry.setDirectionId(unique(trip.getDirectionId()));
tripEntry.setServiceId(unique(lsid));
// Only set the shape id for a trip if there are actually shape points to
// back it up
if (!(shapePoints == null || shapePoints.isEmpty()))
tripEntry.setShapeId(unique(trip.getShapeId()));
List<StopTimeEntryImpl> stopTimesForTrip = _stopTimeEntriesFactory.processStopTimes(
graph, stopTimes, tripEntry, shapePoints);