Compare commits
51 Commits
person_ent
...
master
Author | SHA1 | Date |
---|---|---|
Claudio Atzori | 7f884efba8 | |
Claudio Atzori | 0278f8e108 | |
Claudio Atzori | 36320a0c08 | |
Claudio Atzori | 63c667a951 | |
Claudio Atzori | a858c0c457 | |
Claudio Atzori | f14bd003b0 | |
Claudio Atzori | 846aea468e | |
Claudio Atzori | e8c256ed7b | |
Claudio Atzori | bb973563aa | |
Claudio Atzori | 58c601171f | |
Claudio Atzori | e89828babe | |
Claudio Atzori | cee2e8e6cd | |
Claudio Atzori | a4788db18b | |
Claudio Atzori | db7b8184a3 | |
Claudio Atzori | f70e95ff56 | |
Claudio Atzori | e7c0a05548 | |
Claudio Atzori | df5c224b8a | |
Claudio Atzori | f0665c475c | |
Claudio Atzori | bd93479688 | |
Claudio Atzori | 842542a41c | |
Claudio Atzori | 43ecf83c04 | |
Claudio Atzori | a24da6de30 | |
Claudio Atzori | c82a007217 | |
Claudio Atzori | 330794f12c | |
Claudio Atzori | 1ae0a39aa0 | |
Claudio Atzori | f872a24c96 | |
Claudio Atzori | a40552fb94 | |
Claudio Atzori | d0b310c1f4 | |
Claudio Atzori | caebb5e661 | |
Claudio Atzori | c43362bc6d | |
Claudio Atzori | eee23553bd | |
Claudio Atzori | 161dc0141f | |
Claudio Atzori | c6e77902d5 | |
Claudio Atzori | c45a6dbba7 | |
Claudio Atzori | 0340fafb56 | |
Claudio Atzori | 9ad61e70fa | |
Claudio Atzori | 14365d7ea2 | |
Claudio Atzori | 0b3ae130e2 | |
Claudio Atzori | dc20c3b54c | |
Claudio Atzori | f8f5381221 | |
Claudio Atzori | 02abe33b46 | |
Claudio Atzori | 8c2665a706 | |
Claudio Atzori | 06db0239cf | |
Claudio Atzori | fd6ec5e58f | |
Claudio Atzori | 9d296a48c6 | |
Claudio Atzori | fbfc413d85 | |
Claudio Atzori | 40c20d9e33 | |
Claudio Atzori | 81fda4a9b8 | |
Claudio Atzori | 1c66476cb9 | |
Claudio Atzori | ec1f471eb1 | |
Claudio Atzori | a6bc90b90e |
|
@ -4,7 +4,13 @@
|
|||
|
||||
| **Version** | **Changes** | **Readiness** |
|
||||
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
|
||||
| 7.0.0 | [Graph model] </br> <ul><li>Introduced Person entity and its relations: authorship, coauthorship, affiliation</li><li>Updated Solr JSON payload model classes</li></ul> | beta |
|
||||
| 10.0.2 | [Graph model] </br><ul><li>Added `RawAuthorAffiliation` to represent the raw author affiliation strings and optionally the organization PIDs associated with them</li></ul> | beta |
|
||||
| 10.0.1 | [Solr model] </br> <ul><li>Improved mapping robustness</li></ul></br> | beta |
|
||||
| 10.0.0 | [Solr model] </br> <ul><li>Auhtor name in the Solr payload's related record</li></ul></br> | beta |
|
||||
| 9.0.0 | [Graph model] </br> <ul><li>added OafEntity.mergedIds</li><li>added Result.bestInstanceType</li></ul></br>[Solr model]</br> <ul><li>added Result.bestInstanceType</li><li>added RelatedRecord.description</li><li>added RelatedRecord.author[]</li></ul></br> | beta |
|
||||
| 8.0.1 | [Solr model] </br> <ul><li>using string to represent PersonTopic.(fromYear/toYear)</li></ul> | production |
|
||||
| 8.0.0 | [Graph model] </br> <ul><li>Renamed `Result.author.affiliation` to `rawAffiliationString`. Updated Solr JSON payload model classes</li></ul> | production |
|
||||
| 7.0.0 | [Graph model] </br> <ul><li>Introduced Person entity and its relations: authorship, coauthorship, affiliation</li><li>Updated Solr JSON payload model classes</li></ul> | production |
|
||||
| 6.1.3 | [Graph model] </br> <ul><li>Updated Solr JSON payload model classes</li></ul> | production |
|
||||
| 6.1.1 | [Graph model] </br> <ul><li>Introduced constants used in the DOIBoost dismission.</li></ul> | production |
|
||||
| 6.1.0 | [Graph model] </br> <ul><li>Introduced model classes to provide a JSON representation of records embedding information from the related entities.</li></ul> | production |
|
||||
|
|
12
pom.xml
12
pom.xml
|
@ -5,7 +5,7 @@
|
|||
<groupId>eu.dnetlib.dhp</groupId>
|
||||
<artifactId>dhp-schemas</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>7.0.1-SNAPSHOT</version>
|
||||
<version>10.0.3-SNAPSHOT</version>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
|
@ -32,8 +32,8 @@
|
|||
<connection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</connection>
|
||||
<developerConnection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</developerConnection>
|
||||
<url>https://code-repo.d4science.org/D-Net/dhp-schemas/</url>
|
||||
<tag>dhp-schemas-2.10.30</tag>
|
||||
</scm>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<description>This module contains common schema classes meant to be used across the dnet-hadoop submodules</description>
|
||||
|
||||
|
@ -430,6 +430,12 @@
|
|||
<dependency>
|
||||
<groupId>com.github.sisyphsu</groupId>
|
||||
<artifactId>dateparser</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>lombok</artifactId>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.util.*;
|
|||
public class Author implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1625492739044457437L;
|
||||
|
||||
private String fullname;
|
||||
|
||||
private String name;
|
||||
|
@ -18,7 +19,7 @@ public class Author implements Serializable {
|
|||
|
||||
private List<StructuredProperty> pid;
|
||||
|
||||
private List<Field<String>> affiliation;
|
||||
private List<RawAuthorAffiliation> rawAffiliationString;
|
||||
|
||||
public String getFullname() {
|
||||
return fullname;
|
||||
|
@ -60,12 +61,11 @@ public class Author implements Serializable {
|
|||
this.pid = pid;
|
||||
}
|
||||
|
||||
public List<Field<String>> getAffiliation() {
|
||||
return affiliation;
|
||||
public List<RawAuthorAffiliation> getRawAffiliationString() {
|
||||
return rawAffiliationString;
|
||||
}
|
||||
|
||||
public void setAffiliation(List<Field<String>> affiliation) {
|
||||
this.affiliation = affiliation;
|
||||
public void setRawAffiliationString(List<RawAuthorAffiliation> rawAffiliationString) {
|
||||
this.rawAffiliationString = rawAffiliationString;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,6 +10,11 @@ public abstract class OafEntity extends Oaf implements Serializable {
|
|||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* MergedIds contains the list of the OpenAIRE IDs of the records merged into this one.
|
||||
*/
|
||||
private List<String> mergedIds;
|
||||
|
||||
private List<String> originalId;
|
||||
|
||||
private List<StructuredProperty> pid;
|
||||
|
@ -80,6 +85,14 @@ public abstract class OafEntity extends Oaf implements Serializable {
|
|||
return originalId;
|
||||
}
|
||||
|
||||
public List<String> getMergedIds() {
|
||||
return mergedIds;
|
||||
}
|
||||
|
||||
public void setMergedIds(List<String> mergedIds) {
|
||||
this.mergedIds = mergedIds;
|
||||
}
|
||||
|
||||
public void setOriginalId(List<String> originalId) {
|
||||
this.originalId = originalId;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Year;
|
||||
|
||||
public class PersonTopic implements Serializable {
|
||||
|
||||
|
@ -11,9 +10,9 @@ public class PersonTopic implements Serializable {
|
|||
|
||||
private String schema;
|
||||
|
||||
private Year fromYear;
|
||||
private String fromYear;
|
||||
|
||||
private Year toYear;
|
||||
private String toYear;
|
||||
|
||||
public PersonTopic() {
|
||||
}
|
||||
|
@ -34,19 +33,19 @@ public class PersonTopic implements Serializable {
|
|||
this.schema = schema;
|
||||
}
|
||||
|
||||
public Year getFromYear() {
|
||||
public String getFromYear() {
|
||||
return fromYear;
|
||||
}
|
||||
|
||||
public void setFromYear(Year fromYear) {
|
||||
public void setFromYear(String fromYear) {
|
||||
this.fromYear = fromYear;
|
||||
}
|
||||
|
||||
public Year getToYear() {
|
||||
public String getToYear() {
|
||||
return toYear;
|
||||
}
|
||||
|
||||
public void setToYear(Year toYear) {
|
||||
public void setToYear(String toYear) {
|
||||
this.toYear = toYear;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Pid implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 8927505521598533507L;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class RawAuthorAffiliation implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4248069698947092558L;
|
||||
|
||||
private String rawAffiliationString;
|
||||
|
||||
private List<Pid> pids;
|
||||
|
||||
public String getRawAffiliationString() {
|
||||
return rawAffiliationString;
|
||||
}
|
||||
|
||||
public void setRawAffiliationString(String rawAffiliationString) {
|
||||
this.rawAffiliationString = rawAffiliationString;
|
||||
}
|
||||
|
||||
public List<Pid> getPids() {
|
||||
return pids;
|
||||
}
|
||||
|
||||
public void setPids(List<Pid> pids) {
|
||||
this.pids = pids;
|
||||
}
|
||||
}
|
||||
|
|
@ -125,6 +125,11 @@ public class Result extends OafEntity implements Serializable {
|
|||
*/
|
||||
private List<ExternalReference> externalReference;
|
||||
|
||||
/**
|
||||
* The most representative instanceType among the instances.
|
||||
*/
|
||||
private Qualifier bestInstancetype;
|
||||
|
||||
/**
|
||||
* The Instance.
|
||||
*/
|
||||
|
@ -521,6 +526,14 @@ public class Result extends OafEntity implements Serializable {
|
|||
this.externalReference = externalReference;
|
||||
}
|
||||
|
||||
public Qualifier getBestInstancetype() {
|
||||
return bestInstancetype;
|
||||
}
|
||||
|
||||
public void setBestInstancetype(Qualifier bestInstancetype) {
|
||||
this.bestInstancetype = bestInstancetype;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets instance.
|
||||
*
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
package eu.dnetlib.dhp.schema.orcid;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
/**
|
||||
* This class models the data that are retrieved from orcid publication
|
||||
*/
|
||||
|
@ -65,7 +64,7 @@ public class AuthorData implements Serializable {
|
|||
|
||||
public void setOtherNames(List<String> otherNames) {
|
||||
if (this.otherNames == null) {
|
||||
this.otherNames = Lists.newArrayList();
|
||||
this.otherNames = new ArrayList<>();
|
||||
}
|
||||
this.otherNames = otherNames;
|
||||
}
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
package eu.dnetlib.dhp.schema.solr;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
public class Category implements Serializable {
|
||||
|
||||
private String id;
|
||||
private String label;
|
||||
private List<Concept> concept = Lists.newArrayList();
|
||||
private List<Concept> concept = new ArrayList<>();
|
||||
|
||||
public static Category newInstance(String id, String label) {
|
||||
Category category = new Category();
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
package eu.dnetlib.dhp.schema.solr;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
public class Context implements Serializable {
|
||||
|
||||
private String id;
|
||||
private String label;
|
||||
private String type;
|
||||
private List<Category> category = Lists.newArrayList();
|
||||
private List<Category> category = new ArrayList<>();
|
||||
|
||||
public static Context newInstance(String id, String label, String type, List<Category> category) {
|
||||
Context context = new Context();
|
||||
|
|
|
@ -11,11 +11,11 @@ public class PersonTopic implements Serializable {
|
|||
|
||||
private String schema;
|
||||
|
||||
private Year fromYear;
|
||||
private String fromYear;
|
||||
|
||||
private Year toYear;
|
||||
private String toYear;
|
||||
|
||||
public static PersonTopic newInstance(String value, String schema, Year fromYear, Year toYear) {
|
||||
public static PersonTopic newInstance(String value, String schema, String fromYear, String toYear) {
|
||||
final PersonTopic personTopic = new PersonTopic();
|
||||
personTopic.setValue(value);
|
||||
personTopic.setSchema(schema);
|
||||
|
@ -43,19 +43,19 @@ public class PersonTopic implements Serializable {
|
|||
this.schema = schema;
|
||||
}
|
||||
|
||||
public Year getFromYear() {
|
||||
public String getFromYear() {
|
||||
return fromYear;
|
||||
}
|
||||
|
||||
public void setFromYear(Year fromYear) {
|
||||
public void setFromYear(String fromYear) {
|
||||
this.fromYear = fromYear;
|
||||
}
|
||||
|
||||
public Year getToYear() {
|
||||
public String getToYear() {
|
||||
return toYear;
|
||||
}
|
||||
|
||||
public void setToYear(Year toYear) {
|
||||
public void setToYear(String toYear) {
|
||||
this.toYear = toYear;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,29 @@
|
|||
package eu.dnetlib.dhp.schema.solr;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
|
||||
public enum RecordType implements Serializable {
|
||||
publication,
|
||||
dataset,
|
||||
otherresearchproduct,
|
||||
other,
|
||||
software,
|
||||
datasource,
|
||||
organization,
|
||||
project,
|
||||
person;
|
||||
|
||||
@JsonCreator
|
||||
public static RecordType fromString(String s) {
|
||||
if (Objects.isNull(s)) {
|
||||
return null;
|
||||
}
|
||||
if ("otherresearchproduct".equalsIgnoreCase(s)) {
|
||||
return other;
|
||||
}
|
||||
return valueOf(s);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,14 +12,16 @@ public class RelatedRecord implements Serializable {
|
|||
// common fields
|
||||
private String title;
|
||||
private String websiteurl; // datasource, organizations, projects
|
||||
private List<Pid> pid;
|
||||
private List<Provenance> collectedfrom;
|
||||
|
||||
// results
|
||||
private List<String> author;
|
||||
private String description;
|
||||
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
|
||||
|
@ -41,6 +43,10 @@ public class RelatedRecord implements Serializable {
|
|||
private Funding funding;
|
||||
private String validationDate;
|
||||
|
||||
// person
|
||||
private String givenName;
|
||||
private String familyName;
|
||||
|
||||
public RelatedRecordHeader getHeader() {
|
||||
return header;
|
||||
}
|
||||
|
@ -57,6 +63,22 @@ public class RelatedRecord implements Serializable {
|
|||
this.title = title;
|
||||
}
|
||||
|
||||
public List<String> getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public void setAuthor(List<String> author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getWebsiteurl() {
|
||||
return websiteurl;
|
||||
}
|
||||
|
@ -224,4 +246,20 @@ public class RelatedRecord implements Serializable {
|
|||
public void setValidationDate(String validationDate) {
|
||||
this.validationDate = validationDate;
|
||||
}
|
||||
|
||||
public String getGivenName() {
|
||||
return givenName;
|
||||
}
|
||||
|
||||
public void setGivenName(String givenName) {
|
||||
this.givenName = givenName;
|
||||
}
|
||||
|
||||
public String getFamilyName() {
|
||||
return familyName;
|
||||
}
|
||||
|
||||
public void setFamilyName(String familyName) {
|
||||
this.familyName = familyName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,9 @@ 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)
|
||||
* This field is deprecated. See eu.dnetlib.dhp.schema.solr.SolrRecordHeader.RecordType
|
||||
*/
|
||||
@Deprecated
|
||||
private String resulttype;
|
||||
|
||||
/**
|
||||
|
@ -157,16 +159,24 @@ public class Result implements Serializable {
|
|||
|
||||
private List<ExternalReference> externalReference;
|
||||
|
||||
private String bestinstancetype;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* This field is deprecated. See eu.dnetlib.dhp.schema.solr.SolrRecordHeader.RecordType
|
||||
* @return resulttype
|
||||
*/
|
||||
@Deprecated
|
||||
public String getResulttype() {
|
||||
return resulttype;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setResulttype(String resulttype) {
|
||||
this.resulttype = resulttype;
|
||||
}
|
||||
|
@ -427,6 +437,14 @@ public class Result implements Serializable {
|
|||
this.externalReference = externalReference;
|
||||
}
|
||||
|
||||
public String getBestinstancetype() {
|
||||
return bestinstancetype;
|
||||
}
|
||||
|
||||
public void setBestinstancetype(String bestinstancetype) {
|
||||
this.bestinstancetype = bestinstancetype;
|
||||
}
|
||||
|
||||
public List<Instance> getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue