Compare commits

..

51 Commits

Author SHA1 Message Date
Claudio Atzori 7f884efba8 [maven-release-plugin] prepare for next development iteration 2024-12-20 10:47:03 +01:00
Claudio Atzori 0278f8e108 [maven-release-plugin] prepare release dhp-schemas-10.0.2 2024-12-20 10:46:56 +01:00
Claudio Atzori 36320a0c08 Merge pull request 'Preparing release 10.0.2' (#42) from raw_author_affiliations into master
Reviewed-on: #42
2024-12-20 10:46:22 +01:00
Claudio Atzori 63c667a951 Preparing release 10.0.2
[Graph model]
- Added RawAuthorAffiliation to represent the raw author affiliation strings and optionally the organization PIDs associated with them
2024-12-20 10:44:57 +01:00
Claudio Atzori a858c0c457 [maven-release-plugin] prepare for next development iteration 2024-12-09 16:27:29 +01:00
Claudio Atzori f14bd003b0 [maven-release-plugin] prepare release dhp-schemas-10.0.1 2024-12-09 16:27:23 +01:00
Claudio Atzori 846aea468e [maven-release-plugin] rollback the release of dhp-schemas-10.0.1 2024-12-09 16:18:01 +01:00
Claudio Atzori e8c256ed7b [maven-release-plugin] prepare for next development iteration 2024-12-09 16:14:54 +01:00
Claudio Atzori bb973563aa updated changelog 2024-12-09 16:11:17 +01:00
Claudio Atzori 58c601171f excluding project lombok from the dependencies, allow to deserialize solr.RecordType from 'otherresearchproduct' 2024-12-09 16:09:23 +01:00
Claudio Atzori e89828babe [maven-release-plugin] prepare for next development iteration 2024-11-20 15:39:22 +01:00
Claudio Atzori cee2e8e6cd [maven-release-plugin] prepare release dhp-schemas-10.0.0 2024-11-20 15:39:19 +01:00
Claudio Atzori a4788db18b Merge pull request 'Auhtor name in the Solr payload's related record' (#41) from solr_payload_relatedrecord into master
Reviewed-on: #41
2024-11-20 15:38:49 +01:00
Claudio Atzori db7b8184a3 updated changelog 2024-11-20 15:38:30 +01:00
Claudio Atzori f70e95ff56 bumped pom version 2024-11-20 15:36:53 +01:00
Claudio Atzori e7c0a05548 Merge branch 'solr_payload_relatedrecord' of https://code-repo.d4science.org/D-Net/dhp-schemas into solr_payload_relatedrecord 2024-11-20 15:35:39 +01:00
Claudio Atzori df5c224b8a added given name and family name among the properties describing a related record in solr 2024-11-20 15:35:21 +01:00
Claudio Atzori f0665c475c added given name and family name among the properteis describing a related record in solr 2024-11-20 15:34:05 +01:00
Claudio Atzori bd93479688 [maven-release-plugin] prepare for next development iteration 2024-10-28 10:40:13 +01:00
Claudio Atzori 842542a41c [maven-release-plugin] prepare release dhp-schemas-9.0.0 2024-10-28 10:40:09 +01:00
Claudio Atzori 43ecf83c04 method accessibiliy 2024-10-28 10:39:49 +01:00
Claudio Atzori a24da6de30 [maven-release-plugin] prepare for next development iteration 2024-10-28 10:34:14 +01:00
Claudio Atzori c82a007217 [maven-release-plugin] prepare release dhp-schemas-9.0.0 2024-10-28 10:34:11 +01:00
Claudio Atzori 330794f12c RecordType resolves 'otherresearchproduct' to 'other' 2024-10-28 10:30:39 +01:00
Claudio Atzori 1ae0a39aa0 [maven-release-plugin] prepare for next development iteration 2024-10-28 10:13:57 +01:00
Claudio Atzori f872a24c96 [maven-release-plugin] prepare release dhp-schemas-9.0.0 2024-10-28 10:13:54 +01:00
Claudio Atzori a40552fb94 Renamed RecordType. to . Deprecated Result.resulttype 2024-10-28 10:10:41 +01:00
Claudio Atzori d0b310c1f4 [maven-release-plugin] prepare for next development iteration 2024-10-25 13:03:44 +02:00
Claudio Atzori caebb5e661 [maven-release-plugin] prepare release dhp-schemas-9.0.0 2024-10-25 13:03:40 +02:00
Claudio Atzori c43362bc6d [Solr Model] simplified author details 2024-10-25 13:03:18 +02:00
Claudio Atzori eee23553bd [maven-release-plugin] prepare for next development iteration 2024-10-25 12:27:35 +02:00
Claudio Atzori 161dc0141f [maven-release-plugin] prepare release dhp-schemas-9.0.0 2024-10-25 12:27:31 +02:00
Claudio Atzori c6e77902d5 Preparing release 9.0.0
[Graph model]
- added OafEntity.mergedIds
- added Result.bestInstanceType

[Solr model]
- added Result.bestInstanceType
- added RelatedRecord.description
- added RelatedRecord.author[]
2024-10-25 12:25:36 +02:00
Claudio Atzori c45a6dbba7 [maven-release-plugin] prepare for next development iteration 2024-10-08 16:21:23 +02:00
Claudio Atzori 0340fafb56 [maven-release-plugin] prepare release dhp-schemas-8.0.1 2024-10-08 16:21:19 +02:00
Claudio Atzori 9ad61e70fa using string to represent PersonTopic.(fromYear|toYear) 2024-10-08 16:20:55 +02:00
Claudio Atzori 14365d7ea2 [maven-release-plugin] prepare for next development iteration 2024-09-24 11:17:01 +02:00
Claudio Atzori 0b3ae130e2 [maven-release-plugin] prepare release dhp-schemas-8.0.0 2024-09-24 11:16:58 +02:00
Claudio Atzori dc20c3b54c Merge pull request 'raw affiliation string' (#40) from raw_affiliations into master
Reviewed-on: #40
2024-09-24 11:16:33 +02:00
Claudio Atzori f8f5381221 Renamed to 2024-09-24 11:14:00 +02:00
Claudio Atzori 02abe33b46 updated solr.Person model, using string to model the Year field. 2024-09-24 11:03:45 +02:00
Claudio Atzori 8c2665a706 [maven-release-plugin] prepare for next development iteration 2024-07-31 10:28:35 +02:00
Claudio Atzori 06db0239cf [maven-release-plugin] prepare release dhp-schemas-7.0.2 2024-07-31 10:28:32 +02:00
Claudio Atzori fd6ec5e58f Person entity: use int instead of java.time.Year as this is susceptible to errors in spark 2024-07-31 10:27:58 +02:00
Claudio Atzori 9d296a48c6 [maven-release-plugin] prepare for next development iteration 2024-07-29 10:56:20 +02:00
Claudio Atzori fbfc413d85 [maven-release-plugin] prepare release dhp-schemas-7.0.1 2024-07-29 10:56:16 +02:00
Claudio Atzori 40c20d9e33 Merge pull request 'Person entity model refinements' (#39) from person_entity into master
Reviewed-on: #39
2024-07-29 10:55:23 +02:00
Claudio Atzori 81fda4a9b8 [maven-release-plugin] prepare for next development iteration 2024-07-17 11:52:19 +02:00
Claudio Atzori 1c66476cb9 [maven-release-plugin] prepare release dhp-schemas-7.0.0 2024-07-17 11:52:15 +02:00
Claudio Atzori ec1f471eb1 bumped version to 7.0.0 2024-07-17 11:51:51 +02:00
Claudio Atzori a6bc90b90e Merge pull request 'Person entity' (#37) from person_entity into master
Reviewed-on: #37
2024-07-17 11:50:38 +02:00
15 changed files with 199 additions and 36 deletions

View File

@ -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
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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();

View File

@ -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();

View File

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

View File

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

View File

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

View File

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