[EOSC DUMP SCHEMA] new classes for EOSC dump

This commit is contained in:
Miriam Baglioni 2022-11-07 17:59:12 +01:00
parent 6366ed5890
commit e99a879bf0
4 changed files with 146 additions and 0 deletions

View File

@ -0,0 +1,67 @@
package eu.dnetlib.dhp.eosc.model;
import java.io.Serializable;
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
/**
* @author miriam.baglioni
* @Date 29/07/22
*/
public class EoscInteroperabilityFramework implements Serializable {
@JsonSchema(description = "EOSC-IF label")
private String label;
@JsonSchema(
description = "EOSC-IF local code. Later on it could be populated with a PID (e.g. DOI), but for the time being we stick to a more loose definition.")
private String code;
@JsonSchema(description = "EOSC-IF url to the guidelines")
private String url;
@JsonSchema(description = "EOSC-IF semantic relation (e.g. compliesWith)")
private String semanticRelation;
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getSemanticRelation() {
return semanticRelation;
}
public void setSemanticRelation(String semanticRelation) {
this.semanticRelation = semanticRelation;
}
public static EoscInteroperabilityFramework newInstance(String code, String label, String url,
String semanticRelation) {
EoscInteroperabilityFramework eif = new EoscInteroperabilityFramework();
eif.label = label;
eif.code = code;
eif.url = url;
eif.semanticRelation = semanticRelation;
return eif;
}
}

View File

@ -26,6 +26,17 @@ public class EoscResult extends CommunityResult {
@JsonSchema(description = "The list of organizations the result is affiliated to")
private List<Organization> affiliation;
@JsonSchema(description = "The indicators for this result")
private Indicator indicator;
public Indicator getIndicator() {
return indicator;
}
public void setIndicator(Indicator indicator) {
this.indicator = indicator;
}
public List<String> getKeywords() {
return keywords;
}

View File

@ -0,0 +1,32 @@
package eu.dnetlib.dhp.eosc.model;
import java.io.Serializable;
/**
* @author miriam.baglioni
* @Date 04/11/22
*/
public class Indicator implements Serializable {
private UsageCounts usageCounts;
public static Indicator newInstance(UsageCounts uc) {
Indicator i = new Indicator();
i.usageCounts = uc;
return i;
}
public static Indicator newInstance(String downloads, String views) {
Indicator i = new Indicator();
i.usageCounts = UsageCounts.newInstance(views, downloads);
return i;
}
public UsageCounts getUsageCounts() {
return usageCounts;
}
public void setUsageCounts(UsageCounts usageCounts) {
this.usageCounts = usageCounts;
}
}

View File

@ -0,0 +1,36 @@
package eu.dnetlib.dhp.eosc.model;
import java.io.Serializable;
/**
* @author miriam.baglioni
* @Date 04/11/22
*/
public class UsageCounts implements Serializable {
private String views;
private String downloads;
public String getViews() {
return views;
}
public void setViews(String views) {
this.views = views;
}
public String getDownloads() {
return downloads;
}
public void setDownloads(String downloads) {
this.downloads = downloads;
}
public static UsageCounts newInstance(String views, String downloads) {
UsageCounts uc = new UsageCounts();
uc.views = views;
uc.downloads = downloads;
return uc;
}
}