Aggiornare 'dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/ResultMapper.java'

Removing the dump of Measure at the level of the result. We decided not to map it
This commit is contained in:
Miriam Baglioni 2021-11-18 14:49:38 +01:00
parent 10a32f287f
commit 793b5a8e5f
1 changed files with 9 additions and 9 deletions

View File

@ -43,15 +43,15 @@ public class ResultMapper implements Serializable {
try { try {
addTypeSpecificInformation(out, input, ort); addTypeSpecificInformation(out, input, ort);
Optional<List<Measure>> mes = Optional.ofNullable(input.getMeasures()); // Optional<List<Measure>> mes = Optional.ofNullable(input.getMeasures());
if (mes.isPresent()) { // if (mes.isPresent()) {
List<KeyValue> measure = new ArrayList<>(); // List<KeyValue> measure = new ArrayList<>();
mes // mes
.get() // .get()
.forEach( // .forEach(
m -> m.getUnit().forEach(u -> measure.add(KeyValue.newInstance(m.getId(), u.getValue())))); // m -> m.getUnit().forEach(u -> measure.add(KeyValue.newInstance(m.getId(), u.getValue()))));
out.setMeasures(measure); // out.setMeasures(measure);
} // }
Optional Optional
.ofNullable(input.getAuthor()) .ofNullable(input.getAuthor())