forked from VDVde/VDV-435-IoM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
broker_datatypes.xsd
275 lines (256 loc) · 12.2 KB
/
broker_datatypes.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:netex="http://www.netex.org.uk/netex"
xmlns="http://vdv.de/IoM" targetNamespace="http://vdv.de/IoM" elementFormDefault="qualified" version="2.0">
<!-- IMPORTANT: You need to download the files in https://github.com/nick-knowles/NeTEx-XML and extract them to directory
"NeTEx-XML" for this schema to successfully import/reference NeTEx schemas -->
<xs:import namespace="http://www.netex.org.uk/netex"
schemaLocation="../NeTEx-master-f5a5ff0/xsd/NeTEx_publication.xsd" />
<!-- ======================================================================= -->
<!-- Helpers -->
<!-- ======================================================================= -->
<xs:complexType name="AbstractBasicStructure" abstract="true">
<xs:annotation>
<xs:documentation>Abstract context for all messages, both in Request/Response and in Publish/Subscribe
</xs:documentation>
</xs:annotation>
<!-- Each message contains a timestamp -->
<xs:sequence>
<xs:element name="Timestamp" type="xs:dateTime">
<xs:annotation>
<xs:documentation>Timestamp, when the message was sent. Should at least be precise to milliseconds
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Version" type="xs:normalizedString">
<xs:annotation>
<xs:documentation>Version of the interface.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="AbstractMessageStructure" abstract="true">
<xs:annotation>
<xs:documentation>Abstract context for all messages sent in Request/Response</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="AbstractBasicStructure">
<xs:sequence>
<xs:element name="MessageId" type="UUIDType">
<xs:annotation>
<xs:documentation>Unique message id, used to reference asynchronous messages and for
logging. The
UUID should be unique in the context of the system
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="AbstractRequestStructure" abstract="true">
<xs:annotation>
<xs:documentation>Abstract context for all requests sent in Request/Response</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="AbstractMessageStructure" />
</xs:complexContent>
</xs:complexType>
<xs:complexType name="AbstractRequestWithReferenceStructure" abstract="true">
<xs:complexContent>
<xs:extension base="AbstractRequestStructure">
<xs:sequence>
<xs:element name="MessageIdRef" type="UUIDType" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="AbstractResponseStructure" abstract="true">
<xs:annotation>
<xs:documentation>Abstract context for all synchronous responses sent in Request/Response
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="AbstractMessageStructure">
<!-- Uses the same semantics and structure as in SIRI responses -->
<xs:sequence>
<xs:element name="CommonResponseCode" type="CommonResponseCodeEnumeration">
<xs:annotation>
<xs:documentation>Common response codes describing global conditions of the system,
independent from the actual request
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="InvalidMessageResponseStructure">
<xs:complexContent>
<xs:extension base="AbstractResponseStructure">
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="AbstractAsyncResponseStructure" abstract="true">
<xs:annotation>
<xs:documentation>Abstract context for all asynchronous responses sent in Request/Response
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<!-- Should inherit from AbstractRequestStructure, because it is not a response directly related to a request -->
<xs:extension base="AbstractRequestStructure">
<xs:sequence>
<xs:element name="MessageIdRef" type="UUIDType">
<xs:annotation>
<xs:documentation>Message ID to which this asynchronous message refers to
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="AbstractDataPublicationStructure">
<xs:sequence>
<xs:element name="Timestamp" type="xs:dateTime" minOccurs="1" maxOccurs="1" />
<xs:element name="Version" type="xs:normalizedString" minOccurs="1" maxOccurs="1" />
<xs:element name="TimestampOfMeasurement" type="xs:dateTime" minOccurs="1" maxOccurs="1" />
<xs:element name="PublisherId" type="IdType" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="AbstractErrorStructure" abstract="true">
<xs:annotation>
<xs:documentation>Abstract Error Structure for all potential Errors
</xs:documentation>
</xs:annotation>
</xs:complexType>
<xs:complexType name="AbstractDataStructure" abstract="true">
<xs:annotation>
<xs:documentation>Abstract Data Structure for all potential response codes
</xs:documentation>
</xs:annotation>
</xs:complexType>
<xs:complexType name="VehicleJourneyWithOperatingDayRef">
<xs:annotation>
<xs:documentation>Versioned Reference to a Vehicle Journey with its Operating Day attached
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="netex:VehicleJourneyRef" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>Versioned Reference to a Vehicle Journey
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="netex:OperatingDayRef" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>Versioned Reference to an Operating Day
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="netex:BlockRef" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Optional, versioned reference to a Block</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!-- ======================================================================= -->
<!-- Simple Helpers -->
<!-- ======================================================================= -->
<xs:simpleType name="CommonResponseCodeEnumeration">
<xs:annotation>
<xs:documentation>Common response code type describing global conditions of the system, independent from the
actual request
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="ok">
<xs:annotation>
<xs:documentation>Request successfully processed
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="messageUnderstood">
<xs:annotation>
<xs:documentation>Request has been understood, but has been declined to due business logic. Refer to
specialized ResponseCode for more information.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="unkownExtensions">
<xs:annotation>
<xs:documentation>Request contained extensions that were not supported by the producer. A response
has been provided but some or all extensions have been ignored
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="rejectedNoReasonGiven">
<xs:annotation>
<xs:documentation>Request rejected, no reason supplied
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="InvalidRequest">
<xs:annotation>
<xs:documentation>Request rejected, could not successfully parse request
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="rejectedInternalError">
<xs:annotation>
<xs:documentation>Request ignored, internal error while processing request
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="operationNotAvailable">
<xs:annotation>
<xs:documentation>Requested operation is not available at this time
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="operationNotSupported">
<xs:annotation>
<xs:documentation>Requested operation is not supported
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="versionNotSupported">
<xs:annotation>
<xs:documentation>The request has a version of IoM, that is currently not supported
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Unauthorized">
<xs:annotation>
<xs:documentation>HTTP_ONLY: The requestor is not authorized to perform the request
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Other">
<xs:annotation>
<xs:documentation>Other error occurred, more information may be written to the Extensions field
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="UUIDType">
<xs:annotation>
<xs:documentation>Type for UUID used to identify messages, e.g. 123e4567-e89b-12d3-a456-426655440000
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" />
</xs:restriction>
</xs:simpleType>
<!-- TODO: validate regex for VDV431 identifiers -->
<xs:simpleType name="IdType">
<xs:annotation>
<xs:documentation>Simple type for VDV431 and IFOPT identifiers, e.g.
CountryCode:Region:StopPlaceNumber:Quay:StopPoint
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:ID">
<xs:pattern value="([A-Za-z0-9]+:)*([A-Za-z0-9])+" />
</xs:restriction>
</xs:simpleType>
</xs:schema>