Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api-v2): Generate IIIF manifest (DSP-50) #1784

Merged
merged 18 commits into from May 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/03-apis/api-v2/reading-and-searching-resources.md
Expand Up @@ -534,6 +534,18 @@ called [Gravsearch: Virtual Graph Search](query-language.md)).

To convert standoff markup to TEI/XML, see [TEI/XML](tei-xml.md).

### IIIF Manifests

This is an experimental feature and may change.

To generate a IIIF manifest for a resource, containing
the still image representations that have `knora-api:isPartOf` (or a subproperty)
pointing to that resource:

```
HTTP GET to http://host/v2/resources//iiifmanifest/RESOURCE_IRI
```

### Reading Resources by Class from a Project

To facilitate the development of tabular user interfaces for data entry, it is
Expand Down
82 changes: 82 additions & 0 deletions test_data/all_data/anything-data.ttl
Expand Up @@ -1830,6 +1830,88 @@
knora-base:valueHasString "header.xsl";
knora-base:valueHasUUID "geQNPU4USB61YhNHHarQ5A" .

<http://rdfh.ch/0001/thing-with-pages> a anything:Thing;
knora-base:attachedToUser <http://rdfh.ch/users/9XBCrDV3SRa7kS1WwynB4Q>;
knora-base:attachedToProject <http://rdfh.ch/projects/0001>;
knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember";
knora-base:creationDate "2021-05-11T10:00:00Z"^^xsd:dateTime;
rdfs:label "thing with pages";
knora-base:isDeleted false .

<http://rdfh.ch/0001/thing-page-1> a anything:ThingPicture;
knora-base:isDeleted false;
knora-base:attachedToUser <http://rdfh.ch/users/9XBCrDV3SRa7kS1WwynB4Q>;
knora-base:attachedToProject <http://rdfh.ch/projects/0001>;
rdfs:label "page 1";
knora-base:hasPermissions "CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:UnknownUser";
knora-base:creationDate "2021-05-11T10:00:00Z"^^xsd:dateTime;
knora-base:hasStillImageFileValue <http://rdfh.ch/0001/thing-page-1/values/1> ;
knora-base:isPartOf <http://rdfh.ch/0001/thing-with-pages> ;
knora-base:isPartOfValue <http://rdfh.ch/0001/thing-page-1/values/2> .

<http://rdfh.ch/0001/thing-page-1/values/1> a knora-base:StillImageFileValue;
knora-base:valueHasUUID "goZ7JFRNSeqF-dNxsqAS7Q"^^xsd:string;
knora-base:valueHasString "test.tiff";
knora-base:originalFilename "test.tiff";
knora-base:originalMimeType "image/tiff";
knora-base:internalFilename "page1.jp2";
knora-base:internalMimeType "image/jp2";
knora-base:valueCreationDate "2021-05-11T10:00:00Z"^^xsd:dateTime;
knora-base:isDeleted false;
knora-base:attachedToUser <http://rdfh.ch/users/9XBCrDV3SRa7kS1WwynB4Q>;
knora-base:dimX 512;
knora-base:dimY 256;
knora-base:hasPermissions "CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:UnknownUser" .

<http://rdfh.ch/0001/thing-page-1/values/2> a knora-base:LinkValue;
knora-base:valueHasUUID "goZ7JFRNSeqF-dNxsqAS7Q"^^xsd:string;
rdf:subject <http://rdfh.ch/0001/thing-page-1>;
rdf:predicate knora-base:isPartOf;
rdf:object <http://rdfh.ch/0001/thing-with-pages>;
knora-base:valueHasRefCount 1;
knora-base:valueCreationDate "2021-05-11T10:00:00Z"^^xsd:dateTime;
knora-base:isDeleted false;
knora-base:attachedToUser <http://rdfh.ch/users/9XBCrDV3SRa7kS1WwynB4Q>;
knora-base:valueHasString "http://rdfh.ch/0001/thing-with-pages";
knora-base:hasPermissions "CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:UnknownUser" .

<http://rdfh.ch/0001/thing-page-2> a anything:ThingPicture;
knora-base:isDeleted false;
knora-base:attachedToUser <http://rdfh.ch/users/9XBCrDV3SRa7kS1WwynB4Q>;
knora-base:attachedToProject <http://rdfh.ch/projects/0001>;
rdfs:label "page 2";
knora-base:hasPermissions "CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:UnknownUser";
knora-base:creationDate "2021-05-11T10:00:00Z"^^xsd:dateTime;
knora-base:hasStillImageFileValue <http://rdfh.ch/0001/thing-page-2/values/1> ;
knora-base:isPartOf <http://rdfh.ch/0001/thing-with-pages> ;
knora-base:isPartOfValue <http://rdfh.ch/0001/thing-page-2/values/2> .

<http://rdfh.ch/0001/thing-page-2/values/1> a knora-base:StillImageFileValue;
knora-base:valueHasUUID "goZ7JFRNSeqF-dNxsqAS7Q"^^xsd:string;
knora-base:valueHasString "test.tiff";
knora-base:originalFilename "test.tiff";
knora-base:originalMimeType "image/tiff";
knora-base:internalFilename "page2.jp2";
knora-base:internalMimeType "image/jp2";
knora-base:valueCreationDate "2021-05-11T10:00:00Z"^^xsd:dateTime;
knora-base:isDeleted false;
knora-base:attachedToUser <http://rdfh.ch/users/9XBCrDV3SRa7kS1WwynB4Q>;
knora-base:dimX 512;
knora-base:dimY 256;
knora-base:hasPermissions "CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:UnknownUser" .

<http://rdfh.ch/0001/thing-page-2/values/2> a knora-base:LinkValue;
knora-base:valueHasUUID "goZ7JFRNSeqF-dNxsqAS7Q"^^xsd:string;
rdf:subject <http://rdfh.ch/0001/thing-page-2>;
rdf:predicate knora-base:isPartOf;
rdf:object <http://rdfh.ch/0001/thing-with-pages>;
knora-base:valueHasRefCount 1;
knora-base:valueCreationDate "2021-05-11T10:00:00Z"^^xsd:dateTime;
knora-base:isDeleted false;
knora-base:attachedToUser <http://rdfh.ch/users/9XBCrDV3SRa7kS1WwynB4Q>;
knora-base:valueHasString "http://rdfh.ch/0001/thing-with-pages";
knora-base:hasPermissions "CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:UnknownUser" .

<http://rdfh.ch/0001/H6gBWUuJSuuO-CilHV8kQw/values/a-childNodeUsed> a knora-base:ListValue;
knora-base:valueHasUUID "hxENf5B-TSyor_Bu8OJpcD"^^xsd:string;
knora-base:isDeleted false;
Expand Down
91 changes: 91 additions & 0 deletions test_data/resourcesR2RV2/IIIFManifest.jsonld
@@ -0,0 +1,91 @@
{
"id": "http://rdfh.ch/0001/thing-with-pages/manifest",
"@context": "http://iiif.io/api/presentation/3/context.json",
"label": {
"en": [
"thing with pages"
]
},
"items": [
{
"height": 256,
"id": "http://rdfh.ch/0001/thing-page-1/canvas",
"type": "Canvas",
"width": 512,
"label": {
"en": [
"page 1"
]
},
"items": [
{
"id": "http://rdfh.ch/0001/thing-page-1/values/1/image",
"type": "AnnotationPage",
"items": [
{
"id": "http://rdfh.ch/0001/thing-page-1/values/1",
"type": "Annotation",
"motivation": "painting",
"body": {
"format": "image/jpeg",
"height": 256,
"service": [
{
"id": "http://0.0.0.0:1024",
"type": "ImageService3",
"profile": "level1"
}
],
"id": "http://0.0.0.0:1024/0001/page1.jp2/full/512,256/0/default.jpg",
"type": "Image",
"width": 512
}
}
]
}
]
},
{
"height": 256,
"id": "http://rdfh.ch/0001/thing-page-2/canvas",
"type": "Canvas",
"width": 512,
"label": {
"en": [
"page 2"
]
},
"items": [
{
"id": "http://rdfh.ch/0001/thing-page-2/values/1/image",
"type": "AnnotationPage",
"items": [
{
"id": "http://rdfh.ch/0001/thing-page-2/values/1",
"type": "Annotation",
"motivation": "painting",
"body": {
"format": "image/jpeg",
"height": 256,
"service": [
{
"id": "http://0.0.0.0:1024",
"type": "ImageService3",
"profile": "level1"
}
],
"id": "http://0.0.0.0:1024/0001/page2.jp2/full/512,256/0/default.jpg",
"type": "Image",
"width": 512
}
}
]
}
]
}
],
"behavior": [
"paged"
],
"type": "Manifest"
}