[DOIBoost - Mapping] selecting the url from Crossref containing the doi
This commit is contained in:
parent
779318961c
commit
b2bb8d9d79
|
@ -207,7 +207,7 @@ case object Crossref2Oaf {
|
||||||
instance.setDateofacceptance(asField(createdDate.getValue))
|
instance.setDateofacceptance(asField(createdDate.getValue))
|
||||||
}
|
}
|
||||||
val s: String = (json \ "URL").extract[String]
|
val s: String = (json \ "URL").extract[String]
|
||||||
val links: List[String] = ((for {JString(url) <- json \ "link" \ "URL"} yield url) ::: List(s)).filter(p => p != null && !p.contains("api.elsevier.com...")).distinct
|
val links: List[String] = ((for {JString(url) <- json \ "link" \ "URL"} yield url) ::: List(s)).filter(p => p != null && p.toLowerCase().contains(doi.toLowerCase())).distinct
|
||||||
if (links.nonEmpty) {
|
if (links.nonEmpty) {
|
||||||
instance.setUrl(links.asJava)
|
instance.setUrl(links.asJava)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue