Solr JSON payload #399
|
@ -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<String> 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()));
|
||||
|
|
|
@ -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<StructuredProperty> 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;
|
||||
}
|
||||
|
|
|
@ -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()));
|
||||
|
|
Loading…
Reference in New Issue