Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display the authorIdentifier metadata field as a link #119

Open
MellyGray opened this issue Jun 14, 2023 · 1 comment
Open

Display the authorIdentifier metadata field as a link #119

MellyGray opened this issue Jun 14, 2023 · 1 comment
Labels
MVP Milestone 2 MVP Milestone 2: Add a Dataset pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows SPA: Dataset page (View)

Comments

@MellyGray
Copy link
Contributor

Overview of the Feature Request

Display the authorIdentifier metadata field as a link

For example the ORCID in this screenshot:
Screen Shot 2023-05-31 at 4 11 27 PM

What kind of user is the feature intended for?

All

What inspired the request?

We discussed that we need to create the link in the backend so once the backend is ready we should display it correctly in the frontend, that's why I created this issue.

What existing behavior do you want changed?

Display the authorIdentifier metadata field as a link

Any brand new behavior do you want to add to Dataverse?

No

Any open or closed issues related to this feature request?

@MellyGray MellyGray added MVP Milestone 2 MVP Milestone 2: Add a Dataset pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows SPA: Dataset page (View) labels Jun 14, 2023
@pdurbin
Copy link
Member

pdurbin commented Jun 16, 2023

The backend does have logic for creating URLs like https://orcid.org/0000-0002-1825-0097

Check out these tests from https://github.com/IQSS/dataverse/blob/v5.13/src/test/java/edu/harvard/iq/dataverse/DatasetAuthorTest.java

    @Parameters
    public static Collection<String[]> parameters() {
        return Arrays.asList(new String[][] {
            { "ORCID", "0000-0002-1825-0097", "https://orcid.org/0000-0002-1825-0097" },
            { "ISNI", "0000000121032683", "http://www.isni.org/isni/0000000121032683"},
            { "LCNA", "n82058243", "http://id.loc.gov/authorities/names/n82058243" },
            { "VIAF", "172389567", "https://viaf.org/viaf/172389567" },
            { "GND", "4079154-3", "https://d-nb.info/gnd/4079154-3" },
            { "ResearcherID", "634082", "https://publons.com/researcher/634082/" },
            { "ResearcherID", "AAW-9289-2021", "https://publons.com/researcher/AAW-9289-2021/" },
            { "ResearcherID", "J-9733-2013", "https://publons.com/researcher/J-9733-2013/" },
            { "ScopusID", "6602344670", "https://www.scopus.com/authid/detail.uri?authorId=6602344670" },
            { null, null, null, },
        });
    }

    @Test
    public void getIdentifierAsUrl() {
        DatasetAuthor datasetAuthor = new DatasetAuthor();
        if (idType !=null && idValue != null) {
            datasetAuthor.setIdType(idType);
            datasetAuthor.setIdValue(idValue);
        }
        assertEquals(expectedIdentifierAsUrl, datasetAuthor.getIdentifierAsUrl());
    }

Here's the datasetAuthor.getIdentifierAsUrl() method that's being exercised by those tests: https://github.com/IQSS/dataverse/blob/v5.13/src/main/java/edu/harvard/iq/dataverse/DatasetAuthor.java#L89

The logic and patterns are in ExternalIdentifier - https://github.com/IQSS/dataverse/blob/v5.13/src/main/java/edu/harvard/iq/dataverse/ExternalIdentifier.java

public enum ExternalIdentifier {
    ORCID("ORCID", "https://orcid.org/%s", "^\\d{4}-\\d{4}-\\d{4}-(\\d{4}|\\d{3}X)$"),
    ISNI("ISNI", "http://www.isni.org/isni/%s", "^\\d*$"),
    LCNA("LCNA", "http://id.loc.gov/authorities/names/%s", "^[a-z]+\\d+$"),
    VIAF("VIAF", "https://viaf.org/viaf/%s", "^\\d*$"),
    // GND regex from https://www.wikidata.org/wiki/Property:P227
    GND("GND", "https://d-nb.info/gnd/%s", "^1[01]?\\d{7}[0-9X]|[47]\\d{6}-\\d|[1-9]\\d{0,7}-[0-9X]|3\\d{7}[0-9X]$"),
    // 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*$");

@DS-INRAE DS-INRAE moved this to ⚠️ Needed/Important in Recherche Data Gouv Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MVP Milestone 2 MVP Milestone 2: Add a Dataset pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows SPA: Dataset page (View)
Projects
Status: ⚠️ Needed/Important
Development

No branches or pull requests

2 participants