Fix bad RDA Common Standard name and minor RDA mapper improvement
This commit is contained in:
parent
209b180158
commit
814a9b2fee
|
@ -1,6 +1,8 @@
|
|||
package eu.eudat.models.rda.mapper;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import eu.eudat.logic.utilities.helpers.MyStringUtils;
|
||||
import eu.eudat.models.rda.Host;
|
||||
import eu.eudat.models.rda.PidSystem;
|
||||
|
@ -48,6 +50,13 @@ public class HostRDAMapper {
|
|||
rda.setAdditionalProperty(ImportPropertyName.DESCRIPTION.getName(), node.get("id").asText());
|
||||
break;
|
||||
case GEO_LOCATION:
|
||||
if (rdaValue.startsWith("{")) {
|
||||
try {
|
||||
rdaValue = new ObjectMapper().readValue(rdaValue, Map.class).get("id").toString();
|
||||
} catch (JsonProcessingException e) {
|
||||
logger.warn(e.getLocalizedMessage() + ". Try to pass value as is");
|
||||
}
|
||||
}
|
||||
rda.setGeoLocation(Host.GeoLocation.fromValue(rdaValue));
|
||||
rda.setAdditionalProperty(ImportPropertyName.GEO_LOCATION.getName(), node.get("id").asText());
|
||||
break;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
dataset.data_quality_assurance
|
||||
dataset.distribution.access_url
|
||||
dataset.distribution.available_till
|
||||
dataset.distribution.available_until
|
||||
dataset.distribution.byte_size
|
||||
dataset.distribution.data_access
|
||||
dataset.distribution.description
|
||||
|
|
Loading…
Reference in New Issue