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

All existing examples adapted to current state #334

Merged
merged 7 commits into from
Mar 13, 2023
Merged
21 changes: 21 additions & 0 deletions examples/functions/error/error_response.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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">
<OJPResponse>
<ServiceDelivery>
<ResponseTimestamp>2020-11-30T09:57:29Z</ResponseTimestamp>
<ProducerRef>OJPCH_Prod</ProducerRef>
<Status>true</Status>
<ojp:OJPStopEventDelivery>
<ResponseTimestamp>2020-11-30T09:57:29Z</ResponseTimestamp>
<RequestMessageRef>756</RequestMessageRef>
<Status>false</Status>
<ErrorCondition>
<NoInfoForTopicError number="0">
<ErrorText>STOPEVENT_NOEVENTFOUND</ErrorText>
</NoInfoForTopicError>
</ErrorCondition>
<ojp:CalcTime>78</ojp:CalcTime>
</ojp:OJPStopEventDelivery>
</ServiceDelivery>
</OJPResponse>
</OJP>
22 changes: 22 additions & 0 deletions examples/functions/exchange_point/ExchangePoints_001_Request.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<OJP xmlns:ojp="http://www.vdv.de/ojp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.siri.org.uk/siri" version="1.1-dev" xsi:schemaLocation="http://www.siri.org.uk/siri ../../../OJP.xsd">
<OJPRequest>
<ServiceRequest>
<RequestTimestamp>2022-01-19T12:00:00Z</RequestTimestamp>
<RequestorRef>IRMA</RequestorRef>
<ojp:OJPExchangePointsRequest>
<RequestTimestamp>2022-01-19T12:00:00Z</RequestTimestamp>
<MessageIdentifier>4712</MessageIdentifier>
<ojp:PlaceRef>
<ojp:GeoPosition>
<Longitude>7.589563</Longitude>
<Latitude>47.547412</Latitude>
</ojp:GeoPosition>
<ojp:Name>
<ojp:Text>Basel SBB</ojp:Text>
</ojp:Name>
</ojp:PlaceRef>
</ojp:OJPExchangePointsRequest>
</ServiceRequest>
</OJPRequest>
</OJP>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<siri:OJP xmlns:ojp="http://www.vdv.de/ojp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:siri="http://www.siri.org.uk/siri" version="1.1-dev" xsi:schemaLocation="http://www.siri.org.uk/siri ../../../OJP.xsd">
<!-- This (hypothetical) example includes illustrations of the following changes for V1.1:
- PR #58 - Illustrative example of WaitDuration in ExchangePointsResultStructure
-->
<siri:OJPResponse>
<siri:ServiceDelivery>
<siri:ResponseTimestamp>2021-08-25T17:34:02Z</siri:ResponseTimestamp>
<siri:ProducerRef>OJPCH_Prod</siri:ProducerRef>
<siri:Status>true</siri:Status>
<ojp:OJPExchangePointsDelivery>
<siri:ResponseTimestamp>2021-08-25T17:34:01Z</siri:ResponseTimestamp>
<siri:RequestMessageRef>4712</siri:RequestMessageRef>
<siri:Status>true</siri:Status>
<ojp:CalcTime>60</ojp:CalcTime>
<ojp:ExchangePointsResult>
<ojp:Place>
<ojp:StopPlace>
<ojp:StopPlaceRef>8500010</ojp:StopPlaceRef>
<ojp:StopPlaceName>
<ojp:Text>Basel SBB</ojp:Text>
</ojp:StopPlaceName>
<ojp:TopographicPlaceRef>23005701:2</ojp:TopographicPlaceRef>
</ojp:StopPlace>
<ojp:Name>
<ojp:Text xml:lang="de">Basel SBB (Basel)</ojp:Text>
</ojp:Name>
<ojp:GeoPosition>
<siri:Longitude>7.58956</siri:Longitude>
<siri:Latitude>47.54741</siri:Latitude>
</ojp:GeoPosition>
</ojp:Place>
<ojp:WaitDuration>PT10M</ojp:WaitDuration>
<!-- V1.1, PR #58 - Illustration of WaitDuration -->
</ojp:ExchangePointsResult>
</ojp:OJPExchangePointsDelivery>
</siri:ServiceDelivery>
</siri:OJPResponse>
</siri:OJP>
164 changes: 164 additions & 0 deletions examples/functions/fare/Fare_001_Request_PR_59_92_95_123.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
<?xml version="1.0" encoding="UTF-8"?>
<OJP xmlns:ojp="http://www.vdv.de/ojp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.siri.org.uk/siri" version="1.1-dev" xsi:schemaLocation="http://www.siri.org.uk/siri ../../../OJP.xsd">
<!-- This (hypothetical) example includes illustrations of the following changes for V1.1:
- PR #123 - WebLinkStructure
- PR #59 - MIME type in an arbitrary WebLinkStructure
- PR #95 - ProductCategoryStructure
- PR #92 - Extension in DatedJourneyStructure
- PR #92 - not included: Extension in ContinuousServiceStructure
-->
<OJPRequest>
<ServiceRequest>
<RequestTimestamp>2022-01-19T12:00:00Z</RequestTimestamp>
<RequestorRef>IRMA</RequestorRef>
<ojp:OJPFareRequest>
<RequestTimestamp>2022-01-19T12:00:00Z</RequestTimestamp>
<MessageIdentifier>4712</MessageIdentifier>
<ojp:TripFareRequest>
<ojp:Trip>
<ojp:Id>ID-1232663C-71EF-4E51-8F72-3C0D4A48A809</ojp:Id>
<ojp:Duration>PT38M</ojp:Duration>
<ojp:StartTime>2021-08-20T13:25:00Z</ojp:StartTime>
<ojp:EndTime>2021-08-20T14:03:00Z</ojp:EndTime>
<ojp:Transfers>0</ojp:Transfers>
<ojp:Leg>
<ojp:Id>1</ojp:Id>
<ojp:TimedLeg>
<ojp:LegBoard>
<StopPointRef>8504376</StopPointRef>
<ojp:StopPointName>
<ojp:Text>St. Petersinsel Nord</ojp:Text>
</ojp:StopPointName>
<ojp:ServiceDeparture>
<ojp:TimetabledTime>2021-08-20T13:40:00Z</ojp:TimetabledTime>
</ojp:ServiceDeparture>
<ojp:Order>1</ojp:Order>
</ojp:LegBoard>
<ojp:LegAlight>
<StopPointRef>8504375</StopPointRef>
<ojp:StopPointName>
<ojp:Text>Ligerz (Schiff)</ojp:Text>
</ojp:StopPointName>
<ojp:ServiceArrival>
<ojp:TimetabledTime>2021-08-20T13:50:00Z</ojp:TimetabledTime>
</ojp:ServiceArrival>
<ojp:Order>2</ojp:Order>
</ojp:LegAlight>
<ojp:Service>
<ojp:OperatingDayRef>2021-08-20</ojp:OperatingDayRef>
<ojp:JourneyRef>ojp:9400B:Y:H:j21:14</ojp:JourneyRef>
<LineRef>ojp:9400B:Y</LineRef>
<DirectionRef>H</DirectionRef>
<ojp:Mode>
<ojp:PtMode>water</ojp:PtMode>
<WaterSubmode>unknown</WaterSubmode>
<ojp:Name>
<ojp:Text xml:lang="de">Schiff</ojp:Text>
</ojp:Name>
<ojp:ShortName>
<ojp:Text xml:lang="de">BAT</ojp:Text>
</ojp:ShortName>
</ojp:Mode>
<ojp:ProductCategory>
<!-- V1.1, PR #95 - Illustration of ProductCategory -->
<ojp:Name>
<ojp:Text>Dampfschiff</ojp:Text>
</ojp:Name>
</ojp:ProductCategory>
<ojp:PublishedServiceName>
<ojp:Text>BAT</ojp:Text>
</ojp:PublishedServiceName>
<ojp:OperatorRefs>
<ojp:OperatorRef>ojp:182</ojp:OperatorRef>
</ojp:OperatorRefs>
<ojp:Attribute>
<ojp:Text>
<ojp:Text xml:lang="de">Nur 2. Klasse</ojp:Text>
</ojp:Text>
<ojp:Code>A___2</ojp:Code>
</ojp:Attribute>
<ojp:Attribute>
<ojp:Text>
<ojp:Text xml:lang="de">Restaurant</ojp:Text>
</ojp:Text>
<ojp:Code>A__WR</ojp:Code>
<RefreshmentFacility>restaurantService</RefreshmentFacility>
</ojp:Attribute>
<ojp:DestinationStopPointRef>de:00000:-1</ojp:DestinationStopPointRef>
<ojp:DestinationText>
<ojp:Text xml:lang="de">Biel/Bienne (Schiff/bateau)</ojp:Text>
</ojp:DestinationText>
<ojp:Extension>
<!-- V1.1, PR #92 - Illustration of new Extension -->
<ojp:TransportTypeName>
<ojp:Text xml:lang="de">Schiff</ojp:Text>
</ojp:TransportTypeName>
<ojp:PublishedJourneyNumber>
<ojp:Text xml:lang="de">301</ojp:Text>
</ojp:PublishedJourneyNumber>
</ojp:Extension>
</ojp:Service>
<ojp:LegTrack>
<ojp:TrackSection>
<ojp:TrackStart>
<StopPointRef>8504376</StopPointRef>
<ojp:Name>
<ojp:Text xml:lang="de">St. Petersinsel Nord</ojp:Text>
</ojp:Name>
</ojp:TrackStart>
<ojp:TrackEnd>
<StopPointRef>8504375</StopPointRef>
<ojp:Name>
<ojp:Text xml:lang="de">Ligerz (Schiff)</ojp:Text>
</ojp:Name>
</ojp:TrackEnd>
<ojp:LinkProjection>
<ojp:Position>
<Longitude>7.13561</Longitude>
<Latitude>47.06832</Latitude>
</ojp:Position>
<ojp:Position>
<Longitude>7.13537</Longitude>
<Latitude>47.06836</Latitude>
</ojp:Position>
<ojp:Position>
<Longitude>7.13537</Longitude>
<Latitude>47.06836</Latitude>
</ojp:Position>
<ojp:Position>
<Longitude>7.13435</Longitude>
<Latitude>47.07271</Latitude>
</ojp:Position>
<ojp:Position>
<Longitude>7.13435</Longitude>
<Latitude>47.07611</Latitude>
</ojp:Position>
<ojp:Position>
<Longitude>7.13478</Longitude>
<Latitude>47.07891</Latitude>
</ojp:Position>
<ojp:Position>
<Longitude>7.13551</Longitude>
<Latitude>47.08329</Latitude>
</ojp:Position>
</ojp:LinkProjection>
<ojp:Duration>PT10M</ojp:Duration>
<ojp:Length>1671</ojp:Length>
</ojp:TrackSection>
</ojp:LegTrack>
<ojp:Extension>
<ojp:TransportTypeName>
<ojp:Text xml:lang="de">Schiff</ojp:Text>
</ojp:TransportTypeName>
<ojp:PublishedJourneyNumber>
<ojp:Text xml:lang="de">72</ojp:Text>
</ojp:PublishedJourneyNumber>
</ojp:Extension>
</ojp:TimedLeg>
</ojp:Leg>
</ojp:Trip>
</ojp:TripFareRequest>
</ojp:OJPFareRequest>
</ServiceRequest>
</OJPRequest>
</OJP>
46 changes: 46 additions & 0 deletions examples/functions/fare/Fare_002_Response_PR_59_60_123.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<siri:OJP xmlns:ojp="http://www.vdv.de/ojp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:siri="http://www.siri.org.uk/siri" version="1.1-dev" xsi:schemaLocation="http://www.siri.org.uk/siri ../../../OJP.xsd">
<!-- This (hypothetical) example includes illustrations of the following changes for V1.1:
- PR #123 - WebLinkStructure
- PR #59 - MIME type and embeddability in an arbitrary WebLinkStructure
- PR #60 - ProtoProduct
-->
<siri:OJPResponse>
<siri:ServiceDelivery>
<siri:ResponseTimestamp>2021-08-25T17:34:02Z</siri:ResponseTimestamp>
<siri:ProducerRef>OJPCH_Prod</siri:ProducerRef>
<siri:Status>true</siri:Status>
<ojp:OJPFareDelivery>
<siri:ResponseTimestamp>2021-08-25T17:34:01Z</siri:ResponseTimestamp>
<siri:RequestMessageRef>4712</siri:RequestMessageRef>
<siri:Status>true</siri:Status>
<ojp:CalcTime>60</ojp:CalcTime>
<ojp:FareResult>
<ojp:Id>2021-08-25-AX754</ojp:Id>
<!-- arbitrary, freely invented id -->
<ojp:TripFareResult>
<ojp:FareProduct>
<ojp:FareProductId>87</ojp:FareProductId>
<ojp:FareProductName>Aktion Inselhupf</ojp:FareProductName>
<ojp:FareAuthorityRef>CH-BSG</ojp:FareAuthorityRef>
<ojp:FareAuthorityText>BSG Bielsersee-Schifffahrts-Gesellschaft</ojp:FareAuthorityText>
<ojp:ProtoProduct>false</ojp:ProtoProduct>
<!-- V1.1, PR #60 - Illustration of ProtoProduct -->
</ojp:FareProduct>
<ojp:StaticInfoUrl>
<!-- V1.1, PR #123 - Illustration of WebLinkStructure -->
<ojp:Label>
<ojp:Text xml:lang="de">Link zum Angebot</ojp:Text>
</ojp:Label>
<ojp:Url>https://github.com/VDVde/OJP/pull/59/files</ojp:Url>
<ojp:MimeType>text/html</ojp:MimeType>
<!-- V1.1, PR #59 - Illustration of MIME type in a WebLinkStructure -->
<ojp:Embeddable>false</ojp:Embeddable>
<!-- V1.1, PR #59 - Illustration of Embeddable in a WebLinkStructure -->
</ojp:StaticInfoUrl>
</ojp:TripFareResult>
</ojp:FareResult>
</ojp:OJPFareDelivery>
</siri:ServiceDelivery>
</siri:OJPResponse>
</siri:OJP>
23 changes: 23 additions & 0 deletions examples/functions/location/LIR_01_request_simple_StopPoint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?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>2020-01-19T12:00:00Z</RequestTimestamp>
<RequestorRef>IRMA</RequestorRef>
<ojp:OJPLocationInformationRequest>
<RequestTimestamp>2020-01-19T12:00:00Z</RequestTimestamp>
<MessageIdentifier>4711</MessageIdentifier>
<ojp:PlaceRef>
<StopPointRef>8530813</StopPointRef>
<ojp:Name>
<ojp:Text>Zürich Kreuzplatz</ojp:Text>
</ojp:Name>
</ojp:PlaceRef>
<ojp:Restrictions>
<ojp:Type>stop</ojp:Type>
<ojp:IncludePtModes>true</ojp:IncludePtModes>
</ojp:Restrictions>
</ojp:OJPLocationInformationRequest>
</ServiceRequest>
</OJPRequest>
</OJP>
48 changes: 48 additions & 0 deletions examples/functions/location/LIR_01_response_simple_StopPoint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?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>2020-10-01T17:54:38Z</siri:ResponseTimestamp>
<siri:ProducerRef>OJPCH_Prod</siri:ProducerRef>
<siri:Status>true</siri:Status>
<ojp:OJPLocationInformationDelivery>
<siri:ResponseTimestamp>2020-10-01T17:54:38Z</siri:ResponseTimestamp>
<siri:RequestMessageRef>4711</siri:RequestMessageRef>
<siri:Status>true</siri:Status>
<ojp:CalcTime>20</ojp:CalcTime>
<ojp:PlaceResult>
<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>
<siri:Longitude>8.55408</siri:Longitude>
<siri:Latitude>47.36488</siri:Latitude>
</ojp:GeoPosition>
</ojp:Place>
<ojp:Complete>true</ojp:Complete>
<ojp:Probability>1</ojp:Probability>
<ojp:Mode>
<ojp:PtMode>rail</ojp:PtMode>
<siri:RailSubmode>unknown</siri:RailSubmode>
</ojp:Mode>
<ojp:Mode>
<ojp:PtMode>tram</ojp:PtMode>
<siri:TramSubmode>cityTram</siri:TramSubmode>
</ojp:Mode>
<ojp:Mode>
<ojp:PtMode>bus</ojp:PtMode>
<siri:BusSubmode>localBusService</siri:BusSubmode>
</ojp:Mode>
</ojp:PlaceResult>
</ojp:OJPLocationInformationDelivery>
</siri:ServiceDelivery>
</siri:OJPResponse>
</siri:OJP>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?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>2020-01-19T12:00:00Z</RequestTimestamp>
<RequestorRef>IRMA</RequestorRef>
<ojp:OJPLocationInformationRequest>
<RequestTimestamp>2020-01-19T12:00:00Z</RequestTimestamp>
<MessageIdentifier>4712</MessageIdentifier>
<ojp:InitialInput>
<ojp:Name>Bern</ojp:Name>
</ojp:InitialInput>
<ojp:Restrictions>
<ojp:Type>stop</ojp:Type>
<ojp:IncludePtModes>true</ojp:IncludePtModes>
</ojp:Restrictions>
</ojp:OJPLocationInformationRequest>
</ServiceRequest>
</OJPRequest>
</OJP>
Loading