com.google.transit.realtime
Class GtfsRealtime.TripDescriptor
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableMessage<GtfsRealtime.TripDescriptor>
com.google.transit.realtime.GtfsRealtime.TripDescriptor
- All Implemented Interfaces:
- com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<GtfsRealtime.TripDescriptor>, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, GtfsRealtime.TripDescriptorOrBuilder, Serializable
- Enclosing class:
- GtfsRealtime
public static final class GtfsRealtime.TripDescriptor
- extends com.google.protobuf.GeneratedMessage.ExtendableMessage<GtfsRealtime.TripDescriptor>
- implements GtfsRealtime.TripDescriptorOrBuilder
Protobuf type transit_realtime.TripDescriptor
A descriptor that identifies an instance of a GTFS trip, or all instances of
a trip along a route.
- To specify a single trip instance, the trip_id (and if necessary,
start_time) is set. If route_id is also set, then it should be same as one
that the given trip corresponds to.
- To specify all the trips along a given route, only the route_id should be
set. Note that if the trip_id is not known, then stop sequence ids in
TripUpdate are not sufficient, and stop_ids must be provided as well. In
addition, absolute arrival/departure times must be provided.
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage.ExtendableMessage |
com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionWriter |
| Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage |
com.google.protobuf.GeneratedMessage.BuilderParent, com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessage.ExtendableBuilder>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingType extends com.google.protobuf.Message,Type> |
| Fields inherited from class com.google.protobuf.GeneratedMessage |
alwaysUseFieldBuilders |
| Fields inherited from class com.google.protobuf.AbstractMessageLite |
memoizedHashCode |
| Methods inherited from class com.google.protobuf.GeneratedMessage.ExtendableMessage |
extensionsAreInitialized, extensionsSerializedSize, extensionsSerializedSizeAsMessageSet, getAllFields, getExtension, getExtension, getExtensionCount, getExtensionFields, getField, getRepeatedField, getRepeatedFieldCount, hasExtension, hasField, makeExtensionsImmutable, newExtensionWriter, newMessageSetExtensionWriter, parseUnknownField |
| Methods inherited from class com.google.protobuf.GeneratedMessage |
getDescriptorForType, getOneofFieldDescriptor, hasOneof, newFileScopedGeneratedExtension, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtension, newMessageScopedGeneratedExtension |
| Methods inherited from class com.google.protobuf.AbstractMessage |
equals, findInitializationErrors, getInitializationErrorString, hashCode, hashFields, toString |
| Methods inherited from class com.google.protobuf.AbstractMessageLite |
checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo |
| Methods inherited from interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder |
getExtension, getExtension, getExtensionCount, hasExtension |
| Methods inherited from interface com.google.protobuf.MessageOrBuilder |
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof |
| Methods inherited from interface com.google.protobuf.MessageLite |
toByteArray, toByteString, writeDelimitedTo, writeTo |
PARSER
public static com.google.protobuf.Parser<GtfsRealtime.TripDescriptor> PARSER
TRIP_ID_FIELD_NUMBER
public static final int TRIP_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
ROUTE_ID_FIELD_NUMBER
public static final int ROUTE_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
START_TIME_FIELD_NUMBER
public static final int START_TIME_FIELD_NUMBER
- See Also:
- Constant Field Values
START_DATE_FIELD_NUMBER
public static final int START_DATE_FIELD_NUMBER
- See Also:
- Constant Field Values
SCHEDULE_RELATIONSHIP_FIELD_NUMBER
public static final int SCHEDULE_RELATIONSHIP_FIELD_NUMBER
- See Also:
- Constant Field Values
getDefaultInstance
public static GtfsRealtime.TripDescriptor getDefaultInstance()
getDefaultInstanceForType
public GtfsRealtime.TripDescriptor getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<GtfsRealtime.TripDescriptor>- Specified by:
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFields in interface com.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFields in class com.google.protobuf.GeneratedMessage
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
getParserForType
public com.google.protobuf.Parser<GtfsRealtime.TripDescriptor> getParserForType()
- Specified by:
getParserForType in interface com.google.protobuf.Message- Specified by:
getParserForType in interface com.google.protobuf.MessageLite- Overrides:
getParserForType in class com.google.protobuf.GeneratedMessage
hasTripId
public boolean hasTripId()
optional string trip_id = 1;
The trip_id from the GTFS feed that this selector refers to.
For non frequency-based trips, this field is enough to uniquely identify
the trip. For frequency-based trip, start_time and start_date might also be
necessary.
- Specified by:
hasTripId in interface GtfsRealtime.TripDescriptorOrBuilder
getTripId
public String getTripId()
optional string trip_id = 1;
The trip_id from the GTFS feed that this selector refers to.
For non frequency-based trips, this field is enough to uniquely identify
the trip. For frequency-based trip, start_time and start_date might also be
necessary.
- Specified by:
getTripId in interface GtfsRealtime.TripDescriptorOrBuilder
getTripIdBytes
public com.google.protobuf.ByteString getTripIdBytes()
optional string trip_id = 1;
The trip_id from the GTFS feed that this selector refers to.
For non frequency-based trips, this field is enough to uniquely identify
the trip. For frequency-based trip, start_time and start_date might also be
necessary.
- Specified by:
getTripIdBytes in interface GtfsRealtime.TripDescriptorOrBuilder
hasRouteId
public boolean hasRouteId()
optional string route_id = 5;
The route_id from the GTFS that this selector refers to.
- Specified by:
hasRouteId in interface GtfsRealtime.TripDescriptorOrBuilder
getRouteId
public String getRouteId()
optional string route_id = 5;
The route_id from the GTFS that this selector refers to.
- Specified by:
getRouteId in interface GtfsRealtime.TripDescriptorOrBuilder
getRouteIdBytes
public com.google.protobuf.ByteString getRouteIdBytes()
optional string route_id = 5;
The route_id from the GTFS that this selector refers to.
- Specified by:
getRouteIdBytes in interface GtfsRealtime.TripDescriptorOrBuilder
hasStartTime
public boolean hasStartTime()
optional string start_time = 2;
The initially scheduled start time of this trip instance.
When the trip_id corresponds to a non-frequency-based trip, this field
should either be omitted or be equal to the value in the GTFS feed. When
the trip_id correponds to a frequency-based trip, the start_time must be
specified for trip updates and vehicle positions. If the trip corresponds
to exact_times=1 GTFS record, then start_time must be some multiple
(including zero) of headway_secs later than frequencies.txt start_time for
the corresponding time period. If the trip corresponds to exact_times=0,
then its start_time may be arbitrary, and is initially expected to be the
first departure of the trip. Once established, the start_time of this
frequency-based trip should be considered immutable, even if the first
departure time changes -- that time change may instead be reflected in a
StopTimeUpdate.
Format and semantics of the field is same as that of
GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
- Specified by:
hasStartTime in interface GtfsRealtime.TripDescriptorOrBuilder
getStartTime
public String getStartTime()
optional string start_time = 2;
The initially scheduled start time of this trip instance.
When the trip_id corresponds to a non-frequency-based trip, this field
should either be omitted or be equal to the value in the GTFS feed. When
the trip_id correponds to a frequency-based trip, the start_time must be
specified for trip updates and vehicle positions. If the trip corresponds
to exact_times=1 GTFS record, then start_time must be some multiple
(including zero) of headway_secs later than frequencies.txt start_time for
the corresponding time period. If the trip corresponds to exact_times=0,
then its start_time may be arbitrary, and is initially expected to be the
first departure of the trip. Once established, the start_time of this
frequency-based trip should be considered immutable, even if the first
departure time changes -- that time change may instead be reflected in a
StopTimeUpdate.
Format and semantics of the field is same as that of
GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
- Specified by:
getStartTime in interface GtfsRealtime.TripDescriptorOrBuilder
getStartTimeBytes
public com.google.protobuf.ByteString getStartTimeBytes()
optional string start_time = 2;
The initially scheduled start time of this trip instance.
When the trip_id corresponds to a non-frequency-based trip, this field
should either be omitted or be equal to the value in the GTFS feed. When
the trip_id correponds to a frequency-based trip, the start_time must be
specified for trip updates and vehicle positions. If the trip corresponds
to exact_times=1 GTFS record, then start_time must be some multiple
(including zero) of headway_secs later than frequencies.txt start_time for
the corresponding time period. If the trip corresponds to exact_times=0,
then its start_time may be arbitrary, and is initially expected to be the
first departure of the trip. Once established, the start_time of this
frequency-based trip should be considered immutable, even if the first
departure time changes -- that time change may instead be reflected in a
StopTimeUpdate.
Format and semantics of the field is same as that of
GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
- Specified by:
getStartTimeBytes in interface GtfsRealtime.TripDescriptorOrBuilder
hasStartDate
public boolean hasStartDate()
optional string start_date = 3;
The scheduled start date of this trip instance.
Must be provided to disambiguate trips that are so late as to collide with
a scheduled trip on a next day. For example, for a train that departs 8:00
and 20:00 every day, and is 12 hours late, there would be two distinct
trips on the same time.
This field can be provided but is not mandatory for schedules in which such
collisions are impossible - for example, a service running on hourly
schedule where a vehicle that is one hour late is not considered to be
related to schedule anymore.
In YYYYMMDD format.
- Specified by:
hasStartDate in interface GtfsRealtime.TripDescriptorOrBuilder
getStartDate
public String getStartDate()
optional string start_date = 3;
The scheduled start date of this trip instance.
Must be provided to disambiguate trips that are so late as to collide with
a scheduled trip on a next day. For example, for a train that departs 8:00
and 20:00 every day, and is 12 hours late, there would be two distinct
trips on the same time.
This field can be provided but is not mandatory for schedules in which such
collisions are impossible - for example, a service running on hourly
schedule where a vehicle that is one hour late is not considered to be
related to schedule anymore.
In YYYYMMDD format.
- Specified by:
getStartDate in interface GtfsRealtime.TripDescriptorOrBuilder
getStartDateBytes
public com.google.protobuf.ByteString getStartDateBytes()
optional string start_date = 3;
The scheduled start date of this trip instance.
Must be provided to disambiguate trips that are so late as to collide with
a scheduled trip on a next day. For example, for a train that departs 8:00
and 20:00 every day, and is 12 hours late, there would be two distinct
trips on the same time.
This field can be provided but is not mandatory for schedules in which such
collisions are impossible - for example, a service running on hourly
schedule where a vehicle that is one hour late is not considered to be
related to schedule anymore.
In YYYYMMDD format.
- Specified by:
getStartDateBytes in interface GtfsRealtime.TripDescriptorOrBuilder
hasScheduleRelationship
public boolean hasScheduleRelationship()
optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
- Specified by:
hasScheduleRelationship in interface GtfsRealtime.TripDescriptorOrBuilder
getScheduleRelationship
public GtfsRealtime.TripDescriptor.ScheduleRelationship getScheduleRelationship()
optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
- Specified by:
getScheduleRelationship in interface GtfsRealtime.TripDescriptorOrBuilder
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized in interface com.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitialized in class com.google.protobuf.GeneratedMessage.ExtendableMessage<GtfsRealtime.TripDescriptor>
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
- Specified by:
writeTo in interface com.google.protobuf.MessageLite- Overrides:
writeTo in class com.google.protobuf.AbstractMessage
- Throws:
IOException
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize in interface com.google.protobuf.MessageLite- Overrides:
getSerializedSize in class com.google.protobuf.AbstractMessage
writeReplace
protected Object writeReplace()
throws ObjectStreamException
- Overrides:
writeReplace in class com.google.protobuf.GeneratedMessage
- Throws:
ObjectStreamException
parseFrom
public static GtfsRealtime.TripDescriptor parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
parseFrom
public static GtfsRealtime.TripDescriptor parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
parseFrom
public static GtfsRealtime.TripDescriptor parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
parseFrom
public static GtfsRealtime.TripDescriptor parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
parseFrom
public static GtfsRealtime.TripDescriptor parseFrom(InputStream input)
throws IOException
- Throws:
IOException
parseFrom
public static GtfsRealtime.TripDescriptor parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws IOException
- Throws:
IOException
parseDelimitedFrom
public static GtfsRealtime.TripDescriptor parseDelimitedFrom(InputStream input)
throws IOException
- Throws:
IOException
parseDelimitedFrom
public static GtfsRealtime.TripDescriptor parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws IOException
- Throws:
IOException
parseFrom
public static GtfsRealtime.TripDescriptor parseFrom(com.google.protobuf.CodedInputStream input)
throws IOException
- Throws:
IOException
parseFrom
public static GtfsRealtime.TripDescriptor parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws IOException
- Throws:
IOException
newBuilder
public static GtfsRealtime.TripDescriptor.Builder newBuilder()
newBuilderForType
public GtfsRealtime.TripDescriptor.Builder newBuilderForType()
- Specified by:
newBuilderForType in interface com.google.protobuf.Message- Specified by:
newBuilderForType in interface com.google.protobuf.MessageLite
newBuilder
public static GtfsRealtime.TripDescriptor.Builder newBuilder(GtfsRealtime.TripDescriptor prototype)
toBuilder
public GtfsRealtime.TripDescriptor.Builder toBuilder()
- Specified by:
toBuilder in interface com.google.protobuf.Message- Specified by:
toBuilder in interface com.google.protobuf.MessageLite
newBuilderForType
protected GtfsRealtime.TripDescriptor.Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
- Specified by:
newBuilderForType in class com.google.protobuf.GeneratedMessage
Copyright © 2015. All Rights Reserved.