Skip to content

Commit

Permalink
Merge pull request DSpace#9237 from 4Science/main_CST-12826
Browse files Browse the repository at this point in the history
ROR Integration - OAI PMH & Orcid
  • Loading branch information
tdonohue authored Feb 16, 2024
2 parents fbd3d60 + d6741fd commit 9b0e38a
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ public void tesGetRecords() throws Exception {

ImportRecord record = recordsImported.iterator().next();

assertThat(record.getValueList(), hasSize(9));
assertThat(record.getValueList(), hasSize(11));

assertThat(
record.getSingleValue("organization.legalName"),
is("The University of Texas")
);
assertThat(record.getSingleValue("organization.identifier.ror"), is("https://ror.org/02f6dcw23"));
assertThat(record.getSingleValue("organization.alternateName"), is("UTHSCSA"));
assertThat(record.getSingleValue("organization.url"), is("http://www.uthscsa.edu/"));
assertThat(record.getSingleValue("dc.type"), is("Education"));
assertThat(record.getSingleValue("organization.address.addressCountry"), is("US"));
assertThat(record.getSingleValue("organization.foundingDate"), is("1959"));
Expand Down Expand Up @@ -116,12 +118,15 @@ public void tesGetRecord() throws Exception {

context.restoreAuthSystemState();
ImportRecord record = rorServiceImpl.getRecord("https://ror.org/01sps7q28");
assertThat(record.getValueList(), hasSize(7));
assertThat(record.getValueList(), hasSize(9));
assertThat(
record.getSingleValue("organization.legalName"),
is("The University of Texas Health Science Center at Tyler")
);
assertThat(record.getSingleValue("organization.identifier.ror"), is("https://ror.org/01sps7q28"));
assertThat(record.getSingleValue("organization.alternateName"), is("UTHSCT"));
assertThat(record.getSingleValue("organization.url"),
is("https://www.utsystem.edu/institutions/university-texas-health-science-center-tyler"));
assertThat(record.getSingleValue("dc.type"), is("Healthcare"));
assertThat(record.getSingleValue("organization.address.addressCountry"), is("US"));
assertThat(record.getSingleValue("organization.foundingDate"), is("1947"));
Expand Down
7 changes: 7 additions & 0 deletions dspace/config/crosswalks/oai/metadataFormats/oai_openaire.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,13 @@
</oaire:funderIdentifier>
</xsl:template>

<!-- This template creates the sub-element <oaire:funderIdentifier> from a Funded Project built entity -->
<xsl:template match="doc:field[starts-with(@name,'project.funder.rorIdentifier')]" mode="entity_funding">
<oaire:funderIdentifier funderIdentifierType="ROR" schemeURI="http://ror.org/">
<xsl:value-of select="./text()"/>
</oaire:funderIdentifier>
</xsl:template>

<!-- This template creates the sub-element <oaire:fundingStream> from a Funded Project built entity -->
<xsl:template match="doc:field[starts-with(@name,'oaire.fundingStream')]" mode="entity_funding">
<oaire:fundingStream>
Expand Down
2 changes: 2 additions & 0 deletions dspace/config/modules/orcid.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ orcid.mapping.organization.city = organization.address.addressLocality
orcid.mapping.organization.identifiers = organization.identifier.crossrefid::FUNDREF
orcid.mapping.organization.identifiers = organization.identifier.rin::RINGGOLD
orcid.mapping.organization.identifiers = organization.identifier.lei::LEI
orcid.mapping.organization.identifiers = organization.identifier.ror::ROR

### Contributor mapping ###
orcid.mapping.contributor.email = person.email
Expand All @@ -128,6 +129,7 @@ orcid.validation.organization.identifier-sources = RINGGOLD
orcid.validation.organization.identifier-sources = GRID
orcid.validation.organization.identifier-sources = FUNDREF
orcid.validation.organization.identifier-sources = LEI
orcid.validation.organization.identifier-sources = ROR

#------------------------------------------------------------------#
#---------------------ORCID BULK SYNCHRONIZATION-------------------#
Expand Down
14 changes: 13 additions & 1 deletion dspace/config/registries/schema-organization-types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@
<element>parentOrganization</element>
<scope_note>The larger organization that this organization is a subOrganization of, if any.</scope_note>
</dc-type>



<dc-type>
<schema>organization</schema>
<element>alternateName</element>
<scope_note>An alias for the organization.</scope_note>
</dc-type>

<dc-type>
<schema>organization</schema>
<element>url</element>
<scope_note>Url of the organization.</scope_note>
</dc-type>

</dspace-dc-types>
18 changes: 18 additions & 0 deletions dspace/config/spring/api/ror-integration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
<util:map id="rorMetadataFieldMap" key-type="org.dspace.importer.external.metadatamapping.MetadataFieldConfig" value-type="org.dspace.importer.external.metadatamapping.contributor.MetadataContributor">
<entry key-ref="ror.title" value-ref="rorTitleContrib"/>
<entry key-ref="ror.identifier" value-ref="rorIdentifierContrib"/>
<entry key-ref="ror.links" value-ref="rorLinksContrib"/>
<entry key-ref="ror.types" value-ref="rorTypesContrib"/>
<entry key-ref="ror.acronym" value-ref="rorAcronymContrib"/>
<entry key-ref="ror.country" value-ref="rorCountryContrib"/>
<entry key-ref="ror.established" value-ref="rorEstablishedContrib"/>
<entry key-ref="ror.fundref" value-ref="rorFundRefContrib"/>
Expand All @@ -38,6 +40,22 @@
<constructor-arg value="organization.identifier.ror"/>
</bean>

<bean id="rorAcronymContrib" class="org.dspace.importer.external.metadatamapping.contributor.SimpleJsonPathMetadataContributor">
<property name="field" ref="ror.acronym"/>
<property name="query" value="/acronyms"/>
</bean>
<bean id="ror.acronym" class="org.dspace.importer.external.metadatamapping.MetadataFieldConfig">
<constructor-arg value="organization.alternateName"/>
</bean>

<bean id="rorLinksContrib" class="org.dspace.importer.external.metadatamapping.contributor.SimpleJsonPathMetadataContributor">
<property name="field" ref="ror.links"/>
<property name="query" value="/links"/>
</bean>
<bean id="ror.links" class="org.dspace.importer.external.metadatamapping.MetadataFieldConfig">
<constructor-arg value="organization.url"/>
</bean>

<bean id="rorTypesContrib" class="org.dspace.importer.external.metadatamapping.contributor.SimpleJsonPathMetadataContributor">
<property name="field" ref="ror.types"/>
<property name="query" value="/types"/>
Expand Down
16 changes: 15 additions & 1 deletion dspace/config/spring/api/virtual-metadata.xml.openaire4
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
<entry key="oaire.awardTitle" value-ref="publicationProject_name"/>
<entry key="project.funder.name" value-ref="publicationProject_projectFunderName_related"/>
<entry key="project.funder.identifier" value-ref="publicationProject_projectFunderId_related"/>
<entry key="project.funder.rorIdentifier" value-ref="publicationProject_projectRorId_related"/>
</util:map>
<bean class="org.dspace.content.virtual.Collected" id="publicationProject_name">
<property name="fields">
Expand Down Expand Up @@ -208,7 +209,13 @@
<property name="relationshipTypeString" value="isFundingAgencyOfProject"/>
<property name="virtualMetadataConfiguration" ref="projectOrgUnit_orgId"/>
</bean>


<bean class="org.dspace.content.virtual.Related" id="publicationProject_projectRorId_related">
<property name="relationshipTypeString" value="isProjectOfFundingAgency"/>
<property name="place" value="0"/>
<property name="virtualMetadataConfiguration" ref="projectOrgUnit_rorId"/>
</bean>

<!-- Config like this will tell our VirtualMetadataPopulator to include the virtual metadata field
'project.funder.*' on the appropriate item with the values defined in the value-ref.
This value-ref should be a bean of type VirtualMetadataConfiguration -->
Expand All @@ -231,4 +238,11 @@
</util:list>
</property>
</bean>
<bean class="org.dspace.content.virtual.Collected" id="projectOrgUnit_rorId">
<property name="fields">
<util:list>
<value>organization.identifier.ror</value>
</util:list>
</property>
</bean>
</beans>

0 comments on commit 9b0e38a

Please sign in to comment.