forked from D-Net/dnet-hadoop
fix: preserving the old identifier among the originalIds in the doiboost construction process, trying to avoid UnsupportedOperationException while adding elements to the originalIds
This commit is contained in:
parent
ba03f549d7
commit
c4a23c2f4d
|
@ -17,6 +17,8 @@ import scala.collection.mutable
|
||||||
import scala.util.matching.Regex
|
import scala.util.matching.Regex
|
||||||
import eu.dnetlib.dhp.schema.scholexplorer.OafUtils
|
import eu.dnetlib.dhp.schema.scholexplorer.OafUtils
|
||||||
|
|
||||||
|
import java.util
|
||||||
|
|
||||||
case class CrossrefDT(doi: String, json:String, timestamp: Long) {}
|
case class CrossrefDT(doi: String, json:String, timestamp: Long) {}
|
||||||
|
|
||||||
case class mappingAffiliation(name: String) {}
|
case class mappingAffiliation(name: String) {}
|
||||||
|
@ -96,7 +98,8 @@ case object Crossref2Oaf {
|
||||||
val alternativeIds = for (JString(ids) <- json \ "alternative-id") yield ids
|
val alternativeIds = for (JString(ids) <- json \ "alternative-id") yield ids
|
||||||
val tmp = clinicalTrialNumbers ::: alternativeIds ::: List(doi)
|
val tmp = clinicalTrialNumbers ::: alternativeIds ::: List(doi)
|
||||||
|
|
||||||
result.setOriginalId(tmp.filter(id => id != null).asJava)
|
val originalIds = new util.ArrayList(tmp.filter(id => id != null).asJava)
|
||||||
|
result.setOriginalId(originalIds)
|
||||||
|
|
||||||
// Add DataInfo
|
// Add DataInfo
|
||||||
result.setDataInfo(generateDataInfo())
|
result.setDataInfo(generateDataInfo())
|
||||||
|
|
Loading…
Reference in New Issue