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

Editor / Associated resources panel / Extend DOI to support Crossref in addition to Datacite searches #8610

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

josegar74
Copy link
Member

@josegar74 josegar74 commented Jan 22, 2025

Follow up of #7669.

associated-resources-doi

For associated resources, enable DOI search of CrossRef DOI providers. Previously only DataCite providers were supported.

Can be configured to search both types of providers or only one of them. When both types of providers are configured, results from both are combined in the results list.

Configuration:

  • doiapi source types: doiapi, crossref
  • prefix: DOI prefix for of the DOI resources to search.

For each type of source:

  • url: API end-point.
  • params: search parameters. Currently supported query value, with the query to use. It allows the following placeholders:
    • {query}: replaced with the text entered in the search field.
    • {prefix}: replaced with the DOI prefix configured.

Example configuration for both providers: Datacite and CrossRef

{
    "fields": {
        "associationType": "crossReference",
        "initiativeType": "platform"
    },
    "sources": {"doiapi": {
        "prefix": "10.1111",
        "datacite": {
            "url": "https://api.datacite.org/dois",
            "params": {"query": "titles.title:{query}* OR doi:{query} OR id:{query}"}
        },
        "crossref": {
            "url": "https://api.crossref.org/works?select=DOI%2Ctitle%2Ctype%2Cprefix%2Cabstract%2CURL",
            "params": {"query": "rows=10&query={prefix}%2F{query}&filter=doi%3A{prefix}%2F{query}"}
        }
    }}
}

Example configuration only for Datacite provider

{
    "fields": {
        "associationType": "crossReference",
        "initiativeType": "platform"
    },
    "sources": {"doiapi": {
        "prefix": "10.1111",
        "datacite": {
            "url": "https://api.datacite.org/dois",
            "params": {"query": "titles.title:{query}* OR doi:{query} OR id:{query}"}
        }
    }}
}

Example configuration only for Crossref provider

{
    "fields": {
        "associationType": "crossReference",
        "initiativeType": "platform"
    },
    "sources": {"doiapi": {
        "prefix": "10.1111",
        "crossref": {
            "url": "https://api.crossref.org/works?select=DOI%2Ctitle%2Ctype%2Cprefix%2Cabstract%2CURL",
            "params": {"query": "rows=10&query={prefix}%2F{query}&filter=doi%3A{prefix}%2F{query}"}
        }
    }}
}

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

Funded by Ifremer

@josegar74 josegar74 added this to the 4.4.7 milestone Jan 22, 2025
@josegar74 josegar74 requested a review from fxprunayre January 22, 2025 10:25
…in addition to Datacite searches - combine results in one list
@josegar74 josegar74 force-pushed the 44-associatedresources-doicrossref branch from 09f571d to 9cfeda5 Compare January 22, 2025 10:41
…in addition to Datacite searches

* Add DOI search by default
* Crossref add mailto parameter which is good to indicate
* Use $q.all for running crossref and datacite search
* encodeURIparameter
* Add tooltip with the origin of the record
Copy link

sonarqubecloud bot commented Feb 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants