diff --git a/README.md b/README.md index 94499a4..b18603b 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,11 @@ This project defines **object schemas** of the OpenAIRE main entities and the re Namely it defines the model for - the graph internal representation, defined under the package `eu.dnetlib.dhp.schema.oaf` -- the public graph dump representations, defined under the package `eu.dnetlib.dhp.schema.dump.oaf` - the scholexplorer content representation, defined under the package `eu.dnetlib.dhp.schema.sx` -- the contents acquired from the netadata aggregation subsystem, defined under the package `eu.dnetlib.dhp.schema.mdstore` +- the contents acquired from the metadata aggregation subsystem, defined under the package `eu.dnetlib.dhp.schema.mdstore` - the ORCID common schemas, defined under the package `eu.dnetlib.dhp.schema.orcid` +- the Solr common schemas used to represent the information returned to the Explore portal and the APIs, defined under +the package `eu.dnetlib.dhp.schema.solr` -Te serialization of such objects (data store files) are used to pass data between workflow nodes in the processing pipeline. +The serialization of such objects (data store files) are used to pass data between workflow nodes in the processing pipeline +and / or intended to be shared across components. diff --git a/pom.xml b/pom.xml index 4cdfb6d..02d05d5 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 5.17.4-SNAPSHOT + 6.0.0-SNAPSHOT diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/APC.java b/src/main/java/eu/dnetlib/dhp/schema/solr/APC.java new file mode 100644 index 0000000..75f5101 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/APC.java @@ -0,0 +1,28 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +/** + * Used to refer to the Article Processing Charge information. It contains two parameters: - + * currency of type String to store the currency of the APC - amount of type String to stores the charged amount + */ +public class APC implements Serializable { + private String currency; + private String amount; + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/AccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/solr/AccessRight.java new file mode 100644 index 0000000..db22675 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/AccessRight.java @@ -0,0 +1,32 @@ + +package eu.dnetlib.dhp.schema.solr; + +import java.util.Optional; + +/** + * This class models the access rights of research products. + */ +public class AccessRight { + + private String value; + + private OpenAccessRoute openAccessRoute; + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public OpenAccessRoute getOpenAccessRoute() { + return openAccessRoute; + } + + public void setOpenAccessRoute(OpenAccessRoute openAccessRoute) { + this.openAccessRoute = openAccessRoute; + } + + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Author.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Author.java new file mode 100644 index 0000000..9e79724 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Author.java @@ -0,0 +1,69 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Author implements Serializable { + + private String fullname; + + private String name; + + private String surname; + + private Integer rank; + + /** + * The author's persistent identifiers + */ + private Pid pid; + + public static Author newInstance(String fullname, String name, String surname, int rank, Pid pid) { + Author a = new Author(); + a.setFullname(fullname); + a.setName(name); + a.setSurname(surname); + a.setRank(rank); + a.setPid(pid); + return a; + } + + public String getFullname() { + return fullname; + } + + public void setFullname(String fullname) { + this.fullname = fullname; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getSurname() { + return surname; + } + + public void setSurname(String surname) { + this.surname = surname; + } + + public Integer getRank() { + return rank; + } + + public void setRank(Integer rank) { + this.rank = rank; + } + + public Pid getPid() { + return pid; + } + + public void setPid(Pid pid) { + this.pid = pid; + } +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/BestAccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/solr/BestAccessRight.java new file mode 100644 index 0000000..5e4905d --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/BestAccessRight.java @@ -0,0 +1,42 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +/** + * BestAccessRight. Used to represent the result best access rights. + */ +public class BestAccessRight implements Serializable { + + /** + * AccessRight code + */ + private String code; // the classid in the Qualifier + + /** + * Label for the access mode + */ + 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 BestAccessRight newInstance(String code, String label) { + BestAccessRight ar = new BestAccessRight(); + ar.code = code; + ar.label = label; + return ar; + } +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Category.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Category.java new file mode 100644 index 0000000..5b92a67 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Category.java @@ -0,0 +1,42 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class Category implements Serializable { + + private String id; + private String label; + private List concept; + + private Category newInstance(String id, String label) { + Category category = new Category(); + category.setId(id); + category.setLabel(label); + return category; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public List getConcept() { + return concept; + } + + public void setConcept(List concept) { + this.concept = concept; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/CodeLabel.java b/src/main/java/eu/dnetlib/dhp/schema/solr/CodeLabel.java new file mode 100644 index 0000000..29be542 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/CodeLabel.java @@ -0,0 +1,33 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class CodeLabel implements Serializable { + + private String code; + + private String label; + + public static CodeLabel newInstance(String code, String label) { + CodeLabel cl = new CodeLabel(); + cl.setCode(code); + cl.setLabel(label); + return cl; + } + + 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; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Concept.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Concept.java new file mode 100644 index 0000000..b15d3db --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Concept.java @@ -0,0 +1,32 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Concept implements Serializable { + + private String id; + private String label; + + private Concept newInstance(String id, String label) { + Concept concept = new Concept(); + concept.setId(id); + concept.setLabel(label); + return concept; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Context.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Context.java new file mode 100644 index 0000000..07a90e3 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Context.java @@ -0,0 +1,53 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class Context implements Serializable { + + private String id; + private String label; + private String type; + private List category; + + private Context newInstance(String id, String label, String type, List category) { + Context context = new Context(); + context.setId(id); + context.setLabel(label); + context.setType(type); + context.setCategory(category); + return context; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public List getCategory() { + return category; + } + + public void setCategory(List category) { + this.category = category; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Country.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Country.java new file mode 100644 index 0000000..630e85f --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Country.java @@ -0,0 +1,47 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +/** + * Represents the country associated to the generic entity. 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 Country implements Serializable { + + /** + * ISO 3166-1 alpha-2 country code (i.e. IT) + */ + private String code; // the classid in the Qualifier + + /** + * The label for that code (i.e. Italy) + */ + 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 Country newInstance(String code, String label) { + Country c = new Country(); + c.setCode(code); + c.setLabel(label); + return c; + } + +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Datasource.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Datasource.java new file mode 100644 index 0000000..e0d3579 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Datasource.java @@ -0,0 +1,537 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class Datasource implements Serializable { + + private CodeLabel datasourcetype; + + private CodeLabel datasourcetypeui; + + private CodeLabel eosctype; // Data Source | Service + + private CodeLabel eoscdatasourcetype; + + private CodeLabel openairecompatibility; + + private String officialname; + + private String englishname; + + private String websiteurl; + + private String logourl; + + private String contactemail; + + private String namespaceprefix; + + private String latitude; + + private String longitude; + + private String dateofvalidation; + + private String description; + + private List subjects; + + private String odnumberofitems; + + private String odnumberofitemsdate; + + private String odpolicies; + + private List odlanguages; + + private List languages; + + private List odcontenttypes; + + private List accessinfopackage; + + // re3data fields + private String releasestartdate; + + private String releaseenddate; + + private String missionstatementurl; + + private Boolean dataprovider; + + private Boolean serviceprovider; + + // {open, restricted or closed} + private String databaseaccesstype; + + // {open, restricted or closed} + private String datauploadtype; + + // {feeRequired, registration, other} + private String databaseaccessrestriction; + + // {feeRequired, registration, other} + private String datauploadrestriction; + + private Boolean versioning; + + private Boolean versioncontrol; + + private String citationguidelineurl; + + private String pidsystems; + + private String certificates; + + private List policies; + + private Journal journal; + + // New field for EOSC + private List researchentitytypes; + + // New field for EOSC + private List providedproducttypes; + + // New field for EOSC + private CodeLabel jurisdiction; + + // New field for EOSC + private Boolean thematic; + + // New field for EOSC + private List contentpolicies; + + private String submissionpolicyurl; + + private String preservationpolicyurl; + + private List researchproductaccesspolicies; + + private List researchproductmetadataaccesspolicies; + + private Boolean consenttermsofuse; + + private Boolean fulltextdownload; + + private String consenttermsofusedate; + + private String lastconsenttermsofusedate; + + public CodeLabel getDatasourcetype() { + return datasourcetype; + } + + public void setDatasourcetype(CodeLabel datasourcetype) { + this.datasourcetype = datasourcetype; + } + + public CodeLabel getDatasourcetypeui() { + return datasourcetypeui; + } + + public void setDatasourcetypeui(CodeLabel datasourcetypeui) { + this.datasourcetypeui = datasourcetypeui; + } + + public CodeLabel getEosctype() { + return eosctype; + } + + public void setEosctype(CodeLabel eosctype) { + this.eosctype = eosctype; + } + + public CodeLabel getEoscdatasourcetype() { + return eoscdatasourcetype; + } + + public void setEoscdatasourcetype(CodeLabel eoscdatasourcetype) { + this.eoscdatasourcetype = eoscdatasourcetype; + } + + public CodeLabel getOpenairecompatibility() { + return openairecompatibility; + } + + public void setOpenairecompatibility(CodeLabel openairecompatibility) { + this.openairecompatibility = openairecompatibility; + } + + public String getOfficialname() { + return officialname; + } + + public void setOfficialname(String officialname) { + this.officialname = officialname; + } + + public String getEnglishname() { + return englishname; + } + + public void setEnglishname(String englishname) { + this.englishname = englishname; + } + + public String getWebsiteurl() { + return websiteurl; + } + + public void setWebsiteurl(String websiteurl) { + this.websiteurl = websiteurl; + } + + public String getLogourl() { + return logourl; + } + + public void setLogourl(String logourl) { + this.logourl = logourl; + } + + public String getContactemail() { + return contactemail; + } + + public void setContactemail(String contactemail) { + this.contactemail = contactemail; + } + + public String getNamespaceprefix() { + return namespaceprefix; + } + + public void setNamespaceprefix(String namespaceprefix) { + this.namespaceprefix = namespaceprefix; + } + + public String getLatitude() { + return latitude; + } + + public void setLatitude(String latitude) { + this.latitude = latitude; + } + + public String getLongitude() { + return longitude; + } + + public void setLongitude(String longitude) { + this.longitude = longitude; + } + + public String getDateofvalidation() { + return dateofvalidation; + } + + public void setDateofvalidation(String dateofvalidation) { + this.dateofvalidation = dateofvalidation; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public List getSubjects() { + return subjects; + } + + public void setSubjects(List subjects) { + this.subjects = subjects; + } + + public String getOdnumberofitems() { + return odnumberofitems; + } + + public void setOdnumberofitems(String odnumberofitems) { + this.odnumberofitems = odnumberofitems; + } + + public String getOdnumberofitemsdate() { + return odnumberofitemsdate; + } + + public void setOdnumberofitemsdate(String odnumberofitemsdate) { + this.odnumberofitemsdate = odnumberofitemsdate; + } + + public String getOdpolicies() { + return odpolicies; + } + + public void setOdpolicies(String odpolicies) { + this.odpolicies = odpolicies; + } + + public List getOdlanguages() { + return odlanguages; + } + + public void setOdlanguages(List odlanguages) { + this.odlanguages = odlanguages; + } + + public List getLanguages() { + return languages; + } + + public void setLanguages(List languages) { + this.languages = languages; + } + + public List getOdcontenttypes() { + return odcontenttypes; + } + + public void setOdcontenttypes(List odcontenttypes) { + this.odcontenttypes = odcontenttypes; + } + + public List getAccessinfopackage() { + return accessinfopackage; + } + + public void setAccessinfopackage(List accessinfopackage) { + this.accessinfopackage = accessinfopackage; + } + + public String getReleasestartdate() { + return releasestartdate; + } + + public void setReleasestartdate(String releasestartdate) { + this.releasestartdate = releasestartdate; + } + + public String getReleaseenddate() { + return releaseenddate; + } + + public void setReleaseenddate(String releaseenddate) { + this.releaseenddate = releaseenddate; + } + + public String getMissionstatementurl() { + return missionstatementurl; + } + + public void setMissionstatementurl(String missionstatementurl) { + this.missionstatementurl = missionstatementurl; + } + + public Boolean getDataprovider() { + return dataprovider; + } + + public void setDataprovider(Boolean dataprovider) { + this.dataprovider = dataprovider; + } + + public Boolean getServiceprovider() { + return serviceprovider; + } + + public void setServiceprovider(Boolean serviceprovider) { + this.serviceprovider = serviceprovider; + } + + public String getDatabaseaccesstype() { + return databaseaccesstype; + } + + public void setDatabaseaccesstype(String databaseaccesstype) { + this.databaseaccesstype = databaseaccesstype; + } + + public String getDatauploadtype() { + return datauploadtype; + } + + public void setDatauploadtype(String datauploadtype) { + this.datauploadtype = datauploadtype; + } + + public String getDatabaseaccessrestriction() { + return databaseaccessrestriction; + } + + public void setDatabaseaccessrestriction(String databaseaccessrestriction) { + this.databaseaccessrestriction = databaseaccessrestriction; + } + + public String getDatauploadrestriction() { + return datauploadrestriction; + } + + public void setDatauploadrestriction(String datauploadrestriction) { + this.datauploadrestriction = datauploadrestriction; + } + + public Boolean getVersioning() { + return versioning; + } + + public void setVersioning(Boolean versioning) { + this.versioning = versioning; + } + + public Boolean getVersioncontrol() { + return versioncontrol; + } + + public void setVersioncontrol(Boolean versioncontrol) { + this.versioncontrol = versioncontrol; + } + + public String getCitationguidelineurl() { + return citationguidelineurl; + } + + public void setCitationguidelineurl(String citationguidelineurl) { + this.citationguidelineurl = citationguidelineurl; + } + + public String getPidsystems() { + return pidsystems; + } + + public void setPidsystems(String pidsystems) { + this.pidsystems = pidsystems; + } + + public String getCertificates() { + return certificates; + } + + public void setCertificates(String certificates) { + this.certificates = certificates; + } + + public List getPolicies() { + return policies; + } + + public void setPolicies(List policies) { + this.policies = policies; + } + + public Journal getJournal() { + return journal; + } + + public void setJournal(Journal journal) { + this.journal = journal; + } + + public List getResearchentitytypes() { + return researchentitytypes; + } + + public void setResearchentitytypes(List researchentitytypes) { + this.researchentitytypes = researchentitytypes; + } + + public List getProvidedproducttypes() { + return providedproducttypes; + } + + public void setProvidedproducttypes(List providedproducttypes) { + this.providedproducttypes = providedproducttypes; + } + + public CodeLabel getJurisdiction() { + return jurisdiction; + } + + public void setJurisdiction(CodeLabel jurisdiction) { + this.jurisdiction = jurisdiction; + } + + public Boolean getThematic() { + return thematic; + } + + public void setThematic(Boolean thematic) { + this.thematic = thematic; + } + + public List getContentpolicies() { + return contentpolicies; + } + + public void setContentpolicies(List 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 getResearchproductaccesspolicies() { + return researchproductaccesspolicies; + } + + public void setResearchproductaccesspolicies(List researchproductaccesspolicies) { + this.researchproductaccesspolicies = researchproductaccesspolicies; + } + + public List getResearchproductmetadataaccesspolicies() { + return researchproductmetadataaccesspolicies; + } + + public void setResearchproductmetadataaccesspolicies(List researchproductmetadataaccesspolicies) { + this.researchproductmetadataaccesspolicies = researchproductmetadataaccesspolicies; + } + + public Boolean getConsenttermsofuse() { + return consenttermsofuse; + } + + public void setConsenttermsofuse(Boolean consenttermsofuse) { + this.consenttermsofuse = consenttermsofuse; + } + + public Boolean getFulltextdownload() { + return fulltextdownload; + } + + public void setFulltextdownload(Boolean fulltextdownload) { + this.fulltextdownload = fulltextdownload; + } + + public String getConsenttermsofusedate() { + return consenttermsofusedate; + } + + public void setConsenttermsofusedate(String consenttermsofusedate) { + this.consenttermsofusedate = consenttermsofusedate; + } + + public String getLastconsenttermsofusedate() { + return lastconsenttermsofusedate; + } + + public void setLastconsenttermsofusedate(String lastconsenttermsofusedate) { + this.lastconsenttermsofusedate = lastconsenttermsofusedate; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/EoscIfGuidelines.java b/src/main/java/eu/dnetlib/dhp/schema/solr/EoscIfGuidelines.java new file mode 100644 index 0000000..ee250b8 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/EoscIfGuidelines.java @@ -0,0 +1,68 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.Optional; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.apache.commons.lang3.StringUtils; + +/** + * Describes a reference to the EOSC Interoperability Framework (IF) Guidelines + */ +public class EoscIfGuidelines implements Serializable { + + /** + * 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; + + /** + * EOSC-IF label + */ + private String label; + + /** + * EOSC-IF url + */ + private String url; + + /** + * EOSC-IF semantic relation (e.g. compliesWith). Values shall be controlled by a dedicated vocabulary. + */ + private String semanticRelation; + + 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 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; + } + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/ExtraInfo.java b/src/main/java/eu/dnetlib/dhp/schema/solr/ExtraInfo.java new file mode 100644 index 0000000..a3ce98d --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/ExtraInfo.java @@ -0,0 +1,6 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class ExtraInfo implements Serializable { +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Funder.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Funder.java new file mode 100644 index 0000000..60320a2 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Funder.java @@ -0,0 +1,64 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class Funder implements Serializable { + + private String id; + private String shortname; + private String name; + private Country jurisdiction; + private List pid; + + public static Funder newInstance(String id, String shortname, String name, Country jurisdiction, List pid) { + Funder funder = new Funder(); + funder.setId(id); + funder.setShortname(shortname); + funder.setName(name); + funder.setJurisdiction(jurisdiction); + funder.setPid(pid); + return funder; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getShortname() { + return shortname; + } + + public void setShortname(String shortname) { + this.shortname = shortname; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public Country getJurisdiction() { + return jurisdiction; + } + + public void setJurisdiction(Country jurisdiction) { + this.jurisdiction = jurisdiction; + } + + public List getPid() { + return pid; + } + + public void setPid(List pid) { + this.pid = pid; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Funding.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Funding.java new file mode 100644 index 0000000..60c3178 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Funding.java @@ -0,0 +1,60 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Funding implements Serializable { + + private Funder funder; + private FundingLevel level0; + private FundingLevel level1; + private FundingLevel level2; + + public Funding newInstance(Funder funder, FundingLevel level0) { + return newInstance(funder, level0, null, null); + } + + public Funding newInstance(Funder funder, FundingLevel level0, FundingLevel level1) { + return newInstance(funder, level0, level1, null); + } + + public Funding newInstance(Funder funder, FundingLevel level0, FundingLevel level1, FundingLevel level2) { + Funding funding = new Funding(); + funding.setFunder(funder); + funding.setLevel0(level0); + funding.setLevel1(level1); + funding.setLevel2(level2); + return funding; + } + + public Funder getFunder() { + return funder; + } + + public void setFunder(Funder funder) { + this.funder = funder; + } + + public FundingLevel getLevel0() { + return level0; + } + + public void setLevel0(FundingLevel level0) { + this.level0 = level0; + } + + public FundingLevel getLevel1() { + return level1; + } + + public void setLevel1(FundingLevel level1) { + this.level1 = level1; + } + + public FundingLevel getLevel2() { + return level2; + } + + public void setLevel2(FundingLevel level2) { + this.level2 = level2; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/FundingLevel.java b/src/main/java/eu/dnetlib/dhp/schema/solr/FundingLevel.java new file mode 100644 index 0000000..d559ab5 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/FundingLevel.java @@ -0,0 +1,44 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class FundingLevel implements Serializable { + + private String id; + + private String description; + + private String name; + + public static FundingLevel newInstance(String id, String description, String name) { + FundingLevel level = new FundingLevel(); + level.setId(id); + level.setDescription(description); + level.setName(name); + return level; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Instance.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Instance.java new file mode 100644 index 0000000..b4cff90 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Instance.java @@ -0,0 +1,41 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class Instance implements Serializable { + + private String license; + + private AccessRight accessright; + + private String instancetype; + + private Provenance hostedby; + + private List url; + + // other research products specifc + private String distributionlocation; + + private Provenance collectedfrom; + + private List pid; + + private List alternateIdentifier; + + private String dateofacceptance; + + // ( article | book ) processing charges. Defined here to cope with possible wrongly typed + // results + private APC processingcharges; + + private String refereed; // peer-review status + + private List measures; + + /** + * Direct fulltext URL. + */ + private String fulltext; +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Journal.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Journal.java new file mode 100644 index 0000000..da4a8f1 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Journal.java @@ -0,0 +1,143 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Journal implements Serializable { + + /** + * Name of the journal or conference + */ + private String name; + + /** + * The issn + */ + private String issnPrinted; + + /** + * The e-issn + */ + private String issnOnline; + + /** + * The kinking issn + */ + private String issnLinking; + + /** + * Start page + */ + private String sp; + + /** + * End page + */ + private String ep; + + /** + * Journal issue number + */ + private String iss; + + /** + * Volume + */ + private String vol; + + /** + * Edition of the journal or conference proceeding + */ + private String edition; + + private String conferenceplace; + + private String conferencedate; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getIssnPrinted() { + return issnPrinted; + } + + public void setIssnPrinted(String issnPrinted) { + this.issnPrinted = issnPrinted; + } + + public String getIssnOnline() { + return issnOnline; + } + + public void setIssnOnline(String issnOnline) { + this.issnOnline = issnOnline; + } + + public String getIssnLinking() { + return issnLinking; + } + + public void setIssnLinking(String issnLinking) { + this.issnLinking = issnLinking; + } + + public String getSp() { + return sp; + } + + public void setSp(String sp) { + this.sp = sp; + } + + public String getEp() { + return ep; + } + + public void setEp(String ep) { + this.ep = ep; + } + + public String getIss() { + return iss; + } + + public void setIss(String iss) { + this.iss = iss; + } + + public String getVol() { + return vol; + } + + public void setVol(String vol) { + this.vol = vol; + } + + public String getEdition() { + return edition; + } + + public void setEdition(String edition) { + this.edition = edition; + } + + public String getConferenceplace() { + return conferenceplace; + } + + public void setConferenceplace(String conferenceplace) { + this.conferenceplace = conferenceplace; + } + + public String getConferencedate() { + return conferencedate; + } + + public void setConferencedate(String conferencedate) { + this.conferencedate = conferencedate; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Language.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Language.java new file mode 100644 index 0000000..5f672a7 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Language.java @@ -0,0 +1,39 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Language implements Serializable { + + /** + * alpha-3/ISO 639-2 code of the language + */ + private String code; // the classid in the Qualifier + + /** + * 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; + } +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Measure.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Measure.java new file mode 100644 index 0000000..063f694 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Measure.java @@ -0,0 +1,8 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Measure implements Serializable { + + //TODO define me! +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/OpenAccessColor.java b/src/main/java/eu/dnetlib/dhp/schema/solr/OpenAccessColor.java new file mode 100644 index 0000000..48407d8 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/OpenAccessColor.java @@ -0,0 +1,13 @@ + +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +/** + * The OpenAccess color meant to be used on the result level + */ +public enum OpenAccessColor implements Serializable { + + gold, hybrid, bronze + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/OpenAccessRoute.java b/src/main/java/eu/dnetlib/dhp/schema/solr/OpenAccessRoute.java new file mode 100644 index 0000000..6d473ed --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/OpenAccessRoute.java @@ -0,0 +1,15 @@ + +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +/** + * This Enum models the OpenAccess status, currently including only the values from Unpaywall + * + * https://support.unpaywall.org/support/solutions/articles/44001777288-what-do-the-types-of-oa-status-green-gold-hybrid-and-bronze-mean- + */ +public enum OpenAccessRoute implements Serializable { + + gold, green, hybrid, bronze + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Organization.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Organization.java new file mode 100644 index 0000000..8832e83 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Organization.java @@ -0,0 +1,167 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class Organization implements Serializable { + + private String legalshortname; + + private String legalname; + + private List alternativeNames; + + private String websiteurl; + + private String logourl; + + private String eclegalbody; + + private String eclegalperson; + + private String ecnonprofit; + + private String ecresearchorganization; + + private String echighereducation; + + private String ecinternationalorganizationeurinterests; + + private String ecinternationalorganization; + + private String ecenterprise; + + private String ecsmevalidated; + + private String ecnutscode; + + private CodeLabel country; + + public String getLegalshortname() { + return legalshortname; + } + + public void setLegalshortname(String legalshortname) { + this.legalshortname = legalshortname; + } + + public String getLegalname() { + return legalname; + } + + public void setLegalname(String legalname) { + this.legalname = legalname; + } + + public List getAlternativeNames() { + return alternativeNames; + } + + public void setAlternativeNames(List alternativeNames) { + this.alternativeNames = alternativeNames; + } + + public String getWebsiteurl() { + return websiteurl; + } + + public void setWebsiteurl(String websiteurl) { + this.websiteurl = websiteurl; + } + + public String getLogourl() { + return logourl; + } + + public void setLogourl(String logourl) { + this.logourl = logourl; + } + + public String getEclegalbody() { + return eclegalbody; + } + + public void setEclegalbody(String eclegalbody) { + this.eclegalbody = eclegalbody; + } + + public String getEclegalperson() { + return eclegalperson; + } + + public void setEclegalperson(String eclegalperson) { + this.eclegalperson = eclegalperson; + } + + public String getEcnonprofit() { + return ecnonprofit; + } + + public void setEcnonprofit(String ecnonprofit) { + this.ecnonprofit = ecnonprofit; + } + + public String getEcresearchorganization() { + return ecresearchorganization; + } + + public void setEcresearchorganization(String ecresearchorganization) { + this.ecresearchorganization = ecresearchorganization; + } + + public String getEchighereducation() { + return echighereducation; + } + + public void setEchighereducation(String echighereducation) { + this.echighereducation = echighereducation; + } + + public String getEcinternationalorganizationeurinterests() { + return ecinternationalorganizationeurinterests; + } + + public void setEcinternationalorganizationeurinterests(String ecinternationalorganizationeurinterests) { + this.ecinternationalorganizationeurinterests = ecinternationalorganizationeurinterests; + } + + public String getEcinternationalorganization() { + return ecinternationalorganization; + } + + public void setEcinternationalorganization(String ecinternationalorganization) { + this.ecinternationalorganization = ecinternationalorganization; + } + + public String getEcenterprise() { + return ecenterprise; + } + + public void setEcenterprise(String ecenterprise) { + this.ecenterprise = ecenterprise; + } + + public String getEcsmevalidated() { + return ecsmevalidated; + } + + public void setEcsmevalidated(String ecsmevalidated) { + this.ecsmevalidated = ecsmevalidated; + } + + public String getEcnutscode() { + return ecnutscode; + } + + public void setEcnutscode(String ecnutscode) { + this.ecnutscode = ecnutscode; + } + + public CodeLabel getCountry() { + return country; + } + + public void setCountry(CodeLabel country) { + this.country = country; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Pid.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Pid.java new file mode 100644 index 0000000..0541f6c --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Pid.java @@ -0,0 +1,26 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Pid implements Serializable { + + private String type; + + private String value; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Project.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Project.java new file mode 100644 index 0000000..d38cc42 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Project.java @@ -0,0 +1,171 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class Project implements Serializable { + + private String websiteurl; + + private String code; + private String acronym; + private String title; + private String startdate; + private String enddate; + private String callidentifier; + private String keywords; + private String duration; + + private String ecarticle29_3; + + private List subjects; + + private CodeLabel contracttype; + + private String summary; + + private String currency; + + private Float totalcost; + + private Float fundedamount; + + private Funding funding; + + + public String getWebsiteurl() { + return websiteurl; + } + + public void setWebsiteurl(String websiteurl) { + this.websiteurl = websiteurl; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getAcronym() { + return acronym; + } + + public void setAcronym(String acronym) { + this.acronym = acronym; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getStartdate() { + return startdate; + } + + public void setStartdate(String startdate) { + this.startdate = startdate; + } + + public String getEnddate() { + return enddate; + } + + public void setEnddate(String enddate) { + this.enddate = enddate; + } + + public String getCallidentifier() { + return callidentifier; + } + + public void setCallidentifier(String callidentifier) { + this.callidentifier = callidentifier; + } + + public String getKeywords() { + return keywords; + } + + public void setKeywords(String keywords) { + this.keywords = keywords; + } + + public String getDuration() { + return duration; + } + + public void setDuration(String duration) { + this.duration = duration; + } + + public String getEcarticle29_3() { + return ecarticle29_3; + } + + public void setEcarticle29_3(String ecarticle29_3) { + this.ecarticle29_3 = ecarticle29_3; + } + + public List getSubjects() { + return subjects; + } + + public void setSubjects(List subjects) { + this.subjects = subjects; + } + + public CodeLabel getContracttype() { + return contracttype; + } + + public void setContracttype(CodeLabel contracttype) { + this.contracttype = contracttype; + } + + public String getSummary() { + return summary; + } + + public void setSummary(String summary) { + this.summary = summary; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public Float getTotalcost() { + return totalcost; + } + + public void setTotalcost(Float totalcost) { + this.totalcost = totalcost; + } + + public Float getFundedamount() { + return fundedamount; + } + + public void setFundedamount(Float fundedamount) { + this.fundedamount = fundedamount; + } + + public Funding getFunding() { + return funding; + } + + public void setFunding(Funding funding) { + this.funding = funding; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Provenance.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Provenance.java new file mode 100644 index 0000000..970174a --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Provenance.java @@ -0,0 +1,26 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Provenance implements Serializable { + + private String dsId; + + private String dsName; + + public String getDsId() { + return dsId; + } + + public void setDsId(String dsId) { + this.dsId = dsId; + } + + public String getDsName() { + return dsName; + } + + public void setDsName(String dsName) { + this.dsName = dsName; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecord.java b/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecord.java new file mode 100644 index 0000000..61f87db --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecord.java @@ -0,0 +1,216 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class RelatedRecord implements Serializable { + + private RelatedRecordHeader header; + + // common fields + private String title; + private String websiteurl; // datasource, organizations, projects + + // results + private String dateofacceptance; + private String publisher; + private List pid; + private String codeRepositoryUrl; + private String resulttype; + private List collectedfrom; + private List instances; + + // datasource + private String officialname; + private CodeLabel datasourcetype; + private CodeLabel datasourcetypeui; + private CodeLabel openairecompatibility; + + // organization + private String legalname; + private String legalshortname; + private Country country; + + // project + private String projectTitle; + private String code; + private String acronym; + private CodeLabel contracttype; + private Funding funding; + + public RelatedRecordHeader getHeader() { + return header; + } + + public void setHeader(RelatedRecordHeader header) { + this.header = header; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getWebsiteurl() { + return websiteurl; + } + + public void setWebsiteurl(String websiteurl) { + this.websiteurl = websiteurl; + } + + public String getDateofacceptance() { + return dateofacceptance; + } + + public void setDateofacceptance(String dateofacceptance) { + this.dateofacceptance = dateofacceptance; + } + + public String getPublisher() { + return publisher; + } + + public void setPublisher(String publisher) { + this.publisher = publisher; + } + + public List getPid() { + return pid; + } + + public void setPid(List pid) { + this.pid = pid; + } + + public String getCodeRepositoryUrl() { + return codeRepositoryUrl; + } + + public void setCodeRepositoryUrl(String codeRepositoryUrl) { + this.codeRepositoryUrl = codeRepositoryUrl; + } + + public String getResulttype() { + return resulttype; + } + + public void setResulttype(String resulttype) { + this.resulttype = resulttype; + } + + public List getCollectedfrom() { + return collectedfrom; + } + + public void setCollectedfrom(List collectedfrom) { + this.collectedfrom = collectedfrom; + } + + public List getInstances() { + return instances; + } + + public void setInstances(List instances) { + this.instances = instances; + } + + public String getOfficialname() { + return officialname; + } + + public void setOfficialname(String officialname) { + this.officialname = officialname; + } + + public CodeLabel getDatasourcetype() { + return datasourcetype; + } + + public void setDatasourcetype(CodeLabel datasourcetype) { + this.datasourcetype = datasourcetype; + } + + public CodeLabel getDatasourcetypeui() { + return datasourcetypeui; + } + + public void setDatasourcetypeui(CodeLabel datasourcetypeui) { + this.datasourcetypeui = datasourcetypeui; + } + + public CodeLabel getOpenairecompatibility() { + return openairecompatibility; + } + + public void setOpenairecompatibility(CodeLabel openairecompatibility) { + this.openairecompatibility = openairecompatibility; + } + + public String getLegalname() { + return legalname; + } + + public void setLegalname(String legalname) { + this.legalname = legalname; + } + + public String getLegalshortname() { + return legalshortname; + } + + public void setLegalshortname(String legalshortname) { + this.legalshortname = legalshortname; + } + + public Country getCountry() { + return country; + } + + public void setCountry(Country country) { + this.country = country; + } + + public String getProjectTitle() { + return projectTitle; + } + + public void setProjectTitle(String projectTitle) { + this.projectTitle = projectTitle; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getAcronym() { + return acronym; + } + + public void setAcronym(String acronym) { + this.acronym = acronym; + } + + public CodeLabel getContracttype() { + return contracttype; + } + + public void setContracttype(CodeLabel contracttype) { + this.contracttype = contracttype; + } + + public Funding getFunding() { + return funding; + } + + public void setFunding(Funding funding) { + this.funding = funding; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecordHeader.java b/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecordHeader.java new file mode 100644 index 0000000..3de4dbd --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecordHeader.java @@ -0,0 +1,55 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class RelatedRecordHeader implements Serializable { + + private String relationType; + + private String relationClass; + + private String relatedIdentifier; + + private String relatedRecordType; + + public static RelatedRecordHeader newInstance(String relationType, String relationClass, String relatedIdentifier, String relatedRecordType) { + RelatedRecordHeader header = new RelatedRecordHeader(); + header.setRelationType(relationType); + header.setRelationClass(relationClass); + header.setRelatedIdentifier(relatedIdentifier); + header.setRelatedRecordType(relatedRecordType); + return header; + } + + public String getRelationType() { + return relationType; + } + + public void setRelationType(String relationType) { + this.relationType = relationType; + } + + public String getRelationClass() { + return relationClass; + } + + public void setRelationClass(String relationClass) { + this.relationClass = relationClass; + } + + public String getRelatedIdentifier() { + return relatedIdentifier; + } + + public void setRelatedIdentifier(String relatedIdentifier) { + this.relatedIdentifier = relatedIdentifier; + } + + public String getRelatedRecordType() { + return relatedRecordType; + } + + public void setRelatedRecordType(String relatedRecordType) { + this.relatedRecordType = relatedRecordType; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Result.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Result.java new file mode 100644 index 0000000..7b7c87d --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Result.java @@ -0,0 +1,161 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class Result implements Serializable { + + /** + * Type of the result: one of 'publication', 'dataset', 'software', 'other' (see also https://api.openaire.eu/vocabularies/dnet:result_typologies) + */ + private String resulttype; + + /** + * Authors of the result + */ + private List author; + + /** + * The Subject. + */ + private List subject; + + /** + * The result language + */ + private Language language; + + /** + * The list of countries associated to this result + */ + private List country; + + /** + * 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; + + /** + * Explanatory or alternative name by which a scientific result is known. + */ + private String subtitle; + + private List 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 + + /** + * The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource. + */ + private String publisher; + + /** + * Date when the embargo ends and this result turns Open Access + */ + private String embargoenddate; + + /** + * See definition of Dublin Core field dc:source + */ + private List source; + + private List format; + + /** + * Contributors for the result + */ + private List contributor; + + private List coverage; + + /** + * The openest of the access rights of this result. + */ + private BestAccessRight bestaccessright; + + /** + * The direct link to the full-text as collected from the data source + */ + private List fulltext; + + /** + * Journal has information about the conference or journal where the result has been presented or published + */ + private Journal journal; + + /** + * Only for results with type 'software': URL to the software documentation + */ + private List documentationUrl; // software + + /** + * Only for results with type 'software': the URL to the repository with the source code + */ + private String codeRepositoryUrl; // software + + /** + * Only for results with type 'software': the programming language + */ + private String programmingLanguage; // software + + /** + * Only for results with type 'software': Information on the person responsible for providing further information regarding the resource + */ + private List contactperson; // orp + + /** + * Only for results with type 'software': Information on the group responsible for providing further information regarding the resource + */ + private List contactgroup; // orp + + /** + * Only for results with type 'other': tool useful for the interpretation and/or re-used of the research product + */ + private List tool; // orp + + /** + * Only for results with type 'dataset': the declared size of the dataset + */ + private String size; // dataset + + /** + * Version of the result + */ + private String version; // dataset + + @JsonProperty("isGreen") + private Boolean isGreen; + + private OpenAccessColor openAccessColor; + + @JsonProperty("isInDiamondJournal") + private Boolean isInDiamondJournal; + + private Boolean publiclyFunded; + + private String transformativeAgreement; + + /** + * 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; + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecord.java b/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecord.java new file mode 100644 index 0000000..167b7e5 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecord.java @@ -0,0 +1,41 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class SolrRecord implements Serializable { + + private SolrRecordHeader header; + + private List collectedfrom; + + /** + * List of persistent identifiers + */ + private List pid; + + private List context; + + /** + * EOSC Interoperability Framework Guidelines + */ + private List eoscifguidelines; + + private List measures; + + + private List extraInfo; + + + private Result result; + + private Datasource datasource; + + private Project project; + + private Organization organization; + + private List links; + + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecordHeader.java b/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecordHeader.java new file mode 100644 index 0000000..9d1a65e --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecordHeader.java @@ -0,0 +1,40 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; +import java.util.List; + +public class SolrRecordHeader implements Serializable { + + /** + * The OpenAIRE identifiers for this record + */ + private String id; + + /** + * Identifiers of the record at the original sources + */ + private List originalId; + + public static SolrRecordHeader newInstance(String id, List originalId) { + SolrRecordHeader header = new SolrRecordHeader(); + header.setId(id); + header.setOriginalId(originalId); + return header; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public List getOriginalId() { + return originalId; + } + + public void setOriginalId(List originalId) { + this.originalId = originalId; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Subject.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Subject.java new file mode 100644 index 0000000..2f380ad --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Subject.java @@ -0,0 +1,26 @@ +package eu.dnetlib.dhp.schema.solr; + +import java.io.Serializable; + +public class Subject implements Serializable { + + private String value; + + private String type; + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } +}