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

Manifest conversion fails on Stanford's collection #49

Open
benwbrum opened this issue Oct 6, 2015 · 2 comments
Open

Manifest conversion fails on Stanford's collection #49

benwbrum opened this issue Oct 6, 2015 · 2 comments

Comments

@benwbrum
Copy link
Collaborator

benwbrum commented Oct 6, 2015

When using osullivan to parse Stanford's collection (from the iiif-universe repository), manifests are remain lists rather than being converted to manifests. This does not happen for Villanova's collections, however, so I'm not sure what's up.

connection = open("https://graph.global/static/data/universes/iiif/stanford.json")
collection_json = connection.read
service = IIIF::Service.parse(collection_json)
service.manifests.first
=> {"@id"=>"http://purl.stanford.edu/bb389yg4719/iiif/manifest.json",
 "location"=>"Stanford University",
 "label"=>"Stanford University Libraries, M1814. Flat Box 2, Folder 02"}
[20] pry(ScCollection)> service.manifests.first.label
NoMethodError: undefined method `label' for #<ActiveSupport::OrderedHash:0x007f2a4260a978>

For comparison, the Yale manifests do convert successfully:

[21] pry(ScCollection)> connection = open("http://manifests.ydc2.yale.edu/manifest")
=> #<File:/tmp/open-uri20151006-13599-18bs854>
[22] pry(ScCollection)> collection_json = connection.read;0
=> 0
[23] pry(ScCollection)> service = IIIF::Service.parse(collection_json);0
=> 0
[24] pry(ScCollection)> service.manifests.first
=> #<IIIF::Presentation::Manifest:0x007f2a3c1d1ec0
 @data=
  {"@type"=>"sc:Manifest",
   "@id"=>"http://manifests.ydc2.yale.edu/manifest/DecretumMagistriGratiani",
   "label"=>"Friedberg, ed., Decretum magistri Gratiani "}>
[25] pry(ScCollection)> service.manifests.first.label=> "Friedberg, ed., Decretum magistri Gratiani "

I can get around this by avoiding dot accessors, but it may be of interest. It's possibly that the problem is in Stanford's manifest and its failure to specify an @type property, and that this isn't an osullivan issue at all.

@azaroth42
Copy link

azaroth42 commented Oct 6, 2015 via email

@benwbrum
Copy link
Collaborator Author

benwbrum commented Oct 6, 2015

I'll test the remainder of the collections as I continue to robustify the
FromThePage IIIF client. So far, only Stanford has a bad manifest that
I've found.

On Tue, Oct 6, 2015 at 2:04 PM, Rob Sanderson [email protected]
wrote:

Not an OSullivan issue, but location in that data isn't a valid property of
a manifest. Do the other collections in the "universe" have this too?


Reply to this email directly or view it on GitHub
#49 (comment).

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