From 308e10d10223d493f468a13b120249c19dd1e401 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Thu, 23 Mar 2023 11:23:22 +0100 Subject: [PATCH] serialising: 1. measures for all the entity types and 2. result level fulltext --- .../dhp/oa/provision/utils/XmlRecordFactory.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dhp-workflows/dhp-graph-provision/src/main/java/eu/dnetlib/dhp/oa/provision/utils/XmlRecordFactory.java b/dhp-workflows/dhp-graph-provision/src/main/java/eu/dnetlib/dhp/oa/provision/utils/XmlRecordFactory.java index a34db67db..e88b49de4 100644 --- a/dhp-workflows/dhp-graph-provision/src/main/java/eu/dnetlib/dhp/oa/provision/utils/XmlRecordFactory.java +++ b/dhp-workflows/dhp-graph-provision/src/main/java/eu/dnetlib/dhp/oa/provision/utils/XmlRecordFactory.java @@ -207,12 +207,22 @@ public class XmlRecordFactory implements Serializable { .map(p -> XmlSerializationUtils.mapStructuredProperty("pid", p)) .collect(Collectors.toList())); } + if (entity.getMeasures() != null) { + metadata.addAll(measuresAsXml(entity.getMeasures())); + } if (ModelSupport.isResult(type)) { final Result r = (Result) entity; - if (r.getMeasures() != null) { - metadata.addAll(measuresAsXml(r.getMeasures())); + if (r.getFulltext() != null) { + metadata + .addAll( + r + .getFulltext() + .stream() + .filter(Objects::nonNull) + .map(c -> XmlSerializationUtils.asXmlElement("fulltext", c.getValue())) + .collect(Collectors.toList())); } if (r.getEoscifguidelines() != null) {