forked from D-Net/dnet-hadoop
added the normalization step to the doi from orcid before returning it
This commit is contained in:
parent
dc5ed6f563
commit
a5c1c0e90a
|
@ -1,5 +1,7 @@
|
|||
package eu.dnetlib.doiboost.orcid
|
||||
|
||||
import java.util.stream.Collectors
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import eu.dnetlib.dhp.schema.common.ModelConstants
|
||||
import eu.dnetlib.dhp.schema.oaf.{Author, DataInfo, Publication}
|
||||
|
@ -82,8 +84,9 @@ object ORCIDToOAF {
|
|||
JObject(extIds) <- json \ "workDetail" \"extIds"
|
||||
JField("type", JString(typeValue)) <- extIds
|
||||
JField("value", JString(value)) <- extIds
|
||||
if "doi".equalsIgnoreCase(typeValue)
|
||||
} yield (typeValue, value)
|
||||
normalized_value: String = DoiBoostMappingUtil.normalizeDoi(value)
|
||||
if "doi".equalsIgnoreCase(typeValue) && normalized_value != null
|
||||
} yield (typeValue, normalized_value)
|
||||
if (doi.nonEmpty) {
|
||||
return doi.map(l =>OrcidWork(oid, l._2))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue