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);
|
Dmp rdaDmp = dmpRDAMapper.toRDA(dmp);
|
||||||
|
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
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);
|
result = mapper.writeValueAsString(rdaDmp);
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ public class DatasetRDAMapper {
|
||||||
rda.setDatasetId(DatasetIdRDAMapper.toRDA(dataset.getId()));
|
rda.setDatasetId(DatasetIdRDAMapper.toRDA(dataset.getId()));
|
||||||
rda.setTitle(dataset.getLabel());
|
rda.setTitle(dataset.getLabel());
|
||||||
rda.setDescription(dataset.getDescription());
|
rda.setDescription(dataset.getDescription());
|
||||||
|
// rda.setAdditionalProperty("template", dataset.getProfile().getId());
|
||||||
try {
|
try {
|
||||||
|
|
||||||
DatasetWizardModel datasetWizardModel = new DatasetWizardModel().fromDataModel(dataset);
|
DatasetWizardModel datasetWizardModel = new DatasetWizardModel().fromDataModel(dataset);
|
||||||
|
@ -57,7 +58,7 @@ public class DatasetRDAMapper {
|
||||||
}
|
}
|
||||||
List<JsonNode> preservationNodes = JsonSearcher.findNodes(datasetDescriptionObj, "rdaProperty", "dataset.preservation_statement");
|
List<JsonNode> preservationNodes = JsonSearcher.findNodes(datasetDescriptionObj, "rdaProperty", "dataset.preservation_statement");
|
||||||
if (!preservationNodes.isEmpty()) {
|
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");
|
List<JsonNode> distributionNodes = JsonSearcher.findNodes(datasetDescriptionObj, "rdaProperty", "dataset.distribution");
|
||||||
if (!distributionNodes.isEmpty()) {
|
if (!distributionNodes.isEmpty()) {
|
||||||
|
@ -77,7 +78,7 @@ public class DatasetRDAMapper {
|
||||||
}
|
}
|
||||||
List<JsonNode> sensitiveDataNodes = JsonSearcher.findNodes(datasetDescriptionObj, "rdaProperty", "dataset.sensitive_data");
|
List<JsonNode> sensitiveDataNodes = JsonSearcher.findNodes(datasetDescriptionObj, "rdaProperty", "dataset.sensitive_data");
|
||||||
if (!sensitiveDataNodes.isEmpty()) {
|
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");
|
List<JsonNode> technicalResourceNodes = JsonSearcher.findNodes(datasetDescriptionObj, "rdaProperty", "dataset.technical_resource");
|
||||||
if (!technicalResourceNodes.isEmpty()) {
|
if (!technicalResourceNodes.isEmpty()) {
|
||||||
|
|
Loading…
Reference in New Issue