From 582be76e3698a2781d515053e557d7200db1cc66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Gro=C3=9Fberndt?= Date: Thu, 28 Mar 2024 09:25:28 +0100 Subject: [PATCH] Add TripMonitoring --- OJP/OJP_All.xsd | 1 + OJP/OJP_RequestSupport.xsd | 8 + OJP/OJP_Requests.xsd | 43 ++- OJP/OJP_TripMonitoring.xsd | 192 +++++++++++++ docs/generate_tables/custom-ojp.xml | 1 + .../TripMonitoring_DataSupplyRequest.xml | 11 + .../TripMonitoring_Delivery.xml | 254 ++++++++++++++++++ .../TripMonitoring_Subscription.xml | 205 ++++++++++++++ .../TripMonitoring_SubscriptionResponse.xml | 21 ++ .../TripMonitoring_TerminateSubscription.xml | 13 + ...nitoring_TerminateSubscriptionResponse.xml | 29 ++ 11 files changed, 774 insertions(+), 4 deletions(-) create mode 100644 OJP/OJP_TripMonitoring.xsd create mode 100644 examples/functions/trip_monitoring/TripMonitoring_DataSupplyRequest.xml create mode 100644 examples/functions/trip_monitoring/TripMonitoring_Delivery.xml create mode 100644 examples/functions/trip_monitoring/TripMonitoring_Subscription.xml create mode 100644 examples/functions/trip_monitoring/TripMonitoring_SubscriptionResponse.xml create mode 100644 examples/functions/trip_monitoring/TripMonitoring_TerminateSubscription.xml create mode 100644 examples/functions/trip_monitoring/TripMonitoring_TerminateSubscriptionResponse.xml diff --git a/OJP/OJP_All.xsd b/OJP/OJP_All.xsd index 5a17379c9..4e8372092 100644 --- a/OJP/OJP_All.xsd +++ b/OJP/OJP_All.xsd @@ -18,6 +18,7 @@ + diff --git a/OJP/OJP_RequestSupport.xsd b/OJP/OJP_RequestSupport.xsd index b0437b145..ed6f20e31 100644 --- a/OJP/OJP_RequestSupport.xsd +++ b/OJP/OJP_RequestSupport.xsd @@ -94,6 +94,14 @@ + + + Basic subscription request structure common for OJP subscription requests. + + + + + ========================================== Collection contexts ========================================== diff --git a/OJP/OJP_Requests.xsd b/OJP/OJP_Requests.xsd index 51591839f..946445fe7 100644 --- a/OJP/OJP_Requests.xsd +++ b/OJP/OJP_Requests.xsd @@ -297,8 +297,8 @@ The service also provides information about formation, occupancy, and capacity. - The trip refinement service retrieves additional or updated information (e.g., real-time data) about a given, previously retrieved trip. It does not depend on the assumption that the trip has been retrieved from the same server; it may, in fact, even stem from another source than a OJP system. -An example scenario may involve a trip retrieved from a system A and one wishes to refine the trip with real time information from another system B. As it cannot be ascertained that both systems use identical object IDs, this is signalled by setting ExternalObjectRefs to true. + The trip refinement service retrieves additional or updated information (e.g., real-time data) about a given, previously retrieved trip. It does not depend on the assumption that the trip has been retrieved from the same server; it may, in fact, even stem from another source than a OJP system. +An example scenario may involve a trip retrieved from a system A and one wishes to refine the trip with real time information from another system B. As it cannot be ascertained that both systems use identical object IDs, this is signalled by setting ExternalObjectRefs to true. System B, being confronted with external IDs, must try to recognise the relevant objects in another way and retrieve them in its own database. In the response it will use its own object IDs. To maintain a consistent mapping, it is imperative that system B reflects the structure of the refine request precisely in its response (principle of structure maintenance). @@ -314,8 +314,8 @@ System B, being confronted with external IDs, must try to recognise the relevant - The trip refinement service retrieves additional or updated information (e.g., real-time data) about a given, previously retrieved trip. It does not depend on the assumption that the trip has been retrieved from the same server; it may, in fact, even stem from another source than a OJP system. -An example scenario may involve a trip retrieved from a system A and one wishes to refine the trip with real time information from another system B. As it cannot be ascertained that both systems use identical object IDs, this is signalled by setting ExternalObjectRefs to true. + The trip refinement service retrieves additional or updated information (e.g., real-time data) about a given, previously retrieved trip. It does not depend on the assumption that the trip has been retrieved from the same server; it may, in fact, even stem from another source than a OJP system. +An example scenario may involve a trip retrieved from a system A and one wishes to refine the trip with real time information from another system B. As it cannot be ascertained that both systems use identical object IDs, this is signalled by setting ExternalObjectRefs to true. System B, being confronted with external IDs, must try to recognise the relevant objects in another way and retrieve them in its own database. In the response it will use its own object IDs. To maintain a consistent mapping, it is imperative that system B reflects the structure of the refine request precisely in its response (principle of structure maintenance). @@ -434,4 +434,39 @@ System B, being confronted with external IDs, must try to recognise the relevant + + ========================================== Trip Monitoring Service (Subscription) ========================================== + + + + + + + + + + + + + + + + + + Request element for terminating subscriptions. To change parameters of a subscription, it is necessary to terminate and to re-subscribe. Successful termination is acknowledged by problem code TRIPMONITORING_SUBSCRIPTION_TERMINATED in a delivery. + + + + + + + + + + + + + + + diff --git a/OJP/OJP_TripMonitoring.xsd b/OJP/OJP_TripMonitoring.xsd new file mode 100644 index 000000000..8e6e832d6 --- /dev/null +++ b/OJP/OJP_TripMonitoring.xsd @@ -0,0 +1,192 @@ + + + + OJP/OJP_TripMonitoring.xsd - Request and response definitions for trip monitoring. + + + + + =============================== Alert Settings ========================================== + + + + + + Time windows when alerts are welcome. + + + + + Maximum frequency of subsequent alerts for the same reason. + + + + + Earliest time for first alert. Measured as duration before beginning of event. Only for dated events. + + + + + + =============================== Trip Monitoring Parameters ========================================== + + + + TripMonitoring parameters. + + + + + Priority of events. + + + + + Minimum delay to send new notifications. + + + + + Whether to fetch and integrate information from other systems in the case of distributed journey planning. Default is false. + + + + + Whether alternative trips should be part of the response. Default is false. + + + + + + + =============================== Trip Monitoring Response ========================================== + + + + TripMonitoring response structure. + + + + + Result structure. + + + + + + + + + Problems related to this TripMonitoring result. + + + + + Legs of the trip affected by a change. + + + + + Details about the affected dated journeys of the trip. + + + + + Response context aggregated for all TripInfoResults. + + + + + Alternatives to a delayed or otherwise compromised trip. + + + + + Results from SIRI facility monitoring service. + + + + + + ========================================== Problems ========================================== + + + + Types of problems that may be returned in responses to trip monitoring requests. + + + + + Used to acknowledge the reception and successful registration of a subscription request. + + + + + Used to indicate the termination of the subscription. + + + + + The trip is likely to be delayed by more than 15 minutes. + + + + + The trip has a predicted delay of less than an hour. + + + + + One of the transfers will be shorter than planned. + + + + + The departure location is unknown. + + + + + The destination location is unknown. + + + + + The trip to be monitored is unknown. + + + + + The time window to send notfications is invalid, e.g., too early before the departure time. The service is nevertheless invoked, with the time window restricted to a valid interval. + + + + + A facility specified in FacilityMonitoringSubscription is unknown. + + + + + A problem has occurred that does not have a specific problem type. + + + + + + + Problem that may be returned in responses to trip monitoring requests. + + + + + Type of the trip monitoring problem. + + + + + + diff --git a/docs/generate_tables/custom-ojp.xml b/docs/generate_tables/custom-ojp.xml index 103a4c96c..39d8fbf6d 100644 --- a/docs/generate_tables/custom-ojp.xml +++ b/docs/generate_tables/custom-ojp.xml @@ -102,6 +102,7 @@ + diff --git a/examples/functions/trip_monitoring/TripMonitoring_DataSupplyRequest.xml b/examples/functions/trip_monitoring/TripMonitoring_DataSupplyRequest.xml new file mode 100644 index 000000000..67e800f69 --- /dev/null +++ b/examples/functions/trip_monitoring/TripMonitoring_DataSupplyRequest.xml @@ -0,0 +1,11 @@ + + + + + 2023-03-17T09:30:47-05:00 + 1231123 + 7788788788 + true + + + diff --git a/examples/functions/trip_monitoring/TripMonitoring_Delivery.xml b/examples/functions/trip_monitoring/TripMonitoring_Delivery.xml new file mode 100644 index 000000000..71c9a416f --- /dev/null +++ b/examples/functions/trip_monitoring/TripMonitoring_Delivery.xml @@ -0,0 +1,254 @@ + + + + + 2023-02-17T09:30:47-05:00 + + 2023-02-17T09:30:47-05:00 + 1231123 + 123123123213 + https://182.82.1.23:89912/endpoint + 23188 + + 1 + + + + 23.12312312 + 45.23012301 + + + + 1823181 + + example + + + 7 + + + 2023-02-17T09:30:47Z + 2023-02-17T09:35:47Z + 2023-02-17T09:37:47Z + + + 2023-02-17T09:30:47Z + 2023-02-17T09:38:00Z + + true + + + 2020-09-30 + 910DG:Y:R:j20:210 + + 910DG:Y + R + + rail + local + + Zug + + + IR + + + + empty + + + 82 + + + + Reservierung möglich + + A___R + + + + Bar + + A___B + + + + Maskenpflicht für Reisende ab 12 Jahren + + A__OM + + + de:00000:-1 + + Luzern + + + + + + + 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:13:00Z + + 1 + + + 8505000 + + Luzern + + + 3 + + + 2020-09-30T12:31:00Z + + 15 + + + 2020-09-30 + 910DG:Y:R:j20:211 + + 910DG:Y + R + + rail + local + + Zug + + + IR + + + + empty + + + 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 + + + PT4M + + + + 3 + + + + 47.042666496 + 8.306332108 + + + Taxiplatz Luzern + + + + + 47.06 + 8.32 + + + Destination + + + + demandResponsive + + ch:1:sboid:12391912 + + + + + onBoarding + + + + + PT15M + + + + + + + 123313113--123-1--1231 + + + notAvailable + + + + + + + diff --git a/examples/functions/trip_monitoring/TripMonitoring_Subscription.xml b/examples/functions/trip_monitoring/TripMonitoring_Subscription.xml new file mode 100644 index 000000000..9224fe069 --- /dev/null +++ b/examples/functions/trip_monitoring/TripMonitoring_Subscription.xml @@ -0,0 +1,205 @@ + + + + + 2023-02-17T09:30:47-05:00 + theClient + https://182.82.1.23:89912/endpoint + 23188 + + 1231123 + 123123123213 + 2023-02-18T09:30:47-05:00 + + ID-5A9D01A0-CF49-41E7-A674-D37167E33AEF + PT2H18M + 2020-09-30T10:03:00Z + 2020-09-30T12:21:00Z + 0 + 125484 + + 1 + OtherSystemID + + + 8506302 + + St. Gallen + + + 4 + + + 2020-09-30T10:03:00Z + + 1 + + + 8505000 + + Luzern + + + 3 + + + 2020-09-30T12:21:00Z + + 15 + + + 2020-09-30 + 910DG:Y:R:j20:210 + + 910DG:Y + R + + rail + local + + Zug + + + IR + + + + empty + + + 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 + PT2M + PT3M + + + + + onBoarding + + + + + PT13M + + + + + 2023-02-18T09:30:47-05:00 + + + 8506302 + + St. Gallen + + + + + + + 47.042666496 + 8.306332108 + + + Taxiplatz Luzern + + + + + + normal + PT8M + true + true + + + 00:30:00Z + PT60M + + PT15M + PT30M + + + + diff --git a/examples/functions/trip_monitoring/TripMonitoring_SubscriptionResponse.xml b/examples/functions/trip_monitoring/TripMonitoring_SubscriptionResponse.xml new file mode 100644 index 000000000..dea341426 --- /dev/null +++ b/examples/functions/trip_monitoring/TripMonitoring_SubscriptionResponse.xml @@ -0,0 +1,21 @@ + + + + + 2023-03-17T09:30:47-05:00 + er1231 + 2341231 + https://182.82.1.23:89912/endpoint + 23188 + + 2023-03-17T09:30:47-05:00 + 1231123 + 123123123213 + true + PT10M + + https://182.82.1.23:89912/endpoint + 2023-03-17T09:30:47-05:00 + + + diff --git a/examples/functions/trip_monitoring/TripMonitoring_TerminateSubscription.xml b/examples/functions/trip_monitoring/TripMonitoring_TerminateSubscription.xml new file mode 100644 index 000000000..06329478e --- /dev/null +++ b/examples/functions/trip_monitoring/TripMonitoring_TerminateSubscription.xml @@ -0,0 +1,13 @@ + + + + + 2004-12-17T09:30:47-05:00 + theClient + https://182.82.1.23:89912/endpoint + 1231123 + 123123123213 + 9RRR2313 + + + diff --git a/examples/functions/trip_monitoring/TripMonitoring_TerminateSubscriptionResponse.xml b/examples/functions/trip_monitoring/TripMonitoring_TerminateSubscriptionResponse.xml new file mode 100644 index 000000000..3b0f1d100 --- /dev/null +++ b/examples/functions/trip_monitoring/TripMonitoring_TerminateSubscriptionResponse.xml @@ -0,0 +1,29 @@ + + + + + 2023-03-17T09:30:47-05:00 + theClient_1231 + 2301023-12331-2237871 + https://182.82.1.23:89912/endpoint + 23188 + + 2023-03-17T09:30:47-05:00 + 1231123 + 123123123213 + true + + + 2023-03-17T09:30:47-05:00 + 1231123 + 9RRR2313 + false + + + 9RRR2313 + + + + + +