Allow collections in collections

This commit is contained in:
Alessia Bardi 2022-04-15 12:05:20 +02:00
parent fdcacfcd6a
commit 6a1b6767b9
1 changed files with 9 additions and 11 deletions

View File

@ -70,6 +70,15 @@ public class BulkUpload {
uri.setLabel(ace.getTypeLabel());
ace.setHas_type(uri);
String uniqueIsPartOf = ace.getUniqueIsPartOf();
if (uniqueIsPartOf != null) {
ace.setIsPartOf(Arrays.asList(uniqueIsPartOf));
}
if (ace.getContributor() != null) {
ace.getContributor().clear();
ace.setContributor(ace.getCreator());
}
if (ace.getSpatial()!=null) {
ace.getSpatial()
.stream()
@ -162,17 +171,6 @@ public class BulkUpload {
}
}
if (!isCollection) {
String uniqueIsPartOf = ace.getUniqueIsPartOf();
if (uniqueIsPartOf != null) {
ace.setIsPartOf(Arrays.asList(uniqueIsPartOf));
}
if (ace.getContributor() != null) {
ace.getContributor().clear();
ace.setContributor(ace.getCreator());
}
}
String[] splits = ace.getIdentifier().split("/");
log.debug("JSON >>>> "+ace.toJson());