forked from D-Net/dnet-hadoop
DoiBoost AccessRigh #4362 - set BestAccessRight with the ususal comparator
This commit is contained in:
parent
199123b74b
commit
59530a14fb
|
@ -258,17 +258,18 @@ object DoiBoostMappingUtil {
|
||||||
i.setHostedby(hb)
|
i.setHostedby(hb)
|
||||||
})
|
})
|
||||||
|
|
||||||
val ar = publication.getInstance().asScala.filter(i => i.getInstancetype != null && i.getAccessright!= null && i.getAccessright.getClassid!= null).map(f=> f.getAccessright.getClassid)
|
publication.setBestaccessright(OafMapperUtils.createBestAccessRights(publication.getInstance()))
|
||||||
if (ar.nonEmpty) {
|
// val ar = publication.getInstance().asScala.filter(i => i.getInstancetype != null && i.getAccessright!= null && i.getAccessright.getClassid!= null).map(f=> f.getAccessright.getClassid)
|
||||||
if(ar.contains(ModelConstants.ACCESS_RIGHT_OPEN)){
|
// if (ar.nonEmpty) {
|
||||||
val ar = getOpenAccessQualifier()
|
// if(ar.contains(ModelConstants.ACCESS_RIGHT_OPEN)){
|
||||||
publication.setBestaccessright(OafMapperUtils.qualifier(ar.getClassid, ar.getClassname, ar.getSchemeid, ar.getSchemename))
|
// val ar = getOpenAccessQualifier()
|
||||||
}
|
// publication.setBestaccessright(OafMapperUtils.qualifier(ar.getClassid, ar.getClassname, ar.getSchemeid, ar.getSchemename))
|
||||||
else {
|
// }
|
||||||
val ar = getRestrictedQualifier()
|
// else {
|
||||||
publication.setBestaccessright(OafMapperUtils.qualifier(ar.getClassid, ar.getClassname, ar.getSchemeid, ar.getSchemename))
|
// val ar = getRestrictedQualifier()
|
||||||
}
|
// publication.setBestaccessright(OafMapperUtils.qualifier(ar.getClassid, ar.getClassname, ar.getSchemeid, ar.getSchemename))
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
publication
|
publication
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue