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

Drupal REST collection response returns "http://pcdm.org/models#Object" #1001

Closed
kayakr opened this issue Jan 11, 2019 · 4 comments
Closed
Milestone

Comments

@kayakr
Copy link
Contributor

kayakr commented Jan 11, 2019

node/1 is a Repository Item with Resource Type=Collection and Model=Collection.
curl -v "http://localhost:8000/node/1?_format=jsonld"
returns
Link: <http://purl.org/dc/dcmitype/Collection>; rel="tag"; title="Collection"
Link: <http://localhost:8000/taxonomy/term/2>; rel="tag"; title="Collection"
ok, but also

"@type": [
        "http://pcdm.org/models#Object"
      ],

Shouldn't the @type value be "http://pcdm.org/models#Collection"?

@dannylamb
Copy link
Contributor

Hey @kayakr,

Thanks for taking a look at the REST api. We've had some recent changes flow through that should make that collection a http://purl.org/dc/dcmitype/Collection (or whatever the Collection term has for field_external_uri). If you want it to be a PCDM Collection, you can just edit the taxonomy term and replace the DCMIType url.

That's all in theory of course, because you're sitting on a bug. Or at least a misconfiguration in https://github.com/Islandora-CLAW/islandora_demo. The rdf:type should come from its taxonomy terms, not the rdf mapping.

As for why not http://pcdm.org/models#Collection by default, there's some semantic baggage that comes with it. PCDM Collections aren't supposed to have files, they collect only other objects. So our workaround is to make it a PCDM object and slap a different collection URI on there. I understand PCDM's need to make that distinction, but unfortunately all Islandora collections pretty much always have a thumbnail. 🤷‍♂️

@whikloj
Copy link
Member

whikloj commented Apr 11, 2019

@kayakr was this resolved to your satisfaction by the PRs on the above linked ticket?

@dannylamb dannylamb added this to the 1.0.0 milestone May 10, 2019
@dannylamb
Copy link
Contributor

I can confirm that the bug I mentioned has been fixed, and that you can still make a collection a pcdm:Collection if you want to.

@dannylamb
Copy link
Contributor

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

3 participants