Skip to content

Commit

Permalink
Merge pull request IQSS#9013 from tcoupin/8739-publisher-during-harve…
Browse files Browse the repository at this point in the history
…sting

Harvest: map publisher tag to distributorName
  • Loading branch information
ofahimIQSS authored Jan 23, 2025
2 parents 7ef4ee3 + 7e72b25 commit 24143fd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/release-notes/8739-publisher-during-harvesting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The publisher value of harvested datasets is now attributed to the dataset's distributor instead of its producer. This improves the citation associated with these datasets, but the change only affects newly harvested datasets. All datasets should be re-harvested if you wish to pick up this change on already harvested datasets. For more information, see [the guides](https://dataverse-guide--9013.org.readthedocs.build/en/9013/admin/harvestclients.html#harvesting-client-changelog), #8739, and #9013.
5 changes: 5 additions & 0 deletions doc/sphinx-guides/source/admin/harvestclients.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ Each harvesting client run logs a separate file per run to the app server's defa

Note that you'll want to run a minimum of Dataverse Software 4.6, optimally 4.18 or beyond, for the best OAI-PMH interoperability.

Harvesting Client Changelog
---------------------------

- As of Dataverse 6.5, the publisher value of harvested datasets is now attributed to the dataset's distributor instead of its producer. This change affects all newly harvested datasets. For more information, see https://github.com/IQSS/dataverse/pull/9013

Harvesting Non-OAI-PMH
~~~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/db/migration/V6.5.0.3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- #8739 map publisher tag to distributorName when harvesting
update foreignmetadatafieldmapping set datasetfieldname = 'distributorName' where foreignfieldxpath = ':publisher';
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ INSERT INTO foreignmetadatafieldmapping (id, foreignfieldxpath, datasetfieldname
(15, 'affiliation', 'authorAffiliation', TRUE, 3, 1 ),
(16, ':contributor', 'contributorName', FALSE, NULL, 1 ),
(17, 'type', 'contributorType', TRUE, 16, 1 ),
(18, ':publisher', 'producerName', FALSE, NULL, 1 ),
(18, ':publisher', 'distributorName', FALSE, NULL, 1 ),
(19, ':language', 'language', FALSE, NULL, 1 )
ON CONFLICT DO NOTHING;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,11 @@ private void harvestingClientRun(boolean allowHarvestingMissingCVV) throws Inte
}
// verify count after collecting global ids
assertEquals(expectedNumberOfSetsHarvested, jsonPath.getInt("data.total_count"));

// ensure the publisher name is present in the harvested dataset citation
Response harvestedDataverse = given().get(ARCHIVE_URL + "/api/dataverses/1");
String harvestedDataverseName = harvestedDataverse.getBody().jsonPath().getString("data.name");
assertTrue(jsonPath.getString("data.items[0].citation").contains(harvestedDataverseName));

// Fail if it hasn't completed in maxWait seconds
assertTrue(i < maxWait);
Expand Down

0 comments on commit 24143fd

Please sign in to comment.