From 7dbdd4a0fe9832273790a777b7bc54895b35df93 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Wed, 10 Aug 2022 15:13:10 +0200 Subject: [PATCH] [Clean Country]changes related to https://code-repo.d4science.org/D-Net/dnet-hadoop/pulls/241#issuecomment-6766 --- .../dhp/oa/graph/clean/country/CleanCountrySparkJob.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/clean/country/CleanCountrySparkJob.java b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/clean/country/CleanCountrySparkJob.java index 3ba84a317..30991e9d7 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/clean/country/CleanCountrySparkJob.java +++ b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/clean/country/CleanCountrySparkJob.java @@ -10,6 +10,7 @@ import java.util.stream.Collectors; import javax.swing.text.html.Option; +import eu.dnetlib.dhp.schema.oaf.utils.PidType; import org.apache.commons.io.IOUtils; import org.apache.spark.SparkConf; import org.apache.spark.api.java.function.FilterFunction; @@ -94,7 +95,6 @@ public class CleanCountrySparkJob implements Serializable { List hostedBy = spark .read() .textFile(datasourcePath) - // .filter((FilterFunction) ds -> !ds.equals(collectedfrom)) .collectAsList(); Dataset res = spark @@ -113,7 +113,8 @@ public class CleanCountrySparkJob implements Serializable { if (r .getPid() .stream() - .anyMatch(p -> p.getQualifier().getClassid().equals("doi") && pidInParam(p.getValue(), verifyParam))) { + .anyMatch(p -> p.getQualifier().getClassid() + .equals(PidType.doi) && pidInParam(p.getValue(), verifyParam))) { r .setCountry( r