[Graph Dump]revertng master as it was before the insertion of the annotation to automatically add comments in the schema
This commit is contained in:
parent
5276cc1195
commit
dabbcf7315
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
package eu.dnetlib.dhp.schema.dump.oaf;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AccessRight. Used to represent the result access rights. It extends the eu.dnet.lib.dhp.schema.dump.oaf.BestAccessRight
|
* AccessRight. Used to represent the result access rights. It extends the eu.dnet.lib.dhp.schema.dump.oaf.BestAccessRight
|
||||||
* element with value for the openaccess route
|
* element with value for the openaccess route
|
||||||
|
@ -10,7 +8,7 @@ import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
||||||
public class AccessRight extends BestAccessRight {
|
public class AccessRight extends BestAccessRight {
|
||||||
|
|
||||||
|
|
||||||
@JsonSchema(description = "The type of OpenAccess applied to the result ")
|
|
||||||
private OpenAccessRoute openAccessRoute ;
|
private OpenAccessRoute openAccessRoute ;
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,4 +28,3 @@ public class AccessRight extends BestAccessRight {
|
||||||
this.openAccessRoute = openAccessRoute;
|
this.openAccessRoute = openAccessRoute;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
package eu.dnetlib.dhp.schema.dump.oaf;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,8 +27,7 @@ public class Author implements Serializable {
|
||||||
|
|
||||||
private Integer rank;
|
private Integer rank;
|
||||||
|
|
||||||
@JsonSchema(description="The author's persistent identifiers")
|
private Pid pid;
|
||||||
private AuthorPid pid;
|
|
||||||
|
|
||||||
public String getFullname() {
|
public String getFullname() {
|
||||||
return fullname;
|
return fullname;
|
||||||
|
@ -64,11 +61,11 @@ public class Author implements Serializable {
|
||||||
this.rank = rank;
|
this.rank = rank;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AuthorPid getPid() {
|
public Pid getPid() {
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPid(AuthorPid pid) {
|
public void setPid(Pid pid) {
|
||||||
this.pid = pid;
|
this.pid = pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,89 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To represent the generic persistent identifier. It has two parameters:
|
|
||||||
* - id of type
|
|
||||||
* eu.dnetlib.dhp.schema.dump.oaf.AuthorPidSchemeValue 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 AuthorPid implements Serializable {
|
|
||||||
|
|
||||||
private AuthorPidSchemeValue id;
|
|
||||||
|
|
||||||
@JsonSchema(description="The reason why the pid was associated to the author")
|
|
||||||
private Provenance provenance;
|
|
||||||
|
|
||||||
public AuthorPidSchemeValue getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(AuthorPidSchemeValue pid) {
|
|
||||||
this.id = pid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Provenance getProvenance() {
|
|
||||||
return provenance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProvenance(Provenance provenance) {
|
|
||||||
this.provenance = provenance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static AuthorPid newInstance(AuthorPidSchemeValue pid, Provenance provenance) {
|
|
||||||
AuthorPid p = new AuthorPid();
|
|
||||||
p.id = pid;
|
|
||||||
p.provenance = provenance;
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static AuthorPid newInstance(AuthorPidSchemeValue pid) {
|
|
||||||
AuthorPid p = new AuthorPid();
|
|
||||||
p.id = pid;
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class AuthorPidSchemeValue implements Serializable{
|
|
||||||
|
|
||||||
@JsonSchema(description="The author's pid scheme. OpenAIRE currently supports 'ORCID'")
|
|
||||||
private String scheme;
|
|
||||||
|
|
||||||
@JsonSchema(description="The author's pid value in that scheme (i.e. 0000-1111-2222-3333")
|
|
||||||
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 AuthorPidSchemeValue newInstance(String scheme, String value) {
|
|
||||||
AuthorPidSchemeValue cf = new AuthorPidSchemeValue();
|
|
||||||
|
|
||||||
cf.setScheme(scheme);
|
|
||||||
cf.setValue(value);
|
|
||||||
|
|
||||||
return cf;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,16 @@
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
package eu.dnetlib.dhp.schema.dump.oaf;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BestAccessRight. Used to represent the result best access rights. Values for this element are found against the
|
* BestAccessRight. Used to represent the result best access rights. It extends the eu.dnet.lib.dhp.schema.dump.oaf.Qualifier
|
||||||
|
* element with a parameter scheme of type String to store the scheme. Values for this element are found against the
|
||||||
* COAR access right scheme. The classid of the element accessright in eu.dnetlib.dhp.schema.oaf.Result is used to get
|
* COAR access right scheme. The classid of the element accessright in eu.dnetlib.dhp.schema.oaf.Result is used to get
|
||||||
* the COAR corresponding code whose value will be used to set the code parameter. The COAR label corresponding to the
|
* the COAR corresponding code whose value will be used to set the code parameter. The COAR label corresponding to the
|
||||||
* COAR code will be used to set the label parameter. The scheme value will always be the one referring to the COAR
|
* COAR code will be used to set the label parameter. The scheme value will always be the one referring to the COAR
|
||||||
* access right scheme
|
* access right scheme
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class BestAccessRight implements Serializable {
|
public class BestAccessRight extends Qualifier {
|
||||||
|
|
||||||
@JsonSchema(description="COAR access mode code: http://vocabularies.coar-repositories.org/documentation/access_rights/")
|
|
||||||
private String code; // the classid in the Qualifier
|
|
||||||
|
|
||||||
@JsonSchema(description="Label for the access mode")
|
|
||||||
private String label; // the classname in the Qualifier
|
|
||||||
|
|
||||||
@JsonSchema(description="Scheme of reference for access right code. Always set to COAR access rights vocabulary: http://vocabularies.coar-repositories.org/documentation/access_rights/")
|
|
||||||
private String scheme;
|
private String scheme;
|
||||||
|
|
||||||
public String getScheme() {
|
public String getScheme() {
|
||||||
|
@ -31,29 +21,11 @@ public class BestAccessRight implements Serializable {
|
||||||
this.scheme = scheme;
|
this.scheme = scheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
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 BestAccessRight newInstance(String code, String label, String scheme) {
|
public static BestAccessRight newInstance(String code, String label, String scheme) {
|
||||||
BestAccessRight ar = new BestAccessRight();
|
BestAccessRight ar = new BestAccessRight();
|
||||||
ar.code = code ;
|
ar.setCode(code);
|
||||||
ar.label = label;
|
ar.setLabel(label);
|
||||||
ar.scheme = scheme;
|
ar.setScheme(scheme);
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
package eu.dnetlib.dhp.schema.dump.oaf;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,7 +22,6 @@ import java.io.Serializable;
|
||||||
*/
|
*/
|
||||||
public class Container implements Serializable {
|
public class Container implements Serializable {
|
||||||
|
|
||||||
@JsonSchema(description="Name of the journal or conference")
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
private String issnPrinted;
|
private String issnPrinted;
|
||||||
|
@ -33,18 +30,14 @@ public class Container implements Serializable {
|
||||||
|
|
||||||
private String issnLinking;
|
private String issnLinking;
|
||||||
|
|
||||||
@JsonSchema(description="End page")
|
|
||||||
private String ep;
|
private String ep;
|
||||||
|
|
||||||
@JsonSchema(description="Journal issue")
|
|
||||||
private String iss;
|
private String iss;
|
||||||
|
|
||||||
@JsonSchema(description="Start page")
|
|
||||||
private String sp;
|
private String sp;
|
||||||
|
|
||||||
private String vol;
|
private String vol;
|
||||||
|
|
||||||
@JsonSchema(description="Edition of the journal or conference proceeding")
|
|
||||||
private String edition;
|
private String edition;
|
||||||
|
|
||||||
private String conferenceplace;
|
private String conferenceplace;
|
||||||
|
|
|
@ -1,19 +1,14 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
package eu.dnetlib.dhp.schema.dump.oaf;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To represent the information described by a scheme and a value in that scheme (i.e. doi). It has two parameters: -
|
* 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
|
* scheme of type String to store the scheme - value of type String to store the value in that scheme
|
||||||
*/
|
*/
|
||||||
public class ControlledField implements Serializable {
|
public class ControlledField implements Serializable {
|
||||||
@JsonSchema(description="The scheme used to express the value (i.e. doi)")
|
|
||||||
private String scheme;
|
private String scheme;
|
||||||
|
|
||||||
@JsonSchema(description="The value expressed in the scheme (i.e. 10.1000/182)")
|
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
public String getScheme() {
|
public String getScheme() {
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
package eu.dnetlib.dhp.schema.dump.oaf;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the country associated to the generic entity. It extends eu.dnetlib.dhp.schema.dump.oaf.Qualifier with a
|
* Represents the country associated to this result. It extends eu.dnetlib.dhp.schema.dump.oaf.Qualifier with a
|
||||||
* provenance parameter of type eu.dnetlib.dhp.schema.dumo.oaf.Provenance. The country in not mapped if its value in the
|
* provenance parameter of type eu.dnetlib.dhp.schema.dumo.oaf.Provenance. The country in not mapped if its value in the
|
||||||
* result reprensented in the internal format is Unknown. The value for this element correspond to: - code corresponds
|
* result reprensented in the internal format is Unknown. The value for this element correspond to: - code corresponds
|
||||||
* to the classid of eu.dnetlib.dhp.schema.oaf.Country - label corresponds to the classname of
|
* to the classid of eu.dnetlib.dhp.schema.oaf.Country - label corresponds to the classname of
|
||||||
|
@ -14,36 +10,28 @@ import java.io.Serializable;
|
||||||
* dumped is not null. In this case : - provenance corresponds to dataInfo.provenanceaction.classid (to be modified with
|
* dumped is not null. In this case : - provenance corresponds to dataInfo.provenanceaction.classid (to be modified with
|
||||||
* datainfo.provenanceaction.classname) - trust corresponds to dataInfo.trust
|
* datainfo.provenanceaction.classname) - trust corresponds to dataInfo.trust
|
||||||
*/
|
*/
|
||||||
public class Country implements Serializable {
|
public class Country extends Qualifier {
|
||||||
@JsonSchema(description="ISO 3166-1 alpha-2 country code (i.e. IT)")
|
|
||||||
private String code; // the classid in the Qualifier
|
|
||||||
|
|
||||||
@JsonSchema(description="The label for that code (i.e. Italy)")
|
private Provenance provenance;
|
||||||
private String label; // the classname in the Qualifier
|
|
||||||
|
|
||||||
public String getCode() {
|
public Provenance getProvenance() {
|
||||||
return code;
|
return provenance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCode(String code) {
|
public void setProvenance(Provenance provenance) {
|
||||||
this.code = code;
|
this.provenance = provenance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLabel() {
|
public static Country newInstance(String code, String label, Provenance provenance) {
|
||||||
return label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLabel(String label) {
|
|
||||||
this.label = label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Country newInstance(String code, String label) {
|
|
||||||
Country c = new Country();
|
Country c = new Country();
|
||||||
|
c.setProvenance(provenance);
|
||||||
c.setCode(code);
|
c.setCode(code);
|
||||||
c.setLabel(label);
|
c.setLabel(label);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Country newInstance(String code, String label, String provenance, String trust) {
|
||||||
|
return newInstance(code, label, Provenance.newInstance(provenance, trust));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
package eu.dnetlib.dhp.schema.dump.oaf;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -27,37 +22,24 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public class Instance implements Serializable {
|
public class Instance implements Serializable {
|
||||||
|
|
||||||
@JsonSchema(description = "Measures computed for this instance, for example Bip!Finder ones")
|
private List<KeyValue> measures;
|
||||||
private List<Measure> measures;
|
|
||||||
|
|
||||||
private List<ResultPid> pid;
|
private List<ControlledField> pid;
|
||||||
|
|
||||||
@JsonSchema(description = "All the identifiers other than pids forged by an authorithy for the pid type (i.e. Crossref for DOIs")
|
private List<ControlledField> alternateIdentifier;
|
||||||
private List<AlternateIdentifier> alternateIdentifier;
|
|
||||||
|
|
||||||
private String license;
|
private String license;
|
||||||
|
|
||||||
@JsonSchema(description = "The accessRights for this materialization of the result")
|
|
||||||
private AccessRight accessright;
|
private AccessRight accessright;
|
||||||
|
|
||||||
@JsonSchema(description = "The specific sub-type of this instance (see https://api.openaire.eu/vocabularies/dnet:result_typologies following the links)")
|
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
@JsonSchema(description = "URLs to the instance. They may link to the actual full-text or to the landing page at the hosting source. ")
|
|
||||||
private List<String> url;
|
private List<String> url;
|
||||||
|
|
||||||
@JsonSchema(description = "The money spent to make this book or article available in Open Access. Source for this information is the OpenAPC initiative.")
|
|
||||||
private APC articleprocessingcharge;
|
private APC articleprocessingcharge;
|
||||||
|
|
||||||
@JsonSchema(description = "Date of the research product")
|
|
||||||
private String publicationdate;// dateofacceptance;
|
private String publicationdate;// dateofacceptance;
|
||||||
|
|
||||||
@JsonSchema(description = "If this instance has been peer-reviewed or not. Allowed values are peerReviewed, " +
|
|
||||||
"nonPeerReviewed, UNKNOWN (as defined in https://api.openaire.eu/vocabularies/dnet:review_levels)")
|
|
||||||
private String refereed; // peer-review status
|
private String refereed; // peer-review status
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getLicense() {
|
public String getLicense() {
|
||||||
return license;
|
return license;
|
||||||
}
|
}
|
||||||
|
@ -114,101 +96,27 @@ public class Instance implements Serializable {
|
||||||
this.articleprocessingcharge = articleprocessingcharge;
|
this.articleprocessingcharge = articleprocessingcharge;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ResultPid> getPid() {
|
public List<ControlledField> getPid() {
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPid(List<ResultPid> pid) {
|
public void setPid(List<ControlledField> pid) {
|
||||||
this.pid = pid;
|
this.pid = pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<AlternateIdentifier> getAlternateIdentifier() {
|
public List<ControlledField> getAlternateIdentifier() {
|
||||||
return alternateIdentifier;
|
return alternateIdentifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAlternateIdentifier(List<AlternateIdentifier> alternateIdentifier) {
|
public void setAlternateIdentifier(List<ControlledField> alternateIdentifier) {
|
||||||
this.alternateIdentifier = alternateIdentifier;
|
this.alternateIdentifier = alternateIdentifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Measure> getMeasures() {
|
public List<KeyValue> getMeasures() {
|
||||||
return measures;
|
return measures;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMeasures(List<Measure> measures) {
|
public void setMeasures(List<KeyValue> measures) {
|
||||||
this.measures = measures;
|
this.measures = measures;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Measure implements Serializable{
|
|
||||||
@JsonSchema(description = "The measure (i.e. popularity)")
|
|
||||||
private String key;
|
|
||||||
|
|
||||||
@JsonSchema(description = "The value for that measure")
|
|
||||||
private String value;
|
|
||||||
|
|
||||||
public String getKey() {
|
|
||||||
return key;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setKey(String key) {
|
|
||||||
this.key = key;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValue() {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValue(String value) {
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Measure newInstance(String key, String value) {
|
|
||||||
Measure inst = new Measure();
|
|
||||||
inst.key = key;
|
|
||||||
inst.value = value;
|
|
||||||
return inst;
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonIgnore
|
|
||||||
public boolean isBlank() {
|
|
||||||
return StringUtils.isBlank(key) && StringUtils.isBlank(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class AlternateIdentifier implements Serializable{
|
|
||||||
@JsonSchema(description="The scheme of the identifier. It can be a persistent identifier (i.e. doi). If it is present in the alternate identifiers " +
|
|
||||||
"it means it has not been forged by an authority for that pid. For example we collect metadata from an institutional repository that provides " +
|
|
||||||
"as identifier for the result also the doi")
|
|
||||||
private String scheme;
|
|
||||||
|
|
||||||
@JsonSchema(description="The value expressed in the 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 AlternateIdentifier newInstance(String scheme, String value) {
|
|
||||||
AlternateIdentifier cf = new AlternateIdentifier();
|
|
||||||
|
|
||||||
cf.setScheme(scheme);
|
|
||||||
cf.setValue(value);
|
|
||||||
|
|
||||||
return cf;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
public class Language implements Serializable {
|
|
||||||
|
|
||||||
@JsonSchema(description="alpha-3/ISO 639-2 code of the language")
|
|
||||||
private String code; // the classid in the Qualifier
|
|
||||||
|
|
||||||
@JsonSchema(description="Language label in English")
|
|
||||||
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 Language newInstance(String code, String value) {
|
|
||||||
Language qualifier = new Language();
|
|
||||||
qualifier.setCode(code);
|
|
||||||
qualifier.setLabel(value);
|
|
||||||
return qualifier;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
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,8 +1,6 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
package eu.dnetlib.dhp.schema.dump.oaf;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,13 +9,7 @@ import java.io.Serializable;
|
||||||
* store the trust associated to the information
|
* store the trust associated to the information
|
||||||
*/
|
*/
|
||||||
public class Provenance implements Serializable {
|
public class Provenance implements Serializable {
|
||||||
|
|
||||||
@JsonSchema(description="The process that produced/provided the information")
|
|
||||||
private String provenance;
|
private String provenance;
|
||||||
|
|
||||||
@JsonSchema(description="The confidence on the goodness of the information. It is in the range [0,1]. Greater the number, more the trust. " +
|
|
||||||
"Harvested information has typically a high trust (0.9). The trust of inferred information is calculated by the inference algorithm that generated it," +
|
|
||||||
" as described in https://graph.openaire.eu/about#architecture (Enrichment --> Mining)")
|
|
||||||
private String trust;
|
private String trust;
|
||||||
|
|
||||||
public String getProvenance() {
|
public String getProvenance() {
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
package eu.dnetlib.dhp.schema.dump.oaf;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -12,10 +10,7 @@ import java.io.Serializable;
|
||||||
*/
|
*/
|
||||||
public class Qualifier implements Serializable {
|
public class Qualifier implements Serializable {
|
||||||
|
|
||||||
@JsonSchema(description="A code in vocabulary ")
|
|
||||||
private String code; // the classid in the Qualifier
|
private String code; // the classid in the Qualifier
|
||||||
|
|
||||||
@JsonSchema(description="A label for that code ")
|
|
||||||
private String label; // the classname in the Qualifier
|
private String label; // the classname in the Qualifier
|
||||||
|
|
||||||
public String getCode() {
|
public String getCode() {
|
||||||
|
|
|
@ -1,24 +1,18 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
package eu.dnetlib.dhp.schema.dump.oaf;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To represent the dumped result. It will be extended in the dump for Research Communities - Research
|
* To represent the dumped result. It will be extended in the dump for Research Communities - Research
|
||||||
* Initiative/Infrastructures. It has the following parameters:
|
* Initiative/Infrastructures. It has the following parameters: - author of type
|
||||||
* - author of type
|
|
||||||
* List<eu.dnetlib.dhpschema.dump.oaf.Author> to describe the authors of a result. For each author in the result
|
* List<eu.dnetlib.dhpschema.dump.oaf.Author> to describe the authors of a result. For each author in the result
|
||||||
* represented in the internal model one author in the esternal model is produced.
|
* represented in the internal model one author in the esternal model is produced. - type of type String to represent
|
||||||
* - type of type String to represent
|
|
||||||
* the category of the result. Possible values are publication, dataset, software, other. It corresponds to
|
* the category of the result. Possible values are publication, dataset, software, other. It corresponds to
|
||||||
* resulttype.classname of the dumped result
|
* resulttype.classname of the dumped result - language of type eu.dnetlib.dhp.schema.dump.oaf.Qualifier to store
|
||||||
* - language of type eu.dnetlib.dhp.schema.dump.oaf.Language to store
|
|
||||||
* information about the language of the result. It is dumped as - code corresponds to language.classid - value
|
* information about the language of the result. It is dumped as - code corresponds to language.classid - value
|
||||||
* corresponds to language.classname
|
* corresponds to language.classname - country of type List<eu.dnetlib.dhp.schema.dump.oaf.Country> to store the country
|
||||||
* - country of type List<eu.dnetlib.dhp.schema.dump.oaf.Country> to store the country
|
|
||||||
* list to which the result is associated. For each country in the result respresented in the internal model one country
|
* list to which the result is associated. For each country in the result respresented in the internal model one country
|
||||||
* in the external model is produces - subjects of type List<eu.dnetlib.dhp.dump.oaf.Subject> to store the subjects for
|
* in the external model is produces - subjects of type List<eu.dnetlib.dhp.dump.oaf.Subject> to store the subjects for
|
||||||
* the result. For each subject in the result represented in the internal model one subject in the external model is
|
* the result. For each subject in the result represented in the internal model one subject in the external model is
|
||||||
|
@ -70,97 +64,72 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public class Result implements Serializable {
|
public class Result implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private List<Author> author;
|
private List<Author> author;
|
||||||
|
|
||||||
// resulttype allows subclassing results into publications | datasets | software
|
// resulttype allows subclassing results into publications | datasets | software
|
||||||
@JsonSchema(description = "Type of the result: one of 'publication', 'dataset', 'software', 'other' (see also https://api.openaire.eu/vocabularies/dnet:result_typologies)")
|
|
||||||
private String type; // resulttype
|
private String type; // resulttype
|
||||||
|
|
||||||
// common fields
|
// common fields
|
||||||
private Language language;
|
private Qualifier language;
|
||||||
|
|
||||||
@JsonSchema(description="The list of countries associated to this result")
|
private List<Country> country;
|
||||||
private List<ResultCountry> country;
|
|
||||||
|
|
||||||
@JsonSchema(description="Keywords associated to the result")
|
|
||||||
private List<Subject> subjects;
|
private List<Subject> subjects;
|
||||||
|
|
||||||
@JsonSchema(description = "A name or title by which a scientific result is known. May be the title of a publication, of a dataset or the name of a piece of software.")
|
|
||||||
private String maintitle;
|
private String maintitle;
|
||||||
|
|
||||||
@JsonSchema(description = "Explanatory or alternative name by which a scientific result is known.")
|
|
||||||
private String subtitle;
|
private String subtitle;
|
||||||
|
|
||||||
private List<String> description;
|
private List<String> description;
|
||||||
|
|
||||||
@JsonSchema(description = "Main date of the research product: typically the publication or issued date. In case of a research result with different versions with different dates, the date of the result is selected as the most frequent well-formatted date. If not available, then the most recent and complete date among those that are well-formatted. For statistics, the year is extracted and the result is counted only among the result of that year. Example: Pre-print date: 2019-02-03, Article date provided by repository: 2020-02, Article date provided by Crossref: 2020, OpenAIRE will set as date 2019-02-03, because it’s the most recent among the complete and well-formed dates. If then the repository updates the metadata and set a complete date (e.g. 2020-02-12), then this will be the new date for the result because it becomes the most recent most complete date. However, if OpenAIRE then collects the pre-print from another repository with date 2019-02-03, then this will be the “winning date” because it becomes the most frequent well-formatted date.")
|
|
||||||
private String publicationdate; // dateofacceptance;
|
private String publicationdate; // dateofacceptance;
|
||||||
|
|
||||||
@JsonSchema(description = "The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource.")
|
|
||||||
private String publisher;
|
private String publisher;
|
||||||
|
|
||||||
@JsonSchema(description = "Date when the embargo ends and this result turns Open Access")
|
|
||||||
private String embargoenddate;
|
private String embargoenddate;
|
||||||
|
|
||||||
@JsonSchema(description = "See definition of Dublin Core field dc:source")
|
|
||||||
private List<String> source;
|
private List<String> source;
|
||||||
|
|
||||||
private List<String> format;
|
private List<String> format;
|
||||||
|
|
||||||
@JsonSchema(description="Contributors for the result")
|
|
||||||
private List<String> contributor;
|
private List<String> contributor;
|
||||||
|
|
||||||
private List<String> coverage;
|
private List<String> coverage;
|
||||||
|
|
||||||
@JsonSchema(description="The openest of the access rights of this result.")
|
|
||||||
private BestAccessRight bestaccessright;
|
private BestAccessRight bestaccessright;
|
||||||
|
|
||||||
@JsonSchema(description="Container has information about the conference or journal where the result has been presented or published")
|
|
||||||
private Container container;// Journal
|
private Container container;// Journal
|
||||||
|
|
||||||
@JsonSchema(description = "Only for results with type 'software': URL to the software documentation")
|
|
||||||
private List<String> documentationUrl; // software
|
private List<String> documentationUrl; // software
|
||||||
|
|
||||||
@JsonSchema(description="Only for results with type 'software': the URL to the repository with the source code")
|
|
||||||
private String codeRepositoryUrl; // software
|
private String codeRepositoryUrl; // software
|
||||||
|
|
||||||
@JsonSchema(description = "Only for results with type 'software': the programming language")
|
|
||||||
private String programmingLanguage; // software
|
private String programmingLanguage; // software
|
||||||
|
|
||||||
@JsonSchema(description="Only for results with type 'software': Information on the person responsible for providing further information regarding the resource")
|
|
||||||
private List<String> contactperson; // orp
|
private List<String> contactperson; // orp
|
||||||
|
|
||||||
@JsonSchema(description="Only for results with type 'software': Information on the group responsible for providing further information regarding the resource")
|
|
||||||
private List<String> contactgroup; // orp
|
private List<String> contactgroup; // orp
|
||||||
|
|
||||||
@JsonSchema(description = "Only for results with type 'other': tool useful for the interpretation and/or re-used of the research product")
|
|
||||||
private List<String> tool; // orp
|
private List<String> tool; // orp
|
||||||
|
|
||||||
@JsonSchema(description = "Only for results with type 'dataset': the declared size of the dataset")
|
|
||||||
private String size; // dataset
|
private String size; // dataset
|
||||||
|
|
||||||
@JsonSchema(description = "Version of the result")
|
|
||||||
private String version; // dataset
|
private String version; // dataset
|
||||||
|
|
||||||
@JsonSchema(description = "Geolocation information")
|
|
||||||
private List<GeoLocation> geolocation; // dataset
|
private List<GeoLocation> geolocation; // dataset
|
||||||
|
|
||||||
@JsonSchema(description = "The OpenAIRE identifiers for this result")
|
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@JsonSchema(description = "Identifiers of the record at the original sources")
|
|
||||||
private List<String> originalId;
|
private List<String> originalId;
|
||||||
|
|
||||||
@JsonSchema(description = "Persistent identifiers of the result")
|
private List<ControlledField> pid;
|
||||||
private List<ResultPid> pid;
|
|
||||||
|
|
||||||
@JsonSchema(description="When OpenAIRE collected the record the last time")
|
|
||||||
private String dateofcollection;
|
private String dateofcollection;
|
||||||
|
|
||||||
@JsonSchema(description = "Timestamp of last update of the record in OpenAIRE")
|
|
||||||
private Long lastupdatetimestamp;
|
private Long lastupdatetimestamp;
|
||||||
|
|
||||||
|
|
||||||
public Long getLastupdatetimestamp() {
|
public Long getLastupdatetimestamp() {
|
||||||
return lastupdatetimestamp;
|
return lastupdatetimestamp;
|
||||||
}
|
}
|
||||||
|
@ -185,11 +154,11 @@ public class Result implements Serializable {
|
||||||
this.originalId = originalId;
|
this.originalId = originalId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ResultPid> getPid() {
|
public List<ControlledField> getPid() {
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPid(List<ResultPid> pid) {
|
public void setPid(List<ControlledField> pid) {
|
||||||
this.pid = pid;
|
this.pid = pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,19 +194,19 @@ public class Result implements Serializable {
|
||||||
this.author = author;
|
this.author = author;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Language getLanguage() {
|
public Qualifier getLanguage() {
|
||||||
return language;
|
return language;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLanguage(Language language) {
|
public void setLanguage(Qualifier language) {
|
||||||
this.language = language;
|
this.language = language;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ResultCountry> getCountry() {
|
public List<Country> getCountry() {
|
||||||
return country;
|
return country;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCountry(List<ResultCountry> country) {
|
public void setCountry(List<Country> country) {
|
||||||
this.country = country;
|
this.country = country;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
||||||
|
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the country associated to the generic result. It extends eu.dnetlib.dhp.schema.dump.oaf.Country with a
|
|
||||||
* provenance parameter of type eu.dnetlib.dhp.schema.dumo.oaf.Provenance. The country is not mapped if its value in the
|
|
||||||
* result reprensented in the internal format is Unknown. The value for this element correspond to:
|
|
||||||
* - code corresponds to the classid of eu.dnetlib.dhp.schema.oaf.Country
|
|
||||||
* - label corresponds to the classname of eu.dnetlib.dhp.schema.oaf.Country
|
|
||||||
* - provenance set only if the dataInfo associated to the Country of the result to be dumped is not null. In this case:
|
|
||||||
* - provenance corresponds to dataInfo.provenanceaction.classid (to be modified with datainfo.provenanceaction.classname)
|
|
||||||
* - trust corresponds to dataInfo.trust
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class ResultCountry extends Country {
|
|
||||||
|
|
||||||
@JsonSchema(description="Why this result is associated to the country.")
|
|
||||||
private Provenance provenance;
|
|
||||||
|
|
||||||
public Provenance getProvenance() {
|
|
||||||
return provenance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProvenance(Provenance provenance) {
|
|
||||||
this.provenance = provenance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ResultCountry newInstance(String code, String label, Provenance provenance) {
|
|
||||||
ResultCountry c = new ResultCountry();
|
|
||||||
c.setProvenance(provenance);
|
|
||||||
c.setCode(code);
|
|
||||||
c.setLabel(label);
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ResultCountry newInstance(String code, String label, String provenance, String trust) {
|
|
||||||
return newInstance(code, label, Provenance.newInstance(provenance, trust));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
public class ResultPid implements Serializable {
|
|
||||||
@JsonSchema(description="The scheme of the persistent identifier for the result (i.e. doi). " +
|
|
||||||
"If the pid is here it means the information for the pid has been collected from an authority for " +
|
|
||||||
"that pid type (i.e. Crossref/Datacite for doi). The set of authoritative pid is: doi when collected from Crossref or Datacite " +
|
|
||||||
"pmid when collected from EuroPubmed, arxiv when collected from arXiv, handle from the repositories")
|
|
||||||
private String scheme;
|
|
||||||
|
|
||||||
@JsonSchema(description="The value expressed in the scheme (i.e. 10.1000/182)")
|
|
||||||
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 ResultPid newInstance(String scheme, String value) {
|
|
||||||
ResultPid cf = new ResultPid();
|
|
||||||
|
|
||||||
cf.setScheme(scheme);
|
|
||||||
cf.setValue(value);
|
|
||||||
|
|
||||||
return cf;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,31 +1,25 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
package eu.dnetlib.dhp.schema.dump.oaf;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To represent keywords associated to the result. It has two parameters:
|
* To represent keywords associated to the result. It has two parameters: - subject of type
|
||||||
* - subject of type eu.dnetlib.dhp.schema.dump.oaf.SubjectSchemeValue to describe the subject. It mapped as:
|
* eu.dnetlib.dhp.schema.dump.oaf.ControlledField to describe the subject. It mapped as: - schema it corresponds to
|
||||||
* - schema it corresponds to qualifier.classid of the dumped subject
|
* qualifier.classid of the dumped subject - value it corresponds to the subject value - provenance of type
|
||||||
* - value it corresponds to the subject value
|
* eu.dnetlib.dhp.schema.dump.oaf.Provenance to represent the provenance of the subject. It is dumped only if dataInfo
|
||||||
* - 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
|
||||||
* is not null. In this case:
|
* dataInfo.trust
|
||||||
* - provenance corresponds to dataInfo.provenanceaction.classname
|
|
||||||
* - trust corresponds to dataInfo.trust
|
|
||||||
*/
|
*/
|
||||||
public class Subject implements Serializable {
|
public class Subject implements Serializable {
|
||||||
private SubjectSchemeValue subject;
|
private ControlledField subject;
|
||||||
|
|
||||||
@JsonSchema(description = "Why this subject is associated to the result")
|
|
||||||
private Provenance provenance;
|
private Provenance provenance;
|
||||||
|
|
||||||
public SubjectSchemeValue getSubject() {
|
public ControlledField getSubject() {
|
||||||
return subject;
|
return subject;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSubject(SubjectSchemeValue subject) {
|
public void setSubject(ControlledField subject) {
|
||||||
this.subject = subject;
|
this.subject = subject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,38 +32,3 @@ public class Subject implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
import eu.dnetlib.dhp.schema.dump.oaf.Instance;
|
import eu.dnetlib.dhp.schema.dump.oaf.Instance;
|
||||||
import eu.dnetlib.dhp.schema.dump.oaf.Result;
|
import eu.dnetlib.dhp.schema.dump.oaf.Result;
|
||||||
|
|
||||||
|
@ -13,7 +12,6 @@ import eu.dnetlib.dhp.schema.dump.oaf.Result;
|
||||||
* the same parameter in the result represented in the internal model
|
* the same parameter in the result represented in the internal model
|
||||||
*/
|
*/
|
||||||
public class GraphResult extends Result {
|
public class GraphResult extends Result {
|
||||||
@JsonSchema(description = "Each instance is one specific materialisation or version of the result. For example, you can have one result with three instance: one is the pre-print, one is the post-print, one is te published version")
|
|
||||||
private List<Instance> instance;
|
private List<Instance> instance;
|
||||||
|
|
||||||
public List<Instance> getInstance() {
|
public List<Instance> getInstance() {
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf.graph;
|
package eu.dnetlib.dhp.schema.dump.oaf.graph;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -12,10 +10,7 @@ import java.io.Serializable;
|
||||||
* while the node representing the project will have as id the id of the project and as type project
|
* while the node representing the project will have as id the id of the project and as type project
|
||||||
*/
|
*/
|
||||||
public class Node implements Serializable {
|
public class Node implements Serializable {
|
||||||
@JsonSchema(description = "The OpenAIRE id of the entity")
|
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@JsonSchema(description = "The type of the entity (i.e. organisation)")
|
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
|
|
|
@ -4,36 +4,25 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
import eu.dnetlib.dhp.schema.dump.oaf.ControlledField;
|
||||||
|
import eu.dnetlib.dhp.schema.dump.oaf.Qualifier;
|
||||||
import eu.dnetlib.dhp.schema.dump.oaf.Country;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To represent the generic organizaiton. It has the following parameters:
|
* To represent the generic organizaiton. It has the following parameters: - private String legalshortname to store the
|
||||||
* - private String legalshortname to store the legalshortname of the organizaiton
|
* legalshortname of the organizaiton - private String legalname to store the legal name of the organization - private
|
||||||
* - private String legalname to store the legal name of the organization
|
* String websiteurl to store the websiteurl of the organization - private List<String> alternativenames to store the
|
||||||
* - private String websiteurl to store the websiteurl of the organization
|
* alternative names of the organization - private Qualifier country to store the country of the organization - private
|
||||||
* - private List<String> alternativenames to store the alternative names of the organization
|
* String id to store the id of the organization - private List<ControlledField> pid to store the list of pids for the
|
||||||
* - private Country country to store the country of the organization
|
* organization
|
||||||
* - private String id to store the openaire id of the organization
|
|
||||||
* - private List<OrganizationPid> pid to store the list of pids for the organization
|
|
||||||
*/
|
*/
|
||||||
public class Organization implements Serializable {
|
public class Organization implements Serializable {
|
||||||
private String legalshortname;
|
private String legalshortname;
|
||||||
private String legalname;
|
private String legalname;
|
||||||
private String websiteurl;
|
private String websiteurl;
|
||||||
|
|
||||||
@JsonSchema(description="Alternative names that identify the organisation")
|
|
||||||
private List<String> alternativenames;
|
private List<String> alternativenames;
|
||||||
|
private Qualifier country;
|
||||||
@JsonSchema(description="The organisation country")
|
|
||||||
private Country country;
|
|
||||||
|
|
||||||
@JsonSchema(description="The OpenAIRE id for the organisation")
|
|
||||||
private String id;
|
private String id;
|
||||||
|
private List<ControlledField> pid;
|
||||||
@JsonSchema(description="Persistent identifiers for the organisation i.e. isni 0000000090326370")
|
|
||||||
private List<OrganizationPid> pid;
|
|
||||||
|
|
||||||
public String getLegalshortname() {
|
public String getLegalshortname() {
|
||||||
return legalshortname;
|
return legalshortname;
|
||||||
|
@ -67,11 +56,11 @@ public class Organization implements Serializable {
|
||||||
this.alternativenames = alternativenames;
|
this.alternativenames = alternativenames;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Country getCountry() {
|
public Qualifier getCountry() {
|
||||||
return country;
|
return country;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCountry(Country country) {
|
public void setCountry(Qualifier country) {
|
||||||
this.country = country;
|
this.country = country;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,41 +72,12 @@ public class Organization implements Serializable {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<OrganizationPid> getPid() {
|
public List<ControlledField> getPid() {
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPid(List<OrganizationPid> pid) {
|
public void setPid(List<ControlledField> pid) {
|
||||||
this.pid = pid;
|
this.pid = pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class OrganizationPid implements Serializable{
|
|
||||||
@JsonSchema(description="The scheme of the identifier (i.e. isni)")
|
|
||||||
private String scheme;
|
|
||||||
|
|
||||||
@JsonSchema(description="The value in the schema (i.e. 0000000090326370)")
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,13 +34,13 @@ import java.util.List;
|
||||||
* - private List<Programme> h2020programme to store the list of programmes the project is related to
|
* - private List<Programme> h2020programme to store the list of programmes the project is related to
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project {
|
public class Project implements Serializable {
|
||||||
//private String id;
|
private String id;
|
||||||
|
|
||||||
private String websiteurl;
|
private String websiteurl;
|
||||||
//private String code;
|
private String code;
|
||||||
//private String acronym;
|
private String acronym;
|
||||||
//private String title;
|
private String title;
|
||||||
private String startdate;
|
private String startdate;
|
||||||
|
|
||||||
private String enddate;
|
private String enddate;
|
||||||
|
@ -62,13 +62,13 @@ public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project {
|
||||||
|
|
||||||
private List<Programme> h2020programme;
|
private List<Programme> h2020programme;
|
||||||
|
|
||||||
// public String getId() {
|
public String getId() {
|
||||||
// return id;
|
return id;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public void setId(String id) {
|
public void setId(String id) {
|
||||||
// this.id = id;
|
this.id = id;
|
||||||
// }
|
}
|
||||||
|
|
||||||
public String getWebsiteurl() {
|
public String getWebsiteurl() {
|
||||||
return websiteurl;
|
return websiteurl;
|
||||||
|
@ -78,29 +78,29 @@ public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project {
|
||||||
this.websiteurl = websiteurl;
|
this.websiteurl = websiteurl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public String getCode() {
|
public String getCode() {
|
||||||
// return code;
|
return code;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public void setCode(String code) {
|
public void setCode(String code) {
|
||||||
// this.code = code;
|
this.code = code;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public String getAcronym() {
|
public String getAcronym() {
|
||||||
// return acronym;
|
return acronym;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public void setAcronym(String acronym) {
|
public void setAcronym(String acronym) {
|
||||||
// this.acronym = acronym;
|
this.acronym = acronym;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public String getTitle() {
|
public String getTitle() {
|
||||||
// return title;
|
return title;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public void setTitle(String title) {
|
public void setTitle(String title) {
|
||||||
// this.title = title;
|
this.title = title;
|
||||||
// }
|
}
|
||||||
|
|
||||||
public String getStartdate() {
|
public String getStartdate() {
|
||||||
return startdate;
|
return startdate;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf.graph;
|
package eu.dnetlib.dhp.schema.dump.oaf.graph;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13,10 +11,7 @@ import java.io.Serializable;
|
||||||
* represented in theinternal model
|
* represented in theinternal model
|
||||||
*/
|
*/
|
||||||
public class RelType implements Serializable {
|
public class RelType implements Serializable {
|
||||||
@JsonSchema(description = "The semantics of the relation (i.e. isAuthorInstitutionOf). ")
|
|
||||||
private String name; // relclass
|
private String name; // relclass
|
||||||
|
|
||||||
@JsonSchema(description = "The type of the relation (i.e. affiliation)")
|
|
||||||
private String type; // subreltype
|
private String type; // subreltype
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
@ -42,4 +37,3 @@ public class RelType implements Serializable {
|
||||||
return rel;
|
return rel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
||||||
import eu.dnetlib.dhp.schema.dump.oaf.Provenance;
|
import eu.dnetlib.dhp.schema.dump.oaf.Provenance;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,22 +13,11 @@ import eu.dnetlib.dhp.schema.dump.oaf.Provenance;
|
||||||
* provenance of the relation
|
* provenance of the relation
|
||||||
*/
|
*/
|
||||||
public class Relation implements Serializable {
|
public class Relation implements Serializable {
|
||||||
@JsonSchema(description = "The node source in the relation")
|
|
||||||
private Node source;
|
private Node source;
|
||||||
|
|
||||||
@JsonSchema(description = "The node target in the relation")
|
|
||||||
private Node target;
|
private Node target;
|
||||||
|
|
||||||
@JsonSchema(description = "To represent the semantics of a relation between two entities")
|
|
||||||
private RelType reltype;
|
private RelType reltype;
|
||||||
|
|
||||||
@JsonSchema(description = "The reason why OpenAIRE holds the relation ")
|
|
||||||
private Provenance provenance;
|
private Provenance provenance;
|
||||||
|
|
||||||
@JsonSchema(description = "True if the relation is related to a project and it has been collected from an authoritative source (i.e. the funder)")
|
|
||||||
private boolean validated;
|
private boolean validated;
|
||||||
|
|
||||||
@JsonSchema(description = "The date when the relation was collected from OpenAIRE")
|
|
||||||
private String validationDate;
|
private String validationDate;
|
||||||
|
|
||||||
public Node getSource() {
|
public Node getSource() {
|
||||||
|
@ -80,7 +68,6 @@ public class Relation implements Serializable {
|
||||||
return validationDate;
|
return validationDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue