[#6282 open access status in the Graph] OAStatus renamed as openAccessRoute

This commit is contained in:
Claudio Atzori 2021-01-12 15:39:18 +01:00
parent 765f9bdee7
commit b3f3b895e5
3 changed files with 9 additions and 9 deletions

View File

@ -118,13 +118,13 @@ public class OafMapperUtils {
final String classname,
final String schemeid,
final String schemename,
final OAStatus oaStatus) {
final OpenAccessRoute openAccessRoute) {
final AccessRight accessRight = new AccessRight();
accessRight.setClassid(classid);
accessRight.setClassname(classname);
accessRight.setSchemeid(schemeid);
accessRight.setSchemename(schemename);
accessRight.setOaStatus(oaStatus);
accessRight.setOpenAccessRoute(openAccessRoute);
return accessRight;
}

View File

@ -8,20 +8,20 @@ import java.util.Optional;
*/
public class AccessRight extends Qualifier {
private OAStatus oaStatus;
private OpenAccessRoute openAccessRoute;
public OAStatus getOaStatus() {
return oaStatus;
public OpenAccessRoute getOpenAccessRoute() {
return openAccessRoute;
}
public void setOaStatus(OAStatus oaStatus) {
this.oaStatus = oaStatus;
public void setOpenAccessRoute(OpenAccessRoute openAccessRoute) {
this.openAccessRoute = openAccessRoute;
}
public String toComparableString() {
String s = super.toComparableString();
return Optional
.ofNullable(getOaStatus())
.ofNullable(getOpenAccessRoute())
.map(x -> s + "::" + x.toString())
.orElse(s);
}

View File

@ -6,7 +6,7 @@ package eu.dnetlib.dhp.schema.oaf;
*
* https://support.unpaywall.org/support/solutions/articles/44001777288-what-do-the-types-of-oa-status-green-gold-hybrid-and-bronze-mean-
*/
public enum OAStatus {
public enum OpenAccessRoute {
gold, green, hybrid, bronze