-
Notifications
You must be signed in to change notification settings - Fork 494
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
IQSS/8337_add metadatalanguage to export/import/migrate #8437
IQSS/8337_add metadatalanguage to export/import/migrate #8437
Conversation
not sent - use default not allowed - throw exception to return bad request
…adatalanguage_in_import/migrate
…adatalanguage_in_import/migrate
…adatalanguage_in_import/migrate
String expectedString = getData(response.getBody().asString()); | ||
|
||
// Delete the dataset via native API | ||
Response deleteDatasetResponse = UtilIT.deleteDatasetViaNativeApi(datasetId, apiToken); | ||
deleteDatasetResponse.prettyPrint(); | ||
assertEquals(200, deleteDatasetResponse.getStatusCode()); | ||
|
||
|
||
logger.info("SENDING to reCreate Dataset: " + expectedString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to assume this info log message was left here on purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
~yes - we seem to have many tests that write useful intermediate results to the log (and seeing the exact json-ld sent to this API is useful). That said, nominally this and others could be changed to fine if we're concerned about the size of the IT test logs but we might also then want an easy way to up the log level when IT tests run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
…adatalanguage_in_import/migrate
can't send a metadataLanguage when the :MetadataLanguage setting is not set When it is, value must match parent, or if parent allows choice, be one of the allowed values per the setting.
Retesting:
|
src/main/java/edu/harvard/iq/dataverse/api/imports/ImportDDIServiceBean.java
Outdated
Show resolved
Hide resolved
Thanks, @qqmyers ! |
…adatalanguage_in_import/migrate
9f651c0
to
67de235
Compare
What this PR does / why we need it: This PR adds support for the new metadatalanguage value to the OAI_ORE export, and the json import/json-ld migrate API calls. This makes the metadata language used for the dataset visible in one more export and allows sending that value in when importing /migrating from prior exports/other systems.
Which issue(s) this PR closes:
Closes #8337
Special notes for your reviewer: FWIW: Since the metadatalanguage setting constrains which languages are allowed, the import/migrate api calls return a Bad Request error if you send one that isn't allowed. (Also assumes the default if you don't send one.)
Suggestions on how to test this: Configure with metadata languages and verify that the OAI-ORE export contains an https://schema.org/inLanguage value. The import and migrate APIs can also be tested by adding this value. (I'll look at the guide examples - this is optional so I don't want to add it to all examples but I can see about showing it somewhere.)
Does this PR introduce a user interface change? If mockups are available, please link/include them here: export and api effects only. (FWIW: This is one of several updates to the OAI_ORE that will be happening - DataCommons is making several more so we may have an overall release note on the package of changes.)
Is there a release notes update needed for this change?:
Additional documentation: