76 lines
2.1 KiB
Java
76 lines
2.1 KiB
Java
|
|
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
|
|
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
|
|
import java.io.Serializable;
|
|
|
|
/**
|
|
* To represent keywords associated to the result. It has two parameters:
|
|
* - subject of type eu.dnetlib.dhp.schema.dump.oaf.SubjectSchemeValue to describe the subject. It mapped as:
|
|
* - schema it corresponds to qualifier.classid of the dumped subject
|
|
* - value it corresponds to the subject value
|
|
* - provenance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance to represent the provenance of the subject. It is dumped only if dataInfo
|
|
* is not null. In this case:
|
|
* - provenance corresponds to dataInfo.provenanceaction.classname
|
|
* - trust corresponds to dataInfo.trust
|
|
*/
|
|
public class Subject implements Serializable {
|
|
private SubjectSchemeValue subject;
|
|
|
|
@JsonSchema(description = "Why this subject is associated to the result")
|
|
private Provenance provenance;
|
|
|
|
public SubjectSchemeValue getSubject() {
|
|
return subject;
|
|
}
|
|
|
|
public void setSubject(SubjectSchemeValue subject) {
|
|
this.subject = subject;
|
|
}
|
|
|
|
public Provenance getProvenance() {
|
|
return provenance;
|
|
}
|
|
|
|
public void setProvenance(Provenance provenance) {
|
|
this.provenance = provenance;
|
|
}
|
|
|
|
}
|
|
|
|
class SubjectSchemeValue implements Serializable{
|
|
@JsonSchema(description="OpenAIRE subject classification scheme (https://api.openaire.eu/vocabularies/dnet:subject_classification_typologies).")
|
|
private String scheme;
|
|
|
|
@JsonSchema(description="The value for the subject in the selected scheme. When the scheme is 'keyword', it means that the subject is free-text (i.e. not a term from a controlled vocabulary).")
|
|
private String value;
|
|
|
|
public String getScheme() {
|
|
return scheme;
|
|
}
|
|
|
|
public void setScheme(String scheme) {
|
|
this.scheme = scheme;
|
|
}
|
|
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
public void setValue(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
public static SubjectSchemeValue newInstance(String scheme, String value) {
|
|
SubjectSchemeValue cf = new SubjectSchemeValue();
|
|
|
|
cf.setScheme(scheme);
|
|
cf.setValue(value);
|
|
|
|
return cf;
|
|
}
|
|
|
|
}
|
|
|