From 758e662ab856fb3af626457be8ad6a0b57ad6782 Mon Sep 17 00:00:00 2001 From: Giambattista Bloisi Date: Mon, 19 Jun 2023 13:08:10 +0200 Subject: [PATCH] Revert "REmove duplicated code and ensure that load and initialization is done through "DedupConfig.load" method" This reverts commit 485f9d18cbebf00969b0f9e795de5c8fdb49f9aa. --- .../java/eu/dnetlib/dhp/oa/dedup/AbstractSparkAction.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/AbstractSparkAction.java b/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/AbstractSparkAction.java index 68af3d699..136413376 100644 --- a/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/AbstractSparkAction.java +++ b/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/AbstractSparkAction.java @@ -88,7 +88,9 @@ abstract class AbstractSparkAction implements Serializable { "for $x in /RESOURCE_PROFILE[.//RESOURCE_IDENTIFIER/@value = '%s'] return $x//DEDUPLICATION/text()", configProfileId)); - DedupConfig dedupConfig = DedupConfig.load(conf); + DedupConfig dedupConfig = new ObjectMapper().readValue(conf, DedupConfig.class); + dedupConfig.getPace().initModel(); + dedupConfig.getPace().initTranslationMap(); dedupConfig.getWf().setConfigurationId(actionSetId); return dedupConfig;