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

datapack can create resource map's with incorrect dcterm:identifier value #131

Open
amoeba opened this issue Jul 31, 2021 · 0 comments
Open

Comments

@amoeba
Copy link
Contributor

amoeba commented Jul 31, 2021

Jasmine ran into a situation where datapack created a resource map with content like this:

  <rdf:Description rdf:about="https://cn.dataone.org/cn/v2/resolve/urn%3Auuid%3Acb71b688-944f-4872-a6e4-0326b599b1ae">
    <dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">https://cn.dataone.org/cn/v2/resolve/urn%3Auuid%3Acb71b688-944f-4872-a6e4-0326b599b1ae</dcterms:identifier>
  </rdf:Description>

Look at the object literal, "https://cn.dataone.org/cn/v2/resolve/urn%3Auuid%3Acb71b688-944f-4872-a6e4-0326b599b1ae", which should actually be "urn:uuid:cb71b688-944f-4872-a6e4-0326b599b1ae". We discovered this because the resource map will always fail to index because there's no object with the identifier "https://cn.dataone.org/cn/v2/resolve/urn%3Auuid%3Acb71b688-944f-4872-a6e4-0326b599b1ae".

This happened when Jasmine was trying to add a data object to a pakcage. The code that was being run was roughly:

  1. dp <- getDataPackage(...)
  2. do <- getDataObject(...)
  3. addMember(dp, do, mo)

That workflow looks totally reasonable to me.

All that said: I was not able to create a minimum reproducible example using similar code. I've attached an RData file with the DataPackage object that reproduces the behavior but I can't reproduce this any other way. Seems to me the bug could be coming from some sort of string manipulation edge case but I can't really tell at this point.

datapackage.RData.zip

I thought I'd make an issue just for posterity and to see if @gothub has any thoughts or ideas.

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