forked from D-Net/dnet-hadoop
[Graph DUMP] Fix issue for empty origilaId list
This commit is contained in:
parent
8442efd8d1
commit
94918a673c
|
@ -133,9 +133,21 @@ public class ResultMapper implements Serializable {
|
||||||
.ifPresent(value -> value.stream().forEach(f -> formatList.add(f.getValue())));
|
.ifPresent(value -> value.stream().forEach(f -> formatList.add(f.getValue())));
|
||||||
out.setFormat(formatList);
|
out.setFormat(formatList);
|
||||||
out.setId(input.getId());
|
out.setId(input.getId());
|
||||||
out
|
out.setOriginalId(new ArrayList<>());
|
||||||
|
Optional
|
||||||
|
.ofNullable(input.getOriginalId())
|
||||||
|
.ifPresent(
|
||||||
|
v -> out
|
||||||
.setOriginalId(
|
.setOriginalId(
|
||||||
input.getOriginalId().stream().filter(s -> !s.startsWith("50|")).collect(Collectors.toList()));
|
input
|
||||||
|
.getOriginalId()
|
||||||
|
.stream()
|
||||||
|
.filter(s -> !s.startsWith("50|"))
|
||||||
|
.collect(Collectors.toList())));
|
||||||
|
// Optional
|
||||||
|
// .ofNullable(
|
||||||
|
// input.getOriginalId().stream().filter(s -> !s.startsWith("50|")).collect(Collectors.toList()))
|
||||||
|
// .ifPresent(v -> out.setOriginalId(v));
|
||||||
|
|
||||||
Optional<List<eu.dnetlib.dhp.schema.oaf.Instance>> oInst = Optional
|
Optional<List<eu.dnetlib.dhp.schema.oaf.Instance>> oInst = Optional
|
||||||
.ofNullable(input.getInstance());
|
.ofNullable(input.getInstance());
|
||||||
|
|
Loading…
Reference in New Issue