added normalization step to the doi

This commit is contained in:
Miriam Baglioni 2021-06-29 18:46:08 +02:00
parent 8b8ffe82dc
commit 06074ea7d3
1 changed files with 3 additions and 2 deletions

View File

@ -83,8 +83,9 @@ object ORCIDToOAF {
JObject(extIds) <- json \ "workDetail" \"extIds" JObject(extIds) <- json \ "workDetail" \"extIds"
JField("type", JString(typeValue)) <- extIds JField("type", JString(typeValue)) <- extIds
JField("value", JString(value)) <- extIds JField("value", JString(value)) <- extIds
if "doi".equalsIgnoreCase(typeValue) normalized_value: String = DoiBoostMappingUtil.normalizeDoi(value)
} yield (typeValue, value) if "doi".equalsIgnoreCase(typeValue) && normalized_value != null
} yield (typeValue, normalized_value)
if (doi.nonEmpty) { if (doi.nonEmpty) {
return doi.map(l =>OrcidWork(oid, l._2)) return doi.map(l =>OrcidWork(oid, l._2))
} }