IIIF / api

Source for API and model specifications documents (api and model)
http://iiif.io/api
106 stars 54 forks source link

Image API Selector LD Terms #2230

Open thehabes opened 1 year ago

thehabes commented 1 year ago

The IIIF Image API supports a kind of selector as defined in https://iiif.io/api/annex/openannotation/#iiif-image-api-selector. It states:

This document describes extensions to the Web Annotation Data Model required within the IIIF context.

The annex does not offer a context.json file or a specific link to an ontology beyond the mention of Web Annotation and the IIIF context.

The Web Annotation and IIIF Contexts are listed below.

The annex offers this table to give definition to the properties it expects to find in this format.

Property Default Description
type Required. Must be the value "ImageApiSelector".
region "full" The string to put in the region parameter of the URI.
size "full" The string to put in the size parameter of the URI.
rotation "0" The string to put in the rotation parameter of the URI. Note that this must be a string in order to allow mirroring, for example "!90".
quality "default" The string to put in the quality parameter of the URI.
format "jpg" The string to put in the format parameter of the URI. Note that the '.' character is not part of the format, just the URI syntax.

From which minted JSON looks like

{
   "type":"SpecificResource",
   "source":{
      "id":"https://cdm21033.contentdm.oclc.org/digital/iiif/krt/2891",
      "type":"ImageService2",
      "profile":"http://iiif.io/api/image/2/level2.json"
   },
   "selector":{
      "type":"ImageApiSelector",
      "region":"810,900,260,370",
      "size":"5965,2514",
      "rotation": "45",
      "quality": "bitonal"
   }
}

The terms from the table listed above are all described in the IIIF Image API 2 & 3's specification body, which can be their vocabulary. The Presentation API does not list these terms. At this time, the terms in the able are not present in any IIIF API context.json file, nor are they available through Web Annotation. For example, there is no context.json entry like

"size": {
   "@id": "iiif_image:size",
   "@type": "@id"
}

An entry for the type class ImageApiSelector is also not present in any available context.json file.

Without these context entries, there is no proper link between the actual properties described in the table above and their ontological reference and resulting vocabulary, even though the vocabulary can be found in multiple IIIF API documents.

glenrobson commented 1 year ago

Note we have a number of Cookbook recipes also using the ImageAPISelector:

Currently they are using the presentation context only but we can update to reflect what is decided.

kirschbombe commented 1 year ago

@thehabes - it does provide a context! It's here: https://iiif.io/api/annex/openannotation/context.json. An updated version in a new location is coming soon. The PR is here: https://github.com/IIIF/api/pull/2231