-
Notifications
You must be signed in to change notification settings - Fork 490
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
Adding terms of use in DDI #11071
base: develop
Are you sure you want to change the base?
Adding terms of use in DDI #11071
Conversation
xmlw.writeCharacters(version.getTermsOfUse()); | ||
xmlw.writeEndElement(); //notes | ||
} | ||
|
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.
Can you add to DdiExportUtilTest.java to exercise this code?
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.
Added dataset-finch-terms-of-use.json and dataset-finch-terms-of-use.xml which is used in testJson2DdiNoFilesTermsOfUse() for custom terms of use
xmlw.writeCharacters("<a href=" + '"' + uri + '"' + ">" + name + "</a>"); | ||
xmlw.writeEndElement(); //notes | ||
} | ||
} |
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.
Also, please add a test to DdiExportUtilTest.java
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.
The standard license was already in dataset-finch1.json and dataset-finch1.xml was updated to add the standard license.
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.
Looks good in general. Please add tests to DdiExportUtilTest.java and update from dev. We have recently released version 6.5.
Thanks!
@sekmiller I updated the branch from the develop and added to the DdiExportUtilTest to test for standard license and custom terms of use |
What this PR does / why we need it:
It adds custom terms of use and standard license in DDI export.
It adds standard license to DDI import.
In this case DDI import and export match and will include both standard and custom licenses.
Which issue(s) this PR closes:
Suggestions on how to test this:
Create two datasets, one with standard license and another custom license. Publish it. Look at export DDI. For standard license it should contain something like:
<dataAccs> <notes type="DVN:TOU" level="dv"> <a href="http://creativecommons.org/publicdomain/zero/1.0">CC0 1.0</a> </notes> </dataAccs>
For custom license, it should contain something like:
<dataAccs><notes type="DVN:TOU" level="dv">This is my terms</notes></dataAccs>
Then try to create a new datasets with these DDI xmls using importddi api. See that for standard license it appears as standard and custom Terms of use appear as custom.