@lincs.project/webannotation-schema 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,621 +0,0 @@
1
- {
2
- "$id": "https://wa.lincsproject.ca/v1/schema.jsonld",
3
- "type": "object",
4
- "description": "Web Annotation",
5
- "properties": {
6
- "@context": {
7
- "type": "array",
8
- "minItems": 2,
9
- "maxItems": 2,
10
- "items": [
11
- {
12
- "type": "string",
13
- "const": "http://www.w3.org/ns/anno.jsonld"
14
- },
15
- {
16
- "type": "string",
17
- "const": "https://wa.lincsproject.ca/v1/ns/anno.jsonld"
18
- }
19
- ],
20
- "description": "The context that determines the meaning of the JSON as an Annotation. The itens should point to a URI containing the defiintion used in this schema."
21
- },
22
- "id": {
23
- "anyOf": [
24
- {
25
- "type": "string",
26
- "format": "uri",
27
- "description": "Idealy, this this uri must be a concatenation of an URI and UUID with an \"_\"."
28
- },
29
- {
30
- "type": "string",
31
- "format": "uuid"
32
- }
33
- ],
34
- "description": "The identity of the Annotation. It must be a URI or UUID."
35
- },
36
- "type": {
37
- "type": "array",
38
- "minItems": 2,
39
- "maxItems": 2,
40
- "items": [
41
- {
42
- "type": "string",
43
- "const": "Annotation"
44
- },
45
- {
46
- "type": "string",
47
- "const": "crm:E33_Linguistic_Object"
48
- }
49
- ],
50
- "description": "The type of the Annotation."
51
- },
52
- "motivation": {
53
- "type": "array",
54
- "minItems": 2,
55
- "maxItems": 2,
56
- "items": [
57
- {
58
- "type": "string",
59
- "enum": [
60
- "identifying",
61
- "describing",
62
- "correcting",
63
- "tagging",
64
- "classifying",
65
- "linking",
66
- "citing"
67
- ]
68
- },
69
- {
70
- "type": "string",
71
- "const": "crm:E33_Linguistic_Object"
72
- }
73
- ],
74
- "description": "The relationship between an Annotation and a Motivation."
75
- },
76
- "created": {
77
- "type": "string",
78
- "format": "date-time",
79
- "description": "The time at which the resource was created."
80
- },
81
- "modified": {
82
- "type": "string",
83
- "format": "date-time",
84
- "description": "The time at which the resource was modified, after creation."
85
- },
86
- "creator": {
87
- "$ref": "defs.jsonld#/definitions/creator"
88
- },
89
- "contributor": {
90
- "type": "array",
91
- "items": {
92
- "$ref": "defs.jsonld#/definitions/creator"
93
- },
94
- "minItems": 1
95
- },
96
- "generator": {
97
- "$ref": "defs.jsonld#/definitions/software"
98
- },
99
- "target": {
100
- "$ref": "defs.jsonld#/definitions/target"
101
- },
102
- "body": {
103
- "$ref": "defs.jsonld#/definitions/body"
104
- },
105
- "status": {
106
- "type": "string",
107
- "enum": [
108
- "draft",
109
- "approved",
110
- "published"
111
- ]
112
- }
113
- },
114
- "required": [
115
- "@context",
116
- "id",
117
- "type",
118
- "motivation",
119
- "created",
120
- "creator",
121
- "generator",
122
- "target",
123
- "body",
124
- "status"
125
- ],
126
- "allOf": [
127
- {
128
- "if": {
129
- "type": "object",
130
- "properties": {
131
- "status": {
132
- "const": "published"
133
- }
134
- }
135
- },
136
- "then": {
137
- "type": "object",
138
- "properties": {
139
- "id": {
140
- "type": "string",
141
- "format": "uri"
142
- }
143
- },
144
- "required": [
145
- "status"
146
- ]
147
- },
148
- "else": {
149
- "type": "object",
150
- "properties": {
151
- "id": {
152
- "type": "string",
153
- "format": "uuid"
154
- }
155
- },
156
- "required": [
157
- "status"
158
- ]
159
- }
160
- },
161
- {
162
- "if": {
163
- "type": "object",
164
- "properties": {
165
- "body": {
166
- "type": "object",
167
- "properties": {
168
- "entityType": {
169
- "oneOf": [
170
- {
171
- "type": "array",
172
- "minItems": 2,
173
- "maxItems": 2,
174
- "items": [
175
- {
176
- "type": "string",
177
- "const": "Person"
178
- },
179
- {
180
- "oneOf": [
181
- {
182
- "type": "string",
183
- "const": "crm:E21_Person",
184
- "description": "Real Person"
185
- },
186
- {
187
- "type": "string",
188
- "const": "crm:E89_Propositional_Object",
189
- "description": "Fictional Person"
190
- }
191
- ]
192
- }
193
- ]
194
- },
195
- {
196
- "oneOf": [
197
- {
198
- "type": "string",
199
- "const": "cwrc:place"
200
- },
201
- {
202
- "type": "array",
203
- "minItems": 2,
204
- "maxItems": 2,
205
- "items": [
206
- {
207
- "type": "string",
208
- "const": "cwrc:place"
209
- },
210
- {
211
- "type": "string",
212
- "const": "crm:E89_Propositional_Object",
213
- "description": "Fictional Place"
214
- }
215
- ]
216
- }
217
- ]
218
- },
219
- {
220
- "type": "array",
221
- "minItems": 2,
222
- "maxItems": 2,
223
- "items": [
224
- {
225
- "type": "string",
226
- "const": "foaf:Organization"
227
- },
228
- {
229
- "oneOf": [
230
- {
231
- "type": "string",
232
- "const": "crm:E74_Group",
233
- "description": "Real Organization"
234
- },
235
- {
236
- "type": "string",
237
- "const": "crm:E89_Propositional_Object",
238
- "description": "Fictional Organization"
239
- }
240
- ]
241
- }
242
- ]
243
- },
244
- {
245
- "type": "array",
246
- "minItems": 2,
247
- "maxItems": 2,
248
- "items": [
249
- {
250
- "type": "string",
251
- "const": "crm:E89_Propositional_Object"
252
- },
253
- {
254
- "oneOf": [
255
- {
256
- "type": "string",
257
- "const": "frbroo:F1",
258
- "description": "Real Work"
259
- },
260
- {
261
- "type": "string",
262
- "const": "wikidata:Q15306849",
263
- "description": "Fictional Work"
264
- }
265
- ]
266
- }
267
- ]
268
- },
269
- {
270
- "oneOf": [
271
- {
272
- "type": "string",
273
- "const": "crm:E18_Physical_Thing"
274
- },
275
- {
276
- "type": "array",
277
- "minItems": 2,
278
- "maxItems": 2,
279
- "items": [
280
- {
281
- "type": "string",
282
- "const": "crm:E18_Physical_Thing"
283
- },
284
- {
285
- "type": "string",
286
- "const": "wikidata:Q15831596",
287
- "description": "Fictional Physical Thing"
288
- }
289
- ]
290
- }
291
- ]
292
- },
293
- {
294
- "oneOf": [
295
- {
296
- "type": "string",
297
- "const": "crm:E28_Conceptual_Object"
298
- },
299
- {
300
- "type": "array",
301
- "minItems": 2,
302
- "maxItems": 2,
303
- "items": [
304
- {
305
- "type": "string",
306
- "const": "crm:E28_Conceptual_Object"
307
- },
308
- {
309
- "type": "string",
310
- "const": "wikidata:Q15831596",
311
- "description": "Fictional Conceptual Object"
312
- }
313
- ]
314
- }
315
- ]
316
- },
317
- {
318
- "type": "array",
319
- "minItems": 2,
320
- "maxItems": 2,
321
- "items": [
322
- {
323
- "type": "string",
324
- "const": "xsd:date"
325
- },
326
- {
327
- "type": "string",
328
- "const": "crm:E52_Time-Span"
329
- }
330
- ]
331
- }
332
- ]
333
- }
334
- }
335
- }
336
- }
337
- },
338
- "then": {
339
- "type": "object",
340
- "properties": {
341
- "motivation": {
342
- "type": "array",
343
- "minItems": 2,
344
- "maxItems": 2,
345
- "items": [
346
- {
347
- "type": "string",
348
- "const": "identifying"
349
- },
350
- {
351
- "type": "string",
352
- "const": "crm:E33_Linguistic_Object"
353
- }
354
- ]
355
- }
356
- }
357
- },
358
- "else": {
359
- "if": {
360
- "type": "object",
361
- "properties": {
362
- "body": {
363
- "type": "object",
364
- "properties": {
365
- "entityType": {
366
- "type": "string",
367
- "const": "crm:E33_Linguistic_Object"
368
- }
369
- }
370
- }
371
- }
372
- },
373
- "then": {
374
- "type": "object",
375
- "properties": {
376
- "motivation": {
377
- "type": "array",
378
- "minItems": 2,
379
- "maxItems": 2,
380
- "items": [
381
- {
382
- "type": "string",
383
- "const": "describing"
384
- },
385
- {
386
- "type": "string",
387
- "const": "crm:E33_Linguistic_Object"
388
- }
389
- ]
390
- }
391
- }
392
- },
393
- "else": {
394
- "if": {
395
- "type": "object",
396
- "properties": {
397
- "body": {
398
- "type": "object",
399
- "properties": {
400
- "entityType": {
401
- "type": "array",
402
- "minItems": 2,
403
- "maxItems": 2,
404
- "items": [
405
- {
406
- "type": "string",
407
- "const": "fabio:Correction"
408
- },
409
- {
410
- "type": "string",
411
- "const": "crm:E33_Linguistic_Object"
412
- }
413
- ]
414
- }
415
- }
416
- }
417
- }
418
- },
419
- "then": {
420
- "type": "object",
421
- "properties": {
422
- "motivation": {
423
- "type": "array",
424
- "minItems": 2,
425
- "maxItems": 2,
426
- "items": [
427
- {
428
- "type": "string",
429
- "const": "correcting"
430
- },
431
- {
432
- "type": "string",
433
- "const": "crm:E33_Linguistic_Object"
434
- }
435
- ]
436
- }
437
- }
438
- },
439
- "else": {
440
- "if": {
441
- "type": "object",
442
- "properties": {
443
- "body": {
444
- "type": "object",
445
- "properties": {
446
- "entityType": {
447
- "type": "array",
448
- "minItems": 2,
449
- "maxItems": 2,
450
- "items": [
451
- {
452
- "type": "string",
453
- "const": "crm:E55_Type"
454
- },
455
- {
456
- "type": "string",
457
- "const": "crm:E33_Linguistic_Object"
458
- }
459
- ]
460
- }
461
- }
462
- }
463
- }
464
- },
465
- "then": {
466
- "type": "object",
467
- "properties": {
468
- "motivation": {
469
- "type": "array",
470
- "minItems": 2,
471
- "maxItems": 2,
472
- "items": [
473
- {
474
- "type": "string",
475
- "const": "tagging"
476
- },
477
- {
478
- "type": "string",
479
- "const": "crm:E33_Linguistic_Object"
480
- }
481
- ]
482
- }
483
- }
484
- },
485
- "else": {
486
- "if": {
487
- "type": "object",
488
- "properties": {
489
- "body": {
490
- "type": "object",
491
- "properties": {
492
- "entityType": {
493
- "type": "array",
494
- "minItems": 2,
495
- "maxItems": 2,
496
- "items": [
497
- {
498
- "type": "string",
499
- "const": "crm:E55_Type"
500
- },
501
- {
502
- "type": "string",
503
- "const": "crmdig:D1_Digital_Object"
504
- }
505
- ]
506
- }
507
- }
508
- }
509
- }
510
- },
511
- "then": {
512
- "type": "object",
513
- "properties": {
514
- "motivation": {
515
- "type": "array",
516
- "minItems": 2,
517
- "maxItems": 2,
518
- "items": [
519
- {
520
- "type": "string",
521
- "const": "classifying"
522
- },
523
- {
524
- "type": "string",
525
- "const": "crm:E33_Linguistic_Object"
526
- }
527
- ]
528
- }
529
- }
530
- },
531
- "else": {
532
- "if": {
533
- "type": "object",
534
- "properties": {
535
- "body": {
536
- "type": "object",
537
- "properties": {
538
- "entityType": {
539
- "type": "string",
540
- "const": "crmdig:D1_Digital_Object"
541
- }
542
- }
543
- }
544
- }
545
- },
546
- "then": {
547
- "type": "object",
548
- "properties": {
549
- "motivation": {
550
- "type": "array",
551
- "minItems": 2,
552
- "maxItems": 2,
553
- "items": [
554
- {
555
- "type": "string",
556
- "const": "linking"
557
- },
558
- {
559
- "type": "string",
560
- "const": "crm:E33_Linguistic_Object"
561
- }
562
- ]
563
- }
564
- }
565
- },
566
- "else": {
567
- "if": {
568
- "type": "object",
569
- "properties": {
570
- "body": {
571
- "type": "object",
572
- "properties": {
573
- "entityType": {
574
- "type": "array",
575
- "minItems": 2,
576
- "maxItems": 2,
577
- "items": [
578
- {
579
- "type": "string",
580
- "const": "cito:Citation"
581
- },
582
- {
583
- "type": "string",
584
- "const": "crm:E73_Information_Object"
585
- }
586
- ]
587
- }
588
- }
589
- }
590
- }
591
- },
592
- "then": {
593
- "type": "object",
594
- "properties": {
595
- "motivation": {
596
- "type": "array",
597
- "minItems": 2,
598
- "maxItems": 2,
599
- "items": [
600
- {
601
- "type": "string",
602
- "const": "citing"
603
- },
604
- {
605
- "type": "string",
606
- "const": "crm:E33_Linguistic_Object"
607
- }
608
- ]
609
- }
610
- }
611
- }
612
- }
613
- }
614
- }
615
- }
616
- }
617
- }
618
- }
619
- ],
620
- "additionalProperties": false
621
- }