master #59

Closed
claudio.atzori wants to merge 3221 commits from master into stable_ids
1 changed files with 6 additions and 1 deletions
Showing only changes of commit bdc8f993d0 - Show all commits

View File

@ -6,6 +6,7 @@ import eu.dnetlib.dhp.common.HdfsSupport
import eu.dnetlib.dhp.oa.graph.hostedbymap.model.{DOAJModel, UnibiGoldModel}
import eu.dnetlib.dhp.schema.oaf.Datasource
import org.apache.commons.io.{FileUtils, IOUtils}
import org.apache.commons.lang3.StringUtils
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.{FileSystem, Path}
import org.apache.hadoop.io.compress.GzipCodec
@ -113,7 +114,11 @@ object SparkProduceHostedByMap {
}
def oaToHostedbyItemType(dats: Datasource): HostedByItemType = {
if (dats.getJournal != null && dats.getOfficialname != null) {
if (
dats.getJournal != null && dats.getOfficialname != null &&
StringUtils.isNotBlank(dats.getOfficialname.getValue)
) {
return getHostedByItemType(
dats.getId,
dats.getOfficialname.getValue,