forked from D-Net/dnet-hadoop
[#6282 open access status in the Graph] OAStatus renamed as openAccessRoute
This commit is contained in:
parent
765f9bdee7
commit
b3f3b895e5
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
Loading…
Reference in New Issue