Minor bug fixes on the exporter
This commit is contained in:
parent
a6bd1f71ca
commit
7a921ec33a
|
@ -29,7 +29,7 @@ public class RDAManager {
|
|||
Dmp rdaDmp = dmpRDAMapper.toRDA(dmp);
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
|
||||
mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss Z"));
|
||||
|
||||
result = mapper.writeValueAsString(rdaDmp);
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ public class DatasetRDAMapper {
|
|||
rda.setDatasetId(DatasetIdRDAMapper.toRDA(dataset.getId()));
|
||||
rda.setTitle(dataset.getLabel());
|
||||
rda.setDescription(dataset.getDescription());
|
||||
// rda.setAdditionalProperty("template", dataset.getProfile().getId());
|
||||
try {
|
||||
|
||||
DatasetWizardModel datasetWizardModel = new DatasetWizardModel().fromDataModel(dataset);
|
||||
|
@ -57,7 +58,7 @@ public class DatasetRDAMapper {
|
|||
}
|
||||
List<JsonNode> preservationNodes = JsonSearcher.findNodes(datasetDescriptionObj, "rdaProperty", "dataset.preservation_statement");
|
||||
if (!preservationNodes.isEmpty()) {
|
||||
rda.setDataQualityAssurance(preservationNodes.stream().map(preservationNode -> preservationNode.get("value").asText()).collect(Collectors.toList()));
|
||||
rda.setPreservationStatement(preservationNodes.get(0).get("value").asText());
|
||||
}
|
||||
List<JsonNode> distributionNodes = JsonSearcher.findNodes(datasetDescriptionObj, "rdaProperty", "dataset.distribution");
|
||||
if (!distributionNodes.isEmpty()) {
|
||||
|
@ -77,7 +78,7 @@ public class DatasetRDAMapper {
|
|||
}
|
||||
List<JsonNode> sensitiveDataNodes = JsonSearcher.findNodes(datasetDescriptionObj, "rdaProperty", "dataset.sensitive_data");
|
||||
if (!sensitiveDataNodes.isEmpty()) {
|
||||
rda.setSensitiveData(securityAndPrivacyNodes.stream().map(sensitiveDataNode -> Dataset.SensitiveData.fromValue(sensitiveDataNode.get("value").asText())).findFirst().get());
|
||||
rda.setSensitiveData(sensitiveDataNodes.stream().map(sensitiveDataNode -> Dataset.SensitiveData.fromValue(sensitiveDataNode.get("value").asText())).findFirst().get());
|
||||
}
|
||||
List<JsonNode> technicalResourceNodes = JsonSearcher.findNodes(datasetDescriptionObj, "rdaProperty", "dataset.technical_resource");
|
||||
if (!technicalResourceNodes.isEmpty()) {
|
||||
|
|
Loading…
Reference in New Issue