From d7d84c82171ced5529cdbdc219f036b3670a9921 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Fri, 17 Jul 2020 14:03:23 +0200 Subject: [PATCH] - --- .../dnetlib/dhp/bulktag/community/ResultTagger.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/community/ResultTagger.java b/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/community/ResultTagger.java index d58704b75..120ad8edc 100644 --- a/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/community/ResultTagger.java +++ b/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/community/ResultTagger.java @@ -72,8 +72,9 @@ public class ResultTagger implements Serializable { // tagging for Subject final Set subjects = new HashSet<>(); - if (Objects.nonNull(result.getSubject())){ - result.getSubject() + if (Objects.nonNull(result.getSubject())) { + result + .getSubject() .stream() .map(subject -> subject.getValue()) .filter(StringUtils::isNotBlank) @@ -91,13 +92,13 @@ public class ResultTagger implements Serializable { if (Objects.nonNull(result.getInstance())) { for (Instance i : result.getInstance()) { - if(Objects.nonNull(i.getCollectedfrom())){ - if(Objects.nonNull(i.getCollectedfrom().getKey())){ + if (Objects.nonNull(i.getCollectedfrom())) { + if (Objects.nonNull(i.getCollectedfrom().getKey())) { tmp.add(StringUtils.substringAfter(i.getCollectedfrom().getKey(), "|")); } } - if(Objects.nonNull(i.getHostedby())){ - if(Objects.nonNull(i.getHostedby().getKey())){ + if (Objects.nonNull(i.getHostedby())) { + if (Objects.nonNull(i.getHostedby().getKey())) { tmp.add(StringUtils.substringAfter(i.getHostedby().getKey(), "|")); } }