forked from D-Net/dnet-hadoop
[Patch Hosted By] check also the presence of datasource.officialname.value
This commit is contained in:
parent
ec87149cb3
commit
bdc8f993d0
|
@ -6,6 +6,7 @@ import eu.dnetlib.dhp.common.HdfsSupport
|
||||||
import eu.dnetlib.dhp.oa.graph.hostedbymap.model.{DOAJModel, UnibiGoldModel}
|
import eu.dnetlib.dhp.oa.graph.hostedbymap.model.{DOAJModel, UnibiGoldModel}
|
||||||
import eu.dnetlib.dhp.schema.oaf.Datasource
|
import eu.dnetlib.dhp.schema.oaf.Datasource
|
||||||
import org.apache.commons.io.{FileUtils, IOUtils}
|
import org.apache.commons.io.{FileUtils, IOUtils}
|
||||||
|
import org.apache.commons.lang3.StringUtils
|
||||||
import org.apache.hadoop.conf.Configuration
|
import org.apache.hadoop.conf.Configuration
|
||||||
import org.apache.hadoop.fs.{FileSystem, Path}
|
import org.apache.hadoop.fs.{FileSystem, Path}
|
||||||
import org.apache.hadoop.io.compress.GzipCodec
|
import org.apache.hadoop.io.compress.GzipCodec
|
||||||
|
@ -113,7 +114,11 @@ object SparkProduceHostedByMap {
|
||||||
}
|
}
|
||||||
|
|
||||||
def oaToHostedbyItemType(dats: Datasource): HostedByItemType = {
|
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(
|
return getHostedByItemType(
|
||||||
dats.getId,
|
dats.getId,
|
||||||
dats.getOfficialname.getValue,
|
dats.getOfficialname.getValue,
|
||||||
|
|
Loading…
Reference in New Issue