#56: map relevantDates from aggregated ODF records

This commit is contained in:
Alessia Bardi 2020-11-17 18:42:09 +01:00
parent 7e0a76a8ac
commit 8f87020a50
1 changed files with 9 additions and 2 deletions

View File

@ -162,16 +162,23 @@ public class OdfToOafMapper extends AbstractMdRecordToOafMapper {
for (final Object o : doc.selectNodes("//datacite:date")) {
final String dateType = ((Node) o).valueOf("@dateType");
if (StringUtils.isBlank(dateType)
&& !dateType.equalsIgnoreCase("Accepted")
|| ( !dateType.equalsIgnoreCase("Accepted")
&& !dateType.equalsIgnoreCase("Issued")
&& !dateType.equalsIgnoreCase("Updated")
&& !dateType.equalsIgnoreCase("Available")) {
&& !dateType.equalsIgnoreCase("Available"))) {
res
.add(
structuredProperty(
((Node) o).getText(), "UNKNOWN", "UNKNOWN", DNET_DATA_CITE_DATE, DNET_DATA_CITE_DATE,
info));
}
else{
res
.add(
structuredProperty(
((Node) o).getText(), dateType, dateType, DNET_DATA_CITE_DATE, DNET_DATA_CITE_DATE,
info));
}
}
return res;
}