1
0
Fork 0

[DOIBoost - Mapping] removed the url from crossref containing the api.elsevier.com... string in the url

This commit is contained in:
Miriam Baglioni 2021-11-03 14:38:52 +01:00
parent 2480e590d1
commit 779318961c
1 changed files with 1 additions and 1 deletions

View File

@ -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).distinct val links: List[String] = ((for {JString(url) <- json \ "link" \ "URL"} yield url) ::: List(s)).filter(p => p != null && !p.contains("api.elsevier.com...")).distinct
if (links.nonEmpty) { if (links.nonEmpty) {
instance.setUrl(links.asJava) instance.setUrl(links.asJava)
} }