From e623f12bef464db4875ac55349bee078ac894d91 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 30 Jul 2020 16:32:59 +0200 Subject: [PATCH] refactoring --- .../dhp/oa/graph/dump/graph/DumpGraphEntities.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/DumpGraphEntities.java b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/DumpGraphEntities.java index 81fdbd1d3..ee5881366 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/DumpGraphEntities.java +++ b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/DumpGraphEntities.java @@ -113,7 +113,10 @@ public class DumpGraphEntities implements Serializable { datasource.setId(d.getId()); - Optional.ofNullable(d.getOriginalId()).ifPresent(oId -> datasource.setOriginalId(oId.stream().filter(Objects::nonNull).collect(Collectors.toList()))); + Optional + .ofNullable(d.getOriginalId()) + .ifPresent( + oId -> datasource.setOriginalId(oId.stream().filter(Objects::nonNull).collect(Collectors.toList()))); Optional .ofNullable(d.getPid()) @@ -334,9 +337,9 @@ public class DumpGraphEntities implements Serializable { .ofNullable(p.getKeywords()) .ifPresent(key -> project.setKeywords(key.getValue())); - Optional - .ofNullable(p.getDuration()) - .ifPresent(duration -> project.setDuration(duration.getValue())); +// Optional +// .ofNullable(p.getDuration()) +// .ifPresent(duration -> project.setDuration(duration.getValue())); Optional> omandate = Optional.ofNullable(p.getOamandatepublications()); Optional> oecsc39 = Optional.ofNullable(p.getEcsc39());