private StopTime doMap(org.onebusaway.gtfs.model.StopTime rhs) { StopTime lhs = new StopTime(); lhs.setTrip(tripMapper.map(rhs.getTrip())); lhs.setStop(stopMapper.map(rhs.getStop())); lhs.setArrivalTime(rhs.getArrivalTime()); lhs.setDepartureTime(rhs.getDepartureTime()); lhs.setTimepoint(rhs.getTimepoint()); lhs.setStopSequence(rhs.getStopSequence()); lhs.setStopHeadsign(rhs.getStopHeadsign()); lhs.setRouteShortName(rhs.getRouteShortName()); lhs.setPickupType(rhs.getPickupType()); lhs.setDropOffType(rhs.getDropOffType()); lhs.setShapeDistTraveled(rhs.getShapeDistTraveled()); lhs.setFarePeriodId(rhs.getFarePeriodId()); // Skip mapping of proxy // private transient StopTimeProxy proxy; if (rhs.getProxy() != null) { throw new IllegalStateException("Did not expect proxy to be set!"); } return lhs; }
public int compare(StopTime o1, StopTime o2) { return o1.getStopSequence() - o2.getStopSequence(); } }
public int compare(StopTime o1, StopTime o2) { return o1.getStopSequence() - o2.getStopSequence(); } }
public int compare(StopTime o1, StopTime o2) { return o1.getStopSequence() - o2.getStopSequence(); } }
public int compareTo(StopTime o) { return this.getStopSequence() - o.getStopSequence(); }
public int compareTo(StopTime o) { return this.getStopSequence() - o.getStopSequence(); }
@Override public int compare(StopTime o1, StopTime o2) { Trip trip1 = o1.getTrip(); Trip trip2 = o2.getTrip(); int c = trip1.getId().compareTo(trip2.getId()); if( c == 0) c = o1.getStopSequence() - o2.getStopSequence(); return c; } }
@Override public int compare(StopTime o1, StopTime o2) { Trip trip1 = o1.getTrip(); Trip trip2 = o2.getTrip(); int c = trip1.getId().compareTo(trip2.getId()); if( c == 0) c = o1.getStopSequence() - o2.getStopSequence(); return c; } }
"departure time is less than arrival time for stop time with trip_id=" + stopTime.getTrip().getId() + " stop_sequence=" + stopTime.getStopSequence()); _log.warn("interpolation error"); _log.warn("correcting arrival time of sequence " + (stopTime.getStopSequence()-1) + ", " + stopTime.getStopSequence() + " of trip " + stopTime.getTrip().getId() + " as it was less than last departure time. Arrival[" + (i-1) + "] " + arrivalTimes[i-1] + " now "+ t0 + ", Arrival[" + i + "] " + arrivalTimes[i] + " now " + t1); " with isLenientArrivalDepartureTimes=" + this.isLenientArrivalDepartureTimes + " and trip_id=" + stopTime.getTrip().getId() + " stop_sequence=" + stopTime.getStopSequence() + ", arrivalTime=" + arrivalTimes[i] + ", departureTime=" + departureTimes[i] + (i>0?" arrivalTimes[" + (i-1) + "]=" + arrivalTimes[i-1] + ", departureTimes[" + (i-1) + "]=" + departureTimes[i-1]:" (i<1)"); _log.error(exceptionMessage);
"departure time is less than arrival time for stop time with trip_id=" + stopTime.getTrip().getId() + " stop_sequence=" + stopTime.getStopSequence()); "arrival time is less than previous departure time for stop time with trip_id=" + stopTime.getTrip().getId() + " stop_sequence=" + stopTime.getStopSequence());
stopTimeEntry.setGtfsSequence(stopTime.getStopSequence()); stopTimeEntry.setDropOffType(stopTime.getDropOffType()); stopTimeEntry.setPickupType(stopTime.getPickupType());
private List<StopTimeEntryImpl> createInitialStopTimeEntries( TransitGraphImpl graph, List<StopTime> stopTimes) { List<StopTimeEntryImpl> stopTimeEntries = new ArrayList<StopTimeEntryImpl>( stopTimes.size()); int sequence = 0; for (StopTime stopTime : stopTimes) { Stop stop = stopTime.getStop(); AgencyAndId stopId = stop.getId(); StopEntryImpl stopEntry = graph.getStopEntryForId(stopId); StopTimeEntryImpl stopTimeEntry = new StopTimeEntryImpl(); stopTimeEntry.setId(stopTime.getId()); stopTimeEntry.setSequence(sequence); stopTimeEntry.setGtfsSequence(stopTime.getStopSequence()); stopTimeEntry.setDropOffType(stopTime.getDropOffType()); stopTimeEntry.setPickupType(stopTime.getPickupType()); stopTimeEntry.setStop(stopEntry); stopTimeEntries.add(stopTimeEntry); sequence++; } return stopTimeEntries; }
st.setArrivalTime(stopTime.getArrivalTime()); st.setDepartureTime(stopTime.getDepartureTime()); st.setStopSequence(stopTime.getStopSequence()); st.setDropOffType(stopTime.getDropOffType()); st.setDepartureBuffer(stopTime.getDepartureBuffer());
@Override public String toString() { return "StopTime(seq=" + getStopSequence() + " stop=" + getStop().getId() + " trip=" + getTrip().getId() + " times=" + StopTimeFieldMappingFactory.getSecondsAsString(getArrivalTime()) + "-" + StopTimeFieldMappingFactory.getSecondsAsString(getDepartureTime()) + ")"; } }
@Override public String toString() { return "StopTime(seq=" + getStopSequence() + " stop=" + (getStop() == null?"NuLl":getStop().getId()) + " trip=" + (getTrip() == null?"NuLl":getTrip().getId()) + " times=" + StopTimeFieldMappingFactory.getSecondsAsString(getArrivalTime()) + "-" + StopTimeFieldMappingFactory.getSecondsAsString(getDepartureTime()) + ")"; } }
/**** * {@link Collection} Interface ****/ @Override public boolean add(StopTime stopTime) { int index = size; size++; ensureCapacity(size); trips[index] = stopTime.getTrip(); stops[index] = stopTime.getStop(); arrivalTimes[index] = stopTime.getArrivalTime(); departureTimes[index] = stopTime.getDepartureTime(); timepoints[index] = stopTime.getTimepoint(); stopSequences[index] = stopTime.getStopSequence(); stopHeadsigns[index] = stopTime.getStopHeadsign(); routeShortNames[index] = stopTime.getRouteShortName(); pickupTypes[index] = stopTime.getPickupType(); dropOffTypes[index] = stopTime.getDropOffType(); shapeDistTraveled[index] = stopTime.getShapeDistTraveled(); return true; }
/**** * {@link Collection} Interface ****/ @Override public boolean add(StopTime stopTime) { int index = size; size++; ensureCapacity(size); trips[index] = stopTime.getTrip(); stops[index] = stopTime.getStop(); arrivalTimes[index] = stopTime.getArrivalTime(); departureTimes[index] = stopTime.getDepartureTime(); timepoints[index] = stopTime.getTimepoint(); stopSequences[index] = stopTime.getStopSequence(); stopHeadsigns[index] = stopTime.getStopHeadsign(); routeShortNames[index] = stopTime.getRouteShortName(); pickupTypes[index] = stopTime.getPickupType(); dropOffTypes[index] = stopTime.getDropOffType(); shapeDistTraveled[index] = stopTime.getShapeDistTraveled(); return true; }
Vertex startJourneyArrive = graph.addVertex(id(s0.getId()) + "_" + tripId + "_" + st0.getStopSequence() + "_A", s0.getName(), s0.getId().getId(), s0.getLon(), s0.getLat()); Vertex startJourneyDepart = graph.addVertex(id(s0.getId()) + "_" + tripId + "_" + st0.getStopSequence() + "_D", s0.getName(), s0.getId().getId(), s0.getLon(), s0.getLat()); Vertex endJourneyArrive = graph.addVertex(id(s1.getId()) + "_" + tripId + "_" + st1.getStopSequence() + "_A", s1.getName(), s1.getId().getId(), s1.getLon(), s1 .getLat());
int dwellTime = st0.getDepartureTime() - st0.getArrivalTime(); String departId = id(s0.getId()) + "_" + id(trip.getId()) + "_" + st0.getStopSequence() + "_D"; String arriveId = id(s1.getId()) + "_" + id(trip.getId()) + "_" + st1.getStopSequence() + "_A"; if (i != 0) { startJourneyArrive = graph.addVertex( id(s0.getId()) + "_" + id(trip.getId()) + "_" + st0.getStopSequence() + "_A", s0.getName(), s0.getId().getId(), s0.getLon(), s0.getLat());
private StopTime cloneStopTime(StopTime original) { StopTime anew = new StopTime(); anew.setTrip(original.getTrip()); anew.setStopSequence(original.getStopSequence()); anew.setStopHeadsign(original.getStopHeadsign()); anew.setStop(original.getStop()); anew.setRouteShortName(original.getRouteShortName()); anew.setPickupType(original.getPickupType()); anew.setId(original.getId()); anew.setDropOffType(original.getDropOffType()); if(original.isShapeDistTraveledSet()) anew.setShapeDistTraveled(original.getShapeDistTraveled()); if(original.isArrivalTimeSet()) anew.setArrivalTime(original.getArrivalTime()); if(original.isDepartureTimeSet()) anew.setDepartureTime(original.getDepartureTime()); return anew; } }