Skip to content

Commit 33daf8c

Browse files
committed
Init changes for Web Annotation support.
1 parent c8763cf commit 33daf8c

File tree

1 file changed

+311
-7
lines changed

1 file changed

+311
-7
lines changed

schema/iiif_3_0.json

Lines changed: 311 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,41 @@
9292
]
9393
}
9494
},
95+
"agent": {
96+
"title": "Agent",
97+
"description": "W3C Web Annotation Agent (creator, generator)",
98+
"type": "object",
99+
"properties": {
100+
"id": { "type": "string", "format": "uri" },
101+
"type": {
102+
"oneOf": [
103+
{ "type": "string" },
104+
{ "type": "array", "items": { "type": "string" } }
105+
]
106+
},
107+
"name": { "type": "string" },
108+
"nickname": { "type": "string" },
109+
"email": { "type": "string", "format": "uri" },
110+
"email_sha1": { "type": "string" },
111+
"homepage": { "type": "string", "format": "uri" }
112+
}
113+
},
114+
"audience": {
115+
"title": "Audience",
116+
"description": "W3C Web Annotation Audience",
117+
"type": "object",
118+
"properties": {
119+
"id": { "type": "string", "format": "uri" },
120+
"type": { "type": "string" }
121+
},
122+
"required": ["type"]
123+
},
124+
"textDirection": {
125+
"title": "TextDirection",
126+
"description": "Text direction for processing",
127+
"type": "string",
128+
"enum": ["ltr", "rtl", "auto"]
129+
},
95130
"reference": {
96131
"type": "object",
97132
"additionalProperties": true,
@@ -217,7 +252,26 @@
217252
},
218253
"value": { "type": "string" },
219254
"format": { "$ref": "#/types/format" },
220-
"language": { "type": "string"}
255+
"language": { "type": "string" },
256+
"processingLanguage": { "type": "string" },
257+
"textDirection": { "$ref": "#/types/textDirection" },
258+
"purpose": {
259+
"oneOf": [
260+
{ "type": "string" },
261+
{
262+
"type": "array",
263+
"items": { "type": "string" }
264+
}
265+
]
266+
},
267+
"creator": {
268+
"oneOf": [
269+
{ "type": "string" },
270+
{ "$ref": "#/types/agent" }
271+
]
272+
},
273+
"created": { "type": "string" },
274+
"modified": { "type": "string" }
221275
},
222276
"required": ["value", "type"]
223277
},
@@ -961,6 +1015,76 @@
9611015
"additionalProperties": true,
9621016
"title": "Annotation",
9631017
"properties": {
1018+
"@context": {
1019+
"oneOf": [
1020+
{
1021+
"type": "array",
1022+
"items": {
1023+
"type": "string",
1024+
"format": "uri",
1025+
"pattern": "^http.*$"
1026+
}
1027+
},
1028+
{
1029+
"type": "string",
1030+
"format": "uri"
1031+
}
1032+
]
1033+
},
1034+
"created": { "type": "string" },
1035+
"modified": { "type": "string" },
1036+
"generated": { "type": "string" },
1037+
"creator": {
1038+
"oneOf": [
1039+
{ "type": "string" },
1040+
{ "$ref": "#/types/agent" },
1041+
{
1042+
"type": "array",
1043+
"items": {
1044+
"oneOf": [
1045+
{ "type": "string" },
1046+
{ "$ref": "#/types/agent" }
1047+
]
1048+
}
1049+
}
1050+
]
1051+
},
1052+
"generator": {
1053+
"oneOf": [
1054+
{ "type": "string" },
1055+
{ "$ref": "#/types/agent" },
1056+
{
1057+
"type": "array",
1058+
"items": {
1059+
"oneOf": [
1060+
{ "type": "string" },
1061+
{ "$ref": "#/types/agent" }
1062+
]
1063+
}
1064+
}
1065+
]
1066+
},
1067+
"audience": {
1068+
"oneOf": [
1069+
{ "$ref": "#/types/audience" },
1070+
{
1071+
"type": "array",
1072+
"items": { "$ref": "#/types/audience" }
1073+
}
1074+
]
1075+
},
1076+
"bodyValue": { "type": "string" },
1077+
"canonical": { "type": "string", "format": "uri" },
1078+
"via": {
1079+
"oneOf": [
1080+
{ "type": "string", "format": "uri" },
1081+
{
1082+
"type": "array",
1083+
"items": { "type": "string", "format": "uri" }
1084+
}
1085+
]
1086+
},
1087+
"stylesheet": { "$ref": "#/classes/stylesheet" },
9641088
"type": {
9651089
"type": "string",
9661090
"pattern": "^Annotation$",
@@ -1034,22 +1158,22 @@
10341158
"type": "object",
10351159
"properties": {
10361160
"id": { "$ref": "#/types/id" },
1037-
"type": {
1161+
"type": {
10381162
"type": "string",
10391163
"pattern": "^SpecificResource$",
10401164
"default": "SpecificResource"
10411165
},
10421166
"format": { "$ref": "#/types/format" },
10431167
"accessibility": { "type": "string"},
1044-
"source": {
1168+
"source": {
10451169
"oneOf": [
10461170
{ "$ref": "#/types/id" },
1047-
{ "$ref": "#/classes/resource" }
1171+
{ "$ref": "#/classes/resource" }
10481172
]
10491173
},
10501174
"scope": { "$ref": "#/types/id"},
1051-
"selector": {
1052-
"oneOf": [
1175+
"selector": {
1176+
"oneOf": [
10531177
{ "$ref": "#/classes/selector" },
10541178
{
10551179
"type": "array",
@@ -1058,6 +1182,42 @@
10581182
}
10591183
}
10601184
]
1185+
},
1186+
"state": {
1187+
"oneOf": [
1188+
{ "$ref": "#/classes/state" },
1189+
{
1190+
"type": "array",
1191+
"items": { "$ref": "#/classes/state" }
1192+
}
1193+
]
1194+
},
1195+
"styleClass": {
1196+
"oneOf": [
1197+
{ "type": "string" },
1198+
{
1199+
"type": "array",
1200+
"items": { "type": "string" }
1201+
}
1202+
]
1203+
},
1204+
"renderedVia": {
1205+
"oneOf": [
1206+
{ "$ref": "#/types/agent" },
1207+
{
1208+
"type": "array",
1209+
"items": { "$ref": "#/types/agent" }
1210+
}
1211+
]
1212+
},
1213+
"purpose": {
1214+
"oneOf": [
1215+
{ "type": "string" },
1216+
{
1217+
"type": "array",
1218+
"items": { "type": "string" }
1219+
}
1220+
]
10611221
}
10621222
},
10631223
"required": ["source"]
@@ -1124,7 +1284,7 @@
11241284
"title": "ImageAPISelector",
11251285
"type": "object",
11261286
"properties": {
1127-
"type": {
1287+
"type": {
11281288
"type": "string",
11291289
"pattern": "^ImageApiSelector$",
11301290
"default": "ImageApiSelector"
@@ -1136,6 +1296,150 @@
11361296
"format": { "type:": "string" }
11371297
},
11381298
"required": ["type"]
1299+
},
1300+
{
1301+
"title": "XPathSelector",
1302+
"type": "object",
1303+
"properties": {
1304+
"type": {
1305+
"type": "string",
1306+
"pattern": "^XPathSelector$",
1307+
"default": "XPathSelector"
1308+
},
1309+
"value": { "type": "string" }
1310+
},
1311+
"required": ["type", "value"]
1312+
},
1313+
{
1314+
"title": "CssSelector",
1315+
"type": "object",
1316+
"properties": {
1317+
"type": {
1318+
"type": "string",
1319+
"pattern": "^CssSelector$",
1320+
"default": "CssSelector"
1321+
},
1322+
"value": { "type": "string" }
1323+
},
1324+
"required": ["type", "value"]
1325+
},
1326+
{
1327+
"title": "TextQuoteSelector",
1328+
"type": "object",
1329+
"properties": {
1330+
"type": {
1331+
"type": "string",
1332+
"pattern": "^TextQuoteSelector$",
1333+
"default": "TextQuoteSelector"
1334+
},
1335+
"exact": { "type": "string" },
1336+
"prefix": { "type": "string" },
1337+
"suffix": { "type": "string" }
1338+
},
1339+
"required": ["type", "exact"]
1340+
},
1341+
{
1342+
"title": "TextPositionSelector",
1343+
"type": "object",
1344+
"properties": {
1345+
"type": {
1346+
"type": "string",
1347+
"pattern": "^TextPositionSelector$",
1348+
"default": "TextPositionSelector"
1349+
},
1350+
"start": { "type": "integer" },
1351+
"end": { "type": "integer" }
1352+
},
1353+
"required": ["type", "start", "end"]
1354+
},
1355+
{
1356+
"title": "DataPositionSelector",
1357+
"type": "object",
1358+
"properties": {
1359+
"type": {
1360+
"type": "string",
1361+
"pattern": "^DataPositionSelector$",
1362+
"default": "DataPositionSelector"
1363+
},
1364+
"start": { "type": "integer" },
1365+
"end": { "type": "integer" }
1366+
},
1367+
"required": ["type", "start", "end"]
1368+
},
1369+
{
1370+
"title": "RangeSelector",
1371+
"type": "object",
1372+
"properties": {
1373+
"type": {
1374+
"type": "string",
1375+
"pattern": "^RangeSelector$",
1376+
"default": "RangeSelector"
1377+
},
1378+
"startSelector": { "$ref": "#/classes/selector" },
1379+
"endSelector": { "$ref": "#/classes/selector" },
1380+
"refinedBy": { "$ref": "#/classes/selector" }
1381+
},
1382+
"required": ["type", "startSelector", "endSelector"]
1383+
}
1384+
]
1385+
},
1386+
"timeState": {
1387+
"title": "TimeState",
1388+
"description": "W3C Web Annotation TimeState for temporal resource versions",
1389+
"type": "object",
1390+
"properties": {
1391+
"type": {
1392+
"type": "string",
1393+
"pattern": "^TimeState$",
1394+
"default": "TimeState"
1395+
},
1396+
"sourceDate": { "type": "string" },
1397+
"sourceDateStart": { "type": "string" },
1398+
"sourceDateEnd": { "type": "string" },
1399+
"cached": { "type": "string", "format": "uri" }
1400+
},
1401+
"required": ["type"]
1402+
},
1403+
"httpRequestState": {
1404+
"title": "HttpRequestState",
1405+
"description": "W3C Web Annotation HttpRequestState for HTTP header requirements",
1406+
"type": "object",
1407+
"properties": {
1408+
"type": {
1409+
"type": "string",
1410+
"pattern": "^HttpRequestState$",
1411+
"default": "HttpRequestState"
1412+
},
1413+
"value": { "type": "string" }
1414+
},
1415+
"required": ["type", "value"]
1416+
},
1417+
"state": {
1418+
"title": "State",
1419+
"description": "W3C Web Annotation State (TimeState or HttpRequestState)",
1420+
"oneOf": [
1421+
{ "$ref": "#/classes/timeState" },
1422+
{ "$ref": "#/classes/httpRequestState" }
1423+
]
1424+
},
1425+
"stylesheet": {
1426+
"title": "Stylesheet",
1427+
"description": "W3C Web Annotation Stylesheet for rendering",
1428+
"oneOf": [
1429+
{ "type": "string", "format": "uri" },
1430+
{
1431+
"type": "object",
1432+
"title": "CssStylesheet",
1433+
"properties": {
1434+
"id": { "type": "string", "format": "uri" },
1435+
"type": {
1436+
"type": "string",
1437+
"pattern": "^CssStylesheet$",
1438+
"default": "CssStylesheet"
1439+
},
1440+
"value": { "type": "string" }
1441+
},
1442+
"required": ["type", "value"]
11391443
}
11401444
]
11411445
},

0 commit comments

Comments
 (0)