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

parsing derivative manifest gets original manifest @id #65

Open
saracarl opened this issue May 15, 2017 · 0 comments
Open

parsing derivative manifest gets original manifest @id #65

saracarl opened this issue May 15, 2017 · 0 comments

Comments

@saracarl
Copy link

When I parse a derivative manifest, the service['@id'] returns the original manifest @id, not the derivative manifest @id.

I'm working with a derivative manifest -- in this example, a book with some of the front matter removed.

The original manifest is here:
http://gallica.bnf.fr/iiif/ark:/12148/btv1b52505635t/manifest.json

I edited it with the Bodlein's IIIF Manifest editor and removed the first couple of pages. I exported the resulting manifest and stuck it on Gist here:
https://gist.githubusercontent.com/saracarl/bc089a79cf871af077ecc07abaced90e/raw/271c28dc9ff07573c7dd42af78bb56f5da91e033/gallica_der_manifest.json

and edited the @id to refer to itself:
"@id": "https://gist.githubusercontent.com/saracarl/bc089a79cf871af077ecc07abaced90e/raw/b369d953395343e9dfa17a578762a1bc5392d282/gallica_der_manifest.json",

I then try to work with the derivative manifest. I open our derivative @id and parse it using IIIF::Service.parse. When I ask for the @id of the parsed manifest, it returns the original manifest @id (http://gallica.bnf.fr/iiif/ark:/12148/btv1b52505635t/manifest.json).

connection = open(https://gist.githubusercontent.com/saracarl/bc089a79cf871af077ecc07abaced90e/raw/b369d953395343e9dfa17a578762a1bc5392d282/gallica_der_manifest.json)
manifest_json = connection.read
service = IIIF::Service.parse(manifest_json)
service['@id']

returns http://gallica.bnf.fr/iiif/ark:/12148/btv1b52505635t/manifest.json

When I double check the gist file, I confirm that http://gallica.bnf.fr/iiif/ark:/12148/btv1b52505635t/manifest.json isn't anywhere in the file.

It's an easy fix from my end -- I'm just going to set the @id of my working manifest to the passed @id, but either there is a bug in the code, or my understanding.

I'll point out that Mirador works fine here with the derivative manifest, but perhaps they aren't parsing the manifest the same way?

I've reproduced this at .10 and .20 versions of the gem.

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

1 participant