forked from D-Net/dnet-hadoop
formatting
This commit is contained in:
parent
a9eef9c852
commit
16baf5b69e
|
@ -122,31 +122,31 @@ public class SparkPrepareResultProject implements Serializable {
|
||||||
|
|
||||||
private static Project getProject(eu.dnetlib.dhp.schema.oaf.Project op) {
|
private static Project getProject(eu.dnetlib.dhp.schema.oaf.Project op) {
|
||||||
Project p = Project
|
Project p = Project
|
||||||
.newInstance(
|
.newInstance(
|
||||||
op.getId(),
|
op.getId(),
|
||||||
op.getCode().getValue(),
|
op.getCode().getValue(),
|
||||||
Optional
|
Optional
|
||||||
.ofNullable(op.getAcronym())
|
.ofNullable(op.getAcronym())
|
||||||
.map(a -> a.getValue())
|
.map(a -> a.getValue())
|
||||||
.orElse(null),
|
.orElse(null),
|
||||||
Optional
|
Optional
|
||||||
.ofNullable(op.getTitle())
|
.ofNullable(op.getTitle())
|
||||||
.map(v -> v.getValue())
|
.map(v -> v.getValue())
|
||||||
.orElse(null),
|
.orElse(null),
|
||||||
Optional
|
Optional
|
||||||
.ofNullable(op.getFundingtree())
|
.ofNullable(op.getFundingtree())
|
||||||
.map(value -> {
|
.map(value -> {
|
||||||
List<Funder> tmp = value
|
List<Funder> tmp = value
|
||||||
.stream()
|
.stream()
|
||||||
.map(ft -> getFunder(ft.getValue()))
|
.map(ft -> getFunder(ft.getValue()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (tmp.size() > 0) {
|
if (tmp.size() > 0) {
|
||||||
return tmp.get(0);
|
return tmp.get(0);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.orElse(null));
|
.orElse(null));
|
||||||
|
|
||||||
Optional<DataInfo> di = Optional.ofNullable(op.getDataInfo());
|
Optional<DataInfo> di = Optional.ofNullable(op.getDataInfo());
|
||||||
Provenance provenance = new Provenance();
|
Provenance provenance = new Provenance();
|
||||||
|
|
Loading…
Reference in New Issue