Skip to content

Commit

Permalink
add stopIndex in Stoptime
Browse files Browse the repository at this point in the history
  • Loading branch information
miklcct committed Oct 29, 2024
1 parent 8f5af3a commit 1a58ab8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ public DataFetcher<Integer> scheduledDeparture() {
return environment -> missingValueToNull(getSource(environment).getScheduledDeparture());
}

@Override
public DataFetcher<Integer> stopIndex() {
return environment -> getSource(environment).getStopIndex();
}

@Override
public DataFetcher<Integer> stopPosition() {
return environment -> getSource(environment).getGtfsSequence();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,8 @@ public interface GraphQLStoptime {

public DataFetcher<Object> stop();

public DataFetcher<Integer> stopIndex();

public DataFetcher<Integer> stopPosition();

public DataFetcher<Boolean> timepoint();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
package org.opentripplanner.apis.gtfs.generated;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2195,6 +2195,14 @@ type Stoptime {
"The stop where this arrival/departure happens"
stop: Stop
"""
The index of the stop in the pattern. This is required to start from 0 and be consecutive.
The purpose of this field is to identify the position of the stop within the pattern so it can be
cross-referenced between different trips on the same pattern, as stopPosition can be different
between trips even within the same pattern.
"""
stopIndex: Int!
"""
The sequence of the stop in the pattern. This is not required to start from 0 or be consecutive - any
increasing integer sequence along the stops is valid.
Expand Down

0 comments on commit 1a58ab8

Please sign in to comment.