Skip to content
Permalink
Browse files
feat(api-v2): Generate IIIF manifest (DSP-50) (#1784)
  • Loading branch information
Benjamin Geer committed May 17, 2021
1 parent 6022c91 commit 74feb2c0bace8bd59de657f1f4af64934ece2309
Showing with 24,498 additions and 23,460 deletions.
  1. +12 −0 docs/03-apis/api-v2/reading-and-searching-resources.md
  2. +82 −0 test_data/all_data/anything-data.ttl
  3. +91 −0 test_data/resourcesR2RV2/IIIFManifest.jsonld
  4. +1,474 −1,439 test_data/searchR2RV2/BooksNotPublishedOnDate.jsonld
  5. +75 −74 test_data/searchR2RV2/BooksPublishedAfterDate.jsonld
  6. +372 −360 test_data/searchR2RV2/BooksPublishedAfterOrOnDate.jsonld
  7. +1,293 −1,263 test_data/searchR2RV2/BooksPublishedBeforeDate.jsonld
  8. +1,579 −1,540 test_data/searchR2RV2/BooksPublishedBeforeOrOnDate.jsonld
  9. +440 −427 test_data/searchR2RV2/BooksPublishedBetweenDates.jsonld
  10. +191 −184 test_data/searchR2RV2/BooksPublishedOnDate.jsonld
  11. +106 −102 test_data/searchR2RV2/BooksWithTitleContainingZeit.jsonld
  12. +106 −102 test_data/searchR2RV2/BooksWithTitleContainingZeitgloecklein.jsonld
  13. +79 −75 test_data/searchR2RV2/DingeFulltextSearch.jsonld
  14. +23 −19 test_data/searchR2RV2/DingeFulltextSearchSimple.jsonld
  15. +155 −155 test_data/searchR2RV2/FulltextSearchWithImage.jsonld
  16. +73 −72 test_data/searchR2RV2/IncomingLinksForBook.jsonld
  17. +51 −50 test_data/searchR2RV2/LanguageFulltextSearch.jsonld
  18. +117 −116 test_data/searchR2RV2/LetterNotToSelf.jsonld
  19. +369 −357 test_data/searchR2RV2/LinkObjectsToBooks.jsonld
  20. +1,211 −1,184 test_data/searchR2RV2/NarrFulltextSearch.jsonld
  21. +1,022 −986 test_data/searchR2RV2/NotZeitgloeckleinExtendedSearch.jsonld
  22. +50 −49 test_data/searchR2RV2/PageWithSeqnum10OnlySeqnuminAnswer.jsonld
  23. +93 −92 test_data/searchR2RV2/PageWithSeqnum10WithSeqnumAndLinkValueInAnswer.jsonld
  24. +2,386 −2,359 test_data/searchR2RV2/PagesOfNarrenschiffOrderedBySeqnum.jsonld
  25. +2,386 −2,359 test_data/searchR2RV2/PagesOfNarrenschiffOrderedBySeqnumNextOffset.jsonld
  26. +301 −293 test_data/searchR2RV2/ProjectsWithOptionalPersonOrBiblio.jsonld
  27. +291 −287 test_data/searchR2RV2/RegionsForPage.jsonld
  28. +52 −51 test_data/searchR2RV2/ThingBiggerThanDecimal.jsonld
  29. +70 −69 test_data/searchR2RV2/ThingByIriWithRequestedValues.jsonld
  30. +52 −51 test_data/searchR2RV2/ThingEqualsDecimal.jsonld
  31. +94 −93 test_data/searchR2RV2/ThingFromQueryWithUnion.jsonld
  32. +112 −108 test_data/searchR2RV2/ThingSmallerThanDecimal.jsonld
  33. +31 −30 test_data/searchR2RV2/ThingUniform.jsonld
  34. +106 −102 test_data/searchR2RV2/ThingWithBoolean.jsonld
  35. +659 −632 test_data/searchR2RV2/ThingWithBooleanOptionalOffset0.jsonld
  36. +512 −467 test_data/searchR2RV2/ThingWithBooleanOptionalOffset1.jsonld
  37. +132 −128 test_data/searchR2RV2/ThingWithBooleanOrDecimal.jsonld
  38. +74 −73 test_data/searchR2RV2/ThingWithHiddenThing.jsonld
  39. +51 −50 test_data/searchR2RV2/ThingWithListNodeLabel.jsonld
  40. +160 −155 test_data/searchR2RV2/ThingWithListValue.jsonld
  41. +52 −51 test_data/searchR2RV2/ThingWithRichtextWithTermTextInParagraph.jsonld
  42. +52 −51 test_data/searchR2RV2/ThingWithTimeStamp.jsonld
  43. +588 −565 test_data/searchR2RV2/ThingsWithOptionalDecimalGreaterThan1.jsonld
  44. +60 −56 test_data/searchR2RV2/ZeitgloeckleinExtendedSearchNoTitleInAnswer.jsonld
  45. +106 −102 test_data/searchR2RV2/ZeitgloeckleinExtendedSearchWithTitleInAnswer.jsonld
  46. +38 −34 test_data/searchR2RV2/ZeitgloeckleinExtendedSearchWithTitleInAnswerSimple.jsonld
  47. +60 −56 test_data/searchR2RV2/ZeitgloeckleinViaLabel.jsonld
  48. +142 −138 test_data/searchR2RV2/bookWithIncomingPagesOnlyLink.jsonld
  49. +197 −193 test_data/searchR2RV2/bookWithIncomingPagesWithAllRequestedProps.jsonld
  50. +1,450 −1,436 test_data/searchR2RV2/booksWithPage100.jsonld
  51. +70 −69 test_data/searchR2RV2/foafPerson.jsonld
  52. +1,023 −1,008 test_data/searchR2RV2/incomingPagesForBook.jsonld
  53. +102 −101 test_data/searchR2RV2/letterWithAuthor.jsonld
  54. +188 −187 test_data/searchR2RV2/letterWithAuthorWithInformation.jsonld
  55. +123 −122 test_data/searchR2RV2/letterWithPersonWithName.jsonld
  56. +122 −121 test_data/searchR2RV2/letterWithPersonWithName2.jsonld
  57. +102 −101 test_data/searchR2RV2/letterWithPersonWithoutName.jsonld
  58. +51 −50 test_data/searchR2RV2/letterWithSubject.jsonld
  59. +123 −122 test_data/searchR2RV2/lettersByMeier.jsonld
  60. +960 −948 test_data/searchR2RV2/pagesOfLatinNarrenschiffWithSeqnumLowerEquals10.jsonld
  61. +551 −545 test_data/searchR2RV2/regionsOfZeitgloecklein.jsonld
  62. +228 −221 test_data/searchR2RV2/searchResponseWithHiddenResource.jsonld
  63. +110 −106 test_data/searchR2RV2/thingNotReferringToSpecificListNode.jsonld
  64. +51 −50 test_data/searchR2RV2/thingReferringToSpecificListNode.jsonld
  65. +160 −155 test_data/searchR2RV2/thingReferringToSpecificListNodeWithSubnodes.jsonld
  66. +657 −633 test_data/searchR2RV2/thingWithOptionalDateSortedDesc.jsonld
  67. +52 −51 test_data/searchR2RV2/thingWithURI.jsonld
  68. +140 −133 test_data/searchR2RV2/thingsWithStandoffLinks.jsonld
  69. +79 −75 test_data/searchR2RV2/thingsWithStandoffLinksToSpecificThing.jsonld
  70. +1 −1 webapi/BUILD.bazel
  71. +1 −0 webapi/src/main/scala/org/knora/webapi/app/BUILD.bazel
  72. +15 −7 webapi/src/main/scala/org/knora/webapi/messages/util/rdf/JsonLDUtil.scala
  73. +25 −0 ...i/src/main/scala/org/knora/webapi/messages/v2/responder/resourcemessages/ResourceMessagesV2.scala
  74. +5 −2 webapi/src/main/scala/org/knora/webapi/messages/v2/responder/valuemessages/ValueMessagesV2.scala
  75. +1 −0 webapi/src/main/scala/org/knora/webapi/responders/BUILD.bazel
  76. +167 −4 webapi/src/main/scala/org/knora/webapi/responders/v2/ResourcesResponderV2.scala
  77. +37 −2 webapi/src/main/scala/org/knora/webapi/routing/v2/ResourcesRouteV2.scala
  78. +2 −0 webapi/src/main/scala/org/knora/webapi/util/ActorUtil.scala
  79. +46 −0 ...src/main/twirl/org/knora/webapi/messages/twirl/queries/gravsearch/getIncomingImageLinks.scala.txt
  80. +1 −1 webapi/src/main/twirl/org/knora/webapi/messages/twirl/queries/sparql/v2/isOntologyUsed.scala.txt
  81. +1 −0 webapi/src/test/scala/org/knora/webapi/e2e/http/BUILD.bazel
  82. +18 −5 webapi/src/test/scala/org/knora/webapi/e2e/v2/ResourcesRouteV2E2ESpec.scala
  83. +5 −5 webapi/src/test/scala/org/knora/webapi/e2e/v2/SearchRouteV2R2RSpec.scala
  84. +3 −0 webapi/src/test/scala/org/knora/webapi/it/BUILD.bazel
@@ -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
@@ -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;
@@ -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"
}

0 comments on commit 74feb2c

Please sign in to comment.