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

Include handling of Presentation API 3.0 structures and ranges? #546

Open
dchiller opened this issue Jul 6, 2023 · 4 comments
Open

Include handling of Presentation API 3.0 structures and ranges? #546

dchiller opened this issue Jul 6, 2023 · 4 comments

Comments

@dchiller
Copy link

dchiller commented Jul 6, 2023

Diva currently supports the IIIF Presentation API 3.0. However, when obtaining the canvases in a manifest, Diva looks for either an array in a sequences array in the manifest or an items array in the manifest (see

const sequence = manifest.sequences ? manifest.sequences[0] : null;
). In the Presentation API 3.0, the Ranges attribute is used to provide these ordering structures (https://iiif.io/api/presentation/3.0/#54-range), and there are no sequences. Diva's logic will still work with the 3.0 API because it will use the ordering of canvases found in the manifest's items array, but will not show a different ordering if defined (because this will be defined in a range.

For more information about this change, see https://iiif.io/api/presentation/3.0/change-log/#141-remove-sequence-in-favor-of-ranges-items-and-behavior-value-sequence

@dchiller dchiller changed the title Include handling of Presentation API 3.0 structures and ranges Include handling of Presentation API 3.0 structures and ranges? Jul 6, 2023
@ahankinson
Copy link
Member

Have you actually found a ranges ordering manifest in the wild? It’s a theoretical possibility but I’ve never actually seen one.

@dchiller
Copy link
Author

dchiller commented Jul 7, 2023

Have you actually found a ranges ordering manifest in the wild? It’s a theoretical possibility but I’ve never actually seen one.

I haven't! So yes, maybe not an issue -- if you haven't seen it, then let's not worry.

Have you seen anyone using the Image API 3.0? Because that would also break things...

Here, if your context pointed to .../image/3/..., then the API would be set to 1.0:

if (context === 'http://iiif.io/api/image/2/context.json' || context === "ImageService2")

Which means here you set the quality to "native" which would not be recognized by a server operating API 3.0:

const quality = (page.api > 1.1) ? 'default' : 'native';

Maybe that is also not adopted?

I only found these because yesterday I created an IIIF Manifest using the 3.0 APIs, so maybe no one is doing that!

@ahankinson
Copy link
Member

ahankinson commented Jul 10, 2023

Lots of people have adopted IIIF v3, but are figuring out how to manage both 2 and 3.

The Bodleian's IIIF server is a good example of IIIF v3 manifests, but you have to specifically request it with an Accept header. Every manifest you find on Digital Bodleian can be requested this way.

https://digital.bodleian.ox.ac.uk/developer/iiif/

$> curl -H "Accept: application/ld+json;profile=http://iiif.io/api/presentation/3/context.json" "https://iiif.bodleian.ox.ac.uk/iiif/manifest/b73ca01f-aac8-4916-a7c6-3c8e67939a66.json"

Their image server also supports Image API v3:

$> curl -H "Accept: application/ld+json;profile=http://iiif.io/api/image/3/context.json" "https://iiif.bodleian.ox.ac.uk/iiif/image/6722822e-43f0-43f4-a395-b5f3980d4c8e/info.json"

https://iiif.bodleian.ox.ac.uk/iiif/image/6722822e-43f0-43f4-a395-b5f3980d4c8e/full/max/0/default.jpg

@dchiller
Copy link
Author

Good to know! I think this is definitely something that does not need an immediate change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants