[EOSC TAG] adding search in orp for jupyter notebook criteria

This commit is contained in:
Miriam Baglioni 2022-11-11 12:42:58 +01:00
parent 55fa3b2a17
commit b18bbca8af
1 changed files with 5 additions and 1 deletions

View File

@ -118,6 +118,10 @@ public class SparkEoscTag {
if (containscriteriaTwitter(orp)) { if (containscriteriaTwitter(orp)) {
addEIG(orp.getEoscifguidelines(), EOSC_TWITTER_DATA, EOSC_TWITTER_DATA, "", COMPLIES_WITH); 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; return orp;
}, Encoders.bean(OtherResearchProduct.class)) }, Encoders.bean(OtherResearchProduct.class))
.write() .write()
@ -190,7 +194,7 @@ public class SparkEoscTag {
.orElse(false); .orElse(false);
} }
private static boolean containsCriteriaNotebook(Software s) { private static boolean containsCriteriaNotebook(Result s) {
if (!Optional.ofNullable(s.getSubject()).isPresent()) if (!Optional.ofNullable(s.getSubject()).isPresent())
return false; return false;
if (s.getSubject().stream().anyMatch(sbj -> sbj.getValue().toLowerCase().contains("jupyter"))) if (s.getSubject().stream().anyMatch(sbj -> sbj.getValue().toLowerCase().contains("jupyter")))