This commit is contained in:
parent
47757d2836
commit
d5000502ea
|
@ -9,8 +9,6 @@ import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.stream.Collectors;
|
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.commons.io.IOUtils;
|
||||||
import org.apache.spark.SparkConf;
|
import org.apache.spark.SparkConf;
|
||||||
import org.apache.spark.api.java.function.FilterFunction;
|
import org.apache.spark.api.java.function.FilterFunction;
|
||||||
|
@ -21,6 +19,7 @@ import org.jetbrains.annotations.NotNull;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import com.amazonaws.transform.SimpleTypeUnmarshallers;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
import eu.dnetlib.dhp.application.ArgumentApplicationParser;
|
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.CommunityResult;
|
||||||
import eu.dnetlib.dhp.oa.model.community.Funder;
|
import eu.dnetlib.dhp.oa.model.community.Funder;
|
||||||
import eu.dnetlib.dhp.oa.model.community.Project;
|
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
|
* 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());
|
Optional<Funder> ofunder = Optional.ofNullable(p.getFunder());
|
||||||
if (ofunder.isPresent()) {
|
if (ofunder.isPresent()) {
|
||||||
String fName = ofunder.get().getShortName();
|
String fName = ofunder.get().getShortName();
|
||||||
if(StringUtil.isNullOrEmpty(fName))
|
if (StringUtil.isNullOrEmpty(fName))
|
||||||
return ofunder.get().getName();
|
return ofunder.get().getName();
|
||||||
if (fName.equalsIgnoreCase("ec")) {
|
if (fName.equalsIgnoreCase("ec")) {
|
||||||
fName += "_" + ofunder.get().getFundingStream();
|
fName += "_" + ofunder.get().getFundingStream();
|
||||||
|
|
Loading…
Reference in New Issue