fix(UnpaywallImportService): prevent exception blocking the deposit process...
1 unresolved thread
1 unresolved thread
https://issues.unige.ch/browse/AOU-605
The logic is now in pseudo code:
if (bronze && has_repository_copy) {
if(some location with license exists) {
we take the 1st one:
- accessLevel -> public
- license -> "Other OA"
- url_for_pdf
- version
} else {
we take the 1st one without license:
- accessLevel -> restricted
- license -> null
- url_for_pdf
- version
}
} elseif ("best_oa_location" exists) {
we take from "best_oa_location":
- accessLevel -> restricted
- url_for_pdf
- license:
- if the name is known in AoU, we use it
- if there is a name, but it is unknown in AoU --> « Other OA »
- if null -> null
- version
} else {
we don't take anything
}
Merge request reports
Activity
117 118 } else if (jsonObject.has("best_oa_location")) { 119 /** 120 * Case of real Open Access 121 */ 122 JSONObject bestOALocation = jsonObject.getJSONObject("best_oa_location"); 123 124 String licenseName = this.getStringOrNull(bestOALocation, LICENSE); 125 license = this.getLicense(licenseName); 126 if (license != null) { 127 // if the license name returned by Unpaywall matches one of your license, we use it and set the access to public by default 128 accessLevel = DocumentFile.AccessLevel.PUBLIC; 129 } else { 130 // if the license doesn't match one of the OaU license, we use the OtherOA license and set the access to restricted by default 131 license = this.getLicense(LICENSE_OTHER_AO); 132 accessLevel = DocumentFile.AccessLevel.RESTRICTED; added 5 commits
-
0ccad1c6...96421928 - 4 commits from branch
master
- 370a4270 - fix(UnpaywallImportService): prevent exception blocking the deposit process...
-
0ccad1c6...96421928 - 4 commits from branch
Please register or sign in to reply