Loading src/main/java/org/gesis/dda/filter/impl/Doabooks2SsoarBundleFilter.java +4 −4 Original line number Diff line number Diff line Loading @@ -40,14 +40,14 @@ public class Doabooks2SsoarBundleFilter implements BundleFilter { Metadatum licence = metadata.stream().filter( m -> m.getKey().equals("dc.dc.rights.licence") ).findFirst().orElse(null); if (null != clasShorts.stream().filter(cls -> Arrays.asList(valuesToBeFilteredTo).contains(cls.getValue())) && null != licence) { LOG.debug("clasShort-Set not null and a licence entry is found"); LOG.info("clasShort-Set not null and a licence entry is found"); if (clasShorts.stream().filter(cls -> Arrays.asList(valuesToBeFilteredTo).contains(cls.getValue())).count() > 0) { if (Arrays.asList(licenceStringsToBeFilteredTo).stream().anyMatch( str -> licence.getValue().contains(str))) { if (Arrays.asList(licenceStringsToBeFilteredTo).stream().filter( str -> licence.getValue().contains(str)).count() > 0) { result = true; LOG.debug("We take it: {}", clasShorts.stream().map(Metadatum::getValue).collect(Collectors.joining("; "))); LOG.info("We take it: {}", clasShorts.stream().map(Metadatum::getValue).collect(Collectors.joining("; "))); } else { result = false; LOG.debug("Filtered away because of licence: {}", licence.getValue()); LOG.info("Filtered away because of licence: {}", licence.getValue()); } } Loading Loading
src/main/java/org/gesis/dda/filter/impl/Doabooks2SsoarBundleFilter.java +4 −4 Original line number Diff line number Diff line Loading @@ -40,14 +40,14 @@ public class Doabooks2SsoarBundleFilter implements BundleFilter { Metadatum licence = metadata.stream().filter( m -> m.getKey().equals("dc.dc.rights.licence") ).findFirst().orElse(null); if (null != clasShorts.stream().filter(cls -> Arrays.asList(valuesToBeFilteredTo).contains(cls.getValue())) && null != licence) { LOG.debug("clasShort-Set not null and a licence entry is found"); LOG.info("clasShort-Set not null and a licence entry is found"); if (clasShorts.stream().filter(cls -> Arrays.asList(valuesToBeFilteredTo).contains(cls.getValue())).count() > 0) { if (Arrays.asList(licenceStringsToBeFilteredTo).stream().anyMatch( str -> licence.getValue().contains(str))) { if (Arrays.asList(licenceStringsToBeFilteredTo).stream().filter( str -> licence.getValue().contains(str)).count() > 0) { result = true; LOG.debug("We take it: {}", clasShorts.stream().map(Metadatum::getValue).collect(Collectors.joining("; "))); LOG.info("We take it: {}", clasShorts.stream().map(Metadatum::getValue).collect(Collectors.joining("; "))); } else { result = false; LOG.debug("Filtered away because of licence: {}", licence.getValue()); LOG.info("Filtered away because of licence: {}", licence.getValue()); } } Loading