Scripts and material related to using external vocabulary services with Dataverse
This directory contains configurations that allow support lookup of people (via ORCID), or organizations (via ROR), or both (with user selecting “Person” or “Organization” when adding an entry). The configurations support multiple fields. The choice of ORCID, ROR, or both is made by setting the protocol (orcid, ror, orcid-or-ror) in the configuration JSON. Any of these choices should work for any of the fields for which a configuration is supplied.
Use of the person-or-org.js script and the configurations in this directory require Dataverse >= 6.11.
The person-or-org.js script is designed as a replacement for the person.js and ror.js scripts. Using either of them in other fields will be less efficient (multiple scripts loading and running) and could cause errors or unexpected behavior.
Minimal:
load the desired json file in the :CVocConf setting using the Dataverse API. e.g. using curl from the services/person-or-org/configs directory: curl -X PUT --upload-file authorsOrcidAndRor.json http://localhost:8080/api/admin/settings/:CVocConf.
Alternately, use the scripts/deploy.js or scripts/deploy.py tool to interactively select and update your configuration.
refresh your browser page. That’s it. You should see displays like those shown in this repo’s README file.
Testing:
authorsOrcidAndRor.json to replace https://orcid.org/ with https://sandbox.orcid.org/ in the cvoc-url, retrieval-url and vocabs entries.Production:
scripts/deploy.js link (or python scripts/deploy.py link) command to populate the dist/ directory and then use the linkWeb command to link it to your local website. Adjust the URLs in your configuration (using the compose command) to point to your local copies. This assures that changes in this repository will not automatically be used on your site.The required files (available in dist/js/ after linking) are:
person-or-org.js : the Javascript file that provides ORCID and ROR support,cvocutils.js : a Javascript file with common methods used by both scripts,i18n/person-or-org_*.json : internationalization files for the supported languages.(These scripts also use jquery and select2 which are already included in Dataverse).
This config manages the author field (the name, idType, Identifier, and affiliation child fields), providing ORCID and or ROR lookup in the author name field and ROR for the affiliation.
This config requires the changes that were added to Dataverse in [PR #12331[(https://github.com/IQSS/dataverse/pull/12331) as part of v6.11.
This config supports ORCID or ROR lookup in the grant number agency field (“Funding Agency” in the Dataverse UI).
This config supports ORCID lookup in the depositor field. If you wish to use ROR instead, or both ORCID and ROR, change the “protocol” in the JSON config file.