fix export-import dataset missing rda mappings
This commit is contained in:
parent
815fc05af6
commit
80e5e12f29
|
@ -163,6 +163,11 @@ public class ExportXmlBuilderDatasetProfile {
|
||||||
numbering.setTextContent(field.getNumbering());
|
numbering.setTextContent(field.getNumbering());
|
||||||
elementField.appendChild(numbering);
|
elementField.appendChild(numbering);
|
||||||
}
|
}
|
||||||
|
if (field.getRdaProperty() != null) {
|
||||||
|
Element rdaProperty = element.createElement("rdaProperty");
|
||||||
|
rdaProperty.setTextContent(field.getRdaProperty());
|
||||||
|
elementField.appendChild(rdaProperty);
|
||||||
|
}
|
||||||
if (field.getValidations() != null) {
|
if (field.getValidations() != null) {
|
||||||
Element validations = element.createElement("validations");
|
Element validations = element.createElement("validations");
|
||||||
field.getValidations().forEach(validation -> {
|
field.getValidations().forEach(validation -> {
|
||||||
|
|
|
@ -29,6 +29,8 @@ public class Field {
|
||||||
|
|
||||||
private Object data;
|
private Object data;
|
||||||
|
|
||||||
|
private String rdaProperty;
|
||||||
|
|
||||||
@XmlAttribute(name = "id")
|
@XmlAttribute(name = "id")
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -101,6 +103,15 @@ public class Field {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@XmlElement(name = "rdaProperty")
|
||||||
|
public String getRdaProperty() {
|
||||||
|
return rdaProperty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRdaProperty(String rdaProperty) {
|
||||||
|
this.rdaProperty = rdaProperty;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public eu.eudat.models.data.admin.components.datasetprofile.Field toAdminCompositeModelSection() {
|
public eu.eudat.models.data.admin.components.datasetprofile.Field toAdminCompositeModelSection() {
|
||||||
eu.eudat.models.data.admin.components.datasetprofile.Field fieldEntity =new eu.eudat.models.data.admin.components.datasetprofile.Field();
|
eu.eudat.models.data.admin.components.datasetprofile.Field fieldEntity =new eu.eudat.models.data.admin.components.datasetprofile.Field();
|
||||||
|
@ -120,6 +131,7 @@ public class Field {
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
fieldEntity.setData(data.toMap((Element) this.data));
|
fieldEntity.setData(data.toMap((Element) this.data));
|
||||||
}
|
}
|
||||||
|
fieldEntity.setRdaCommonStandard(this.rdaProperty);
|
||||||
return fieldEntity;
|
return fieldEntity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue