You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We met today to discuss the filter API for the planConnection query of the GTFS API.
We concluded that we want to keep the semantic structure of the the Transmodel API's filtering API. However, one crucial difference is that we want to ban the empty lists for all cases because we couldn't come up with a use case where it meant something different than null. This also keeps the door open to allowing it at a later stage (but the other way round is much harder).
"A collection of selectors for what lines/trips should be included in / excluded from search"
inputTripFilterInput {
"A list of selectors for what lines/trips should be excluded during the search. If line/trip matches with at least one selector it will be excluded."
not: [TripFilterSelectInput!]
"A list of selectors for what lines/trips should be allowed during search. In order to be accepted a trip/line has to match with at least one selector. An empty list means that everything should be allowed. "
select: [TripFilterSelectInput!]
}
"A list of selectors for filter allow-list / exclude-list. An empty list means that everything is allowed. A trip/line will match with selectors if it matches with all non-empty lists. The `select` is always applied first, then `not`. If only `not` not is present, the exclude is applied to the existing set of lines. "
inputTripFilterSelectInput {
"Set of ids for authorities that should be included in/excluded from search"
authorities: [ID!]
"Set of ids for group of lines that should be included in/excluded from the search"
groupOfLines: [ID!]
"Set of ids for lines that should be included in/excluded from search"
lines: [ID!]
"Set of ids for service journeys that should be included in/excluded from search"
serviceJourneys: [ID!]
"The allowed modes for the transit part of the trip. Use an empty list to disallow transit for this search. If the element is not present or null, it will default to all transport modes."
transportModes: [TransportModes!]
}
In the GTFS API we will not need groupOfLine, submodes or serviceJourneys.
Here is a sketch that @t2gran made during the meeting.
# [] => ban empty(GTFS) or mean nothing(Transmodel)
# (select) minus (not)
filters: [
# Union
{
select : [
# Union
{
# Intersection
authorities: [
#Union
"VY", "RUT"
]
lines : [
"Line:A", "Line:B"
]
transportModes : [
# Union
{
# Intersection
transportMode : rail
transportSubModes : [ local ]
}
{
# Intersection
transportMode : bus
}
{
# Intersection
transportMode : flex
transportSubModes : [ flex_bus, flex_taxi ]
}
]
}
]
not : [
# Union
]
}
# Union
{
select : [
# Union
{
# Intersection
authorities: [
#Union
"VY", "RUT"
]
lines : [
"Line:A", "Line:B"
]
transportMode : [ bus ]
transportSubModes : [ localRail ]
}
]
not : [
# Union
]
}
# Except airportRail
{
not : [
# Union
{
transportModes : [
# Union
{
# Intersection
transportSubModes : [ airportLinkRail ]
}
]
}
]
}
The text was updated successfully, but these errors were encountered:
We met today to discuss the filter API for the
planConnection
query of the GTFS API.We concluded that we want to keep the semantic structure of the the Transmodel API's filtering API. However, one crucial difference is that we want to ban the empty lists for all cases because we couldn't come up with a use case where it meant something different than
null
. This also keeps the door open to allowing it at a later stage (but the other way round is much harder).The API schema from Transmodel is here:
OpenTripPlanner/application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql
Lines 2200 to 2220 in e4d92eb
In the GTFS API we will not need groupOfLine, submodes or serviceJourneys.
Here is a sketch that @t2gran made during the meeting.
The text was updated successfully, but these errors were encountered: