hostedby patching to work with the updated Crossref contents

This commit is contained in:
Claudio Atzori 2024-06-10 15:22:33 +02:00
parent efc1632e16
commit 576efc1857
1 changed files with 6 additions and 4 deletions

View File

@ -27,10 +27,12 @@ object SparkApplyHostedByMapToResult {
val inst: Instance = i.head
patchInstance(p, ei, inst)
} else if (i.size == 2) {
if (i.map(ii => ii.getCollectedfrom.getValue).contains("UnpayWall")) {
val inst: Instance = i.filter(ii => "Crossref".equals(ii.getCollectedfrom.getValue)).head
patchInstance(p, ei, inst)
} else {
val cf = i.map(ii => ii.getCollectedfrom.getValue)
if (cf.contains("Crossref")) {
i.foreach(ii => {
patchInstance(p, ei, ii)
})
}
}
}