1
0
Fork 0

added step of normalization for the doi

This commit is contained in:
Miriam Baglioni 2021-06-29 18:41:39 +02:00
parent 50cc21d92e
commit 8b8ffe82dc
1 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package eu.dnetlib.doiboost.uw
import eu.dnetlib.dhp.schema.common.ModelConstants
import eu.dnetlib.dhp.schema.oaf.utils.IdentifierFactory
import eu.dnetlib.dhp.schema.oaf.{AccessRight, Instance, OpenAccessRoute, Publication}
import eu.dnetlib.doiboost.DoiBoostMappingUtil
import org.json4s
import org.json4s.DefaultFormats
import org.json4s.jackson.JsonMethods.parse
@ -53,7 +54,10 @@ object UnpayWallToOAF {
implicit lazy val formats: DefaultFormats.type = org.json4s.DefaultFormats
lazy val json: json4s.JValue = parse(input)
val doi = (json \"doi").extract[String]
val doi = DoiBoostMappingUtil.normalizeDoi((json \"doi").extract[String])
if(doi == null)
return null
val is_oa = (json\ "is_oa").extract[Boolean]