clarin-dspace
clarin-dspace copied to clipboard
OpenAIRE authority updates
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
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
@kosarko Could be this issue closed? Is this answer sufficient?
@milanmajchrak Does this need https://wiki.lyrasis.org/display/DSDOC7x/Configurable+Entities or can it work without those?
@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.
@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?
submission - funding
-
funding autocomplete somehow works but shows funding org instead of name
-
try searching project code 870930 (in code) or Khresmoi (in name)
-
adding/deleting Funding seems broken
-
can’t delete when only one eu project (the delete button is disabled)
-
sometimes NPE
Caused by: java.lang.NullPointerException: Cannot invoke "org.dspace.app.rest.model.patch.JsonValueEvaluator.getValueNode()" because "jsonValEvaluator" is null at org.dspace.app.rest.submit.step.DescribeStep.getOperationWithChangedMetadataField(DescribeStep.java:257) ~[classes/:7.5] at org.dspace.app.rest.submit.step.DescribeStep.doPatchProcessing(DescribeStep.java:186) ~[classes/:7.5] at org.dspace.app.rest.submit.SubmissionService.evaluatePatchToInprogressSubmission(SubmissionService.java:450) ~[classes/:7.5] ... 155 more
-
or
2023-09-27 11:28:55,274 ERROR 990ee354-4f11-4f5c-8b1a-6feeeea9e96f f7d292a8-8cab-480a-8112-1166d79d5dca org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ An exception has occurred (status:500) java.lang.NullPointerException: Cannot invoke "eu.openaire.jaxb.model.Response.getHeader()" because "projectResponse" is null at org.dspace.external.provider.impl.OpenAIREFundingDataProvider.getNumberOfResults(OpenAIREFundingDataProvider.java:172) ~[dspace-api-7.5.jar:7.5] at org.dspace.external.service.impl.ExternalDataServiceImpl.getNumberOfResults(ExternalDataServiceImpl.java:87) ~[dspace-api-7.5.jar:7.5]
-
- Funding autocomplete is fixed - it will be in the new release
- 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. - 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.