Even more fixes for imports and exports

This commit is contained in:
George Kalampokis 2021-05-10 16:55:44 +03:00
parent b13f36afe8
commit 95f8eb15c9
3 changed files with 5 additions and 3 deletions

View File

@ -53,6 +53,7 @@ public class DMPsAutoCompleteData extends InternalDmpEntitiesData<DMPsAutoComple
HashMap dataMap = new HashMap();
dataMap.put("label", item != null ? item.getAttribute("label") : "");
dataMap.put("type", item != null ? item.getAttribute("type") : "dmps");
dataMap.put("multiAutoComplete", item != null ? Boolean.parseBoolean(item.getAttribute("multiAutocomplete")) : false);
return dataMap;
}

View File

@ -53,6 +53,7 @@ public class DatasetsAutoCompleteData extends InternalDmpEntitiesData<DatasetsAu
HashMap dataMap = new HashMap();
dataMap.put("label", item != null ? item.getAttribute("label") : "");
dataMap.put("type", item != null ? item.getAttribute("type") : "datasets");
dataMap.put("multiAutoComplete", item != null ? Boolean.parseBoolean(item.getAttribute("multiAutocomplete")) : false);
return dataMap;
}

View File

@ -19,7 +19,7 @@ public class ResearchersAutoCompleteData extends InternalDmpEntitiesData<Researc
@Override
public Element toXml(Document doc) {
Element root = super.toXml(doc);
root.setAttribute("multiAutoComplete", this.multiAutoComplete.toString());
root.setAttribute("multiAutoComplete", this.multiAutoComplete != null ? this.multiAutoComplete.toString() : "false");
return root;
}
@ -36,7 +36,7 @@ public class ResearchersAutoCompleteData extends InternalDmpEntitiesData<Researc
public ResearchersAutoCompleteData fromData(Object data) {
super.fromData(data);
if (data != null) {
this.multiAutoComplete = (Boolean) ((Map<Boolean, Object>) data).get("multiAutoComplete");
this.multiAutoComplete = Boolean.parseBoolean(((Map<Boolean, Object>) data).get("multiAutoComplete").toString());
}
return this;
@ -53,7 +53,7 @@ public class ResearchersAutoCompleteData extends InternalDmpEntitiesData<Researc
HashMap dataMap = new HashMap();
dataMap.put("label", item != null ? item.getAttribute("label") : "");
dataMap.put("type", item != null ? item.getAttribute("type") : "researchers");
dataMap.put("multiAutoComplete", item != null ? Boolean.parseBoolean(item.getAttribute("multiAutocomplete")) : false);
return dataMap;
}
}