diff --git a/dhp-workflows/dhp-graph-provision/src/main/java/eu/dnetlib/dhp/oa/provision/CreateRelatedEntitiesJob_phase1.java b/dhp-workflows/dhp-graph-provision/src/main/java/eu/dnetlib/dhp/oa/provision/CreateRelatedEntitiesJob_phase1.java index 48e5945c0..8cbda0903 100644 --- a/dhp-workflows/dhp-graph-provision/src/main/java/eu/dnetlib/dhp/oa/provision/CreateRelatedEntitiesJob_phase1.java +++ b/dhp-workflows/dhp-graph-provision/src/main/java/eu/dnetlib/dhp/oa/provision/CreateRelatedEntitiesJob_phase1.java @@ -161,6 +161,12 @@ public class CreateRelatedEntitiesJob_phase1 { title.setValue(StringUtils.left(title.getValue(), ModelHardLimits.MAX_TITLE_LENGTH)); re.setTitle(title); } + if (result.getDescription() != null && !result.getDescription().isEmpty()) { + final Field description = result.getDescription().stream().findFirst().get(); + if (StringUtils.isNotBlank(description.getValue())) { + re.setDescription(StringUtils.left(description.getValue(), ModelHardLimits.MAX_RELATED_ABSTRACT_LENGTH)); + } + } re.setDateofacceptance(getValue(result.getDateofacceptance())); re.setPublisher(getValue(result.getPublisher())); diff --git a/dhp-workflows/dhp-graph-provision/src/main/java/eu/dnetlib/dhp/oa/provision/model/RelatedEntity.java b/dhp-workflows/dhp-graph-provision/src/main/java/eu/dnetlib/dhp/oa/provision/model/RelatedEntity.java index f13c6c90e..12540aba0 100644 --- a/dhp-workflows/dhp-graph-provision/src/main/java/eu/dnetlib/dhp/oa/provision/model/RelatedEntity.java +++ b/dhp-workflows/dhp-graph-provision/src/main/java/eu/dnetlib/dhp/oa/provision/model/RelatedEntity.java @@ -23,6 +23,7 @@ public class RelatedEntity implements Serializable { private String websiteurl; // datasource, organizations, projects // results + private String description; private String dateofacceptance; private String publisher; private List pid; @@ -77,6 +78,14 @@ public class RelatedEntity implements Serializable { return websiteurl; } + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + public void setWebsiteurl(String websiteurl) { this.websiteurl = websiteurl; } 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 b2a4ad8ff..304171399 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 @@ -1071,6 +1071,9 @@ public class XmlRecordFactory implements Serializable { if (re.getTitle() != null && isNotBlank(re.getTitle().getValue())) { metadata.add(XmlSerializationUtils.mapStructuredProperty("title", re.getTitle())); } + if (StringUtils.isNotBlank(re.getDescription())) { + metadata.add(XmlSerializationUtils.asXmlElement("description", re.getDescription())); + } if (isNotBlank(re.getDateofacceptance())) { metadata .add(XmlSerializationUtils.asXmlElement("dateofacceptance", re.getDateofacceptance()));