if (stopTimeUpdate.hasStopSequence()) { final Integer stopSequence = stopTimeUpdate.getStopSequence();
boolean match = false; if (update != null) { if (update.hasStopSequence()) { match = update.getStopSequence() == newTimes.getStopSequence(i); } else if (update.hasStopId()) {
if (stopTimeUpdate.hasStopSequence()) { stopTime.setStopSequence(stopTimeUpdate.getStopSequence());
String previousDepartureTimeText = null; for (GtfsRealtime.TripUpdate.StopTimeUpdate stopTimeUpdate : stopTimeUpdates) { String stopDescription = stopTimeUpdate.hasStopSequence() ? " stop_sequence " + stopTimeUpdate.getStopSequence() : " stop_id " + stopTimeUpdate.getStopId(); Long arrivalTime = null; String arrivalTimeText;
boolean unknownRtStopSequence = false; for (GtfsRealtime.TripUpdate.StopTimeUpdate stopTimeUpdate : rtStopTimeUpdateList) { if (!foundE009error && tripId != null && tripWithMultiStop.containsKey(tripId) && !stopTimeUpdate.hasStopSequence()) { if (stopTimeUpdate.hasStopSequence()) { rtStopSequenceList.add(stopTimeUpdate.getStopSequence()); boolean foundStopSequence = false; boolean foundStopId = false; if (stopTimeUpdate.hasStopSequence()) { if (gtfsStopSequence == stopTimeUpdate.getStopSequence()) { if (stopTimeUpdate.hasStopSequence() && gtfsStopTimeIndex == gtfsStopTimes.size()) { if (!stopTimeUpdate.hasStopSequence() && foundStopId) { if (!stopTimeUpdate.hasStopSequence()) { rtStopSequenceList.add(gtfsStopSequence); addedStopSequenceFromStopId = true;
tpr.setTripId(stopTime.getTrip().getId()); tpr.setTimepointScheduledTime(instance.getServiceDate() + stopTime.getArrivalTime() * 1000); if (stopTimeUpdate.hasStopSequence()) { tpr.setStopSequence(stopTimeUpdate.getStopSequence());
List<BlockStopTimeEntry> stopTimes, long serviceDate) { if (stopTimeUpdate.hasStopSequence()) { int stopSequence = stopTimeUpdate.getStopSequence();
return null; StopTimeUpdateModel stum = new StopTimeUpdateModel(); if (stu.hasStopSequence()) { stum.setStopSequence(stu.getStopSequence());
/** * Checks E037 - if the provided previousStopId value is the same as the current stopTimeUpdate stop_id it adds * an error to the provided error list. * * @param entity entity that the stopTimeUpdate is from * @param previousStopId the stop_id for the previous StopTimeUpdate * @param stopTimeUpdate the current stopTimeUpdate * @param errors the list to add the errors to */ private void checkE037(GtfsRealtime.FeedEntity entity, String previousStopId, GtfsRealtime.TripUpdate.StopTimeUpdate stopTimeUpdate, List<OccurrenceModel> errors) { if (!previousStopId.isEmpty() && stopTimeUpdate.hasStopId() && previousStopId.equals(stopTimeUpdate.getStopId())) { String id = GtfsUtils.getTripId(entity, entity.getTripUpdate()); StringBuilder prefix = new StringBuilder(); prefix.append(id); prefix.append(" has repeating stop_id "); prefix.append(previousStopId); if (stopTimeUpdate.hasStopSequence()) { prefix.append(" at stop_sequence "); prefix.append(stopTimeUpdate.getStopSequence()); } RuleUtils.addOccurrence(ValidationRules.E037, prefix.toString(), errors, _log); } }
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate other) { if (other == com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDefaultInstance()) return this; if (other.hasStopSequence()) { setStopSequence(other.getStopSequence()); } if (other.hasStopId()) { bitField0_ |= 0x00000002; stopId_ = other.stopId_; onChanged(); } if (other.hasArrival()) { mergeArrival(other.getArrival()); } if (other.hasDeparture()) { mergeDeparture(other.getDeparture()); } if (other.hasScheduleRelationship()) { setScheduleRelationship(other.getScheduleRelationship()); } this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * Checks E036 - if the provided previousStopSequence value is the same as the current stopTimeUpdate stop_sequence * it adds an error to the provided error list. * * @param entity entity that the stopTimeUpdate is from * @param previousStopSequence the stop_sequence for the previous StopTimeUpdate * @param stopTimeUpdate the current stopTimeUpdate * @param errors the list to add the errors to */ private void checkE036(GtfsRealtime.FeedEntity entity, Integer previousStopSequence, GtfsRealtime.TripUpdate.StopTimeUpdate stopTimeUpdate, List<OccurrenceModel> errors) { if (stopTimeUpdate.hasStopSequence() && previousStopSequence == stopTimeUpdate.getStopSequence()) { String id = GtfsUtils.getTripId(entity, entity.getTripUpdate()); RuleUtils.addOccurrence(ValidationRules.E036, id + " has repeating stop_sequence " + previousStopSequence, errors, _log); } }
/** * Returns the stop_sequence for the given StopTimeUpdate if one exists, if not the stop_id is returned in the format * "stop_sequence 1234" or "stop_id 9876". * * @param stopTimeUpdate the stop_time_update to generate the stop_sequence or stop_id text from * @return the stop_sequence for the given StopTimeUpdate if one exists, if not the stop_id is returned in the format"stop_sequence 1234" or "stop_id 9876". */ public static String getStopTimeUpdateId(GtfsRealtime.TripUpdate.StopTimeUpdate stopTimeUpdate) { if (stopTimeUpdate.hasStopSequence()) { return "stop_sequence " + stopTimeUpdate.getStopSequence(); } else { return "stop_id " + stopTimeUpdate.getStopId(); } }
/** * Checks E040 "stop_time_update doesn't contain stop_id or stop_sequence", and adds any errors to the provided error list. * * @param entity entity that the stopTimeUpdate is from * @param tripUpdate the trip_update for the StopTimeUpdate * @param stopTimeUpdate the stop_time_update to check for E040 * @param errors the list to add the errors to */ private void checkE040(GtfsRealtime.FeedEntity entity, GtfsRealtime.TripUpdate tripUpdate, GtfsRealtime.TripUpdate.StopTimeUpdate stopTimeUpdate, List<OccurrenceModel> errors) { if (!stopTimeUpdate.hasStopSequence() && !stopTimeUpdate.hasStopId()) { RuleUtils.addOccurrence(ValidationRules.E040, GtfsUtils.getTripId(entity, tripUpdate), errors, _log); } }
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate other) { if (other == com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDefaultInstance()) return this; if (other.hasStopSequence()) { setStopSequence(other.getStopSequence()); } if (other.hasStopId()) { bitField0_ |= 0x00000002; stopId_ = other.stopId_; onChanged(); } if (other.hasArrival()) { mergeArrival(other.getArrival()); } if (other.hasDeparture()) { mergeDeparture(other.getDeparture()); } if (other.hasScheduleRelationship()) { setScheduleRelationship(other.getScheduleRelationship()); } this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); return this; }