search for schematics fields in prefilling
This commit is contained in:
parent
0c57bba0b4
commit
b273ca4ed7
|
@ -112,17 +112,17 @@ public class PrefillingMapper {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
List<JsonNode> nodes = JsonSearcher.findNodes(parentNode, "rdaProperty", prefillingMapping.getMaDmpTarget());
|
List<JsonNode> nodes = JsonSearcher.findNodes(parentNode, "schematics", "rda." + prefillingMapping.getMaDmpTarget());
|
||||||
|
|
||||||
// zenodo prefilling customizations
|
// zenodo prefilling customizations
|
||||||
if(type.equals("zenodo")){
|
if(type.equals("zenodo")){
|
||||||
if(prefillingMapping.getMaDmpTarget().equals("dataset.distribution.data_access")){
|
if(prefillingMapping.getMaDmpTarget().equals("dataset.distribution.data_access")){
|
||||||
if(parsedValue != null && parsedValue.equals("open")){
|
if(parsedValue != null && parsedValue.equals("open")){
|
||||||
List<JsonNode> issuedNodes = JsonSearcher.findNodes(parentNode, "rdaProperty", "dataset.issued");
|
List<JsonNode> issuedNodes = JsonSearcher.findNodes(parentNode, "schematics", "rda.dataset.issued");
|
||||||
if(!issuedNodes.isEmpty()){
|
if(!issuedNodes.isEmpty()){
|
||||||
String issuedIdNode = issuedNodes.get(0).get("id").asText();
|
String issuedIdNode = issuedNodes.get(0).get("id").asText();
|
||||||
String issuedValue = (String) properties.get(issuedIdNode);
|
String issuedValue = (String) properties.get(issuedIdNode);
|
||||||
List<JsonNode> licStartDateNodes = JsonSearcher.findNodes(parentNode, "rdaProperty", "dataset.distribution.license.start_date");
|
List<JsonNode> licStartDateNodes = JsonSearcher.findNodes(parentNode, "schematics", "rda.dataset.distribution.license.start_date");
|
||||||
for (JsonNode licStartDateNode : licStartDateNodes) {
|
for (JsonNode licStartDateNode : licStartDateNodes) {
|
||||||
String licStartDateId = licStartDateNode.get(0) != null ? licStartDateNode.get(0).get("id").asText() : licStartDateNode.get("id").asText();
|
String licStartDateId = licStartDateNode.get(0) != null ? licStartDateNode.get(0).get("id").asText() : licStartDateNode.get("id").asText();
|
||||||
properties.put(licStartDateId, issuedValue);
|
properties.put(licStartDateId, issuedValue);
|
||||||
|
|
Loading…
Reference in New Issue