Merge branch 'dhp_oaf_model' of https://code-repo.d4science.org/D-Net/dnet-hadoop into dhp_oaf_model

This commit is contained in:
Claudio Atzori 2021-01-12 15:36:42 +01:00
commit 7f2b4f227d
4 changed files with 12 additions and 0 deletions

View File

@ -168,6 +168,9 @@ case object Crossref2Oaf {
instance.setLicense(l.head)
// Ticket #6281 added pid to Instance
instance.setPid(result.getPid.asScala.filter(p => p.getQualifier.getClassid.equalsIgnoreCase("doi")).asJava)
val has_review = (json \ "relation" \"has-review" \ "id")
if(has_review != JNothing) {

View File

@ -170,6 +170,9 @@ case object ConversionUtil {
else
i.setUrl(List(s"https://academic.microsoft.com/#/detail/${extractMagIdentifier(pub.getOriginalId.asScala)}").asJava)
// Ticket #6281 added pid to Instance
i.setPid(pub.getPid.asScala.filter(p => p.getQualifier.getClassid.equalsIgnoreCase("doi")).asJava)
i.setCollectedfrom(createMAGCollectedFrom())
pub.setInstance(List(i).asJava)
pub

View File

@ -49,6 +49,9 @@ object UnpayWallToOAF {
i.setAccessright(getOpenAccessQualifier())
i.setUrl(List(oaLocation.url.get).asJava)
// Ticket #6281 added pid to Instance
i.setPid(pub.getPid.asScala.filter(p => p.getQualifier.getClassid.equalsIgnoreCase("doi")).asJava)
if (oaLocation.license.isDefined)
i.setLicense(asField(oaLocation.license.get))
pub.setInstance(List(i).asJava)

View File

@ -343,6 +343,9 @@ object DLIToOAF {
val instance_urls = if (fpids.head.length < 5) s"https://www.rcsb.org/structure/${fpids.head}" else s"https://dx.doi.org/${fpids.head}"
val i: Instance = createInstance(instance_urls, firstInstanceOrNull(d.getInstance()), result.getDateofacceptance, true)
// Ticket #6281 added pid to Instance
i.setPid(result.getPid)
if (i != null)
result.setInstance(List(i).asJava)