.computeEnumSize(4, scheduleRelationship_.getNumber());
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor
com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship value = com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(4, rawValue);
blockDescriptor.setStartDate(serviceDate); if (trip.hasScheduleRelationship()) { blockDescriptor.setScheduleRelationshipValue(trip.getScheduleRelationship().toString());
if (!(!tripUpdate.getTrip().hasScheduleRelationship() || tripUpdate.getTrip().getScheduleRelationship().equals(GtfsRealtime.TripDescriptor.ScheduleRelationship.UNSCHEDULED))) { if (!(!vehiclePosition.getTrip().hasScheduleRelationship() || vehiclePosition.getTrip().getScheduleRelationship().equals(GtfsRealtime.TripDescriptor.ScheduleRelationship.UNSCHEDULED))) {
com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship value = com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(4, rawValue);
.computeEnumSize(4, scheduleRelationship_.getNumber());
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); com.google.protobuf.GeneratedMessage .ExtendableMessage<com.google.transit.realtime.GtfsRealtime.TripDescriptor>.ExtensionWriter extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getTripIdBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(2, getStartTimeBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(3, getStartDateBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeEnum(4, scheduleRelationship_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(5, getRouteIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeUInt32(6, directionId_); } extensionWriter.writeUntil(2000, output); getUnknownFields().writeTo(output); }
/** * Checks E041 "trip doesn't have any stop_time_updates", and adds any errors to the provided error list. * * @param entity entity that the trip_update is from * @param tripUpdate the trip_update to examine * @param errors the list to add the errors to */ private void checkE041(GtfsRealtime.FeedEntity entity, GtfsRealtime.TripUpdate tripUpdate, List<OccurrenceModel> errors) { if (tripUpdate.getStopTimeUpdateCount() < 1) { if (tripUpdate.hasTrip() && tripUpdate.getTrip().hasScheduleRelationship() && tripUpdate.getTrip().getScheduleRelationship().equals(GtfsRealtime.TripDescriptor.ScheduleRelationship.CANCELED)) { // No errors - the trip was canceled, so it doesn't need any stop_time_updates - return return; } RuleUtils.addOccurrence(ValidationRules.E041, GtfsUtils.getTripId(entity, tripUpdate), errors, _log); } }
private static int findRelationship(TripDescriptor t) { return t.getScheduleRelationship().getNumber(); }
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor
public static ScheduleRelationship valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; }
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor
if (tripScheduleRelationship.equals(TripDescriptor.ScheduleRelationship.SCHEDULED)) {
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); com.google.protobuf.GeneratedMessage .ExtendableMessage<com.google.transit.realtime.GtfsRealtime.TripDescriptor>.ExtensionWriter extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getTripIdBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(2, getStartTimeBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(3, getStartDateBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeEnum(4, scheduleRelationship_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(5, getRouteIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeUInt32(6, directionId_); } extensionWriter.writeUntil(2000, output); getUnknownFields().writeTo(output); }
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor
public static ScheduleRelationship valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; }