diff --git a/OJP/OJP_JourneySupport.xsd b/OJP/OJP_JourneySupport.xsd index 559960167..fcac3099d 100644 --- a/OJP/OJP_JourneySupport.xsd +++ b/OJP/OJP_JourneySupport.xsd @@ -253,7 +253,7 @@ - A trip location represents the current logical position of a journey service. It can be used similarly to a place e.g. for starting a new trip requests from within this service. A trip location does not(!) describe the relative position of a traveller within a vehicle, e.g. the seat. + A trip location represents the current logical position of a journey service. It can be used similarly to a place e.g. for starting a new trip request from within this service. A trip location does not(!) describe the relative position of a traveller within a vehicle, e.g. the seat. diff --git a/OJP/OJP_Trips.xsd b/OJP/OJP_Trips.xsd index 962ac3b34..6ab9af6ff 100644 --- a/OJP/OJP_Trips.xsd +++ b/OJP/OJP_Trips.xsd @@ -384,7 +384,7 @@ Fare and fare product information for this trip as a whole or parts of it. - + When the result is an alternative option from IncludeAlternativeOptions, then the flag should be set to true. If it is an alternative option this means that the server decided to add this result for its own reasons: e.g. to push a certain trip leg, because it believes that it might better suit at least some possible customers. Such options are not an optimal fit to the criteria that were in the request. The client may therefore disregard such results depending on the use case. @@ -1462,6 +1462,18 @@ + + + Request data filters for Refinement + + + + + Transport operators to include/exclude. + + + + Trip refinement request parameter structure. @@ -1472,9 +1484,14 @@ If true, then the request may contain object references from another system. Default is FALSE. - + - Refers to a leg to be refined by the server. + Refers to the legs to be refined by the server. If none is given, then all legs are open for refinement (depending if the relevant system can refine them). + + + + + System reference to use for the refinement. If not specified the origin systems of each leg are used for the refinement. @@ -1482,6 +1499,7 @@ Usage of real-time data in refinement. Default is "full". + @@ -1639,6 +1657,16 @@ Indicated legs do not exist. + + + The object to be refined could not be found in the database of the responding system or could not be found unequivocally. + + + + + Refinement does not support the hiking or cycling profile. + + A problem has occurred that does not have a specific problem type. diff --git a/docs/generated/index.html b/docs/generated/index.html index bd45bad90..fbb3e1d83 100644 --- a/docs/generated/index.html +++ b/docs/generated/index.html @@ -67,7 +67,7 @@

OJP - Open API for distributed Journey 8. OJP/OJP_PlaceSupport.xsd - Supporting definitions for location information
  • 9. OJP/OJP_StopEvents.xsd - Request and response definitions for arrivals and departures of public transport services at stops
  • 10. OJP/OJP_TripInfo.xsd - Request and response definitions for information on a single trip
  • -
  • 11. OJP/OJP_Trips.xsd - Request and response definitions for trip requests and distributed journey planning
  • +
  • 11. OJP/OJP_Trips.xsd - Request and response definitions for trip requests and distributed journey planning
  • 12. OJP/OJP_JourneySupport.xsd - Supporting definitions for journeys on public transport vehicles
  • 13. OJP/OJP_Availability.xsd - Request and response definitions for availability of tickets and services on a journey leg.
  • 14. OJP/OJP_Common.xsd - Supporting definitions of common structures
  • @@ -618,7 +618,7 @@

    OJP - Open API for distributed Journey

    11. OJP/OJP_Trips.xsd - Request and response definitions for trip requests and distributed journey planning

    11.1. Simple type definitions

    AccessFeatureStatusEnumeration

    unknown | available | partiallyAvailable | notAvailable

    Allowed values for status of the access feature.

    AccessFeatureTypeEnumeration

    elevator | stairs | seriesOfStairs | singleStep | seriesOfSingleSteps | escalator | travelator | ramp | footpath | shuttle | other | unkown

    Allowed values for a AccessFeature.

    AccessibilityFeatureTypesEnumeration

    lowFloorAccess | stepFreeAccess | accessWithSteps | slidingStep | raisedKerb | narrowEntrance | wheelchairLift | manualRamp | automaticRamp | suitableForWheelchairs | suitableForUnassistedWheelchairs | suitableForHeaviliyDisabled | suitableForPushchairs | suitableForBicycles | tactilePlatformEdges | tactileGuidingStrips | tactileOrAuditorySigns | visualSigns | elevatorWithTactileButtons | elevatorWithAcousticAnnouncements | audioInformation | audioForHearingImpaired | visualDisplays | displaysForVisuallyImpaired | largePrintTimetables | boardingAssistance | onboardAssistance | unaccompaniedMinorAssistance | barrier | validator

    Allowed values for AccessibilityFeature (for mobility and sensory impairments, assistance and important elements to pay attention to).

    FeasibilityEnumeration

    allAccessFeaturesAvailable | accessFeatureNotAvailable | accessFeaturePartiallyAvailable | accessFeatureWithUnknownAvailability | seeSituations

    Allowed values for the feasibility of a TRIP or part of a TRIP.

    GuidanceAdviceEnumeration

    origin | destination | continue | keep | turn | leave | enter | enter_roundabout | stay_in_roundabout | leave_roundabout | enter_builtup_area | leave_builtup_area | freewayAccessRamp | unknown_lane_choice | left_lane | middle_lane | right_lane | unknown_turning_kind

    Various types of guidance advice given to traveller. Suitable values may differ by MODE (e.g. a car driver needs different advice than a person walking for a transfer.

    MultiPointTypeEnumeration

    anyPoint | eachOrigin | eachDestination | eachOriginDestination | somePoints

    How the multiple origin/destination points should be considered. Note: Unfortunately this element was underdefined before and this resulted in different implementations. Note: MultiPointType trumps the number of results. If the algorithm thinks it necessary to provide more results, it should. -

    OptimisationMethodEnumeration

    fastest | minChanges | leastWalking | leastCost | leastDistance | earliestArrival | latestDeparture | earliestArrivalAndLatestDeparture | environmentalSafety | extraSafe | extraReliable | scenic | quietTravel

    The types of algorithm that can be used for planning a journey (fastest, least walking, etc.). If multiple optimisation methods are needed, then several requests should be performed in parallel.

    TransitionEnumeration

    up | down | level | upAndDown | downAndUp

    Transition types for interchanges.

    TripProblemTypeEnumeration

    TRIP_NOTRIPFOUND | TRIP_ORIGINUNKNOWN | TRIP_DESTINATIONUNKNOWN | TRIP_VIAUNKNOWN | TRIP_NOTVIAUNKNOWN | TRIP_NOCHANGEATUNKNOWN | TRIP_NOORIGIN | TRIP_NODESTINATION | TRIP_ORIGINDESTINATIONIDENTICAL | TRIP_DATETIMEERROR | TRIP_DEPARTUREAFTERARRIVAL | TRIP_DATEOUTOFRANGE | TRIP_ORIGINEQUIVALENT | TRIP_DESTINATIONEQUIVALENT | TRIP_VIAEQUIVALENT | TRIP_REALTIMEINCOMPLETE | TRIP_ITTIMEEXTENDED | TRIP_ITMODECHANGED | TRIP_INCONVENIENTWAITING | TRIP_MULTIPOINT_NOTALLPOINTSCOVERED | TRIP_MULTIPOINT_TOOMANYPOINTS | TRIP_MULTIPOINT_TYPE_NOT_SUPPORTED | TRIP_REFINE_LEG_UNKNOWN | TRIP_OTHER

    Types of problems that may be returned in responses to Trip requests.

    TurnActionEnumeration

    straight_on | half_right | right | sharp_right | uturn | sharp_left | left | half_left | up | down | unknown_turn_action

    The range of possible turns that can be described.

    11.2. The TripRequestGroup group

    +

    TripRequestGroup

    Trip request structure.

    OptimisationMethodEnumeration

    fastest | minChanges | leastWalking | leastCost | leastDistance | earliestArrival | latestDeparture | earliestArrivalAndLatestDeparture | environmentalSafety | extraSafe | extraReliable | scenic | quietTravel

    The types of algorithm that can be used for planning a journey (fastest, least walking, etc.). If multiple optimisation methods are needed, then several requests should be performed in parallel.

    TransitionEnumeration

    up | down | level | upAndDown | downAndUp

    Transition types for interchanges.

    TripProblemTypeEnumeration

    TRIP_NOTRIPFOUND | TRIP_ORIGINUNKNOWN | TRIP_DESTINATIONUNKNOWN | TRIP_VIAUNKNOWN | TRIP_NOTVIAUNKNOWN | TRIP_NOCHANGEATUNKNOWN | TRIP_NOORIGIN | TRIP_NODESTINATION | TRIP_ORIGINDESTINATIONIDENTICAL | TRIP_DATETIMEERROR | TRIP_DEPARTUREAFTERARRIVAL | TRIP_DATEOUTOFRANGE | TRIP_ORIGINEQUIVALENT | TRIP_DESTINATIONEQUIVALENT | TRIP_VIAEQUIVALENT | TRIP_REALTIMEINCOMPLETE | TRIP_ITTIMEEXTENDED | TRIP_ITMODECHANGED | TRIP_INCONVENIENTWAITING | TRIP_MULTIPOINT_NOTALLPOINTSCOVERED | TRIP_MULTIPOINT_TOOMANYPOINTS | TRIP_MULTIPOINT_TYPE_NOT_SUPPORTED | TRIP_REFINE_LEG_UNKNOWN | REFINE_OBJECTNOTFOUND | REFINE_PROFILENOTSUPPORTED | TRIP_OTHER

    Types of problems that may be returned in responses to Trip requests.

    TurnActionEnumeration

    straight_on | half_right | right | sharp_right | uturn | sharp_left | left | half_left | up | down | unknown_turn_action

    The range of possible turns that can be described.

    11.2. The TripRequestGroup group

    -

    TripRequestGroup

    Trip request structure.

    TripRequest

    Origin

    1:*

    +PlaceContext

    Specifies the origin situation from where the user wants to start.

    Destination

    1:*

    +PlaceContext

    Specifies the destination situation where the user is heading to.

    Via

    0:*

    +TripVia

    Ordered series of points where the journey must pass through. If more than one via point is given all of them must be obeyed - in the correct order. The server is allowed to replace a via stop by equivalent stops. @@ -1027,7 +1027,11 @@

    OJP - Open API for distributed Journey

    TripRefineRequest

    RefineParams

    0:1

    +TripRefineParam

    Options to control the refine

    TripResult

    1:1

    +TripResult

    The trip result to be refined by the server.

    TripResponseContext

    0:1

    +ResponseContext

    Context to hold objects, which are referenced within the response.

    11.37. The complex type TripRefineParamStructure

    +

    TripRefineParamStructure

    Trip refinement request parameter structure.

    The element contains a sequence of the following elements:

    ForeignObjectRefs

    0:1

    xs:boolean

    If true, then the request may contain object references from another system. Default is FALSE.

    RefineLegRef

    1:*

    xs:NMTOKEN

    Refers to a leg to be refined by the server.

    UseRealtimeData

    0:1

    UseRealtimeData

    Usage of real-time data in refinement. Default is "full".

    11.37. The TripRefinementDataFilterGroup group

    + +

    TripRefinementDataFilterGroup

    Request data filters for Refinement

    TripRefinementDataFilter

    OperatorFilter

    0:1

    +OperatorFilter

    Transport operators to include/exclude.

    11.38. The complex type TripRefineParamStructure

    + + @@ -1087,11 +1091,11 @@

    OJP - Open API for distributed Journey

    -

    TripRefineParamStructure

    Trip refinement request parameter structure.

    The element contains a sequence of the following elements:

    ForeignObjectRefs

    0:1

    xs:boolean

    If true, then the request may contain object references from another system. Default is FALSE.

    RefineLegRef

    0:*

    xs:NMTOKEN

    Refers to the legs to be refined by the server. If none is given, then all legs are open for refinement (depending if the relevant system can refine them).

    SystemId

    0:1

    xs:normalizedString

    System reference to use for the refinement. If not specified the origin systems of each leg are used for the refinement.

    UseRealtimeData

    0:1

    UseRealtimeData

    Usage of real-time data in refinement. Default is "full".

    TripRefinementDataFilter

    OperatorFilter

    0:1

    +OperatorFilter

    Transport operators to include/exclude.

    BaseTripContentFilter

    IncludeTrackSections

    0:1

    xs:boolean

    Whether the result should include TrackSection elements to describe the geographic route of each journey leg.

    IncludeLegProjection

    0:1

    xs:boolean

    Whether the result should include the geographic projection (coordinates) of each journey leg.

    TripSummaryOnly

    0:1

    xs:boolean

    If true, then the response will contain only summaries of the found trips. Default is false.

    FareParam

    0:1

    +FareParam

    Parameters for fare calculation. Only used if IncludeFare is set (TripContentFilterGroup).

    Extension

    0:1

    xs:anyType

    11.38. The TripRefineResponseGroup group

    +

    TripRefineResponseGroup

    Trip refinement response structure.

    FareParam

    0:1

    +FareParam

    Parameters for fare calculation. Only used if IncludeFare is set (TripContentFilterGroup).

    Extension

    0:1

    xs:anyType

    11.39. The TripRefineResponseGroup group

    -

    TripRefineResponseGroup

    Trip refinement response structure.

    TripRefineResponse

    TripResponseContext

    0:1

    +ResponseContext

    Context to hold trip response objects that occur frequently.

    UnknownLegRef

    0:*

    xs:NMTOKEN

    Refers to a leg that was not found in the data of the server. If the to be refined TripResult could not be found or unequivocally determined, all RefineLegRefs are returned as UnknownLegRefs.

    TripResult

    0:*

    +TripResult

    The trip results refined by the server.

    11.39. The toplevel element TripProblemType

    TripProblemType

    TripProblemType (↔ ErrorType)

    +

    11.40. The toplevel element TripProblemType

    TripProblemType

    TripProblemType (↔ ErrorType)

    12. OJP/OJP_JourneySupport.xsd - Supporting definitions for journeys on public transport vehicles

    12.1. Simple type definitions

    AccessibilityDetailsProfileEnumeration

    visualImpairment | auditoryImpairment | mobilityImpairment | bicycle | general

    Allowed values for AccessibilityDetails.

    ReservationNeededEnumeration

    none | service | stop

    Possible types of reservation needed for services.

    UseRealtimeDataEnumeration

    full | explanatory | none

    VehicleProgressEnumeration

    Not yet operated | Operation finished | At stop | Between stops

    Vehicle progress relative to timetable service pattern.

    12.2. The complex type ServiceViaPointStructure

    @@ -1191,7 +1195,7 @@

    OJP - Open API for distributed Journey

    -

    ServiceViaPointStructure

    [a specialisation of VIA in TMv6] STOP PLACE or SCHEDULED STOP POINT as a VIA for a particular SERVICE PATTERN. Specialisation of a VIA.

    The element contains a sequence of the following elements:

    StopPoint

    →‍siri:StopPointRef

    1:1

    →‍siri:StopPointRef

    Reference to a stop point.

    StopPointName

    1:1

    +InternationalText

    Name or description of stop point for use in passenger information.

    Cancelled

    0:1

    xs:boolean

    Whether this trip is cancelled and will not be run. Default is false.

    Deviation

    0:1

    xs:boolean

    Whether this trip deviates from the planned service pattern. Default is false.

    Occupancy

    0:1

    siri:OccupancyEnumeration

    [equivalent to OCCUPANCY in SIRI] passenger load status of a VEHICLE. If omitted, not known.

    BookingArrangements

    0:1

    +BookingArrangementsContainer

    Container with information on booking possibilities for this service.

    ReservationNeeded

    0:1

    ReservationNeeded

    Indicates whether this service needs some kind of reservation or booking to run.

    SituationFullRefs

    0:1

    +SituationRefList

    A list of references to SITUATIONs.

    Extension

    0:1

    xs:anyType

    12.13. The complex type TripLocationStructure

    TripLocationStructure

    A trip location represents the current logical position of a journey service. It can be used similarly to a place e.g. for starting a new trip requests from within this service. A trip location does not(!) describe the relative position of a traveller within a vehicle, e.g. the seat.

    The element contains a sequence of the following elements:

    →‍OperatingDayRef

    1:1

    →‍OperatingDayRef

    Reference to an Operating Day

    →‍JourneyRef

    1:1

    →‍JourneyRef

    Reference to a Journey

    →‍siri:LineIdentityGroup

    12.14. The TimeWindowGroup group

    +

    TimeWindowGroup

    The window of opportunity that the traveller has to perform this leg of the journey.

    BookingArrangements

    0:1

    +BookingArrangementsContainer

    Container with information on booking possibilities for this service.

    ReservationNeeded

    0:1

    ReservationNeeded

    Indicates whether this service needs some kind of reservation or booking to run.

    SituationFullRefs

    0:1

    +SituationRefList

    A list of references to SITUATIONs.

    Extension

    0:1

    xs:anyType

    12.13. The complex type TripLocationStructure

    TripLocationStructure

    A trip location represents the current logical position of a journey service. It can be used similarly to a place e.g. for starting a new trip request from within this service. A trip location does not(!) describe the relative position of a traveller within a vehicle, e.g. the seat.

    The element contains a sequence of the following elements:

    →‍OperatingDayRef

    1:1

    →‍OperatingDayRef

    Reference to an Operating Day

    →‍JourneyRef

    1:1

    →‍JourneyRef

    Reference to a Journey

    →‍siri:LineIdentityGroup

    12.14. The TimeWindowGroup group

    TimeWindowGroup

    The window of opportunity that the traveller has to perform this leg of the journey.

    TimeWindow

    TimeWindowStart

    0:1

    xs:dateTime

    Time at which window begins.

    TimeWindowEnd

    0:1

    xs:dateTime

    Time at which window ends.

    12.15. The ServiceTimeGroup group

    diff --git a/examples/functions/triprefine/RefinementRequest.xml b/examples/functions/triprefine/RefinementRequest.xml new file mode 100644 index 000000000..024ad9208 --- /dev/null +++ b/examples/functions/triprefine/RefinementRequest.xml @@ -0,0 +1,211 @@ + + + + + 2022-12-19T12:00:00Z + IRMA + + 2022-12-19T12:00:00Z + 4711 + + 1 + 3 + SBB:ojp:prod + full + true + true + true + difficult + comfortable + + OSDM-NOVA-Prod + Senior + Disabled + + 85 + + + + + ID-5A9D01A0-CF49-41E7-A674-D37167E33AEF + + ID-5A9D01A0-CF49-41E7-A674-D37167E33AEF + PT2H18M + 2020-09-30T10:03:00Z + 2020-09-30T12:21:00Z + 0 + 125484 + + 1 + + + 8506302 + + St. Gallen + + + 4 + + + 2020-09-30T10:03:00Z + + 1 + + + 8505000 + + Luzern + + + 3 + + + 2020-09-30T12:21:00Z + + 15 + + + 2020-09-30 + ojp:910DG:Y:R:j20:210 + ojp:910DG:Y + R + + rail + local + + Zug + + + IR + + + + empty + + + ojp:82 + + + + Reservierung möglich + + A___R + + + + Bar + + A___B + + + + Maskenpflicht für Reisende ab 12 Jahren + + A__OM + + de:00000:-1 + + Luzern + + + + + Voralpen-Express + + + 2020 + + + + + + 2 + + walk + + 8505000 + + Luzern + + + + + 47.042666496 + 8.306332108 + + + Taxiplatz Luzern + + + PT3M + + + + 3 + + + + 47.042666496 + 8.306332108 + + + Taxiplatz Luzern + + + + + 47.06 + 8.32 + + + Destination + + + + demandResponsive + + ch:1:sboid:12391912 + + + + + onBoarding + + + + + PT13M + + + + + + + + ch:1:sboid:1230123 + New rail company + + + + + + 8530813 + + Zürich Kreuzplatz + + 23026261:27 + + + Zürich + + + 8.55408 + 47.36488 + + + + + + + + diff --git a/examples/functions/triprefine/RefinementResponse.xml b/examples/functions/triprefine/RefinementResponse.xml new file mode 100644 index 000000000..6fdc7951e --- /dev/null +++ b/examples/functions/triprefine/RefinementResponse.xml @@ -0,0 +1,183 @@ + + + + + 2022-12-01T17:54:38Z + OJPCH_Prod + true + + 2022-12-01T17:54:38Z + 4711 + true + 421 + 4 + + ID-5A9D01A0-CF49-41E7-A674-D37167E33AEF + + ID-5A9D01A0-CF49-41E7-A674-D37167E33AEF + PT2H18M + 2020-09-30T10:03:00Z + 2020-09-30T12:21:00Z + 0 + 125484 + + + 1 + + + 8506302 + + St. Gallen + + + 4 + + + 5 + + + + 2020-09-30T10:03:00Z + 2020-09-30T10:06:00Z + + + 1 + + + 8505000 + + Luzern + + + 3 + + + 2020-09-30T12:21:00Z + + 15 + + + 2020-09-30 + ojp:910DG:Y:R:j20:210 + ojp:910DG:Y + R + + rail + local + + Zug + + + IR + + + + empty + + + ojp:82 + + + + Reservierung möglich + + A___R + + + + Bar + + A___B + + + de:00000:-1 + + Luzern + + + + + Voralpen-Express + + + 2020 + + + + + + 2 + + + walk + + 8505000 + + Luzern + + + + + 47.042666496 + 8.306332108 + + + Taxiplatz Luzern + + + PT3M + + + + + 3 + + + + 47.042666496 + 8.306332108 + + + Taxiplatz Luzern + + + + + 47.06 + 8.31 + + + + New destination + + + + + demandResponsive + + ch:1:sboid:12391912 + + + + + onBoarding + + + + + PT11M + + + + + + + + +

    ServiceTimeGroup

    Contains at least scheduled time, but can contain real time and estimated times