Compare commits

..

No commits in common. "master" and "person_entity" have entirely different histories.

15 changed files with 36 additions and 199 deletions

View File

@ -4,13 +4,7 @@
| **Version** | **Changes** | **Readiness** |
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
| 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 |
| 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 |
| 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
View File

@ -5,7 +5,7 @@
<groupId>eu.dnetlib.dhp</groupId>
<artifactId>dhp-schemas</artifactId>
<packaging>jar</packaging>
<version>10.0.3-SNAPSHOT</version>
<version>7.0.1-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>HEAD</tag>
</scm>
<tag>dhp-schemas-2.10.30</tag>
</scm>
<description>This module contains common schema classes meant to be used across the dnet-hadoop submodules</description>
@ -430,12 +430,6 @@
<dependency>
<groupId>com.github.sisyphsu</groupId>
<artifactId>dateparser</artifactId>
<exclusions>
<exclusion>
<artifactId>lombok</artifactId>
<groupId>org.projectlombok</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>

View File

@ -7,7 +7,6 @@ import java.util.*;
public class Author implements Serializable {
private static final long serialVersionUID = 1625492739044457437L;
private String fullname;
private String name;
@ -19,7 +18,7 @@ public class Author implements Serializable {
private List<StructuredProperty> pid;
private List<RawAuthorAffiliation> rawAffiliationString;
private List<Field<String>> affiliation;
public String getFullname() {
return fullname;
@ -61,11 +60,12 @@ public class Author implements Serializable {
this.pid = pid;
}
public List<RawAuthorAffiliation> getRawAffiliationString() {
return rawAffiliationString;
public List<Field<String>> getAffiliation() {
return affiliation;
}
public void setRawAffiliationString(List<RawAuthorAffiliation> rawAffiliationString) {
this.rawAffiliationString = rawAffiliationString;
public void setAffiliation(List<Field<String>> affiliation) {
this.affiliation = affiliation;
}
}

View File

@ -10,11 +10,6 @@ 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;
@ -85,14 +80,6 @@ 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;
}

View File

@ -1,6 +1,7 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.time.Year;
public class PersonTopic implements Serializable {
@ -10,9 +11,9 @@ public class PersonTopic implements Serializable {
private String schema;
private String fromYear;
private Year fromYear;
private String toYear;
private Year toYear;
public PersonTopic() {
}
@ -33,19 +34,19 @@ public class PersonTopic implements Serializable {
this.schema = schema;
}
public String getFromYear() {
public Year getFromYear() {
return fromYear;
}
public void setFromYear(String fromYear) {
public void setFromYear(Year fromYear) {
this.fromYear = fromYear;
}
public String getToYear() {
public Year getToYear() {
return toYear;
}
public void setToYear(String toYear) {
public void setToYear(Year toYear) {
this.toYear = toYear;
}
}

View File

@ -1,29 +0,0 @@
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;
}
}

View File

@ -1,30 +0,0 @@
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;
}
}

View File

@ -125,11 +125,6 @@ public class Result extends OafEntity implements Serializable {
*/
private List<ExternalReference> externalReference;
/**
* The most representative instanceType among the instances.
*/
private Qualifier bestInstancetype;
/**
* The Instance.
*/
@ -526,14 +521,6 @@ 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.
*

View File

@ -2,9 +2,10 @@
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
*/
@ -64,7 +65,7 @@ public class AuthorData implements Serializable {
public void setOtherNames(List<String> otherNames) {
if (this.otherNames == null) {
this.otherNames = new ArrayList<>();
this.otherNames = Lists.newArrayList();
}
this.otherNames = otherNames;
}

View File

@ -1,14 +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 Category implements Serializable {
private String id;
private String label;
private List<Concept> concept = new ArrayList<>();
private List<Concept> concept = Lists.newArrayList();
public static Category newInstance(String id, String label) {
Category category = new Category();

View File

@ -1,15 +1,16 @@
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 = new ArrayList<>();
private List<Category> category = Lists.newArrayList();
public static Context newInstance(String id, String label, String type, List<Category> category) {
Context context = new Context();

View File

@ -11,11 +11,11 @@ public class PersonTopic implements Serializable {
private String schema;
private String fromYear;
private Year fromYear;
private String toYear;
private Year toYear;
public static PersonTopic newInstance(String value, String schema, String fromYear, String toYear) {
public static PersonTopic newInstance(String value, String schema, Year fromYear, Year 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 String getFromYear() {
public Year getFromYear() {
return fromYear;
}
public void setFromYear(String fromYear) {
public void setFromYear(Year fromYear) {
this.fromYear = fromYear;
}
public String getToYear() {
public Year getToYear() {
return toYear;
}
public void setToYear(String toYear) {
public void setToYear(Year toYear) {
this.toYear = toYear;
}
}

View File

@ -1,29 +1,15 @@
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,
other,
otherresearchproduct,
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);
}
}

View File

@ -12,16 +12,14 @@ 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
@ -43,10 +41,6 @@ public class RelatedRecord implements Serializable {
private Funding funding;
private String validationDate;
// person
private String givenName;
private String familyName;
public RelatedRecordHeader getHeader() {
return header;
}
@ -63,22 +57,6 @@ 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;
}
@ -246,20 +224,4 @@ 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;
}
}

View File

@ -9,9 +9,7 @@ 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;
/**
@ -159,24 +157,16 @@ 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;
}
@ -437,14 +427,6 @@ 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;
}