1
0
Fork 0

added the normalization step to the doi from orcid before returning it

This commit is contained in:
Miriam Baglioni 2021-06-29 12:03:54 +02:00
parent dc5ed6f563
commit a5c1c0e90a
1 changed files with 5 additions and 2 deletions

View File

@ -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))
}