This commit is contained in:
Miriam Baglioni 2024-02-14 11:39:55 +01:00
parent 47757d2836
commit d5000502ea
1 changed files with 3 additions and 3 deletions

View File

@ -9,8 +9,6 @@ import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import com.amazonaws.transform.SimpleTypeUnmarshallers;
import io.netty.util.internal.StringUtil;
import org.apache.commons.io.IOUtils;
import org.apache.spark.SparkConf;
import org.apache.spark.api.java.function.FilterFunction;
@ -21,6 +19,7 @@ import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.amazonaws.transform.SimpleTypeUnmarshallers;
import com.fasterxml.jackson.databind.ObjectMapper;
import eu.dnetlib.dhp.application.ArgumentApplicationParser;
@ -28,6 +27,7 @@ import eu.dnetlib.dhp.oa.graph.dump.Utils;
import eu.dnetlib.dhp.oa.model.community.CommunityResult;
import eu.dnetlib.dhp.oa.model.community.Funder;
import eu.dnetlib.dhp.oa.model.community.Project;
import io.netty.util.internal.StringUtil;
/**
* Splits the dumped results by funder and stores them in a folder named as the funder nsp (for all the funders, but the EC
@ -97,7 +97,7 @@ public class SparkDumpFunderResults implements Serializable {
Optional<Funder> ofunder = Optional.ofNullable(p.getFunder());
if (ofunder.isPresent()) {
String fName = ofunder.get().getShortName();
if(StringUtil.isNullOrEmpty(fName))
if (StringUtil.isNullOrEmpty(fName))
return ofunder.get().getName();
if (fName.equalsIgnoreCase("ec")) {
fName += "_" + ofunder.get().getFundingStream();