Skip to content
Ondřej Košarko edited this page Apr 20, 2026 · 6 revisions

📝 This page needs more work IMO not using Choice/Authority plugin, https://github.com/ufal/clarin-dspace/issues/1170 is on radar

OpenAIRE

Usage

Submit

If the data should be exported in OpenAIRE dataset, is chosen by the user during submission by selecting the appropriate European project that funded it. The suggestion box appears after typing the preset number of characters (usually project id or name). At least 4 chars are needed at the time being. Lower numbers leads to quite a lot of false positives as the search is done using "contains".


Edit

The edit metadata section uses a bit different mechanism. After you've added the dc.relation field, enter your search term as the value and click lookup

A new window will open where you can select the project. Use reasonable search terms (id or name) as only 10 first matches are shown.

Implementation notes

dspace/config/crosswalks/oai/xoai.xml defines three OAI-PMH contexts for OpenAIRE; the first two come from upstream (see the docs there):

  • openaire (base URL oai/openaire) – compliant with OpenAIRE Guidelines 3.0; applies the openaire.xsl transformer and exposes oai_dc / mets metadata formats.
  • openaire4 (base URL oai/openaire4) – compliant with OpenAIRE Guidelines 4.0; applies openaire4.xsl and exposes the oai_openaire metadata format.
  • openaire_data (base URL oai/openaire_data) – exports items in oai_datacite format and defines the openaire_data set required by the data-archive guidelines. Only items whose dc.relation starts with info:eu-repo/grantAgreement/EC/FP are included.

datacite_openaire.xsl currently exports only the mandatory and mandatory-when-applicable fields, with the exception of RelatedIdentifier. None of the recommended or optional fields is implemented.

The relevant XSL files live in dspace/config/crosswalks/oai/:

  • transformers/openaire.xsl – OpenAIRE Guidelines 1.1 crosswalk
  • transformers/openaire4.xsl – OpenAIRE Guidelines 4.0 crosswalk (ISO 639-3 language normalization, COAR access-rights vocabulary)
  • metadataFormats/oai_openaire.xsl – OAI_OpenAIRE metadata format (Guidelines 4.0)
  • metadataFormats/datacite_openaire.xsl – DataCite / OpenAIRE schema mapping

metadata notes

  • creators - mapped from dc.contributor.author, probably not sorted according to importance as the guidelines suggests.
  • publicationYear - using year from dc.date.issued, some suggest year of embargo end should be used when embargo is in place
  • contributor with type funder - mapped from dc.relation where the info:eu-repo… value is stored
  • dates
    • Issued - dc.date.issued
    • Accepted - dc.date.accessioned. When item is embargoed this is the start of the embargo period.
    • Available - either dc.date.available or local.embargo.termslift. This indicates the end of embargo period.
  • rights - display embargoedAccess for items with embargo, restrictedAccess for items (licenses) wanting extra information, openAccess for the rest. Displays also the license uri
  • description type Abstract - using dc.description
  • identifier, title and publisher are straight forward

Some extra info was added to the oai solr. Rebuild of oai solr is needed:

/dspace/bin/dspace oai import

configuration

OAI module

OAI-PMH is configured in dspace/config/modules/oai.cfg:

oai.enabled = true
oai.path = oai
oai.storage = solr
oai.config.dir = ${dspace.dir}/config/crosswalks/oai

OpenAIRE funding lookup

In v7 the funding lookup uses the OpenAIRE REST API directly (no local cache file). The REST connector and data provider are wired via Spring in dspace/config/spring/api/external-openaire.xml.

dspace/config/modules/openaire-client.cfg:

openaire.api.url = https://api.openaire.eu
openaire.token-service.url = https://aai.openaire.eu/oidc/token

Unauthenticated requests are limited to 60 per hour. For higher throughput, register an OpenAIRE API client and set the credentials:

openaire.client.id =
openaire.client.secret =

FE → BE data flow

The FE does not use the Choice/Authority plugin. Instead, DsDynamicSponsorAutocompleteComponent (tied to the local.sponsor complex field) manually constructs an ExternalSource object and queries the BE external-sources REST API:

User types in funding field (EU sponsor type selected)
  ↓
DsDynamicSponsorAutocompleteComponent
  constructs ExternalSource { id: 'openAIREFunding' }
  calls LookupRelationService.getExternalResults()
    → ExternalSourceDataService
    → GET /api/integration/externalsources/openAIREFunding/entries?query=…&page=1&size=20
  ↓
ExternalSourcesRestController (BE)
  → ExternalDataService
  → OpenAIREFundingDataProvider  (bean id: openAIREFunding, wired in external-openaire.xml)
  → OpenAIRERestConnector
  → GET https://api.openaire.eu/search/projects?keywords=…
     (XML response, JAXB-unmarshaled; entry IDs are base64-encoded grant URIs)
  ↓
Response: paginated ExternalSourceEntry objects with metadata:
  project.funder.name / project.funder.identifier
  dc.title / dc.title.alternative
  oaire.awardNumber / oaire.awardURI / oaire.fundingStream
  dc.subject / dc.coverage.spatial

On selection the component calls composeSponsorInput(), which assembles the stored local.sponsor value:

EU;<grantCode>;<funderName>;<projectTitle>;info:eu-repo/grantAgreement/…

#### OpenAIRE metadata schema

The oaire metadata schema is registered in dspace/config/registries/openaire4-types.xml and defines fields such as oaire.fundingStream, oaire.awardNumber, oaire.awardURI, oaire.awrdTitle, oaire.version, and oaire.citation.*.

Entity relationships for OpenAIRE 4.0 (publication–person, publication–orgunit) are defined in dspace/config/entities/openaire4-relationships.xml.

Links

Home


Getting Started

Features

Operations

For Users

Development

Reference


Archive (v5 / stale)

Clone this wiki locally