Islandora / documentation

Contains islandora's documentation and main issue queue.
MIT License
104 stars 71 forks source link

Incorrect types in Node/Media JSON #1112

Closed rosiel closed 5 years ago

rosiel commented 5 years ago

After creating a Node (with mandatory Model field "Image"), the resulting JSONLD includes a graph where it describes three objects:

Unfortunately, all of those objects are said to have @type "http://purl.org/coar/resource_type/c_c513" which is incorrect.

Same thing happens for a Media - in the JSONLD for /media/1, media/1, node/1, and user/1 are said to have @type "http://pcdm.org/use#OriginalFile"

dannylamb commented 5 years ago

Nice, good one. We're assuming it's just one entity returned, but jsonld is set up to return one level of references.

rosiel commented 5 years ago

Another problem: When you go to /node/1/media?_format=jsonld (you can do this! Cool!) you get a list of the Media object, but you don't see #OriginalFile or #ServiceFile or #ThumbnailImage anywhere - it shows a lot of metadata about the three related Media, except that piece. I'm getting the feeling this is the same ticket, but could make a separate one if you prefer.

dannylamb commented 5 years ago

@rosiel I'd trust the json format, but not neccessarily the jsonld format. You're probably the first person other than me to really dig into that stuff. A lot of our re-writing may be affecting that in ways we haven't discovered yet (or that you're just now discovering, I should say).

To me, it sounds all related. If we dig into it and we find a solution but it doesn't fix both issues, we'll make the separate ticket. But for now, this is fine.