[Cleaning] drop alternate identifiers with empty values

pull/104/head
Claudio Atzori 3 years ago
parent a0837ac357
commit 3becaa5539

@ -155,12 +155,14 @@ public class CleaningFunctions {
final Set<StructuredProperty> pids =
pid
.stream()
.filter(Objects::nonNull)
.filter(p -> StringUtils.isNotBlank(p.getValue()))
.collect(Collectors.toCollection(HashSet::new));
Optional.ofNullable(i.getAlternateIdentifier())
.ifPresent(altId -> {
final Set<StructuredProperty> altIds = altId.stream()
.filter(Objects::nonNull)
.filter(p -> StringUtils.isNotBlank(p.getValue()))
.collect(Collectors.toCollection(HashSet::new));

Loading…
Cancel
Save