forked from D-Net/dnet-hadoop
serialising: 1. measures for all the entity types and 2. result level fulltext
This commit is contained in:
parent
518618f1a9
commit
308e10d102
|
@ -207,12 +207,22 @@ public class XmlRecordFactory implements Serializable {
|
||||||
.map(p -> XmlSerializationUtils.mapStructuredProperty("pid", p))
|
.map(p -> XmlSerializationUtils.mapStructuredProperty("pid", p))
|
||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
if (entity.getMeasures() != null) {
|
||||||
|
metadata.addAll(measuresAsXml(entity.getMeasures()));
|
||||||
|
}
|
||||||
|
|
||||||
if (ModelSupport.isResult(type)) {
|
if (ModelSupport.isResult(type)) {
|
||||||
final Result r = (Result) entity;
|
final Result r = (Result) entity;
|
||||||
|
|
||||||
if (r.getMeasures() != null) {
|
if (r.getFulltext() != null) {
|
||||||
metadata.addAll(measuresAsXml(r.getMeasures()));
|
metadata
|
||||||
|
.addAll(
|
||||||
|
r
|
||||||
|
.getFulltext()
|
||||||
|
.stream()
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.map(c -> XmlSerializationUtils.asXmlElement("fulltext", c.getValue()))
|
||||||
|
.collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r.getEoscifguidelines() != null) {
|
if (r.getEoscifguidelines() != null) {
|
||||||
|
|
Loading…
Reference in New Issue