Skip to content

Commit

Permalink
Problem --> ErrorCondition (#336)
Browse files Browse the repository at this point in the history
The ErrorCode substitution group does not want to work for some reasons... but using the OtherError as substitution group is fully ok
  • Loading branch information
ue71603 authored Apr 5, 2023
1 parent 5f49fa7 commit dd4e176
Show file tree
Hide file tree
Showing 16 changed files with 283 additions and 216 deletions.
16 changes: 2 additions & 14 deletions OJP/OJP_Availability.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
<xs:documentation>Availability result structure.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Problem" type="AvailabilityProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Problems related to this AVAILABILITY result.</xs:documentation>
</xs:annotation>
Expand Down Expand Up @@ -423,17 +423,5 @@
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="AvailabilityProblemStructure">
<xs:annotation>
<xs:documentation>Problem that may be returned in responses to AVAILABILITY requests.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Type" type="AvailabilityProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Type of the AVAILABILITY problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="ProblemDetailGroup"/>
</xs:sequence>
</xs:complexType>
<xs:element name="AvailabilityProblemType" type="AvailabilityProblemTypeEnumeration" substitutionGroup="ErrorType"/>
</xs:schema>
28 changes: 23 additions & 5 deletions OJP/OJP_Common.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,34 @@
<xs:annotation>
<xs:documentation>========================================== General ==========================================</xs:documentation>
</xs:annotation>
<xs:element name="OJPError" type="OJPErrorStructure" substitutionGroup="siri:OtherError">
<xs:annotation>
<xs:documentation>Error: All OJP related errors.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="OJPErrorStructure">
<xs:annotation>
<xs:documentation>Type for Error: OJP Error.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="siri:OtherErrorStructure">
<xs:sequence>
<xs:element ref="ErrorType"/>
<xs:group ref="ProblemDetailGroup" minOccurs="0">
<xs:annotation>
<xs:documentation>ProblemDetailGroup</xs:documentation>
</xs:annotation>
</xs:group>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="ErrorType" type="xs:string" abstract="true"/>
<xs:group name="ProblemDetailGroup">
<xs:annotation>
<xs:documentation>Detailed description of the problem.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Title" type="InternationalTextStructure" minOccurs="0">
<xs:annotation>
<xs:documentation>Title of the problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Details" type="InternationalTextStructure" minOccurs="0">
<xs:annotation>
<xs:documentation>Explanation of the problem.</xs:documentation>
Expand Down
2 changes: 1 addition & 1 deletion OJP/OJP_Fare.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<xs:documentation>ID of this result.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Problem" type="FareProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Problems related to this FARE result.</xs:documentation>
</xs:annotation>
Expand Down
16 changes: 2 additions & 14 deletions OJP/OJP_FareSupport.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@
<xs:documentation>Structure of a Single Trip Fare Request result</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Problem" type="FareProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Result-specific error messages.</xs:documentation>
</xs:annotation>
Expand Down Expand Up @@ -851,17 +851,5 @@
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="FareProblemStructure">
<xs:annotation>
<xs:documentation>Problem that may be returned in responses to FARE requests.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Type" type="FareProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Type of the FARE problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="ProblemDetailGroup"/>
</xs:sequence>
</xs:complexType>
<xs:element name="FareProblemType" type="FareProblemTypeEnumeration" substitutionGroup="ErrorType"/>
</xs:schema>
16 changes: 2 additions & 14 deletions OJP/OJP_Lines.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</xs:annotation>
<xs:complexType name="LineResultStructure">
<xs:sequence>
<xs:element name="Problem" type="LineInformationProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Problems related to this Line result.</xs:documentation>
</xs:annotation>
Expand Down Expand Up @@ -81,17 +81,5 @@
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="LineInformationProblemStructure">
<xs:annotation>
<xs:documentation>Problem that may be returned in responses to LINE information requests.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Type" type="LineInformationProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Type of the LINE information problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="ProblemDetailGroup"/>
</xs:sequence>
</xs:complexType>
<xs:element name="LineInformationProblemType" type="LineInformationProblemTypeEnumeration" substitutionGroup="ErrorType"/>
</xs:schema>
4 changes: 2 additions & 2 deletions OJP/OJP_Locations.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
</xs:complexType>
<xs:complexType name="PlaceResultStructure">
<xs:sequence>
<xs:element name="Problem" type="LocationProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Problems related to this LOCATION result.</xs:documentation>
</xs:annotation>
Expand Down Expand Up @@ -405,7 +405,7 @@
</xs:group>
<xs:complexType name="ExchangePointsResultStructure">
<xs:sequence>
<xs:element name="Problem" type="ExchangePointsProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Problems related to this EXCHANGE POINTS result.</xs:documentation>
</xs:annotation>
Expand Down
28 changes: 2 additions & 26 deletions OJP/OJP_PlaceSupport.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -566,19 +566,7 @@
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="LocationProblemStructure">
<xs:annotation>
<xs:documentation>Problem that may be returned in responses to LOCATION requests.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Type" type="LocationProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Type of the LOCATION problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="ProblemDetailGroup"/>
</xs:sequence>
</xs:complexType>
<xs:element name="LocationProblemType" type="LocationProblemTypeEnumeration" substitutionGroup="ErrorType"/>
<xs:simpleType name="ExchangePointsProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Types of problems that may be returned in responses to EXCHANGE POINTS requests</xs:documentation>
Expand Down Expand Up @@ -606,17 +594,5 @@
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ExchangePointsProblemStructure">
<xs:annotation>
<xs:documentation>Problem that may be returned in responses to EXCHANGE POINTS requests.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Type" type="ExchangePointsProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Type of the EXCHANGE POINTS problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="ProblemDetailGroup"/>
</xs:sequence>
</xs:complexType>
<xs:element name="ExchangePointsProblemType" type="ExchangePointsProblemTypeEnumeration" substitutionGroup="ErrorType"/>
</xs:schema>
21 changes: 7 additions & 14 deletions OJP/OJP_RequestSupport.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<xs:documentation>Calculation time.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Problem" type="OJPGenericProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>OJP generic problem for the whole delivery.</xs:documentation>
</xs:annotation>
Expand Down Expand Up @@ -172,24 +172,17 @@
<xs:documentation>The server cannot provide the requested data frame (data version).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="OJPGENERIC_SYSTEMID_NOT_FOUND">
<xs:annotation>
<xs:documentation>The server was not able to work with the SystemID that was provided.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="OJPGENERIC_OTHER">
<xs:annotation>
<xs:documentation>A problem has occurred that does not have a specific problem type.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="OJPGenericProblemStructure">
<xs:annotation>
<xs:documentation>Problem that may be returned in case of generic problems with the request.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Type" type="OJPGenericProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Type of the generic problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="ProblemDetailGroup"/>
</xs:sequence>
</xs:complexType>
<xs:element name="OJPGenericProblemType" type="OJPGenericProblemTypeEnumeration" substitutionGroup="ErrorType"/>
</xs:schema>
16 changes: 2 additions & 14 deletions OJP/OJP_StopEvents.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
<xs:documentation>ID of this result.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Problem" type="StopEventProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Problems related to this STOPEVENT result.</xs:documentation>
</xs:annotation>
Expand Down Expand Up @@ -302,17 +302,5 @@
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="StopEventProblemStructure">
<xs:annotation>
<xs:documentation>Problem that may be returned in responses to STOPEVENT requests.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Type" type="StopEventProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Type of the STOPEVENT problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="ProblemDetailGroup"/>
</xs:sequence>
</xs:complexType>
<xs:element name="StopEventProblemType" type="StopEventProblemTypeEnumeration" substitutionGroup="ErrorType"/>
</xs:schema>
15 changes: 2 additions & 13 deletions OJP/OJP_TripInfo.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<xs:documentation>TripInfo result structure containing the current status of a trip.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Problem" type="TripInfoProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Problems related to this TripInfo result.</xs:documentation>
</xs:annotation>
Expand Down Expand Up @@ -187,16 +187,5 @@
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="TripInfoProblemStructure">
<xs:annotation>
<xs:documentation>Problem that may be returned in responses to TripInfo requests.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Type" type="TripInfoProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Type of the TripInfo problem.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element name="TripInfoProblemType" type="TripInfoProblemTypeEnumeration" substitutionGroup="ErrorType"/>
</xs:schema>
28 changes: 13 additions & 15 deletions OJP/OJP_Trips.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@
<xs:documentation>Id of this trip result for referencing purposes. Unique within trip response.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Problem" type="TripProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Problems related to this Trip result.</xs:documentation>
</xs:annotation>
Expand Down Expand Up @@ -1363,7 +1363,7 @@
<xs:documentation>Id of this trip result for referencing purposes. Unique within multipoint-trip response.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Problem" type="TripProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Problems related to this trip result.</xs:documentation>
</xs:annotation>
Expand Down Expand Up @@ -1629,24 +1629,22 @@
<xs:documentation>Too many points have been requested as departure or arrival.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="TRIP_MULTIPOINT_TYPE_NOT_SUPPORTED">
<xs:annotation>
<xs:documentation>The indicated multipoint type is not supported.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="TRIP_REFINE_LEG_UNKNOWN">
<xs:annotation>
<xs:documentation>Indicated legs do not exist.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="TRIP_OTHER">
<xs:annotation>
<xs:documentation>A problem has occurred that does not have a specific problem type.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="TripProblemStructure">
<xs:annotation>
<xs:documentation>Problem that may be returned in responses to trip requests.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Type" type="TripProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Type of the trip problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="ProblemDetailGroup"/>
</xs:sequence>
</xs:complexType>
<xs:element name="TripProblemType" type="TripProblemTypeEnumeration" substitutionGroup="ErrorType"/>
</xs:schema>
Loading

0 comments on commit dd4e176

Please sign in to comment.