From b18bbca8af79e08512a192f684ba4c7353d7eeab Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Fri, 11 Nov 2022 12:42:58 +0100 Subject: [PATCH] [EOSC TAG] adding search in orp for jupyter notebook criteria --- .../main/java/eu/dnetlib/dhp/bulktag/eosc/SparkEoscTag.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/eosc/SparkEoscTag.java b/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/eosc/SparkEoscTag.java index c131399cc0..501fdf50e1 100644 --- a/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/eosc/SparkEoscTag.java +++ b/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/eosc/SparkEoscTag.java @@ -118,6 +118,10 @@ public class SparkEoscTag { if (containscriteriaTwitter(orp)) { addEIG(orp.getEoscifguidelines(), EOSC_TWITTER_DATA, EOSC_TWITTER_DATA, "", COMPLIES_WITH); } + if (containsCriteriaNotebook(orp)) { + addEIG(orp.getEoscifguidelines(), EOSC_JUPYTER_NOTEBOOK, EOSC_JUPYTER_NOTEBOOK, "", + COMPLIES_WITH); + } return orp; }, Encoders.bean(OtherResearchProduct.class)) .write() @@ -190,7 +194,7 @@ public class SparkEoscTag { .orElse(false); } - private static boolean containsCriteriaNotebook(Software s) { + private static boolean containsCriteriaNotebook(Result s) { if (!Optional.ofNullable(s.getSubject()).isPresent()) return false; if (s.getSubject().stream().anyMatch(sbj -> sbj.getValue().toLowerCase().contains("jupyter")))