allow orcid_pending to be percolate to the XML graph serialization

This commit is contained in:
Claudio Atzori 2020-12-09 18:08:51 +01:00
parent db4e400a0b
commit 211aa04726
1 changed files with 2 additions and 5 deletions

View File

@ -8,6 +8,7 @@ import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import eu.dnetlib.dhp.schema.common.ModelConstants;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.spark.SparkConf; import org.apache.spark.SparkConf;
@ -272,11 +273,7 @@ public class CreateRelatedEntitiesJob_phase2 {
.filter(Objects::nonNull) .filter(Objects::nonNull)
.map(Qualifier::getClassid) .map(Qualifier::getClassid)
.filter(StringUtils::isNotBlank) .filter(StringUtils::isNotBlank)
.anyMatch(c -> "orcid".equals(c.toLowerCase())); .anyMatch(c -> c.toLowerCase().contains(ModelConstants.ORCID));
}
private static FilterFunction<JoinedEntity> filterEmptyEntityFn() {
return (FilterFunction<JoinedEntity>) v -> Objects.nonNull(v.getEntity());
} }
private static void removeOutputDir(SparkSession spark, String path) { private static void removeOutputDir(SparkSession spark, String path) {