forked from distributed-text-services/specifications
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDTS.radl
432 lines (383 loc) · 13.2 KB
/
DTS.radl
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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
<?xml version="1.0" encoding="UTF-8"?>
<service name="DTS API" radl-version="1.0"
xmlns="urn:radl:service"
xmlns:html="http://www.w3.org/1999/xhtml">
<documentation>
</documentation>
<states>
<start-state>
<transitions>
<transition name="Access" to="Reading Endpoint Details">
<documentation>The process starts when the client accesses the API.</documentation>
</transition>
</transitions>
</start-state>
<state name="Reading Endpoint Details" property-group="endpoint">
<transitions>
<transition name="List protocols" to="Reading Protocols">
<documentation>
Once the client has accessed the API, it lists the protocols to see what the API supports.
</documentation>
</transition>
<transition name="Find textobject" to="Reading Query Results">
<documentation>
Client queries to find available instances of a TextObject
</documentation>
<input property-group="TextObjectURN"/>
<input property-group="OtherFilterCriteria"/>
</transition>
</transitions>
</state>
<state name="Reading Protocols" property-group="protocols">
<transitions>
<transition name="Choose cts protocol" to="Reading CTS NameSpaces">
<documentation>
The client chooses the CTS protocol
</documentation>
<input property-group="protocoltype"/>
</transition>
<transition name="Choose dts protocol" to="Reading DTS TopLevel">
<documentation>
The client chooses the DTS protocol
</documentation>
<input property-group="protocoltype"/>
</transition>
</transitions>
</state>
<state name="Reading Query Results" property-group="queryresults">
<transitions>
<transition name="Traverse cts version" to="Reading CTS Locations">
<documentation>
The client chooses to traverse locations in a CTS Version
</documentation>
<input property-group="TextObjectURN"/>
</transition>
<transition name="Choose cts version" to="Reading TextObject">
<documentation>
The client chooses a CTS Version
</documentation>
<input property-group="TextObjectURN"/>
</transition>
<transition name="Choose dts writtenwork" to="Reading TextObject">
<documentation>
The client chooses a DTS WrittenWork
</documentation>
<input property-group="TextObjectURN"/>
</transition>
</transitions>
</state>
<state name="Reading CTS NameSpaces" property-group="cts protocol">
<transitions>
<transition name="Choose cts namespace" to="Reading CTS TextGroups">
<documentation>
The client chooses a CTS Namespace
</documentation>
<input property-group="CTSURNComponent"/>
</transition>
</transitions>
</state>
<state name="Reading CTS TextGroups" property-group="cts namespace">
<transitions>
<transition name="Choose cts textgroup" to="Reading CTS Works">
<input property-group="CTSURNComponent"/>
<documentation>
The client chooses a CTS Textgroup
</documentation>
</transition>
</transitions>
</state>
<state name="Reading CTS Works" property-group="cts textgroup">
<transitions>
<transition name="Choose cts work" to="Reading CTSVersions">
<input property-group="CTSURNComponent"/>
<documentation>
The client chooses a CTS Work
</documentation>
</transition>
</transitions>
</state>
<state name="Reading CTS Versions" property-group="cts work">
<transitions>
<transition name="Traverse cts version" to="Reading CTS Locations">
<input property-group="CTSURNComponent"/>
<documentation>
The client chooses to traverse locations in a CTS Version
</documentation>
</transition>
<transition name="Choose cts version" to="Reading TextObject">
<input property-group="TextObjectURN"/>
<documentation>
The client chooses to retrieve text of an entire version.
</documentation>
</transition>
</transitions>
</state>
<state name="Reading CTS Locations" property-group="cts locationlist">
<transitions>
<transition name="Traverse cts location" to="Reading CTS Locations">
<input property-group="CTSURNComponent"/>
<documentation>
The client chooses to traverse child locations in a CTS Location
</documentation>
</transition>
<transition name="Choose cts location" to="Reading TextObject">
<input property-group="TextObjectURN"/>
<documentation>
The client chooses to retrieve text of a CTS location
</documentation>
</transition>
</transitions>
</state>
<state name="Reading TextObject" property-group="textobject">
<documentation>
The text is retrieved.
</documentation>
</state>
</states>
<link-relations>
<link-relation name="http://example.org/protocols">
<specification href="http://example.org/protocols"/>
<transitions>
<transition ref="List protocols"/>
</transitions>
</link-relation>
<link-relation name="http://example.org/dtstophierarchy">
<specification href="http://example.org/dtstophierarchy"/>
<transitions>
<transition ref="Choose dts protocol"/>
</transitions>
</link-relation>
<link-relation name="http://example.org/ctsnamespaces">
<specification href="http://example.org/ctsnamespaces"/>
<transitions>
<transition ref="Choose cts protocol"/>
</transitions>
</link-relation>
<link-relation name="http://example.org/ctstextgroups">
<specification href="http://example.org/ctstextgroups"/>
<transitions>
<transition ref="Choose cts namespace"/>
</transitions>
</link-relation>
<link-relation name="http://example.org/ctsworks">
<specification href="http://example.org/ctsworks"/>
<transitions>
<transition ref="Choose cts textgroup"/>
</transitions>
</link-relation>
<link-relation name="http://example.org/ctsversions">
<specification href="http://example.org/ctsversions"/>
<transitions>
<transition ref="Choose cts work"/>
</transitions>
</link-relation>
<link-relation name="http://example.org/ctslocations">
<specification href="http://example.org/ctslocations"/>
<transitions>
<transition ref="Traverse cts version"/>
</transitions>
</link-relation>
<link-relation name="http://example.org/text">
<specification href="http://example.org/text"/>
<transitions>
<transition ref="Choose cts version"/>
<transition ref="Choose cts location"/>
<transition ref="Choose dts writtenwork"/>
<transition ref="Choose dts location"/>
</transitions>
</link-relation>
</link-relations>
<property-groups>
<property-group name="endpoint" uri="http://example.org/endpoint"/>
<property-group name="queryresults" uri="http://example.org/queryresults"/>
<property-group name="protocols" uri="http://example.org/protocols"/>
<property-group name="protocoltype" uri="http://example.org/protocoltype"/>
<property-group name="CTSURNComponent" uri="http://example.org/CTSURNComponent"/>
<property-group name="TextObjectURN" uri="http://example.org/TextObjectURN"/>
<property-group name="OtherFilterCriteria" uri="http://example.org/OtherFilterCriteria"/>
</property-groups>
<media-types default="application/xml">
<media-type name="text/html">
<specification href="https://html.spec.whatwg.org/"></specification>
</media-type>
<media-type name="application/xml">
<specification href="https://www.w3.org/TR/xml11/"></specification>
</media-type>
<media-type name="application/ld+json">
<specification href="http://www.w3.org/TR/json-ld/"/>
</media-type>
</media-types>
<errors>
<error name="/not-found" status-code="404">
<documentation>The URI you requested doesn't exist.</documentation>
</error>
<error name="/server-error" status-code="500">
<documentation>Oh, I am slain!</documentation>
</error>
</errors>
<conventions>
<uri-template-variables>
<uri-template-variable name="cts-ns">
<documentation>
A CTS namespace, e.g. "greekLit".
</documentation>
</uri-template-variable>
<uri-template-variable name="text-group">
<documentation>
A CTS Text Group. Usually corresponds to the collected works of an author.
</documentation>
</uri-template-variable>
<uri-template-variable name="work">
<documentation>
A CTS Work.
</documentation>
</uri-template-variable>
<uri-template-variable name="edition">
<documentation>
The id of an edition or translation of a work.
</documentation>
</uri-template-variable>
<uri-template-variable name="location">
<documentation>
A location within an edition, translation, or work
</documentation>
</uri-template-variable>
</uri-template-variables>
</conventions>
<resources>
<resource name="Endpoint">
<location uri="/"/>
<methods>
<method name="GET">
<transitions>
<transition ref="Access"/>
</transitions>
<response/>
</method>
</methods>
</resource>
<resource name="Protocols">
<location uri="/protocols/"/>
<methods>
<method name="GET">
<transitions>
<transition ref="List protocols"/>
</transitions>
<response/>
</method>
</methods>
</resource>
<resource name="TextObjectQuery">
<location uri="/query/"/>
<methods>
<method name="GET">
<transitions>
<transition ref="Find textobject"/>
</transitions>
<response/>
</method>
</methods>
</resource>
<resource name="Catalogs">
<location uri="/catalogs/"/>
<methods>
<method name="GET">
<transitions>
<transition ref="List catalogs"/>
</transitions>
<response/>
</method>
</methods>
</resource>
<resource name="CTSNamespaces">
<location uri="/cts/"/>
<methods>
<method name="GET">
<transitions>
<transition ref="Choose cts protocol"/>
</transitions>
<response/>
</method>
</methods>
</resource>
<resource name="DTSTopLevel">
<location uri="/dts/"/>
<methods>
<method name="GET">
<transitions>
<transition ref="Choose dts protocol"/>
</transitions>
<response/>
</method>
</methods>
</resource>
<resource name="CTSTextGroups">
<location uri-template="/cts/{cts-ns}/"/>
<methods>
<method name="GET">
<transitions>
<transition ref="Choose cts namespace"/>
</transitions>
<response/>
</method>
</methods>
</resource>
<resource name="CTSWorks">
<location uri-template="/cts/{cts-ns}/{text-group}/"/>
<methods>
<method name="GET">
<transitions>
<transition ref="Choose cts textgroup"/>
</transitions>
<response/>
</method>
</methods>
</resource>
<resource name="CTSVersions">
<location uri-template="/cts/{cts-ns}/{text-group}/{work}/"/>
<methods>
<method name="GET">
<transitions>
<transition ref="Chose cts work"/>
</transitions>
<response/>
</method>
</methods>
</resource>
<resource name="CTSLocationList">
<location uri-template="/cts/{cts-ns}/{text-group}/{work}/{edition}/locations/"/>
<methods>
<method name="GET">
<transitions>
<transition ref="Traverse cts version"/>
</transitions>
<response/>
</method>
</methods>
</resource>
<resource name="CTSSubLocationList">
<location uri-template="/cts/{cts-ns}/{text-group}/{work}/{edition}/locations/{location}/"/>
<methods>
<method name="GET">
<transitions>
<transition ref="Traverse cts location"/>
</transitions>
<response/>
</method>
</methods>
</resource>
<resource name="TextObject">
<location uri-template="/text/{uri}/"/>
<methods>
<method name="GET">
<transitions>
<transition ref="Choose cts location"/>
<transition ref="Choose cts version"/>
<transition ref="Choose dts writtenwork"/>
</transitions>
<response/>
</method>
</methods>
</resource>
</resources>
</service>