[Datasource / Service] datasource_model_eosc #16

Merged
claudio.atzori merged 9 commits from datasource_model_eosc into master 2022-05-03 11:45:40 +02:00
3 changed files with 113 additions and 155 deletions

View File

@ -3,7 +3,8 @@
## Changelog ## Changelog
| **Version** | **Changes** | **Readiness** | | **Version** | **Changes** | **Readiness** |
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| |-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| 2.12.0 | [Graph model] </br> <ul><li>Introducing EOSC Services as datasources</li> <ul> | beta |
| 2.11.33 | [Scholexplorer] </br> <ul><li>Moved Scholix API Data model into dhp-schemas</li><li>implementation of the compareTo method on Scholix objects and all model properties</li> <li>Unit Test to verify that compareTo works on different case</li> <ul> | beta | | 2.11.33 | [Scholexplorer] </br> <ul><li>Moved Scholix API Data model into dhp-schemas</li><li>implementation of the compareTo method on Scholix objects and all model properties</li> <li>Unit Test to verify that compareTo works on different case</li> <ul> | beta |
| 2.10.31 | [Minor] </br>NPE checks | beta | | 2.10.31 | [Minor] </br>NPE checks | beta |
| 2.10.30 | [Minor] </br>added comparator for refereed field instances | beta | | 2.10.30 | [Minor] </br>added comparator for refereed field instances | beta |

View File

@ -5,8 +5,7 @@
<groupId>eu.dnetlib.dhp</groupId> <groupId>eu.dnetlib.dhp</groupId>
<artifactId>dhp-schemas</artifactId> <artifactId>dhp-schemas</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>2.11.34-SNAPSHOT</version> <version>2.12.0-SNAPSHOT</version>
claudio.atzori marked this conversation as resolved Outdated

Is this the expected version that must go into the beta branch?

Is this the expected version that must go into the beta branch?

Nope, I will remove the eosc tag right before releasing the module.

Nope, I will remove the `eosc` tag right before releasing the module.
<licenses> <licenses>
<license> <license>

View File

@ -11,10 +11,16 @@ public class Datasource extends OafEntity implements Serializable {
*/ */
private static final long serialVersionUID = 1019089598408414496L; private static final long serialVersionUID = 1019089598408414496L;
@Deprecated
private Qualifier datasourcetype; private Qualifier datasourcetype;
@Deprecated
private Qualifier datasourcetypeui; private Qualifier datasourcetypeui;
private Qualifier eosctype; // Data Source | Service
private Qualifier eoscdatasourcetype;
private Qualifier openairecompatibility; private Qualifier openairecompatibility;
private Field<String> officialname; private Field<String> officialname;
@ -40,14 +46,21 @@ public class Datasource extends OafEntity implements Serializable {
private List<StructuredProperty> subjects; private List<StructuredProperty> subjects;
// opendoar specific fields (od*) // opendoar specific fields (od*)
@Deprecated
private Field<String> odnumberofitems; private Field<String> odnumberofitems;
@Deprecated
private Field<String> odnumberofitemsdate; private Field<String> odnumberofitemsdate;
@Deprecated
private Field<String> odpolicies; private Field<String> odpolicies;
@Deprecated
private List<Field<String>> odlanguages; private List<Field<String>> odlanguages;
private List<String> languages;
@Deprecated
private List<Field<String>> odcontenttypes; private List<Field<String>> odcontenttypes;
private List<Field<String>> accessinfopackage; private List<Field<String>> accessinfopackage;
@ -59,8 +72,10 @@ public class Datasource extends OafEntity implements Serializable {
private Field<String> missionstatementurl; private Field<String> missionstatementurl;
@Deprecated
private Field<Boolean> dataprovider; private Field<Boolean> dataprovider;
@Deprecated
private Field<Boolean> serviceprovider; private Field<Boolean> serviceprovider;
// {open, restricted or closed} // {open, restricted or closed}
@ -75,23 +90,24 @@ public class Datasource extends OafEntity implements Serializable {
// {feeRequired, registration, other} // {feeRequired, registration, other}
private Field<String> datauploadrestriction; private Field<String> datauploadrestriction;
@Deprecated
private Field<Boolean> versioning; private Field<Boolean> versioning;
private Field<String> citationguidelineurl; private Boolean versioncontrol;
// {yes, no, uknown} private Field<String> citationguidelineurl;
private Field<String> qualitymanagementkind;
private Field<String> pidsystems; private Field<String> pidsystems;
private Field<String> certificates; private Field<String> certificates;
@Deprecated
private List<KeyValue> policies; private List<KeyValue> policies;
private Journal journal; private Journal journal;
// New field for EOSC // New field for EOSC
private List<String> providedentitytypes; private List<String> researchentitytypes;
// New field for EOSC // New field for EOSC
private List<String> providedproducttypes; private List<String> providedproducttypes;
@ -102,18 +118,25 @@ public class Datasource extends OafEntity implements Serializable {
// New field for EOSC // New field for EOSC
private Boolean thematic; private Boolean thematic;
// New field for EOSC
private Boolean knowledgegraph;
// New field for EOSC // New field for EOSC
private List<Qualifier> contentpolicies; private List<Qualifier> contentpolicies;
private String submissionpolicyurl;
private String preservationpolicyurl;
private List<String> researchproductaccesspolicies;
private List<String> researchproductmetadataaccesspolicies;
private Boolean consenttermsofuse; private Boolean consenttermsofuse;
private Boolean fulltextdownload; private Boolean fulltextdownload;
private String consenttermsofusedate; private String consenttermsofusedate;
private String lastconsenttermsofusedate;
public Qualifier getDatasourcetype() { public Qualifier getDatasourcetype() {
return datasourcetype; return datasourcetype;
} }
@ -130,6 +153,22 @@ public class Datasource extends OafEntity implements Serializable {
this.datasourcetypeui = datasourcetypeui; this.datasourcetypeui = datasourcetypeui;
} }
public Qualifier getEosctype() {
return eosctype;
}
public void setEosctype(Qualifier eosctype) {
this.eosctype = eosctype;
}
public Qualifier getEoscdatasourcetype() {
return eoscdatasourcetype;
}
public void setEoscdatasourcetype(Qualifier eoscdatasourcetype) {
this.eoscdatasourcetype = eoscdatasourcetype;
}
public Qualifier getOpenairecompatibility() { public Qualifier getOpenairecompatibility() {
return openairecompatibility; return openairecompatibility;
} }
@ -258,6 +297,14 @@ public class Datasource extends OafEntity implements Serializable {
this.odlanguages = odlanguages; this.odlanguages = odlanguages;
} }
public List<String> getLanguages() {
return languages;
}
public void setLanguages(final List<String> languages) {
this.languages = languages;
}
public List<Field<String>> getOdcontenttypes() { public List<Field<String>> getOdcontenttypes() {
return odcontenttypes; return odcontenttypes;
} }
@ -354,6 +401,14 @@ public class Datasource extends OafEntity implements Serializable {
this.versioning = versioning; this.versioning = versioning;
} }
public Boolean getVersioncontrol() {
return versioncontrol;
}
public void setVersioncontrol(Boolean versioncontrol) {
this.versioncontrol = versioncontrol;
}
public Field<String> getCitationguidelineurl() { public Field<String> getCitationguidelineurl() {
return citationguidelineurl; return citationguidelineurl;
} }
@ -362,14 +417,6 @@ public class Datasource extends OafEntity implements Serializable {
this.citationguidelineurl = citationguidelineurl; this.citationguidelineurl = citationguidelineurl;
} }
public Field<String> getQualitymanagementkind() {
return qualitymanagementkind;
}
public void setQualitymanagementkind(final Field<String> qualitymanagementkind) {
this.qualitymanagementkind = qualitymanagementkind;
}
public Field<String> getPidsystems() { public Field<String> getPidsystems() {
return pidsystems; return pidsystems;
} }
@ -402,12 +449,12 @@ public class Datasource extends OafEntity implements Serializable {
this.journal = journal; this.journal = journal;
} }
public List<String> getProvidedentitytypes() { public List<String> getResearchentitytypes() {
return providedentitytypes; return researchentitytypes;
} }
public void setProvidedentitytypes(final List<String> providedentitytypes) { public void setResearchentitytypes(final List<String> researchentitytypes) {
this.providedentitytypes = providedentitytypes; this.researchentitytypes = researchentitytypes;
} }
public List<String> getProvidedproducttypes() { public List<String> getProvidedproducttypes() {
@ -434,14 +481,6 @@ public class Datasource extends OafEntity implements Serializable {
this.thematic = thematic; this.thematic = thematic;
} }
public Boolean getKnowledgegraph() {
return knowledgegraph;
}
public void setKnowledgegraph(final Boolean knowledgegraph) {
this.knowledgegraph = knowledgegraph;
}
public List<Qualifier> getContentpolicies() { public List<Qualifier> getContentpolicies() {
return contentpolicies; return contentpolicies;
} }
@ -450,19 +489,59 @@ public class Datasource extends OafEntity implements Serializable {
this.contentpolicies = contentpolicies; this.contentpolicies = contentpolicies;
} }
public String getSubmissionpolicyurl() {
return submissionpolicyurl;
}
public void setSubmissionpolicyurl(String submissionpolicyurl) {
this.submissionpolicyurl = submissionpolicyurl;
}
public String getPreservationpolicyurl() {
return preservationpolicyurl;
}
public void setPreservationpolicyurl(String preservationpolicyurl) {
this.preservationpolicyurl = preservationpolicyurl;
}
public List<String> getResearchproductaccesspolicies() {
return researchproductaccesspolicies;
}
public void setResearchproductaccesspolicies(List<String> researchproductaccesspolicies) {
this.researchproductaccesspolicies = researchproductaccesspolicies;
}
public List<String> getResearchproductmetadataaccesspolicies() {
return researchproductmetadataaccesspolicies;
}
public void setResearchproductmetadataaccesspolicies(List<String> researchproductmetadataaccesspolicies) {
this.researchproductmetadataaccesspolicies = researchproductmetadataaccesspolicies;
}
public Boolean getConsenttermsofuse() { public Boolean getConsenttermsofuse() {
return consenttermsofuse; return consenttermsofuse;
} }
public void setConsenttermsofuse(Boolean consenttermsofuse) { public void setConsenttermsofuse(final Boolean consenttermsofuse) {
this.consenttermsofuse = consenttermsofuse; this.consenttermsofuse = consenttermsofuse;
} }
public String getLastconsenttermsofusedate() {
return lastconsenttermsofusedate;
}
public void setLastconsenttermsofusedate(String lastconsenttermsofusedate) {
this.lastconsenttermsofusedate = lastconsenttermsofusedate;
}
public Boolean getFulltextdownload() { public Boolean getFulltextdownload() {
return fulltextdownload; return fulltextdownload;
} }
public void setFulltextdownload(Boolean fulltextdownload) { public void setFulltextdownload(final Boolean fulltextdownload) {
this.fulltextdownload = fulltextdownload; this.fulltextdownload = fulltextdownload;
} }
@ -470,134 +549,13 @@ public class Datasource extends OafEntity implements Serializable {
return consenttermsofusedate; return consenttermsofusedate;
} }
public void setConsenttermsofusedate(String consenttermsofusedate) { public void setConsenttermsofusedate(final String consenttermsofusedate) {
this.consenttermsofusedate = consenttermsofusedate; this.consenttermsofusedate = consenttermsofusedate;
} }
@Override @Override
public void mergeFrom(final OafEntity e) { public void mergeFrom(final OafEntity e) {
super.mergeFrom(e); super.mergeFrom(e);
if (!Datasource.class.isAssignableFrom(e.getClass())) { return; }
final Datasource d = (Datasource) e;
datasourcetype = d.getDatasourcetype() != null && compareTrust(this, e) < 0
? d.getDatasourcetype()
: datasourcetype;
datasourcetypeui = d.getDatasourcetypeui() != null && compareTrust(this, e) < 0
? d.getDatasourcetypeui()
: datasourcetypeui;
openairecompatibility = d.getOpenairecompatibility() != null && compareTrust(this, e) < 0
? d.getOpenairecompatibility()
: openairecompatibility;
officialname = d.getOfficialname() != null && compareTrust(this, e) < 0
? d.getOfficialname()
: officialname;
englishname = d.getEnglishname() != null && compareTrust(this, e) < 0 ? d.getEnglishname() : officialname;
websiteurl = d.getWebsiteurl() != null && compareTrust(this, e) < 0 ? d.getWebsiteurl() : websiteurl;
logourl = d.getLogourl() != null && compareTrust(this, e) < 0 ? d.getLogourl() : getLogourl();
contactemail = d.getContactemail() != null && compareTrust(this, e) < 0
? d.getContactemail()
: contactemail;
namespaceprefix = d.getNamespaceprefix() != null && compareTrust(this, e) < 0
? d.getNamespaceprefix()
: namespaceprefix;
latitude = d.getLatitude() != null && compareTrust(this, e) < 0 ? d.getLatitude() : latitude;
longitude = d.getLongitude() != null && compareTrust(this, e) < 0 ? d.getLongitude() : longitude;
dateofvalidation = d.getDateofvalidation() != null && compareTrust(this, e) < 0
? d.getDateofvalidation()
: dateofvalidation;
description = d.getDescription() != null && compareTrust(this, e) < 0 ? d.getDescription() : description;
subjects = mergeLists(subjects, d.getSubjects());
// opendoar specific fields (od*)
odnumberofitems = d.getOdnumberofitems() != null && compareTrust(this, e) < 0
? d.getOdnumberofitems()
: odnumberofitems;
odnumberofitemsdate = d.getOdnumberofitemsdate() != null && compareTrust(this, e) < 0
? d.getOdnumberofitemsdate()
: odnumberofitemsdate;
odpolicies = d.getOdpolicies() != null && compareTrust(this, e) < 0 ? d.getOdpolicies() : odpolicies;
odlanguages = mergeLists(odlanguages, d.getOdlanguages());
odcontenttypes = mergeLists(odcontenttypes, d.getOdcontenttypes());
accessinfopackage = mergeLists(accessinfopackage, d.getAccessinfopackage());
// re3data fields
releasestartdate = d.getReleasestartdate() != null && compareTrust(this, e) < 0
? d.getReleasestartdate()
: releasestartdate;
releaseenddate = d.getReleaseenddate() != null && compareTrust(this, e) < 0
? d.getReleaseenddate()
: releaseenddate;
missionstatementurl = d.getMissionstatementurl() != null && compareTrust(this, e) < 0
? d.getMissionstatementurl()
: missionstatementurl;
dataprovider = d.getDataprovider() != null && compareTrust(this, e) < 0
? d.getDataprovider()
: dataprovider;
serviceprovider = d.getServiceprovider() != null && compareTrust(this, e) < 0
? d.getServiceprovider()
: serviceprovider;
// {open, restricted or closed}
databaseaccesstype = d.getDatabaseaccesstype() != null && compareTrust(this, e) < 0
? d.getDatabaseaccesstype()
: databaseaccesstype;
// {open, restricted or closed}
datauploadtype = d.getDatauploadtype() != null && compareTrust(this, e) < 0
? d.getDatauploadtype()
: datauploadtype;
// {feeRequired, registration, other}
databaseaccessrestriction = d.getDatabaseaccessrestriction() != null && compareTrust(this, e) < 0
? d.getDatabaseaccessrestriction()
: databaseaccessrestriction;
// {feeRequired, registration, other}
datauploadrestriction = d.getDatauploadrestriction() != null && compareTrust(this, e) < 0
? d.getDatauploadrestriction()
: datauploadrestriction;
versioning = d.getVersioning() != null && compareTrust(this, e) < 0 ? d.getVersioning() : versioning;
citationguidelineurl = d.getCitationguidelineurl() != null && compareTrust(this, e) < 0
? d.getCitationguidelineurl()
: citationguidelineurl;
// {yes, no, unknown}
qualitymanagementkind = d.getQualitymanagementkind() != null && compareTrust(this, e) < 0
? d.getQualitymanagementkind()
: qualitymanagementkind;
pidsystems = d.getPidsystems() != null && compareTrust(this, e) < 0 ? d.getPidsystems() : pidsystems;
certificates = d.getCertificates() != null && compareTrust(this, e) < 0
? d.getCertificates()
: certificates;
policies = mergeLists(policies, d.getPolicies());
journal = d.getJournal() != null && compareTrust(this, e) < 0 ? d.getJournal() : journal;
providedentitytypes = mergeLists(providedentitytypes, d.getProvidedentitytypes());;
providedproducttypes = mergeLists(providedproducttypes, d.getProvidedproducttypes());;
jurisdiction = d.getJurisdiction() != null && compareTrust(this, e) < 0
? d.getJurisdiction()
: jurisdiction;
thematic = d.getThematic() != null && compareTrust(this, e) < 0
? d.getThematic()
: thematic;
knowledgegraph = d.getKnowledgegraph() != null && compareTrust(this, e) < 0
? d.getKnowledgegraph()
: knowledgegraph;
contentpolicies = mergeLists(contentpolicies, d.getContentpolicies());;
mergeOAFDataInfo(e);
} }
} }