1
0
Fork 0
This commit is contained in:
Miriam Baglioni 2020-07-17 14:03:23 +02:00
parent 44e1c40c42
commit d7d84c8217
1 changed files with 7 additions and 6 deletions

View File

@ -72,8 +72,9 @@ public class ResultTagger implements Serializable {
// tagging for Subject // tagging for Subject
final Set<String> subjects = new HashSet<>(); final Set<String> subjects = new HashSet<>();
if (Objects.nonNull(result.getSubject())){ if (Objects.nonNull(result.getSubject())) {
result.getSubject() result
.getSubject()
.stream() .stream()
.map(subject -> subject.getValue()) .map(subject -> subject.getValue())
.filter(StringUtils::isNotBlank) .filter(StringUtils::isNotBlank)
@ -91,13 +92,13 @@ public class ResultTagger implements Serializable {
if (Objects.nonNull(result.getInstance())) { if (Objects.nonNull(result.getInstance())) {
for (Instance i : result.getInstance()) { for (Instance i : result.getInstance()) {
if(Objects.nonNull(i.getCollectedfrom())){ if (Objects.nonNull(i.getCollectedfrom())) {
if(Objects.nonNull(i.getCollectedfrom().getKey())){ if (Objects.nonNull(i.getCollectedfrom().getKey())) {
tmp.add(StringUtils.substringAfter(i.getCollectedfrom().getKey(), "|")); tmp.add(StringUtils.substringAfter(i.getCollectedfrom().getKey(), "|"));
} }
} }
if(Objects.nonNull(i.getHostedby())){ if (Objects.nonNull(i.getHostedby())) {
if(Objects.nonNull(i.getHostedby().getKey())){ if (Objects.nonNull(i.getHostedby().getKey())) {
tmp.add(StringUtils.substringAfter(i.getHostedby().getKey(), "|")); tmp.add(StringUtils.substringAfter(i.getHostedby().getKey(), "|"));
} }
} }