Even more improvements to RDA mapping (partial contribution by M.Aldo) and fixed issue with RDA Additional Options

This commit is contained in:
George Kalampokis 2021-12-17 16:21:32 +02:00
parent eb7d0d04fc
commit 22d3d131cc
16 changed files with 31 additions and 27 deletions

View File

@ -133,12 +133,12 @@ public class Contact implements Serializable
this.name = name;
}
@JsonAnyGetter
@JsonProperty("additional_properties")
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
@JsonProperty("additional_properties")
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

View File

@ -100,12 +100,12 @@ public class ContactId implements Serializable
this.type = type;
}
@JsonAnyGetter
@JsonProperty("additional_properties")
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
@JsonProperty("additional_properties")
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

View File

@ -168,12 +168,12 @@ public class Contributor implements Serializable
this.role = role;
}
@JsonAnyGetter
@JsonProperty("additional_properties")
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
@JsonProperty("additional_properties")
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

View File

@ -101,12 +101,12 @@ public class ContributorId implements Serializable
this.type = type;
}
@JsonAnyGetter
@JsonProperty("additional_properties")
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
@JsonProperty("additional_properties")
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

View File

@ -162,12 +162,12 @@ public class Cost implements Serializable
this.value = value;
}
@JsonAnyGetter
@JsonProperty("additional_properties")
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
@JsonProperty("additional_properties")
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

View File

@ -109,12 +109,12 @@ public class DatasetId implements Serializable
this.type = type;
}
@JsonAnyGetter
@JsonProperty("additional_properties")
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
@JsonProperty("additional_properties")
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

View File

@ -101,12 +101,12 @@ public class DmpId implements Serializable
this.type = type;
}
@JsonAnyGetter
@JsonProperty("additional_properties")
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
@JsonProperty("additional_properties")
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

View File

@ -101,12 +101,12 @@ public class FunderId implements Serializable
this.type = type;
}
@JsonAnyGetter
@JsonProperty("additional_properties")
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
@JsonProperty("additional_properties")
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

View File

@ -133,12 +133,12 @@ public class Funding implements Serializable
this.grantId = grantId;
}
@JsonAnyGetter
@JsonProperty("additional_properties")
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
@JsonProperty("additional_properties")
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

View File

@ -391,12 +391,12 @@ public class Host implements Serializable
this.url = url;
}
@JsonAnyGetter
@JsonProperty("additional_properties")
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
@JsonProperty("additional_properties")
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

View File

@ -100,12 +100,12 @@ public class License implements Serializable
this.startDate = startDate;
}
@JsonAnyGetter
@JsonProperty("additional_properties")
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
@JsonProperty("additional_properties")
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

View File

@ -101,12 +101,12 @@ public class MetadataStandardId implements Serializable
this.type = type;
}
@JsonAnyGetter
@JsonProperty("additional_properties")
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
@JsonProperty("additional_properties")
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

View File

@ -199,12 +199,12 @@ public class Project implements Serializable
this.title = title;
}
@JsonAnyGetter
@JsonProperty("additional_properties")
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
@JsonProperty("additional_properties")
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

View File

@ -29,6 +29,9 @@ public class DatasetIdRDAMapper {
for (JsonNode node: nodes) {
String rdaProperty = node.get("rdaProperty").asText();
String rdaValue = node.get("value").asText();
if(rdaValue == null || rdaValue.isEmpty()){
continue;
}
ObjectMapper mapper = new ObjectMapper();
try {

View File

@ -93,6 +93,7 @@ public class DatasetRDAMapper {
}*/
List<String> qaList = qaNodes.stream()
.map(qaNode -> qaNode.get("value").asText())
.filter(qaNode -> !qaNode.isEmpty())
.collect(Collectors.toList());
rda.setDataQualityAssurance(qaList);
}else{

View File

@ -22,7 +22,7 @@ public class HostRDAMapper {
int firstDiff = MyStringUtils.getFirstDifference(numbering, node.get("numbering").asText());
if (firstDiff == -1 || firstDiff > 2) {
String rdaValue = node.get("value").asText();
if(rdaValue == null || rdaValue.isEmpty()){
if(rdaValue == null || (rdaValue.isEmpty() && !node.get("value").isArray())){
continue;
}
for (ExportPropertyName propertyName: ExportPropertyName.values()) {