From f19feceaf0195239b7ebca4015962e48a39c37ff Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 14 May 2021 12:53:40 +0200 Subject: [PATCH] set the old identifier before switching to the new one --- .../main/java/eu/dnetlib/doiboost/crossref/Crossref2Oaf.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/crossref/Crossref2Oaf.scala b/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/crossref/Crossref2Oaf.scala index 95c5981e0c..d6f2d524ab 100644 --- a/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/crossref/Crossref2Oaf.scala +++ b/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/crossref/Crossref2Oaf.scala @@ -105,12 +105,11 @@ case object Crossref2Oaf { //is replaced using IdentifierFactory, but the old identifier //is preserved among the originalId(s) val oldId = generateIdentifier(result, doi) + result.setId(oldId) val newId = IdentifierFactory.createIdentifier(result) - if (!oldId.equalsIgnoreCase(newId)) { result.getOriginalId.add(oldId) } - result.setId(newId) // Add DataInfo