refactoring

This commit is contained in:
Miriam Baglioni 2020-07-30 16:32:59 +02:00
parent ff7d05abb4
commit e623f12bef
1 changed files with 7 additions and 4 deletions

View File

@ -113,7 +113,10 @@ public class DumpGraphEntities implements Serializable {
datasource.setId(d.getId()); 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 Optional
.ofNullable(d.getPid()) .ofNullable(d.getPid())
@ -334,9 +337,9 @@ public class DumpGraphEntities implements Serializable {
.ofNullable(p.getKeywords()) .ofNullable(p.getKeywords())
.ifPresent(key -> project.setKeywords(key.getValue())); .ifPresent(key -> project.setKeywords(key.getValue()));
Optional // Optional
.ofNullable(p.getDuration()) // .ofNullable(p.getDuration())
.ifPresent(duration -> project.setDuration(duration.getValue())); // .ifPresent(duration -> project.setDuration(duration.getValue()));
Optional<Field<String>> omandate = Optional.ofNullable(p.getOamandatepublications()); Optional<Field<String>> omandate = Optional.ofNullable(p.getOamandatepublications());
Optional<Field<String>> oecsc39 = Optional.ofNullable(p.getEcsc39()); Optional<Field<String>> oecsc39 = Optional.ofNullable(p.getEcsc39());