WIP: defining model classes used to store the json payload in the Solr documents

This commit is contained in:
Claudio Atzori 2024-03-01 12:26:58 +01:00
parent 6b3165bec2
commit f6745a9d30
33 changed files with 2351 additions and 4 deletions

View File

@ -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.

View File

@ -5,7 +5,7 @@
<groupId>eu.dnetlib.dhp</groupId>
<artifactId>dhp-schemas</artifactId>
<packaging>jar</packaging>
<version>5.17.4-SNAPSHOT</version>
<version>6.0.0-SNAPSHOT</version>
<licenses>
<license>

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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> 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<Concept> getConcept() {
return concept;
}
public void setConcept(List<Concept> concept) {
this.concept = concept;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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> category;
private Context newInstance(String id, String label, String type, List<Category> 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<Category> getCategory() {
return category;
}
public void setCategory(List<Category> category) {
this.category = category;
}
}

View File

@ -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;
}
}

View File

@ -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<Subject> subjects;
private String odnumberofitems;
private String odnumberofitemsdate;
private String odpolicies;
private List<String> odlanguages;
private List<String> languages;
private List<String> odcontenttypes;
private List<String> 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<CodeLabel> policies;
private Journal journal;
// New field for EOSC
private List<String> researchentitytypes;
// New field for EOSC
private List<String> providedproducttypes;
// New field for EOSC
private CodeLabel jurisdiction;
// New field for EOSC
private Boolean thematic;
// New field for EOSC
private List<CodeLabel> contentpolicies;
private String submissionpolicyurl;
private String preservationpolicyurl;
private List<String> researchproductaccesspolicies;
private List<String> 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<Subject> getSubjects() {
return subjects;
}
public void setSubjects(List<Subject> 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<String> getOdlanguages() {
return odlanguages;
}
public void setOdlanguages(List<String> odlanguages) {
this.odlanguages = odlanguages;
}
public List<String> getLanguages() {
return languages;
}
public void setLanguages(List<String> languages) {
this.languages = languages;
}
public List<String> getOdcontenttypes() {
return odcontenttypes;
}
public void setOdcontenttypes(List<String> odcontenttypes) {
this.odcontenttypes = odcontenttypes;
}
public List<String> getAccessinfopackage() {
return accessinfopackage;
}
public void setAccessinfopackage(List<String> 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<CodeLabel> getPolicies() {
return policies;
}
public void setPolicies(List<CodeLabel> policies) {
this.policies = policies;
}
public Journal getJournal() {
return journal;
}
public void setJournal(Journal journal) {
this.journal = journal;
}
public List<String> getResearchentitytypes() {
return researchentitytypes;
}
public void setResearchentitytypes(List<String> researchentitytypes) {
this.researchentitytypes = researchentitytypes;
}
public List<String> getProvidedproducttypes() {
return providedproducttypes;
}
public void setProvidedproducttypes(List<String> 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<CodeLabel> getContentpolicies() {
return contentpolicies;
}
public void setContentpolicies(List<CodeLabel> 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() {
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;
}
}

View File

@ -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;
}
}

View File

@ -0,0 +1,6 @@
package eu.dnetlib.dhp.schema.solr;
import java.io.Serializable;
public class ExtraInfo implements Serializable {
}

View File

@ -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> pid;
public static Funder newInstance(String id, String shortname, String name, Country jurisdiction, List<Pid> 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<Pid> getPid() {
return pid;
}
public void setPid(List<Pid> pid) {
this.pid = pid;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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<String> url;
// other research products specifc
private String distributionlocation;
private Provenance collectedfrom;
private List<Pid> pid;
private List<Pid> 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<Measure> measures;
/**
* Direct fulltext URL.
*/
private String fulltext;
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -0,0 +1,8 @@
package eu.dnetlib.dhp.schema.solr;
import java.io.Serializable;
public class Measure implements Serializable {
//TODO define me!
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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<String> 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<String> getAlternativeNames() {
return alternativeNames;
}
public void setAlternativeNames(List<String> 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;
}
}

View File

@ -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;
}
}

View File

@ -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<Subject> 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<Subject> getSubjects() {
return subjects;
}
public void setSubjects(List<Subject> 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;
}
}

View File

@ -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;
}
}

View File

@ -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> pid;
private String codeRepositoryUrl;
private String resulttype;
private List<Provenance> collectedfrom;
private List<Instance> 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<Pid> getPid() {
return pid;
}
public void setPid(List<Pid> 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<Provenance> getCollectedfrom() {
return collectedfrom;
}
public void setCollectedfrom(List<Provenance> collectedfrom) {
this.collectedfrom = collectedfrom;
}
public List<Instance> getInstances() {
return instances;
}
public void setInstances(List<Instance> 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;
}
}

View File

@ -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;
}
}

View File

@ -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> author;
/**
* The Subject.
*/
private List<Subject> subject;
/**
* The result language
*/
private Language language;
/**
* The list of countries associated to this result
*/
private List<Country> 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<String> description;
/**
* Main date of the research product: typically the publication or issued date. In case of a research result with
* different versions with different dates, the date of the result is selected as the most frequent well-formatted date.
* If not available, then the most recent and complete date among those that are well-formatted.
* For statistics, the year is extracted and the result is counted only among the result of that year.
* Example:
* Pre-print date: 2019-02-03,
* Article date provided by repository: 2020-02,
* Article date provided by Crossref: 2020,
* OpenAIRE will set as date 2019-02-03, because its the most recent among the complete and well-formed dates.
* If then the repository updates the metadata and set a complete date (e.g. 2020-02-12), then this will be the new
* date for the result because it becomes the most recent most complete date.
* However, if OpenAIRE then collects the pre-print from another repository with date 2019-02-03, then this will be
* the winning date because it becomes the most frequent well-formatted date.
*/
private String publicationdate; // dateofacceptance
/**
* 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<String> source;
private List<String> format;
/**
* Contributors for the result
*/
private List<String> contributor;
private List<String> 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<String> 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<String> 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<String> contactperson; // orp
/**
* Only for results with type 'software': Information on the group responsible for providing further information regarding the resource
*/
private List<String> contactgroup; // orp
/**
* Only for results with type 'other': tool useful for the interpretation and/or re-used of the research product
*/
private List<String> 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> instance;
}

View File

@ -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<Provenance> collectedfrom;
/**
* List of persistent identifiers
*/
private List<Pid> pid;
private List<Context> context;
/**
* EOSC Interoperability Framework Guidelines
*/
private List<EoscIfGuidelines> eoscifguidelines;
private List<Measure> measures;
private List<ExtraInfo> extraInfo;
private Result result;
private Datasource datasource;
private Project project;
private Organization organization;
private List<RelatedRecord> links;
}

View File

@ -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<String> originalId;
public static SolrRecordHeader newInstance(String id, List<String> 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<String> getOriginalId() {
return originalId;
}
public void setOriginalId(List<String> originalId) {
this.originalId = originalId;
}
}

View File

@ -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;
}
}