Collector Plugin for Thanados and support for collections in collections #3

Merged
enrico.ottonello merged 14 commits from thanados into master 2022-05-06 11:06:39 +02:00
1 changed files with 9 additions and 11 deletions
Showing only changes of commit 6a1b6767b9 - Show all commits

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());