Skip to content
Snippets Groups Projects

fix(FundingsDeserializer): [AOU-646] complete metadata V2 Funding...

Merged Nicolas.Rod requested to merge rodn-646-complete-funding-deserialization into master
1 unresolved thread
Files
4
@@ -38,6 +38,8 @@ public class FundingsDeserializer extends AouStdDeserializer<Fundings> {
JsonNode nameNode = fundingNode.get("name");
JsonNode codeNode = fundingNode.get("code");
JsonNode acronymNode = fundingNode.get("acronym");
JsonNode jurisdictionNode = fundingNode.get("jurisdiction");
JsonNode programNode = fundingNode.get("program");
//if list contain one element and all properties of this only element are empty we ignore the list
if (jsonNode.size() == 1 && !this.nodeHasValue(funderNode) && !this.nodeHasValue(nameNode) && !this.nodeHasValue(codeNode) && !this
@@ -63,6 +65,14 @@ public class FundingsDeserializer extends AouStdDeserializer<Fundings> {
funding.setAcronym(acronymNode.textValue());
}
if (this.nodeHasTextValue(jurisdictionNode)) {
funding.setJurisdiction(jurisdictionNode.textValue());
}
if (this.nodeHasTextValue(programNode)) {
funding.setProgram(programNode.textValue());
}
fundings.getFunding().add(funding);
}
return fundings;
Loading