Skip to content

Commit

Permalink
Merge pull request #11118 from IQSS/11075-ror
Browse files Browse the repository at this point in the history
add ROR as an Author Identifier Type
  • Loading branch information
ofahimIQSS authored Jan 22, 2025
2 parents fb36def + d94a7a2 commit fe5fcb8
Show file tree
Hide file tree
Showing 10 changed files with 265 additions and 15 deletions.
15 changes: 15 additions & 0 deletions doc/release-notes/11075-ror.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### ROR (Research Organization Registry) as Author Identifier Type

ROR (Research Organization Registry) has been added as an Author Identifier Type (alongside ORCID, etc.) for when the author is an organization rather than a person. As with all author identifiers, be sure to select the proper identifier type (e.g. "ROR") and enter just the unique identifier (e.g. "03vek6s52") rather than the full URL (e.g. "https://ror.org/03vek6s52"). Like ORCID, ROR will appear in the "Datacite" metadata export format. See also the [ROR](https://ror.org) website, a new [note](https://dataverse-guide--11118.org.readthedocs.build/en/11118/user/dataset-management.html#adding-a-new-dataset) in a guides about entering author identifiers, #11075, and #11118.

## Upgrade Instructions

6\. Update metadata blocks

These changes reflect incremental improvements made to the handling of core metadata fields. Expect the loading of the citation block to take several seconds because of its size (especially due to the number of languages).

```shell
wget https://raw.githubusercontent.com/IQSS/dataverse/v6.6/scripts/api/data/metadatablocks/citation.tsv

curl http://localhost:8080/api/admin/datasetfield/load -H "Content-type: text/tab-separated-values" -X POST --upload-file citation.tsv
```
6 changes: 5 additions & 1 deletion doc/sphinx-guides/source/admin/metadatacustomization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,11 @@ Each of the three main sections own sets of properties:
| | “Value” field is used as the identifier. | |
+--------------+--------------------------------------------+-----------------------------------------+
| displayOrder | Control the order in which the enumerated | Non-negative integer. |
| | values are displayed for selection. | |
| | values are displayed for selection. When | |
| | adding new values, you don't have to add | |
| | them at the end. You can renumber existing | |
| | values to update the order in which they | |
| | appear. | |
+--------------+--------------------------------------------+-----------------------------------------+

FieldType definitions
Expand Down
6 changes: 4 additions & 2 deletions doc/sphinx-guides/source/user/dataset-management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ Adding a New Dataset

#. Navigate to the Dataverse collection in which you want to add a dataset.
#. Click on the "Add Data" button and select "New Dataset" in the dropdown menu. **Note:** If you are on the root Dataverse collection, your My Data page or click the "Add Data" link in the navbar, the dataset you create will be hosted in the root Dataverse collection. You can change this by selecting another Dataverse collection you have proper permissions to create datasets in, from the Host Dataverse collection dropdown in the create dataset form. This option to choose will not be available after you create the dataset.
#. To quickly get started, enter at minimum all the required fields with an asterisk (e.g., the Dataset Title, Author Name,
Description Text, Point of Contact Email, and Subject) to get a Data Citation with a DOI.
#. To quickly get started, enter at minimum all the required fields with an asterisk (e.g., the Dataset Title, Author Name, Description Text, Point of Contact Email, and Subject) to get a Data Citation with a DOI.

#. When entering author identifiers, select the type from the dropdown (e.g. "ORCID") and under "Identifier" enter just the unique identifier (e.g. "0000-0002-1825-0097") rather than the full URL (e.g. "https://orcid.org/0000-0002-1825-0097").

#. Scroll down to the "Files" section and click on "Select Files to Add" to add all the relevant files to your Dataset.
You can also upload your files directly from your Dropbox. **Tip:** You can drag and drop or select multiple files at a time from your desktop
directly into the upload widget. Your files will appear below the "Select Files to Add" button where you can add a
Expand Down
17 changes: 9 additions & 8 deletions scripts/api/data/metadatablocks/citation.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,14 @@
contributorType Work Package Leader 15
contributorType Other 16
authorIdentifierScheme ORCID 0
authorIdentifierScheme ISNI 1
authorIdentifierScheme LCNA 2
authorIdentifierScheme VIAF 3
authorIdentifierScheme GND 4
authorIdentifierScheme DAI 5
authorIdentifierScheme ResearcherID 6
authorIdentifierScheme ScopusID 7
authorIdentifierScheme ROR 1
authorIdentifierScheme ISNI 2
authorIdentifierScheme LCNA 3
authorIdentifierScheme VIAF 4
authorIdentifierScheme GND 5
authorIdentifierScheme DAI 6
authorIdentifierScheme ResearcherID 7
authorIdentifierScheme ScopusID 8
language 'Are'are alu 0 alu
language 'Auhelawa kud 1 kud
language A'ou aou 2 aou
Expand Down Expand Up @@ -8061,4 +8062,4 @@
publicationRelationType IsSupplementTo RT3 3
publicationRelationType IsSupplementedBy RT4 4
publicationRelationType IsReferencedBy RT5 5
publicationRelationType References RT6 6
publicationRelationType References RT6 6
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ public enum ExternalIdentifier {
// note: DAI is missing from this list, because it doesn't have resolvable URL
ResearcherID("ResearcherID", "https://publons.com/researcher/%s/", "^[A-Z\\d][A-Z\\d-]+[A-Z\\d]$"),
ScopusID("ScopusID", "https://www.scopus.com/authid/detail.uri?authorId=%s", "^\\d*$"),
//Requiring ROR to be URL form as we use it where there is no id type field and matching any 9 digit number starting with 0 seems a bit aggressive
ROR("ROR", "https://ror.org/%s", "^(https:\\/\\/ror.org\\/)0[a-hj-km-np-tv-z|0-9]{6}[0-9]{2}$");
// ROR regex from https://ror.readme.io/docs/identifier
ROR("ROR", "https://ror.org/%s", "^0[a-hj-km-np-tv-z|0-9]{6}[0-9]{2}$"),
// In some contexts, we check for the full ROR URL.
ROR_FULL_URL("ROR", "https://ror.org/%s", "^(https:\\/\\/ror.org\\/)0[a-hj-km-np-tv-z|0-9]{6}[0-9]{2}$");

private String name;
private String template;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ private void writeEntityElements(XMLStreamWriter xmlw, String elementName, Strin
attributeMap.clear();
boolean isROR=false;
String orgName = affiliation;
ExternalIdentifier externalIdentifier = ExternalIdentifier.ROR;
ExternalIdentifier externalIdentifier = ExternalIdentifier.ROR_FULL_URL;
if (externalIdentifier.isValidIdentifier(orgName)) {
isROR = true;
JsonObject jo = getExternalVocabularyValue(orgName);
Expand Down Expand Up @@ -1528,7 +1528,7 @@ private void writeFundingReferences(XMLStreamWriter xmlw, DvObject dvObject) thr
fundingReferenceWritten = XmlWriterUtil.writeOpenTagIfNeeded(xmlw, "fundingReferences", fundingReferenceWritten);
boolean isROR=false;
String funderIdentifier = null;
ExternalIdentifier externalIdentifier = ExternalIdentifier.ROR;
ExternalIdentifier externalIdentifier = ExternalIdentifier.ROR_FULL_URL;
if (externalIdentifier.isValidIdentifier(funder)) {
isROR = true;
JsonObject jo = getExternalVocabularyValue(funder);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/propertyFiles/citation.properties
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ controlledvocabulary.contributorType.supervisor=Supervisor
controlledvocabulary.contributorType.work_package_leader=Work Package Leader
controlledvocabulary.contributorType.other=Other
controlledvocabulary.authorIdentifierScheme.orcid=ORCID
controlledvocabulary.authorIdentifierScheme.ror=ROR
controlledvocabulary.authorIdentifierScheme.isni=ISNI
controlledvocabulary.authorIdentifierScheme.lcna=LCNA
controlledvocabulary.authorIdentifierScheme.viaf=VIAF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,22 @@ public void testIsValidAuthorIdentifierGnd() {
assertFalse(validator.isValidAuthorIdentifier("junk", pattern));
}

@Test
public void testIsValidAuthorIdentifierRor() {
DatasetFieldValueValidator validator = new DatasetFieldValueValidator();
Pattern pattern = ExternalIdentifier.valueOf("ROR").getPattern();
assertTrue(validator.isValidAuthorIdentifier("03vek6s52", pattern));
assertFalse(validator.isValidAuthorIdentifier("junk", pattern));
}

@Test
public void testIsValidAuthorIdentifierRorFull() {
DatasetFieldValueValidator validator = new DatasetFieldValueValidator();
Pattern pattern = ExternalIdentifier.valueOf("ROR_FULL_URL").getPattern();
assertTrue(validator.isValidAuthorIdentifier("https://ror.org/03vek6s52", pattern));
assertFalse(validator.isValidAuthorIdentifier("junk", pattern));
}

final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();

@ParameterizedTest
Expand Down
Loading

0 comments on commit fe5fcb8

Please sign in to comment.