[Dump-schema] update schemas for some classes for the new json annotation
This commit is contained in:
parent
34ec7dbf02
commit
0a54f5bea7
|
@ -29,7 +29,8 @@ public class Author implements Serializable {
|
||||||
|
|
||||||
private Integer rank;
|
private Integer rank;
|
||||||
|
|
||||||
private Pid pid;
|
@JsonSchema(description="The author's persistent identifiers")
|
||||||
|
private AuthorPid pid;
|
||||||
|
|
||||||
public String getFullname() {
|
public String getFullname() {
|
||||||
return fullname;
|
return fullname;
|
||||||
|
@ -63,11 +64,11 @@ public class Author implements Serializable {
|
||||||
this.rank = rank;
|
this.rank = rank;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Pid getPid() {
|
public AuthorPid getPid() {
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPid(Pid pid) {
|
public void setPid(AuthorPid pid) {
|
||||||
this.pid = pid;
|
this.pid = pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To represent the information described by a scheme and a value in that scheme (i.e. pid). It has two parameters: -
|
|
||||||
* scheme of type String to store the scheme - value of type String to store the value in that scheme
|
|
||||||
*/
|
|
||||||
public class ControlledField implements Serializable {
|
|
||||||
private String scheme;
|
|
||||||
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 ControlledField newInstance(String scheme, String value) {
|
|
||||||
ControlledField cf = new ControlledField();
|
|
||||||
|
|
||||||
cf.setScheme(scheme);
|
|
||||||
cf.setValue(value);
|
|
||||||
|
|
||||||
return cf;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To represent the generic persistent identifier. It has two parameters: - id of type
|
|
||||||
* eu.dnetlib.dhp.schema.dump.oaf.ControlledField to store the scheme and value of the Persistent Identifier. -
|
|
||||||
* provenance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance to store the provenance and trust of the information
|
|
||||||
*/
|
|
||||||
public class Pid implements Serializable {
|
|
||||||
private ControlledField id;
|
|
||||||
private Provenance provenance;
|
|
||||||
|
|
||||||
public ControlledField getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(ControlledField pid) {
|
|
||||||
this.id = pid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Provenance getProvenance() {
|
|
||||||
return provenance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProvenance(Provenance provenance) {
|
|
||||||
this.provenance = provenance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Pid newInstance(ControlledField pid, Provenance provenance) {
|
|
||||||
Pid p = new Pid();
|
|
||||||
p.id = pid;
|
|
||||||
p.provenance = provenance;
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Pid newInstance(ControlledField pid) {
|
|
||||||
Pid p = new Pid();
|
|
||||||
p.id = pid;
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To represent the information described by a code and a value It has two parameters: - code to store the code
|
|
||||||
* (generally the classid of the eu.dnetlib.dhp.schema.oaf.Qualifier element) - label to store the label (generally the
|
|
||||||
* classname of the eu.dnetlib.dhp.schema.oaf.Qualifier element
|
|
||||||
*/
|
|
||||||
public class Qualifier implements Serializable {
|
|
||||||
|
|
||||||
private String code; // the classid in the Qualifier
|
|
||||||
private String label; // the classname in the Qualifier
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCode(String code) {
|
|
||||||
this.code = code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLabel() {
|
|
||||||
return label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLabel(String label) {
|
|
||||||
this.label = label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Qualifier newInstance(String code, String value) {
|
|
||||||
Qualifier qualifier = new Qualifier();
|
|
||||||
qualifier.setCode(code);
|
|
||||||
qualifier.setLabel(value);
|
|
||||||
return qualifier;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -6,22 +6,26 @@ import java.io.Serializable;
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To represent keywords associated to the result. It has two parameters: - subject of type
|
* To represent keywords associated to the result. It has two parameters:
|
||||||
* eu.dnetlib.dhp.schema.dump.oaf.ControlledField to describe the subject. It mapped as: - schema it corresponds to
|
* - subject of type eu.dnetlib.dhp.schema.dump.oaf.SubjectSchemeValue to describe the subject. It mapped as:
|
||||||
* qualifier.classid of the dumped subject - value it corresponds to the subject value - provenance of type
|
* - schema it corresponds to qualifier.classid of the dumped subject
|
||||||
* eu.dnetlib.dhp.schema.dump.oaf.Provenance to represent the provenance of the subject. It is dumped only if dataInfo
|
* - value it corresponds to the subject value
|
||||||
* is not null. In this case: - provenance corresponds to dataInfo.provenanceaction.classname - trust corresponds to
|
* - provenance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance to represent the provenance of the subject. It is dumped only if dataInfo
|
||||||
* dataInfo.trust
|
* is not null. In this case:
|
||||||
|
* - provenance corresponds to dataInfo.provenanceaction.classname
|
||||||
|
* - trust corresponds to dataInfo.trust
|
||||||
*/
|
*/
|
||||||
public class Subject implements Serializable {
|
public class Subject implements Serializable {
|
||||||
private ControlledField subject;
|
private SubjectSchemeValue subject;
|
||||||
|
|
||||||
|
@JsonSchema(description = "Why this subject is associated to the result")
|
||||||
private Provenance provenance;
|
private Provenance provenance;
|
||||||
|
|
||||||
public ControlledField getSubject() {
|
public SubjectSchemeValue getSubject() {
|
||||||
return subject;
|
return subject;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSubject(ControlledField subject) {
|
public void setSubject(SubjectSchemeValue subject) {
|
||||||
this.subject = subject;
|
this.subject = subject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue