[Dump-schema] update Result schema

This commit is contained in:
Miriam Baglioni 2021-12-14 18:16:24 +01:00
parent 984375cb46
commit 34ec7dbf02
1 changed files with 44 additions and 15 deletions

View File

@ -8,13 +8,17 @@ import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
/**
* To represent the dumped result. It will be extended in the dump for Research Communities - Research
* Initiative/Infrastructures. It has the following parameters: - author of type
* Initiative/Infrastructures. It has the following parameters:
* - author of type
* 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. - type of type String to represent
* represented in the internal model one author in the esternal model is produced.
* - type of type String to represent
* the category of the result. Possible values are publication, dataset, software, other. It corresponds to
* resulttype.classname of the dumped result - language of type eu.dnetlib.dhp.schema.dump.oaf.Qualifier to store
* resulttype.classname of the dumped result
* - 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
* corresponds to language.classname - country of type List<eu.dnetlib.dhp.schema.dump.oaf.Country> to store the country
* corresponds to language.classname
* - 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
* 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
@ -66,72 +70,97 @@ import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
*/
public class Result implements Serializable {
private List<Author> author;
// 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
// common fields
private Qualifier language;
private Language language;
private List<Country> country;
@JsonSchema(description="The list of countries associated to this result")
private List<ResultCountry> country;
@JsonSchema(description="Keywords associated to the result")
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;
@JsonSchema(description = "Explanatory or alternative name by which a scientific result is known.")
private String subtitle;
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 its 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;
@JsonSchema(description = "The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource.")
private String publisher;
@JsonSchema(description = "Date when the embargo ends and this result turns Open Access")
private String embargoenddate;
@JsonSchema(description = "See definition of Dublin Core field dc:source")
private List<String> source;
private List<String> format;
@JsonSchema(description="Contributors for the result")
private List<String> contributor;
private List<String> coverage;
@JsonSchema(description="The openest of the access rights of this result.")
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
@JsonSchema(description = "Only for results with type 'software': URL to the software documentation")
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
@JsonSchema(description = "Only for results with type 'software': the programming language")
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
@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
@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
@JsonSchema(description = "Only for results with type 'dataset': the declared size of the dataset")
private String size; // dataset
@JsonSchema(description = "Version of the result")
private String version; // dataset
@JsonSchema(description = "Geolocation information")
private List<GeoLocation> geolocation; // dataset
@JsonSchema(description = "The OpenAIRE identifiers for this result")
private String id;
@JsonSchema(description = "Identifiers of the record at the original sources")
private List<String> originalId;
private List<ControlledField> pid;
@JsonSchema(description = "Persistent identifiers of the result")
private List<ResultPid> pid;
@JsonSchema(description="When OpenAIRE collected the record the last time")
private String dateofcollection;
@JsonSchema(description = "Timestamp of last update of the record in OpenAIRE")
private Long lastupdatetimestamp;
public Long getLastupdatetimestamp() {
return lastupdatetimestamp;
}
@ -156,11 +185,11 @@ public class Result implements Serializable {
this.originalId = originalId;
}
public List<ControlledField> getPid() {
public List<ResultPid> getPid() {
return pid;
}
public void setPid(List<ControlledField> pid) {
public void setPid(List<ResultPid> pid) {
this.pid = pid;
}
@ -196,19 +225,19 @@ public class Result implements Serializable {
this.author = author;
}
public Qualifier getLanguage() {
public Language getLanguage() {
return language;
}
public void setLanguage(Qualifier language) {
public void setLanguage(Language language) {
this.language = language;
}
public List<Country> getCountry() {
public List<ResultCountry> getCountry() {
return country;
}
public void setCountry(List<Country> country) {
public void setCountry(List<ResultCountry> country) {
this.country = country;
}