ufal / clarin-dspace

clarin-dspace digital repository based on DSpace and LINDAT/CLARIN DSpace
http://lindat.cz
BSD 3-Clause "New" or "Revised" License
27 stars 17 forks source link

OpenAIRE authority updates #1030

Open kosarko opened 1 year ago

kosarko commented 1 year ago

How is the OpenAIRE authority kept up to date?

Originally, this https://github.com/ufal/clarin-dspace/blob/clarin/dspace/bin/openaire-refresh-list runs on cron and creates a form-value-pairs list, and this https://github.com/ufal/clarin-dspace/blob/clarin/dspace-api/src/main/java/org/dspace/content/authority/OpenAIREAuthority.java makes the list available (jspui/xmlui uses the ChoiceAuthorityManager) in submission workflow

milanmajchrak commented 1 year ago

DSpace7.* offers OpenAIRE REST API which is used for fetching fresh data.

OpenAIRE data provider class: https://github.com/dataquest-dev/DSpace/blob/dtq-dev/dspace-api/src/main/java/org/dspace/external/provider/impl/OpenAIREFundingDataProvider.java API: https://github.com/dataquest-dev/DSpace/blob/dtq-dev/dspace-server-webapp/src/main/java/org/dspace/app/rest/ExternalSourcesRestController.java

milanmajchrak commented 1 year ago

@kosarko Could be this issue closed? Is this answer sufficient?

kosarko commented 1 year ago

@milanmajchrak Does this need https://wiki.lyrasis.org/display/DSDOC7x/Configurable+Entities or can it work without those?

milanmajchrak commented 1 year ago

@kosarko Customizing the configurable entities is necessary only because of openaire4.xsl crosswalk. Does the CLARIN-DSpace customization require the openaire4 crosswalk? I haven't find it in the http://lindat.mff.cuni.cz/repository/oai/request?verb=ListMetadataFormats, so I suggest no.

Otherwise the openaire works without customizing the configurable entities.

kosarko commented 1 year ago

@milanmajchrak

There's another context in oai that exposes metadata based on the openaire data repository guidelines https://lindat.mff.cuni.cz/repository/oai/openaire_data?verb=ListMetadataFormats (https://github.com/ufal/clarin-dspace/blob/8a6ba5c98547942d7115b74cf4978e0b29ca50e4/dspace/config/crosswalks/oai/xoai.xml#L36, https://github.com/ufal/clarin-dspace/blob/8a6ba5c98547942d7115b74cf4978e0b29ca50e4/dspace/config/crosswalks/oai/metadataFormats/datacite_openaire.xsl , ). That context exposes only those items that have this (https://github.com/ufal/clarin-dspace/blob/8a6ba5c98547942d7115b74cf4978e0b29ca50e4/dspace/config/crosswalks/oai/xoai.xml#L447) in the dc.relation field. dc.relation gets filled in https://github.com/ufal/clarin-dspace/blob/8a6ba5c98547942d7115b74cf4978e0b29ca50e4/dspace/config/input-forms.xml#L1642 with the help of https://github.com/ufal/clarin-dspace/blob/8a6ba5c98547942d7115b74cf4978e0b29ca50e4/dspace-xmlui/src/main/webapp/themes/UFAL/lib/js/ufal-submission.js#L23 the choices endpoint for openaire is this class https://github.com/ufal/clarin-dspace/blob/8a6ba5c98547942d7115b74cf4978e0b29ca50e4/dspace-api/src/main/java/org/dspace/content/authority/OpenAIREAuthority.java#L144 which eventually reads this file https://github.com/ufal/clarin-dspace/blob/8a6ba5c98547942d7115b74cf4978e0b29ca50e4/dspace/config/openaire-cache.list


I haven't found much documentation for the OpenAIREFundingDataProvider. The submission form change in the original commit (https://github.com/paulo-graca/DSpace/blob/c4ffbe10be9a3424de9d61c79494e8233d56ae46/dspace/config/submission-forms.xml#L1068) seems to indicate (it's all in relation-field element) you need to be using the Configurable Entities feature.

Check the slides here https://wiki.lyrasis.org/pages/viewpage.action?pageId=285900920 there is a part about entities starting with slide 18...it's an advanced feature...you need to enable it...

So does OpenAIREFundingDataProvider work with configurable entities disabled?

kosarko commented 11 months ago

submission - funding

milanmajchrak commented 4 months ago
  1. Funding autocomplete is fixed - it will be in the new release
  2. Delete button when there is only one funding - I think this is not an error, that is Vanilla behavior: when there is only one value the delete button is not popped up.
  3. NPE - I wasn't able to reproduce those errors, but I fixed the case when the jsonValEvaluator is null. That second error is Vanilla error, and maybe it is fixed in the 7.6.1. version.