forked from D-Net/dnet-hadoop
[DOIBoost Mapping] changed the way to create the url for the instance: we use the crooref guidelines https://doi.org/doi
This commit is contained in:
parent
edf55395e9
commit
d50057b2d9
|
@ -206,7 +206,7 @@ case object Crossref2Oaf {
|
|||
else {
|
||||
instance.setDateofacceptance(asField(createdDate.getValue))
|
||||
}
|
||||
val s: List[String] = List((json \ "URL").extract[String])
|
||||
val s: List[String] = List("https://doi.org/" + doi)
|
||||
// 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)
|
||||
|
|
|
@ -629,7 +629,7 @@ class CrossrefMappingTest {
|
|||
|
||||
assertEquals(1, item.getInstance().size())
|
||||
assertEquals(1, item.getInstance().get(0).getUrl().size())
|
||||
assertEquals("http://dx.doi.org/10.1016/j.jas.2019.105013", item.getInstance().get(0).getUrl().get(0))
|
||||
assertEquals("https://doi.org/10.1016/j.jas.2019.105013", item.getInstance().get(0).getUrl().get(0))
|
||||
//println(mapper.writeValueAsString(item))
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue