Skip to content

Commit 9e01018

Browse files
authored
Merge pull request #11232 from GlobalDataverseCommunityConsortium/IQSS/10883
IQSS/10883-License Enhancements
2 parents 3e5a516 + bb55c81 commit 9e01018

File tree

18 files changed

+298
-38
lines changed

18 files changed

+298
-38
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
- License metadata enhancements (#10883):
2+
- Added new fields to licenses: rightsIdentifier, rightsIdentifierScheme, schemeUri, languageCode
3+
- Updated DataCite metadata export to include rightsIdentifier, rightsIdentifierScheme, and schemeUri consistent with the DataCite 4.5 schema and examples
4+
- Enhanced metadata exports to include all new license fields
5+
- Existing licenses from the example set included with Dataverse will be automatically updated with new fields
6+
- Existing API calls support the new optional fields
7+
8+
Setup: For existing published datasets, the additional license metadata will not be available from DataCite or in metadata exports until the dataset is republished or
9+
- the /api/admin/metadata/{id}/reExportDataset is run for the dataset
10+
- the api/datasets/{id}/modifyRegistrationMetadata API is run for the dataset,
11+
or the global version of these api calls (/api/admin/metadata/reExportAll, /api/datasets/modifyRegistrationPIDMetadataAll) are used.
12+

doc/sphinx-guides/source/_static/api/add-license.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
"shortDescription": "Creative Commons Attribution 4.0 International License.",
55
"iconUrl": "https://i.creativecommons.org/l/by/4.0/88x31.png",
66
"active": true,
7-
"sortOrder": 2
8-
}
7+
"sortOrder": 2,
8+
"rightsIdentifier": "CC-BY-4.0",
9+
"rightsIdentifierScheme": "SPDX",
10+
"schemeUri": "https://spdx.org/licenses/",
11+
"languageCode": "en"
12+
}

doc/sphinx-guides/source/api/native-api.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,12 @@ It returns a list of versions with their metadata, and file list:
15021502
"createTime": "2015-04-20T09:57:32Z",
15031503
"license": {
15041504
"name": "CC0 1.0",
1505-
"uri": "http://creativecommons.org/publicdomain/zero/1.0"
1505+
"uri": "http://creativecommons.org/publicdomain/zero/1.0",
1506+
"iconUri": "https://licensebuttons.net/p/zero/1.0/88x31.png",
1507+
"rightsIdentifier": "CC0",
1508+
"rightsIdentifierScheme": "Creative Commons",
1509+
"schemeUri": "https://creativecommons.org/",
1510+
"languageCode": "en",
15061511
},
15071512
"termsOfAccess": "You need to request for access.",
15081513
"fileAccessRequest": true,
@@ -1523,7 +1528,12 @@ It returns a list of versions with their metadata, and file list:
15231528
"createTime": "2015-04-20T09:43:45Z",
15241529
"license": {
15251530
"name": "CC0 1.0",
1526-
"uri": "http://creativecommons.org/publicdomain/zero/1.0"
1531+
"uri": "http://creativecommons.org/publicdomain/zero/1.0",
1532+
"iconUri": "https://licensebuttons.net/p/zero/1.0/88x31.png",
1533+
"rightsIdentifier": "CC0",
1534+
"rightsIdentifierScheme": "Creative Commons",
1535+
"schemeUri": "https://creativecommons.org/",
1536+
"languageCode": "en",
15271537
},
15281538
"termsOfAccess": "You need to request for access.",
15291539
"fileAccessRequest": true,
@@ -6929,6 +6939,10 @@ View the details of the standard license with the database ID specified in ``$ID
69296939
69306940
Superusers can add a new license by posting a JSON file adapted from this example :download:`add-license.json <../_static/api/add-license.json>`. The ``name`` and ``uri`` of the new license must be unique. Sort order field is mandatory. If you are interested in adding a Creative Commons license, you are encouarged to use the JSON files under :ref:`adding-creative-commons-licenses`:
69316941
6942+
Licenses must have a "name" and "uri" and may have the following optional fields: "shortDescription", "iconUri", "rightsIdentifier", "rightsIdentifierScheme", "schemeUri", "languageCode", "active", "sortOrder".
6943+
The "name" and "uri" are used to display the license in the user interface, with "shortDescription" and "iconUri" being used to enhance the display if available.
6944+
The "rightsIdentifier", "rightsIdentifierScheme", and "schemeUri" should be added if the license is available from https://spdx.org . "languageCode" should be sent if the language is not in English ("en"). "active" is a boolean indicating whether the license should be shown to users as an option. "sortOrder" is a numeric value - licenses are shown in the relative numeric order of this value.
6945+
69326946
.. code-block:: bash
69336947
69346948
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2-
"name": "Apache-2.0",
3-
"uri": "http://www.apache.org/licenses/LICENSE-2.0",
4-
"shortDescription": "Apache License 2.0",
5-
"active": true,
6-
"sortOrder": 9
7-
}
8-
2+
"name": "Apache-2.0",
3+
"uri": "http://www.apache.org/licenses/LICENSE-2.0",
4+
"shortDescription": "Apache License 2.0",
5+
"active": true,
6+
"sortOrder": 9,
7+
"rightsIdentifier": "Apache-2.0",
8+
"rightsIdentifierScheme": "SPDX",
9+
"schemeUri": "https://spdx.org/licenses/",
10+
"languageCode": "en"
11+
}

scripts/api/data/licenses/licenseCC-BY-4.0.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
"shortDescription": "Creative Commons Attribution 4.0 International License.",
55
"iconUrl": "https://licensebuttons.net/l/by/4.0/88x31.png",
66
"active": true,
7-
"sortOrder": 2
8-
}
7+
"sortOrder": 2,
8+
"rightsIdentifier": "CC-BY-4.0",
9+
"rightsIdentifierScheme": "SPDX",
10+
"schemeUri": "https://spdx.org/licenses/",
11+
"languageCode": "en"
12+
}

scripts/api/data/licenses/licenseCC-BY-NC-4.0.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
"shortDescription": "Creative Commons Attribution-NonCommercial 4.0 International License.",
55
"iconUrl": "https://licensebuttons.net/l/by-nc/4.0/88x31.png",
66
"active": true,
7-
"sortOrder": 4
7+
"sortOrder": 4,
8+
"rightsIdentifier": "CC-BY-NC-4.0",
9+
"rightsIdentifierScheme": "SPDX",
10+
"schemeUri": "https://spdx.org/licenses/",
11+
"languageCode": "en"
812
}

scripts/api/data/licenses/licenseCC-BY-NC-ND-4.0.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
"shortDescription": "Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.",
55
"iconUrl": "https://licensebuttons.net/l/by-nc-nd/4.0/88x31.png",
66
"active": true,
7-
"sortOrder": 7
7+
"sortOrder": 7,
8+
"rightsIdentifier": "CC-BY-NC-ND-4.0",
9+
"rightsIdentifierScheme": "SPDX",
10+
"schemeUri": "https://spdx.org/licenses/",
11+
"languageCode": "en"
812
}

scripts/api/data/licenses/licenseCC-BY-NC-SA-4.0.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
"shortDescription": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.",
55
"iconUrl": "https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png",
66
"active": true,
7-
"sortOrder": 3
7+
"sortOrder": 3,
8+
"rightsIdentifier": "CC-BY-NC-SA-4.0",
9+
"rightsIdentifierScheme": "SPDX",
10+
"schemeUri": "https://spdx.org/licenses/",
11+
"languageCode": "en"
812
}

scripts/api/data/licenses/licenseCC-BY-ND-4.0.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
"shortDescription": "Creative Commons Attribution-NoDerivatives 4.0 International License.",
55
"iconUrl": "https://licensebuttons.net/l/by-nd/4.0/88x31.png",
66
"active": true,
7-
"sortOrder": 6
7+
"sortOrder": 6,
8+
"rightsIdentifier": "CC-BY-ND-4.0",
9+
"rightsIdentifierScheme": "SPDX",
10+
"schemeUri": "https://spdx.org/licenses/",
11+
"languageCode": "en"
812
}

scripts/api/data/licenses/licenseCC-BY-SA-4.0.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
"shortDescription": "Creative Commons Attribution-ShareAlike 4.0 International License.",
55
"iconUrl": "https://licensebuttons.net/l/by-sa/4.0/88x31.png",
66
"active": true,
7-
"sortOrder": 5
7+
"sortOrder": 5,
8+
"rightsIdentifier": "CC-BY-SA-4.0",
9+
"rightsIdentifierScheme": "SPDX",
10+
"schemeUri": "https://spdx.org/licenses/",
11+
"languageCode": "en"
812
}

0 commit comments

Comments
 (0)