Solr JSON payload #399
|
@ -161,6 +161,12 @@ public class CreateRelatedEntitiesJob_phase1 {
|
||||||
title.setValue(StringUtils.left(title.getValue(), ModelHardLimits.MAX_TITLE_LENGTH));
|
title.setValue(StringUtils.left(title.getValue(), ModelHardLimits.MAX_TITLE_LENGTH));
|
||||||
re.setTitle(title);
|
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.setDateofacceptance(getValue(result.getDateofacceptance()));
|
||||||
re.setPublisher(getValue(result.getPublisher()));
|
re.setPublisher(getValue(result.getPublisher()));
|
||||||
|
|
|
@ -23,6 +23,7 @@ public class RelatedEntity implements Serializable {
|
||||||
private String websiteurl; // datasource, organizations, projects
|
private String websiteurl; // datasource, organizations, projects
|
||||||
|
|
||||||
// results
|
// results
|
||||||
|
private String description;
|
||||||
private String dateofacceptance;
|
private String dateofacceptance;
|
||||||
private String publisher;
|
private String publisher;
|
||||||
private List<StructuredProperty> pid;
|
private List<StructuredProperty> pid;
|
||||||
|
@ -77,6 +78,14 @@ public class RelatedEntity implements Serializable {
|
||||||
return websiteurl;
|
return websiteurl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
public void setWebsiteurl(String websiteurl) {
|
public void setWebsiteurl(String websiteurl) {
|
||||||
this.websiteurl = websiteurl;
|
this.websiteurl = websiteurl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1071,6 +1071,9 @@ public class XmlRecordFactory implements Serializable {
|
||||||
if (re.getTitle() != null && isNotBlank(re.getTitle().getValue())) {
|
if (re.getTitle() != null && isNotBlank(re.getTitle().getValue())) {
|
||||||
metadata.add(XmlSerializationUtils.mapStructuredProperty("title", re.getTitle()));
|
metadata.add(XmlSerializationUtils.mapStructuredProperty("title", re.getTitle()));
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotBlank(re.getDescription())) {
|
||||||
|
metadata.add(XmlSerializationUtils.asXmlElement("description", re.getDescription()));
|
||||||
|
}
|
||||||
if (isNotBlank(re.getDateofacceptance())) {
|
if (isNotBlank(re.getDateofacceptance())) {
|
||||||
metadata
|
metadata
|
||||||
.add(XmlSerializationUtils.asXmlElement("dateofacceptance", re.getDateofacceptance()));
|
.add(XmlSerializationUtils.asXmlElement("dateofacceptance", re.getDateofacceptance()));
|
||||||
|
|
Loading…
Reference in New Issue