forked from D-Net/dnet-hadoop
[DOIBoost - Mapping] Changed the logic which brought in in the instance urls that should not be there: The urld of the doi in the json is reachable from the root (json/"URL") other urls where added from the links element. Now the mapping from the link element has been removed
This commit is contained in:
parent
683fe093cf
commit
96769b4481
|
@ -206,11 +206,16 @@ case object Crossref2Oaf {
|
|||
else {
|
||||
instance.setDateofacceptance(asField(createdDate.getValue))
|
||||
}
|
||||
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.toLowerCase().contains(doi.toLowerCase())).distinct
|
||||
if (links.nonEmpty) {
|
||||
instance.setUrl(links.asJava)
|
||||
}
|
||||
val s: List[String] = List((json \ "URL").extract[String])
|
||||
// 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) {
|
||||
// instance.setUrl(links.asJava)
|
||||
// }
|
||||
if(s.nonEmpty)
|
||||
{
|
||||
instance.setUrl(s.asJava)
|
||||
}
|
||||
|
||||
result.setInstance(List(instance).asJava)
|
||||
|
||||
//IMPORTANT
|
||||
|
|
Loading…
Reference in New Issue