DOIBoost Mapping: change the creation of the instance in the DOIBoost result #155
|
@ -206,11 +206,16 @@ case object Crossref2Oaf {
|
||||||
else {
|
else {
|
||||||
instance.setDateofacceptance(asField(createdDate.getValue))
|
instance.setDateofacceptance(asField(createdDate.getValue))
|
||||||
}
|
}
|
||||||
val s: String = (json \ "URL").extract[String]
|
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
|
// val links: List[String] = ((for {JString(url) <- json \ "link" \ "URL"} yield url) ::: List(s)).filter(p => p != null && p.toLowerCase().contains(doi.toLowerCase())).distinct
|
||||||
claudio.atzori marked this conversation as resolved
|
|||||||
if (links.nonEmpty) {
|
// if (links.nonEmpty) {
|
||||||
instance.setUrl(links.asJava)
|
// instance.setUrl(links.asJava)
|
||||||
|
// }
|
||||||
|
if(s.nonEmpty)
|
||||||
|
{
|
||||||
|
instance.setUrl(s.asJava)
|
||||||
}
|
}
|
||||||
|
|
||||||
result.setInstance(List(instance).asJava)
|
result.setInstance(List(instance).asJava)
|
||||||
|
|
||||||
//IMPORTANT
|
//IMPORTANT
|
||||||
|
|
Loading…
Reference in New Issue
Clean up commented out code lines