Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update trip refinement #298

Merged
merged 20 commits into from
Apr 5, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update after discussion
and example
ue71603 committed Apr 5, 2023
commit e8b83254d26d97b4018407fb16c06120459952ac
15 changes: 10 additions & 5 deletions OJP/OJP_Trips.xsd
Original file line number Diff line number Diff line change
@@ -1484,11 +1484,16 @@
<xs:documentation>If true, then the request may contain object references from another system. Default is FALSE.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="RefineLegRef" type="xs:NMTOKEN" maxOccurs="unbounded" minOccurs="0">
<xs:annotation>
<xs:documentation>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).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="RefineLegRef" type="xs:NMTOKEN" maxOccurs="unbounded" minOccurs="0">
<xs:annotation>
<xs:documentation>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).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SystemId" type="xs:normalizedString" minOccurs="0">
<xs:annotation>
<xs:documentation>System reference to use for the refinement. If not specified the origin system of each leg are used for the refinement.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="UseRealtimeData" type="UseRealtimeDataEnumeration" default="full" minOccurs="0">
<xs:annotation>
<xs:documentation>Usage of real-time data in refinement. Default is "full".</xs:documentation>
153 changes: 153 additions & 0 deletions examples/functions/RefinementRequest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<OJP xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.siri.org.uk/siri" xmlns:ojp="http://www.vdv.de/ojp" version="1.1-dev" xsi:schemaLocation="http://www.siri.org.uk/siri ../../OJP.xsd">
<OJPRequest>
<ServiceRequest>
<RequestTimestamp>2022-12-19T12:00:00Z</RequestTimestamp>
<RequestorRef>IRMA</RequestorRef>
<ojp:OJPTripRefineRequest>
<RequestTimestamp>2022-12-19T12:00:00Z</RequestTimestamp>
<MessageIdentifier>4711</MessageIdentifier>
<ojp:RefineParams>
<ojp:RefineLegRef>1</ojp:RefineLegRef>
<ojp:RefineLegRef>2</ojp:RefineLegRef>
<ojp:RefineLegRef>4</ojp:RefineLegRef>
<ojp:SystemId>SBB:ojp:prod</ojp:SystemId>
<ojp:UseRealtimeData>full</ojp:UseRealtimeData>
<ojp:IncludeIntermediateStops>true</ojp:IncludeIntermediateStops>
<ojp:IncludeAlternativeOptions>true</ojp:IncludeAlternativeOptions>
<ojp:IncludeFare>true</ojp:IncludeFare>
<ojp:HikingProfile>difficult</ojp:HikingProfile>
<ojp:CyclingProfile>comfortable</ojp:CyclingProfile>
<ojp:FareParam>
<ojp:FareAuthorityFilter>OSDM-NOVA-Prod</ojp:FareAuthorityFilter>
<ojp:PassengerCategory>Senior</ojp:PassengerCategory>
<ojp:PassengerCategory>Disabled</ojp:PassengerCategory>
<ojp:Traveller>
<ojp:Age>85</ojp:Age>
</ojp:Traveller>
</ojp:FareParam>
</ojp:RefineParams>
<ojp:TripResult>
<ojp:ResultId>ID-5A9D01A0-CF49-41E7-A674-D37167E33AEF</ojp:ResultId>
<ojp:Trip>
<ojp:TripId>ID-5A9D01A0-CF49-41E7-A674-D37167E33AEF</ojp:TripId>
<ojp:Duration>PT2H18M</ojp:Duration>
<ojp:StartTime>2020-09-30T10:03:00Z</ojp:StartTime>
<ojp:EndTime>2020-09-30T12:21:00Z</ojp:EndTime>
<ojp:Transfers>0</ojp:Transfers>
<ojp:Distance>125484</ojp:Distance>
<ojp:TripLeg>
<ojp:LegId>1</ojp:LegId>
<ojp:TimedLeg>
<ojp:LegBoard>
<StopPointRef>8506302</StopPointRef>
<ojp:StopPointName>
<ojp:Text>St. Gallen</ojp:Text>
</ojp:StopPointName>
<ojp:PlannedQuay>
<ojp:Text xml:lang="de">4</ojp:Text>
</ojp:PlannedQuay>
<ojp:ServiceDeparture>
<ojp:TimetabledTime>2020-09-30T10:03:00Z</ojp:TimetabledTime>
</ojp:ServiceDeparture>
<ojp:Order>1</ojp:Order>
</ojp:LegBoard>
<ojp:LegAlight>
<StopPointRef>8505000</StopPointRef>
<ojp:StopPointName>
<ojp:Text>Luzern</ojp:Text>
</ojp:StopPointName>
<ojp:PlannedQuay>
<ojp:Text xml:lang="de">3</ojp:Text>
</ojp:PlannedQuay>
<ojp:ServiceArrival>
<ojp:TimetabledTime>2020-09-30T12:21:00Z</ojp:TimetabledTime>
</ojp:ServiceArrival>
<ojp:Order>15</ojp:Order>
</ojp:LegAlight>
<ojp:Service>
<ojp:OperatingDayRef>2020-09-30</ojp:OperatingDayRef>
<ojp:JourneyRef>ojp:910DG:Y:R:j20:210</ojp:JourneyRef>
<LineRef>ojp:910DG:Y</LineRef>
<DirectionRef>R</DirectionRef>
<ojp:Mode>
<ojp:PtMode>rail</ojp:PtMode>
<RailSubmode>local</RailSubmode>
<ojp:Name>
<ojp:Text xml:lang="de">Zug</ojp:Text>
</ojp:Name>
<ojp:ShortName>
<ojp:Text xml:lang="de">IR</ojp:Text>
</ojp:ShortName>
</ojp:Mode>
<ojp:PublishedServiceName>
<ojp:Text>empty</ojp:Text>
</ojp:PublishedServiceName>
<ojp:OperatorRefs>
<ojp:OperatorRef>ojp:82</ojp:OperatorRef>
</ojp:OperatorRefs>
<ojp:Attribute>
<ojp:Text>
<ojp:Text xml:lang="de">Reservierung möglich</ojp:Text>
</ojp:Text>
<ojp:Code>A___R</ojp:Code>
</ojp:Attribute>
<ojp:Attribute>
<ojp:Text>
<ojp:Text xml:lang="de">Bar</ojp:Text>
</ojp:Text>
<ojp:Code>A___B</ojp:Code>
</ojp:Attribute>
<ojp:Attribute>
<ojp:Text>
<ojp:Text xml:lang="de">Maskenpflicht für Reisende ab 12 Jahren</ojp:Text>
</ojp:Text>
<ojp:Code>A__OM</ojp:Code>
</ojp:Attribute>
<ojp:DestinationStopPointRef>de:00000:-1</ojp:DestinationStopPointRef>
<ojp:DestinationText>
<ojp:Text xml:lang="de">Luzern</ojp:Text>
</ojp:DestinationText>
</ojp:Service>
<ojp:Extension>
<ojp:TransportTypeName>
<ojp:Text xml:lang="de">Voralpen-Express</ojp:Text>
</ojp:TransportTypeName>
<ojp:PublishedJourneyNumber>
<ojp:Text xml:lang="de">2020</ojp:Text>
</ojp:PublishedJourneyNumber>
</ojp:Extension>
</ojp:TimedLeg>
</ojp:TripLeg>
</ojp:Trip>
</ojp:TripResult>
<ojp:TripResponseContext>
<ojp:Operators>
<ojp:Operator>
<OperatorRef>ch:1:sboid:1230123</OperatorRef>
<OperatorName>New rail company</OperatorName>
</ojp:Operator>
</ojp:Operators>
<ojp:Places>
<ojp:Place>
<ojp:StopPlace>
<ojp:StopPlaceRef>8530813</ojp:StopPlaceRef>
<ojp:StopPlaceName>
<ojp:Text>Zürich Kreuzplatz</ojp:Text>
</ojp:StopPlaceName>
<ojp:TopographicPlaceRef>23026261:27</ojp:TopographicPlaceRef>
</ojp:StopPlace>
<ojp:Name>
<ojp:Text xml:lang="de">Zürich</ojp:Text>
</ojp:Name>
<ojp:GeoPosition>
<Longitude>8.55408</Longitude>
<Latitude>47.36488</Latitude>
</ojp:GeoPosition>
</ojp:Place>
</ojp:Places>
</ojp:TripResponseContext>
</ojp:OJPTripRefineRequest>
</ServiceRequest>
</OJPRequest>
</OJP>
111 changes: 111 additions & 0 deletions examples/functions/RefinementResponse.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<siri:OJP xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:siri="http://www.siri.org.uk/siri" xmlns:ojp="http://www.vdv.de/ojp" version="1.1-dev" xsi:schemaLocation="http://www.siri.org.uk/siri ../../OJP.xsd">
<siri:OJPResponse>
<siri:ServiceDelivery>
<siri:ResponseTimestamp>2022-12-01T17:54:38Z</siri:ResponseTimestamp>
<siri:ProducerRef>OJPCH_Prod</siri:ProducerRef>
<siri:Status>true</siri:Status>
<ojp:OJPTripRefineDelivery>
<siri:ResponseTimestamp>2022-12-01T17:54:38Z</siri:ResponseTimestamp>
<siri:RequestMessageRef>4711</siri:RequestMessageRef>
<siri:Status>true</siri:Status>
<ojp:CalcTime>421</ojp:CalcTime>
<ojp:UnknownLegRef>4</ojp:UnknownLegRef>
<ojp:TripResult>
<ojp:ResultId>ID-5A9D01A0-CF49-41E7-A674-D37167E33AEF</ojp:ResultId>
<ojp:Trip>
<ojp:TripId>ID-5A9D01A0-CF49-41E7-A674-D37167E33AEF</ojp:TripId>
<ojp:Duration>PT2H18M</ojp:Duration>
<ojp:StartTime>2020-09-30T10:03:00Z</ojp:StartTime>
<ojp:EndTime>2020-09-30T12:21:00Z</ojp:EndTime>
<ojp:Transfers>0</ojp:Transfers>
<ojp:Distance>125484</ojp:Distance>
<ojp:TripLeg>
<ojp:LegId>1</ojp:LegId>
<ojp:TimedLeg>
<ojp:LegBoard>
<siri:StopPointRef>8506302</siri:StopPointRef>
<ojp:StopPointName>
<ojp:Text>St. Gallen</ojp:Text>
</ojp:StopPointName>
<ojp:PlannedQuay>
<ojp:Text xml:lang="de">4</ojp:Text>
</ojp:PlannedQuay>
<ojp:ServiceDeparture>
<ojp:TimetabledTime>2020-09-30T10:03:00Z</ojp:TimetabledTime>
</ojp:ServiceDeparture>
<ojp:Order>1</ojp:Order>
</ojp:LegBoard>
<ojp:LegAlight>
<siri:StopPointRef>8505000</siri:StopPointRef>
<ojp:StopPointName>
<ojp:Text>Luzern</ojp:Text>
</ojp:StopPointName>
<ojp:PlannedQuay>
<ojp:Text xml:lang="de">3</ojp:Text>
</ojp:PlannedQuay>
<ojp:ServiceArrival>
<ojp:TimetabledTime>2020-09-30T12:21:00Z</ojp:TimetabledTime>
</ojp:ServiceArrival>
<ojp:Order>15</ojp:Order>
</ojp:LegAlight>
<ojp:Service>
<ojp:OperatingDayRef>2020-09-30</ojp:OperatingDayRef>
<ojp:JourneyRef>ojp:910DG:Y:R:j20:210</ojp:JourneyRef>
<siri:LineRef>ojp:910DG:Y</siri:LineRef>
<siri:DirectionRef>R</siri:DirectionRef>
<ojp:Mode>
<ojp:PtMode>rail</ojp:PtMode>
<siri:RailSubmode>local</siri:RailSubmode>
<ojp:Name>
<ojp:Text xml:lang="de">Zug</ojp:Text>
</ojp:Name>
<ojp:ShortName>
<ojp:Text xml:lang="de">IR</ojp:Text>
</ojp:ShortName>
</ojp:Mode>
<ojp:PublishedServiceName>
<ojp:Text>empty</ojp:Text>
</ojp:PublishedServiceName>
<ojp:OperatorRefs>
<ojp:OperatorRef>ojp:82</ojp:OperatorRef>
</ojp:OperatorRefs>
<ojp:Attribute>
<ojp:Text>
<ojp:Text xml:lang="de">Reservierung möglich</ojp:Text>
</ojp:Text>
<ojp:Code>A___R</ojp:Code>
</ojp:Attribute>
<ojp:Attribute>
<ojp:Text>
<ojp:Text xml:lang="de">Bar</ojp:Text>
</ojp:Text>
<ojp:Code>A___B</ojp:Code>
</ojp:Attribute>
<ojp:Attribute>
<ojp:Text>
<ojp:Text xml:lang="de">Maskenpflicht für Reisende ab 12 Jahren</ojp:Text>
</ojp:Text>
<ojp:Code>A__OM</ojp:Code>
</ojp:Attribute>
<ojp:DestinationStopPointRef>de:00000:-1</ojp:DestinationStopPointRef>
<ojp:DestinationText>
<ojp:Text xml:lang="de">Luzern</ojp:Text>
</ojp:DestinationText>
</ojp:Service>
<ojp:Extension>
<ojp:TransportTypeName>
<ojp:Text xml:lang="de">Voralpen-Express</ojp:Text>
</ojp:TransportTypeName>
<ojp:PublishedJourneyNumber>
<ojp:Text xml:lang="de">2020</ojp:Text>
</ojp:PublishedJourneyNumber>
</ojp:Extension>
</ojp:TimedLeg>
</ojp:TripLeg>
</ojp:Trip>
</ojp:TripResult>
</ojp:OJPTripRefineDelivery>
</siri:ServiceDelivery>
</siri:OJPResponse>
</siri:OJP>