Skip to content

Commit 1968b87

Browse files
committed
back out of any changes to dc:rights #8129
1 parent 2f2a7f7 commit 1968b87

File tree

4 files changed

+1
-28
lines changed

4 files changed

+1
-28
lines changed

doc/release-notes/8129-harvesting.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
### Remap oai_dc export and harvesting format fields: dc:type, dc:date, and dc:rights
1+
### Remap oai_dc export and harvesting format fields: dc:type and dc:date
22

33
The `oai_dc` export and harvesting format has had the following fields remapped:
44

55
- dc:type was mapped to the field "Kind of Data". Now it is hard-coded to the word "Dataset".
66
- dc:date was mapped to the field "Production Date" when available and otherwise to "Publication Date". Now it is mapped the field “Publication Date” or the field used for the citation date, if set (see [Set Citation Date Field Type for a Dataset](https://guides.dataverse.org/en/6.3/api/native-api.html#set-citation-date-field-type-for-a-dataset)).
7-
- dc:rights was not mapped to anything. Now it is mapped (when available) to terms of use, restrictions, and license.
87

98
As these are backward incompatible changes, they have been noted in the [API changelog](https://guides.dataverse.org/en/latest/api/changelog.html).
109

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

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ v6.4
1414

1515
- dc:type was mapped to the field "Kind of Data". Now it is hard-coded to the word "Dataset".
1616
- dc:date was mapped to the field "Production Date" when available and otherwise to "Publication Date". Now it is mapped the field "Publication Date" or the field used for the citation date, if set (see :ref:`set-citation-date-field`).
17-
- dc:rights was not mapped to anything. Now it is mapped (when available) to terms of use, restrictions, and license.
1817

1918
v6.3
2019
----

src/main/java/edu/harvard/iq/dataverse/export/dublincore/DublinCoreExportUtil.java

-23
Original file line numberDiff line numberDiff line change
@@ -214,29 +214,6 @@ private static void createOAIDC(XMLStreamWriter xmlw, DatasetDTO datasetDto, Str
214214

215215
writeFullElementList(xmlw, dcFlavor+":"+"source", dto2PrimitiveList(version, DatasetFieldConstant.dataSources));
216216

217-
/**
218-
* dc:rights. As stated in https://github.com/IQSS/dataverse/issues/8129
219-
* "A correct value in this field would enable BASE to indicate the
220-
* degree of Open Access (see more information at
221-
* https://www.base-search.net/about/en/faq_oai.php#dc-rights ). For
222-
* datasets without access restriction, the dc:rights field could look
223-
* like this: info:eu-repo/semantics/openAccess (see more information at
224-
* https://guidelines.openaire.eu/en/latest/data/field_rights.html#rightsuri-ma)
225-
* ."
226-
*
227-
* Instead of a single instance of dc:rights, we are including multiple.
228-
* We borrow logic from the `createDC` (dcterms) method but we are using
229-
* only dc:rights rather than also using dc:license because dc:license
230-
* is not one of the 15 fields defined by Simple Dublin Core.
231-
*/
232-
LicenseDTO licDTO = version.getLicense();
233-
if(licDTO != null) {
234-
writeFullElement(xmlw, dcFlavor+":"+"rights", licDTO.getName());
235-
}
236-
writeFullElement(xmlw, dcFlavor+":"+"rights", version.getTermsOfUse());
237-
writeFullElement(xmlw, dcFlavor+":"+"rights", version.getRestrictions());
238-
239-
240217
}
241218

242219
private static void writeAuthorsElement(XMLStreamWriter xmlw, DatasetVersionDTO datasetVersionDTO, String dcFlavor) throws XMLStreamException {

src/test/java/edu/harvard/iq/dataverse/api/DatasetsIT.java

-2
Original file line numberDiff line numberDiff line change
@@ -4162,7 +4162,6 @@ public void testCitationDate() throws IOException {
41624162
exportDatasetAsDublinCore.then().assertThat()
41634163
.body("oai_dc.type", equalTo("Dataset"))
41644164
.body("oai_dc.date", equalTo("1999-12-31"))
4165-
.body("oai_dc.rights", equalTo("CC0 1.0"))
41664165
.statusCode(OK.getStatusCode());
41674166

41684167
Response clearDateField = UtilIT.clearDatasetCitationDateField(datasetPid, apiToken);
@@ -4180,7 +4179,6 @@ public void testCitationDate() throws IOException {
41804179
exportPostClear.then().assertThat()
41814180
.body("oai_dc.type", equalTo("Dataset"))
41824181
.body("oai_dc.date", equalTo(todayDate))
4183-
.body("oai_dc.rights", equalTo("CC0 1.0"))
41844182
.statusCode(OK.getStatusCode());
41854183
}
41864184

0 commit comments

Comments
 (0)