Skip to content

Commit

Permalink
Merge f2b9b5c into 711b8ca
Browse files Browse the repository at this point in the history
  • Loading branch information
glenrobson committed Dec 4, 2019
2 parents 711b8ca + f2b9b5c commit e4ac281
Show file tree
Hide file tree
Showing 6 changed files with 289 additions and 66 deletions.
37 changes: 37 additions & 0 deletions fixtures/3/broken_collection.json
@@ -0,0 +1,37 @@
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://example.org/iiif/collection/top",
"type": "Collection",
"summary": { "en": [ "Short summary of the Collection" ] },
"requiredStatement": {
"label": { "en": [ "Attribution" ] },
"value": { "en": [ "Provided by Example Organization" ] }
},
"behavior": [ "multi-part" ],
"items": [
{
"id": "https://example.org/iiif/1/manifest",
"type": "Manifest",
"label": { "en": [ "Example Manifest 1" ] },
"thumbnail": [
{
"id": "https://example.org/manifest1/thumbnail.jpg",
"type": "Image",
"format": "image/jpeg"
}
]
},
{
"id": "https://example.org/iiif/2/manifest",
"type": "Manifest",
"label": { "en": [ "Example Manifest 2" ] },
"thumbnail": [
{
"id": "https://example.org/manifest2/thumbnail.jpg",
"type": "Image",
"format": "image/jpeg"
}
]
}
]
}
3 changes: 1 addition & 2 deletions fixtures/3/full_example.json
Expand Up @@ -50,7 +50,7 @@
"behavior": [ "paged" ],
"navDate": "1856-01-01T00:00:00Z",

"rights": "https://creativecommons.org/licenses/by/4.0/",
"rights": "http://creativecommons.org/licenses/by/4.0",
"requiredStatement": {
"label": { "en": [ "Attribution" ] },
"value": { "en": [ "Provided by Example Organization" ] }
Expand Down Expand Up @@ -233,7 +233,6 @@
"type": "Annotation",
"motivation": "commenting",
"body": {
"id": "https://example.org/iiif/book1/annotationPage/Body/id",
"type": "TextualBody",
"language": "en",
"value": "I love this manifest!"
Expand Down
49 changes: 49 additions & 0 deletions fixtures/3/version2image.json
@@ -0,0 +1,49 @@
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://example.org/iiif/book1/manifest",
"type": "Manifest",
"label": { "en": [ "Book 1" ] },
"items": [
{
"id": "https://example.org/iiif/book1/canvas/p1",
"type": "Canvas",
"label": { "none": [ "p. 1" ] },
"height": 1000,
"width": 750,
"items": [
{
"id": "https://example.org/iiif/book1/page/p1/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://example.org/iiif/book1/annotation/p0001-image",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://example.org/iiif/book1/page1/full/full/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"service": [
{
"@id": "https://example.org/iiif2/image1/identifier",
"@type": "ImageService2",
"profile": "http://iiif.io/api/image/2/level2.json"
}
],
"height": 2000,
"width": 1500
},
"target": "https://example.org/iiif/book1/canvas/p1"
}
]
}
],
"annotations": [
{
"id": "https://example.org/iiif/book1/comments/p1/1",
"type": "AnnotationPage"
}
]
}
]
}
227 changes: 176 additions & 51 deletions schema/iiif_3_0.json
Expand Up @@ -128,56 +128,71 @@
"required": ["type", "items"]
},
"resource": {
"type": "object",
"properties": {
"id": { "$ref": "#/types/id" },
"type": {
"oneOf": [
{
"type": "string",
"pattern": "^Image$"
},
{
"type": "string",
"pattern": "^Sound$"
},
{
"type": "string",
"pattern": "^Video$"
"oneOf": [
{
"title": "Annotation bodies MUST have an id and type property.",
"type": "object",
"properties": {
"id": { "$ref": "#/types/id" },
"type": {
"oneOf": [
{
"type": "string",
"pattern": "^Image$"
},
{
"type": "string",
"pattern": "^Sound$"
},
{
"type": "string",
"pattern": "^Video$"
},
{
"type": "string",
"pattern": "^Model$"
},
{
"type": "string",
"pattern": "^Dataset$"
},
{
"type": "string",
"pattern": "^Text$"
} ]
},
{
"type": "string",
"pattern": "^Model$"
"height": {
"type": "integer"
},
{
"type": "string",
"pattern": "^Dataset$"
"width": {
"type": "integer"
},
{
"type": "string",
"pattern": "^Text$"
"duration": {
"$ref": "#/types/duration"
},
{
"language": { "type": "string"},
"service": { "$ref": "#/classes/service" },
"format": { "$ref": "#/types/format" },
"label": {"$ref": "#/types/lngString" }
},
"required": ["id", "type"]
},
{
"title": "Annotation bodies which are TextualBody MUST have an type and value property.",
"type": "object",
"properties": {
"id": { "$ref": "#/types/id" },
"type": {
"type": "string",
"pattern": "^TextualBody$"
}
]
},
"height": {
"type": "integer"
},
"width": {
"type": "integer"
},
"duration": {
"$ref": "#/types/duration"
},
"language": { "type": "string"},
"service": { "$ref": "#/classes/service" },
"format": { "$ref": "#/types/format" },
"label": {"$ref": "#/types/lngString" }
},
"required": ["id","type"]
},
"value": { "type": "string" },
"format": { "$ref": "#/types/format" },
"language": { "type": "string"}
},
"required": ["value", "type"]
}
]
},
"imgSvr": {
"allOf": [
Expand All @@ -194,22 +209,131 @@
"service": {
"type": "array",
"items": {
"allOf": [
{ "$ref": "#/types/class" },
"oneOf": [
{
"allOf": [
{ "$ref": "#/types/class" },
{
"type": "object",
"properties": {
"profile": { "type": "string" },
"service": { "$ref": "#/classes/service" }
}
}
]
},
{
"type": "object",
"properties": {
"@id": { "$ref": "#/types/id" },
"@type": { "type": "string" },
"profile": { "type": "string" },
"service": { "$ref": "#/classes/service" }
}
},
"required": ["@id", "@type"]
}
]
}
},
"rights": {
"type": "string",
"format": "uri",
"pattern": "^http.*$"
"title": "Rights URI isn't from either Creative Commons or Rights statements.org. Both require http links.",
"oneOf": [
{
"type": "string",
"format": "uri",
"pattern": "http://creativecommons.org/licenses/by/4.0"
},
{
"type": "string",
"format": "uri",
"pattern": "http://creativecommons.org/licenses/by-sa/4.0"
},
{
"type": "string",
"format": "uri",
"pattern": "http://creativecommons.org/licenses/by-nd/4.0"
},
{
"type": "string",
"format": "uri",
"pattern": "http://creativecommons.org/licenses/by-nc/4.0"
},
{
"type": "string",
"format": "uri",
"pattern": "http://creativecommons.org/licenses/by-nc-sa/4.0"
},
{
"type": "string",
"format": "uri",
"pattern": "http://creativecommons.org/licenses/by-nc-nd/4.0"
},
{
"type": "string",
"format": "uri",
"pattern": "http://creativecommons.org/publicdomain/mark/1.0/"
},
{
"type": "string",
"format": "uri",
"pattern": "http://rightsstatements.org/vocab/InC/1.0/"
},
{
"type": "string",
"format": "uri",
"pattern": "http://rightsstatements.org/vocab/InC-OW-EU/1.0/"
},
{
"type": "string",
"format": "uri",
"pattern": "http://rightsstatements.org/vocab/InC-EDU/1.0/"
},
{
"type": "string",
"format": "uri",
"pattern": "http://rightsstatements.org/vocab/InC-NC/1.0/"
},
{
"type": "string",
"format": "uri",
"pattern": "http://rightsstatements.org/vocab/InC-RUU/1.0/"
},
{
"type": "string",
"format": "uri",
"pattern": "http://rightsstatements.org/vocab/NoC-CR/1.0/"
},
{
"type": "string",
"format": "uri",
"pattern": "http://rightsstatements.org/vocab/NoC-NC/1.0/"
},
{
"type": "string",
"format": "uri",
"pattern": "http://rightsstatements.org/vocab/NoC-OKLR/1.0/"
},
{
"type": "string",
"format": "uri",
"pattern": "http://rightsstatements.org/vocab/NoC-US/1.0/"
},
{
"type": "string",
"format": "uri",
"pattern": "http://rightsstatements.org/vocab/CNE/1.0/"
},
{
"type": "string",
"format": "uri",
"pattern": "http://rightsstatements.org/vocab/UND/1.0/"
},
{
"type": "string",
"format": "uri",
"pattern": "http://rightsstatements.org/vocab/NKC/1.0/"
}
]
},
"navDate": {
"type": "string",
Expand Down Expand Up @@ -368,7 +492,8 @@
"$ref": "#/classes/annotationPage"
}
}
}
},
"required": ["id", "type", "label"]
}
]
},
Expand Down

0 comments on commit e4ac281

Please sign in to comment.