From ed98a6d9d04aafd8ed32212e3e77040d1f8338e0 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Thu, 28 Jul 2022 10:15:14 +0200 Subject: [PATCH] [Datacite mapping] include the older datacite prefixed OpenAIRE id among the originalId[] --- .../dnetlib/dhp/datacite/DataciteToOAFTransformation.scala | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dhp-workflows/dhp-aggregation/src/main/scala/eu/dnetlib/dhp/datacite/DataciteToOAFTransformation.scala b/dhp-workflows/dhp-aggregation/src/main/scala/eu/dnetlib/dhp/datacite/DataciteToOAFTransformation.scala index ff966aaea1..a7863d1449 100644 --- a/dhp-workflows/dhp-aggregation/src/main/scala/eu/dnetlib/dhp/datacite/DataciteToOAFTransformation.scala +++ b/dhp-workflows/dhp-aggregation/src/main/scala/eu/dnetlib/dhp/datacite/DataciteToOAFTransformation.scala @@ -584,7 +584,12 @@ object DataciteToOAFTransformation { JField("awardUri", JString(awardUri)) <- fundingReferences } yield awardUri + val oid = result.getId result.setId(IdentifierFactory.createIdentifier(result)) + if (!result.getId.equalsIgnoreCase(oid)) { + result.getOriginalId.add(oid) + } + var relations: List[Relation] = awardUris.flatMap(a => get_projectRelation(a, result.getId)).filter(r => r != null)