DSpace 7.6.1: Crossref search

268 views
Skip to first unread message

Milos Ivanovic

unread,
Dec 18, 2023, 5:10:52 AM12/18/23
to DSpace Technical Support
Dear All,

I need some help regarding processing metadata imported from CrossRef (and probably other sources). After "Import metadata from external source", the Author fields (which map to dc.contributor.author) are filled properly, however in the form "First_name, Last_name". This is not the way "Last_name, First_name" we store them in the Solr cache and how ORCID sees them.

Is trere a way to change this behavior (filter etc.) in config only? If no, which part of the core should I look at? I know for the wiki, but additional insight by an expert would be more than welcome.

Thanks in advance.
Milos

Milos Ivanovic

unread,
Dec 28, 2023, 4:19:18 AM12/28/23
to DSpace Technical Support
If I dare to implement this transformation ("Name Surname" -> "Surname, Name") myself, what would you suggest? To do it in Angular or in the backend?

Milos

Milos Ivanovic

unread,
Dec 28, 2023, 7:46:19 AM12/28/23
to Walk, Martin, DSpace Technical Support
Dear Martin,

Thank you for your quick response! It did the trick.

Moreover, regarding further customization of Crossref metadata import, I have one more question. When importing an article, in Crossref notation, it has a dc.type of "journal-article". However, I'd like to keep it as "Article". Where do you suggest to carry out the conversion from journal-article->Article?

Best regards
Milos


чет, 28. дец 2023. у 11:04 Walk, Martin <marti...@tu-berlin.de> је написао/ла:
Hi Milos,

have a look at CrossRefAuthorMetadataProcessor.java. In line 46, just change the order from

values.add(givenName + ", " + familyName);

to

values.add(familyName + ", " + givenName);

Best regards,
Martin.

---
Martin Walk
[er/ihm he/him]

Hauptabteilung Elektronische Dienste
Main Department Electronic Services

Online-Dienste und IT-Entwicklung
Online-Services and IT-Development

Technische Universität Berlin
Universitätsbibliothek / University Library
Fasanenstraße 88, 10623 Berlin
GERMANY

marti...@tu-berlin.de
www.tu.berlin/ub
---
Martin Walk
[er/ihm he/him]

Hauptabteilung Elektronische Dienste
Main Department Electronic Services

Online-Dienste und IT-Entwicklung
Online-Services and IT-Development

Technische Universität Berlin
Universitätsbibliothek / University Library
Fasanenstraße 88, 10623 Berlin
GERMANY

marti...@tu-berlin.de
www.tu.berlin/ub
> --
> All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
> ---
> You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/86d1e86d-6386-4490-a51e-2daad3b53cc6n%40googlegroups.com.

Walk, Martin

unread,
Dec 28, 2023, 10:06:43 AM12/28/23
to Milos Ivanovic, DSpace Technical Support

Walk, Martin

unread,
Dec 28, 2023, 10:06:43 AM12/28/23
to Milos Ivanovic, DSpace Technical Support
Dear Milos,

we introduced a new class, CrossRefTypeMetadataProcessor.java to transform dc.type values. I send it to you as an attachment. To use it, you include it in dspace/config/spring/api/crossref-integration.xml like this:

Before changes:

<bean id="crossrefDoiTypeContrib" class="org.dspace.importer.external.metadatamapping.contributor.SimpleJsonPathMetadataContributor">
<property name="field" ref="crossref.type"/>
<property name="query" value="$.type"/>
</bean>
<bean id="crossref.type" class="org.dspace.importer.external.metadatamapping.MetadataFieldConfig">
<constructor-arg value="dc.type"/>
</bean>

After changes:

<bean id="crossrefDoiTypeContrib" class="org.dspace.importer.external.metadatamapping.contributor.SimpleJsonPathMetadataContributor">
<property name="field" ref="crossref.type"/>
<property name="metadataProcessor" ref="crossrefTypeMetadataProcessor"></property>
</bean>
<bean name="crossrefTypeMetadataProcessor" class="org.dspace.importer.external.crossref.CrossRefTypeMetadataProcessor">
<property name="pathToArray" value="/type"></property>
</bean>
<bean id="crossref.type" class="org.dspace.importer.external.metadatamapping.MetadataFieldConfig">
<constructor-arg value="dc.type"/>
</bean>

CrossRefTypeMetadataProcessor.java
Reply all
Reply to author
Forward
0 new messages