Merge pull request 'Datasource model extension' (#2) from datasource_model_eosc into master
Reviewed-on: #2
This commit is contained in:
commit
503bfbe4a5
|
@ -6,8 +6,15 @@ import java.util.List;
|
|||
|
||||
public class Datasource extends OafEntity implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1019089598408414496L;
|
||||
|
||||
private Qualifier datasourcetype;
|
||||
|
||||
private Qualifier datasourcetypeui;
|
||||
|
||||
private Qualifier openairecompatibility;
|
||||
|
||||
private Field<String> officialname;
|
||||
|
@ -83,19 +90,45 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
|
||||
private Journal journal;
|
||||
|
||||
// New field for EOSC
|
||||
private List<String> providedentitytypes;
|
||||
|
||||
// New field for EOSC
|
||||
private List<String> providedproducttypes;
|
||||
|
||||
// New field for EOSC
|
||||
private Qualifier jurisdiction;
|
||||
|
||||
// New field for EOSC
|
||||
private Boolean thematic;
|
||||
|
||||
// New field for EOSC
|
||||
private Boolean knowledgegraph;
|
||||
|
||||
// New field for EOSC
|
||||
private List<Qualifier> contentpolicies;
|
||||
|
||||
public Qualifier getDatasourcetype() {
|
||||
return datasourcetype;
|
||||
}
|
||||
|
||||
public void setDatasourcetype(Qualifier datasourcetype) {
|
||||
public void setDatasourcetype(final Qualifier datasourcetype) {
|
||||
this.datasourcetype = datasourcetype;
|
||||
}
|
||||
|
||||
public Qualifier getDatasourcetypeui() {
|
||||
return datasourcetypeui;
|
||||
}
|
||||
|
||||
public void setDatasourcetypeui(final Qualifier datasourcetypeui) {
|
||||
this.datasourcetypeui = datasourcetypeui;
|
||||
}
|
||||
|
||||
public Qualifier getOpenairecompatibility() {
|
||||
return openairecompatibility;
|
||||
}
|
||||
|
||||
public void setOpenairecompatibility(Qualifier openairecompatibility) {
|
||||
public void setOpenairecompatibility(final Qualifier openairecompatibility) {
|
||||
this.openairecompatibility = openairecompatibility;
|
||||
}
|
||||
|
||||
|
@ -103,7 +136,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return officialname;
|
||||
}
|
||||
|
||||
public void setOfficialname(Field<String> officialname) {
|
||||
public void setOfficialname(final Field<String> officialname) {
|
||||
this.officialname = officialname;
|
||||
}
|
||||
|
||||
|
@ -111,7 +144,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return englishname;
|
||||
}
|
||||
|
||||
public void setEnglishname(Field<String> englishname) {
|
||||
public void setEnglishname(final Field<String> englishname) {
|
||||
this.englishname = englishname;
|
||||
}
|
||||
|
||||
|
@ -119,7 +152,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return websiteurl;
|
||||
}
|
||||
|
||||
public void setWebsiteurl(Field<String> websiteurl) {
|
||||
public void setWebsiteurl(final Field<String> websiteurl) {
|
||||
this.websiteurl = websiteurl;
|
||||
}
|
||||
|
||||
|
@ -127,7 +160,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return logourl;
|
||||
}
|
||||
|
||||
public void setLogourl(Field<String> logourl) {
|
||||
public void setLogourl(final Field<String> logourl) {
|
||||
this.logourl = logourl;
|
||||
}
|
||||
|
||||
|
@ -135,7 +168,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return contactemail;
|
||||
}
|
||||
|
||||
public void setContactemail(Field<String> contactemail) {
|
||||
public void setContactemail(final Field<String> contactemail) {
|
||||
this.contactemail = contactemail;
|
||||
}
|
||||
|
||||
|
@ -143,7 +176,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return namespaceprefix;
|
||||
}
|
||||
|
||||
public void setNamespaceprefix(Field<String> namespaceprefix) {
|
||||
public void setNamespaceprefix(final Field<String> namespaceprefix) {
|
||||
this.namespaceprefix = namespaceprefix;
|
||||
}
|
||||
|
||||
|
@ -151,7 +184,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(Field<String> latitude) {
|
||||
public void setLatitude(final Field<String> latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
|
@ -159,7 +192,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(Field<String> longitude) {
|
||||
public void setLongitude(final Field<String> longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
|
@ -167,7 +200,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return dateofvalidation;
|
||||
}
|
||||
|
||||
public void setDateofvalidation(Field<String> dateofvalidation) {
|
||||
public void setDateofvalidation(final Field<String> dateofvalidation) {
|
||||
this.dateofvalidation = dateofvalidation;
|
||||
}
|
||||
|
||||
|
@ -175,7 +208,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(Field<String> description) {
|
||||
public void setDescription(final Field<String> description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
|
@ -183,7 +216,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return subjects;
|
||||
}
|
||||
|
||||
public void setSubjects(List<StructuredProperty> subjects) {
|
||||
public void setSubjects(final List<StructuredProperty> subjects) {
|
||||
this.subjects = subjects;
|
||||
}
|
||||
|
||||
|
@ -191,7 +224,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return odnumberofitems;
|
||||
}
|
||||
|
||||
public void setOdnumberofitems(Field<String> odnumberofitems) {
|
||||
public void setOdnumberofitems(final Field<String> odnumberofitems) {
|
||||
this.odnumberofitems = odnumberofitems;
|
||||
}
|
||||
|
||||
|
@ -199,7 +232,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return odnumberofitemsdate;
|
||||
}
|
||||
|
||||
public void setOdnumberofitemsdate(Field<String> odnumberofitemsdate) {
|
||||
public void setOdnumberofitemsdate(final Field<String> odnumberofitemsdate) {
|
||||
this.odnumberofitemsdate = odnumberofitemsdate;
|
||||
}
|
||||
|
||||
|
@ -207,7 +240,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return odpolicies;
|
||||
}
|
||||
|
||||
public void setOdpolicies(Field<String> odpolicies) {
|
||||
public void setOdpolicies(final Field<String> odpolicies) {
|
||||
this.odpolicies = odpolicies;
|
||||
}
|
||||
|
||||
|
@ -215,7 +248,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return odlanguages;
|
||||
}
|
||||
|
||||
public void setOdlanguages(List<Field<String>> odlanguages) {
|
||||
public void setOdlanguages(final List<Field<String>> odlanguages) {
|
||||
this.odlanguages = odlanguages;
|
||||
}
|
||||
|
||||
|
@ -223,7 +256,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return odcontenttypes;
|
||||
}
|
||||
|
||||
public void setOdcontenttypes(List<Field<String>> odcontenttypes) {
|
||||
public void setOdcontenttypes(final List<Field<String>> odcontenttypes) {
|
||||
this.odcontenttypes = odcontenttypes;
|
||||
}
|
||||
|
||||
|
@ -231,7 +264,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return accessinfopackage;
|
||||
}
|
||||
|
||||
public void setAccessinfopackage(List<Field<String>> accessinfopackage) {
|
||||
public void setAccessinfopackage(final List<Field<String>> accessinfopackage) {
|
||||
this.accessinfopackage = accessinfopackage;
|
||||
}
|
||||
|
||||
|
@ -239,7 +272,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return releasestartdate;
|
||||
}
|
||||
|
||||
public void setReleasestartdate(Field<String> releasestartdate) {
|
||||
public void setReleasestartdate(final Field<String> releasestartdate) {
|
||||
this.releasestartdate = releasestartdate;
|
||||
}
|
||||
|
||||
|
@ -247,7 +280,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return releaseenddate;
|
||||
}
|
||||
|
||||
public void setReleaseenddate(Field<String> releaseenddate) {
|
||||
public void setReleaseenddate(final Field<String> releaseenddate) {
|
||||
this.releaseenddate = releaseenddate;
|
||||
}
|
||||
|
||||
|
@ -255,7 +288,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return missionstatementurl;
|
||||
}
|
||||
|
||||
public void setMissionstatementurl(Field<String> missionstatementurl) {
|
||||
public void setMissionstatementurl(final Field<String> missionstatementurl) {
|
||||
this.missionstatementurl = missionstatementurl;
|
||||
}
|
||||
|
||||
|
@ -263,7 +296,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return dataprovider;
|
||||
}
|
||||
|
||||
public void setDataprovider(Field<Boolean> dataprovider) {
|
||||
public void setDataprovider(final Field<Boolean> dataprovider) {
|
||||
this.dataprovider = dataprovider;
|
||||
}
|
||||
|
||||
|
@ -271,7 +304,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return serviceprovider;
|
||||
}
|
||||
|
||||
public void setServiceprovider(Field<Boolean> serviceprovider) {
|
||||
public void setServiceprovider(final Field<Boolean> serviceprovider) {
|
||||
this.serviceprovider = serviceprovider;
|
||||
}
|
||||
|
||||
|
@ -279,7 +312,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return databaseaccesstype;
|
||||
}
|
||||
|
||||
public void setDatabaseaccesstype(Field<String> databaseaccesstype) {
|
||||
public void setDatabaseaccesstype(final Field<String> databaseaccesstype) {
|
||||
this.databaseaccesstype = databaseaccesstype;
|
||||
}
|
||||
|
||||
|
@ -287,7 +320,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return datauploadtype;
|
||||
}
|
||||
|
||||
public void setDatauploadtype(Field<String> datauploadtype) {
|
||||
public void setDatauploadtype(final Field<String> datauploadtype) {
|
||||
this.datauploadtype = datauploadtype;
|
||||
}
|
||||
|
||||
|
@ -295,7 +328,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return databaseaccessrestriction;
|
||||
}
|
||||
|
||||
public void setDatabaseaccessrestriction(Field<String> databaseaccessrestriction) {
|
||||
public void setDatabaseaccessrestriction(final Field<String> databaseaccessrestriction) {
|
||||
this.databaseaccessrestriction = databaseaccessrestriction;
|
||||
}
|
||||
|
||||
|
@ -303,7 +336,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return datauploadrestriction;
|
||||
}
|
||||
|
||||
public void setDatauploadrestriction(Field<String> datauploadrestriction) {
|
||||
public void setDatauploadrestriction(final Field<String> datauploadrestriction) {
|
||||
this.datauploadrestriction = datauploadrestriction;
|
||||
}
|
||||
|
||||
|
@ -311,7 +344,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return versioning;
|
||||
}
|
||||
|
||||
public void setVersioning(Field<Boolean> versioning) {
|
||||
public void setVersioning(final Field<Boolean> versioning) {
|
||||
this.versioning = versioning;
|
||||
}
|
||||
|
||||
|
@ -319,7 +352,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return citationguidelineurl;
|
||||
}
|
||||
|
||||
public void setCitationguidelineurl(Field<String> citationguidelineurl) {
|
||||
public void setCitationguidelineurl(final Field<String> citationguidelineurl) {
|
||||
this.citationguidelineurl = citationguidelineurl;
|
||||
}
|
||||
|
||||
|
@ -327,7 +360,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return qualitymanagementkind;
|
||||
}
|
||||
|
||||
public void setQualitymanagementkind(Field<String> qualitymanagementkind) {
|
||||
public void setQualitymanagementkind(final Field<String> qualitymanagementkind) {
|
||||
this.qualitymanagementkind = qualitymanagementkind;
|
||||
}
|
||||
|
||||
|
@ -335,7 +368,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return pidsystems;
|
||||
}
|
||||
|
||||
public void setPidsystems(Field<String> pidsystems) {
|
||||
public void setPidsystems(final Field<String> pidsystems) {
|
||||
this.pidsystems = pidsystems;
|
||||
}
|
||||
|
||||
|
@ -343,7 +376,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return certificates;
|
||||
}
|
||||
|
||||
public void setCertificates(Field<String> certificates) {
|
||||
public void setCertificates(final Field<String> certificates) {
|
||||
this.certificates = certificates;
|
||||
}
|
||||
|
||||
|
@ -351,7 +384,7 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return policies;
|
||||
}
|
||||
|
||||
public void setPolicies(List<KeyValue> policies) {
|
||||
public void setPolicies(final List<KeyValue> policies) {
|
||||
this.policies = policies;
|
||||
}
|
||||
|
||||
|
@ -359,23 +392,72 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
return journal;
|
||||
}
|
||||
|
||||
public void setJournal(Journal journal) {
|
||||
public void setJournal(final Journal journal) {
|
||||
this.journal = journal;
|
||||
}
|
||||
|
||||
public List<String> getProvidedentitytypes() {
|
||||
return providedentitytypes;
|
||||
}
|
||||
|
||||
public void setProvidedentitytypes(final List<String> providedentitytypes) {
|
||||
this.providedentitytypes = providedentitytypes;
|
||||
}
|
||||
|
||||
public List<String> getProvidedproducttypes() {
|
||||
return providedproducttypes;
|
||||
}
|
||||
|
||||
public void setProvidedproducttypes(final List<String> providedproducttypes) {
|
||||
this.providedproducttypes = providedproducttypes;
|
||||
}
|
||||
|
||||
public Qualifier getJurisdiction() {
|
||||
return jurisdiction;
|
||||
}
|
||||
|
||||
public void setJurisdiction(final Qualifier jurisdiction) {
|
||||
this.jurisdiction = jurisdiction;
|
||||
}
|
||||
|
||||
public Boolean getThematic() {
|
||||
return thematic;
|
||||
}
|
||||
|
||||
public void setThematic(final Boolean thematic) {
|
||||
this.thematic = thematic;
|
||||
}
|
||||
|
||||
public Boolean getKnowledgegraph() {
|
||||
return knowledgegraph;
|
||||
}
|
||||
|
||||
public void setKnowledgegraph(final Boolean knowledgegraph) {
|
||||
this.knowledgegraph = knowledgegraph;
|
||||
}
|
||||
|
||||
public List<Qualifier> getContentpolicies() {
|
||||
return contentpolicies;
|
||||
}
|
||||
|
||||
public void setContentpolicies(final List<Qualifier> contentpolicies) {
|
||||
this.contentpolicies = contentpolicies;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mergeFrom(OafEntity e) {
|
||||
public void mergeFrom(final OafEntity e) {
|
||||
super.mergeFrom(e);
|
||||
|
||||
if (!Datasource.class.isAssignableFrom(e.getClass())) {
|
||||
return;
|
||||
}
|
||||
if (!Datasource.class.isAssignableFrom(e.getClass())) { return; }
|
||||
|
||||
Datasource d = (Datasource) e;
|
||||
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;
|
||||
|
@ -467,6 +549,25 @@ public class Datasource extends OafEntity implements Serializable {
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
-- Table to extend the datasource properties according to the eosc model
|
||||
CREATE TABLE dsm_datasources_eosc(
|
||||
id varchar(255) references dsm_datasources(id),
|
||||
jurisdiction text,
|
||||
thematic boolean,
|
||||
knowledge_graph boolean,
|
||||
content_policies text[],
|
||||
_dnet_resource_identifier_ varchar(2048) default ((('temp_'::text || md5((clock_timestamp())::text)) || '_'::text) || md5((random())::text))
|
||||
);
|
Loading…
Reference in New Issue