From 84a58802ab51ea5a496b14059799a78366d74d07 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 6 Oct 2023 14:48:05 +0200 Subject: [PATCH] [OC] using the common pid cleaning function --- .../opencitations/CreateActionSetSparkJob.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/opencitations/CreateActionSetSparkJob.java b/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/opencitations/CreateActionSetSparkJob.java index ed0a54efa..a367ba852 100644 --- a/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/opencitations/CreateActionSetSparkJob.java +++ b/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/opencitations/CreateActionSetSparkJob.java @@ -7,6 +7,7 @@ import java.io.IOException; import java.io.Serializable; import java.util.*; +import eu.dnetlib.dhp.schema.oaf.utils.*; import org.apache.commons.cli.ParseException; import org.apache.commons.io.IOUtils; import org.apache.hadoop.io.Text; @@ -29,10 +30,6 @@ import eu.dnetlib.dhp.application.ArgumentApplicationParser; import eu.dnetlib.dhp.schema.action.AtomicAction; import eu.dnetlib.dhp.schema.common.ModelConstants; import eu.dnetlib.dhp.schema.oaf.*; -import eu.dnetlib.dhp.schema.oaf.utils.CleaningFunctions; -import eu.dnetlib.dhp.schema.oaf.utils.IdentifierFactory; -import eu.dnetlib.dhp.schema.oaf.utils.OafMapperUtils; -import eu.dnetlib.dhp.schema.oaf.utils.PidType; import eu.dnetlib.dhp.utils.DHPUtils; import scala.Tuple2; @@ -136,19 +133,19 @@ public class CreateActionSetSparkJob implements Serializable { prefix = DOI_PREFIX; citing = prefix + IdentifierFactory - .md5(CleaningFunctions.normalizePidValue(PidType.doi.toString(), value.getCiting())); + .md5(PidCleaner.normalizePidValue(PidType.doi.toString(), value.getCiting())); cited = prefix + IdentifierFactory - .md5(CleaningFunctions.normalizePidValue(PidType.doi.toString(), value.getCited())); + .md5(PidCleaner.normalizePidValue(PidType.doi.toString(), value.getCited())); break; case POCI: prefix = PMID_PREFIX; citing = prefix + IdentifierFactory - .md5(CleaningFunctions.normalizePidValue(PidType.pmid.toString(), value.getCiting())); + .md5(PidCleaner.normalizePidValue(PidType.pmid.toString(), value.getCiting())); cited = prefix + IdentifierFactory - .md5(CleaningFunctions.normalizePidValue(PidType.pmid.toString(), value.getCited())); + .md5(PidCleaner.normalizePidValue(PidType.pmid.toString(), value.getCited())); break; default: throw new IllegalStateException("Invalid prefix: " + p);