added fulltext to result

This commit is contained in:
Miriam Baglioni 2020-08-03 18:03:27 +02:00
parent ec4b392d12
commit d465f0eec9
1 changed files with 8 additions and 11 deletions

View File

@ -124,17 +124,14 @@ public class ResultMapper implements Serializable {
break; break;
} }
Optional<List<eu.dnetlib.dhp.schema.oaf.Author>> oAuthor = Optional.ofNullable(input.getAuthor());
if (oAuthor.isPresent()) { Optional
// List<eu.dnetlib.dhp.schema.dump.oaf.Author> authorList = new ArrayList<>(); .ofNullable(input.getFulltext())
out .ifPresent(fts -> out.setFulltext(fts.stream().map(ft -> ft.getValue()).collect(Collectors.toList())));
.setAuthor(
oAuthor Optional
.get() .ofNullable(input.getAuthor())
.stream() .ifPresent(ats -> out.setAuthor(ats.stream().map(at -> getAuthor(at)).collect(Collectors.toList())));
.map(oa -> getAuthor(oa))
.collect(Collectors.toList()));
}
// I do not map Access Right UNKNOWN or OTHER // I do not map Access Right UNKNOWN or OTHER