From b3f3b895e5cf802e7f1c6f7099685bb8f0b66883 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 12 Jan 2021 15:39:18 +0100 Subject: [PATCH] [#6282 open access status in the Graph] OAStatus renamed as openAccessRoute --- .../eu/dnetlib/dhp/schema/oaf/OafMapperUtils.java | 4 ++-- .../java/eu/dnetlib/dhp/schema/oaf/AccessRight.java | 12 ++++++------ .../oaf/{OAStatus.java => OpenAccessRoute.java} | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) rename dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/{OAStatus.java => OpenAccessRoute.java} (91%) diff --git a/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/OafMapperUtils.java b/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/OafMapperUtils.java index d1dc1f8c3..600494a43 100644 --- a/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/OafMapperUtils.java +++ b/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/OafMapperUtils.java @@ -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; } diff --git a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/AccessRight.java b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/AccessRight.java index ef67f7d4b..47de36504 100644 --- a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/AccessRight.java +++ b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/AccessRight.java @@ -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); } diff --git a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/OAStatus.java b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/OpenAccessRoute.java similarity index 91% rename from dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/OAStatus.java rename to dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/OpenAccessRoute.java index 1d1cbf0aa..bec550411 100644 --- a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/OAStatus.java +++ b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/OpenAccessRoute.java @@ -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