added constants from the ACCESS_RIGHTS vocab

This commit is contained in:
Claudio Atzori 2021-07-28 10:54:21 +02:00
parent 5f0b0d3a87
commit e54f8449c7
1 changed files with 9 additions and 3 deletions

View File

@ -1,7 +1,10 @@
package eu.dnetlib.dhp.schema.common; package eu.dnetlib.dhp.schema.common;
import eu.dnetlib.dhp.schema.oaf.*; import eu.dnetlib.dhp.schema.oaf.AccessRight;
import eu.dnetlib.dhp.schema.oaf.DataInfo;
import eu.dnetlib.dhp.schema.oaf.KeyValue;
import eu.dnetlib.dhp.schema.oaf.Qualifier;
public class ModelConstants { public class ModelConstants {
@ -21,6 +24,9 @@ public class ModelConstants {
// VOCABULARY VALUE // VOCABULARY VALUE
public static final String ACCESS_RIGHT_OPEN = "OPEN"; public static final String ACCESS_RIGHT_OPEN = "OPEN";
public static final String ACCESS_RIGHT_EMBARGO = "EMBARGO";
public static final String ACCESS_RIGHT_CLOSED = "CLOSED";
public static final String DNET_SUBJECT_TYPOLOGIES = "dnet:subject_classification_typologies"; public static final String DNET_SUBJECT_TYPOLOGIES = "dnet:subject_classification_typologies";
public static final String DNET_RESULT_TYPOLOGIES = "dnet:result_typologies"; public static final String DNET_RESULT_TYPOLOGIES = "dnet:result_typologies";
@ -194,8 +200,8 @@ public class ModelConstants {
return q; return q;
} }
private static KeyValue keyValue(String key, String value) { private static KeyValue keyValue(final String key, final String value) {
KeyValue kv = new KeyValue(); final KeyValue kv = new KeyValue();
kv.setKey(key); kv.setKey(key);
kv.setValue(value); kv.setValue(value);
kv.setDataInfo(new DataInfo()); kv.setDataInfo(new DataInfo());