-
Notifications
You must be signed in to change notification settings - Fork 493
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
fix: insert correct identifierType into DataCite export XML #10759
Conversation
FWIW: The new code does set the identifierType (to "DOI", "Handle", or "URL" (for perma)) which should be allowed values for the DataCite schema. (Maybe the original code was written before exporters/when the output was only sent to DataCite and DOI was always true?) I'm not sure how fast #10615 is moving, so if this gets merged first (so we get the other fixes), I think it's fine. |
Ah, that's great. Sorry, I wasn't aware of that. Yes, I also checked the DataCite schema. I didn't find a list of allowed values, only that "identifierType" should be a non-empty string, so any string should be fine I think. |
You're right. In this case it wasn't the DataCiteSchema but the OpenAire Guildelines that had a list. |
Can we integrate this into version 6.4 if #10615 is not integrated? |
@vera can you please resolve merge conflicts in this pull request? They are due to us merging this PR: |
# Conflicts: # src/main/java/edu/harvard/iq/dataverse/pidproviders/doi/XmlMetadataTemplate.java # src/main/java/edu/harvard/iq/dataverse/pidproviders/doi/datacite/DOIDataCiteRegisterService.java # src/main/resources/edu/harvard/iq/dataverse/pidproviders/doi/datacite_metadata_template.xml
Hmm, I actually think this PR is not necessary anymore. The main bug this PR fixes (wrong I've tested the develop branch with a PermaLink dataset and it's now correct:
The rest of the changes in this PR don't need to be merged I think. |
Oh! @vera please feel free to close this PR if you don't need it. 😄 |
What this PR does / why we need it:
I noticed when exporting the metadata of a dataset with a Permalink PID that the DataCite XML export contained the wrong identifierType:
This PR fixes the bug by using
getProviderType
to insert the correct identifier type.I also fixed some typos and added a missing return value for
getProviderType
.Which issue(s) this PR closes:
not aware of any issue
Special notes for your reviewer:
-
Suggestions on how to test this:
I tested this locally by creating a dataset with a Permalink PID and then using the "Export Metadata" > "DataCite" button in the UI.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
-
Is there a release notes update needed for this change?:
I think not
Additional documentation:
-