From 32bcdcb1c08a4d97c602224776a72587a6b4382a Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Fri, 6 Aug 2021 14:31:35 +0200 Subject: [PATCH 001/146] added extention to the schema for the relation validated by funder --- .../schema/dump/oaf/community/Project.java | 10 ++++++ .../schema/dump/oaf/community/Validated.java | 32 +++++++++++++++++++ .../dhp/schema/dump/oaf/graph/Relation.java | 18 +++++++++++ 3 files changed, 60 insertions(+) create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Validated.java diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Project.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Project.java index 030b565..cdbd0e0 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Project.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Project.java @@ -19,6 +19,16 @@ public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project { private Provenance provenance; + private Validated validated; + + public void setValidated(Validated validated){ + this.validated = validated; + } + + public Validated getValidated(){ + return validated; + } + public Provenance getProvenance() { return provenance; } diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Validated.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Validated.java new file mode 100644 index 0000000..073dd3f --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Validated.java @@ -0,0 +1,32 @@ + +package eu.dnetlib.dhp.schema.dump.oaf.community; + +import java.io.Serializable; + +/** + * To store information about the funder funding the project related to the result. It has the following parameters: - + * shortName of type String to store the funder short name (e.c. AKA). - name of type String to store the funder name + * (e.c. Akademy of Finland) - fundingStream of type String to store the funding stream - jurisdiction of type String to + * store the jurisdiction of the funder + */ +public class Validated implements Serializable { + + private String validationDate; + private boolean validatedByFunder; + + public void setValidationDate(String validationDate){ + this.validationDate = validationDate; + } + + public String getValidationDate(){ + return validationDate; + } + + public void setValidatedByFunder(boolean validated){ + this.validatedByFunder = validated; + } + + public boolean getValidatedByFunder(){ + return validatedByFunder; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java index e2b126e..31af2f1 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java @@ -17,6 +17,8 @@ public class Relation implements Serializable { private Node target; private RelType reltype; private Provenance provenance; + private boolean validated; + private String validationDate; public Node getSource() { return source; @@ -50,6 +52,22 @@ public class Relation implements Serializable { this.provenance = provenance; } + public void setValidated(boolean validate){ + this.validated = validate; + } + + public boolean getValidated(){ + return validated; + } + + public void setValidationDate(String validationDate){ + this.validationDate = validationDate; + } + + public String getValidationDate(){ + return validationDate; + } + @Override public int hashCode() { From 49d42ea9d8dd00d00f0ad5ba35ea134899e46017 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Fri, 6 Aug 2021 14:44:33 +0200 Subject: [PATCH 002/146] added new static newInstance method in the Validated class --- .../dhp/schema/dump/oaf/community/Validated.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Validated.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Validated.java index 073dd3f..0d136f0 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Validated.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Validated.java @@ -12,7 +12,7 @@ import java.io.Serializable; public class Validated implements Serializable { private String validationDate; - private boolean validatedByFunder; + private Boolean validatedByFunder; public void setValidationDate(String validationDate){ this.validationDate = validationDate; @@ -22,11 +22,18 @@ public class Validated implements Serializable { return validationDate; } - public void setValidatedByFunder(boolean validated){ + public void setValidatedByFunder(Boolean validated){ this.validatedByFunder = validated; } - public boolean getValidatedByFunder(){ + public Boolean getValidatedByFunder(){ return validatedByFunder; } + + public static Validated newInstance(Boolean validated, String validationDate){ + Validated v = new Validated(); + v.validatedByFunder = validated; + v.validationDate = validationDate; + return v; + } } From 07e6b3ca6f1ba300282c9f482ac84de35bc8851f Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Mon, 23 Aug 2021 12:17:28 +0200 Subject: [PATCH 003/146] [maven-release-plugin] prepare release dhp-schemas-2.7.17 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e7d0a81..0cfc25f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.17-SNAPSHOT + 2.7.17 @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.6.13 + dhp-schemas-2.7.17 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 1fd54756005c0a8e891e41167e0cfc3030012311 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Mon, 23 Aug 2021 12:39:11 +0200 Subject: [PATCH 004/146] [maven-release-plugin] rollback the release of dhp-schemas-2.7.17 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0cfc25f..e7d0a81 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.17 + 2.7.17-SNAPSHOT @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.7.17 + dhp-schemas-2.6.13 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 2a7c79fa0180b9e35251ec1763be2702546fc65b Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 23 Aug 2021 14:10:33 +0200 Subject: [PATCH 005/146] [maven-release-plugin] prepare release dhp-schemas-2.7.17 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e7d0a81..0cfc25f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.17-SNAPSHOT + 2.7.17 @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.6.13 + dhp-schemas-2.7.17 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 0a60bf39cee70478d3ce39e4f8ff58f1ec2749f0 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 23 Aug 2021 14:10:38 +0200 Subject: [PATCH 006/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0cfc25f..c380093 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.17 + 2.7.18-SNAPSHOT @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.7.17 + dhp-schemas-2.6.13 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 3bffa796f2dbd57b88d8575964e2d0734948397d Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 14 Sep 2021 18:59:13 +0200 Subject: [PATCH 007/146] added constants declaring vocabulary names for relation fields --- src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java index 5c08765..ac95d86 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java @@ -47,6 +47,9 @@ public class ModelConstants { public static final String DNET_REVIEW_LEVELS = "dnet:review_levels"; public static final String DNET_PROGRAMMING_LANGUAGES = "dnet:programming_languages"; public static final String DNET_EXTERNAL_REFERENCE_TYPE = "dnet:externalReference_typologies"; + public static final String DNET_RELATIONS_RELTYPE = "dnet:relation_relType"; + public static final String DNET_RELATIONS_SUBRELTYPE = "dnet:relation_subRelType"; + public static final String DNET_RELATIONS_RELCLASS = "dnet:relation_relClass"; public static final String SYSIMPORT_CROSSWALK_REPOSITORY = "sysimport:crosswalk:repository"; public static final String SYSIMPORT_CROSSWALK_ENTITYREGISTRY = "sysimport:crosswalk:entityregistry"; From 5ab85f35c236cc7c75fc8695d981299d7d667ab9 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 15 Sep 2021 16:02:29 +0200 Subject: [PATCH 008/146] added constants declaring vocabulary names for relation fields --- .../java/eu/dnetlib/dhp/schema/common/ModelConstants.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java index ac95d86..e9261dc 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java @@ -47,9 +47,9 @@ public class ModelConstants { public static final String DNET_REVIEW_LEVELS = "dnet:review_levels"; public static final String DNET_PROGRAMMING_LANGUAGES = "dnet:programming_languages"; public static final String DNET_EXTERNAL_REFERENCE_TYPE = "dnet:externalReference_typologies"; - public static final String DNET_RELATIONS_RELTYPE = "dnet:relation_relType"; - public static final String DNET_RELATIONS_SUBRELTYPE = "dnet:relation_subRelType"; - public static final String DNET_RELATIONS_RELCLASS = "dnet:relation_relClass"; + public static final String DNET_RELATION_RELTYPE = "dnet:relation_relType"; + public static final String DNET_RELATION_SUBRELTYPE = "dnet:relation_subRelType"; + public static final String DNET_RELATION_RELCLASS = "dnet:relation_relClass"; public static final String SYSIMPORT_CROSSWALK_REPOSITORY = "sysimport:crosswalk:repository"; public static final String SYSIMPORT_CROSSWALK_ENTITYREGISTRY = "sysimport:crosswalk:entityregistry"; From fa67d038264afe9246b534c8c69876071906e4c7 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 15 Sep 2021 16:03:00 +0200 Subject: [PATCH 009/146] [maven-release-plugin] prepare release dhp-schemas-2.7.18 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index c380093..277e6dc 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.18-SNAPSHOT + 2.7.18 @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.6.13 + dhp-schemas-2.7.18 This module contains common schema classes meant to be used across the dnet-hadoop submodules From d567acab6a8d81270054b71c0de69e2614bea1fa Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 15 Sep 2021 16:03:04 +0200 Subject: [PATCH 010/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 277e6dc..f8d7bc2 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.18 + 2.7.19-SNAPSHOT @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.7.18 + dhp-schemas-2.6.13 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 5c2ed26073361aeb68fd916d2b09de11bf932529 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 23 Sep 2021 16:20:47 +0200 Subject: [PATCH 011/146] added constants for OpenCitations --- src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java index e9261dc..d609d9c 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java @@ -27,6 +27,9 @@ public class ModelConstants { public static final String OPENORGS_NAME = "OpenOrgs Database"; + public static final String OPENOCITATIONS_NAME = "OpenCitations"; + public static final String OPENOCITATIONS_ID = "10|openaire____::c06df618c5de1c786535ccf3f8b7b059"; + // VOCABULARY VALUE public static final String ACCESS_RIGHT_OPEN = "OPEN"; public static final String ACCESS_RIGHT_EMBARGO = "EMBARGO"; From 13823d9564c0685d6cfedbb91e54811537e55a24 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Fri, 1 Oct 2021 11:56:06 +0200 Subject: [PATCH 012/146] [maven-release-plugin] prepare release dhp-schemas-2.7.19 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f8d7bc2..a7d0069 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.19-SNAPSHOT + 2.7.19 @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.6.13 + dhp-schemas-2.7.19 This module contains common schema classes meant to be used across the dnet-hadoop submodules From fbc43bbc9ddd29c87fc0f3ee370d31544a7f105b Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Fri, 1 Oct 2021 11:56:10 +0200 Subject: [PATCH 013/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index a7d0069..0bd655c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.19 + 2.7.20-SNAPSHOT @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.7.19 + dhp-schemas-2.6.13 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 08fbc07a6760d84290a17f292f4befa834deacf4 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 4 Oct 2021 14:48:07 +0200 Subject: [PATCH 014/146] Revert "[maven-release-plugin] prepare release dhp-schemas-2.7.19" This reverts commit 13823d9564c0685d6cfedbb91e54811537e55a24. --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0bd655c..d13e1dd 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.20-SNAPSHOT + 2.7.19-SNAPSHOT @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.6.13 + dhp-schemas-2.7.19 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 5a7d2f50dd18c8cf915ee8a5841cfc7639a16b40 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 4 Oct 2021 14:58:39 +0200 Subject: [PATCH 015/146] updated changelog --- CHANGES.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 88df206..7774f4e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,10 +4,11 @@ | **Version** | **Changes** | **Readiness** | |---|---|---| +| 2.7.18-19 | [Dump model]
include validation info in relations
[Graph model]
added constants declaring vocabulary names for relation fields | beta | | 2.7.17 | [Dump model]
aligned the graph dump schema to mirror the changes in the model
1. Added openaccessroute at the level of the instance inside the AccessRight element;
2. Added pid and the alternate identifiers at the level of the instance;
3. Added the bipFinder measures | beta | | 2.7.16 | [Graph model]
Updated the casing of the following terms (`relation.relClass`):
1. `isRelatedTo -> IsRelatedTo`
Added the following `relClass` terms:
1. `IsAmongTopNSimilarDocuments`
2. `HasAmongTopNSimilarDocuments` | beta | -| 2.7.15 | 1. added support for delegated authorities
2. fixed regex for DOI cleaning | beta | -| 2.7.14 | [Graph model]
Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion` | beta | +| 2.7.15 | 1. added support for delegated authorities
2. fixed regex for DOI cleaning | production | +| 2.7.14 | [Graph model]
Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion` | production | | 2.6.14 | [Scholexplorer]
1. Added model classes for Scholexplorer, package `eu.dnetlib.dhp.schema.sx` | production | | 2.6.13 | 1. `Result.mergeFrom` handles field `dateOfAcceptance` | production | | 2.5.12 | 1. delegating the date parsing to https://github.com/sisyphsu/dateparser | production | From f9cb9d17147c1b057144efe763b4017668507895 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 4 Oct 2021 14:59:15 +0200 Subject: [PATCH 016/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d13e1dd..245dff7 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.19-SNAPSHOT + 2.7.20-SNAPSHOT From 9a567fd4b8912fa84ab7794e74b629a40028c415 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 4 Oct 2021 16:06:08 +0200 Subject: [PATCH 017/146] [maven-release-plugin] rollback the release of dhp-schemas-2.7.19 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 245dff7..d13e1dd 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.20-SNAPSHOT + 2.7.19-SNAPSHOT From c0331c2f3016e7346f209faeaee497e8f47af6a1 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 4 Oct 2021 16:10:48 +0200 Subject: [PATCH 018/146] update issue tracker url --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d13e1dd..262e887 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ Redmine - https://issue.openaire.research-infrastructures.eu/projects/openaire + https://support.openaire.eu/projects/openaire From 925f2d3e92fa3d65e7216075ace33c6dd4159683 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 4 Oct 2021 16:11:16 +0200 Subject: [PATCH 019/146] [maven-release-plugin] prepare release dhp-schemas-2.7.19 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 262e887..c922a15 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.19-SNAPSHOT + 2.7.19 From 5e957315ff445eeebbc0e7a8cd77ad0238a25db4 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 4 Oct 2021 16:11:19 +0200 Subject: [PATCH 020/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c922a15..91e4a48 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.19 + 2.7.20-SNAPSHOT From 466503ccaa926c7752bdee3b28e3ef1c36e9ece0 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 12 Oct 2021 11:50:33 +0200 Subject: [PATCH 021/146] added IsParentOf / IsChildOf relClass constants --- pom.xml | 4 ++-- .../java/eu/dnetlib/dhp/schema/common/ModelConstants.java | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 91e4a48..b9d93c9 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.7.20-SNAPSHOT + 2.8.20-SNAPSHOT @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.7.19 + dhp-schemas-2.8.20 This module contains common schema classes meant to be used across the dnet-hadoop submodules diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java index d609d9c..e71cf6c 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java @@ -142,6 +142,8 @@ public class ModelConstants { public static final String HAS_AUTHOR_INSTITUTION = "hasAuthorInstitution"; public static final String ORG_ORG_RELTYPE = "organizationOrganization"; // relType + public static final String IS_PARENT_OF = "IsParentOf"; + public static final String IS_CHILD_OF = "IsChildOf"; public static final String DEDUP = "dedup"; // subreltype public static final String MERGES = "merges"; From d12607e2f0bf0092dfc8e4a6a6a6dffe90f47c8c Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 12 Oct 2021 11:53:18 +0200 Subject: [PATCH 022/146] uopdated README --- CHANGES.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7774f4e..cca5909 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,9 +4,10 @@ | **Version** | **Changes** | **Readiness** | |---|---|---| -| 2.7.18-19 | [Dump model]
include validation info in relations
[Graph model]
added constants declaring vocabulary names for relation fields | beta | -| 2.7.17 | [Dump model]
aligned the graph dump schema to mirror the changes in the model
1. Added openaccessroute at the level of the instance inside the AccessRight element;
2. Added pid and the alternate identifiers at the level of the instance;
3. Added the bipFinder measures | beta | -| 2.7.16 | [Graph model]
Updated the casing of the following terms (`relation.relClass`):
1. `isRelatedTo -> IsRelatedTo`
Added the following `relClass` terms:
1. `IsAmongTopNSimilarDocuments`
2. `HasAmongTopNSimilarDocuments` | beta | +| 2.8.20 | [Graph model]
added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | beta | +| 2.7.18-19 | [Dump model]
include validation info in relations
[Graph model]
added constants declaring vocabulary names for relation fields | production | +| 2.7.17 | [Dump model]
aligned the graph dump schema to mirror the changes in the model
1. Added openaccessroute at the level of the instance inside the AccessRight element;
2. Added pid and the alternate identifiers at the level of the instance;
3. Added the bipFinder measures | production | +| 2.7.16 | [Graph model]
Updated the casing of the following terms (`relation.relClass`):
1. `isRelatedTo -> IsRelatedTo`
Added the following `relClass` terms:
1. `IsAmongTopNSimilarDocuments`
2. `HasAmongTopNSimilarDocuments` | production | | 2.7.15 | 1. added support for delegated authorities
2. fixed regex for DOI cleaning | production | | 2.7.14 | [Graph model]
Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion` | production | | 2.6.14 | [Scholexplorer]
1. Added model classes for Scholexplorer, package `eu.dnetlib.dhp.schema.sx` | production | From c6aed732e356625f83fdfc846fc76dedeb7ad02c Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 12 Oct 2021 11:53:49 +0200 Subject: [PATCH 023/146] [maven-release-plugin] prepare release dhp-schemas-2.8.20 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b9d93c9..c85cc8f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.8.20-SNAPSHOT + 2.8.20 From c6efa75fbb5e3b39361ce627e6873f197d46047d Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 12 Oct 2021 11:53:54 +0200 Subject: [PATCH 024/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c85cc8f..bb2a549 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.8.20 + 2.8.21-SNAPSHOT From bc7828cdeef613802f34fc96ba888f465e84d1fb Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 18 Oct 2021 12:07:29 +0200 Subject: [PATCH 025/146] added new relation labels in the relationInverseMap --- .../dhp/schema/common/ModelSupport.java | 264 ++++-------------- .../dhp/schema/common/RelationInverse.java | 20 +- 2 files changed, 71 insertions(+), 213 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java index 89eddd0..70c21b3 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java @@ -2,6 +2,7 @@ package eu.dnetlib.dhp.schema.common; import static com.google.common.base.Preconditions.checkArgument; +import static eu.dnetlib.dhp.schema.common.ModelConstants.*; import java.nio.charset.StandardCharsets; import java.security.MessageDigest; @@ -98,211 +99,68 @@ public class ModelSupport { public static final Map relationInverseMap = Maps.newHashMap(); static { - relationInverseMap - .put( - "personResult_authorship_isAuthorOf", new RelationInverse() - .setRelation("isAuthorOf") - .setInverse("hasAuthor") - .setRelType("personResult") - .setSubReltype("authorship")); - relationInverseMap - .put( - "personResult_authorship_hasAuthor", new RelationInverse() - .setInverse("isAuthorOf") - .setRelation("hasAuthor") - .setRelType("personResult") - .setSubReltype("authorship")); - relationInverseMap - .put( - "projectOrganization_participation_isParticipant", new RelationInverse() - .setRelation(ModelConstants.IS_PARTICIPANT) - .setInverse(ModelConstants.HAS_PARTICIPANT) - .setRelType(ModelConstants.PROJECT_ORGANIZATION) - .setSubReltype(ModelConstants.PARTICIPATION)); - relationInverseMap - .put( - "projectOrganization_participation_hasParticipant", new RelationInverse() - .setInverse(ModelConstants.IS_PARTICIPANT) - .setRelation(ModelConstants.HAS_PARTICIPANT) - .setRelType(ModelConstants.PROJECT_ORGANIZATION) - .setSubReltype(ModelConstants.PARTICIPATION)); - relationInverseMap - .put( - "resultOrganization_affiliation_hasAuthorInstitution", new RelationInverse() - .setRelation(ModelConstants.HAS_AUTHOR_INSTITUTION) - .setInverse(ModelConstants.IS_AUTHOR_INSTITUTION_OF) - .setRelType(ModelConstants.RESULT_ORGANIZATION) - .setSubReltype(ModelConstants.AFFILIATION)); - relationInverseMap - .put( - "resultOrganization_affiliation_isAuthorInstitutionOf", new RelationInverse() - .setInverse(ModelConstants.HAS_AUTHOR_INSTITUTION) - .setRelation(ModelConstants.IS_AUTHOR_INSTITUTION_OF) - .setRelType(ModelConstants.RESULT_ORGANIZATION) - .setSubReltype(ModelConstants.AFFILIATION)); - relationInverseMap - .put( - "organizationOrganization_dedup_merges", new RelationInverse() - .setRelation(ModelConstants.MERGES) - .setInverse(ModelConstants.IS_MERGED_IN) - .setRelType(ModelConstants.ORG_ORG_RELTYPE) - .setSubReltype(ModelConstants.DEDUP)); - relationInverseMap - .put( - "organizationOrganization_dedup_isMergedIn", new RelationInverse() - .setInverse(ModelConstants.MERGES) - .setRelation(ModelConstants.IS_MERGED_IN) - .setRelType(ModelConstants.ORG_ORG_RELTYPE) - .setSubReltype(ModelConstants.DEDUP)); - relationInverseMap - .put( - "organizationOrganization_dedupSimilarity_isSimilarTo", new RelationInverse() - .setInverse(ModelConstants.IS_SIMILAR_TO) - .setRelation(ModelConstants.IS_SIMILAR_TO) - .setRelType(ModelConstants.ORG_ORG_RELTYPE) - .setSubReltype(ModelConstants.DEDUP)); + set(relationInverseMap, PROJECT_ORGANIZATION, PARTICIPATION, IS_PARTICIPANT, HAS_PARTICIPANT); - relationInverseMap - .put( - "resultProject_outcome_isProducedBy", new RelationInverse() - .setRelation(ModelConstants.IS_PRODUCED_BY) - .setInverse(ModelConstants.PRODUCES) - .setRelType(ModelConstants.RESULT_PROJECT) - .setSubReltype(ModelConstants.OUTCOME)); - relationInverseMap - .put( - "resultProject_outcome_produces", new RelationInverse() - .setInverse(ModelConstants.IS_PRODUCED_BY) - .setRelation(ModelConstants.PRODUCES) - .setRelType(ModelConstants.RESULT_PROJECT) - .setSubReltype(ModelConstants.OUTCOME)); - relationInverseMap - .put( - "projectPerson_contactPerson_isContact", new RelationInverse() - .setRelation("isContact") - .setInverse("hasContact") - .setRelType("projectPerson") - .setSubReltype("contactPerson")); - relationInverseMap - .put( - "projectPerson_contactPerson_hasContact", new RelationInverse() - .setInverse("isContact") - .setRelation("hasContact") - .setRelType("personPerson") - .setSubReltype("coAuthorship")); - relationInverseMap - .put( - "personPerson_coAuthorship_isCoauthorOf", new RelationInverse() - .setInverse("isCoAuthorOf") - .setRelation("isCoAuthorOf") - .setRelType("personPerson") - .setSubReltype("coAuthorship")); - relationInverseMap - .put( - "personPerson_dedup_merges", new RelationInverse() - .setInverse(ModelConstants.IS_MERGED_IN) - .setRelation(ModelConstants.MERGES) - .setRelType("personPerson") - .setSubReltype(ModelConstants.DEDUP)); - relationInverseMap - .put( - "personPerson_dedup_isMergedIn", new RelationInverse() - .setInverse(ModelConstants.MERGES) - .setRelation(ModelConstants.IS_MERGED_IN) - .setRelType("personPerson") - .setSubReltype(ModelConstants.DEDUP)); - relationInverseMap - .put( - "personPerson_dedupSimilarity_isSimilarTo", new RelationInverse() - .setInverse(ModelConstants.IS_SIMILAR_TO) - .setRelation(ModelConstants.IS_SIMILAR_TO) - .setRelType("personPerson") - .setSubReltype(ModelConstants.DEDUP)); - relationInverseMap - .put( - "datasourceOrganization_provision_isProvidedBy", new RelationInverse() - .setInverse(ModelConstants.PROVIDES) - .setRelation(ModelConstants.IS_PROVIDED_BY) - .setRelType(ModelConstants.DATASOURCE_ORGANIZATION) - .setSubReltype(ModelConstants.PROVISION)); - relationInverseMap - .put( - "datasourceOrganization_provision_provides", new RelationInverse() - .setInverse(ModelConstants.IS_PROVIDED_BY) - .setRelation(ModelConstants.PROVIDES) - .setRelType(ModelConstants.DATASOURCE_ORGANIZATION) - .setSubReltype(ModelConstants.PROVISION)); - relationInverseMap - .put( - "resultResult_similarity_hasAmongTopNSimilarDocuments", new RelationInverse() - .setInverse("isAmongTopNSimilarDocuments") - .setRelation("hasAmongTopNSimilarDocuments") - .setRelType(ModelConstants.RESULT_RESULT) - .setSubReltype(ModelConstants.SIMILARITY)); - relationInverseMap - .put( - "resultResult_similarity_isAmongTopNSimilarDocuments", new RelationInverse() - .setInverse("hasAmongTopNSimilarDocuments") - .setRelation("isAmongTopNSimilarDocuments") - .setRelType(ModelConstants.RESULT_RESULT) - .setSubReltype(ModelConstants.SIMILARITY)); - relationInverseMap - .put( - "resultResult_relationship_isRelatedTo", new RelationInverse() - .setInverse(ModelConstants.IS_RELATED_TO) - .setRelation(ModelConstants.IS_RELATED_TO) - .setRelType(ModelConstants.RESULT_RESULT) - .setSubReltype(ModelConstants.RELATIONSHIP)); - relationInverseMap - .put( - "resultResult_supplement_isSupplementTo", new RelationInverse() - .setInverse(ModelConstants.IS_SUPPLEMENTED_BY) - .setRelation(ModelConstants.IS_SUPPLEMENT_TO) - .setRelType(ModelConstants.RESULT_RESULT) - .setSubReltype(ModelConstants.SUPPLEMENT)); - relationInverseMap - .put( - "resultResult_supplement_isSupplementedBy", new RelationInverse() - .setInverse(ModelConstants.IS_SUPPLEMENT_TO) - .setRelation(ModelConstants.IS_SUPPLEMENTED_BY) - .setRelType(ModelConstants.RESULT_RESULT) - .setSubReltype(ModelConstants.SUPPLEMENT)); - relationInverseMap - .put( - "resultResult_part_isPartOf", new RelationInverse() - .setInverse(ModelConstants.HAS_PART) - .setRelation(ModelConstants.IS_PART_OF) - .setRelType(ModelConstants.RESULT_RESULT) - .setSubReltype(ModelConstants.PART)); - relationInverseMap - .put( - "resultResult_part_hasPart", new RelationInverse() - .setInverse(ModelConstants.IS_PART_OF) - .setRelation(ModelConstants.HAS_PART) - .setRelType(ModelConstants.RESULT_RESULT) - .setSubReltype(ModelConstants.PART)); - relationInverseMap - .put( - "resultResult_dedup_merges", new RelationInverse() - .setInverse(ModelConstants.IS_MERGED_IN) - .setRelation(ModelConstants.MERGES) - .setRelType(ModelConstants.RESULT_RESULT) - .setSubReltype(ModelConstants.DEDUP)); - relationInverseMap - .put( - "resultResult_dedup_isMergedIn", new RelationInverse() - .setInverse(ModelConstants.MERGES) - .setRelation(ModelConstants.IS_MERGED_IN) - .setRelType(ModelConstants.RESULT_RESULT) - .setSubReltype(ModelConstants.DEDUP)); - relationInverseMap - .put( - "resultResult_dedupSimilarity_isSimilarTo", new RelationInverse() - .setInverse(ModelConstants.IS_SIMILAR_TO) - .setRelation(ModelConstants.IS_SIMILAR_TO) - .setRelType(ModelConstants.RESULT_RESULT) - .setSubReltype(ModelConstants.DEDUP)); + set(relationInverseMap, RESULT_ORGANIZATION, AFFILIATION, IS_AUTHOR_INSTITUTION_OF, HAS_AUTHOR_INSTITUTION); + set(relationInverseMap, ORG_ORG_RELTYPE, DEDUP, IS_MERGED_IN, MERGES); + set(relationInverseMap, ORG_ORG_RELTYPE, DEDUP, IS_SIMILAR_TO, IS_SIMILAR_TO); + + set(relationInverseMap, RESULT_PROJECT, OUTCOME, IS_PRODUCED_BY, PRODUCES); + + set(relationInverseMap, DATASOURCE_ORGANIZATION, PROVISION, IS_PROVIDED_BY, PROVIDES); + + set(relationInverseMap, RESULT_RESULT, SIMILARITY, IS_AMONG_TOP_N_SIMILAR_DOCS, HAS_AMONG_TOP_N_SIMILAR_DOCS); + set(relationInverseMap, RESULT_RESULT, SUPPLEMENT, IS_SUPPLEMENT_TO, IS_SUPPLEMENTED_BY); + set(relationInverseMap, RESULT_RESULT, PART, IS_PART_OF, HAS_PART); + set(relationInverseMap, RESULT_RESULT, DEDUP, IS_MERGED_IN, MERGES); + set(relationInverseMap, RESULT_RESULT, DEDUP, IS_SIMILAR_TO, IS_SIMILAR_TO); + set(relationInverseMap, RESULT_RESULT, CITATION, IS_CITED_BY, CITES); + + set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_IDENTICAL_TO, IS_IDENTICAL_TO); + set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_REFERENCED_BY, REFERENCES); + set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_CONTINUED_BY, CONTINUES); + set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_DOCUMENTED_BY, DOCUMENTS); + set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_DERIVED_FROM, IS_SOURCE_OF); + set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_RELATED_TO, IS_RELATED_TO); + set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_COMPILED_BY, COMPILES); + + set(relationInverseMap, RESULT_RESULT, VERSION, IS_PREVIOUS_VERSION_OF, IS_NEW_VERSION_OF); + set(relationInverseMap, RESULT_RESULT, VERSION, IS_VARIANT_FORM_OF, IS_ORIGINAL_FORM_OF); + set(relationInverseMap, RESULT_RESULT, VERSION, IS_OBSOLETED_BY, OBSOLETES); + set(relationInverseMap, RESULT_RESULT, VERSION, IS_VERSION_OF, HAS_VERSION); + + set(relationInverseMap, RESULT_RESULT, REVIEW, IS_REVIEWED_BY, REVIEWS); + } + + private static void set(Map relationInverseMap, String relType, String subRelType, String relClass, String inverseRelClass) { + relationInverseMap + .put( + rel(relType, subRelType, relClass), new RelationInverse() + .setInverseRelClass(inverseRelClass) + .setRelClass(relClass) + .setRelType(relType) + .setSubReltype(subRelType)); + if (!relClass.equals(inverseRelClass)) { + relationInverseMap + .put( + rel(relType, subRelType, inverseRelClass), new RelationInverse() + .setInverseRelClass(relClass) + .setRelClass(inverseRelClass) + .setRelType(relType) + .setSubReltype(subRelType)); + } + } + + /** + * Helper method: combines the relation attributes + * @param relType + * @param subRelType + * @param relClass + * @return + */ + public static String rel(String relType, String subRelType, String relClass) { + return String.format("%-%-%", relType, subRelType, relClass); } private static final String schemeTemplate = "dnet:%s_%s_relations"; diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/RelationInverse.java b/src/main/java/eu/dnetlib/dhp/schema/common/RelationInverse.java index 4757c63..2b9ed94 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/RelationInverse.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/RelationInverse.java @@ -2,8 +2,8 @@ package eu.dnetlib.dhp.schema.common; public class RelationInverse { - private String relation; - private String inverse; + private String relClass; + private String inverseRelClass; private String relType; private String subReltype; @@ -25,21 +25,21 @@ public class RelationInverse { return this; } - public String getRelation() { - return relation; + public String getRelClass() { + return relClass; } - public RelationInverse setRelation(String relation) { - this.relation = relation; + public RelationInverse setRelClass(String relClass) { + this.relClass = relClass; return this; } - public String getInverse() { - return inverse; + public String getInverseRelClass() { + return inverseRelClass; } - public RelationInverse setInverse(String inverse) { - this.inverse = inverse; + public RelationInverse setInverseRelClass(String inverseRelClass) { + this.inverseRelClass = inverseRelClass; return this; } From b0199b2e1091ce1e1a73a4f582340b2cd1568a05 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Mon, 18 Oct 2021 17:14:23 +0200 Subject: [PATCH 026/146] Added missing datacite Relations into dhp-schemas --- .../dhp/schema/common/ModelConstants.java | 9 +++++++ .../dhp/schema/common/ModelSupport.java | 23 +++++++++++++++- .../dhp/schema/common/ModelSupportTest.java | 27 ++++++++++++++----- 3 files changed, 52 insertions(+), 7 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java index e71cf6c..c4ae5cb 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java @@ -102,6 +102,15 @@ public class ModelConstants { public static final String IS_DERIVED_FROM = "IsDerivedFrom"; public static final String COMPILES = "Compiles"; public static final String IS_COMPILED_BY = "IsCompiledBy"; + public static final String DESCRIBES = "Describes"; + public static final String IS_DESCRIBE_DBY = "IsDescribedBy"; + public static final String IS_METADATA_FOR = "IsMetadataFor"; + public static final String IS_METADATA_OF = "IsMetadataOf"; + public static final String HAS_ASSOCIATION_WITH = "HasAssociationWith"; + public static final String IS_REQUIRED_BY = "IsRequiredBy"; + public static final String REQUIRES = "Requires"; + + public static final String CITATION = "citation"; // subreltype public static final String CITES = "Cites"; diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java index 70c21b3..bf0eed1 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java @@ -125,6 +125,12 @@ public class ModelSupport { set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_RELATED_TO, IS_RELATED_TO); set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_COMPILED_BY, COMPILES); + set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_DESCRIBE_DBY, DESCRIBES); + set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_METADATA_FOR, IS_METADATA_OF); + set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, HAS_ASSOCIATION_WITH, HAS_ASSOCIATION_WITH); + set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_REQUIRED_BY, REQUIRES); + + set(relationInverseMap, RESULT_RESULT, VERSION, IS_PREVIOUS_VERSION_OF, IS_NEW_VERSION_OF); set(relationInverseMap, RESULT_RESULT, VERSION, IS_VARIANT_FORM_OF, IS_ORIGINAL_FORM_OF); set(relationInverseMap, RESULT_RESULT, VERSION, IS_OBSOLETED_BY, OBSOLETES); @@ -152,6 +158,21 @@ public class ModelSupport { } } + /** + * Helper method: fina a relation filtering by a relation name + * @param relationName + * @return + */ + public static RelationInverse findRelation(final String relationName) { + return relationInverseMap.values() + .stream() + .filter(r -> relationName.equalsIgnoreCase(r.getRelClass())) + .findFirst() + .orElse(null); + + + } + /** * Helper method: combines the relation attributes * @param relType @@ -160,7 +181,7 @@ public class ModelSupport { * @return */ public static String rel(String relType, String subRelType, String relClass) { - return String.format("%-%-%", relType, subRelType, relClass); + return String.format("%s-%s-%s", relType, subRelType, relClass); } private static final String schemeTemplate = "dnet:%s_%s_relations"; diff --git a/src/test/java/eu/dnetlib/dhp/schema/common/ModelSupportTest.java b/src/test/java/eu/dnetlib/dhp/schema/common/ModelSupportTest.java index b40e119..8ff1947 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/common/ModelSupportTest.java +++ b/src/test/java/eu/dnetlib/dhp/schema/common/ModelSupportTest.java @@ -1,15 +1,15 @@ package eu.dnetlib.dhp.schema.common; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; - -import org.junit.jupiter.api.Nested; -import org.junit.jupiter.api.Test; - import eu.dnetlib.dhp.schema.oaf.OafEntity; import eu.dnetlib.dhp.schema.oaf.Relation; import eu.dnetlib.dhp.schema.oaf.Result; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import java.io.IOException; + +import static org.junit.jupiter.api.Assertions.*; public class ModelSupportTest { @@ -34,4 +34,19 @@ public class ModelSupportTest { assertTrue(result); } } + + + @Nested + class InverseRelation { + + @Test + void findRelations() throws IOException { + assertNotNull(ModelSupport.findRelation("isMetadataFor")); + assertNotNull(ModelSupport.findRelation("ismetadatafor")); + assertNotNull(ModelSupport.findRelation("ISMETADATAFOR")); + assertNotNull(ModelSupport.findRelation("isRelatedTo")); + + + } + } } From 36a5d4499c0bc8a18c46d69c4140e2cdcfe8c33d Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 18 Oct 2021 17:20:38 +0200 Subject: [PATCH 027/146] [maven-release-plugin] prepare release dhp-schemas-2.8.21 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index bb2a549..ee763b2 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.8.21-SNAPSHOT + 2.8.21 @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.8.20 + dhp-schemas-2.8.21 This module contains common schema classes meant to be used across the dnet-hadoop submodules From de0d5f14b45949cf560c9f57613cef2f7be8e428 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 18 Oct 2021 17:20:41 +0200 Subject: [PATCH 028/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ee763b2..f5141ae 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.8.21 + 2.8.22-SNAPSHOT @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.8.21 + dhp-schemas-2.8.20 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 8d37a3ccf33cdea3bceb946da4b55e4aa103257f Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 18 Oct 2021 17:25:01 +0200 Subject: [PATCH 029/146] [maven-release-plugin] rollback the release of dhp-schemas-2.8.21 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f5141ae..bb2a549 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.8.22-SNAPSHOT + 2.8.21-SNAPSHOT From 7b239c94c4f45f85622386ab9b3df145ab7128d7 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 18 Oct 2021 17:27:13 +0200 Subject: [PATCH 030/146] code formatting --- .../dnetlib/dhp/schema/common/ModelSupportTest.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/test/java/eu/dnetlib/dhp/schema/common/ModelSupportTest.java b/src/test/java/eu/dnetlib/dhp/schema/common/ModelSupportTest.java index 8ff1947..3e1533b 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/common/ModelSupportTest.java +++ b/src/test/java/eu/dnetlib/dhp/schema/common/ModelSupportTest.java @@ -1,15 +1,16 @@ package eu.dnetlib.dhp.schema.common; +import static org.junit.jupiter.api.Assertions.*; + +import java.io.IOException; + +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + import eu.dnetlib.dhp.schema.oaf.OafEntity; import eu.dnetlib.dhp.schema.oaf.Relation; import eu.dnetlib.dhp.schema.oaf.Result; -import org.junit.jupiter.api.Nested; -import org.junit.jupiter.api.Test; - -import java.io.IOException; - -import static org.junit.jupiter.api.Assertions.*; public class ModelSupportTest { From 5d8b4d0dc8cc17592db9d93c5e0b423b80108215 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 18 Oct 2021 17:27:28 +0200 Subject: [PATCH 031/146] updated changelog file --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index cca5909..c1ba6d0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ | **Version** | **Changes** | **Readiness** | |---|---|---| +| 2.8.21 | [Graph model]
added the following relation terms Describes/IsDescribedBy, IsMetadataFor/IsMetadataOf, HasAssociationWith/HasAssociationWith, IsRequiredBy/Requires. All these are used in combination with the relation subRelType "relationship" | beta | | 2.8.20 | [Graph model]
added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | beta | | 2.7.18-19 | [Dump model]
include validation info in relations
[Graph model]
added constants declaring vocabulary names for relation fields | production | | 2.7.17 | [Dump model]
aligned the graph dump schema to mirror the changes in the model
1. Added openaccessroute at the level of the instance inside the AccessRight element;
2. Added pid and the alternate identifiers at the level of the instance;
3. Added the bipFinder measures | production | @@ -19,3 +20,4 @@ | 2.3.6 | [Aggregation]
1. introduced MetadataStoreManager (MdSM) model classes| production | | 2.2.5 | [Graph model]
1. introduced fields `Instance.pid` and `Instance.alternateIdentifier`
2. `LicenseComparator` renamed as `AccessRightComparator`
3. introduced `AccessRight` model class defining the `OpenAccessRoute` field to keep track of the OpenAccess color at the `Instance` level
4. `ExternalReference` cleanup (removed description, added alternateLabel(s))
5. added several ModelConstants
[Aggregation]
7. introduced MDStore record model classes
8. Introduced ORCID specific model classes | production | | 2.2.4 | 1. ORCID specific model classes backported in the version used in PROD
2. added constant for dnet:externalReference_typologies
3. added constant for ORCID datasource name
4. `Result.mergeFrom` handles field `dateOfAcceptance` | production | + From a802f75eda08c4e35cae451e7a49597e7354cae9 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 18 Oct 2021 17:27:58 +0200 Subject: [PATCH 032/146] [maven-release-plugin] prepare release dhp-schemas-2.8.21 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index bb2a549..ee763b2 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.8.21-SNAPSHOT + 2.8.21 @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.8.20 + dhp-schemas-2.8.21 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 827fbab06df2c10522bb391598ce189b4531f076 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 18 Oct 2021 17:28:01 +0200 Subject: [PATCH 033/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ee763b2..f5141ae 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.8.21 + 2.8.22-SNAPSHOT @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.8.21 + dhp-schemas-2.8.20 This module contains common schema classes meant to be used across the dnet-hadoop submodules From d1582e7930ce9fb72a2dc90ee55657bbd681a8f3 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Tue, 9 Nov 2021 15:49:36 +0100 Subject: [PATCH 034/146] Added implements Serializable to eu.dnetlib.dhp.schema.oaf.Measure class --- src/main/java/eu/dnetlib/dhp/schema/oaf/Measure.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Measure.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Measure.java index e88ff73..78a4c68 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Measure.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Measure.java @@ -1,6 +1,7 @@ package eu.dnetlib.dhp.schema.oaf; +import java.io.Serializable; import java.util.List; import com.google.common.base.Objects; @@ -8,7 +9,7 @@ import com.google.common.base.Objects; /** * Represent a measure, must be further described by a system available resource providing name and descriptions. */ -public class Measure { +public class Measure implements Serializable { /** * Unique measure identifier. From ca4be66c1accfcde267bb87c8c05f1c3d84d3fa8 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Wed, 10 Nov 2021 16:58:37 +0100 Subject: [PATCH 035/146] Reverted the type of bestaccessright to the version without openaccessroute --- .../dhp/schema/dump/oaf/AccessRight.java | 19 +++--------- .../dhp/schema/dump/oaf/BestAccessRight.java | 31 +++++++++++++++++++ 2 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java index b973f5b..4abbf2f 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java @@ -2,26 +2,15 @@ package eu.dnetlib.dhp.schema.dump.oaf; /** - * AccessRight. Used to represent the result access rights. It extends the eu.dnet.lib.dhp.schema.dump.oaf.Qualifier - * element with a parameter scheme of type String to store the scheme. Values for this element are found against the - * COAR access right scheme. The classid of the element accessright in eu.dnetlib.dhp.schema.oaf.Result is used to get - * the COAR corresponding code whose value will be used to set the code parameter. The COAR label corresponding to the - * COAR code will be used to set the label parameter. The scheme value will always be the one referring to the COAR - * access right scheme + * AccessRight. Used to represent the result access rights. It extends the eu.dnet.lib.dhp.schema.dump.oaf.BestAccessRight + * element with value for the openaccess route */ -public class AccessRight extends Qualifier { +public class AccessRight extends BestAccessRight { + - private String scheme; private OpenAccessRoute openAccessRoute ; - public String getScheme() { - return scheme; - } - - public void setScheme(String scheme) { - this.scheme = scheme; - } public static AccessRight newInstance(String code, String label, String scheme) { AccessRight ar = new AccessRight(); diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java new file mode 100644 index 0000000..71a3c34 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java @@ -0,0 +1,31 @@ +package eu.dnetlib.dhp.schema.dump.oaf; + +/** + * BestAccessRight. Used to represent the result best access rights. It extends the eu.dnet.lib.dhp.schema.dump.oaf.Qualifier + * element with a parameter scheme of type String to store the scheme. Values for this element are found against the + * COAR access right scheme. The classid of the element accessright in eu.dnetlib.dhp.schema.oaf.Result is used to get + * the COAR corresponding code whose value will be used to set the code parameter. The COAR label corresponding to the + * COAR code will be used to set the label parameter. The scheme value will always be the one referring to the COAR + * access right scheme + */ + +public class BestAccessRight extends Qualifier { + + private String scheme; + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public static BestAccessRight newInstance(String code, String label, String scheme) { + BestAccessRight ar = new BestAccessRight(); + ar.setCode(code); + ar.setLabel(label); + ar.setScheme(scheme); + return ar; + } +} From 1eb683ccacbeec0ce207f7ddcc23283ab4d8ca03 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Wed, 10 Nov 2021 17:04:26 +0100 Subject: [PATCH 036/146] changed to the type of bestaccessright in the result --- .../java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java | 2 +- src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java index 4abbf2f..195da21 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java @@ -3,7 +3,7 @@ package eu.dnetlib.dhp.schema.dump.oaf; /** * AccessRight. Used to represent the result access rights. It extends the eu.dnet.lib.dhp.schema.dump.oaf.BestAccessRight - * element with value for the openaccess route + * element with value for the openaccess route */ public class AccessRight extends BestAccessRight { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java index 932df9e..6412bfe 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java @@ -98,7 +98,7 @@ public class Result implements Serializable { private List coverage; - private AccessRight bestaccessright; + private BestAccessRight bestaccessright; private Container container;// Journal @@ -298,11 +298,11 @@ public class Result implements Serializable { this.coverage = coverage; } - public AccessRight getBestaccessright() { + public BestAccessRight getBestaccessright() { return bestaccessright; } - public void setBestaccessright(AccessRight bestaccessright) { + public void setBestaccessright(BestAccessRight bestaccessright) { this.bestaccessright = bestaccessright; } From a0885e64e45909a49886e24e947f7c930601f3df Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 12 Nov 2021 10:06:42 +0100 Subject: [PATCH 037/146] updated CHANGES.md --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index c1ba6d0..953d9df 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ | **Version** | **Changes** | **Readiness** | |---|---|---| +| 2.8.22 | [Graph model]
minor: added serializable to the Measures model class
[Dump model]
added dedicated BestAccessRight class, used at the result level instead of AccessRight | beta | | 2.8.21 | [Graph model]
added the following relation terms Describes/IsDescribedBy, IsMetadataFor/IsMetadataOf, HasAssociationWith/HasAssociationWith, IsRequiredBy/Requires. All these are used in combination with the relation subRelType "relationship" | beta | | 2.8.20 | [Graph model]
added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | beta | | 2.7.18-19 | [Dump model]
include validation info in relations
[Graph model]
added constants declaring vocabulary names for relation fields | production | From 731a1417731f18167a8fce8a35d9da560340eb35 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 12 Nov 2021 10:07:26 +0100 Subject: [PATCH 038/146] [maven-release-plugin] prepare release dhp-schemas-2.8.22 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f5141ae..7ba0d4d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.8.22-SNAPSHOT + 2.8.22 @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.8.20 + dhp-schemas-2.8.22 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 8fbd32d2bd1626ce996bdde80b7dbc1911aebc7f Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 12 Nov 2021 10:07:29 +0100 Subject: [PATCH 039/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 7ba0d4d..663ea6e 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.8.22 + 2.8.23-SNAPSHOT @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.8.22 + dhp-schemas-2.8.20 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 3a0bff2ac453d9d5720d2f82f22885efe20a795c Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Fri, 12 Nov 2021 11:49:31 +0100 Subject: [PATCH 040/146] [Graph Dump] added the json schema files --- .../community_infrastructure_schema.json | 35 ++ .../dump/jsonschemas/datasource_schema.json | 192 ++++++++ .../dump/jsonschemas/organization_schema.json | 57 +++ .../oaf/dump/jsonschemas/project_schema.json | 119 +++++ .../oaf/dump/jsonschemas/relation_schema.json | 68 +++ .../oaf/dump/jsonschemas/result_schema.json | 417 ++++++++++++++++++ 6 files changed, 888 insertions(+) create mode 100644 src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/community_infrastructure_schema.json create mode 100644 src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/datasource_schema.json create mode 100644 src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/organization_schema.json create mode 100644 src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/project_schema.json create mode 100644 src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/relation_schema.json create mode 100644 src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/result_schema.json diff --git a/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/community_infrastructure_schema.json b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/community_infrastructure_schema.json new file mode 100644 index 0000000..727432a --- /dev/null +++ b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/community_infrastructure_schema.json @@ -0,0 +1,35 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "acronym": { + "type": "string", + "description": "The acronym of the community" + }, + "description": { + "type": "string", + "description": "Description of the research community/research infrastructure" + }, + "id": { + "type": "string", + "description": "OpenAIRE id of the research community/research infrastructure" + }, + "name": { + "type": "string", + "description": "The long name of the community" + }, + "subject": { + "description": "Only for research communities: the list of the subjects associated to the research community", + "type": "array", + "items": {"type": "string"} + }, + "type": { + "type": "string", + "description": "One of {Research Community, Research infrastructure}" + }, + "zenodo_community": { + "type": "string", + "description": "The URL of the Zenodo community associated to the Research community/Research infrastructure" + } + } +} \ No newline at end of file diff --git a/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/datasource_schema.json b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/datasource_schema.json new file mode 100644 index 0000000..c416f23 --- /dev/null +++ b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/datasource_schema.json @@ -0,0 +1,192 @@ +{ + "$schema":"http://json-schema.org/draft-07/schema#", + "definitions": { + "ControlledField": { + "type": "object", + "properties": { + "scheme": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "description": "To represent the information described by a scheme and a value in that scheme (i.e. pid)" + } + }, + "type":"object", + "properties": { + "accessrights": { + "type": "string", + "description": "Type of access to the data source, as defined by re3data.org. Possible values: {open, restricted, closed}" + }, + "certificates": { + "type": "string", + "description": "The certificate, seal or standard the data source complies with. As defined by re3data.org." + }, + "citationguidelineurl": { + "type": "string", + "description":"The URL of the data source providing information on how to cite its items. As defined by re3data.org." + }, + "contenttypes": { + "description": "Types of content in the data source, as defined by OpenDOAR", + "type": "array", + "items": { + "type": "string" + } + }, + "databaseaccessrestriction": { + "type": "string", + "description": "Access restrinctions to the data source, as defined by re3data.org. One of {feeRequired, registration, other}" + }, + "datasourcetype": { + "allOf": [ + { + "$ref": "#/definitions/ControlledField" + }, + { + "description": "The type of the datasource. See https://api.openaire.eu/vocabularies/dnet:datasource_typologies" + } + ] + }, + "datauploadrestriction": { + "type": "string", + "description": "Upload restrictions applied by the datasource, as defined by re3data.org. One of {feeRequired, registration, other}" + }, + "dateofvalidation": { + "type": "string", + "description": "The date of last validation against the OpenAIRE guidelines for the datasource records" + }, + "description": { + "type": "string" + }, + "englishname": { + "type": "string", + "description": "The English name of the datasource" + }, + "id": { + "type": "string", + "description": "The OpenAIRE id of the data source" + }, + "journal": { + "type": "object", + "properties": { + "conferencedate": { + "type": "string" + }, + "conferenceplace": { + "type": "string" + }, + "edition": { + "type": "string" + }, + "ep": { + "type": "string", + "description": "End page" + }, + "iss": { + "type": "string", + "description": "Issue number" + }, + "issnLinking": { + "type": "string" + }, + "issnOnline": { + "type": "string" + }, + "issnPrinted": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sp": { + "type": "string", + "description": "Start page" + }, + "vol": { + "type": "string", + "description": "Volume" + } + }, + "description": "Information about the journal, if this data source is of type Journal." + }, + "languages": { + "description": "The languages present in the data source's content, as defined by OpenDOAR.", + "type": "array", + "items": { + "type": "string" + } + }, + "logourl": { + "type": "string" + }, + "missionstatementurl": { + "type": "string", + "description":"The URL of a mission statement describing the designated community of the data source. As defined by re3data.org" + }, + "officialname": { + "type": "string", + "description": "The official name of the datasource" + }, + "openairecompatibility": { + "type": "string", + "description": "OpenAIRE guidelines the data source comply with. See also https://guidelines.openaire.eu." + }, + "originalId": { + "description": "Original identifiers for the datasource" + "type": "array", + "items": { + "type": "string" + } + }, + "pid": { + "description": "Persistent identifiers of the datasource", + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/definitions/ControlledField" + } + ] + } + }, + "pidsystems": { + "type": "string", + "description": "The persistent identifier system that is used by the data source. As defined by re3data.org" + }, + "policies": { + "description": "Policies of the data source, as defined in OpenDOAR.", + "type": "array", + "items": { + "type": "string" + } + }, + "releaseenddate": { + "type": "string", + "description": "Date when the data source went offline or stopped ingesting new research data. As defined by re3data.org" + }, + "releasestartdate": { + "type": "string", + "description": "Releasing date of the data source, as defined by re3data.org" + }, + "subjects": { + "description": "List of subjects associated to the datasource", + "type": "array", + "items": { + "type": "string" + } + }, + "uploadrights": { + "type": "string", + "description": "Type of data upload. As defined by re3data.org: one of {open, restricted,closed}" + }, + "versioning": { + "type": "boolean", + "description": "As defined by redata.org: 'yes' if the data source supports versioning, 'no' otherwise." + }, + "websiteurl": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/organization_schema.json b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/organization_schema.json new file mode 100644 index 0000000..16afa38 --- /dev/null +++ b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/organization_schema.json @@ -0,0 +1,57 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "alternativenames": { + "description": "Alternative names that identify the organisation", + "type": "array", + "items": { + "type": "string" + } + }, + "country": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The organisation country code" + }, + "label": { + "type": "string", + "description": "The organisation country label" + } + }, + "description": "The country of the organisation" + }, + "id": { + "type": "string", + "description": "The OpenAIRE id for the organisation" + }, + "legalname": { + "type": "string" + }, + "legalshortname": { + "type": "string" + }, + "pid": { + "description": "Persistent identifiers for the organisation i.e. isni 0000000090326370", + "type": "array", + "items": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "description": "The scheme of the identifier (i.e. isni)" + }, + "value": { + "type": "string", + "description": "the value in the schema (i.e. 0000000090326370)" + } + } + } + }, + "websiteurl": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/project_schema.json b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/project_schema.json new file mode 100644 index 0000000..c811872 --- /dev/null +++ b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/project_schema.json @@ -0,0 +1,119 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "acronym": { + "type": "string" + }, + "callidentifier": { + "type": "string" + }, + "code": { + "type": "string", + "description": "The grant agreement number" + }, + "enddate": { + "type": "string" + }, + "funding": { + "description": "Funding information for the project", + "type": "array", + "items": { + "type": "object", + "properties": { + "funding_stream": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the funding stream" + }, + "id": { + "type": "string", + "description": "Id of the funding stream" + } + } + }, + "jurisdiction": { + "type": "string", + "description": "The jurisdiction of the funder (i.e. EU)" + }, + "name": { + "type": "string", + "description": "The name of the funder (European Commission)" + }, + "shortName": { + "type": "string", + "description": "The short name of the funder (EC)" + } + } + } + }, + "granted": { + "type": "object", + "properties": { + "currency": { + "type": "string", + "description": "The currency of the granted amount (e.g. EUR)" + }, + "fundedamount": { + "type": "number", + "description": "The funded amount" + }, + "totalcost": { + "type": "number", + "description": "The total cost of the project" + } + }, + "description": "The money granted to the project" + }, + "h2020programme": { + "description": "The h2020 programme funding the project", + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The code of the programme" + }, + "description": { + "type": "string", + "description": "The description of the programme" + } + } + } + }, + "id": { + "type": "string", + "description": "OpenAIRE id for the project" + }, + "keywords": { + "type": "string" + }, + "openaccessmandatefordataset": { + "type": "boolean" + }, + "openaccessmandateforpublications": { + "type": "boolean" + }, + "startdate": { + "type": "string" + }, + "subject": { + "type": "array", + "items": { + "type": "string" + } + }, + "summary": { + "type": "string" + }, + "title": { + "type": "string" + }, + "websiteurl": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/relation_schema.json b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/relation_schema.json new file mode 100644 index 0000000..98134a0 --- /dev/null +++ b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/relation_schema.json @@ -0,0 +1,68 @@ +{ + "$schema":"http://json-schema.org/draft-07/schema#", + "definitions": { + "Node": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The OpenAIRE id of the entity" + }, + "type": { + "type": "string", + "description": "The type of the entity (i.e. organisation)" + } + } + } + }, + "type":"object", + "properties": { + "provenance": { + "type": "object", + "properties": { + "provenance": { + "type": "string", + "description": "The reason why OpenAIRE holds the relation " + }, + "trust": { + "type": "string", + "description": "The trust of the relation in the range of [0,1]. Where greater the number, more the trust. Harvested relationships have typically a high trust (0.9). The trust of inferred relationship is calculated by the inference algorithm that generated them, as described in https://graph.openaire.eu/about#architecture (Enrichment --> Mining)" + } + } + }, + "reltype": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The semantics of the relation (i.e. isAuthorInstitutionOf). " + }, + "type": { + "type": "string", + "description": "the type of the relation (i.e. affiliation)" + } + }, + "description": "To represent the semantics of a relation between two entities" + }, + "source": { + "allOf": [ + {"$ref": "#/definitions/Node"}, + {"description": "The node source in the relation"} + ] + }, + "target": { + "allOf": [ + {"$ref": "#/definitions/Node"}, + {"description": "The node target in the relation"} + ] + }, + "validated":{ + "type":"boolean", + "description":"True if the relation is related to a project and it has been collected from an authoritative source (i.e. the funder)" + }, + "validationDate":{ + "type":"string", + "description":"The date when the relation was collected from OpenAIRE" + } + } +} \ No newline at end of file diff --git a/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/result_schema.json b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/result_schema.json new file mode 100644 index 0000000..a1e0952 --- /dev/null +++ b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/result_schema.json @@ -0,0 +1,417 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "ControlledField": { + "type": "object", + "properties": { + "scheme": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "description": "To represent the information described by a scheme and a value in that scheme (i.e. pid)" + }, + "Provenance": { + "type": "object", + "properties": { + "provenance": { + "type": "string", + "description": "The process that produced/provided the information" + }, + "trust": { + "type": "string" + } + }, + "description": "Indicates the process that produced (or provided) the information, and the trust associated to the information" + } + }, + "type": "object", + "properties": { + "author": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fullname": { + "type": "string" + }, + "name": { + "type": "string" + }, + "pid": { + "type": "object", + "properties": { + "id": { + "allOf": [ + {"$ref": "#/definitions/ControlledField"}, + {"description": "The author's id and scheme. OpenAIRE currently supports 'ORCID'"} + ] + }, + "provenance": { + "allOf": [ + {"$ref": "#/definitions/Provenance"}, + {"description": "Provenance of author's pid"} + ] + } + } + }, + "rank": { + "type": "integer" + }, + "surname": { + "type": "string" + } + } + } + }, + "bestaccessright":{ + "type":"object", + "properties":{ + "code": { + "type": "string", + "description": "COAR access mode code: http://vocabularies.coar-repositories.org/documentation/access_rights/" + }, + "label": { + "type": "string", + "description": "Label for the access mode" + }, + "scheme": { + "type": "string", + "description": "Scheme of reference for access right code. Always set to COAR access rights vocabulary: http://vocabularies.coar-repositories.org/documentation/access_rights/" + } + } + }, + "codeRepositoryUrl": { + "type": "string", + "description": "Only for results with type 'software': the URL to the repository with the source code" + }, + "contactgroup": { + "description": "Only for results with type 'software': Information on the group responsible for providing further information regarding the resource", + "type": "array", + "items": { + "type": "string" + } + }, + "contactperson": { + "description": "Only for results with type 'software': Information on the person responsible for providing further information regarding the resource", + "type": "array", + "items": { + "type": "string" + } + }, + "container": { + "type": "object", + "properties": { + "conferencedate": { + "type": "string" + }, + "conferenceplace": { + "type": "string" + }, + "edition": { + "type": "string", + "description": "Edition of the journal or conference proceeding" + }, + "ep": { + "type": "string", + "description": "End page" + }, + "iss": { + "type": "string", + "description": "Journal issue" + }, + "issnLinking": { + "type": "string" + }, + "issnOnline": { + "type": "string" + }, + "issnPrinted": { + "type": "string" + }, + "name": { + "type": "string", + "description": "Name of the journal or conference" + }, + "sp": { + "type": "string", + "description": "start page" + }, + "vol": { + "type": "string" + } + }, + "description": "Container has information about the conference or journal where the result has been presented or published" + }, + "contributor": { + "type": "array", + "items": { + "type": "string", + "description": "Contributors for the result" + } + }, + "country": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "ISO 3166-1 alpha-2 country code" + }, + "label": { + "type": "string" + }, + "provenance": { + "allOf": [ + {"$ref": "#/definitions/Provenance"}, + {"description": "Why this result is associated to the country."} + ] + } + } + } + }, + "coverage": { + "type": "array", + "items": { + "type": "string" + } + }, + "dateofcollection": { + "type": "string", + "description": "When OpenAIRE collected the record the last time" + }, + "description": { + "type": "array", + "items": { + "type": "string" + } + }, + "documentationUrl": { + "description": "Only for results with type 'software': URL to the software documentation", + "type": "array", + "items": { + "type": "string" + } + }, + "embargoenddate": { + "type": "string", + "description": "Date when the embargo ends and this result turns Open Access" + }, + "format": { + "type": "array", + "items": { + "type": "string" + } + }, + "geolocation": { + "description": "Geolocation information", + "type": "array", + "items": { + "type": "object", + "properties": { + "box": { + "type": "string" + }, + "place": { + "type": "string" + }, + "point": { + "type": "string" + } + } + } + }, + "id": { + "type": "string", + "description": "OpenAIRE Identifier" + }, + "instance":{ + "description":"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", + "type":"array", + "items":{ + "type":"object", + "properties":{ + "accessright":{ + "type":"object", + "properties":{ + "code": { + "type": "string", + "description": "COAR access mode code: http://vocabularies.coar-repositories.org/documentation/access_rights/" + }, + "label": { + "type": "string", + "description": "Label for the access mode" + }, + "openAccessRoute":{ + "type":"string", + "enum":[ + "gold", + "green", + "hybrid", + "bronze" + ], + "description":"The type of OpenAccess applied to the result" + }, + "scheme": { + "type": "string", + "description": "Scheme of reference for access right code. Always set to COAR access rights vocabulary: http://vocabularies.coar-repositories.org/documentation/access_rights/" + } + } + }, + "articleprocessingcharge":{ + "description": "The money spent to make this book or article available in Open Access. Source for this information is the OpenAPC initiative.", + "type":"object", + "properties":{ + "amount":{ + "type":"string" + }, + "currency":{ + "type":"string" + } + } + }, + "license":{ + "type":"string" + }, + "pid":{ + "description":"The set of persistent identifiers associated to this instance that have been collected from an authority for the pid type (i.e. Crossref/Datacite for doi)", + "type":"array", + "items":{ + "allOf":[ + { + "$ref":"#/definitions/ControlledField" + }, + { + "description":"The persistent identifier associated to the result" + } + ] + } + }, + "publicationdate":{ + "type":"string", + "description": "Date of the research product" + }, + "refereed":{ + "description": "If this instance has been peer-reviewed or not. Allowed values are peerReviewed, nonPeerReviewed, UNKNOWN (as defined in https://api.openaire.eu/vocabularies/dnet:review_levels)", + "type":"string" + }, + "type":{ + "type":"string", + "description":"The specific sub-type of this instance (see https://api.openaire.eu/vocabularies/dnet:result_typologies following the links)" + }, + "url":{ + "description":"URLs to the instance. They may link to the actual full-text or to the landing page at the hosting source. ", + "type":"array", + "items":{ + "type":"string" + } + } + } + } + }, + "language": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "alpha-3/ISO 639-2 code of the language" + }, + "label": { + "type": "string", + "description": "Language label in English" + } + } + }, + "lastupdatetimestamp": { + "type": "integer", + "description": "Timestamp of last update of the record in OpenAIRE" + }, + "maintitle": { + "type": "string", + "descriptio": "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." + }, + "subtitle": { + "type": "string", + "descriptio": "Explanatory or alternative name by which a scientific result is known." + }, + "originalId": { + "description": "Identifiers of the record at the original sources", + "type": "array", + "items": { + "type": "string" + } + }, + "pid": { + "description": "Persistent identifiers of the result", + "type": "array", + "items": { + "allOf": [ + {"$ref": "#/definitions/ControlledField"}, + {"description": "scheme: list of available schemes are at https://api.openaire.eu/vocabularies/dnet:pid_types, value: the PID of the result. Note: the result will have a pid associated only if it was collected from an authority for that pid type. For example a doi will be among the pids for one result if the result metadata were collected from Crossref or Datacite. In all the other cases, the doi will be present among the alteranteIdentifiers for the result "} + ] + } + }, + "programmingLanguage": { + "type": "string", + "description": "Only for results with type 'software': the programming language" + }, + "publicationdate": { + "type": "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 it’s the most recent among the complete and well-formed dates. If then the repository updates the metadata and set a complete date (e.g. 2020-02-12), then this will be the new date for the result because it becomes the most recent most complete date. However, if OpenAIRE then collects the pre-print from another repository with date 2019-02-03, then this will be the “winning date” because it becomes the most frequent well-formatted date." + }, + "publisher": { + "type": "string", + "description": "The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource." + }, + "size": { + "type": "string", + "description": "Only for results with type 'dataset': the declared size of the dataset" + }, + "source": { + "description": "See definition of Dublin Core field dc:source", + "type": "array", + "items": { + "type": "string" + } + }, + "subjects": { + "description": "Keywords associated to the result", + "type": "array", + "items": { + "type": "object", + "properties": { + "provenance": { + "allOf": [ + {"$ref": "#/definitions/Provenance"}, + {"description": "Why this subject is associated to the result"} + ] + }, + "subject": { + "allOf": [ + {"$ref": "#/definitions/ControlledField"}, + {"description": "OpenAIRE subject classification scheme (https://api.openaire.eu/vocabularies/dnet:subject_classification_typologies) and value. When the scheme is 'keyword', it means that the subject is free-text (i.e. not a term from a controlled vocabulary)."} + ] + } + } + } + }, + "tool": { + "description": "Only for results with type 'other': tool useful for the interpretation and/or re-used of the research product", + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "description": "Type of the result: one of 'publication', 'dataset', 'software', 'other' (see also https://api.openaire.eu/vocabularies/dnet:result_typologies)" + }, + "version": { + "type": "string", + "description": "Version of the result" + } + } +} \ No newline at end of file From 8b1bcc065d314853bb2d69822a726258286ede58 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 12 Nov 2021 15:16:44 +0100 Subject: [PATCH 041/146] - added Instance.measures field, allowing to maintain the association between them and the individual result instance - bumped pom version - updated changelog --- CHANGES.md | 1 + pom.xml | 4 ++-- src/main/java/eu/dnetlib/dhp/schema/oaf/Instance.java | 10 ++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 953d9df..bc32ae8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ | **Version** | **Changes** | **Readiness** | |---|---|---| +| 2.9.23 | [Graph model]
Added Instance.measures field, allowing to maintain the association between them and the individual result instance
[Dump model]
added json schemas | beta | | 2.8.22 | [Graph model]
minor: added serializable to the Measures model class
[Dump model]
added dedicated BestAccessRight class, used at the result level instead of AccessRight | beta | | 2.8.21 | [Graph model]
added the following relation terms Describes/IsDescribedBy, IsMetadataFor/IsMetadataOf, HasAssociationWith/HasAssociationWith, IsRequiredBy/Requires. All these are used in combination with the relation subRelType "relationship" | beta | | 2.8.20 | [Graph model]
added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | beta | diff --git a/pom.xml b/pom.xml index 663ea6e..812cf8f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.8.23-SNAPSHOT + 2.9.23-SNAPSHOT @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.8.20 + dhp-schemas-2.9.23 This module contains common schema classes meant to be used across the dnet-hadoop submodules diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Instance.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Instance.java index c4cde0c..6bb2908 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Instance.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Instance.java @@ -37,6 +37,8 @@ public class Instance implements Serializable { private Qualifier refereed; // peer-review status + private List measures; + public Field getLicense() { return license; } @@ -141,6 +143,14 @@ public class Instance implements Serializable { this.refereed = refereed; } + public List getMeasures() { + return measures; + } + + public void setMeasures(List measures) { + this.measures = measures; + } + public String toComparableString() { return String .format( From 80a29910169b3ea0ad7b7831be2496ebcf3a6292 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Mon, 15 Nov 2021 16:26:32 +0100 Subject: [PATCH 042/146] [Graph Dump] Moving the measure at the level of the instance --- .../java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java | 11 +++++++++++ .../java/eu/dnetlib/dhp/schema/dump/oaf/Result.java | 10 ++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java index abfcc2c..c6c186a 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java @@ -19,9 +19,12 @@ import java.util.List; * -pid of type List that is the list of pids associated to the result coming from authoritative sources for that pid * -alternateIdentifier of type List that is the list of pids associated to the result coming from NON authoritative * sources for that pid + * -measure list to represent the measure of beepFinder. It corresponds to measures in the model */ public class Instance implements Serializable { + private List measures; + private List pid; private List alternateIdentifier; @@ -111,4 +114,12 @@ public class Instance implements Serializable { public void setAlternateIdentifier(List alternateIdentifier) { this.alternateIdentifier = alternateIdentifier; } + + public List getMeasures() { + return measures; + } + + public void setMeasures(List measures) { + this.measures = measures; + } } diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java index 6412bfe..e5ee9b2 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java @@ -60,11 +60,11 @@ import java.util.List; * to store information about the time OpenAIRE collected the record. It corresponds to dateofcollection of the result * represented in the internal model - lasteupdatetimestamp of type String to store the timestamp of the last update of * the record. It corresponds to lastupdatetimestamp of the resord represented in the internal model - * -measure list to represent the measure of beepFinder. It corresponds to measures in the model + * */ public class Result implements Serializable { - private List measures; + private List author; @@ -378,11 +378,5 @@ public class Result implements Serializable { this.geolocation = geolocation; } - public List getMeasures() { - return measures; - } - public void setMeasures(List measures) { - this.measures = measures; - } } From 3fe8e14d5a607c816a6d4e083fb001acb2ad0159 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Mon, 15 Nov 2021 16:53:03 +0100 Subject: [PATCH 043/146] [Graph Dump] Regenerated schema for the dumped result --- .../oaf/dump/jsonschemas/result_schema.json | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/result_schema.json b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/result_schema.json index a1e0952..37a4996 100644 --- a/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/result_schema.json +++ b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/result_schema.json @@ -261,6 +261,19 @@ } } }, + "alternateIdentifier":{ + "type":"array", + "items":{ + "allOf":[ + { + "$ref":"#/definitions/ControlledField" + }, + { + "description":"All the identifiers other than pids forged by an authorithy for the pid type (i.e. Crossref for DOIs" + } + ] + } + }, "articleprocessingcharge":{ "description": "The money spent to make this book or article available in Open Access. Source for this information is the OpenAPC initiative.", "type":"object", @@ -276,6 +289,24 @@ "license":{ "type":"string" }, + "measures":{ + + "type":"array", + "items":{ + "type":"object", + "properties":{ + "key":{ + "type":"string", + "description":"The measure" + }, + "value":{ + "type":"string", + "description":"The value for the measure" + } + }, + "description":"Measures computed by BipFinder! for this instance" + } + }, "pid":{ "description":"The set of persistent identifiers associated to this instance that have been collected from an authority for the pid type (i.e. Crossref/Datacite for doi)", "type":"array", From ea5ad71286fce111248ee211500226995cf0ec01 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Tue, 16 Nov 2021 10:21:52 +0100 Subject: [PATCH 044/146] [Graph Dump] change in the description of the measures field for https://code-repo.d4science.org/D-Net/dhp-schemas/pulls/5#issuecomment-4934 and https://code-repo.d4science.org/D-Net/dhp-schemas/pulls/5#issuecomment-4933 --- .../dnetlib/dhp/schema/oaf/dump/jsonschemas/result_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/result_schema.json b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/result_schema.json index 37a4996..1a2e065 100644 --- a/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/result_schema.json +++ b/src/main/resources/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/result_schema.json @@ -304,7 +304,7 @@ "description":"The value for the measure" } }, - "description":"Measures computed by BipFinder! for this instance" + "description":"Measures computed for this instance, for example Bip!Finder ones" } }, "pid":{ From c6e733b47b152e5dab57ea6c18fe43e528579e73 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Tue, 16 Nov 2021 10:30:06 +0100 Subject: [PATCH 045/146] [Graph Dump] change in the description of the measures field for https://code-repo.d4science.org/D-Net/dhp-schemas/pulls/5#issuecomment-4934 and https://code-repo.d4science.org/D-Net/dhp-schemas/pulls/5#issuecomment-4933 --- src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java index c6c186a..c8993b6 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java @@ -19,7 +19,7 @@ import java.util.List; * -pid of type List that is the list of pids associated to the result coming from authoritative sources for that pid * -alternateIdentifier of type List that is the list of pids associated to the result coming from NON authoritative * sources for that pid - * -measure list to represent the measure of beepFinder. It corresponds to measures in the model + * -measure list to represent the measure computed for this instance (for example the Bip!Finder ones). It corresponds to measures in the model */ public class Instance implements Serializable { From ad6cf3fdaa4e054faa23da4d2391f50f103ea001 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 16 Nov 2021 10:56:08 +0100 Subject: [PATCH 046/146] [maven-release-plugin] prepare release dhp-schemas-2.9.23 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 812cf8f..8967b38 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.9.23-SNAPSHOT + 2.9.23 From 9663d50027b6e9bf17b0a71de657caae7d4f4825 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 16 Nov 2021 10:56:12 +0100 Subject: [PATCH 047/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8967b38..d1e829d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.9.23 + 2.9.24-SNAPSHOT From 95592369f22a874007b5293e636b382ddcccd678 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Wed, 17 Nov 2021 09:28:54 +0100 Subject: [PATCH 048/146] [Graph Dump] changed the type for policies from Object to String --- .../eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java index 62a32a0..de845b3 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java @@ -93,7 +93,7 @@ public class Datasource implements Serializable { private String certificates; // string - private List policies; // + private List policies; // private Container journal; // issn etc del Journal @@ -297,11 +297,11 @@ public class Datasource implements Serializable { this.certificates = certificates; } - public List getPolicies() { + public List getPolicies() { return policies; } - public void setPolicies(List policiesr3) { + public void setPolicies(List policiesr3) { this.policies = policiesr3; } From d01dce4337944f8507a93aae83bef8585747f918 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Wed, 17 Nov 2021 09:35:14 +0100 Subject: [PATCH 049/146] {Graph Dump] added dependency to pom to move the class for the generation of the schema --- pom.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d1e829d..12743ec 100644 --- a/pom.xml +++ b/pom.xml @@ -360,7 +360,12 @@ javax.persistence javax.persistence-api - + + com.github.victools + jsonschema-generator + ${jsonschemagenerator.version} + test + @@ -377,6 +382,7 @@ 2.11.12 5.6.1 3.3.3 + 4.13.0 From fb0139c09a8b165f3767be85a8d600b2eb9b60f7 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Wed, 17 Nov 2021 10:24:04 +0100 Subject: [PATCH 050/146] [Graph Dump] added test class to generate the json schema of the dump --- .../schema/oaf/dump/GenerateJsonSchema.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java diff --git a/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java b/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java new file mode 100644 index 0000000..de1e77f --- /dev/null +++ b/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java @@ -0,0 +1,27 @@ +package eu.dnetlib.dhp.schema.oaf.dump; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import com.fasterxml.jackson.databind.JsonNode; +import com.github.victools.jsonschema.generator.*; + +import eu.dnetlib.dhp.schema.dump.oaf.graph.*; + +@Disabled +class GenerateJsonSchema { + + @Test + void generateSchema() { + SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_7, + OptionPreset.PLAIN_JSON) + .with(Option.SCHEMA_VERSION_INDICATOR) + .without(Option.NONPUBLIC_NONSTATIC_FIELDS_WITHOUT_GETTERS); + configBuilder.forFields().withDescriptionResolver(field -> "Description of " + field.getDeclaredName()); + SchemaGeneratorConfig config = configBuilder.build(); + SchemaGenerator generator = new SchemaGenerator(config); + JsonNode jsonSchema = generator.generateSchema(GraphResult.class); + + System.out.println(jsonSchema.toString()); + } +} From 9c2aadac9221a418f45ef7ffe0dae724a9fc6d3a Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 18 Nov 2021 09:16:59 +0100 Subject: [PATCH 051/146] [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field --- pom.xml | 5 + .../dhp/schema/dump/oaf/AccessRight.java | 5 +- .../dnetlib/dhp/schema/dump/oaf/Author.java | 9 +- .../dhp/schema/dump/oaf/AuthorPid.java | 89 +++++++++++++++ .../dhp/schema/dump/oaf/BestAccessRight.java | 40 ++++++- .../dhp/schema/dump/oaf/Container.java | 7 ++ .../dhp/schema/dump/oaf/ControlledField.java | 7 +- .../dnetlib/dhp/schema/dump/oaf/Country.java | 36 ++++-- .../dnetlib/dhp/schema/dump/oaf/Instance.java | 107 ++++++++++++++++-- .../dnetlib/dhp/schema/dump/oaf/Language.java | 38 +++++++ .../eu/dnetlib/dhp/schema/dump/oaf/Pid.java | 45 -------- .../dhp/schema/dump/oaf/Provenance.java | 8 ++ .../dhp/schema/dump/oaf/Qualifier.java | 5 + .../dnetlib/dhp/schema/dump/oaf/Result.java | 61 +++++++--- .../dhp/schema/dump/oaf/ResultCountry.java | 41 +++++++ .../dhp/schema/dump/oaf/ResultPid.java | 42 +++++++ .../dnetlib/dhp/schema/dump/oaf/Subject.java | 59 ++++++++-- .../dump/oaf/community/CommunityResult.java | 4 + .../schema/dump/oaf/graph/GraphResult.java | 2 + .../dhp/schema/dump/oaf/graph/Node.java | 5 + .../schema/dump/oaf/graph/Organization.java | 68 ++++++++--- .../dhp/schema/dump/oaf/graph/Project.java | 70 ++++++------ .../dhp/schema/dump/oaf/graph/RelType.java | 6 + .../dhp/schema/dump/oaf/graph/Relation.java | 15 ++- .../schema/oaf/dump/GenerateJsonSchema.java | 21 +++- 25 files changed, 643 insertions(+), 152 deletions(-) create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Language.java delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Pid.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultCountry.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultPid.java diff --git a/pom.xml b/pom.xml index 12743ec..4b499a8 100644 --- a/pom.xml +++ b/pom.xml @@ -366,6 +366,11 @@ ${jsonschemagenerator.version} test + + com.github.imifou + jsonschema-module-addon + 1.2.1 + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java index 195da21..b69b423 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * AccessRight. Used to represent the result access rights. It extends the eu.dnet.lib.dhp.schema.dump.oaf.BestAccessRight * element with value for the openaccess route @@ -8,7 +10,7 @@ package eu.dnetlib.dhp.schema.dump.oaf; public class AccessRight extends BestAccessRight { - + @JsonSchema(description = "The type of OpenAccess applied to the result ") private OpenAccessRoute openAccessRoute ; @@ -28,3 +30,4 @@ public class AccessRight extends BestAccessRight { this.openAccessRoute = openAccessRoute; } } + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java index ef035a1..4a4eebe 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; /** @@ -27,7 +29,8 @@ public class Author implements Serializable { private Integer rank; - private Pid pid; + @JsonSchema(description="The author's persistent identifiers") + private AuthorPid pid; public String getFullname() { return fullname; @@ -61,11 +64,11 @@ public class Author implements Serializable { this.rank = rank; } - public Pid getPid() { + public AuthorPid getPid() { return pid; } - public void setPid(Pid pid) { + public void setPid(AuthorPid pid) { this.pid = pid; } diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java new file mode 100644 index 0000000..0fb42db --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java @@ -0,0 +1,89 @@ + +package eu.dnetlib.dhp.schema.dump.oaf; + +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + +import java.io.Serializable; + +/** + * To represent the generic persistent identifier. It has two parameters: + * - id of type + * eu.dnetlib.dhp.schema.dump.oaf.AuthorPidSchemeValue to store the scheme and value of the Persistent Identifier. + * - provenance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance to store the provenance and trust of the information + */ +public class AuthorPid implements Serializable { + + private AuthorPidSchemeValue id; + + @JsonSchema(description="The reason why the pid was associated to the author") + private Provenance provenance; + + public AuthorPidSchemeValue getId() { + return id; + } + + public void setId(AuthorPidSchemeValue pid) { + this.id = pid; + } + + public Provenance getProvenance() { + return provenance; + } + + public void setProvenance(Provenance provenance) { + this.provenance = provenance; + } + + public static AuthorPid newInstance(AuthorPidSchemeValue pid, Provenance provenance) { + AuthorPid p = new AuthorPid(); + p.id = pid; + p.provenance = provenance; + + return p; + } + + public static AuthorPid newInstance(AuthorPidSchemeValue pid) { + AuthorPid p = new AuthorPid(); + p.id = pid; + + return p; + } + + +} + +class AuthorPidSchemeValue implements Serializable{ + + @JsonSchema(description="The author's pid scheme. OpenAIRE currently supports 'ORCID'") + private String scheme; + + @JsonSchema(description="The author's pid value in that scheme (i.e. 0000-1111-2222-3333") + private String value; + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static AuthorPidSchemeValue newInstance(String scheme, String value) { + AuthorPidSchemeValue cf = new AuthorPidSchemeValue(); + + cf.setScheme(scheme); + cf.setValue(value); + + return cf; + } +} + + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java index 71a3c34..7d73e72 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java @@ -1,16 +1,26 @@ package eu.dnetlib.dhp.schema.dump.oaf; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + +import java.io.Serializable; + /** - * BestAccessRight. Used to represent the result best access rights. It extends the eu.dnet.lib.dhp.schema.dump.oaf.Qualifier - * element with a parameter scheme of type String to store the scheme. Values for this element are found against the + * BestAccessRight. Used to represent the result best access rights. Values for this element are found against the * COAR access right scheme. The classid of the element accessright in eu.dnetlib.dhp.schema.oaf.Result is used to get * the COAR corresponding code whose value will be used to set the code parameter. The COAR label corresponding to the * COAR code will be used to set the label parameter. The scheme value will always be the one referring to the COAR * access right scheme */ -public class BestAccessRight extends Qualifier { +public class BestAccessRight implements Serializable { + @JsonSchema(description="COAR access mode code: http://vocabularies.coar-repositories.org/documentation/access_rights/") + private String code; // the classid in the Qualifier + + @JsonSchema(description="Label for the access mode") + private String label; // the classname in the Qualifier + + @JsonSchema(description="Scheme of reference for access right code. Always set to COAR access rights vocabulary: http://vocabularies.coar-repositories.org/documentation/access_rights/") private String scheme; public String getScheme() { @@ -21,11 +31,29 @@ public class BestAccessRight extends Qualifier { this.scheme = scheme; } + 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, String scheme) { BestAccessRight ar = new BestAccessRight(); - ar.setCode(code); - ar.setLabel(label); - ar.setScheme(scheme); + ar.code = code ; + ar.label = label; + ar.scheme = scheme; return ar; } } + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java index ad9ea48..85fcff7 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; /** @@ -22,6 +24,7 @@ import java.io.Serializable; */ public class Container implements Serializable { + @JsonSchema(description="Name of the journal or conference") private String name; private String issnPrinted; @@ -30,14 +33,18 @@ public class Container implements Serializable { private String issnLinking; + @JsonSchema(description="End page") private String ep; + @JsonSchema(description="Journal issue") private String iss; + @JsonSchema(description="Start page") private String sp; private String vol; + @JsonSchema(description="Edition of the journal or conference proceeding") private String edition; private String conferenceplace; diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java index cad7b8b..feb1610 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java @@ -1,14 +1,19 @@ package eu.dnetlib.dhp.schema.dump.oaf; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; /** - * To represent the information described by a scheme and a value in that scheme (i.e. pid). It has two parameters: - + * To represent the information described by a scheme and a value in that scheme (i.e. doi). It has two parameters: - * scheme of type String to store the scheme - value of type String to store the value in that scheme */ public class ControlledField implements Serializable { + @JsonSchema(description="The scheme used to express the value (i.e. doi)") private String scheme; + + @JsonSchema(description="The value expressed in the scheme (i.e. 10.1000/182)") private String value; public String getScheme() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Country.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Country.java index 3ab4d90..4378389 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Country.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Country.java @@ -1,8 +1,12 @@ package eu.dnetlib.dhp.schema.dump.oaf; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + +import java.io.Serializable; + /** - * Represents the country associated to this result. It extends eu.dnetlib.dhp.schema.dump.oaf.Qualifier with a + * Represents the country associated to the generic entity. It extends eu.dnetlib.dhp.schema.dump.oaf.Qualifier with a * provenance parameter of type eu.dnetlib.dhp.schema.dumo.oaf.Provenance. The country in not mapped if its value in the * result reprensented in the internal format is Unknown. 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 @@ -10,28 +14,36 @@ package eu.dnetlib.dhp.schema.dump.oaf; * 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 extends Qualifier { +public class Country implements Serializable { + @JsonSchema(description="ISO 3166-1 alpha-2 country code (i.e. IT)") + private String code; // the classid in the Qualifier - private Provenance provenance; + @JsonSchema(description="The label for that code (i.e. Italy)") + private String label; // the classname in the Qualifier - public Provenance getProvenance() { - return provenance; + public String getCode() { + return code; } - public void setProvenance(Provenance provenance) { - this.provenance = provenance; + public void setCode(String code) { + this.code = code; } - public static Country newInstance(String code, String label, Provenance provenance) { + 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.setProvenance(provenance); c.setCode(code); c.setLabel(label); return c; } - public static Country newInstance(String code, String label, String provenance, String trust) { - return newInstance(code, label, Provenance.newInstance(provenance, trust)); - } + } diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java index c8993b6..4820456 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java @@ -1,6 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; +import org.apache.commons.lang3.StringUtils; + import java.io.Serializable; import java.util.List; @@ -23,26 +27,37 @@ import java.util.List; */ public class Instance implements Serializable { - private List measures; + @JsonSchema(description = "Measures computed for this instance, for example Bip!Finder ones") + private List measures; - private List pid; + private List pid; - private List alternateIdentifier; + @JsonSchema(description = "All the identifiers other than pids forged by an authorithy for the pid type (i.e. Crossref for DOIs") + private List alternateIdentifier; private String license; + @JsonSchema(description = "The accessRights for this materialization of the result") private AccessRight accessright; + @JsonSchema(description = "The specific sub-type of this instance (see https://api.openaire.eu/vocabularies/dnet:result_typologies following the links)") private String type; + @JsonSchema(description = "URLs to the instance. They may link to the actual full-text or to the landing page at the hosting source. ") private List url; + @JsonSchema(description = "The money spent to make this book or article available in Open Access. Source for this information is the OpenAPC initiative.") private APC articleprocessingcharge; + @JsonSchema(description = "Date of the research product") private String publicationdate;// dateofacceptance; + @JsonSchema(description = "If this instance has been peer-reviewed or not. Allowed values are peerReviewed, " + + "nonPeerReviewed, UNKNOWN (as defined in https://api.openaire.eu/vocabularies/dnet:review_levels)") private String refereed; // peer-review status + + public String getLicense() { return license; } @@ -99,27 +114,101 @@ public class Instance implements Serializable { this.articleprocessingcharge = articleprocessingcharge; } - public List getPid() { + public List getPid() { return pid; } - public void setPid(List pid) { + public void setPid(List pid) { this.pid = pid; } - public List getAlternateIdentifier() { + public List getAlternateIdentifier() { return alternateIdentifier; } - public void setAlternateIdentifier(List alternateIdentifier) { + public void setAlternateIdentifier(List alternateIdentifier) { this.alternateIdentifier = alternateIdentifier; } - public List getMeasures() { + public List getMeasures() { return measures; } - public void setMeasures(List measures) { + public void setMeasures(List measures) { this.measures = measures; } } + +class Measure implements Serializable{ + @JsonSchema(description = "The measure (i.e. popularity)") + private String key; + + @JsonSchema(description = "The value for that measure") + private String value; + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static Measure newInstance(String key, String value) { + Measure inst = new Measure(); + inst.key = key; + inst.value = value; + return inst; + } + + @JsonIgnore + public boolean isBlank() { + return StringUtils.isBlank(key) && StringUtils.isBlank(value); + } + +} + +class AlternateIdentifier implements Serializable{ + @JsonSchema(description="The scheme of the identifier. It can be a persistent identifier (i.e. doi). If it is present in the alternate identifiers " + + "it means it has not been forged by an authority for that pid. For example we collect metadata from an institutional repository that provides " + + "as identifier for the result also the doi") + private String scheme; + + @JsonSchema(description="The value expressed in the scheme") + private String value; + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static AlternateIdentifier newInstance(String scheme, String value) { + AlternateIdentifier cf = new AlternateIdentifier(); + + cf.setScheme(scheme); + cf.setValue(value); + + return cf; + } +} + + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Language.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Language.java new file mode 100644 index 0000000..8e147e2 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Language.java @@ -0,0 +1,38 @@ +package eu.dnetlib.dhp.schema.dump.oaf; + +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + +import java.io.Serializable; + +public class Language implements Serializable { + + @JsonSchema(description="alpha-3/ISO 639-2 code of the language") + private String code; // the classid in the Qualifier + + @JsonSchema(description="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; + } +} + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Pid.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Pid.java deleted file mode 100644 index 786ddb1..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Pid.java +++ /dev/null @@ -1,45 +0,0 @@ - -package eu.dnetlib.dhp.schema.dump.oaf; - -import java.io.Serializable; - -/** - * To represent the generic persistent identifier. It has two parameters: - id of type - * eu.dnetlib.dhp.schema.dump.oaf.ControlledField to store the scheme and value of the Persistent Identifier. - - * provenance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance to store the provenance and trust of the information - */ -public class Pid implements Serializable { - private ControlledField id; - private Provenance provenance; - - public ControlledField getId() { - return id; - } - - public void setId(ControlledField pid) { - this.id = pid; - } - - public Provenance getProvenance() { - return provenance; - } - - public void setProvenance(Provenance provenance) { - this.provenance = provenance; - } - - public static Pid newInstance(ControlledField pid, Provenance provenance) { - Pid p = new Pid(); - p.id = pid; - p.provenance = provenance; - - return p; - } - - public static Pid newInstance(ControlledField pid) { - Pid p = new Pid(); - p.id = pid; - - return p; - } -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Provenance.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Provenance.java index 28fb3aa..8217cd5 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Provenance.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Provenance.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; /** @@ -9,7 +11,13 @@ import java.io.Serializable; * store the trust associated to the information */ public class Provenance implements Serializable { + + @JsonSchema(description="The process that produced/provided the information") private String provenance; + + @JsonSchema(description="The confidence on the goodness of the information. It is in the range [0,1]. Greater the number, more the trust. " + + "Harvested information has typically a high trust (0.9). The trust of inferred information is calculated by the inference algorithm that generated it," + + " as described in https://graph.openaire.eu/about#architecture (Enrichment --> Mining)") private String trust; public String getProvenance() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java index fd21424..67ccf61 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; /** @@ -10,7 +12,10 @@ import java.io.Serializable; */ public class Qualifier implements Serializable { + @JsonSchema(description="A code in vocabulary ") private String code; // the classid in the Qualifier + + @JsonSchema(description="A label for that code ") private String label; // the classname in the Qualifier public String getCode() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java index e5ee9b2..bffa647 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java @@ -1,18 +1,24 @@ package eu.dnetlib.dhp.schema.dump.oaf; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; import java.util.List; /** * To represent the dumped result. It will be extended in the dump for Research Communities - Research - * Initiative/Infrastructures. It has the following parameters: - author of type + * Initiative/Infrastructures. It has the following parameters: + * - author of type * List to describe the authors of a result. For each author in the result - * represented in the internal model one author in the esternal model is produced. - type of type String to represent + * represented in the internal model one author in the esternal model is produced. + * - type of type String to represent * the category of the result. Possible values are publication, dataset, software, other. It corresponds to - * resulttype.classname of the dumped result - language of type eu.dnetlib.dhp.schema.dump.oaf.Qualifier to store + * resulttype.classname of the dumped result + * - language of type eu.dnetlib.dhp.schema.dump.oaf.Language to store * information about the language of the result. It is dumped as - code corresponds to language.classid - value - * corresponds to language.classname - country of type List to store the country + * corresponds to language.classname + * - country of type List to store the country * list to which the result is associated. For each country in the result respresented in the internal model one country * in the external model is produces - subjects of type List to store the subjects for * the result. For each subject in the result represented in the internal model one subject in the external model is @@ -64,72 +70,97 @@ import java.util.List; */ public class Result implements Serializable { - - private List author; // resulttype allows subclassing results into publications | datasets | software + @JsonSchema(description = "Type of the result: one of 'publication', 'dataset', 'software', 'other' (see also https://api.openaire.eu/vocabularies/dnet:result_typologies)") private String type; // resulttype // common fields - private Qualifier language; + private Language language; - private List country; + @JsonSchema(description="The list of countries associated to this result") + private List country; + @JsonSchema(description="Keywords associated to the result") private List subjects; + @JsonSchema(description = "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; + @JsonSchema(description = "Explanatory or alternative name by which a scientific result is known.") private String subtitle; private List description; + @JsonSchema(description = "Main date of the research product: typically the publication or issued date. In case of a research result with different versions with different dates, the date of the result is selected as the most frequent well-formatted date. If not available, then the most recent and complete date among those that are well-formatted. For statistics, the year is extracted and the result is counted only among the result of that year. Example: Pre-print date: 2019-02-03, Article date provided by repository: 2020-02, Article date provided by Crossref: 2020, OpenAIRE will set as date 2019-02-03, because it’s the most recent among the complete and well-formed dates. If then the repository updates the metadata and set a complete date (e.g. 2020-02-12), then this will be the new date for the result because it becomes the most recent most complete date. However, if OpenAIRE then collects the pre-print from another repository with date 2019-02-03, then this will be the “winning date” because it becomes the most frequent well-formatted date.") private String publicationdate; // dateofacceptance; + @JsonSchema(description = "The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource.") private String publisher; + @JsonSchema(description = "Date when the embargo ends and this result turns Open Access") private String embargoenddate; + @JsonSchema(description = "See definition of Dublin Core field dc:source") private List source; private List format; + @JsonSchema(description="Contributors for the result") private List contributor; private List coverage; + @JsonSchema(description="The openest of the access rights of this result.") private BestAccessRight bestaccessright; + @JsonSchema(description="Container has information about the conference or journal where the result has been presented or published") private Container container;// Journal + @JsonSchema(description = "Only for results with type 'software': URL to the software documentation") private List documentationUrl; // software + @JsonSchema(description="Only for results with type 'software': the URL to the repository with the source code") private String codeRepositoryUrl; // software + @JsonSchema(description = "Only for results with type 'software': the programming language") private String programmingLanguage; // software + @JsonSchema(description="Only for results with type 'software': Information on the person responsible for providing further information regarding the resource") private List contactperson; // orp + @JsonSchema(description="Only for results with type 'software': Information on the group responsible for providing further information regarding the resource") private List contactgroup; // orp + @JsonSchema(description = "Only for results with type 'other': tool useful for the interpretation and/or re-used of the research product") private List tool; // orp + @JsonSchema(description = "Only for results with type 'dataset': the declared size of the dataset") private String size; // dataset + @JsonSchema(description = "Version of the result") private String version; // dataset + @JsonSchema(description = "Geolocation information") private List geolocation; // dataset + @JsonSchema(description = "The OpenAIRE identifiers for this result") private String id; + @JsonSchema(description = "Identifiers of the record at the original sources") private List originalId; - private List pid; + @JsonSchema(description = "Persistent identifiers of the result") + private List pid; + @JsonSchema(description="When OpenAIRE collected the record the last time") private String dateofcollection; + @JsonSchema(description = "Timestamp of last update of the record in OpenAIRE") private Long lastupdatetimestamp; + public Long getLastupdatetimestamp() { return lastupdatetimestamp; } @@ -154,11 +185,11 @@ public class Result implements Serializable { this.originalId = originalId; } - public List getPid() { + public List getPid() { return pid; } - public void setPid(List pid) { + public void setPid(List pid) { this.pid = pid; } @@ -194,19 +225,19 @@ public class Result implements Serializable { this.author = author; } - public Qualifier getLanguage() { + public Language getLanguage() { return language; } - public void setLanguage(Qualifier language) { + public void setLanguage(Language language) { this.language = language; } - public List getCountry() { + public List getCountry() { return country; } - public void setCountry(List country) { + public void setCountry(List country) { this.country = country; } diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultCountry.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultCountry.java new file mode 100644 index 0000000..5401a36 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultCountry.java @@ -0,0 +1,41 @@ +package eu.dnetlib.dhp.schema.dump.oaf; + + +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + +/** + * Represents the country associated to the generic result. It extends eu.dnetlib.dhp.schema.dump.oaf.Country with a + * provenance parameter of type eu.dnetlib.dhp.schema.dumo.oaf.Provenance. The country is not mapped if its value in the + * result reprensented in the internal format is Unknown. 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 ResultCountry extends Country { + + @JsonSchema(description="Why this result is associated to the country.") + private Provenance provenance; + + public Provenance getProvenance() { + return provenance; + } + + public void setProvenance(Provenance provenance) { + this.provenance = provenance; + } + + public static ResultCountry newInstance(String code, String label, Provenance provenance) { + ResultCountry c = new ResultCountry(); + c.setProvenance(provenance); + c.setCode(code); + c.setLabel(label); + return c; + } + + public static ResultCountry newInstance(String code, String label, String provenance, String trust) { + return newInstance(code, label, Provenance.newInstance(provenance, trust)); + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultPid.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultPid.java new file mode 100644 index 0000000..e0a29ee --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultPid.java @@ -0,0 +1,42 @@ +package eu.dnetlib.dhp.schema.dump.oaf; + +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + +import java.io.Serializable; + +public class ResultPid implements Serializable { + @JsonSchema(description="The scheme of the persistent identifier for the result (i.e. doi). " + + "If the pid is here it means the information for the pid has been collected from an authority for " + + "that pid type (i.e. Crossref/Datacite for doi). The set of authoritative pid is: doi when collected from Crossref or Datacite " + + "pmid when collected from EuroPubmed, arxiv when collected from arXiv, handle from the repositories") + private String scheme; + + @JsonSchema(description="The value expressed in the scheme (i.e. 10.1000/182)") + private String value; + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static ResultPid newInstance(String scheme, String value) { + ResultPid cf = new ResultPid(); + + cf.setScheme(scheme); + cf.setValue(value); + + return cf; + } +} + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java index 5c4bbef..f91cb50 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java @@ -1,25 +1,31 @@ package eu.dnetlib.dhp.schema.dump.oaf; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; /** - * To represent keywords associated to the result. It has two parameters: - subject of type - * eu.dnetlib.dhp.schema.dump.oaf.ControlledField to describe the subject. It mapped as: - schema it corresponds to - * qualifier.classid of the dumped subject - value it corresponds to the subject value - provenance of type - * eu.dnetlib.dhp.schema.dump.oaf.Provenance to represent the provenance of the subject. It is dumped only if dataInfo - * is not null. In this case: - provenance corresponds to dataInfo.provenanceaction.classname - trust corresponds to - * dataInfo.trust + * To represent keywords associated to the result. It has two parameters: + * - subject of type eu.dnetlib.dhp.schema.dump.oaf.SubjectSchemeValue to describe the subject. It mapped as: + * - schema it corresponds to qualifier.classid of the dumped subject + * - value it corresponds to the subject value + * - provenance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance to represent the provenance of the subject. It is dumped only if dataInfo + * is not null. In this case: + * - provenance corresponds to dataInfo.provenanceaction.classname + * - trust corresponds to dataInfo.trust */ public class Subject implements Serializable { - private ControlledField subject; + private SubjectSchemeValue subject; + + @JsonSchema(description = "Why this subject is associated to the result") private Provenance provenance; - public ControlledField getSubject() { + public SubjectSchemeValue getSubject() { return subject; } - public void setSubject(ControlledField subject) { + public void setSubject(SubjectSchemeValue subject) { this.subject = subject; } @@ -32,3 +38,38 @@ public class Subject implements Serializable { } } + +class SubjectSchemeValue implements Serializable{ + @JsonSchema(description="OpenAIRE subject classification scheme (https://api.openaire.eu/vocabularies/dnet:subject_classification_typologies).") + private String scheme; + + @JsonSchema(description="The value for the subject in the selected scheme. When the scheme is 'keyword', it means that the subject is free-text (i.e. not a term from a controlled vocabulary).") + private String value; + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static SubjectSchemeValue newInstance(String scheme, String value) { + SubjectSchemeValue cf = new SubjectSchemeValue(); + + cf.setScheme(scheme); + cf.setValue(value); + + return cf; + } + +} + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java index 690a537..9084fb9 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java @@ -3,6 +3,7 @@ package eu.dnetlib.dhp.schema.dump.oaf.community; import java.util.List; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; import eu.dnetlib.dhp.schema.dump.oaf.KeyValue; import eu.dnetlib.dhp.schema.dump.oaf.Result; @@ -26,6 +27,7 @@ public class CommunityResult extends Result { protected List collectedfrom; + @JsonSchema(description = "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; public List getInstance() { @@ -61,3 +63,5 @@ public class CommunityResult extends Result { } } + + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/GraphResult.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/GraphResult.java index 1675f9e..b60140a 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/GraphResult.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/GraphResult.java @@ -3,6 +3,7 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; import java.util.List; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; import eu.dnetlib.dhp.schema.dump.oaf.Instance; import eu.dnetlib.dhp.schema.dump.oaf.Result; @@ -12,6 +13,7 @@ import eu.dnetlib.dhp.schema.dump.oaf.Result; * the same parameter in the result represented in the internal model */ public class GraphResult extends Result { + @JsonSchema(description = "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; public List getInstance() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Node.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Node.java index 00f1a29..11aecc6 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Node.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Node.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; /** @@ -10,7 +12,10 @@ import java.io.Serializable; * while the node representing the project will have as id the id of the project and as type project */ public class Node implements Serializable { + @JsonSchema(description = "The OpenAIRE id of the entity") private String id; + + @JsonSchema(description = "The type of the entity (i.e. organisation)") private String type; public String getId() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Organization.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Organization.java index c1fd0e9..13ceac0 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Organization.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Organization.java @@ -4,25 +4,36 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; import java.io.Serializable; import java.util.List; -import eu.dnetlib.dhp.schema.dump.oaf.ControlledField; -import eu.dnetlib.dhp.schema.dump.oaf.Qualifier; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + +import eu.dnetlib.dhp.schema.dump.oaf.Country; /** - * To represent the generic organizaiton. It has the following parameters: - private String legalshortname to store the - * legalshortname of the organizaiton - private String legalname to store the legal name of the organization - private - * String websiteurl to store the websiteurl of the organization - private List alternativenames to store the - * alternative names of the organization - private Qualifier country to store the country of the organization - private - * String id to store the id of the organization - private List pid to store the list of pids for the - * organization + * To represent the generic organizaiton. It has the following parameters: + * - private String legalshortname to store the legalshortname of the organizaiton + * - private String legalname to store the legal name of the organization + * - private String websiteurl to store the websiteurl of the organization + * - private List alternativenames to store the alternative names of the organization + * - private Country country to store the country of the organization + * - private String id to store the openaire id of the organization + * - private List pid to store the list of pids for the organization */ public class Organization implements Serializable { private String legalshortname; private String legalname; private String websiteurl; + + @JsonSchema(description="Alternative names that identify the organisation") private List alternativenames; - private Qualifier country; + + @JsonSchema(description="The organisation country") + private Country country; + + @JsonSchema(description="The OpenAIRE id for the organisation") private String id; - private List pid; + + @JsonSchema(description="Persistent identifiers for the organisation i.e. isni 0000000090326370") + private List pid; public String getLegalshortname() { return legalshortname; @@ -56,11 +67,11 @@ public class Organization implements Serializable { this.alternativenames = alternativenames; } - public Qualifier getCountry() { + public Country getCountry() { return country; } - public void setCountry(Qualifier country) { + public void setCountry(Country country) { this.country = country; } @@ -72,12 +83,41 @@ public class Organization implements Serializable { this.id = id; } - public List getPid() { + public List getPid() { return pid; } - public void setPid(List pid) { + public void setPid(List pid) { this.pid = pid; } } + + +class OrganizationPid implements Serializable{ + @JsonSchema(description="The scheme of the identifier (i.e. isni)") + private String scheme; + + @JsonSchema(description="The value in the schema (i.e. 0000000090326370)") + private String value; + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +} + + + + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java index 612be9d..f2a4a75 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java @@ -34,13 +34,13 @@ import java.util.List; * - private List h2020programme to store the list of programmes the project is related to */ -public class Project implements Serializable { - private String id; +public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project { + //private String id; private String websiteurl; - private String code; - private String acronym; - private String title; + //private String code; + //private String acronym; + //private String title; private String startdate; private String enddate; @@ -62,13 +62,13 @@ public class Project implements Serializable { private List h2020programme; - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } +// public String getId() { +// return id; +// } +// +// public void setId(String id) { +// this.id = id; +// } public String getWebsiteurl() { return websiteurl; @@ -78,29 +78,29 @@ public class Project implements Serializable { 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 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; diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/RelType.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/RelType.java index 629b30e..618fff1 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/RelType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/RelType.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; /** @@ -11,7 +13,10 @@ import java.io.Serializable; * represented in theinternal model */ public class RelType implements Serializable { + @JsonSchema(description = "The semantics of the relation (i.e. isAuthorInstitutionOf). ") private String name; // relclass + + @JsonSchema(description = "The type of the relation (i.e. affiliation)") private String type; // subreltype public String getName() { @@ -37,3 +42,4 @@ public class RelType implements Serializable { return rel; } } + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java index 31af2f1..fe42211 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java @@ -4,6 +4,7 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; import java.io.Serializable; import java.util.Objects; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; import eu.dnetlib.dhp.schema.dump.oaf.Provenance; /** @@ -13,12 +14,23 @@ import eu.dnetlib.dhp.schema.dump.oaf.Provenance; * provenance of the relation */ public class Relation implements Serializable { + @JsonSchema(description = "The node source in the relation") private Node source; + + @JsonSchema(description = "The node target in the relation") private Node target; + + @JsonSchema(description = "To represent the semantics of a relation between two entities") private RelType reltype; + + @JsonSchema(description = "The reason why OpenAIRE holds the relation ") private Provenance provenance; + + @JsonSchema(description = "True if the relation is related to a project and it has been collected from an authoritative source (i.e. the funder)") private boolean validated; - private String validationDate; + + @JsonSchema(description = "The date when the relation was collected from OpenAIRE") + private String validationDate; public Node getSource() { return source; @@ -68,6 +80,7 @@ public class Relation implements Serializable { return validationDate; } + @Override public int hashCode() { diff --git a/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java b/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java index de1e77f..0bc2a46 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java +++ b/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java @@ -5,10 +5,13 @@ import org.junit.jupiter.api.Test; import com.fasterxml.jackson.databind.JsonNode; import com.github.victools.jsonschema.generator.*; +import com.fasterxml.jackson.databind.ObjectMapper; + +import com.github.imifou.jsonschema.module.addon.AddonModule; import eu.dnetlib.dhp.schema.dump.oaf.graph.*; -@Disabled +//@Disabled class GenerateJsonSchema { @Test @@ -24,4 +27,20 @@ class GenerateJsonSchema { System.out.println(jsonSchema.toString()); } + + @Test + void generateSchema2(){ + + ObjectMapper objectMapper = new ObjectMapper(); + AddonModule module = new AddonModule(); + SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(objectMapper,SchemaVersion.DRAFT_7,OptionPreset.PLAIN_JSON) + .with(module) + .with(Option.SCHEMA_VERSION_INDICATOR) + .without(Option.NONPUBLIC_NONSTATIC_FIELDS_WITHOUT_GETTERS); + SchemaGeneratorConfig config = configBuilder.build(); + SchemaGenerator generator = new SchemaGenerator(config); + JsonNode jsonSchema = generator.generateSchema(GraphResult.class); + + System.out.println(jsonSchema.toString()); + } } From baef47b3601579bf605fd77e98019af5ef885bc8 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 18 Nov 2021 09:31:40 +0100 Subject: [PATCH 052/146] Revert "[Graph Dump] added test class to generate the json schema of the dump" This reverts commit fb0139c09a8b165f3767be85a8d600b2eb9b60f7. --- .../schema/oaf/dump/GenerateJsonSchema.java | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java diff --git a/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java b/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java deleted file mode 100644 index 0bc2a46..0000000 --- a/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java +++ /dev/null @@ -1,46 +0,0 @@ -package eu.dnetlib.dhp.schema.oaf.dump; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import com.fasterxml.jackson.databind.JsonNode; -import com.github.victools.jsonschema.generator.*; -import com.fasterxml.jackson.databind.ObjectMapper; - -import com.github.imifou.jsonschema.module.addon.AddonModule; - -import eu.dnetlib.dhp.schema.dump.oaf.graph.*; - -//@Disabled -class GenerateJsonSchema { - - @Test - void generateSchema() { - SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_7, - OptionPreset.PLAIN_JSON) - .with(Option.SCHEMA_VERSION_INDICATOR) - .without(Option.NONPUBLIC_NONSTATIC_FIELDS_WITHOUT_GETTERS); - configBuilder.forFields().withDescriptionResolver(field -> "Description of " + field.getDeclaredName()); - SchemaGeneratorConfig config = configBuilder.build(); - SchemaGenerator generator = new SchemaGenerator(config); - JsonNode jsonSchema = generator.generateSchema(GraphResult.class); - - System.out.println(jsonSchema.toString()); - } - - @Test - void generateSchema2(){ - - ObjectMapper objectMapper = new ObjectMapper(); - AddonModule module = new AddonModule(); - SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(objectMapper,SchemaVersion.DRAFT_7,OptionPreset.PLAIN_JSON) - .with(module) - .with(Option.SCHEMA_VERSION_INDICATOR) - .without(Option.NONPUBLIC_NONSTATIC_FIELDS_WITHOUT_GETTERS); - SchemaGeneratorConfig config = configBuilder.build(); - SchemaGenerator generator = new SchemaGenerator(config); - JsonNode jsonSchema = generator.generateSchema(GraphResult.class); - - System.out.println(jsonSchema.toString()); - } -} From 5276cc11958cfca4e5265c8154fe079832f30902 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 18 Nov 2021 09:35:11 +0100 Subject: [PATCH 053/146] Revert "[Graph Dump] changed the type for policies from Object to String" This reverts commit 95592369f22a874007b5293e636b382ddcccd678. --- .../eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java index de845b3..62a32a0 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java @@ -93,7 +93,7 @@ public class Datasource implements Serializable { private String certificates; // string - private List policies; // + private List policies; // private Container journal; // issn etc del Journal @@ -297,11 +297,11 @@ public class Datasource implements Serializable { this.certificates = certificates; } - public List getPolicies() { + public List getPolicies() { return policies; } - public void setPolicies(List policiesr3) { + public void setPolicies(List policiesr3) { this.policies = policiesr3; } From 9e8abe59f8a63f9661914a3e721283a65fc562eb Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 18 Nov 2021 10:36:00 +0100 Subject: [PATCH 054/146] [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field - part 2 --- .../dhp/schema/dump/oaf/Container.java | 3 +- .../dnetlib/dhp/schema/dump/oaf/Funder.java | 6 + .../dnetlib/dhp/schema/dump/oaf/Project.java | 8 ++ .../dhp/schema/dump/oaf/graph/Datasource.java | 113 ++++++++++++++++-- .../dhp/schema/dump/oaf/graph/Funder.java | 3 + .../dhp/schema/dump/oaf/graph/Fundings.java | 4 + .../dhp/schema/dump/oaf/graph/Granted.java | 8 ++ .../dhp/schema/dump/oaf/graph/Programme.java | 5 + .../dhp/schema/dump/oaf/graph/Project.java | 44 ++----- .../dump/oaf/graph/ResearchCommunity.java | 3 + .../dump/oaf/graph/ResearchInitiative.java | 14 +++ 11 files changed, 164 insertions(+), 47 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java index 85fcff7..177f077 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java @@ -36,12 +36,13 @@ public class Container implements Serializable { @JsonSchema(description="End page") private String ep; - @JsonSchema(description="Journal issue") + @JsonSchema(description="Journal issue number") private String iss; @JsonSchema(description="Start page") private String sp; + @JsonSchema(description = "Volume") private String vol; @JsonSchema(description="Edition of the journal or conference proceeding") diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Funder.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Funder.java index 16cab22..112b8a6 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Funder.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Funder.java @@ -1,13 +1,19 @@ package eu.dnetlib.dhp.schema.dump.oaf; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; public class Funder implements Serializable { + + @JsonSchema(description = "The short name of the funder (EC)") private String shortName; + @JsonSchema(description = "The name of the funder (European Commission)") private String name; + @JsonSchema(description = "The jurisdiction of the funder (i.e. EU)") private String jurisdiction; public String getJurisdiction() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Project.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Project.java index 00cd7a0..96ad5e9 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Project.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Project.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; /** @@ -10,9 +12,13 @@ import java.io.Serializable; * the tile of the project */ public class Project implements Serializable { + @JsonSchema(description = "The OpenAIRE id for the project") protected String id;// OpenAIRE id + + @JsonSchema(description = "The grant agreement number") protected String code; + @JsonSchema(description = "The acronym of the project") protected String acronym; protected String title; @@ -49,3 +55,5 @@ public class Project implements Serializable { this.title = title; } } + + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java index de845b3..dace8d7 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java @@ -4,6 +4,7 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; import java.io.Serializable; import java.util.List; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; import eu.dnetlib.dhp.schema.dump.oaf.Container; import eu.dnetlib.dhp.schema.dump.oaf.ControlledField; @@ -33,70 +34,91 @@ import eu.dnetlib.dhp.schema.dump.oaf.ControlledField; * datasource. It corresponds to description.value of the datasource represented in the internal model */ public class Datasource implements Serializable { - + @JsonSchema(description = "The OpenAIRE id of the data source") private String id; // string + @JsonSchema(description = "Original identifiers for the datasource") private List originalId; // list string - private List pid; // list + @JsonSchema(description = "Persistent identifiers of the datasource") + private List pid; // list - private ControlledField datasourcetype; // value + @JsonSchema(description = "The type of the datasource. See https://api.openaire.eu/vocabularies/dnet:datasource_typologies") + private DatasourceSchemeValue datasourcetype; // value + @JsonSchema(description = "OpenAIRE guidelines the data source comply with. See also https://guidelines.openaire.eu.") private String openairecompatibility; // value + @JsonSchema(description = "The official name of the datasource") private String officialname; // string + @JsonSchema(description = "The English name of the datasource") private String englishname; // string private String websiteurl; // string private String logourl; // string + @JsonSchema(description = "The date of last validation against the OpenAIRE guidelines for the datasource records") private String dateofvalidation; // string private String description; // description + @JsonSchema(description = "List of subjects associated to the datasource") private List subjects; // List // opendoar specific fields (od*) + @JsonSchema(description = "The languages present in the data source's content, as defined by OpenDOAR.") private List languages; // odlanguages List + @JsonSchema(description = "Types of content in the data source, as defined by OpenDOAR") private List contenttypes; // odcontent types List // re3data fields + @JsonSchema(description = "Releasing date of the data source, as defined by re3data.org") private String releasestartdate; // string + @JsonSchema(description = "Date when the data source went offline or stopped ingesting new research data. As defined by re3data.org") private String releaseenddate; // string + @JsonSchema(description = "The URL of a mission statement describing the designated community of the data source. As defined by re3data.org") private String missionstatementurl; // string - // {open, restricted or closed} + @JsonSchema(description = "Type of access to the data source, as defined by re3data.org. Possible values: " + + "{open, restricted, closed}") private String accessrights; // databaseaccesstype string // {open, restricted or closed} + @JsonSchema(description = "Type of data upload. As defined by re3data.org: one of {open, restricted,closed}") private String uploadrights; // datauploadtype string - // {feeRequired, registration, other} + @JsonSchema(description = "Access restrinctions to the data source, as defined by re3data.org. One of {feeRequired, registration, other}") private String databaseaccessrestriction; // string - // {feeRequired, registration, other} + @JsonSchema(description = "Upload restrictions applied by the datasource, as defined by re3data.org. One of {feeRequired, registration, other}") private String datauploadrestriction; // string + @JsonSchema(description = "As defined by redata.org: 'yes' if the data source supports versioning, 'no' otherwise.") private Boolean versioning; // boolean + @JsonSchema(description = "The URL of the data source providing information on how to cite its items. As defined by re3data.org.") private String citationguidelineurl; // string // {yes, no, uknown} - + @JsonSchema(description = "The persistent identifier system that is used by the data source. As defined by re3data.org") private String pidsystems; // string + @JsonSchema(description = "The certificate, seal or standard the data source complies with. As defined by re3data.org.") private String certificates; // string + @JsonSchema(description = "Policies of the data source, as defined in OpenDOAR.") private List policies; // + @JsonSchema(description = "Information about the journal, if this data source is of type Journal.") private Container journal; // issn etc del Journal + public String getId() { return id; } @@ -113,19 +135,19 @@ public class Datasource implements Serializable { this.originalId = originalId; } - public List getPid() { + public List getPid() { return pid; } - public void setPid(List pid) { + public void setPid(List pid) { this.pid = pid; } - public ControlledField getDatasourcetype() { + public DatasourceSchemeValue getDatasourcetype() { return datasourcetype; } - public void setDatasourcetype(ControlledField datasourcetype) { + public void setDatasourcetype(DatasourceSchemeValue datasourcetype) { this.datasourcetype = datasourcetype; } @@ -313,3 +335,72 @@ public class Datasource implements Serializable { this.journal = journal; } } + +//TODO change the DatasourceSchemaValue to DatasourceKeyValue. The scheme is always the dnet one. What we show here is the entry in the scheme (the key) and its understandable value +class DatasourceSchemeValue implements Serializable{ + @JsonSchema(description="The scheme used to express the value (i.e. pubsrepository::journal)") + private String scheme; + + @JsonSchema(description="The value expressed in the scheme (Journal)") + private String value; + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static DatasourceSchemeValue newInstance(String scheme, String value) { + DatasourceSchemeValue cf = new DatasourceSchemeValue(); + + cf.setScheme(scheme); + cf.setValue(value); + + return cf; + } +} + +class DatasourcePid implements Serializable{ + + @JsonSchema(description="The scheme used to express the value ") + private String scheme; + + @JsonSchema(description="The value expressed in the scheme ") + private String value; + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static DatasourcePid newInstance(String scheme, String value) { + DatasourcePid cf = new DatasourcePid(); + + cf.setScheme(scheme); + cf.setValue(value); + + return cf; + } + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Funder.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Funder.java index 19e068f..81721d2 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Funder.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Funder.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To store information about the funder funding the project related to the result. It extends * eu.dnetlib.dhp.schema.dump.oaf.Funder with the following parameter: - - private @@ -8,6 +10,7 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; */ public class Funder extends eu.dnetlib.dhp.schema.dump.oaf.Funder { + @JsonSchema(description = "Description of the funding stream") private Fundings funding_stream; public Fundings getFunding_stream() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Fundings.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Fundings.java index a74c347..0b695c4 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Fundings.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Fundings.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; /** @@ -14,6 +16,7 @@ import java.io.Serializable; */ public class Fundings implements Serializable { + @JsonSchema(description = "Id of the funding stream") private String id; private String description; @@ -33,3 +36,4 @@ public class Fundings implements Serializable { this.description = description; } } + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Granted.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Granted.java index 3dec2df..22d48a2 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Granted.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Granted.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; /** @@ -9,8 +11,13 @@ import java.io.Serializable; * funded amount by the funder */ public class Granted implements Serializable { + @JsonSchema(description = "The currency of the granted amount (e.g. EUR)") private String currency; + + @JsonSchema(description = "The total cost of the project") private float totalcost; + + @JsonSchema(description = "The funded amount") private float fundedamount; public String getCurrency() { @@ -52,3 +59,4 @@ public class Granted implements Serializable { return granted; } } + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Programme.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Programme.java index 9892790..9b9113d 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Programme.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Programme.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; /** @@ -8,7 +10,10 @@ import java.io.Serializable; * to store the code of the programme - private String description to store the description of the programme */ public class Programme implements Serializable { + @JsonSchema(description = "The code of the programme") private String code; + + @JsonSchema(description = "The description of the programme") private String description; public String getCode() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java index f2a4a75..d1fa714 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; import java.util.List; @@ -35,12 +37,10 @@ import java.util.List; */ public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project { - //private String id; + private String websiteurl; - //private String code; - //private String acronym; - //private String title; + private String startdate; private String enddate; @@ -54,22 +54,17 @@ public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project { private boolean openaccessmandatefordataset; private List subject; + @JsonSchema(description = "Funding information for the project") private List funding; private String summary; + @JsonSchema(description = "The money granted to the project") private Granted granted; + @JsonSchema(description = "The h2020 programme funding the project") private List h2020programme; -// public String getId() { -// return id; -// } -// -// public void setId(String id) { -// this.id = id; -// } - public String getWebsiteurl() { return websiteurl; } @@ -78,29 +73,6 @@ public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project { 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; @@ -190,3 +162,5 @@ public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project { this.h2020programme = h2020programme; } } + + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchCommunity.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchCommunity.java index 026042c..3d4e631 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchCommunity.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchCommunity.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.util.List; /** @@ -8,6 +10,7 @@ import java.util.List; * to store the list of subjects related to the community */ public class ResearchCommunity extends ResearchInitiative { + @JsonSchema(description = "Only for research communities: the list of the subjects associated to the research community") private List subject; public List getSubject() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchInitiative.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchInitiative.java index f79cd2a..da458ed 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchInitiative.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchInitiative.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import java.io.Serializable; /** @@ -18,11 +20,22 @@ import java.io.Serializable; * zenodo_community to store the zenodo community associated to the context (main zenodo community) */ public class ResearchInitiative implements Serializable { + @JsonSchema(description = "The OpenAIRE id for the community/research infrastructure") private String id; // openaireId + + @JsonSchema(description = "The acronym of the community") private String acronym; // context id + + @JsonSchema(description = "The long name of the community") private String name; // context name + + @JsonSchema(description = "One of {Research Community, Research infrastructure}") private String type; // context type: research initiative or research community + + @JsonSchema(description = "Description of the research community/research infrastructure") private String description; + + @JsonSchema(description = "The URL of the Zenodo community associated to the Research community/Research infrastructure") private String zenodo_community; public String getZenodo_community() { @@ -73,3 +86,4 @@ public class ResearchInitiative implements Serializable { this.description = description; } } + From dabbcf7315a2ed99a66a3879adc0bf100d55a738 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 18 Nov 2021 10:49:14 +0100 Subject: [PATCH 055/146] [Graph Dump]revertng master as it was before the insertion of the annotation to automatically add comments in the schema --- .../dhp/schema/dump/oaf/AccessRight.java | 5 +- .../dnetlib/dhp/schema/dump/oaf/Author.java | 9 +- .../dhp/schema/dump/oaf/AuthorPid.java | 89 -------------- .../dhp/schema/dump/oaf/BestAccessRight.java | 40 +------ .../dhp/schema/dump/oaf/Container.java | 7 -- .../dhp/schema/dump/oaf/ControlledField.java | 7 +- .../dnetlib/dhp/schema/dump/oaf/Country.java | 36 ++---- .../dnetlib/dhp/schema/dump/oaf/Instance.java | 112 ++---------------- .../dnetlib/dhp/schema/dump/oaf/Language.java | 38 ------ .../eu/dnetlib/dhp/schema/dump/oaf/Pid.java | 44 +++++++ .../dhp/schema/dump/oaf/Provenance.java | 8 -- .../dhp/schema/dump/oaf/Qualifier.java | 5 - .../dnetlib/dhp/schema/dump/oaf/Result.java | 61 +++------- .../dhp/schema/dump/oaf/ResultCountry.java | 41 ------- .../dhp/schema/dump/oaf/ResultPid.java | 42 ------- .../dnetlib/dhp/schema/dump/oaf/Subject.java | 59 ++------- .../schema/dump/oaf/graph/GraphResult.java | 2 - .../dhp/schema/dump/oaf/graph/Node.java | 5 - .../schema/dump/oaf/graph/Organization.java | 68 +++-------- .../dhp/schema/dump/oaf/graph/Project.java | 70 +++++------ .../dhp/schema/dump/oaf/graph/RelType.java | 6 - .../dhp/schema/dump/oaf/graph/Relation.java | 13 -- 22 files changed, 150 insertions(+), 617 deletions(-) delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Language.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Pid.java delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultCountry.java delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultPid.java diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java index b69b423..195da21 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AccessRight.java @@ -1,8 +1,6 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - /** * AccessRight. Used to represent the result access rights. It extends the eu.dnet.lib.dhp.schema.dump.oaf.BestAccessRight * element with value for the openaccess route @@ -10,7 +8,7 @@ import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; public class AccessRight extends BestAccessRight { - @JsonSchema(description = "The type of OpenAccess applied to the result ") + private OpenAccessRoute openAccessRoute ; @@ -30,4 +28,3 @@ public class AccessRight extends BestAccessRight { this.openAccessRoute = openAccessRoute; } } - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java index 4a4eebe..ef035a1 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java @@ -1,8 +1,6 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; /** @@ -29,8 +27,7 @@ public class Author implements Serializable { private Integer rank; - @JsonSchema(description="The author's persistent identifiers") - private AuthorPid pid; + private Pid pid; public String getFullname() { return fullname; @@ -64,11 +61,11 @@ public class Author implements Serializable { this.rank = rank; } - public AuthorPid getPid() { + public Pid getPid() { return pid; } - public void setPid(AuthorPid pid) { + public void setPid(Pid pid) { this.pid = pid; } diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java deleted file mode 100644 index 0fb42db..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java +++ /dev/null @@ -1,89 +0,0 @@ - -package eu.dnetlib.dhp.schema.dump.oaf; - -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - -import java.io.Serializable; - -/** - * To represent the generic persistent identifier. It has two parameters: - * - id of type - * eu.dnetlib.dhp.schema.dump.oaf.AuthorPidSchemeValue to store the scheme and value of the Persistent Identifier. - * - provenance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance to store the provenance and trust of the information - */ -public class AuthorPid implements Serializable { - - private AuthorPidSchemeValue id; - - @JsonSchema(description="The reason why the pid was associated to the author") - private Provenance provenance; - - public AuthorPidSchemeValue getId() { - return id; - } - - public void setId(AuthorPidSchemeValue pid) { - this.id = pid; - } - - public Provenance getProvenance() { - return provenance; - } - - public void setProvenance(Provenance provenance) { - this.provenance = provenance; - } - - public static AuthorPid newInstance(AuthorPidSchemeValue pid, Provenance provenance) { - AuthorPid p = new AuthorPid(); - p.id = pid; - p.provenance = provenance; - - return p; - } - - public static AuthorPid newInstance(AuthorPidSchemeValue pid) { - AuthorPid p = new AuthorPid(); - p.id = pid; - - return p; - } - - -} - -class AuthorPidSchemeValue implements Serializable{ - - @JsonSchema(description="The author's pid scheme. OpenAIRE currently supports 'ORCID'") - private String scheme; - - @JsonSchema(description="The author's pid value in that scheme (i.e. 0000-1111-2222-3333") - private String value; - - public String getScheme() { - return scheme; - } - - public void setScheme(String scheme) { - this.scheme = scheme; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public static AuthorPidSchemeValue newInstance(String scheme, String value) { - AuthorPidSchemeValue cf = new AuthorPidSchemeValue(); - - cf.setScheme(scheme); - cf.setValue(value); - - return cf; - } -} - - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java index 7d73e72..71a3c34 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java @@ -1,26 +1,16 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - -import java.io.Serializable; - /** - * BestAccessRight. Used to represent the result best access rights. Values for this element are found against the + * BestAccessRight. Used to represent the result best access rights. It extends the eu.dnet.lib.dhp.schema.dump.oaf.Qualifier + * element with a parameter scheme of type String to store the scheme. Values for this element are found against the * COAR access right scheme. The classid of the element accessright in eu.dnetlib.dhp.schema.oaf.Result is used to get * the COAR corresponding code whose value will be used to set the code parameter. The COAR label corresponding to the * COAR code will be used to set the label parameter. The scheme value will always be the one referring to the COAR * access right scheme */ -public class BestAccessRight implements Serializable { +public class BestAccessRight extends Qualifier { - @JsonSchema(description="COAR access mode code: http://vocabularies.coar-repositories.org/documentation/access_rights/") - private String code; // the classid in the Qualifier - - @JsonSchema(description="Label for the access mode") - private String label; // the classname in the Qualifier - - @JsonSchema(description="Scheme of reference for access right code. Always set to COAR access rights vocabulary: http://vocabularies.coar-repositories.org/documentation/access_rights/") private String scheme; public String getScheme() { @@ -31,29 +21,11 @@ public class BestAccessRight implements Serializable { this.scheme = scheme; } - 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, String scheme) { BestAccessRight ar = new BestAccessRight(); - ar.code = code ; - ar.label = label; - ar.scheme = scheme; + ar.setCode(code); + ar.setLabel(label); + ar.setScheme(scheme); return ar; } } - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java index 85fcff7..ad9ea48 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java @@ -1,8 +1,6 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; /** @@ -24,7 +22,6 @@ import java.io.Serializable; */ public class Container implements Serializable { - @JsonSchema(description="Name of the journal or conference") private String name; private String issnPrinted; @@ -33,18 +30,14 @@ public class Container implements Serializable { private String issnLinking; - @JsonSchema(description="End page") private String ep; - @JsonSchema(description="Journal issue") private String iss; - @JsonSchema(description="Start page") private String sp; private String vol; - @JsonSchema(description="Edition of the journal or conference proceeding") private String edition; private String conferenceplace; diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java index feb1610..cad7b8b 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java @@ -1,19 +1,14 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; /** - * To represent the information described by a scheme and a value in that scheme (i.e. doi). It has two parameters: - + * To represent the information described by a scheme and a value in that scheme (i.e. pid). It has two parameters: - * scheme of type String to store the scheme - value of type String to store the value in that scheme */ public class ControlledField implements Serializable { - @JsonSchema(description="The scheme used to express the value (i.e. doi)") private String scheme; - - @JsonSchema(description="The value expressed in the scheme (i.e. 10.1000/182)") private String value; public String getScheme() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Country.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Country.java index 4378389..3ab4d90 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Country.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Country.java @@ -1,12 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - -import java.io.Serializable; - /** - * Represents the country associated to the generic entity. It extends eu.dnetlib.dhp.schema.dump.oaf.Qualifier with a + * Represents the country associated to this result. It extends eu.dnetlib.dhp.schema.dump.oaf.Qualifier with a * provenance parameter of type eu.dnetlib.dhp.schema.dumo.oaf.Provenance. The country in not mapped if its value in the * result reprensented in the internal format is Unknown. 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 @@ -14,36 +10,28 @@ import java.io.Serializable; * 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 { - @JsonSchema(description="ISO 3166-1 alpha-2 country code (i.e. IT)") - private String code; // the classid in the Qualifier +public class Country extends Qualifier { - @JsonSchema(description="The label for that code (i.e. Italy)") - private String label; // the classname in the Qualifier + private Provenance provenance; - public String getCode() { - return code; + public Provenance getProvenance() { + return provenance; } - public void setCode(String code) { - this.code = code; + public void setProvenance(Provenance provenance) { + this.provenance = provenance; } - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - - public static Country newInstance(String code, String label) { + public static Country newInstance(String code, String label, Provenance provenance) { Country c = new Country(); + c.setProvenance(provenance); c.setCode(code); c.setLabel(label); return c; } - + public static Country newInstance(String code, String label, String provenance, String trust) { + return newInstance(code, label, Provenance.newInstance(provenance, trust)); + } } diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java index 4820456..a13af02 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java @@ -1,10 +1,5 @@ - package eu.dnetlib.dhp.schema.dump.oaf; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; -import org.apache.commons.lang3.StringUtils; - import java.io.Serializable; import java.util.List; @@ -27,37 +22,24 @@ import java.util.List; */ public class Instance implements Serializable { - @JsonSchema(description = "Measures computed for this instance, for example Bip!Finder ones") - private List measures; + private List measures; - private List pid; + private List pid; - @JsonSchema(description = "All the identifiers other than pids forged by an authorithy for the pid type (i.e. Crossref for DOIs") - private List alternateIdentifier; + private List alternateIdentifier; private String license; - @JsonSchema(description = "The accessRights for this materialization of the result") private AccessRight accessright; - @JsonSchema(description = "The specific sub-type of this instance (see https://api.openaire.eu/vocabularies/dnet:result_typologies following the links)") private String type; - @JsonSchema(description = "URLs to the instance. They may link to the actual full-text or to the landing page at the hosting source. ") private List url; - @JsonSchema(description = "The money spent to make this book or article available in Open Access. Source for this information is the OpenAPC initiative.") private APC articleprocessingcharge; - @JsonSchema(description = "Date of the research product") private String publicationdate;// dateofacceptance; - - @JsonSchema(description = "If this instance has been peer-reviewed or not. Allowed values are peerReviewed, " + - "nonPeerReviewed, UNKNOWN (as defined in https://api.openaire.eu/vocabularies/dnet:review_levels)") private String refereed; // peer-review status - - - public String getLicense() { return license; } @@ -114,101 +96,27 @@ public class Instance implements Serializable { this.articleprocessingcharge = articleprocessingcharge; } - public List getPid() { + public List getPid() { return pid; } - public void setPid(List pid) { + public void setPid(List pid) { this.pid = pid; } - public List getAlternateIdentifier() { + public List getAlternateIdentifier() { return alternateIdentifier; } - public void setAlternateIdentifier(List alternateIdentifier) { + public void setAlternateIdentifier(List alternateIdentifier) { this.alternateIdentifier = alternateIdentifier; } - public List getMeasures() { + public List getMeasures() { return measures; } - public void setMeasures(List measures) { + public void setMeasures(List measures) { this.measures = measures; } -} - -class Measure implements Serializable{ - @JsonSchema(description = "The measure (i.e. popularity)") - private String key; - - @JsonSchema(description = "The value for that measure") - private String value; - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public static Measure newInstance(String key, String value) { - Measure inst = new Measure(); - inst.key = key; - inst.value = value; - return inst; - } - - @JsonIgnore - public boolean isBlank() { - return StringUtils.isBlank(key) && StringUtils.isBlank(value); - } - -} - -class AlternateIdentifier implements Serializable{ - @JsonSchema(description="The scheme of the identifier. It can be a persistent identifier (i.e. doi). If it is present in the alternate identifiers " + - "it means it has not been forged by an authority for that pid. For example we collect metadata from an institutional repository that provides " + - "as identifier for the result also the doi") - private String scheme; - - @JsonSchema(description="The value expressed in the scheme") - private String value; - - public String getScheme() { - return scheme; - } - - public void setScheme(String scheme) { - this.scheme = scheme; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public static AlternateIdentifier newInstance(String scheme, String value) { - AlternateIdentifier cf = new AlternateIdentifier(); - - cf.setScheme(scheme); - cf.setValue(value); - - return cf; - } -} - - +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Language.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Language.java deleted file mode 100644 index 8e147e2..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Language.java +++ /dev/null @@ -1,38 +0,0 @@ -package eu.dnetlib.dhp.schema.dump.oaf; - -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - -import java.io.Serializable; - -public class Language implements Serializable { - - @JsonSchema(description="alpha-3/ISO 639-2 code of the language") - private String code; // the classid in the Qualifier - - @JsonSchema(description="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; - } -} - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Pid.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Pid.java new file mode 100644 index 0000000..20848c6 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Pid.java @@ -0,0 +1,44 @@ +package eu.dnetlib.dhp.schema.dump.oaf; + +import java.io.Serializable; + +/** + * To represent the generic persistent identifier. It has two parameters: - id of type + * eu.dnetlib.dhp.schema.dump.oaf.ControlledField to store the scheme and value of the Persistent Identifier. - + * provenance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance to store the provenance and trust of the information + */ +public class Pid implements Serializable { + private ControlledField id; + private Provenance provenance; + + public ControlledField getId() { + return id; + } + + public void setId(ControlledField pid) { + this.id = pid; + } + + public Provenance getProvenance() { + return provenance; + } + + public void setProvenance(Provenance provenance) { + this.provenance = provenance; + } + + public static Pid newInstance(ControlledField pid, Provenance provenance) { + Pid p = new Pid(); + p.id = pid; + p.provenance = provenance; + + return p; + } + + public static Pid newInstance(ControlledField pid) { + Pid p = new Pid(); + p.id = pid; + + return p; + } +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Provenance.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Provenance.java index 8217cd5..28fb3aa 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Provenance.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Provenance.java @@ -1,8 +1,6 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; /** @@ -11,13 +9,7 @@ import java.io.Serializable; * store the trust associated to the information */ public class Provenance implements Serializable { - - @JsonSchema(description="The process that produced/provided the information") private String provenance; - - @JsonSchema(description="The confidence on the goodness of the information. It is in the range [0,1]. Greater the number, more the trust. " + - "Harvested information has typically a high trust (0.9). The trust of inferred information is calculated by the inference algorithm that generated it," + - " as described in https://graph.openaire.eu/about#architecture (Enrichment --> Mining)") private String trust; public String getProvenance() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java index 67ccf61..fd21424 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java @@ -1,8 +1,6 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; /** @@ -12,10 +10,7 @@ import java.io.Serializable; */ public class Qualifier implements Serializable { - @JsonSchema(description="A code in vocabulary ") private String code; // the classid in the Qualifier - - @JsonSchema(description="A label for that code ") private String label; // the classname in the Qualifier public String getCode() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java index bffa647..e5ee9b2 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java @@ -1,24 +1,18 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; import java.util.List; /** * To represent the dumped result. It will be extended in the dump for Research Communities - Research - * Initiative/Infrastructures. It has the following parameters: - * - author of type + * Initiative/Infrastructures. It has the following parameters: - author of type * List to describe the authors of a result. For each author in the result - * represented in the internal model one author in the esternal model is produced. - * - type of type String to represent + * represented in the internal model one author in the esternal model is produced. - type of type String to represent * the category of the result. Possible values are publication, dataset, software, other. It corresponds to - * resulttype.classname of the dumped result - * - language of type eu.dnetlib.dhp.schema.dump.oaf.Language to store + * resulttype.classname of the dumped result - language of type eu.dnetlib.dhp.schema.dump.oaf.Qualifier to store * information about the language of the result. It is dumped as - code corresponds to language.classid - value - * corresponds to language.classname - * - country of type List to store the country + * corresponds to language.classname - country of type List to store the country * list to which the result is associated. For each country in the result respresented in the internal model one country * in the external model is produces - subjects of type List to store the subjects for * the result. For each subject in the result represented in the internal model one subject in the external model is @@ -70,97 +64,72 @@ import java.util.List; */ public class Result implements Serializable { + + private List author; // resulttype allows subclassing results into publications | datasets | software - @JsonSchema(description = "Type of the result: one of 'publication', 'dataset', 'software', 'other' (see also https://api.openaire.eu/vocabularies/dnet:result_typologies)") private String type; // resulttype // common fields - private Language language; + private Qualifier language; - @JsonSchema(description="The list of countries associated to this result") - private List country; + private List country; - @JsonSchema(description="Keywords associated to the result") private List subjects; - @JsonSchema(description = "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; - @JsonSchema(description = "Explanatory or alternative name by which a scientific result is known.") private String subtitle; private List description; - @JsonSchema(description = "Main date of the research product: typically the publication or issued date. In case of a research result with different versions with different dates, the date of the result is selected as the most frequent well-formatted date. If not available, then the most recent and complete date among those that are well-formatted. For statistics, the year is extracted and the result is counted only among the result of that year. Example: Pre-print date: 2019-02-03, Article date provided by repository: 2020-02, Article date provided by Crossref: 2020, OpenAIRE will set as date 2019-02-03, because it’s the most recent among the complete and well-formed dates. If then the repository updates the metadata and set a complete date (e.g. 2020-02-12), then this will be the new date for the result because it becomes the most recent most complete date. However, if OpenAIRE then collects the pre-print from another repository with date 2019-02-03, then this will be the “winning date” because it becomes the most frequent well-formatted date.") private String publicationdate; // dateofacceptance; - @JsonSchema(description = "The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource.") private String publisher; - @JsonSchema(description = "Date when the embargo ends and this result turns Open Access") private String embargoenddate; - @JsonSchema(description = "See definition of Dublin Core field dc:source") private List source; private List format; - @JsonSchema(description="Contributors for the result") private List contributor; private List coverage; - @JsonSchema(description="The openest of the access rights of this result.") private BestAccessRight bestaccessright; - @JsonSchema(description="Container has information about the conference or journal where the result has been presented or published") private Container container;// Journal - @JsonSchema(description = "Only for results with type 'software': URL to the software documentation") private List documentationUrl; // software - @JsonSchema(description="Only for results with type 'software': the URL to the repository with the source code") private String codeRepositoryUrl; // software - @JsonSchema(description = "Only for results with type 'software': the programming language") private String programmingLanguage; // software - @JsonSchema(description="Only for results with type 'software': Information on the person responsible for providing further information regarding the resource") private List contactperson; // orp - @JsonSchema(description="Only for results with type 'software': Information on the group responsible for providing further information regarding the resource") private List contactgroup; // orp - @JsonSchema(description = "Only for results with type 'other': tool useful for the interpretation and/or re-used of the research product") private List tool; // orp - @JsonSchema(description = "Only for results with type 'dataset': the declared size of the dataset") private String size; // dataset - @JsonSchema(description = "Version of the result") private String version; // dataset - @JsonSchema(description = "Geolocation information") private List geolocation; // dataset - @JsonSchema(description = "The OpenAIRE identifiers for this result") private String id; - @JsonSchema(description = "Identifiers of the record at the original sources") private List originalId; - @JsonSchema(description = "Persistent identifiers of the result") - private List pid; + private List pid; - @JsonSchema(description="When OpenAIRE collected the record the last time") private String dateofcollection; - @JsonSchema(description = "Timestamp of last update of the record in OpenAIRE") private Long lastupdatetimestamp; - public Long getLastupdatetimestamp() { return lastupdatetimestamp; } @@ -185,11 +154,11 @@ public class Result implements Serializable { this.originalId = originalId; } - public List getPid() { + public List getPid() { return pid; } - public void setPid(List pid) { + public void setPid(List pid) { this.pid = pid; } @@ -225,19 +194,19 @@ public class Result implements Serializable { this.author = author; } - public Language getLanguage() { + public Qualifier getLanguage() { return language; } - public void setLanguage(Language language) { + public void setLanguage(Qualifier language) { this.language = language; } - public List getCountry() { + public List getCountry() { return country; } - public void setCountry(List country) { + public void setCountry(List country) { this.country = country; } diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultCountry.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultCountry.java deleted file mode 100644 index 5401a36..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultCountry.java +++ /dev/null @@ -1,41 +0,0 @@ -package eu.dnetlib.dhp.schema.dump.oaf; - - -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - -/** - * Represents the country associated to the generic result. It extends eu.dnetlib.dhp.schema.dump.oaf.Country with a - * provenance parameter of type eu.dnetlib.dhp.schema.dumo.oaf.Provenance. The country is not mapped if its value in the - * result reprensented in the internal format is Unknown. 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 ResultCountry extends Country { - - @JsonSchema(description="Why this result is associated to the country.") - private Provenance provenance; - - public Provenance getProvenance() { - return provenance; - } - - public void setProvenance(Provenance provenance) { - this.provenance = provenance; - } - - public static ResultCountry newInstance(String code, String label, Provenance provenance) { - ResultCountry c = new ResultCountry(); - c.setProvenance(provenance); - c.setCode(code); - c.setLabel(label); - return c; - } - - public static ResultCountry newInstance(String code, String label, String provenance, String trust) { - return newInstance(code, label, Provenance.newInstance(provenance, trust)); - } -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultPid.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultPid.java deleted file mode 100644 index e0a29ee..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultPid.java +++ /dev/null @@ -1,42 +0,0 @@ -package eu.dnetlib.dhp.schema.dump.oaf; - -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - -import java.io.Serializable; - -public class ResultPid implements Serializable { - @JsonSchema(description="The scheme of the persistent identifier for the result (i.e. doi). " + - "If the pid is here it means the information for the pid has been collected from an authority for " + - "that pid type (i.e. Crossref/Datacite for doi). The set of authoritative pid is: doi when collected from Crossref or Datacite " + - "pmid when collected from EuroPubmed, arxiv when collected from arXiv, handle from the repositories") - private String scheme; - - @JsonSchema(description="The value expressed in the scheme (i.e. 10.1000/182)") - private String value; - - public String getScheme() { - return scheme; - } - - public void setScheme(String scheme) { - this.scheme = scheme; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public static ResultPid newInstance(String scheme, String value) { - ResultPid cf = new ResultPid(); - - cf.setScheme(scheme); - cf.setValue(value); - - return cf; - } -} - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java index f91cb50..5c4bbef 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java @@ -1,31 +1,25 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; /** - * To represent keywords associated to the result. It has two parameters: - * - subject of type eu.dnetlib.dhp.schema.dump.oaf.SubjectSchemeValue to describe the subject. It mapped as: - * - schema it corresponds to qualifier.classid of the dumped subject - * - value it corresponds to the subject value - * - provenance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance to represent the provenance of the subject. It is dumped only if dataInfo - * is not null. In this case: - * - provenance corresponds to dataInfo.provenanceaction.classname - * - trust corresponds to dataInfo.trust + * To represent keywords associated to the result. It has two parameters: - subject of type + * eu.dnetlib.dhp.schema.dump.oaf.ControlledField to describe the subject. It mapped as: - schema it corresponds to + * qualifier.classid of the dumped subject - value it corresponds to the subject value - provenance of type + * eu.dnetlib.dhp.schema.dump.oaf.Provenance to represent the provenance of the subject. It is dumped only if dataInfo + * is not null. In this case: - provenance corresponds to dataInfo.provenanceaction.classname - trust corresponds to + * dataInfo.trust */ public class Subject implements Serializable { - private SubjectSchemeValue subject; - - @JsonSchema(description = "Why this subject is associated to the result") + private ControlledField subject; private Provenance provenance; - public SubjectSchemeValue getSubject() { + public ControlledField getSubject() { return subject; } - public void setSubject(SubjectSchemeValue subject) { + public void setSubject(ControlledField subject) { this.subject = subject; } @@ -38,38 +32,3 @@ public class Subject implements Serializable { } } - -class SubjectSchemeValue implements Serializable{ - @JsonSchema(description="OpenAIRE subject classification scheme (https://api.openaire.eu/vocabularies/dnet:subject_classification_typologies).") - private String scheme; - - @JsonSchema(description="The value for the subject in the selected scheme. When the scheme is 'keyword', it means that the subject is free-text (i.e. not a term from a controlled vocabulary).") - private String value; - - public String getScheme() { - return scheme; - } - - public void setScheme(String scheme) { - this.scheme = scheme; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public static SubjectSchemeValue newInstance(String scheme, String value) { - SubjectSchemeValue cf = new SubjectSchemeValue(); - - cf.setScheme(scheme); - cf.setValue(value); - - return cf; - } - -} - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/GraphResult.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/GraphResult.java index b60140a..1675f9e 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/GraphResult.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/GraphResult.java @@ -3,7 +3,6 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; import java.util.List; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; import eu.dnetlib.dhp.schema.dump.oaf.Instance; import eu.dnetlib.dhp.schema.dump.oaf.Result; @@ -13,7 +12,6 @@ import eu.dnetlib.dhp.schema.dump.oaf.Result; * the same parameter in the result represented in the internal model */ public class GraphResult extends Result { - @JsonSchema(description = "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; public List getInstance() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Node.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Node.java index 11aecc6..00f1a29 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Node.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Node.java @@ -1,8 +1,6 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; /** @@ -12,10 +10,7 @@ import java.io.Serializable; * while the node representing the project will have as id the id of the project and as type project */ public class Node implements Serializable { - @JsonSchema(description = "The OpenAIRE id of the entity") private String id; - - @JsonSchema(description = "The type of the entity (i.e. organisation)") private String type; public String getId() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Organization.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Organization.java index 13ceac0..c1fd0e9 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Organization.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Organization.java @@ -4,36 +4,25 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; import java.io.Serializable; import java.util.List; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - -import eu.dnetlib.dhp.schema.dump.oaf.Country; +import eu.dnetlib.dhp.schema.dump.oaf.ControlledField; +import eu.dnetlib.dhp.schema.dump.oaf.Qualifier; /** - * To represent the generic organizaiton. It has the following parameters: - * - private String legalshortname to store the legalshortname of the organizaiton - * - private String legalname to store the legal name of the organization - * - private String websiteurl to store the websiteurl of the organization - * - private List alternativenames to store the alternative names of the organization - * - private Country country to store the country of the organization - * - private String id to store the openaire id of the organization - * - private List pid to store the list of pids for the organization + * To represent the generic organizaiton. It has the following parameters: - private String legalshortname to store the + * legalshortname of the organizaiton - private String legalname to store the legal name of the organization - private + * String websiteurl to store the websiteurl of the organization - private List alternativenames to store the + * alternative names of the organization - private Qualifier country to store the country of the organization - private + * String id to store the id of the organization - private List pid to store the list of pids for the + * organization */ public class Organization implements Serializable { private String legalshortname; private String legalname; private String websiteurl; - - @JsonSchema(description="Alternative names that identify the organisation") private List alternativenames; - - @JsonSchema(description="The organisation country") - private Country country; - - @JsonSchema(description="The OpenAIRE id for the organisation") + private Qualifier country; private String id; - - @JsonSchema(description="Persistent identifiers for the organisation i.e. isni 0000000090326370") - private List pid; + private List pid; public String getLegalshortname() { return legalshortname; @@ -67,11 +56,11 @@ public class Organization implements Serializable { this.alternativenames = alternativenames; } - public Country getCountry() { + public Qualifier getCountry() { return country; } - public void setCountry(Country country) { + public void setCountry(Qualifier country) { this.country = country; } @@ -83,41 +72,12 @@ public class Organization implements Serializable { this.id = id; } - public List getPid() { + public List getPid() { return pid; } - public void setPid(List pid) { + public void setPid(List pid) { this.pid = pid; } } - - -class OrganizationPid implements Serializable{ - @JsonSchema(description="The scheme of the identifier (i.e. isni)") - private String scheme; - - @JsonSchema(description="The value in the schema (i.e. 0000000090326370)") - private String value; - - public String getScheme() { - return scheme; - } - - public void setScheme(String scheme) { - this.scheme = scheme; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } -} - - - - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java index f2a4a75..612be9d 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java @@ -34,13 +34,13 @@ import java.util.List; * - private List h2020programme to store the list of programmes the project is related to */ -public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project { - //private String id; +public class Project implements Serializable { + private String id; private String websiteurl; - //private String code; - //private String acronym; - //private String title; + private String code; + private String acronym; + private String title; private String startdate; private String enddate; @@ -62,13 +62,13 @@ public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project { private List h2020programme; -// public String getId() { -// return id; -// } -// -// public void setId(String id) { -// this.id = id; -// } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } public String getWebsiteurl() { return websiteurl; @@ -78,29 +78,29 @@ public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project { 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 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; diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/RelType.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/RelType.java index 618fff1..629b30e 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/RelType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/RelType.java @@ -1,8 +1,6 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; /** @@ -13,10 +11,7 @@ import java.io.Serializable; * represented in theinternal model */ public class RelType implements Serializable { - @JsonSchema(description = "The semantics of the relation (i.e. isAuthorInstitutionOf). ") private String name; // relclass - - @JsonSchema(description = "The type of the relation (i.e. affiliation)") private String type; // subreltype public String getName() { @@ -42,4 +37,3 @@ public class RelType implements Serializable { return rel; } } - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java index fe42211..ee580b6 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java @@ -4,7 +4,6 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; import java.io.Serializable; import java.util.Objects; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; import eu.dnetlib.dhp.schema.dump.oaf.Provenance; /** @@ -14,22 +13,11 @@ import eu.dnetlib.dhp.schema.dump.oaf.Provenance; * provenance of the relation */ public class Relation implements Serializable { - @JsonSchema(description = "The node source in the relation") private Node source; - - @JsonSchema(description = "The node target in the relation") private Node target; - - @JsonSchema(description = "To represent the semantics of a relation between two entities") private RelType reltype; - - @JsonSchema(description = "The reason why OpenAIRE holds the relation ") private Provenance provenance; - - @JsonSchema(description = "True if the relation is related to a project and it has been collected from an authoritative source (i.e. the funder)") private boolean validated; - - @JsonSchema(description = "The date when the relation was collected from OpenAIRE") private String validationDate; public Node getSource() { @@ -80,7 +68,6 @@ public class Relation implements Serializable { return validationDate; } - @Override public int hashCode() { From fd0f1d5068ee326e3200622f6a740df409622a7d Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 18 Nov 2021 11:01:44 +0100 Subject: [PATCH 056/146] [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field - refactoring --- .../java/eu/dnetlib/dhp/schema/dump/oaf/Author.java | 4 ++-- .../eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java | 6 ++---- .../dnetlib/dhp/schema/dump/oaf/BestAccessRight.java | 5 ++--- .../eu/dnetlib/dhp/schema/dump/oaf/Container.java | 4 ++-- .../dnetlib/dhp/schema/dump/oaf/ControlledField.java | 4 ++-- .../java/eu/dnetlib/dhp/schema/dump/oaf/Country.java | 4 ++-- .../java/eu/dnetlib/dhp/schema/dump/oaf/Funder.java | 4 ++-- .../java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java | 11 +++++------ .../java/eu/dnetlib/dhp/schema/dump/oaf/Language.java | 5 ++--- .../java/eu/dnetlib/dhp/schema/dump/oaf/Project.java | 6 ++---- .../eu/dnetlib/dhp/schema/dump/oaf/Provenance.java | 4 ++-- .../eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java | 4 ++-- .../java/eu/dnetlib/dhp/schema/dump/oaf/Result.java | 4 ++-- .../eu/dnetlib/dhp/schema/dump/oaf/ResultCountry.java | 1 - .../eu/dnetlib/dhp/schema/dump/oaf/ResultPid.java | 5 ++--- .../java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java | 5 ++--- .../schema/dump/oaf/community/CommunityResult.java | 3 +-- .../dnetlib/dhp/schema/dump/oaf/graph/Datasource.java | 1 + .../dnetlib/dhp/schema/dump/oaf/graph/Fundings.java | 5 ++--- .../eu/dnetlib/dhp/schema/dump/oaf/graph/Granted.java | 5 ++--- .../dhp/schema/dump/oaf/graph/GraphResult.java | 1 + .../eu/dnetlib/dhp/schema/dump/oaf/graph/Node.java | 4 ++-- .../dnetlib/dhp/schema/dump/oaf/graph/Programme.java | 4 ++-- .../eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java | 6 ++---- .../eu/dnetlib/dhp/schema/dump/oaf/graph/RelType.java | 5 ++--- .../dnetlib/dhp/schema/dump/oaf/graph/Relation.java | 1 + .../dhp/schema/dump/oaf/graph/ResearchCommunity.java | 4 ++-- .../dhp/schema/dump/oaf/graph/ResearchInitiative.java | 5 ++--- .../dhp/schema/oaf/dump/GenerateJsonSchema.java | 3 +-- 29 files changed, 54 insertions(+), 69 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java index 4a4eebe..3c7710b 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * Used to represent the generic author of the result. It has six parameters: - name of type String to store the given * name of the author. The value for this parameter corresponds to eu.dnetlib.dhp.schema.oaf.Author name - surname of diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java index 0fb42db..2ad55c0 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To represent the generic persistent identifier. It has two parameters: * - id of type @@ -85,5 +85,3 @@ class AuthorPidSchemeValue implements Serializable{ return cf; } } - - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java index 7d73e72..06ec001 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/BestAccessRight.java @@ -1,9 +1,9 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * BestAccessRight. Used to represent the result best access rights. Values for this element are found against the * COAR access right scheme. The classid of the element accessright in eu.dnetlib.dhp.schema.oaf.Result is used to get @@ -56,4 +56,3 @@ public class BestAccessRight implements Serializable { return ar; } } - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java index 177f077..bef5f74 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Container.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To store information about the conference or journal where the result has been presented or published. It contains * eleven parameters: - name of type String to store the name of the journal or conference. It corresponds to the diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java index feb1610..978171a 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To represent the information described by a scheme and a value in that scheme (i.e. doi). It has two parameters: - * scheme of type String to store the scheme - value of type String to store the value in that scheme diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Country.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Country.java index 4378389..0cf58b3 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Country.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Country.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * Represents the country associated to the generic entity. It extends eu.dnetlib.dhp.schema.dump.oaf.Qualifier with a * provenance parameter of type eu.dnetlib.dhp.schema.dumo.oaf.Provenance. The country in not mapped if its value in the diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Funder.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Funder.java index 112b8a6..06af521 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Funder.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Funder.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + public class Funder implements Serializable { @JsonSchema(description = "The short name of the funder (EC)") diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java index 4820456..0e634e0 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java @@ -1,13 +1,14 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; -import org.apache.commons.lang3.StringUtils; - import java.io.Serializable; import java.util.List; +import org.apache.commons.lang3.StringUtils; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * Represents the manifestations (i.e. different versions) of the result. For example: the pre-print and the published * versions are two manifestations of the same research result. It has the following parameters: - license of type @@ -210,5 +211,3 @@ class AlternateIdentifier implements Serializable{ return cf; } } - - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Language.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Language.java index 8e147e2..6d4de35 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Language.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Language.java @@ -1,9 +1,9 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + public class Language implements Serializable { @JsonSchema(description="alpha-3/ISO 639-2 code of the language") @@ -35,4 +35,3 @@ public class Language implements Serializable { return qualifier; } } - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Project.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Project.java index 96ad5e9..fc7472b 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Project.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Project.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * This class to store the common information about the project that will be dumped for community and for the whole * graph - private String id to store the id of the project (OpenAIRE id) - private String code to store the grant @@ -55,5 +55,3 @@ public class Project implements Serializable { this.title = title; } } - - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Provenance.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Provenance.java index 8217cd5..884d02d 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Provenance.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Provenance.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * Indicates the process that produced (or provided) the information, and the trust associated to the information. It * has two parameters: - provenance of type String to store the provenance of the information, - trust of type String to diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java index 67ccf61..e977ee2 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To represent the information described by a code and a value It has two parameters: - code to store the code * (generally the classid of the eu.dnetlib.dhp.schema.oaf.Qualifier element) - label to store the label (generally the diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java index bffa647..560f74b 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java @@ -1,11 +1,11 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; import java.util.List; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To represent the dumped result. It will be extended in the dump for Research Communities - Research * Initiative/Infrastructures. It has the following parameters: diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultCountry.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultCountry.java index 5401a36..df2650b 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultCountry.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultCountry.java @@ -1,6 +1,5 @@ package eu.dnetlib.dhp.schema.dump.oaf; - import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; /** diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultPid.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultPid.java index e0a29ee..f95d06e 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultPid.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ResultPid.java @@ -1,9 +1,9 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + public class ResultPid implements Serializable { @JsonSchema(description="The scheme of the persistent identifier for the result (i.e. doi). " + "If the pid is here it means the information for the pid has been collected from an authority for " + @@ -39,4 +39,3 @@ public class ResultPid implements Serializable { return cf; } } - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java index f91cb50..67a21fc 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To represent keywords associated to the result. It has two parameters: * - subject of type eu.dnetlib.dhp.schema.dump.oaf.SubjectSchemeValue to describe the subject. It mapped as: @@ -72,4 +72,3 @@ class SubjectSchemeValue implements Serializable{ } } - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java index 9084fb9..d32247f 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java @@ -4,6 +4,7 @@ package eu.dnetlib.dhp.schema.dump.oaf.community; import java.util.List; import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import eu.dnetlib.dhp.schema.dump.oaf.KeyValue; import eu.dnetlib.dhp.schema.dump.oaf.Result; @@ -63,5 +64,3 @@ public class CommunityResult extends Result { } } - - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java index dace8d7..5ec2598 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java @@ -5,6 +5,7 @@ import java.io.Serializable; import java.util.List; import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import eu.dnetlib.dhp.schema.dump.oaf.Container; import eu.dnetlib.dhp.schema.dump.oaf.ControlledField; diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Fundings.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Fundings.java index 0b695c4..56dacda 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Fundings.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Fundings.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To store inforamtion about the funding stream. It has two parameters: - private String id to store the id of the * fundings stream. The id is created by appending the shortname of the funder to the name of each level in the xml @@ -36,4 +36,3 @@ public class Fundings implements Serializable { this.description = description; } } - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Granted.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Granted.java index 22d48a2..a4d3fa2 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Granted.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Granted.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To describe the funded amount. It has the following parameters: - private String currency to store the currency of * the fund - private float totalcost to store the total cost of the project - private float fundedamount to store the @@ -59,4 +59,3 @@ public class Granted implements Serializable { return granted; } } - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/GraphResult.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/GraphResult.java index b60140a..654b75e 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/GraphResult.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/GraphResult.java @@ -4,6 +4,7 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; import java.util.List; import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import eu.dnetlib.dhp.schema.dump.oaf.Instance; import eu.dnetlib.dhp.schema.dump.oaf.Result; diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Node.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Node.java index 11aecc6..4146c01 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Node.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Node.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To represent the generic node in a relation. It has the following parameters: - private String id the openaire id of * the entity in the relation - private String type the type of the entity in the relation. Consider the generic diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Programme.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Programme.java index 9b9113d..6ffaaac 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Programme.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Programme.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To store information about the ec programme for the project. It has the following parameters: - private String code * to store the code of the programme - private String description to store the description of the programme diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java index d1fa714..63862a4 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java @@ -1,11 +1,11 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; import java.util.List; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * This is the class representing the Project in the model used for the dumps of the whole graph. At the moment the dump * of the Projects differs from the other dumps because we do not create relations between Funders (Organization) and @@ -162,5 +162,3 @@ public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project { this.h2020programme = h2020programme; } } - - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/RelType.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/RelType.java index 618fff1..9773930 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/RelType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/RelType.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To represent the semantics of the generic relation between two entities. It has the following parameters: - private * String name to store the semantics of the relation (i.e. isAuthorInstitutionOf). It corresponds to the relclass @@ -42,4 +42,3 @@ public class RelType implements Serializable { return rel; } } - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java index fe42211..07bc3c4 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Relation.java @@ -5,6 +5,7 @@ import java.io.Serializable; import java.util.Objects; import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import eu.dnetlib.dhp.schema.dump.oaf.Provenance; /** diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchCommunity.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchCommunity.java index 3d4e631..95fe861 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchCommunity.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchCommunity.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.util.List; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To represent RC entities. It extends eu.dnetlib.dhp.dump.oaf.grap.ResearchInitiative by adding the parameter subject * to store the list of subjects related to the community diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchInitiative.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchInitiative.java index da458ed..4ea9730 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchInitiative.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/ResearchInitiative.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To represent entity of type RC/RI. It has the following parameters, which are mostly derived by the profile * - private @@ -86,4 +86,3 @@ public class ResearchInitiative implements Serializable { this.description = description; } } - diff --git a/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java b/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java index 0bc2a46..a12f281 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java +++ b/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java @@ -4,10 +4,9 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import com.fasterxml.jackson.databind.JsonNode; -import com.github.victools.jsonschema.generator.*; import com.fasterxml.jackson.databind.ObjectMapper; - import com.github.imifou.jsonschema.module.addon.AddonModule; +import com.github.victools.jsonschema.generator.*; import eu.dnetlib.dhp.schema.dump.oaf.graph.*; From 82720345f07441c28165fcb430dc4ed123d37849 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 18 Nov 2021 11:23:48 +0100 Subject: [PATCH 057/146] [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field - pat 3 --- .../schema/dump/oaf/AlternateIdentifier.java | 40 +++++++++++ .../dhp/schema/dump/oaf/AuthorPid.java | 33 --------- .../schema/dump/oaf/AuthorPidSchemeValue.java | 39 +++++++++++ .../dnetlib/dhp/schema/dump/oaf/Instance.java | 69 ------------------- .../dnetlib/dhp/schema/dump/oaf/Measure.java | 44 ++++++++++++ .../dnetlib/dhp/schema/dump/oaf/Subject.java | 34 --------- .../schema/dump/oaf/SubjectSchemeValue.java | 39 +++++++++++ 7 files changed, 162 insertions(+), 136 deletions(-) create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AlternateIdentifier.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPidSchemeValue.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Measure.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/SubjectSchemeValue.java diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AlternateIdentifier.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AlternateIdentifier.java new file mode 100644 index 0000000..ca15fe1 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AlternateIdentifier.java @@ -0,0 +1,40 @@ +package eu.dnetlib.dhp.schema.dump.oaf; + +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + +import java.io.Serializable; + +public class AlternateIdentifier implements Serializable { + @JsonSchema(description="The scheme of the identifier. It can be a persistent identifier (i.e. doi). If it is present in the alternate identifiers " + + "it means it has not been forged by an authority for that pid. For example we collect metadata from an institutional repository that provides " + + "as identifier for the result also the doi") + private String scheme; + + @JsonSchema(description="The value expressed in the scheme") + private String value; + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static AlternateIdentifier newInstance(String scheme, String value) { + AlternateIdentifier cf = new AlternateIdentifier(); + + cf.setScheme(scheme); + cf.setValue(value); + + return cf; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java index 2ad55c0..e77a078 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPid.java @@ -52,36 +52,3 @@ public class AuthorPid implements Serializable { } -class AuthorPidSchemeValue implements Serializable{ - - @JsonSchema(description="The author's pid scheme. OpenAIRE currently supports 'ORCID'") - private String scheme; - - @JsonSchema(description="The author's pid value in that scheme (i.e. 0000-1111-2222-3333") - private String value; - - public String getScheme() { - return scheme; - } - - public void setScheme(String scheme) { - this.scheme = scheme; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public static AuthorPidSchemeValue newInstance(String scheme, String value) { - AuthorPidSchemeValue cf = new AuthorPidSchemeValue(); - - cf.setScheme(scheme); - cf.setValue(value); - - return cf; - } -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPidSchemeValue.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPidSchemeValue.java new file mode 100644 index 0000000..d2db604 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPidSchemeValue.java @@ -0,0 +1,39 @@ +package eu.dnetlib.dhp.schema.dump.oaf; + +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + +import java.io.Serializable; + +public class AuthorPidSchemeValue implements Serializable { + + @JsonSchema(description="The author's pid scheme. OpenAIRE currently supports 'ORCID'") + private String scheme; + + @JsonSchema(description="The author's pid value in that scheme (i.e. 0000-1111-2222-3333") + private String value; + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static AuthorPidSchemeValue newInstance(String scheme, String value) { + AuthorPidSchemeValue cf = new AuthorPidSchemeValue(); + + cf.setScheme(scheme); + cf.setValue(value); + + return cf; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java index 0e634e0..b8b2fbc 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Instance.java @@ -140,74 +140,5 @@ public class Instance implements Serializable { } } -class Measure implements Serializable{ - @JsonSchema(description = "The measure (i.e. popularity)") - private String key; - @JsonSchema(description = "The value for that measure") - private String value; - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public static Measure newInstance(String key, String value) { - Measure inst = new Measure(); - inst.key = key; - inst.value = value; - return inst; - } - - @JsonIgnore - public boolean isBlank() { - return StringUtils.isBlank(key) && StringUtils.isBlank(value); - } - -} - -class AlternateIdentifier implements Serializable{ - @JsonSchema(description="The scheme of the identifier. It can be a persistent identifier (i.e. doi). If it is present in the alternate identifiers " + - "it means it has not been forged by an authority for that pid. For example we collect metadata from an institutional repository that provides " + - "as identifier for the result also the doi") - private String scheme; - - @JsonSchema(description="The value expressed in the scheme") - private String value; - - public String getScheme() { - return scheme; - } - - public void setScheme(String scheme) { - this.scheme = scheme; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public static AlternateIdentifier newInstance(String scheme, String value) { - AlternateIdentifier cf = new AlternateIdentifier(); - - cf.setScheme(scheme); - cf.setValue(value); - - return cf; - } -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Measure.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Measure.java new file mode 100644 index 0000000..ebfbf24 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Measure.java @@ -0,0 +1,44 @@ +package eu.dnetlib.dhp.schema.dump.oaf; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; +import org.apache.commons.lang3.StringUtils; + +import java.io.Serializable; + +public class Measure implements Serializable { + @JsonSchema(description = "The measure (i.e. popularity)") + private String key; + + @JsonSchema(description = "The value for that measure") + private String value; + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static Measure newInstance(String key, String value) { + Measure inst = new Measure(); + inst.key = key; + inst.value = value; + return inst; + } + + @JsonIgnore + public boolean isBlank() { + return StringUtils.isBlank(key) && StringUtils.isBlank(value); + } + +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java index 67a21fc..2edee2f 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java @@ -38,37 +38,3 @@ public class Subject implements Serializable { } } - -class SubjectSchemeValue implements Serializable{ - @JsonSchema(description="OpenAIRE subject classification scheme (https://api.openaire.eu/vocabularies/dnet:subject_classification_typologies).") - private String scheme; - - @JsonSchema(description="The value for the subject in the selected scheme. When the scheme is 'keyword', it means that the subject is free-text (i.e. not a term from a controlled vocabulary).") - private String value; - - public String getScheme() { - return scheme; - } - - public void setScheme(String scheme) { - this.scheme = scheme; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public static SubjectSchemeValue newInstance(String scheme, String value) { - SubjectSchemeValue cf = new SubjectSchemeValue(); - - cf.setScheme(scheme); - cf.setValue(value); - - return cf; - } - -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/SubjectSchemeValue.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/SubjectSchemeValue.java new file mode 100644 index 0000000..58a6224 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/SubjectSchemeValue.java @@ -0,0 +1,39 @@ +package eu.dnetlib.dhp.schema.dump.oaf; + +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + +import java.io.Serializable; + +public class SubjectSchemeValue implements Serializable { + @JsonSchema(description="OpenAIRE subject classification scheme (https://api.openaire.eu/vocabularies/dnet:subject_classification_typologies).") + private String scheme; + + @JsonSchema(description="The value for the subject in the selected scheme. When the scheme is 'keyword', it means that the subject is free-text (i.e. not a term from a controlled vocabulary).") + private String value; + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static SubjectSchemeValue newInstance(String scheme, String value) { + SubjectSchemeValue cf = new SubjectSchemeValue(); + + cf.setScheme(scheme); + cf.setValue(value); + + return cf; + } + +} From a222c28fecd20386964143e3cdf9c3d2ce878770 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 18 Nov 2021 11:24:32 +0100 Subject: [PATCH 058/146] [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field - refactoring --- .../dnetlib/dhp/schema/dump/oaf/AlternateIdentifier.java | 4 ++-- .../dhp/schema/dump/oaf/AuthorPidSchemeValue.java | 4 ++-- .../java/eu/dnetlib/dhp/schema/dump/oaf/Measure.java | 9 +++++---- .../dnetlib/dhp/schema/dump/oaf/SubjectSchemeValue.java | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AlternateIdentifier.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AlternateIdentifier.java index ca15fe1..e48a564 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AlternateIdentifier.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AlternateIdentifier.java @@ -1,9 +1,9 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + public class AlternateIdentifier implements Serializable { @JsonSchema(description="The scheme of the identifier. It can be a persistent identifier (i.e. doi). If it is present in the alternate identifiers " + "it means it has not been forged by an authority for that pid. For example we collect metadata from an institutional repository that provides " + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPidSchemeValue.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPidSchemeValue.java index d2db604..3439514 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPidSchemeValue.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPidSchemeValue.java @@ -1,9 +1,9 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + public class AuthorPidSchemeValue implements Serializable { @JsonSchema(description="The author's pid scheme. OpenAIRE currently supports 'ORCID'") diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Measure.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Measure.java index ebfbf24..4c86001 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Measure.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Measure.java @@ -1,10 +1,11 @@ package eu.dnetlib.dhp.schema.dump.oaf; +import java.io.Serializable; + +import org.apache.commons.lang3.StringUtils; + import com.fasterxml.jackson.annotation.JsonIgnore; import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; -import org.apache.commons.lang3.StringUtils; - -import java.io.Serializable; public class Measure implements Serializable { @JsonSchema(description = "The measure (i.e. popularity)") @@ -41,4 +42,4 @@ public class Measure implements Serializable { return StringUtils.isBlank(key) && StringUtils.isBlank(value); } -} \ No newline at end of file +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/SubjectSchemeValue.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/SubjectSchemeValue.java index 58a6224..9228088 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/SubjectSchemeValue.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/SubjectSchemeValue.java @@ -1,9 +1,9 @@ package eu.dnetlib.dhp.schema.dump.oaf; -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - import java.io.Serializable; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + public class SubjectSchemeValue implements Serializable { @JsonSchema(description="OpenAIRE subject classification scheme (https://api.openaire.eu/vocabularies/dnet:subject_classification_typologies).") private String scheme; From 61400f22c2046b9f470f00fee2fac9c5177fb3e1 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 18 Nov 2021 11:49:16 +0100 Subject: [PATCH 059/146] [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field - part 4 --- .../dhp/schema/dump/oaf/graph/Datasource.java | 67 ------------------- .../schema/dump/oaf/graph/DatasourcePid.java | 40 +++++++++++ .../dump/oaf/graph/DatasourceSchemeValue.java | 39 +++++++++++ .../schema/dump/oaf/graph/Organization.java | 26 ------- .../dump/oaf/graph/OrganizationPid.java | 31 +++++++++ 5 files changed, 110 insertions(+), 93 deletions(-) create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/DatasourcePid.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/DatasourceSchemeValue.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/OrganizationPid.java diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java index 5ec2598..7081863 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java @@ -337,71 +337,4 @@ public class Datasource implements Serializable { } } -//TODO change the DatasourceSchemaValue to DatasourceKeyValue. The scheme is always the dnet one. What we show here is the entry in the scheme (the key) and its understandable value -class DatasourceSchemeValue implements Serializable{ - @JsonSchema(description="The scheme used to express the value (i.e. pubsrepository::journal)") - private String scheme; - @JsonSchema(description="The value expressed in the scheme (Journal)") - private String value; - - public String getScheme() { - return scheme; - } - - public void setScheme(String scheme) { - this.scheme = scheme; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public static DatasourceSchemeValue newInstance(String scheme, String value) { - DatasourceSchemeValue cf = new DatasourceSchemeValue(); - - cf.setScheme(scheme); - cf.setValue(value); - - return cf; - } -} - -class DatasourcePid implements Serializable{ - - @JsonSchema(description="The scheme used to express the value ") - private String scheme; - - @JsonSchema(description="The value expressed in the scheme ") - private String value; - - public String getScheme() { - return scheme; - } - - public void setScheme(String scheme) { - this.scheme = scheme; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public static DatasourcePid newInstance(String scheme, String value) { - DatasourcePid cf = new DatasourcePid(); - - cf.setScheme(scheme); - cf.setValue(value); - - return cf; - } - -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/DatasourcePid.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/DatasourcePid.java new file mode 100644 index 0000000..6ecdccc --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/DatasourcePid.java @@ -0,0 +1,40 @@ +package eu.dnetlib.dhp.schema.dump.oaf.graph; + +import java.io.Serializable; + +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + +public class DatasourcePid implements Serializable { + + @JsonSchema(description="The scheme used to express the value ") + private String scheme; + + @JsonSchema(description="The value expressed in the scheme ") + private String value; + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static DatasourcePid newInstance(String scheme, String value) { + DatasourcePid cf = new DatasourcePid(); + + cf.setScheme(scheme); + cf.setValue(value); + + return cf; + } + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/DatasourceSchemeValue.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/DatasourceSchemeValue.java new file mode 100644 index 0000000..8963444 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/DatasourceSchemeValue.java @@ -0,0 +1,39 @@ +package eu.dnetlib.dhp.schema.dump.oaf.graph; + +import java.io.Serializable; + +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + +public //TODO change the DatasourceSchemaValue to DatasourceKeyValue. The scheme is always the dnet one. What we show here is the entry in the scheme (the key) and its understandable value +class DatasourceSchemeValue implements Serializable { + @JsonSchema(description="The scheme used to express the value (i.e. pubsrepository::journal)") + private String scheme; + + @JsonSchema(description="The value expressed in the scheme (Journal)") + private String value; + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static DatasourceSchemeValue newInstance(String scheme, String value) { + DatasourceSchemeValue cf = new DatasourceSchemeValue(); + + cf.setScheme(scheme); + cf.setValue(value); + + return cf; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Organization.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Organization.java index 13ceac0..36fdff9 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Organization.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Organization.java @@ -94,30 +94,4 @@ public class Organization implements Serializable { } -class OrganizationPid implements Serializable{ - @JsonSchema(description="The scheme of the identifier (i.e. isni)") - private String scheme; - - @JsonSchema(description="The value in the schema (i.e. 0000000090326370)") - private String value; - - public String getScheme() { - return scheme; - } - - public void setScheme(String scheme) { - this.scheme = scheme; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } -} - - - diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/OrganizationPid.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/OrganizationPid.java new file mode 100644 index 0000000..cbec156 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/OrganizationPid.java @@ -0,0 +1,31 @@ +package eu.dnetlib.dhp.schema.dump.oaf.graph; + +import java.io.Serializable; + +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + +public + +class OrganizationPid implements Serializable { + @JsonSchema(description="The scheme of the identifier (i.e. isni)") + private String scheme; + + @JsonSchema(description="The value in the schema (i.e. 0000000090326370)") + private String value; + + public String getScheme() { + return scheme; + } + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +} From 823b4cc2100f085a23f4174d5525623eabd7224b Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 18 Nov 2021 11:55:43 +0100 Subject: [PATCH 060/146] [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field - part 5 --- .../dhp/schema/dump/oaf/graph/OrganizationPid.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/OrganizationPid.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/OrganizationPid.java index cbec156..399daec 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/OrganizationPid.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/OrganizationPid.java @@ -28,4 +28,15 @@ class OrganizationPid implements Serializable { public void setValue(String value) { this.value = value; } + + public static OrganizationPid newInstance(String scheme, String value) { + OrganizationPid cf = new OrganizationPid(); + + cf.setScheme(scheme); + cf.setValue(value); + + return cf; + } + + } From 11e062f54c4b9413f4de88e2e5e8daaba1c87a33 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Fri, 19 Nov 2021 14:42:12 +0100 Subject: [PATCH 061/146] [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field - part 6 --- pom.xml | 32 ++++++++- .../dhp/schema/dump/ExecCreateSchemas.java | 72 +++++++++++++++++++ .../schema/dump/oaf/AuthorPidSchemeValue.java | 2 +- .../dhp/schema/dump/oaf/ControlledField.java | 43 ----------- .../dnetlib/dhp/schema/dump/oaf/Funder.java | 2 +- .../dnetlib/dhp/schema/dump/oaf/KeyValue.java | 48 ------------- .../dhp/schema/dump/oaf/Qualifier.java | 43 ----------- .../dump/oaf/community/CfHbKeyValue.java | 46 ++++++++++++ .../dump/oaf/community/CommunityInstance.java | 18 +++-- .../dump/oaf/community/CommunityResult.java | 10 +-- .../schema/dump/oaf/community/Context.java | 29 +++++++- .../dhp/schema/dump/oaf/community/Funder.java | 3 + .../schema/dump/oaf/community/Project.java | 3 + .../dhp/schema/dump/oaf/graph/Datasource.java | 1 - .../schema/oaf/dump/GenerateJsonSchema.java | 10 +++ 15 files changed, 211 insertions(+), 151 deletions(-) create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/ExecCreateSchemas.java delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/KeyValue.java delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CfHbKeyValue.java diff --git a/pom.xml b/pom.xml index 4b499a8..4ceda6a 100644 --- a/pom.xml +++ b/pom.xml @@ -137,7 +137,23 @@ maven-dependency-plugin 3.0.0 + + org.codehaus.mojo + exec-maven-plugin + 3.0.0 + + + + com.fasterxml.jackson.core + jackson-databind + ${dhp.jackson.version} + + + + + + @@ -229,6 +245,19 @@ ${scala.version} + + org.codehaus.mojo + exec-maven-plugin + + true + eu.dnetlib.dhp.schema.dump.ExecCreateSchemas + + eu.dnetlib.dhp.schema.dump.oaf.GraphResult;eu.dnetlib.dhp.schema.dump.oaf.graph.Organization;eu.dnetlib.dhp.schema.dump.oaf.graph.Project + + + + + @@ -364,13 +393,14 @@ com.github.victools jsonschema-generator ${jsonschemagenerator.version} - test + com.github.imifou jsonschema-module-addon 1.2.1 + diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/ExecCreateSchemas.java b/src/main/java/eu/dnetlib/dhp/schema/dump/ExecCreateSchemas.java new file mode 100644 index 0000000..2b25caf --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/ExecCreateSchemas.java @@ -0,0 +1,72 @@ +package eu.dnetlib.dhp.schema.dump; + +import java.io.*; +import java.lang.reflect.Type; +import java.nio.file.Files; +import java.nio.file.Paths; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.github.imifou.jsonschema.module.addon.AddonModule; +import com.github.victools.jsonschema.generator.*; + +import eu.dnetlib.dhp.schema.dump.oaf.community.CommunityResult; +import eu.dnetlib.dhp.schema.dump.oaf.graph.*; + +public class ExecCreateSchemas { + + SchemaGenerator generator; + + private void init(){ + + AddonModule module = new AddonModule(); + SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder( + new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT), + SchemaVersion.DRAFT_7, + OptionPreset.PLAIN_JSON) + .with(module) + .with(Option.SCHEMA_VERSION_INDICATOR) + .without(Option.NONPUBLIC_NONSTATIC_FIELDS_WITHOUT_GETTERS); + SchemaGeneratorConfig config = configBuilder.build(); + generator = new SchemaGenerator(config); + } + + private void generate(Type targetType, String directory, String filename) throws IOException { + JsonNode jsonSchema = generator.generateSchema(targetType); + + if(!Files.exists(Paths.get(directory))){ + Files.createDirectories(Paths.get(directory)); + } + + if(!Files.exists(Paths.get(directory + filename))) { + Files.createFile(Paths.get(directory + filename)); + } + + File f = new File(directory + filename); + + try(PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(f)))) { + writer.println(new ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(jsonSchema)); + } + + + } + public static void main(String[] args) throws IOException { + + ExecCreateSchemas ecs = new ExecCreateSchemas(); + ecs.init(); + ecs.generate(GraphResult.class, "/tmp/jsonschemas/" , "result_schema.json"); + ecs.generate(ResearchCommunity.class, "/tmp/jsonschemas/" , "community_infrastructure_schema.json"); + ecs.generate(Datasource.class, "/tmp/jsonschemas/" , "datasource_schema.json"); + ecs.generate(Project.class, "/tmp/jsonschemas/" , "project_schema.json"); + ecs.generate(Relation.class, "/tmp/jsonschemas/" , "relation_schema.json"); + ecs.generate(Organization.class, "/tmp/jsonschemas/" , "organization_schema.json"); + + ecs.generate(CommunityResult.class, "/tmp/jsonschemas/" , "community_result_schema.json"); + + + + + + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPidSchemeValue.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPidSchemeValue.java index 3439514..3e22c9f 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPidSchemeValue.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/AuthorPidSchemeValue.java @@ -9,7 +9,7 @@ public class AuthorPidSchemeValue implements Serializable { @JsonSchema(description="The author's pid scheme. OpenAIRE currently supports 'ORCID'") private String scheme; - @JsonSchema(description="The author's pid value in that scheme (i.e. 0000-1111-2222-3333") + @JsonSchema(description="The author's pid value in that scheme (i.e. 0000-1111-2222-3333)") private String value; public String getScheme() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java deleted file mode 100644 index 978171a..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java +++ /dev/null @@ -1,43 +0,0 @@ - -package eu.dnetlib.dhp.schema.dump.oaf; - -import java.io.Serializable; - -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - -/** - * To represent the information described by a scheme and a value in that scheme (i.e. doi). It has two parameters: - - * scheme of type String to store the scheme - value of type String to store the value in that scheme - */ -public class ControlledField implements Serializable { - @JsonSchema(description="The scheme used to express the value (i.e. doi)") - private String scheme; - - @JsonSchema(description="The value expressed in the scheme (i.e. 10.1000/182)") - private String value; - - public String getScheme() { - return scheme; - } - - public void setScheme(String scheme) { - this.scheme = scheme; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public static ControlledField newInstance(String scheme, String value) { - ControlledField cf = new ControlledField(); - - cf.setScheme(scheme); - cf.setValue(value); - - return cf; - } -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Funder.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Funder.java index 06af521..674b8b3 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Funder.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Funder.java @@ -13,7 +13,7 @@ public class Funder implements Serializable { @JsonSchema(description = "The name of the funder (European Commission)") private String name; - @JsonSchema(description = "The jurisdiction of the funder (i.e. EU)") + @JsonSchema(description = "Geographical jurisdiction (e.g. for European Commission is EU, for Croatian Science Foundation is HR)") private String jurisdiction; public String getJurisdiction() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/KeyValue.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/KeyValue.java deleted file mode 100644 index 849aa4d..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/KeyValue.java +++ /dev/null @@ -1,48 +0,0 @@ - -package eu.dnetlib.dhp.schema.dump.oaf; - -import java.io.Serializable; - -import org.apache.commons.lang3.StringUtils; - -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** - * To represent the information described by a key and a value. It has two parameters: - key to store the key (generally - * the OpenAIRE id for some entity) - value to store the value (generally the OpenAIRE name for the key) - */ -public class KeyValue implements Serializable { - - private String key; - - private String value; - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public static KeyValue newInstance(String key, String value) { - KeyValue inst = new KeyValue(); - inst.key = key; - inst.value = value; - return inst; - } - - @JsonIgnore - public boolean isBlank() { - return StringUtils.isBlank(key) && StringUtils.isBlank(value); - } - -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java deleted file mode 100644 index e977ee2..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java +++ /dev/null @@ -1,43 +0,0 @@ - -package eu.dnetlib.dhp.schema.dump.oaf; - -import java.io.Serializable; - -import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; - -/** - * To represent the information described by a code and a value It has two parameters: - code to store the code - * (generally the classid of the eu.dnetlib.dhp.schema.oaf.Qualifier element) - label to store the label (generally the - * classname of the eu.dnetlib.dhp.schema.oaf.Qualifier element - */ -public class Qualifier implements Serializable { - - @JsonSchema(description="A code in vocabulary ") - private String code; // the classid in the Qualifier - - @JsonSchema(description="A label for that code ") - 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 Qualifier newInstance(String code, String value) { - Qualifier qualifier = new Qualifier(); - qualifier.setCode(code); - qualifier.setLabel(value); - return qualifier; - } -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CfHbKeyValue.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CfHbKeyValue.java new file mode 100644 index 0000000..68bda2d --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CfHbKeyValue.java @@ -0,0 +1,46 @@ +package eu.dnetlib.dhp.schema.dump.oaf.community; + +import java.io.Serializable; + +import org.apache.commons.lang3.StringUtils; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + +public class CfHbKeyValue implements Serializable { + + @JsonSchema(description = "the OpenAIRE identifier of the data source") + private String key; + + @JsonSchema(description = "the name of the data source") + private String value; + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static CfHbKeyValue newInstance(String key, String value) { + CfHbKeyValue inst = new CfHbKeyValue(); + inst.key = key; + inst.value = value; + return inst; + } + + @JsonIgnore + public boolean isBlank() { + return StringUtils.isBlank(key) && StringUtils.isBlank(value); + } + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityInstance.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityInstance.java index 6a605d7..5e5a87e 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityInstance.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityInstance.java @@ -1,8 +1,9 @@ package eu.dnetlib.dhp.schema.dump.oaf.community; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import eu.dnetlib.dhp.schema.dump.oaf.Instance; -import eu.dnetlib.dhp.schema.dump.oaf.KeyValue; /** * It extends eu.dnetlib.dhp.dump.oaf.Instance with values related to the community dump. In the Result dump this @@ -15,22 +16,25 @@ import eu.dnetlib.dhp.schema.dump.oaf.KeyValue; * collectedfrom.key - value corresponds to collectedfrom.value */ public class CommunityInstance extends Instance { - private KeyValue hostedby; - private KeyValue collectedfrom; + @JsonSchema(description = "Information about the source from which the instance can be viewed or downloaded.") + private CfHbKeyValue hostedby; - public KeyValue getHostedby() { + @JsonSchema(description = "Information about the source from which the record has been collected") + private CfHbKeyValue collectedfrom; + + public CfHbKeyValue getHostedby() { return hostedby; } - public void setHostedby(KeyValue hostedby) { + public void setHostedby(CfHbKeyValue hostedby) { this.hostedby = hostedby; } - public KeyValue getCollectedfrom() { + public CfHbKeyValue getCollectedfrom() { return collectedfrom; } - public void setCollectedfrom(KeyValue collectedfrom) { + public void setCollectedfrom(CfHbKeyValue collectedfrom) { this.collectedfrom = collectedfrom; } } diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java index d32247f..d24f1e9 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java @@ -5,7 +5,6 @@ import java.util.List; import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; -import eu.dnetlib.dhp.schema.dump.oaf.KeyValue; import eu.dnetlib.dhp.schema.dump.oaf.Result; /** @@ -22,11 +21,14 @@ import eu.dnetlib.dhp.schema.dump.oaf.Result; */ public class CommunityResult extends Result { + @JsonSchema(description = "List of projects (i.e. grants) that (co-)funded the production ofn the research results") private List projects; + @JsonSchema(description = "Reference to a relevant research infrastructure, initiative or community (RI/RC) among those collaborating with OpenAIRE. Please see https://connect.openaire.eu") private List context; - protected List collectedfrom; + @JsonSchema(description = "Information about the sources from which the record has been collected") + protected List collectedfrom; @JsonSchema(description = "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; @@ -39,11 +41,11 @@ public class CommunityResult extends Result { this.instance = instance; } - public List getCollectedfrom() { + public List getCollectedfrom() { return collectedfrom; } - public void setCollectedfrom(List collectedfrom) { + public void setCollectedfrom(List collectedfrom) { this.collectedfrom = collectedfrom; } diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Context.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Context.java index d4c1d40..79c1647 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Context.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Context.java @@ -6,8 +6,9 @@ import java.util.Objects; import java.util.Optional; import java.util.stream.Collectors; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import eu.dnetlib.dhp.schema.dump.oaf.Provenance; -import eu.dnetlib.dhp.schema.dump.oaf.Qualifier; /** * Reference to a relevant research infrastructure, initiative or community (RI/RC) among those collaborating with @@ -21,7 +22,14 @@ import eu.dnetlib.dhp.schema.dump.oaf.Qualifier; * instantiated if the element datainfo.provenanceaction is not null. In this case - provenance corresponds to * dataInfo.provenanceaction.classname - trust corresponds to dataInfo.trust */ -public class Context extends Qualifier { +public class Context { + @JsonSchema(description="Code identifying the RI/RC") + private String code; + + @JsonSchema(description="Label of the RI/RC") + private String label; + + @JsonSchema(description = "Why this result is associated to the RI/RC.") private List provenance; public List getProvenance() { @@ -32,6 +40,23 @@ public class Context extends Qualifier { this.provenance = provenance; } + 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; + } + + @Override public int hashCode() { final String p = Optional.ofNullable(getProvenance()) diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Funder.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Funder.java index 5ea0d12..5e17e0c 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Funder.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Funder.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf.community; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + /** * To store information about the funder funding the project related to the result. It has the following parameters: - * shortName of type String to store the funder short name (e.c. AKA). - name of type String to store the funder name @@ -9,6 +11,7 @@ package eu.dnetlib.dhp.schema.dump.oaf.community; */ public class Funder extends eu.dnetlib.dhp.schema.dump.oaf.Funder { + @JsonSchema(description = "Stream of funding (e.g. for European Commission can be H2020 or FP7)") private String fundingStream; public String getFundingStream() { diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Project.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Project.java index eed0ae8..88c5216 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Project.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/Project.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.dump.oaf.community; +import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import eu.dnetlib.dhp.schema.dump.oaf.Provenance; /** @@ -13,6 +15,7 @@ import eu.dnetlib.dhp.schema.dump.oaf.Provenance; */ public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project { + @JsonSchema(description = "Information about the funder funding the project") private Funder funder; private Provenance provenance; diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java index 7081863..3c2a7b3 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Datasource.java @@ -7,7 +7,6 @@ import java.util.List; import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; import eu.dnetlib.dhp.schema.dump.oaf.Container; -import eu.dnetlib.dhp.schema.dump.oaf.ControlledField; /** * To store information about the datasource OpenAIRE collects information from. It contains the following parameters: - diff --git a/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java b/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java index a12f281..cca6d94 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java +++ b/src/test/java/eu/dnetlib/dhp/schema/oaf/dump/GenerateJsonSchema.java @@ -1,5 +1,7 @@ package eu.dnetlib.dhp.schema.oaf.dump; +import java.io.IOException; + import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -8,6 +10,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.github.imifou.jsonschema.module.addon.AddonModule; import com.github.victools.jsonschema.generator.*; +import eu.dnetlib.dhp.schema.dump.ExecCreateSchemas; import eu.dnetlib.dhp.schema.dump.oaf.graph.*; //@Disabled @@ -42,4 +45,11 @@ class GenerateJsonSchema { System.out.println(jsonSchema.toString()); } + + + @Test + void generateJsonSchema3() throws IOException { + + ExecCreateSchemas.main(new String[]{}); + } } From 593034920a5695e1361c729c908c9d0bbd95d40d Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Fri, 19 Nov 2021 15:30:35 +0100 Subject: [PATCH 062/146] [Schema-Dump] added class to automatically generate schemas and save them in /eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/ under target/classes (target/test-classes) directory --- .../dhp/schema/dump/ExecCreateSchemas.java | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/ExecCreateSchemas.java b/src/main/java/eu/dnetlib/dhp/schema/dump/ExecCreateSchemas.java index 2b25caf..ca520cc 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/ExecCreateSchemas.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/ExecCreateSchemas.java @@ -2,6 +2,7 @@ package eu.dnetlib.dhp.schema.dump; import java.io.*; import java.lang.reflect.Type; +import java.net.URL; import java.nio.file.Files; import java.nio.file.Paths; @@ -15,7 +16,7 @@ import eu.dnetlib.dhp.schema.dump.oaf.community.CommunityResult; import eu.dnetlib.dhp.schema.dump.oaf.graph.*; public class ExecCreateSchemas { - + final static String DIRECTORY = "/eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/"; SchemaGenerator generator; private void init(){ @@ -35,15 +36,17 @@ public class ExecCreateSchemas { private void generate(Type targetType, String directory, String filename) throws IOException { JsonNode jsonSchema = generator.generateSchema(targetType); - if(!Files.exists(Paths.get(directory))){ - Files.createDirectories(Paths.get(directory)); + String dir = Paths.get(Paths.get(getClass().getResource("/").getPath()).toAbsolutePath() + directory).toString(); + + if(!Files.exists(Paths.get(dir))){ + Files.createDirectories(Paths.get(dir)); } - if(!Files.exists(Paths.get(directory + filename))) { - Files.createFile(Paths.get(directory + filename)); + if(!Files.exists(Paths.get(dir + "/" + filename))) { + Files.createFile(Paths.get(dir + "/" + filename)); } - File f = new File(directory + filename); + File f = new File(dir + "/" + filename); try(PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(f)))) { writer.println(new ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(jsonSchema)); @@ -55,14 +58,14 @@ public class ExecCreateSchemas { ExecCreateSchemas ecs = new ExecCreateSchemas(); ecs.init(); - ecs.generate(GraphResult.class, "/tmp/jsonschemas/" , "result_schema.json"); - ecs.generate(ResearchCommunity.class, "/tmp/jsonschemas/" , "community_infrastructure_schema.json"); - ecs.generate(Datasource.class, "/tmp/jsonschemas/" , "datasource_schema.json"); - ecs.generate(Project.class, "/tmp/jsonschemas/" , "project_schema.json"); - ecs.generate(Relation.class, "/tmp/jsonschemas/" , "relation_schema.json"); - ecs.generate(Organization.class, "/tmp/jsonschemas/" , "organization_schema.json"); + ecs.generate(GraphResult.class, DIRECTORY , "result_schema.json"); + ecs.generate(ResearchCommunity.class, DIRECTORY , "community_infrastructure_schema.json"); + ecs.generate(Datasource.class, DIRECTORY , "datasource_schema.json"); + ecs.generate(Project.class, DIRECTORY , "project_schema.json"); + ecs.generate(Relation.class, DIRECTORY , "relation_schema.json"); + ecs.generate(Organization.class, DIRECTORY , "organization_schema.json"); - ecs.generate(CommunityResult.class, "/tmp/jsonschemas/" , "community_result_schema.json"); + ecs.generate(CommunityResult.class, DIRECTORY , "community_result_schema.json"); From 80f4baa412d5fe52be66b6ae2486b365fd75518a Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 1 Dec 2021 09:28:56 +0100 Subject: [PATCH 063/146] fixed relation label separator --- pom.xml | 2 +- src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d1e829d..172000b 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.9.23 + dhp-schemas-2.9.24 This module contains common schema classes meant to be used across the dnet-hadoop submodules diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java index bf0eed1..8639d55 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java @@ -181,7 +181,7 @@ public class ModelSupport { * @return */ public static String rel(String relType, String subRelType, String relClass) { - return String.format("%s-%s-%s", relType, subRelType, relClass); + return String.format("%s_%s_%s", relType, subRelType, relClass); } private static final String schemeTemplate = "dnet:%s_%s_relations"; From a69e57eeccc20b1adfef0cd88199e753dd1965b9 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 6 Dec 2021 09:53:15 +0100 Subject: [PATCH 064/146] Added helper method to lookup for inverse relations regardless of the upper/lower case in the relation encoding --- .../eu/dnetlib/dhp/schema/common/ModelSupport.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java index 8639d55..c93a45c 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java @@ -158,6 +158,16 @@ public class ModelSupport { } } + private RelationInverse findInverse(String encoding) { + return ModelSupport.relationInverseMap + .entrySet() + .stream() + .filter(r -> encoding.equalsIgnoreCase(r.getKey())) + .findFirst() + .map(r -> r.getValue()) + .orElseThrow(() -> new IllegalArgumentException("invalid relationship: " + encoding)); + } + /** * Helper method: fina a relation filtering by a relation name * @param relationName From 7bdc99e89da42862d05413102bbf960203b63ac0 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 6 Dec 2021 09:53:55 +0100 Subject: [PATCH 065/146] [maven-release-plugin] prepare release dhp-schemas-2.9.24 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eee9935..40c46a7 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.9.24-SNAPSHOT + 2.9.24 From 3be96a92f9c9d0fa671ac4d37df6e3de2988adf2 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 6 Dec 2021 09:53:58 +0100 Subject: [PATCH 066/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 40c46a7..edf73df 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.9.24 + 2.9.25-SNAPSHOT From 0194a86433da76394672d8cf8907e4ced22d648e Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 6 Dec 2021 10:03:07 +0100 Subject: [PATCH 067/146] Revert to 923c0ff8031f7a1c2e2ea3bf1e4a744810034123 --- pom.xml | 2 +- .../eu/dnetlib/dhp/schema/common/ModelSupport.java | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index edf73df..eee9935 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.9.25-SNAPSHOT + 2.9.24-SNAPSHOT diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java index c93a45c..8639d55 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java @@ -158,16 +158,6 @@ public class ModelSupport { } } - private RelationInverse findInverse(String encoding) { - return ModelSupport.relationInverseMap - .entrySet() - .stream() - .filter(r -> encoding.equalsIgnoreCase(r.getKey())) - .findFirst() - .map(r -> r.getValue()) - .orElseThrow(() -> new IllegalArgumentException("invalid relationship: " + encoding)); - } - /** * Helper method: fina a relation filtering by a relation name * @param relationName From 8a809a60e29bc6f8f13c3416ba60018eac2e56af Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 6 Dec 2021 10:45:23 +0100 Subject: [PATCH 068/146] Added helper method to lookup for inverse relations regardless of the upper/lower case in the relation encoding --- .../dnetlib/dhp/schema/common/ModelSupport.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java index 8639d55..1aa0d8f 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelSupport.java @@ -158,6 +158,21 @@ public class ModelSupport { } } + /** + * Helper method: lookup relation inverse, given the direct relation encoding (case insensitive) + * @param encoding + * @return the relation inverse descriptor, throws @IllegalArgumentException when not found. + */ + public static RelationInverse findInverse(String encoding) { + return ModelSupport.relationInverseMap + .entrySet() + .stream() + .filter(r -> encoding.equalsIgnoreCase(r.getKey())) + .findFirst() + .map(r -> r.getValue()) + .orElseThrow(() -> new IllegalArgumentException("invalid relationship: " + encoding)); + } + /** * Helper method: fina a relation filtering by a relation name * @param relationName From 41841e3347b7d8848d7f2fe8c132b544564d822e Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Mon, 6 Dec 2021 14:51:29 +0100 Subject: [PATCH 069/146] - --- .../dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java index 9084fb9..d32247f 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/community/CommunityResult.java @@ -4,6 +4,7 @@ package eu.dnetlib.dhp.schema.dump.oaf.community; import java.util.List; import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; + import eu.dnetlib.dhp.schema.dump.oaf.KeyValue; import eu.dnetlib.dhp.schema.dump.oaf.Result; @@ -63,5 +64,3 @@ public class CommunityResult extends Result { } } - - From 34ec7dbf027568a4b735b138735f2aa70d3f91ce Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Tue, 14 Dec 2021 18:16:24 +0100 Subject: [PATCH 070/146] [Dump-schema] update Result schema --- .../dnetlib/dhp/schema/dump/oaf/Result.java | 59 ++++++++++++++----- 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java index c7d2d22..560f74b 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Result.java @@ -8,13 +8,17 @@ import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; /** * To represent the dumped result. It will be extended in the dump for Research Communities - Research - * Initiative/Infrastructures. It has the following parameters: - author of type + * Initiative/Infrastructures. It has the following parameters: + * - author of type * List to describe the authors of a result. For each author in the result - * represented in the internal model one author in the esternal model is produced. - type of type String to represent + * represented in the internal model one author in the esternal model is produced. + * - type of type String to represent * the category of the result. Possible values are publication, dataset, software, other. It corresponds to - * resulttype.classname of the dumped result - language of type eu.dnetlib.dhp.schema.dump.oaf.Qualifier to store + * resulttype.classname of the dumped result + * - language of type eu.dnetlib.dhp.schema.dump.oaf.Language to store * information about the language of the result. It is dumped as - code corresponds to language.classid - value - * corresponds to language.classname - country of type List to store the country + * corresponds to language.classname + * - country of type List to store the country * list to which the result is associated. For each country in the result respresented in the internal model one country * in the external model is produces - subjects of type List to store the subjects for * the result. For each subject in the result represented in the internal model one subject in the external model is @@ -66,72 +70,97 @@ import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; */ public class Result implements Serializable { - - private List author; // resulttype allows subclassing results into publications | datasets | software + @JsonSchema(description = "Type of the result: one of 'publication', 'dataset', 'software', 'other' (see also https://api.openaire.eu/vocabularies/dnet:result_typologies)") private String type; // resulttype // common fields - private Qualifier language; + private Language language; - private List country; + @JsonSchema(description="The list of countries associated to this result") + private List country; + @JsonSchema(description="Keywords associated to the result") private List subjects; + @JsonSchema(description = "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; + @JsonSchema(description = "Explanatory or alternative name by which a scientific result is known.") private String subtitle; private List description; + @JsonSchema(description = "Main date of the research product: typically the publication or issued date. In case of a research result with different versions with different dates, the date of the result is selected as the most frequent well-formatted date. If not available, then the most recent and complete date among those that are well-formatted. For statistics, the year is extracted and the result is counted only among the result of that year. Example: Pre-print date: 2019-02-03, Article date provided by repository: 2020-02, Article date provided by Crossref: 2020, OpenAIRE will set as date 2019-02-03, because it’s the most recent among the complete and well-formed dates. If then the repository updates the metadata and set a complete date (e.g. 2020-02-12), then this will be the new date for the result because it becomes the most recent most complete date. However, if OpenAIRE then collects the pre-print from another repository with date 2019-02-03, then this will be the “winning date” because it becomes the most frequent well-formatted date.") private String publicationdate; // dateofacceptance; + @JsonSchema(description = "The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource.") private String publisher; + @JsonSchema(description = "Date when the embargo ends and this result turns Open Access") private String embargoenddate; + @JsonSchema(description = "See definition of Dublin Core field dc:source") private List source; private List format; + @JsonSchema(description="Contributors for the result") private List contributor; private List coverage; + @JsonSchema(description="The openest of the access rights of this result.") private BestAccessRight bestaccessright; + @JsonSchema(description="Container has information about the conference or journal where the result has been presented or published") private Container container;// Journal + @JsonSchema(description = "Only for results with type 'software': URL to the software documentation") private List documentationUrl; // software + @JsonSchema(description="Only for results with type 'software': the URL to the repository with the source code") private String codeRepositoryUrl; // software + @JsonSchema(description = "Only for results with type 'software': the programming language") private String programmingLanguage; // software + @JsonSchema(description="Only for results with type 'software': Information on the person responsible for providing further information regarding the resource") private List contactperson; // orp + @JsonSchema(description="Only for results with type 'software': Information on the group responsible for providing further information regarding the resource") private List contactgroup; // orp + @JsonSchema(description = "Only for results with type 'other': tool useful for the interpretation and/or re-used of the research product") private List tool; // orp + @JsonSchema(description = "Only for results with type 'dataset': the declared size of the dataset") private String size; // dataset + @JsonSchema(description = "Version of the result") private String version; // dataset + @JsonSchema(description = "Geolocation information") private List geolocation; // dataset + @JsonSchema(description = "The OpenAIRE identifiers for this result") private String id; + @JsonSchema(description = "Identifiers of the record at the original sources") private List originalId; - private List pid; + @JsonSchema(description = "Persistent identifiers of the result") + private List pid; + @JsonSchema(description="When OpenAIRE collected the record the last time") private String dateofcollection; + @JsonSchema(description = "Timestamp of last update of the record in OpenAIRE") private Long lastupdatetimestamp; + public Long getLastupdatetimestamp() { return lastupdatetimestamp; } @@ -156,11 +185,11 @@ public class Result implements Serializable { this.originalId = originalId; } - public List getPid() { + public List getPid() { return pid; } - public void setPid(List pid) { + public void setPid(List pid) { this.pid = pid; } @@ -196,19 +225,19 @@ public class Result implements Serializable { this.author = author; } - public Qualifier getLanguage() { + public Language getLanguage() { return language; } - public void setLanguage(Qualifier language) { + public void setLanguage(Language language) { this.language = language; } - public List getCountry() { + public List getCountry() { return country; } - public void setCountry(List country) { + public void setCountry(List country) { this.country = country; } From 0a54f5bea7496e06fed03be31bd486b709df6729 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Tue, 14 Dec 2021 18:37:00 +0100 Subject: [PATCH 071/146] [Dump-schema] update schemas for some classes for the new json annotation --- .../dnetlib/dhp/schema/dump/oaf/Author.java | 7 +-- .../dhp/schema/dump/oaf/ControlledField.java | 38 ---------------- .../eu/dnetlib/dhp/schema/dump/oaf/Pid.java | 44 ------------------- .../dhp/schema/dump/oaf/Qualifier.java | 38 ---------------- .../dnetlib/dhp/schema/dump/oaf/Subject.java | 22 ++++++---- 5 files changed, 17 insertions(+), 132 deletions(-) delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Pid.java delete mode 100644 src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java index c26bdd2..3c7710b 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Author.java @@ -29,7 +29,8 @@ public class Author implements Serializable { private Integer rank; - private Pid pid; + @JsonSchema(description="The author's persistent identifiers") + private AuthorPid pid; public String getFullname() { return fullname; @@ -63,11 +64,11 @@ public class Author implements Serializable { this.rank = rank; } - public Pid getPid() { + public AuthorPid getPid() { return pid; } - public void setPid(Pid pid) { + public void setPid(AuthorPid pid) { this.pid = pid; } diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java deleted file mode 100644 index cad7b8b..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/ControlledField.java +++ /dev/null @@ -1,38 +0,0 @@ - -package eu.dnetlib.dhp.schema.dump.oaf; - -import java.io.Serializable; - -/** - * To represent the information described by a scheme and a value in that scheme (i.e. pid). It has two parameters: - - * scheme of type String to store the scheme - value of type String to store the value in that scheme - */ -public class ControlledField implements Serializable { - private String scheme; - private String value; - - public String getScheme() { - return scheme; - } - - public void setScheme(String scheme) { - this.scheme = scheme; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public static ControlledField newInstance(String scheme, String value) { - ControlledField cf = new ControlledField(); - - cf.setScheme(scheme); - cf.setValue(value); - - return cf; - } -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Pid.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Pid.java deleted file mode 100644 index 20848c6..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Pid.java +++ /dev/null @@ -1,44 +0,0 @@ -package eu.dnetlib.dhp.schema.dump.oaf; - -import java.io.Serializable; - -/** - * To represent the generic persistent identifier. It has two parameters: - id of type - * eu.dnetlib.dhp.schema.dump.oaf.ControlledField to store the scheme and value of the Persistent Identifier. - - * provenance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance to store the provenance and trust of the information - */ -public class Pid implements Serializable { - private ControlledField id; - private Provenance provenance; - - public ControlledField getId() { - return id; - } - - public void setId(ControlledField pid) { - this.id = pid; - } - - public Provenance getProvenance() { - return provenance; - } - - public void setProvenance(Provenance provenance) { - this.provenance = provenance; - } - - public static Pid newInstance(ControlledField pid, Provenance provenance) { - Pid p = new Pid(); - p.id = pid; - p.provenance = provenance; - - return p; - } - - public static Pid newInstance(ControlledField pid) { - Pid p = new Pid(); - p.id = pid; - - return p; - } -} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java deleted file mode 100644 index fd21424..0000000 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Qualifier.java +++ /dev/null @@ -1,38 +0,0 @@ - -package eu.dnetlib.dhp.schema.dump.oaf; - -import java.io.Serializable; - -/** - * To represent the information described by a code and a value It has two parameters: - code to store the code - * (generally the classid of the eu.dnetlib.dhp.schema.oaf.Qualifier element) - label to store the label (generally the - * classname of the eu.dnetlib.dhp.schema.oaf.Qualifier element - */ -public class Qualifier implements Serializable { - - private String code; // the classid in the Qualifier - 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 Qualifier newInstance(String code, String value) { - Qualifier qualifier = new Qualifier(); - qualifier.setCode(code); - qualifier.setLabel(value); - return qualifier; - } -} diff --git a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java index 204e37a..2edee2f 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java +++ b/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Subject.java @@ -6,22 +6,26 @@ import java.io.Serializable; import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema; /** - * To represent keywords associated to the result. It has two parameters: - subject of type - * eu.dnetlib.dhp.schema.dump.oaf.ControlledField to describe the subject. It mapped as: - schema it corresponds to - * qualifier.classid of the dumped subject - value it corresponds to the subject value - provenance of type - * eu.dnetlib.dhp.schema.dump.oaf.Provenance to represent the provenance of the subject. It is dumped only if dataInfo - * is not null. In this case: - provenance corresponds to dataInfo.provenanceaction.classname - trust corresponds to - * dataInfo.trust + * To represent keywords associated to the result. It has two parameters: + * - subject of type eu.dnetlib.dhp.schema.dump.oaf.SubjectSchemeValue to describe the subject. It mapped as: + * - schema it corresponds to qualifier.classid of the dumped subject + * - value it corresponds to the subject value + * - provenance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance to represent the provenance of the subject. It is dumped only if dataInfo + * is not null. In this case: + * - provenance corresponds to dataInfo.provenanceaction.classname + * - trust corresponds to dataInfo.trust */ public class Subject implements Serializable { - private ControlledField subject; + private SubjectSchemeValue subject; + + @JsonSchema(description = "Why this subject is associated to the result") private Provenance provenance; - public ControlledField getSubject() { + public SubjectSchemeValue getSubject() { return subject; } - public void setSubject(ControlledField subject) { + public void setSubject(SubjectSchemeValue subject) { this.subject = subject; } From 87c925ac24a10a2f38c09793bfbceb901051b8d9 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 22 Dec 2021 12:20:21 +0100 Subject: [PATCH 072/146] updated CHANGES.md --- CHANGES.md | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index bc32ae8..fbb6abe 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,23 +3,24 @@ ## Changelog | **Version** | **Changes** | **Readiness** | -|---|---|---| -| 2.9.23 | [Graph model]
Added Instance.measures field, allowing to maintain the association between them and the individual result instance
[Dump model]
added json schemas | beta | -| 2.8.22 | [Graph model]
minor: added serializable to the Measures model class
[Dump model]
added dedicated BestAccessRight class, used at the result level instead of AccessRight | beta | -| 2.8.21 | [Graph model]
added the following relation terms Describes/IsDescribedBy, IsMetadataFor/IsMetadataOf, HasAssociationWith/HasAssociationWith, IsRequiredBy/Requires. All these are used in combination with the relation subRelType "relationship" | beta | -| 2.8.20 | [Graph model]
added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | beta | -| 2.7.18-19 | [Dump model]
include validation info in relations
[Graph model]
added constants declaring vocabulary names for relation fields | production | -| 2.7.17 | [Dump model]
aligned the graph dump schema to mirror the changes in the model
1. Added openaccessroute at the level of the instance inside the AccessRight element;
2. Added pid and the alternate identifiers at the level of the instance;
3. Added the bipFinder measures | production | -| 2.7.16 | [Graph model]
Updated the casing of the following terms (`relation.relClass`):
1. `isRelatedTo -> IsRelatedTo`
Added the following `relClass` terms:
1. `IsAmongTopNSimilarDocuments`
2. `HasAmongTopNSimilarDocuments` | production | -| 2.7.15 | 1. added support for delegated authorities
2. fixed regex for DOI cleaning | production | -| 2.7.14 | [Graph model]
Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion` | production | -| 2.6.14 | [Scholexplorer]
1. Added model classes for Scholexplorer, package `eu.dnetlib.dhp.schema.sx` | production | -| 2.6.13 | 1. `Result.mergeFrom` handles field `dateOfAcceptance` | production | -| 2.5.12 | 1. delegating the date parsing to https://github.com/sisyphsu/dateparser | production | -| 2.5.[11-9] | 1. support for more date formats
2. enable the possibility to extend the date formats used to parse `Relation.validationDate` | production | -| 2.4.8 | 1. added constant for ORCID datasource name | production | -| 2.4.7 | refactoring | production | -| 2.3.6 | [Aggregation]
1. introduced MetadataStoreManager (MdSM) model classes| production | -| 2.2.5 | [Graph model]
1. introduced fields `Instance.pid` and `Instance.alternateIdentifier`
2. `LicenseComparator` renamed as `AccessRightComparator`
3. introduced `AccessRight` model class defining the `OpenAccessRoute` field to keep track of the OpenAccess color at the `Instance` level
4. `ExternalReference` cleanup (removed description, added alternateLabel(s))
5. added several ModelConstants
[Aggregation]
7. introduced MDStore record model classes
8. Introduced ORCID specific model classes | production | -| 2.2.4 | 1. ORCID specific model classes backported in the version used in PROD
2. added constant for dnet:externalReference_typologies
3. added constant for ORCID datasource name
4. `Result.mergeFrom` handles field `dateOfAcceptance` | production | +|-------------|---|---| +| 2.9.24 | [Dump model]
change the names of the classes to be able to automatically create the json schema with specific descriptions | beta | +| 2.9.23 | [Graph model]
Added Instance.measures field, allowing to maintain the association between them and the individual result instance
[Dump model]
added json schemas | beta | +| 2.8.22 | [Graph model]
minor: added serializable to the Measures model class
[Dump model]
added dedicated BestAccessRight class, used at the result level instead of AccessRight | beta | +| 2.8.21 | [Graph model]
added the following relation terms Describes/IsDescribedBy, IsMetadataFor/IsMetadataOf, HasAssociationWith/HasAssociationWith, IsRequiredBy/Requires. All these are used in combination with the relation subRelType "relationship" | beta | +| 2.8.20 | [Graph model]
added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | beta | +| 2.7.18-19 | [Dump model]
include validation info in relations
[Graph model]
added constants declaring vocabulary names for relation fields | production | +| 2.7.17 | [Dump model]
aligned the graph dump schema to mirror the changes in the model
1. Added openaccessroute at the level of the instance inside the AccessRight element;
2. Added pid and the alternate identifiers at the level of the instance;
3. Added the bipFinder measures | production | +| 2.7.16 | [Graph model]
Updated the casing of the following terms (`relation.relClass`):
1. `isRelatedTo -> IsRelatedTo`
Added the following `relClass` terms:
1. `IsAmongTopNSimilarDocuments`
2. `HasAmongTopNSimilarDocuments` | production | +| 2.7.15 | 1. added support for delegated authorities
2. fixed regex for DOI cleaning | production | +| 2.7.14 | [Graph model]
Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion` | production | +| 2.6.14 | [Scholexplorer]
1. Added model classes for Scholexplorer, package `eu.dnetlib.dhp.schema.sx` | production | +| 2.6.13 | 1. `Result.mergeFrom` handles field `dateOfAcceptance` | production | +| 2.5.12 | 1. delegating the date parsing to https://github.com/sisyphsu/dateparser | production | +| 2.5.[11-9] | 1. support for more date formats
2. enable the possibility to extend the date formats used to parse `Relation.validationDate` | production | +| 2.4.8 | 1. added constant for ORCID datasource name | production | +| 2.4.7 | refactoring | production | +| 2.3.6 | [Aggregation]
1. introduced MetadataStoreManager (MdSM) model classes| production | +| 2.2.5 | [Graph model]
1. introduced fields `Instance.pid` and `Instance.alternateIdentifier`
2. `LicenseComparator` renamed as `AccessRightComparator`
3. introduced `AccessRight` model class defining the `OpenAccessRoute` field to keep track of the OpenAccess color at the `Instance` level
4. `ExternalReference` cleanup (removed description, added alternateLabel(s))
5. added several ModelConstants
[Aggregation]
7. introduced MDStore record model classes
8. Introduced ORCID specific model classes | production | +| 2.2.4 | 1. ORCID specific model classes backported in the version used in PROD
2. added constant for dnet:externalReference_typologies
3. added constant for ORCID datasource name
4. `Result.mergeFrom` handles field `dateOfAcceptance` | production | From 916be1c78174c7dfa6c3ed57eebc2ed737a404ba Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 22 Dec 2021 12:20:52 +0100 Subject: [PATCH 073/146] [maven-release-plugin] prepare release dhp-schemas-2.9.24 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4e549de..f824bd5 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.9.24-SNAPSHOT + 2.9.24 From 4083d78045257b472690bb2703d52af58dbfc3ff Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 22 Dec 2021 12:20:55 +0100 Subject: [PATCH 074/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f824bd5..86c19c5 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.9.24 + 2.9.25-SNAPSHOT From 185dcac4e10a31673042553aef9b2c6b1735b3d7 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 12 Jan 2022 10:34:45 +0100 Subject: [PATCH 075/146] Update 'CHANGES.md' updated readiness --- CHANGES.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index fbb6abe..abb2609 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,9 +6,9 @@ |-------------|---|---| | 2.9.24 | [Dump model]
change the names of the classes to be able to automatically create the json schema with specific descriptions | beta | | 2.9.23 | [Graph model]
Added Instance.measures field, allowing to maintain the association between them and the individual result instance
[Dump model]
added json schemas | beta | -| 2.8.22 | [Graph model]
minor: added serializable to the Measures model class
[Dump model]
added dedicated BestAccessRight class, used at the result level instead of AccessRight | beta | -| 2.8.21 | [Graph model]
added the following relation terms Describes/IsDescribedBy, IsMetadataFor/IsMetadataOf, HasAssociationWith/HasAssociationWith, IsRequiredBy/Requires. All these are used in combination with the relation subRelType "relationship" | beta | -| 2.8.20 | [Graph model]
added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | beta | +| 2.8.22 | [Graph model]
minor: added serializable to the Measures model class
[Dump model]
added dedicated BestAccessRight class, used at the result level instead of AccessRight | production | +| 2.8.21 | [Graph model]
added the following relation terms Describes/IsDescribedBy, IsMetadataFor/IsMetadataOf, HasAssociationWith/HasAssociationWith, IsRequiredBy/Requires. All these are used in combination with the relation subRelType "relationship" | production | +| 2.8.20 | [Graph model]
added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | production | | 2.7.18-19 | [Dump model]
include validation info in relations
[Graph model]
added constants declaring vocabulary names for relation fields | production | | 2.7.17 | [Dump model]
aligned the graph dump schema to mirror the changes in the model
1. Added openaccessroute at the level of the instance inside the AccessRight element;
2. Added pid and the alternate identifiers at the level of the instance;
3. Added the bipFinder measures | production | | 2.7.16 | [Graph model]
Updated the casing of the following terms (`relation.relClass`):
1. `isRelatedTo -> IsRelatedTo`
Added the following `relClass` terms:
1. `IsAmongTopNSimilarDocuments`
2. `HasAmongTopNSimilarDocuments` | production | From 7996cfd33d91734394bcba007324d62b3b46c29c Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Wed, 12 Jan 2022 16:54:12 +0100 Subject: [PATCH 076/146] Added Enrichment provenance constant added first utility for checking weather is an enrichment entity --- .../eu/dnetlib/dhp/schema/common/ModelConstants.java | 2 ++ src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java index c4ae5cb..ae234dd 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java @@ -63,6 +63,8 @@ public class ModelConstants { public static final String HARVESTED = "Harvested"; public static final String PROVENANCE_DEDUP = "sysimport:dedup"; + public static final String PROVENANCE_ENRICH = "sysimport:enrich"; + public static final Qualifier PROVENANCE_ACTION_SET_QUALIFIER = qualifier( SYSIMPORT_ACTIONSET, SYSIMPORT_ACTIONSET, DNET_PROVENANCE_ACTIONS, DNET_PROVENANCE_ACTIONS); diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java index 68e715d..db30bf6 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java @@ -5,9 +5,11 @@ import java.io.Serializable; import java.util.Comparator; import java.util.List; import java.util.Objects; +import java.util.Optional; import java.util.stream.Collectors; import eu.dnetlib.dhp.schema.common.AccessRightComparator; +import eu.dnetlib.dhp.schema.common.ModelConstants; public class Result extends OafEntity implements Serializable { @@ -233,6 +235,13 @@ public class Result extends OafEntity implements Serializable { this.instance = instance; } + + private static boolean isAnEnrichment(OafEntity e) { + return e.getDataInfo()!= null && + e.getDataInfo().getProvenanceaction()!= null + && ModelConstants.PROVENANCE_ENRICH.equalsIgnoreCase(e.getDataInfo().getProvenanceaction().getClassid()); + } + @Override public void mergeFrom(OafEntity e) { super.mergeFrom(e); From bb91311ab88a4c6eb2601eadcf4c2636f8533d2e Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 12 Jan 2022 17:40:22 +0100 Subject: [PATCH 077/146] updated CHANGES.md, bumped version in pom --- CHANGES.md | 43 ++++++++++++++++++++++--------------------- pom.xml | 4 ++-- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index abb2609..34cb792 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,25 +2,26 @@ ## Changelog -| **Version** | **Changes** | **Readiness** | -|-------------|---|---| -| 2.9.24 | [Dump model]
change the names of the classes to be able to automatically create the json schema with specific descriptions | beta | -| 2.9.23 | [Graph model]
Added Instance.measures field, allowing to maintain the association between them and the individual result instance
[Dump model]
added json schemas | beta | -| 2.8.22 | [Graph model]
minor: added serializable to the Measures model class
[Dump model]
added dedicated BestAccessRight class, used at the result level instead of AccessRight | production | -| 2.8.21 | [Graph model]
added the following relation terms Describes/IsDescribedBy, IsMetadataFor/IsMetadataOf, HasAssociationWith/HasAssociationWith, IsRequiredBy/Requires. All these are used in combination with the relation subRelType "relationship" | production | -| 2.8.20 | [Graph model]
added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | production | -| 2.7.18-19 | [Dump model]
include validation info in relations
[Graph model]
added constants declaring vocabulary names for relation fields | production | -| 2.7.17 | [Dump model]
aligned the graph dump schema to mirror the changes in the model
1. Added openaccessroute at the level of the instance inside the AccessRight element;
2. Added pid and the alternate identifiers at the level of the instance;
3. Added the bipFinder measures | production | -| 2.7.16 | [Graph model]
Updated the casing of the following terms (`relation.relClass`):
1. `isRelatedTo -> IsRelatedTo`
Added the following `relClass` terms:
1. `IsAmongTopNSimilarDocuments`
2. `HasAmongTopNSimilarDocuments` | production | -| 2.7.15 | 1. added support for delegated authorities
2. fixed regex for DOI cleaning | production | -| 2.7.14 | [Graph model]
Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion` | production | -| 2.6.14 | [Scholexplorer]
1. Added model classes for Scholexplorer, package `eu.dnetlib.dhp.schema.sx` | production | -| 2.6.13 | 1. `Result.mergeFrom` handles field `dateOfAcceptance` | production | -| 2.5.12 | 1. delegating the date parsing to https://github.com/sisyphsu/dateparser | production | -| 2.5.[11-9] | 1. support for more date formats
2. enable the possibility to extend the date formats used to parse `Relation.validationDate` | production | -| 2.4.8 | 1. added constant for ORCID datasource name | production | -| 2.4.7 | refactoring | production | -| 2.3.6 | [Aggregation]
1. introduced MetadataStoreManager (MdSM) model classes| production | -| 2.2.5 | [Graph model]
1. introduced fields `Instance.pid` and `Instance.alternateIdentifier`
2. `LicenseComparator` renamed as `AccessRightComparator`
3. introduced `AccessRight` model class defining the `OpenAccessRoute` field to keep track of the OpenAccess color at the `Instance` level
4. `ExternalReference` cleanup (removed description, added alternateLabel(s))
5. added several ModelConstants
[Aggregation]
7. introduced MDStore record model classes
8. Introduced ORCID specific model classes | production | -| 2.2.4 | 1. ORCID specific model classes backported in the version used in PROD
2. added constant for dnet:externalReference_typologies
3. added constant for ORCID datasource name
4. `Result.mergeFrom` handles field `dateOfAcceptance` | production | +| **Version** | **Changes** | **Readiness** | +|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| +| 2.10.24 | [Graph model]
added utility method and constants for checking weather is an OafEntity represents an enrichment. | beta | +| 2.9.24 | [Dump model]
change the names of the classes to be able to automatically create the json schema with specific descriptions | beta | +| 2.9.23 | [Graph model]
Added Instance.measures field, allowing to maintain the association between them and the individual result instance
[Dump model]
added json schemas | beta | +| 2.8.22 | [Graph model]
minor: added serializable to the Measures model class
[Dump model]
added dedicated BestAccessRight class, used at the result level instead of AccessRight | production | +| 2.8.21 | [Graph model]
added the following relation terms Describes/IsDescribedBy, IsMetadataFor/IsMetadataOf, HasAssociationWith/HasAssociationWith, IsRequiredBy/Requires. All these are used in combination with the relation subRelType "relationship" | production | +| 2.8.20 | [Graph model]
added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | production | +| 2.7.18-19 | [Dump model]
include validation info in relations
[Graph model]
added constants declaring vocabulary names for relation fields | production | +| 2.7.17 | [Dump model]
aligned the graph dump schema to mirror the changes in the model
1. Added openaccessroute at the level of the instance inside the AccessRight element;
2. Added pid and the alternate identifiers at the level of the instance;
3. Added the bipFinder measures | production | +| 2.7.16 | [Graph model]
Updated the casing of the following terms (`relation.relClass`):
1. `isRelatedTo -> IsRelatedTo`
Added the following `relClass` terms:
1. `IsAmongTopNSimilarDocuments`
2. `HasAmongTopNSimilarDocuments` | production | +| 2.7.15 | 1. added support for delegated authorities
2. fixed regex for DOI cleaning | production | +| 2.7.14 | [Graph model]
Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion` | production | +| 2.6.14 | [Scholexplorer]
1. Added model classes for Scholexplorer, package `eu.dnetlib.dhp.schema.sx` | production | +| 2.6.13 | 1. `Result.mergeFrom` handles field `dateOfAcceptance` | production | +| 2.5.12 | 1. delegating the date parsing to https://github.com/sisyphsu/dateparser | production | +| 2.5.[11-9] | 1. support for more date formats
2. enable the possibility to extend the date formats used to parse `Relation.validationDate` | production | +| 2.4.8 | 1. added constant for ORCID datasource name | production | +| 2.4.7 | refactoring | production | +| 2.3.6 | [Aggregation]
1. introduced MetadataStoreManager (MdSM) model classes | production | +| 2.2.5 | [Graph model]
1. introduced fields `Instance.pid` and `Instance.alternateIdentifier`
2. `LicenseComparator` renamed as `AccessRightComparator`
3. introduced `AccessRight` model class defining the `OpenAccessRoute` field to keep track of the OpenAccess color at the `Instance` level
4. `ExternalReference` cleanup (removed description, added alternateLabel(s))
5. added several ModelConstants
[Aggregation]
7. introduced MDStore record model classes
8. Introduced ORCID specific model classes | production | +| 2.2.4 | 1. ORCID specific model classes backported in the version used in PROD
2. added constant for dnet:externalReference_typologies
3. added constant for ORCID datasource name
4. `Result.mergeFrom` handles field `dateOfAcceptance` | production | diff --git a/pom.xml b/pom.xml index 86c19c5..d0f8101 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.9.25-SNAPSHOT + 2.10.24-SNAPSHOT @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.9.24 + dhp-schemas-2.10.24 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 8c20660f29d6a4e4742b8adcd5ac2f14b47c9427 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 12 Jan 2022 17:41:29 +0100 Subject: [PATCH 078/146] [maven-release-plugin] prepare release dhp-schemas-2.10.24 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d0f8101..8c29090 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.24-SNAPSHOT + 2.10.24 From eb8c5f38ce59e8ea8ec2de4f02553293a64909a6 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 12 Jan 2022 17:41:33 +0100 Subject: [PATCH 079/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8c29090..13f5ca0 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.24 + 2.10.25-SNAPSHOT From 0996676f5be48280ab656c3ec488e0ebd1f21a5a Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Thu, 13 Jan 2022 14:50:18 +0100 Subject: [PATCH 080/146] Implement merge extending enrichment implemented test --- .../eu/dnetlib/dhp/schema/oaf/Result.java | 491 +++++++++++++++++- .../eu/dnetlib/dhp/schema/oaf/MergeTest.java | 214 ++++++++ .../dhp/schema/oaf/utils/enrichment.json | 12 + .../dhp/schema/oaf/utils/publications.json | 12 + 4 files changed, 721 insertions(+), 8 deletions(-) create mode 100644 src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/enrichment.json create mode 100644 src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publications.json diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java index db30bf6..47fa87c 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java @@ -2,246 +2,700 @@ package eu.dnetlib.dhp.schema.oaf; import java.io.Serializable; -import java.util.Comparator; -import java.util.List; -import java.util.Objects; -import java.util.Optional; +import java.util.*; import java.util.stream.Collectors; +import java.util.stream.Stream; import eu.dnetlib.dhp.schema.common.AccessRightComparator; import eu.dnetlib.dhp.schema.common.ModelConstants; +import org.apache.commons.lang3.EnumUtils; +import scala.Tuple2; +/** + * The type Result. + */ public class Result extends OafEntity implements Serializable { + /** + * The Measures. + */ private List measures; + /** + * The Author. + */ private List author; - // resulttype allows subclassing results into publications | datasets | software + /** + * The Resulttype. + */ +// resulttype allows subclassing results into publications | datasets | software private Qualifier resulttype; - // common fields + /** + * The Language. + */ +// common fields private Qualifier language; + /** + * The Country. + */ private List country; + /** + * The Subject. + */ private List subject; + /** + * The Title. + */ private List title; + /** + * The Relevantdate. + */ private List relevantdate; + /** + * The Description. + */ private List> description; + /** + * The Dateofacceptance. + */ private Field dateofacceptance; + /** + * The Publisher. + */ private Field publisher; + /** + * The Embargoenddate. + */ private Field embargoenddate; + /** + * The Source. + */ private List> source; + /** + * The Fulltext. + */ private List> fulltext; // remove candidate + /** + * The Format. + */ private List> format; + /** + * The Contributor. + */ private List> contributor; + /** + * The Resourcetype. + */ private Qualifier resourcetype; + /** + * The Coverage. + */ private List> coverage; + /** + * The Bestaccessright. + */ private Qualifier bestaccessright; + /** + * The Context. + */ private List context; + /** + * The External reference. + */ private List externalReference; + /** + * The Instance. + */ private List instance; + /** + * Gets measures. + * + * @return the measures + */ public List getMeasures() { return measures; } + /** + * Sets measures. + * + * @param measures the measures + */ public void setMeasures(List measures) { this.measures = measures; } + /** + * Gets author. + * + * @return the author + */ public List getAuthor() { return author; } + /** + * Sets author. + * + * @param author the author + */ public void setAuthor(List author) { this.author = author; } + /** + * Gets resulttype. + * + * @return the resulttype + */ public Qualifier getResulttype() { return resulttype; } + /** + * Sets resulttype. + * + * @param resulttype the resulttype + */ public void setResulttype(Qualifier resulttype) { this.resulttype = resulttype; } + /** + * Gets language. + * + * @return the language + */ public Qualifier getLanguage() { return language; } + /** + * Sets language. + * + * @param language the language + */ public void setLanguage(Qualifier language) { this.language = language; } + /** + * Gets country. + * + * @return the country + */ public List getCountry() { return country; } + /** + * Sets country. + * + * @param country the country + */ public void setCountry(List country) { this.country = country; } + /** + * Gets subject. + * + * @return the subject + */ public List getSubject() { return subject; } + /** + * Sets subject. + * + * @param subject the subject + */ public void setSubject(List subject) { this.subject = subject; } + /** + * Gets title. + * + * @return the title + */ public List getTitle() { return title; } + /** + * Sets title. + * + * @param title the title + */ public void setTitle(List title) { this.title = title; } + /** + * Gets relevantdate. + * + * @return the relevantdate + */ public List getRelevantdate() { return relevantdate; } + /** + * Sets relevantdate. + * + * @param relevantdate the relevantdate + */ public void setRelevantdate(List relevantdate) { this.relevantdate = relevantdate; } + /** + * Gets description. + * + * @return the description + */ public List> getDescription() { return description; } + /** + * Sets description. + * + * @param description the description + */ public void setDescription(List> description) { this.description = description; } + /** + * Gets dateofacceptance. + * + * @return the dateofacceptance + */ public Field getDateofacceptance() { return dateofacceptance; } + /** + * Sets dateofacceptance. + * + * @param dateofacceptance the dateofacceptance + */ public void setDateofacceptance(Field dateofacceptance) { this.dateofacceptance = dateofacceptance; } + /** + * Gets publisher. + * + * @return the publisher + */ public Field getPublisher() { return publisher; } + /** + * Sets publisher. + * + * @param publisher the publisher + */ public void setPublisher(Field publisher) { this.publisher = publisher; } + /** + * Gets embargoenddate. + * + * @return the embargoenddate + */ public Field getEmbargoenddate() { return embargoenddate; } + /** + * Sets embargoenddate. + * + * @param embargoenddate the embargoenddate + */ public void setEmbargoenddate(Field embargoenddate) { this.embargoenddate = embargoenddate; } + /** + * Gets source. + * + * @return the source + */ public List> getSource() { return source; } + /** + * Sets source. + * + * @param source the source + */ public void setSource(List> source) { this.source = source; } + /** + * Gets fulltext. + * + * @return the fulltext + */ public List> getFulltext() { return fulltext; } + /** + * Sets fulltext. + * + * @param fulltext the fulltext + */ public void setFulltext(List> fulltext) { this.fulltext = fulltext; } + /** + * Gets format. + * + * @return the format + */ public List> getFormat() { return format; } + /** + * Sets format. + * + * @param format the format + */ public void setFormat(List> format) { this.format = format; } + /** + * Gets contributor. + * + * @return the contributor + */ public List> getContributor() { return contributor; } + /** + * Sets contributor. + * + * @param contributor the contributor + */ public void setContributor(List> contributor) { this.contributor = contributor; } + /** + * Gets resourcetype. + * + * @return the resourcetype + */ public Qualifier getResourcetype() { return resourcetype; } + /** + * Sets resourcetype. + * + * @param resourcetype the resourcetype + */ public void setResourcetype(Qualifier resourcetype) { this.resourcetype = resourcetype; } + /** + * Gets coverage. + * + * @return the coverage + */ public List> getCoverage() { return coverage; } + /** + * Sets coverage. + * + * @param coverage the coverage + */ public void setCoverage(List> coverage) { this.coverage = coverage; } + /** + * Gets bestaccessright. + * + * @return the bestaccessright + */ public Qualifier getBestaccessright() { return bestaccessright; } + /** + * Sets bestaccessright. + * + * @param bestaccessright the bestaccessright + */ public void setBestaccessright(Qualifier bestaccessright) { this.bestaccessright = bestaccessright; } + /** + * Gets context. + * + * @return the context + */ public List getContext() { return context; } + /** + * Sets context. + * + * @param context the context + */ public void setContext(List context) { this.context = context; } + /** + * Gets external reference. + * + * @return the external reference + */ public List getExternalReference() { return externalReference; } + /** + * Sets external reference. + * + * @param externalReference the external reference + */ public void setExternalReference(List externalReference) { this.externalReference = externalReference; } + /** + * Gets instance. + * + * @return the instance + */ public List getInstance() { return instance; } + /** + * Sets instance. + * + * @param instance the instance + */ public void setInstance(List instance) { this.instance = instance; } - private static boolean isAnEnrichment(OafEntity e) { + /** + * Is an enrichment boolean. + * + * @param e the e + * @return the boolean + */ + public static boolean isAnEnrichment(OafEntity e) { return e.getDataInfo()!= null && e.getDataInfo().getProvenanceaction()!= null && ModelConstants.PROVENANCE_ENRICH.equalsIgnoreCase(e.getDataInfo().getProvenanceaction().getClassid()); } + + /** + * Normalize pid string. + * + * @param pid the pid + * @return the string + */ + private static String normalizePid(final StructuredProperty pid) { + return String.format("%s::%s", pid.getQualifier().getClassid().toLowerCase(), pid.getValue().toLowerCase()); + } + + /** + * Valid pid boolean. + * + * @param p the p + * @return the boolean + */ + private static boolean validPid(final StructuredProperty p) { + return p.getValue()!= null && p.getQualifier()!= null && p.getQualifier().getClassid()!=null; + } + + + /** + * This method converts the list of instance enrichments + * into a Map where the key is the normalized identifier + * and the value is the instance itself + * + * @param ri the list of enrichment instances + * @return the result map + */ + public static Map toInstanceMap(final List ri) { + return ri + .stream() + .filter(i -> i.getPid() != null || i.getAlternateIdentifier() != null) + .flatMap(i -> { + final List> result = new ArrayList<>(); + if (i.getPid() != null) + i.getPid().stream().filter(Result::validPid).forEach(p -> result.add(new Tuple2<>(normalizePid(p), i))); + if (i.getAlternateIdentifier() != null) + i.getAlternateIdentifier().stream().filter(Result::validPid).forEach(p -> result.add(new Tuple2<>(normalizePid(p), i))); + return result.stream(); + }).collect(Collectors.toMap( + Tuple2::_1, + Tuple2::_2, + (a, b) -> a + )); + } + + /** + * This utility method finds the list of enrichment instances + * that match one or more PIDs in the input list + * + * @param pids the list of PIDs + * @param enrichments the List of enrichment instances having the same pid + * @return the list + */ + private static List findEnrichmentsByPID(final List pids, final Map enrichments) { + if (pids == null || enrichments == null) + return null; + return pids + .stream() + .map(Result::normalizePid) + .map(enrichments::get) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + } + + /** + * This method apply enrichment on a single instance + * The enrichment consists of replacing values on + * single attribute only if in the current instance is missing + * The only repeatable field enriched is measures + * + * @param currentInstance the current instance + * @param enrichment the enrichment instance + */ + private static void applyEnrichment(final Instance currentInstance, final Instance enrichment) { + if (currentInstance == null || enrichment == null) + return; + + //ENRICH accessright + if (enrichment.getAccessright()!=null && currentInstance.getAccessright() == null) + currentInstance.setAccessright(enrichment.getAccessright()); + + //ENRICH license + if (enrichment.getLicense()!=null && currentInstance.getLicense() == null) + currentInstance.setLicense(enrichment.getLicense()); + + //ENRICH instanceType + if (enrichment.getInstancetype()!=null && currentInstance.getInstancetype() == null) + currentInstance.setInstancetype(enrichment.getInstancetype()); + + //ENRICH hostedby + if (enrichment.getHostedby()!=null && currentInstance.getHostedby() == null) + currentInstance.setHostedby(enrichment.getHostedby()); + + //ENRICH distributionlocation + if (enrichment.getDistributionlocation()!=null && currentInstance.getDistributionlocation() == null) + currentInstance.setDistributionlocation(enrichment.getDistributionlocation()); + + //ENRICH collectedfrom + if (enrichment.getCollectedfrom()!=null && currentInstance.getCollectedfrom() == null) + currentInstance.setCollectedfrom(enrichment.getCollectedfrom()); + + //ENRICH dateofacceptance + if (enrichment.getDateofacceptance()!=null && currentInstance.getDateofacceptance() == null) + currentInstance.setDateofacceptance(enrichment.getDateofacceptance()); + + //ENRICH processingchargeamount + if (enrichment.getProcessingchargeamount()!=null && currentInstance.getProcessingchargeamount() == null) + currentInstance.setProcessingchargeamount(enrichment.getProcessingchargeamount()); + + //ENRICH refereed + if (enrichment.getRefereed()!=null && currentInstance.getRefereed() == null) + currentInstance.setRefereed(enrichment.getRefereed()); + + //ENRICH measures + if (enrichment.getMeasures()!=null) + if (currentInstance.getMeasures() == null) + currentInstance.setMeasures(enrichment.getMeasures()); + else + enrichment.getMeasures().forEach(currentInstance.getMeasures()::add); + + } + + + /** + * This main method apply the enrichment of the instances + * + * @param toEnrichInstances the instances that could be enriched + * @param enrichmentInstances the enrichment instances + * @return list of instances possibly enriched + */ + private static List enrichInstances(final List toEnrichInstances,final List enrichmentInstances) { + final List enrichmentResult = new ArrayList<>(); + + if (toEnrichInstances == null) { + return enrichmentResult; + } + if (enrichmentInstances == null) { + return enrichmentResult; + } + Map ri = toInstanceMap(enrichmentInstances); + + toEnrichInstances.forEach(i -> { + final List e = findEnrichmentsByPID(i.getPid(), ri); + if (e!= null && e.size()> 0) { + e.forEach(enr -> applyEnrichment(i, enr)); + } else { + final List a = findEnrichmentsByPID(i.getAlternateIdentifier(), ri); + if (a!= null && a.size()> 0) { + a.forEach(enr -> applyEnrichment(i, enr)); + } + } + enrichmentResult.add(i); + }); + return enrichmentResult; + } + @Override public void mergeFrom(OafEntity e) { super.mergeFrom(e); @@ -254,7 +708,15 @@ public class Result extends OafEntity implements Serializable { measures = mergeLists(measures, r.getMeasures()); - instance = mergeLists(instance, r.getInstance()); + if( !isAnEnrichment(this) && !isAnEnrichment(e)) + instance = mergeLists(instance, r.getInstance()); + else { + final List enrichmentInstances = isAnEnrichment(this) ? instance : r.getInstance(); + final List enrichedInstances= isAnEnrichment(this) ? r.getInstance(): instance; + if (isAnEnrichment(this)) + setDataInfo(e.getDataInfo()); + instance = enrichInstances(enrichedInstances,enrichmentInstances); + } if (r.getBestaccessright() != null && new AccessRightComparator().compare(r.getBestaccessright(), bestaccessright) < 0) @@ -334,6 +796,13 @@ public class Result extends OafEntity implements Serializable { externalReference = mergeLists(externalReference, r.getExternalReference()); } + /** + * Longest lists list. + * + * @param a the a + * @param b the b + * @return the list + */ private List> longestLists(List> a, List> b) { if (a == null || b == null) return a == null ? b : a; @@ -355,6 +824,12 @@ public class Result extends OafEntity implements Serializable { return a.size() > b.size() ? a : b; } + /** + * Gets main title. + * + * @param titles the titles + * @return the main title + */ private StructuredProperty getMainTitle(List titles) { // need to check if the list of titles contains more than 1 main title? (in that case, we should chose which // main title select in the list) diff --git a/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java b/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java index e271e47..6e335e0 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java +++ b/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java @@ -3,22 +3,42 @@ package eu.dnetlib.dhp.schema.oaf; import static org.junit.jupiter.api.Assertions.*; + +import java.io.IOException; +import java.io.InputStream; import java.time.format.DateTimeParseException; import java.util.Arrays; import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.commons.io.IOUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +/** + * The type Merge test. + */ class MergeTest { + /** + * The Oaf. + */ OafEntity oaf; + /** + * Sets up. + */ @BeforeEach public void setUp() { oaf = new Publication(); } + /** + * Merge lists test. + */ @Test @SuppressWarnings("unchecked") void mergeListsTest() { @@ -35,6 +55,9 @@ class MergeTest { System.out.println("merge result 3 = " + oaf.mergeLists(c, c)); } + /** + * Merge publication collected from test. + */ @Test void mergePublicationCollectedFromTest() { @@ -50,6 +73,118 @@ class MergeTest { assertEquals(3, a.getCollectedfrom().size()); } + /** + * Load resource result list. + * + * @param the type parameter + * @param path the path + * @param clazz the clazz + * @return the list + * @throws Exception the exception + */ + private List loadResourceResult(final String path, final Class clazz ) throws Exception { + final ObjectMapper mapper = new ObjectMapper(); + final InputStream str = Objects.requireNonNull(getClass().getResourceAsStream(path)); + // LOAD test publications + return IOUtils.readLines(str).stream().map(s -> { + try { + return mapper.readValue(s, clazz); + } catch (IOException e) { + return null; + } + }).filter(Objects::nonNull).collect(Collectors.toList()); + } + + + /** + * Apply to any test list result the same pid of the enrichment instance + * + * @param source the source + * @param enrichment the enrichment + * @param overrideAlternateIdentifier the override alternate identifier + */ + private void updatePidIntoPublicationInstance(final List source, final Listenrichment, final boolean overrideAlternateIdentifier) { + for(int i = 0 ; i< source.size(); i++) { + final Result currentPub = source.get(i); + final Result currentEnrichment = enrichment.get(i); + final Instance currentInstance = Objects.requireNonNull(currentPub.getInstance()).get(0); + if (overrideAlternateIdentifier) + currentInstance.setAlternateIdentifier(Objects.requireNonNull(currentEnrichment.getInstance()).get(0).getPid()); + else + currentInstance.setPid(Objects.requireNonNull(currentEnrichment.getInstance()).get(0).getPid()); + } + } + + + private void applyAndVerifyEnrichment(final List l1, final List l2) { + // Apply Merge and verify that enrichments works + for(int i = 0 ; i< l1.size(); i++) { + final Result currentPub = l2.get(i); + final Result currentEnrichment = l1.get(i); + currentPub.mergeFrom(currentEnrichment); + assertEquals(1, currentPub.getInstance().size()); + final Instance currentInstance = Objects.requireNonNull(currentPub.getInstance()).get(0); + assertNotNull(currentInstance.getMeasures()); + assertNotNull(currentPub.getTitle()); + assertFalse(Result.isAnEnrichment(currentPub)); + } + + } + + + + /** + * Test enrichment function. + * + * @throws Exception the exception + */ + @Test + void testEnrichment() throws Exception { + + + // 1 TEST UPDATING PID INSTANCE AND MERGE CURRENT PUBLICATION WITH ENRICHMENT + // LOAD test publications + List publications = loadResourceResult("/eu/dnetlib/dhp/schema/oaf/utils/publications.json", Publication.class); + // Assert that each publication has only one instance and inside that all the measure field is empty + publications.forEach(p -> { + assertEquals(1, p.getInstance().size()); + final Instance currentInstance = Objects.requireNonNull(p.getInstance()).get(0); + assertNull(currentInstance.getMeasures()); + }); + + // LOAD test enrichments + List enrichment = loadResourceResult("/eu/dnetlib/dhp/schema/oaf/utils/enrichment.json", Result.class); + + updatePidIntoPublicationInstance(publications, enrichment, false); + applyAndVerifyEnrichment(publications, enrichment); + + + // 2 TEST UPDATING ALTERNATE ID INSTANCE AND MERGE CURRENT PUBLICATION WITH ENRICHMENT + publications = loadResourceResult("/eu/dnetlib/dhp/schema/oaf/utils/publications.json", Publication.class); + enrichment = loadResourceResult("/eu/dnetlib/dhp/schema/oaf/utils/enrichment.json", Result.class); + updatePidIntoPublicationInstance(publications, enrichment, true); + applyAndVerifyEnrichment(publications, enrichment); + + + // 3 TEST UPDATING PID INSTANCE AND MERGE ENRICHMENT WITH CURRENT PUBLICATION + publications = loadResourceResult("/eu/dnetlib/dhp/schema/oaf/utils/publications.json", Publication.class); + enrichment = loadResourceResult("/eu/dnetlib/dhp/schema/oaf/utils/enrichment.json", Result.class); + updatePidIntoPublicationInstance(publications, enrichment, false); + applyAndVerifyEnrichment( enrichment, publications); + + // 4 TEST UPDATING ALTERNATE ID INSTANCE AND MERGE ENRICHMENT WITH CURRENT PUBLICATION + publications = loadResourceResult("/eu/dnetlib/dhp/schema/oaf/utils/publications.json", Publication.class); + enrichment = loadResourceResult("/eu/dnetlib/dhp/schema/oaf/utils/enrichment.json", Result.class); + updatePidIntoPublicationInstance(publications, enrichment, true); + applyAndVerifyEnrichment( enrichment, publications); + + + } + + + /** + * Merge publication date of acceptance test both present. + */ @Test void mergePublicationDateOfAcceptanceTest_bothPresent() { @@ -65,6 +200,9 @@ class MergeTest { assertEquals("2021-06-18", a.getDateofacceptance().getValue()); } + /** + * Merge publication date of acceptance test both present 1. + */ @Test void mergePublicationDateOfAcceptanceTest_bothPresent_1() { @@ -80,6 +218,9 @@ class MergeTest { assertEquals("2021-06-19", a.getDateofacceptance().getValue()); } + /** + * Merge publication date of acceptance test both present 2. + */ @Test void mergePublicationDateOfAcceptanceTest_bothPresent_2() { @@ -95,6 +236,9 @@ class MergeTest { assertEquals("2021-06-18", a.getDateofacceptance().getValue()); } + /** + * Merge publication date of acceptance test left missing. + */ @Test void mergePublicationDateOfAcceptanceTest_leftMissing() { @@ -109,6 +253,9 @@ class MergeTest { assertEquals("2021-06-19", a.getDateofacceptance().getValue()); } + /** + * Merge publication date of acceptance test left missing 1. + */ @Test void mergePublicationDateOfAcceptanceTest_leftMissing_1() { @@ -123,6 +270,9 @@ class MergeTest { assertEquals("2021-06-19", a.getDateofacceptance().getValue()); } + /** + * Merge publication date of acceptance test left missing 2. + */ @Test void mergePublicationDateOfAcceptanceTest_leftMissing_2() { @@ -137,6 +287,9 @@ class MergeTest { assertEquals("2021-06-19", a.getDateofacceptance().getValue()); } + /** + * Merge publication date of acceptance test right missing. + */ @Test void mergePublicationDateOfAcceptanceTest_rightMissing() { @@ -151,6 +304,9 @@ class MergeTest { assertEquals("2021-06-19", a.getDateofacceptance().getValue()); } + /** + * Merge publication date of acceptance test right missing 1. + */ @Test void mergePublicationDateOfAcceptanceTest_rightMissing_1() { @@ -165,6 +321,9 @@ class MergeTest { assertEquals("2021-06-19", a.getDateofacceptance().getValue()); } + /** + * Merge publication date of acceptance test right missing 2. + */ @Test void mergePublicationDateOfAcceptanceTest_rightMissing_2() { @@ -179,6 +338,9 @@ class MergeTest { assertEquals("2021-06-19", a.getDateofacceptance().getValue()); } + /** + * Merge publication subject test. + */ @Test void mergePublicationSubjectTest() { @@ -194,6 +356,9 @@ class MergeTest { assertEquals(3, a.getSubject().size()); } + /** + * Merge relation test. + */ @Test void mergeRelationTest() { @@ -235,6 +400,9 @@ class MergeTest { } + /** + * Merge relation test parse exception. + */ @Test void mergeRelationTestParseException() { assertThrows(DateTimeParseException.class, () -> { @@ -244,6 +412,13 @@ class MergeTest { }); } + /** + * Create rel relation. + * + * @param validated the validated + * @param validationDate the validation date + * @return the relation + */ private Relation createRel(Boolean validated, String validationDate) { Relation rel = new Relation(); rel.setSource("1"); @@ -256,6 +431,13 @@ class MergeTest { return rel; } + /** + * Sets kv. + * + * @param key the key + * @param value the value + * @return the kv + */ private KeyValue setKV(final String key, final String value) { KeyValue k = new KeyValue(); @@ -266,6 +448,14 @@ class MergeTest { return k; } + /** + * Sets sp. + * + * @param value the value + * @param schema the schema + * @param classname the classname + * @return the sp + */ private StructuredProperty setSP( final String value, final String schema, final String classname) { StructuredProperty s = new StructuredProperty(); @@ -279,24 +469,48 @@ class MergeTest { return s; } + /** + * Field field. + * + * @param the type parameter + * @param value the value + * @return the field + */ private Field field(T value) { Field f = new Field(); f.setValue(value); return f; } + /** + * Publication publication. + * + * @return the publication + */ private Publication publication() { Publication p = new Publication(); p.setDataInfo(df("0.9")); return p; } + /** + * Publication publication. + * + * @param trust the trust + * @return the publication + */ private Publication publication(String trust) { Publication p = new Publication(); p.setDataInfo(df(trust)); return p; } + /** + * Df data info. + * + * @param trust the trust + * @return the data info + */ private DataInfo df(String trust) { DataInfo d = new DataInfo(); d.setTrust(trust); diff --git a/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/enrichment.json b/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/enrichment.json new file mode 100644 index 0000000..a26b106 --- /dev/null +++ b/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/enrichment.json @@ -0,0 +1,12 @@ +{"dataInfo":{"deletedbyinference":false,"inferred":true,"invisible":false,"provenanceaction":{"classid":"sysimport:enrich","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"id":"unresolved::10.0000/ra.v2i3.114::doi","instance":[{"measures":[{"id":"influence","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"5.91019644836e-09"}]},{"id":"popularity_alt","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"0.0"}]},{"id":"popularity","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"4.65008652949e-09"}]}],"pid":[{"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.0000/ra.v2i3.114"}]}]} +{"dataInfo":{"deletedbyinference":false,"inferred":true,"invisible":false,"provenanceaction":{"classid":"sysimport:enrich","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"id":"unresolved::10.0001/(aj).v3i6.458::doi","instance":[{"measures":[{"id":"influence","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"5.91019644836e-09"}]},{"id":"popularity_alt","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"0.0"}]},{"id":"popularity","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"4.01810569717e-09"}]}],"pid":[{"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.0001/(aj).v3i6.458"}]}]} +{"dataInfo":{"deletedbyinference":false,"inferred":true,"invisible":false,"provenanceaction":{"classid":"sysimport:enrich","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"id":"unresolved::10.0001/1587::doi","instance":[{"measures":[{"id":"influence","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"5.91019644836e-09"}]},{"id":"popularity_alt","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"0.0"}]},{"id":"popularity","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"5.39172290649e-09"}]}],"pid":[{"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.0001/1587"}]}]} +{"dataInfo":{"deletedbyinference":false,"inferred":true,"invisible":false,"provenanceaction":{"classid":"sysimport:enrich","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"id":"unresolved::10.0001/462::doi","instance":[{"measures":[{"id":"influence","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"6.33235333753e-09"}]},{"id":"popularity_alt","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"0.36"}]},{"id":"popularity","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"5.00285265116e-09"}]}],"pid":[{"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.0001/462"}]}]} +{"dataInfo":{"deletedbyinference":false,"inferred":true,"invisible":false,"provenanceaction":{"classid":"sysimport:enrich","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"id":"unresolved::10.0001/731::doi","instance":[{"measures":[{"id":"influence","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"5.91019644836e-09"}]},{"id":"popularity_alt","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"0.0"}]},{"id":"popularity","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"4.01810569717e-09"}]}],"pid":[{"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.0001/731"}]}]} +{"dataInfo":{"deletedbyinference":false,"inferred":true,"invisible":false,"provenanceaction":{"classid":"sysimport:enrich","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"id":"unresolved::10.0001/ijllis.v9i4.2066.g2482::doi","instance":[{"measures":[{"id":"influence","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"5.91019644836e-09"}]},{"id":"popularity_alt","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"0.0"}]},{"id":"popularity","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"8.48190886761e-09"}]}],"pid":[{"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.0001/ijllis.v9i4.2066.g2482"}]}]} +{"dataInfo":{"deletedbyinference":false,"inferred":true,"invisible":false,"provenanceaction":{"classid":"sysimport:enrich","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"id":"unresolved::10.0118/alfahim.v3i1.140::doi","instance":[{"measures":[{"id":"influence","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"5.91019644836e-09"}]},{"id":"popularity_alt","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"0.0"}]},{"id":"popularity","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"9.88840807598e-09"}]}],"pid":[{"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.0118/alfahim.v3i1.140"}]}]} +{"dataInfo":{"deletedbyinference":false,"inferred":true,"invisible":false,"provenanceaction":{"classid":"sysimport:enrich","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"id":"unresolved::10.0166/fk2.stagefigshare.6442896.v3::doi","instance":[{"measures":[{"id":"influence","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"5.91019644836e-09"}]},{"id":"popularity_alt","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"0.0"}]},{"id":"popularity","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"7.28336930301e-09"}]}],"pid":[{"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.0166/fk2.stagefigshare.6442896.v3"}]}]} +{"dataInfo":{"deletedbyinference":false,"inferred":true,"invisible":false,"provenanceaction":{"classid":"sysimport:enrich","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"id":"unresolved::10.0301/jttb.v2i1.64::doi","instance":[{"measures":[{"id":"influence","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"5.91019644836e-09"}]},{"id":"popularity_alt","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"0.0"}]},{"id":"popularity","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"7.28336930301e-09"}]}],"pid":[{"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.0301/jttb.v2i1.64"}]}]} +{"dataInfo":{"deletedbyinference":false,"inferred":true,"invisible":false,"provenanceaction":{"classid":"sysimport:enrich","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"id":"unresolved::10.0809/seruni.v1i1.567::doi","instance":[{"measures":[{"id":"influence","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"5.91019644836e-09"}]},{"id":"popularity_alt","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"0.0"}]},{"id":"popularity","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"2.62959564033e-09"}]}],"pid":[{"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.0809/seruni.v1i1.567"}]}]} +{"dataInfo":{"deletedbyinference":false,"inferred":true,"invisible":false,"provenanceaction":{"classid":"sysimport:enrich","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"id":"unresolved::10.0809/seruni.v2i1.765::doi","instance":[{"measures":[{"id":"influence","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"9.40178571921e-09"}]},{"id":"popularity_alt","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"0.0559872"}]},{"id":"popularity","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"3.67659957614e-09"}]}],"pid":[{"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.0809/seruni.v2i1.765"}]}]} +{"dataInfo":{"deletedbyinference":false,"inferred":true,"invisible":false,"provenanceaction":{"classid":"sysimport:enrich","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"id":"unresolved::10.0901/jkip.v7i3.485::doi","instance":[{"measures":[{"id":"influence","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"5.91019644836e-09"}]},{"id":"popularity_alt","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"0.0"}]},{"id":"popularity","unit":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"update","inferred":true,"invisible":false,"provenanceaction":{"classid":"measure:bip","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":""},"key":"score","value":"6.26204125721e-09"}]}],"pid":[{"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.0901/jkip.v7i3.485"}]}]} \ No newline at end of file diff --git a/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publications.json b/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publications.json new file mode 100644 index 0000000..ef0cc58 --- /dev/null +++ b/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publications.json @@ -0,0 +1,12 @@ +{"author":[{"fullname":"Levande, Paul","name":"Paul","pid":[],"rank":1,"surname":"Levande"}],"bestaccessright":{"classid":"OPEN","classname":"Open Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"collectedfrom":[{"key":"10|openaire____::6824b298c96ba906a3e6a70593affbf5","value":"Episciences"}],"context":[],"contributor":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Coordination Episciences iam"}],"country":[],"coverage":[],"dataInfo":{"deletedbyinference":true,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2011-01-01"},"dateofcollection":"2021-11-09T19:00:42.081Z","dateoftransformation":"2021-11-09T19:36:08.397Z","description":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"We examine the $q=1$ and $t=0$ special cases of the parking functions conjecture. The parking functions conjecture states that the Hilbert series for the space of diagonal harmonics is equal to the bivariate generating function of $area$ and $dinv$ over the set of parking functions. Haglund recently proved that the Hilbert series for the space of diagonal harmonics is equal to a bivariate generating function over the set of Tesler matrices–upper-triangular matrices with every hook sum equal to one. We give a combinatorial interpretation of the Haglund generating function at $q=1$ and prove the corresponding case of the parking functions conjecture (first proven by Garsia and Haiman). We also discuss a possible proof of the $t = 0$ case consistent with this combinatorial interpretation. We conclude by briefly discussing possible refinements of the parking functions conjecture arising from this research and point of view. $\\textbf{Note added in proof}$: We have since found such a proof of the $t = 0$ case and conjectured more detailed refinements. This research will most likely be presented in full in a forthcoming article."},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"On examine les cas spéciaux $q=1$ et $t=0$ de la conjecture des fonctions de stationnement. Cette conjecture déclare que la série de Hilbert pour l'espace des harmoniques diagonaux est égale à la fonction génératrice bivariée (paramètres $area$ et $dinv$) sur l'ensemble des fonctions de stationnement. Haglund a prouvé récemment que la série de Hilbert pour l'espace des harmoniques diagonaux est égale à une fonction génératrice bivariée sur l'ensemble des matrices de Tesler triangulaires supérieures dont la somme de chaque équerre vaut un. On donne une interprétation combinatoire de la fonction génératrice de Haglund pour $q=1$ et on prouve le cas correspondant de la conjecture dans le cas des fonctions de stationnement (prouvé d'abord par Garsia et Haiman). On discute aussi d'une preuve possible du cas $t=0$, cohérente avec cette interprétation combinatoire. On conclut en discutant brièvement les raffinements possibles de la conjecture des fonctions de stationnement de ce point de vue. $\\textbf{Note ajoutée sur épreuve}$: j'ai trouvé depuis cet article une preuve du cas $t=0$ et conjecturé des raffinements possibles. Ces résultats seront probablement présentés dans un article ultérieur."}],"externalReference":[],"extraInfo":[],"format":[],"fulltext":[],"id":"50|06cdd3ff4700::93859bd27121c3ee7c6ee4bfb1790cba","instance":[{"accessright":{"classid":"OPEN","classname":"Open Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"alternateIdentifier":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.46298/dmtcs.2940"}],"collectedfrom":{"key":"10|openaire____::6824b298c96ba906a3e6a70593affbf5","value":"Episciences"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2011-01-01"},"distributionlocation":"","hostedby":{"key":"10|openaire____::6824b298c96ba906a3e6a70593affbf5","value":"Episciences"},"instancetype":{"classid":"0001","classname":"Article","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"pid":[],"refereed":{"classid":"0000","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"url":["https://dmtcs.episciences.org/2940"]}],"language":{"classid":"eng","classname":"English","schemeid":"dnet:languages","schemename":"dnet:languages"},"lastupdatetimestamp":1638458725892,"oaiprovenance":{"originDescription":{"altered":true,"baseURL":"https%3A%2F%2Foai.episciences.org%2F","datestamp":"2011-01-01","harvestDate":"2021-11-09T19:00:42.081Z","identifier":"oai:episciences.org:dmtcs:2940","metadataNamespace":"http://www.openarchives.org/OAI/2.0/oai_dc/"}},"originalId":["50|06cdd3ff4700::93859bd27121c3ee7c6ee4bfb1790cba","oai:episciences.org:dmtcs:2940"],"pid":[],"relevantdate":[],"resourcetype":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:dataCite_resource","schemename":"dnet:dataCite_resource"},"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"source":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"ISSN: 1365-8050"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Discrete Mathematics & Theoretical Computer Science"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Episciences.org"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"dmtcs:2940 - Discrete Mathematics & Theoretical Computer Science, 2011-01-01, DMTCS Proceedings vol. AO, 23rd International Conference on Formal Power Series and Algebraic Combinatorics (FPSAC 2011)"}],"subject":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"parking function"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"Hilbert series"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"diagonal harmonics"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"[MATH.MATH-CO] Mathematics [math]/Combinatorics [math.CO]"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"[INFO.INFO-DM] Computer Science [cs]/Discrete Mathematics [cs.DM]"}],"title":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"main title","classname":"main title","schemeid":"dnet:dataCite_title","schemename":"dnet:dataCite_title"},"value":"Special Cases of the Parking Functions Conjecture and Upper-Triangular Matrices"}]} +{"author":[{"fullname":"Ward, Mark Daniel","name":"Mark Daniel","pid":[],"rank":1,"surname":"Ward"},{"fullname":"Szpankowski, Wojciech","name":"Wojciech","pid":[],"rank":2,"surname":"Szpankowski"}],"bestaccessright":{"classid":"OPEN","classname":"Open Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"collectedfrom":[{"key":"10|openaire____::6824b298c96ba906a3e6a70593affbf5","value":"Episciences"}],"context":[],"contributor":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Coordination Episciences iam"}],"country":[],"coverage":[],"dataInfo":{"deletedbyinference":true,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2005-01-01"},"dateofcollection":"2021-11-09T19:00:34.758Z","dateoftransformation":"2021-11-09T19:50:55.725Z","description":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"In a suffix tree, the multiplicity matching parameter (MMP) $M_n$ is the number of leaves in the subtree rooted at the branching point of the $(n+1)$st insertion. Equivalently, the MMP is the number of pointers into the database in the Lempel-Ziv '77 data compression algorithm. We prove that the MMP asymptotically follows the logarithmic series distribution plus some fluctuations. In the proof we compare the distribution of the MMP in suffix trees to its distribution in tries built over independent strings. Our results are derived by both probabilistic and analytic techniques of the analysis of algorithms. In particular, we utilize combinatorics on words, bivariate generating functions, pattern matching, recurrence relations, analytical poissonization and depoissonization, the Mellin transform, and complex analysis."}],"externalReference":[],"extraInfo":[],"format":[],"fulltext":[],"id":"50|06cdd3ff4700::ff21e3c55d527fa7db171137c5fd1f1f","instance":[{"accessright":{"classid":"OPEN","classname":"Open Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"alternateIdentifier":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.46298/dmtcs.3387"}],"collectedfrom":{"key":"10|openaire____::6824b298c96ba906a3e6a70593affbf5","value":"Episciences"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2005-01-01"},"distributionlocation":"","hostedby":{"key":"10|openaire____::6824b298c96ba906a3e6a70593affbf5","value":"Episciences"},"instancetype":{"classid":"0001","classname":"Article","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"pid":[],"refereed":{"classid":"0000","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"url":["https://dmtcs.episciences.org/3387"]}],"language":{"classid":"eng","classname":"English","schemeid":"dnet:languages","schemename":"dnet:languages"},"lastupdatetimestamp":1638458734473,"oaiprovenance":{"originDescription":{"altered":true,"baseURL":"https%3A%2F%2Foai.episciences.org%2F","datestamp":"2005-01-01","harvestDate":"2021-11-09T19:00:34.758Z","identifier":"oai:episciences.org:dmtcs:3387","metadataNamespace":"http://www.openarchives.org/OAI/2.0/oai_dc/"}},"originalId":["50|06cdd3ff4700::ff21e3c55d527fa7db171137c5fd1f1f","oai:episciences.org:dmtcs:3387"],"pid":[],"relevantdate":[],"resourcetype":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:dataCite_resource","schemename":"dnet:dataCite_resource"},"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"source":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"ISSN: 1365-8050"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Discrete Mathematics & Theoretical Computer Science"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Episciences.org"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"dmtcs:3387 - Discrete Mathematics & Theoretical Computer Science, 2005-01-01, DMTCS Proceedings vol. AD, International Conference on Analysis of Algorithms"}],"subject":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"data compression"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"complex asymptotics"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"suffix trees"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"combinatorics on words"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"pattern matching"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"autocorrelation polynomial"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"[INFO.INFO-DS] Computer Science [cs]/Data Structures and Algorithms [cs.DS]"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"[INFO.INFO-DM] Computer Science [cs]/Discrete Mathematics [cs.DM]"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"[MATH.MATH-CO] Mathematics [math]/Combinatorics [math.CO]"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:subject_classification_typologies","schemename":"dnet:subject_classification_typologies"},"value":"[INFO.INFO-CG] Computer Science [cs]/Computational Geometry [cs.CG]"}],"title":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"main title","classname":"main title","schemeid":"dnet:dataCite_title","schemename":"dnet:dataCite_title"},"value":"Analysis of the multiplicity matching parameter in suffix trees"}]} +{"author":[{"fullname":"Södergård, Caj","name":"Caj","pid":[],"rank":1,"surname":"Södergård"}],"bestaccessright":{"classid":"RESTRICTED","classname":"Restricted","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"collectedfrom":[{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"}],"context":[],"contributor":[],"country":[],"coverage":[],"dataInfo":{"deletedbyinference":true,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"1989-01-01"},"dateofcollection":"2021-11-06T12:40:33.938Z","dateoftransformation":"2021-11-06T13:13:36.91Z","description":[],"externalReference":[],"extraInfo":[],"format":[],"fulltext":[],"id":"50|355e65625b88::046477dc24819c5f1453166aa7bfb75e","instance":[{"accessright":{"classid":"RESTRICTED","classname":"Restricted","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"alternateIdentifier":[],"collectedfrom":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"1989-01-01"},"distributionlocation":"","hostedby":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"instancetype":{"classid":"0004","classname":"Conference object","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"pid":[],"refereed":{"classid":"0000","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"url":["https://cris.vtt.fi/en/publications/42136eb0-696d-4861-b587-3b451a46a914"]}],"language":{"classid":"fin","classname":"Finnish","schemeid":"dnet:languages","schemename":"dnet:languages"},"lastupdatetimestamp":1638458015650,"oaiprovenance":{"originDescription":{"altered":true,"baseURL":"https%3A%2F%2Fcris.vtt.fi%2Fws%2Foai","datestamp":"2019-06-19T05:36:38Z","harvestDate":"2021-11-06T12:40:33.938Z","identifier":"oai:cris.vtt.fi:publications/42136eb0-696d-4861-b587-3b451a46a914","metadataNamespace":"http://www.openarchives.org/OAI/2.0/oai_dc/"}},"originalId":["50|355e65625b88::046477dc24819c5f1453166aa7bfb75e","oai:cris.vtt.fi:publications/42136eb0-696d-4861-b587-3b451a46a914"],"pid":[],"relevantdate":[],"resourcetype":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:dataCite_resource","schemename":"dnet:dataCite_resource"},"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"source":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Södergård , C 1989 , ' Telefax ja telefoto ' , Kehittyvä tiedonsiirto graafisessa yrityksessä , Helsinki , Finland , 29/05/89 - 30/05/89 ."}],"subject":[],"title":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"main title","classname":"main title","schemeid":"dnet:dataCite_title","schemename":"dnet:dataCite_title"},"value":"Telefax ja telefoto"}]} +{"author":[{"fullname":"Antikainen, Maria","name":"Maria","pid":[],"rank":1,"surname":"Antikainen"},{"fullname":"Niemelä, Marketta","name":"Marketta","pid":[],"rank":2,"surname":"Niemelä"}],"bestaccessright":{"classid":"CLOSED","classname":"Closed Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"collectedfrom":[{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"}],"context":[],"contributor":[],"country":[],"coverage":[],"dataInfo":{"deletedbyinference":true,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2017-01-01"},"dateofcollection":"2021-11-06T12:40:11.372Z","dateoftransformation":"2021-11-06T15:30:47.295Z","description":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Local food supports local finance, employment and cultural traditions. Local food producers often have limited resources to invest in R&D, and their risk-taking ability is low. Earlier studies in the online community context indicate that utilising the user's creativity and innovation capability has a great deal of potential for new product development and service design. For local food producers, social media offers cost-efficient opportunities for involving customers in product and service development. The aim of the study is to explore the potential of a co-creation approach for local food producers and how to engage consumers in that co-creation. The study is dyadic, taking both the consumers' and producers' perspectives. The results indicate that consumers seem to be interested in having long-term relationships with producers. Their motivations to participate in co-creation processes were found to be mostly related to the possibility of producing better products and of learning and gaining new insights. The producers who participated in our study have already taken the first steps in using social media, and the next logical step would be utilising social media in the co-creation process."}],"externalReference":[],"extraInfo":[],"format":[],"fulltext":[],"id":"50|355e65625b88::38d0ab3b2212878dee7072170f1561ee","instance":[{"accessright":{"classid":"CLOSED","classname":"Closed Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"alternateIdentifier":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.1504/ijtmkt.2017.081507"}],"collectedfrom":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2017-01-01"},"distributionlocation":"","hostedby":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"instancetype":{"classid":"0001","classname":"Article","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"pid":[],"refereed":{"classid":"0000","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"url":["https://cris.vtt.fi/en/publications/44aa6ac9-4763-4cef-a683-220dbcb02712"]}],"language":{"classid":"eng","classname":"English","schemeid":"dnet:languages","schemename":"dnet:languages"},"lastupdatetimestamp":1638458079051,"oaiprovenance":{"originDescription":{"altered":true,"baseURL":"https%3A%2F%2Fcris.vtt.fi%2Fws%2Foai","datestamp":"2021-10-22T11:41:35Z","harvestDate":"2021-11-06T12:40:11.372Z","identifier":"oai:cris.vtt.fi:publications/44aa6ac9-4763-4cef-a683-220dbcb02712","metadataNamespace":"http://www.openarchives.org/OAI/2.0/oai_dc/"}},"originalId":["oai:cris.vtt.fi:publications/44aa6ac9-4763-4cef-a683-220dbcb02712","50|355e65625b88::38d0ab3b2212878dee7072170f1561ee"],"pid":[],"relevantdate":[],"resourcetype":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:dataCite_resource","schemename":"dnet:dataCite_resource"},"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"source":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Antikainen , M & Niemelä , M 2017 , ' How to co-create local food products with consumers? ' , International Journal of Technology Marketing , vol. 12 , no. 1 , pp. 71-89 . https://doi.org/10.1504/IJTMKT.2017.081507"}],"subject":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"co-creation"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"local food"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"new product development"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"open innovation"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"social media"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"case study"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"consumer"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"co-development"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"co-design"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"user involvement"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"sustainability"}],"title":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"main title","classname":"main title","schemeid":"dnet:dataCite_title","schemename":"dnet:dataCite_title"},"value":"How to co-create local food products with consumers?"}]} +{"author":[{"fullname":"Lehtinen, Pekka","name":"Pekka","pid":[],"rank":1,"surname":"Lehtinen"},{"fullname":"Sibakov, Juhani","name":"Juhani","pid":[],"rank":2,"surname":"Sibakov"}],"bestaccessright":{"classid":"RESTRICTED","classname":"Restricted","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"collectedfrom":[{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"}],"context":[],"contributor":[],"country":[],"coverage":[],"dataInfo":{"deletedbyinference":true,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2010-01-01"},"dateofcollection":"2021-11-06T12:47:29.271Z","dateoftransformation":"2021-11-06T16:36:12.322Z","description":[],"externalReference":[],"extraInfo":[],"format":[],"fulltext":[],"id":"50|355e65625b88::4d3f5bf7749b9a26c01e80f3dd36daef","instance":[{"accessright":{"classid":"RESTRICTED","classname":"Restricted","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"alternateIdentifier":[],"collectedfrom":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2010-01-01"},"distributionlocation":"","hostedby":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"instancetype":{"classid":"0001","classname":"Article","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"pid":[],"refereed":{"classid":"0000","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"url":["https://cris.vtt.fi/en/publications/39400c55-6b86-4fd5-a380-622e887db9a5"]}],"language":{"classid":"fin","classname":"Finnish","schemeid":"dnet:languages","schemename":"dnet:languages"},"lastupdatetimestamp":1638458104266,"oaiprovenance":{"originDescription":{"altered":true,"baseURL":"https%3A%2F%2Fcris.vtt.fi%2Fws%2Foai","datestamp":"2021-11-03T06:19:09Z","harvestDate":"2021-11-06T12:47:29.271Z","identifier":"oai:cris.vtt.fi:publications/39400c55-6b86-4fd5-a380-622e887db9a5","metadataNamespace":"http://www.openarchives.org/OAI/2.0/oai_dc/"}},"originalId":["50|355e65625b88::4d3f5bf7749b9a26c01e80f3dd36daef","oai:cris.vtt.fi:publications/39400c55-6b86-4fd5-a380-622e887db9a5"],"pid":[],"relevantdate":[],"resourcetype":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:dataCite_resource","schemename":"dnet:dataCite_resource"},"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"source":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Lehtinen , P & Sibakov , J 2010 , ' Enemmän kaurasta ' , Mallas ja Olut , vol. 2010 , no. 3 , pp. 84-87 ."}],"subject":[],"title":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"main title","classname":"main title","schemeid":"dnet:dataCite_title","schemename":"dnet:dataCite_title"},"value":"Enemmän kaurasta"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"main title","classname":"main title","schemeid":"dnet:dataCite_title","schemename":"dnet:dataCite_title"},"value":"More from oats"}]} +{"author":[{"fullname":"Ronkainen, Hannu","name":"Hannu","pid":[],"rank":1,"surname":"Ronkainen"},{"fullname":"Mellin, Joni","name":"Joni","pid":[],"rank":2,"surname":"Mellin"}],"bestaccessright":{"classid":"CLOSED","classname":"Closed Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"collectedfrom":[{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"}],"context":[],"contributor":[],"country":[],"coverage":[],"dataInfo":{"deletedbyinference":true,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2004-01-01"},"dateofcollection":"2021-11-06T12:44:56.68Z","dateoftransformation":"2021-11-06T17:00:20.868Z","description":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"A floating capacitor with a MOS charge injector structure can be used as a nonvolatile memory. This type of memory device can be embedded into an analog MOS technology with capacitors. In this article the feasibility of the structure for small scale embedded memory is studied with 1.5µm analog ASIC molybdenum gate technology."}],"externalReference":[],"extraInfo":[],"format":[],"fulltext":[],"id":"50|355e65625b88::56bbb35df31e73991dee2df139a1cefa","instance":[{"accessright":{"classid":"CLOSED","classname":"Closed Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"alternateIdentifier":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.1088/0031-8949/2004/t114/034"}],"collectedfrom":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2004-01-01"},"distributionlocation":"","hostedby":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"instancetype":{"classid":"0001","classname":"Article","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"pid":[],"refereed":{"classid":"0000","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"url":["https://cris.vtt.fi/en/publications/8f14e470-b1fe-46fd-bc71-207b65751a4c"]}],"language":{"classid":"eng","classname":"English","schemeid":"dnet:languages","schemename":"dnet:languages"},"lastupdatetimestamp":1638458115933,"oaiprovenance":{"originDescription":{"altered":true,"baseURL":"https%3A%2F%2Fcris.vtt.fi%2Fws%2Foai","datestamp":"2021-01-01T03:20:34Z","harvestDate":"2021-11-06T12:44:56.68Z","identifier":"oai:cris.vtt.fi:publications/8f14e470-b1fe-46fd-bc71-207b65751a4c","metadataNamespace":"http://www.openarchives.org/OAI/2.0/oai_dc/"}},"originalId":["oai:cris.vtt.fi:publications/8f14e470-b1fe-46fd-bc71-207b65751a4c","50|355e65625b88::56bbb35df31e73991dee2df139a1cefa"],"pid":[],"relevantdate":[],"resourcetype":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:dataCite_resource","schemename":"dnet:dataCite_resource"},"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"source":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Ronkainen , H & Mellin , J 2004 , ' EEPROM cell design for molybdenum gate analog BECMOS process ' , Physica Scripta , vol. T114 , pp. 133 - 137 . https://doi.org/10.1088/0031-8949/2004/T114/034"}],"subject":[],"title":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"main title","classname":"main title","schemeid":"dnet:dataCite_title","schemename":"dnet:dataCite_title"},"value":"EEPROM cell design for molybdenum gate analog BECMOS process"}]} +{"author":[],"bestaccessright":{"classid":"RESTRICTED","classname":"Restricted","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"collectedfrom":[{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"}],"context":[],"contributor":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Vallinheimo, Eija"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Setälä, Tarja"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Sohlberg, Sakari"}],"country":[{"classid":"FI","classname":"Finland","dataInfo":{"deletedbyinference":false,"inferenceprovenance":"propagation","inferred":true,"invisible":false,"provenanceaction":{"classid":"country:instrepos","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.85"},"schemeid":"dnet:countries","schemename":"dnet:countries"}],"coverage":[],"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2002-01-01"},"dateofcollection":"2021-11-06T12:47:04.287Z","dateoftransformation":"2021-11-06T18:34:59.086Z","description":[],"externalReference":[],"extraInfo":[],"format":[],"fulltext":[],"id":"50|355e65625b88::76e3f831b17a51b6c2c5d072469c7587","instance":[{"accessright":{"classid":"RESTRICTED","classname":"Restricted","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"alternateIdentifier":[],"collectedfrom":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2002-01-01"},"distributionlocation":"","hostedby":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"instancetype":{"classid":"0002","classname":"Book","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"pid":[],"refereed":{"classid":"0000","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"url":["https://cris.vtt.fi/en/publications/6d8a9079-5a24-43d3-bcd5-1b5f538b3c0b"]}],"language":{"classid":"fin","classname":"Finnish","schemeid":"dnet:languages","schemename":"dnet:languages"},"lastupdatetimestamp":1638458154975,"oaiprovenance":{"originDescription":{"altered":true,"baseURL":"https%3A%2F%2Fcris.vtt.fi%2Fws%2Foai","datestamp":"2020-11-20T08:22:01Z","harvestDate":"2021-11-06T12:47:04.287Z","identifier":"oai:cris.vtt.fi:publications/6d8a9079-5a24-43d3-bcd5-1b5f538b3c0b","metadataNamespace":"http://www.openarchives.org/OAI/2.0/oai_dc/"}},"originalId":["50|355e65625b88::76e3f831b17a51b6c2c5d072469c7587","oai:cris.vtt.fi:publications/6d8a9079-5a24-43d3-bcd5-1b5f538b3c0b"],"pid":[],"publisher":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"VTT Technical Research Centre of Finland"},"relevantdate":[],"resourcetype":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:dataCite_resource","schemename":"dnet:dataCite_resource"},"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"source":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Vallinheimo , E , Setälä , T & Sohlberg , S (eds) 2002 , Kuinka metallintutkimus jalostui : Muistelmia metallurgian laboratoriosta 1942-1994 . VTT Technical Research Centre of Finland , Espoo ."}],"subject":[],"title":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"main title","classname":"main title","schemeid":"dnet:dataCite_title","schemename":"dnet:dataCite_title"},"value":"Kuinka metallintutkimus jalostui:Muistelmia metallurgian laboratoriosta 1942-1994"}]} +{"author":[{"fullname":"Cao, Sunliang","name":"Sunliang","pid":[],"rank":1,"surname":"Cao"},{"fullname":"Hasan, Ala","name":"Ala","pid":[],"rank":2,"surname":"Hasan"},{"fullname":"Siren, Kai","name":"Kai","pid":[],"rank":3,"surname":"Siren"}],"bestaccessright":{"classid":"CLOSED","classname":"Closed Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"collectedfrom":[{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"}],"context":[],"contributor":[],"country":[],"coverage":[],"dataInfo":{"deletedbyinference":true,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2013-01-01"},"dateofcollection":"2021-11-06T12:41:33.649Z","dateoftransformation":"2021-11-06T18:56:51.151Z","description":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"The objective of this paper is to close the scientific gap that there is a lack of comprehensive matching analysis for the increasingly complicated on-site hybrid energy systems with a continuously decreased annual primary energy consumption/equivalent CO2 emission. Thus, a thorough matching analysis is conducted for the on-site hybrid systems of two office buildings under distinct climate conditions. Both of the studied buildings are equipped with PV and solar thermal assisted ground source heat pumps (GSHP), which can be controlled by six excess renewable electrical (REe) and one excess renewable thermal (REth) treatments with respect to certain thermal storage recharging and grid exporting strategies. The assessment criteria are six recently defined indices. With the aid of these indices, the key methodology is to conduct parametric analyses from the aspect of matching for solar thermal collector area and connection type, PV panel area, and electrical battery size regarding certain excess REe or REth treatments. The outcomes of matching analyses show the advantages of solar thermal collectors connected in a parallel fashion in meeting office heating demands, the consistency between electrical generation and demand in the daytime in office buildings, the enhancement of on-site heating and cooling by GSHP and free ground cooling, and the battery effect in technically improving electrical matching. Furthermore, the fluctuations of indices in the instantaneous matching analysis clearly reflect the matching situations of on-site renewable energy resources and demand conditions at each time-step, which will be helpful for the detailed investigation of specific system operations and user behaviours. It has been shown that the methodology used in the study can be helpful for aiding the design of increasingly complicated on-site hybrid energy systems."}],"externalReference":[],"extraInfo":[],"format":[],"fulltext":[],"id":"50|355e65625b88::7c73a836ec6edb701b2ed0a45de2be34","instance":[{"accessright":{"classid":"CLOSED","classname":"Closed Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"alternateIdentifier":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.1016/j.apenergy.2013.07.031"}],"collectedfrom":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2013-01-01"},"distributionlocation":"","hostedby":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"instancetype":{"classid":"0001","classname":"Article","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"pid":[],"refereed":{"classid":"0000","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"url":["https://cris.vtt.fi/en/publications/b1dfe7fc-4e60-4982-8f1c-ccc12579ab00"]}],"language":{"classid":"eng","classname":"English","schemeid":"dnet:languages","schemename":"dnet:languages"},"lastupdatetimestamp":1638458162087,"oaiprovenance":{"originDescription":{"altered":true,"baseURL":"https%3A%2F%2Fcris.vtt.fi%2Fws%2Foai","datestamp":"2021-06-19T01:36:54Z","harvestDate":"2021-11-06T12:41:33.649Z","identifier":"oai:cris.vtt.fi:publications/b1dfe7fc-4e60-4982-8f1c-ccc12579ab00","metadataNamespace":"http://www.openarchives.org/OAI/2.0/oai_dc/"}},"originalId":["oai:cris.vtt.fi:publications/b1dfe7fc-4e60-4982-8f1c-ccc12579ab00","50|355e65625b88::7c73a836ec6edb701b2ed0a45de2be34"],"pid":[],"relevantdate":[],"resourcetype":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:dataCite_resource","schemename":"dnet:dataCite_resource"},"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"source":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Cao , S , Hasan , A & Siren , K 2013 , ' Matching analysis for on-site hybrid renewable energy systems of office buildings with extended indices ' , Applied Energy , vol. 113 , pp. 230-247 . https://doi.org/10.1016/j.apenergy.2013.07.031"}],"subject":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"ground source heat pump"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"matching indices"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"mismatch analysis"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"office building"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"renewable feed-in"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"solar"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"/dk/atira/pure/sustainabledevelopmentgoals/affordable_and_clean_energy"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"SDG 7 - Affordable and Clean Energy"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"/dk/atira/pure/sustainabledevelopmentgoals/climate_action"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"SDG 13 - Climate Action"}],"title":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"main title","classname":"main title","schemeid":"dnet:dataCite_title","schemename":"dnet:dataCite_title"},"value":"Matching analysis for on-site hybrid renewable energy systems of office buildings with extended indices"}]} +{"author":[{"fullname":"Suni, Ilkka","name":"Ilkka","pid":[],"rank":1,"surname":"Suni"},{"fullname":"Grönberg, Leif","name":"Leif","pid":[],"rank":2,"surname":"Grönberg"},{"fullname":"Saarilahti, Jaakko","name":"Jaakko","pid":[],"rank":3,"surname":"Saarilahti"}],"bestaccessright":{"classid":"RESTRICTED","classname":"Restricted","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"collectedfrom":[{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"}],"context":[],"contributor":[],"country":[{"classid":"FI","classname":"Finland","dataInfo":{"deletedbyinference":false,"inferenceprovenance":"propagation","inferred":true,"invisible":false,"provenanceaction":{"classid":"country:instrepos","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.85"},"schemeid":"dnet:countries","schemename":"dnet:countries"}],"coverage":[],"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"1987-01-01"},"dateofcollection":"2021-11-06T12:46:23.315Z","dateoftransformation":"2021-11-06T19:15:49.866Z","description":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"The authors report on the effects of ion implantation and rapid thermal annealing on the electrical transport properties of TiSi2 and MoSi2. The silicide layers were formed by solid phase reactions of sputtered metal films with silicon. Some of the wafers were implanted at room temperature with arsenic. To investigate the damage recovery, one of the samples were subjected to rapid thermal annealing. The resistivities of the silicides were measured in the van der Pauw configuration. The results are presented and discussed."}],"externalReference":[],"extraInfo":[],"format":[],"fulltext":[],"id":"50|355e65625b88::80ee0506f19328fb194bd236f29b8c49","instance":[{"accessright":{"classid":"RESTRICTED","classname":"Restricted","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"alternateIdentifier":[],"collectedfrom":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"1987-01-01"},"distributionlocation":"","hostedby":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"instancetype":{"classid":"0001","classname":"Article","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"pid":[],"refereed":{"classid":"0000","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"url":["https://cris.vtt.fi/en/publications/6ad59175-e7a1-4c3f-9e14-0e2978e54a66"]}],"language":{"classid":"eng","classname":"English","schemeid":"dnet:languages","schemename":"dnet:languages"},"lastupdatetimestamp":1638458167217,"oaiprovenance":{"originDescription":{"altered":true,"baseURL":"https%3A%2F%2Fcris.vtt.fi%2Fws%2Foai","datestamp":"2021-05-25T05:25:16Z","harvestDate":"2021-11-06T12:46:23.315Z","identifier":"oai:cris.vtt.fi:publications/6ad59175-e7a1-4c3f-9e14-0e2978e54a66","metadataNamespace":"http://www.openarchives.org/OAI/2.0/oai_dc/"}},"originalId":["50|355e65625b88::80ee0506f19328fb194bd236f29b8c49","oai:cris.vtt.fi:publications/6ad59175-e7a1-4c3f-9e14-0e2978e54a66"],"pid":[],"relevantdate":[],"resourcetype":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:dataCite_resource","schemename":"dnet:dataCite_resource"},"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"source":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Suni , I , Grönberg , L & Saarilahti , J 1987 , ' Transport properties of silicides : effects of ion-irradiation and annealing ' , Vide, les Couches Minces , vol. 42 , no. 236 , pp. 233-236 ."}],"subject":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"titanium silicide"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"ion beams"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"heat treatment"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"molybdenum silicide"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"rapid thermal annealing"}],"title":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"main title","classname":"main title","schemeid":"dnet:dataCite_title","schemename":"dnet:dataCite_title"},"value":"Transport properties of silicides:effects of ion-irradiation and annealing"}]} +{"author":[{"fullname":"Kortelainen, Helena","name":"Helena","pid":[],"rank":1,"surname":"Kortelainen"},{"fullname":"Pursio, Saku","name":"Saku","pid":[],"rank":2,"surname":"Pursio"}],"bestaccessright":{"classid":"RESTRICTED","classname":"Restricted","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"collectedfrom":[{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"}],"context":[],"contributor":[],"country":[],"coverage":[],"dataInfo":{"deletedbyinference":true,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2001-01-01"},"dateofcollection":"2021-11-06T12:47:14.02Z","dateoftransformation":"2021-11-06T20:52:03.055Z","description":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Availability performance is an efficiency measure. As input data, mean times between failures, mean times to repair and failure criticality are required. Detailed availability performance analysis of a production system requires a model, which takes into account the logical structure of the system and the storage capacity between process stages. The model can also take into account the effect of production disturbances and planned stoppages if corresponding data is available. A comprehensive availability performance model is a practical tool when improvements are to be directed effectively, strategies tested, or alternative investment proposals compared."}],"externalReference":[],"extraInfo":[],"format":[],"fulltext":[],"id":"50|355e65625b88::9a9eb0e8d57ecfda331a206f6b122e2b","instance":[{"accessright":{"classid":"RESTRICTED","classname":"Restricted","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"alternateIdentifier":[],"collectedfrom":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2001-01-01"},"distributionlocation":"","hostedby":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"instancetype":{"classid":"0001","classname":"Article","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"pid":[],"refereed":{"classid":"0000","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"url":["https://cris.vtt.fi/en/publications/a92459e2-68b4-45f9-b8a5-ed7b00e764d8"]}],"language":{"classid":"eng","classname":"English","schemeid":"dnet:languages","schemename":"dnet:languages"},"lastupdatetimestamp":1638458197611,"oaiprovenance":{"originDescription":{"altered":true,"baseURL":"https%3A%2F%2Fcris.vtt.fi%2Fws%2Foai","datestamp":"2021-01-01T03:54:58Z","harvestDate":"2021-11-06T12:47:14.02Z","identifier":"oai:cris.vtt.fi:publications/a92459e2-68b4-45f9-b8a5-ed7b00e764d8","metadataNamespace":"http://www.openarchives.org/OAI/2.0/oai_dc/"}},"originalId":["oai:cris.vtt.fi:publications/a92459e2-68b4-45f9-b8a5-ed7b00e764d8","50|355e65625b88::9a9eb0e8d57ecfda331a206f6b122e2b"],"pid":[],"relevantdate":[],"resourcetype":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:dataCite_resource","schemename":"dnet:dataCite_resource"},"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"source":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Kortelainen , H & Pursio , S 2001 , ' Availability performance stands for plant efficiency ' , Paperi ja puu , vol. 83 , no. 4 , pp. 292-296 ."}],"subject":[],"title":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"main title","classname":"main title","schemeid":"dnet:dataCite_title","schemename":"dnet:dataCite_title"},"value":"Availability performance stands for plant efficiency"}]} +{"author":[{"fullname":"Antikainen, Hannele","name":"Hannele","pid":[],"rank":1,"surname":"Antikainen"}],"bestaccessright":{"classid":"RESTRICTED","classname":"Restricted","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"collectedfrom":[{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"}],"context":[],"contributor":[],"country":[],"coverage":[],"dataInfo":{"deletedbyinference":true,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"1996-01-01"},"dateofcollection":"2021-11-06T12:48:05.57Z","dateoftransformation":"2021-11-06T22:12:02.979Z","description":[],"externalReference":[],"extraInfo":[],"format":[],"fulltext":[],"id":"50|355e65625b88::ab957719ef10690373ff1c3cae3769ac","instance":[{"accessright":{"classid":"RESTRICTED","classname":"Restricted","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"alternateIdentifier":[],"collectedfrom":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"1996-01-01"},"distributionlocation":"","hostedby":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"instancetype":{"classid":"0001","classname":"Article","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"pid":[],"refereed":{"classid":"0000","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"url":["https://cris.vtt.fi/en/publications/d26b0846-6bc4-42e2-b343-8849be5e1cf0"]}],"language":{"classid":"fin","classname":"Finnish","schemeid":"dnet:languages","schemename":"dnet:languages"},"lastupdatetimestamp":1638458218199,"oaiprovenance":{"originDescription":{"altered":true,"baseURL":"https%3A%2F%2Fcris.vtt.fi%2Fws%2Foai","datestamp":"2019-08-02T08:01:44Z","harvestDate":"2021-11-06T12:48:05.57Z","identifier":"oai:cris.vtt.fi:publications/d26b0846-6bc4-42e2-b343-8849be5e1cf0","metadataNamespace":"http://www.openarchives.org/OAI/2.0/oai_dc/"}},"originalId":["50|355e65625b88::ab957719ef10690373ff1c3cae3769ac","oai:cris.vtt.fi:publications/d26b0846-6bc4-42e2-b343-8849be5e1cf0"],"pid":[],"relevantdate":[],"resourcetype":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:dataCite_resource","schemename":"dnet:dataCite_resource"},"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"source":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Antikainen , H 1996 , ' Preflight -ohjelma paljastaa tulostusongelmat ' , Suomen Lehdistö , vol. 66 , no. 5 , pp. 22-25 ."}],"subject":[],"title":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"main title","classname":"main title","schemeid":"dnet:dataCite_title","schemename":"dnet:dataCite_title"},"value":"Preflight -ohjelma paljastaa tulostusongelmat"}]} +{"author":[{"fullname":"Leppälahti, Jukka","name":"Jukka","pid":[],"rank":1,"surname":"Leppälahti"}],"bestaccessright":{"classid":"RESTRICTED","classname":"Restricted","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"collectedfrom":[{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"}],"context":[],"contributor":[],"country":[{"classid":"FI","classname":"Finland","dataInfo":{"deletedbyinference":false,"inferenceprovenance":"propagation","inferred":true,"invisible":false,"provenanceaction":{"classid":"country:instrepos","classname":"Inferred by OpenAIRE","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.85"},"schemeid":"dnet:countries","schemename":"dnet:countries"}],"coverage":[],"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"1998-01-01"},"dateofcollection":"2021-11-06T12:50:53.064Z","dateoftransformation":"2021-11-06T22:22:36.446Z","description":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Factors affecting the release and reactions of fuel-bound nitrogen in air gasification conditions were studied in order to be able to minimise their production during gasification. Another objective was to find new means to remove nitrogenous compounds from hot gasification gas. In fluidised-bed and fixed-bed types of gasifier NH3 is the predominant nitrogenous compound in addition to N2. In thermodynamic equilibrium the NH3 content of gasification gas is low. The equilibrium content ranges from 1 to 350 ppms depending on the temperature, pressure and stoichiometric ratio. The highest equilibrium content is usually encountered at high pressure. The real NH3 content of gasifier product gas is usually at least an order of magnitude higher. The fraction of fuel nitrogen that is converted to NH3 in gasification is affected by several factors. During pyrolysis young biomass fuels tend to release part of the fuel nitrogen directly as NH3, whereas coals seem to release fuel nitrogen primarily from structures that favour HCN formation. A low heating rate and factors that increase the extent of secondary reactions of gases and char during pyrolysis also increase the conversion of HCN to NH3. In fluidised-bed (and fixed-bed) gasifiers the conditions seem to favour NH3 formation but in entrained-bed gasifiers a high heating rate may promote HCN formation. Factors affecting the release of char nitrogen in gasifiers are poorly known. In this work, a statistical model was developed, which can predict the conversion of fuel nitrogen to NH3 in a laboratory-scale fluidised-bed gasifier and a larger entrained-bed gasifier. It was found that the formation of NH3 was mostly dependent on the freeboard temperature of the gasifier, and on the iron, calcium, ash and volatile matter content of fuel. Increasing the iron content of the fuel resulted in a strong decreasing effect in the NH3 formation in the fluidised-bed gasifier, but it had a smaller effect in the entrained-bed gasifier. The decomposition rate of NH3 may be increased by adding or creating suitable reactive gas species into the hot gas. In selective catalytic oxidation oxidisers like O2, NO or a mixture of these are added to the gasification gas before flowing the gas through the catalyst bed. Aluminium oxide and aluminium silicate catalysts proved to be the most effective of the materials tested in promoting NH3 decomposition in the presence of oxidisers. The temperature of optimum NH3 reduction was tightly dependent on the composition of the oxidiser used. If NO was allowed to convert to NO2 in the oxidiser mixture before feeding the oxidiser to the reactor, the best conversion was achieved at temperatures below 500 °C. If pure NO and O2 were used, the best conversion was achieved at 500 - 600 °C. An important finding in this work was the ability of aluminium oxide to catalyse the reaction between added O2 and NH3. No nitrogen oxides were formed during this type of NH3 oxidation on the aluminium oxide catalyst. The reaction product was probably N2. When O2/NH3 ratio was 4 in the experiments with synthetic gasification gas, 75% of the NH3 was decomposed in the aluminium oxide bed at the temperature range of 550 - 700 °C. The development of a gas cleaning process based on these results of selective catalytic oxidation still leaves several questions unanswered. The most important questions are connected with optimising the process, with the effect of gas impurities on the reactions and with the alternatives of oxidising HCN to N2 simultaneously with NH3."}],"externalReference":[],"extraInfo":[],"format":[],"fulltext":[],"id":"50|355e65625b88::ad8d151a2ef39d827b1b591ec856d886","instance":[{"accessright":{"classid":"RESTRICTED","classname":"Restricted","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"alternateIdentifier":[],"collectedfrom":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"1998-01-01"},"distributionlocation":"","hostedby":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"instancetype":{"classid":"0006","classname":"Doctoral thesis","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"pid":[],"refereed":{"classid":"0000","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"url":["https://cris.vtt.fi/en/publications/34ca749e-a4cf-47c1-a28f-01720421cdc7"]}],"language":{"classid":"eng","classname":"English","schemeid":"dnet:languages","schemename":"dnet:languages"},"lastupdatetimestamp":1638458220428,"oaiprovenance":{"originDescription":{"altered":true,"baseURL":"https%3A%2F%2Fcris.vtt.fi%2Fws%2Foai","datestamp":"2021-01-02T03:47:22Z","harvestDate":"2021-11-06T12:50:53.064Z","identifier":"oai:cris.vtt.fi:publications/34ca749e-a4cf-47c1-a28f-01720421cdc7","metadataNamespace":"http://www.openarchives.org/OAI/2.0/oai_dc/"}},"originalId":["50|355e65625b88::ad8d151a2ef39d827b1b591ec856d886","oai:cris.vtt.fi:publications/34ca749e-a4cf-47c1-a28f-01720421cdc7"],"pid":[],"publisher":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"VTT Technical Research Centre of Finland"},"relevantdate":[],"resourcetype":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:dataCite_resource","schemename":"dnet:dataCite_resource"},"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"source":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Leppälahti , J 1998 , ' Behaviour of fuel-bound nitrogen in gasification and in high-temperature NH3 removal processes : Dissertation ' , Doctor Degree , Åbo Akademi University , Espoo ."}],"subject":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"gas cleaning"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"gasifiers"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"hot gases"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"nitrogen"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"catalytic cleaning"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"gasification"}],"title":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"main title","classname":"main title","schemeid":"dnet:dataCite_title","schemename":"dnet:dataCite_title"},"value":"Behaviour of fuel-bound nitrogen in gasification and in high-temperature NH3 removal processes:Dissertation"}]} \ No newline at end of file From 30665c840cb99c052e391d1c15d921c2ddd45a18 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Fri, 14 Jan 2022 09:46:32 +0100 Subject: [PATCH 081/146] update method normalized Pid to reuse existent function on CleaningFunction. -renamed the method name --- .../java/eu/dnetlib/dhp/schema/oaf/Result.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java index 47fa87c..9ede797 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java @@ -4,11 +4,10 @@ package eu.dnetlib.dhp.schema.oaf; import java.io.Serializable; import java.util.*; import java.util.stream.Collectors; -import java.util.stream.Stream; import eu.dnetlib.dhp.schema.common.AccessRightComparator; import eu.dnetlib.dhp.schema.common.ModelConstants; -import org.apache.commons.lang3.EnumUtils; +import eu.dnetlib.dhp.schema.oaf.utils.CleaningFunctions; import scala.Tuple2; /** @@ -544,8 +543,12 @@ public class Result extends OafEntity implements Serializable { * @param pid the pid * @return the string */ - private static String normalizePid(final StructuredProperty pid) { - return String.format("%s::%s", pid.getQualifier().getClassid().toLowerCase(), pid.getValue().toLowerCase()); + private static String extractKeyFromPid(final StructuredProperty pid) { + if (pid == null) + return null; + final StructuredProperty normalizedPid = CleaningFunctions.normalizePidValue(pid); + + return String.format("%s::%s", normalizedPid.getQualifier().getClassid(), normalizedPid.getValue()); } /** @@ -574,9 +577,9 @@ public class Result extends OafEntity implements Serializable { .flatMap(i -> { final List> result = new ArrayList<>(); if (i.getPid() != null) - i.getPid().stream().filter(Result::validPid).forEach(p -> result.add(new Tuple2<>(normalizePid(p), i))); + i.getPid().stream().filter(Result::validPid).forEach(p -> result.add(new Tuple2<>(extractKeyFromPid(p), i))); if (i.getAlternateIdentifier() != null) - i.getAlternateIdentifier().stream().filter(Result::validPid).forEach(p -> result.add(new Tuple2<>(normalizePid(p), i))); + i.getAlternateIdentifier().stream().filter(Result::validPid).forEach(p -> result.add(new Tuple2<>(extractKeyFromPid(p), i))); return result.stream(); }).collect(Collectors.toMap( Tuple2::_1, @@ -598,7 +601,7 @@ public class Result extends OafEntity implements Serializable { return null; return pids .stream() - .map(Result::normalizePid) + .map(Result::extractKeyFromPid) .map(enrichments::get) .filter(Objects::nonNull) .collect(Collectors.toList()); From 3838658535a6aee86df54a0c08605fcff3870357 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Fri, 14 Jan 2022 09:52:47 +0100 Subject: [PATCH 082/146] updated CHANGES.md --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 34cb792..5fce58f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ | **Version** | **Changes** | **Readiness** | |--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| +| 2.10.25 | [Graph model]
implements enrichment on Result specializing in the method mergefrom. | beta | | 2.10.24 | [Graph model]
added utility method and constants for checking weather is an OafEntity represents an enrichment. | beta | | 2.9.24 | [Dump model]
change the names of the classes to be able to automatically create the json schema with specific descriptions | beta | | 2.9.23 | [Graph model]
Added Instance.measures field, allowing to maintain the association between them and the individual result instance
[Dump model]
added json schemas | beta | From d90704f1bb3df509d30dca3a341c6c465ee56432 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Fri, 14 Jan 2022 10:06:49 +0100 Subject: [PATCH 083/146] updated method, using java.lang.Pair instead of scala tuple2 --- .../java/eu/dnetlib/dhp/schema/oaf/Result.java | 16 ++++++++++------ .../eu/dnetlib/dhp/schema/oaf/MergeTest.java | 5 ++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java index 9ede797..9d1f52c 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java @@ -5,10 +5,12 @@ import java.io.Serializable; import java.util.*; import java.util.stream.Collectors; +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.Pair; + import eu.dnetlib.dhp.schema.common.AccessRightComparator; import eu.dnetlib.dhp.schema.common.ModelConstants; import eu.dnetlib.dhp.schema.oaf.utils.CleaningFunctions; -import scala.Tuple2; /** * The type Result. @@ -571,19 +573,21 @@ public class Result extends OafEntity implements Serializable { * @return the result map */ public static Map toInstanceMap(final List ri) { + + return ri .stream() .filter(i -> i.getPid() != null || i.getAlternateIdentifier() != null) .flatMap(i -> { - final List> result = new ArrayList<>(); + final List> result = new ArrayList<>(); if (i.getPid() != null) - i.getPid().stream().filter(Result::validPid).forEach(p -> result.add(new Tuple2<>(extractKeyFromPid(p), i))); + i.getPid().stream().filter(Result::validPid).forEach(p -> result.add(new ImmutablePair<>(extractKeyFromPid(p), i))); if (i.getAlternateIdentifier() != null) - i.getAlternateIdentifier().stream().filter(Result::validPid).forEach(p -> result.add(new Tuple2<>(extractKeyFromPid(p), i))); + i.getAlternateIdentifier().stream().filter(Result::validPid).forEach(p -> result.add(new ImmutablePair<>(extractKeyFromPid(p), i))); return result.stream(); }).collect(Collectors.toMap( - Tuple2::_1, - Tuple2::_2, + Pair::getLeft, + Pair::getRight, (a, b) -> a )); } diff --git a/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java b/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java index 6e335e0..69af8e3 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java +++ b/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java @@ -3,7 +3,6 @@ package eu.dnetlib.dhp.schema.oaf; import static org.junit.jupiter.api.Assertions.*; - import java.io.IOException; import java.io.InputStream; import java.time.format.DateTimeParseException; @@ -12,12 +11,12 @@ import java.util.List; import java.util.Objects; import java.util.stream.Collectors; - -import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.io.IOUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import com.fasterxml.jackson.databind.ObjectMapper; + /** * The type Merge test. */ From 5549f5bbf5772d4be8beb4a0e09dc7655cb38093 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 14 Jan 2022 11:57:50 +0100 Subject: [PATCH 084/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 13f5ca0..0cf7a1d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.25-SNAPSHOT + 2.10.26-SNAPSHOT From 24820314036e49f3711e065b28980c818c48e807 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 14 Jan 2022 12:06:00 +0100 Subject: [PATCH 085/146] Revert "[maven-release-plugin] prepare for next development iteration" This reverts commit 5549f5bbf5772d4be8beb4a0e09dc7655cb38093. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0cf7a1d..13f5ca0 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.26-SNAPSHOT + 2.10.25-SNAPSHOT From 9efbfb0f9caa31e5edfc65aa4223a232c4db155d Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 14 Jan 2022 12:08:42 +0100 Subject: [PATCH 086/146] bumped tag version in scm --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 13f5ca0..c5a4ec8 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.24 + dhp-schemas-2.10.25 This module contains common schema classes meant to be used across the dnet-hadoop submodules From fca037f03556ca12514c8682aa5d1c4327544a24 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 14 Jan 2022 12:09:22 +0100 Subject: [PATCH 087/146] [maven-release-plugin] prepare release dhp-schemas-2.10.25 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c5a4ec8..08a8fb7 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.25-SNAPSHOT + 2.10.25 From e1f1721da8f3b8eb807fa73dafb2e6607674f05e Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 14 Jan 2022 12:09:26 +0100 Subject: [PATCH 088/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 08a8fb7..6dcfd7b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.25 + 2.10.26-SNAPSHOT From 55800920a98dedd5fd14956ccb0dbd3ca4b104bb Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 21 Jan 2022 14:21:30 +0100 Subject: [PATCH 089/146] added helper method to get the OpenAIRE ids of the delegated authorities --- .../eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactory.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactory.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactory.java index 2b7a5f3..5939db4 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactory.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactory.java @@ -67,6 +67,13 @@ public class IdentifierFactory implements Serializable { DELEGATED_PID_AUTHORITY.get(PidType.doi).put(ZENODO_R3_ID, "zenodo"); } + public static Set delegatedAuthorityDatasourceIds() { + return DELEGATED_PID_AUTHORITY.values() + .stream() + .flatMap(m -> m.keySet().stream()) + .collect(Collectors.toCollection(HashSet::new)); + } + public static List getPids(List pid, KeyValue collectedFrom) { return pidFromInstance(pid, collectedFrom, true).distinct().collect(Collectors.toList()); } From adabfed068339c5ed6ca3f0ed8a47e9b4dc94345 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 26 Jan 2022 14:59:12 +0100 Subject: [PATCH 090/146] introduced concept of enrichment providers in the identifier creation strategy --- .../dhp/schema/common/ModelConstants.java | 3 ++ .../schema/oaf/utils/IdentifierFactory.java | 41 +++++++++++++++---- .../oaf/utils/IdentifierFactoryTest.java | 3 ++ .../schema/oaf/utils/publication_openapc.json | 28 +++++++++++++ 4 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_openapc.json diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java index ae234dd..e86035a 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java @@ -30,6 +30,9 @@ public class ModelConstants { public static final String OPENOCITATIONS_NAME = "OpenCitations"; public static final String OPENOCITATIONS_ID = "10|openaire____::c06df618c5de1c786535ccf3f8b7b059"; + public static final String OPEN_APC_NAME = "OpenAPC Initiative"; + public static final String OPEN_APC_ID = "10|openaire____::96c67b8f18814e8428a958028cf5bcc1"; + // VOCABULARY VALUE public static final String ACCESS_RIGHT_OPEN = "OPEN"; public static final String ACCESS_RIGHT_EMBARGO = "EMBARGO"; diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactory.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactory.java index 500ff24..071cf53 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactory.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactory.java @@ -67,6 +67,18 @@ public class IdentifierFactory implements Serializable { DELEGATED_PID_AUTHORITY.get(PidType.doi).put(ZENODO_R3_ID, "zenodo"); } + /** + * Declares the associations PID_TYPE -> [DATASOURCE ID, NAME] whose records are considered enrichment for the graph. + * Their OpenAIRE ID is built from the declared PID type. Are merged with their corresponding record, identified by + * the same OpenAIRE id. + */ + public static final Map> ENRICHMENT_PROVIDER = Maps.newHashMap(); + + static { + ENRICHMENT_PROVIDER.put(PidType.doi, HashBiMap.create()); + ENRICHMENT_PROVIDER.get(PidType.doi).put(OPEN_APC_ID, OPEN_APC_NAME); + } + public static Set delegatedAuthorityDatasourceIds() { return DELEGATED_PID_AUTHORITY.values() .stream() @@ -184,23 +196,34 @@ public class IdentifierFactory implements Serializable { .stream() // filter away PIDs provided by a DS that is not considered an authority for the // given PID Type - .filter(p -> shouldFilterPidByAuthority(collectedFrom, p, mapHandles)) + .filter(p -> shouldFilterPidByCriteria(collectedFrom, p, mapHandles)) .map(CleaningFunctions::normalizePidValue) .filter(p -> isNotFromDelegatedAuthority(collectedFrom, p)) .filter(CleaningFunctions::pidFilter)) .orElse(Stream.empty()); } - private static boolean shouldFilterPidByAuthority(KeyValue collectedFrom, StructuredProperty p, boolean mapHandles) { + + private static boolean shouldFilterPidByCriteria(KeyValue collectedFrom, StructuredProperty p, boolean mapHandles) { final PidType pType = PidType.tryValueOf(p.getQualifier().getClassid()); - return (mapHandles && pType.equals(PidType.handle)) || Optional.ofNullable(collectedFrom).isPresent() && - Optional - .ofNullable(PID_AUTHORITY.get(pType)) - .map(authorities -> { - return authorities.containsKey(collectedFrom.getKey()) - || authorities.containsValue(collectedFrom.getValue()); - }) + + if (Objects.isNull(collectedFrom)) { + return false; + } + + boolean isEnrich = Optional + .ofNullable(ENRICHMENT_PROVIDER.get(pType)) + .map(enrich -> enrich.containsKey(collectedFrom.getKey()) + || enrich.containsValue(collectedFrom.getValue())) .orElse(false); + + boolean isAuthority = Optional + .ofNullable(PID_AUTHORITY.get(pType)) + .map(authorities -> authorities.containsKey(collectedFrom.getKey()) + || authorities.containsValue(collectedFrom.getValue())) + .orElse(false); + + return (mapHandles && pType.equals(PidType.handle)) || isEnrich || isAuthority; } private static boolean isNotFromDelegatedAuthority(KeyValue collectedFrom, StructuredProperty p) { diff --git a/src/test/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactoryTest.java b/src/test/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactoryTest.java index 0a434a1..983ae6c 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactoryTest.java +++ b/src/test/java/eu/dnetlib/dhp/schema/oaf/utils/IdentifierFactoryTest.java @@ -43,6 +43,9 @@ class IdentifierFactoryTest { verifyIdentifier( "publication_pmc2.json", "50|pmc_________::94e4cb08c93f8733b48e2445d04002ac", true); + verifyIdentifier( + "publication_openapc.json", "50|doi_________::79dbc7a2a56dc1532659f9038843256e", true); + final String defaultID = "50|DansKnawCris::0829b5191605bdbea36d6502b8c1ce1f"; verifyIdentifier("publication_3.json", defaultID, true); verifyIdentifier("publication_4.json", defaultID, true); diff --git a/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_openapc.json b/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_openapc.json new file mode 100644 index 0000000..abee510 --- /dev/null +++ b/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_openapc.json @@ -0,0 +1,28 @@ +{ + "id": "50|openapc_____::000023f9cb6e3a247c764daec4273cbc", + "resuttype": { + "classid": "publication" + }, + "instance": [ + { + "collectedfrom": { + "key": "10|openaire____::96c67b8f18814e8428a958028cf5bcc1", + "value": "OpenAPC Initiative" + }, + "pid": [ + { + "qualifier": {"classid": "doi"}, + "value": "10.1016/j.cmet.2010.03.013" + }, + { + "qualifier": {"classid": "pmc"}, + "value": "21459329" + }, + { + "qualifier": {"classid": "pmid"}, + "value": "25811027" + } + ] + } + ] +} \ No newline at end of file From fb306a0574f337e79b068c17187d263c2e16f2a8 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Thu, 27 Jan 2022 13:03:45 +0100 Subject: [PATCH 091/146] [maven-release-plugin] prepare release dhp-schemas-2.10.26 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 6dcfd7b..ce7afb1 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.26-SNAPSHOT + 2.10.26 @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.25 + dhp-schemas-2.10.26 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 48ccbfb1ccb67e41c054670d91af847ecbb4fbc7 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Thu, 27 Jan 2022 13:03:49 +0100 Subject: [PATCH 092/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ce7afb1..175777b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.26 + 2.10.27-SNAPSHOT @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.26 + dhp-schemas-2.10.25 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 09ef0e9760b5fea8ea968a6fad074397d35eda2d Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Tue, 1 Feb 2022 16:38:51 +0100 Subject: [PATCH 093/146] [Enrichment Entities] changed name and id of OpenAPC datasource because of mess in DS ids --- .../java/eu/dnetlib/dhp/schema/common/ModelConstants.java | 4 ++-- .../eu/dnetlib/dhp/schema/oaf/utils/publication_openapc.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java index e86035a..bd893bf 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java @@ -30,8 +30,8 @@ public class ModelConstants { public static final String OPENOCITATIONS_NAME = "OpenCitations"; public static final String OPENOCITATIONS_ID = "10|openaire____::c06df618c5de1c786535ccf3f8b7b059"; - public static final String OPEN_APC_NAME = "OpenAPC Initiative"; - public static final String OPEN_APC_ID = "10|openaire____::96c67b8f18814e8428a958028cf5bcc1"; + public static final String OPEN_APC_NAME = "OpenAPC Global Initiative"; + public static final String OPEN_APC_ID = "10|apc_________::e2b1600b229fc30663c8a1f662debddf"; // VOCABULARY VALUE public static final String ACCESS_RIGHT_OPEN = "OPEN"; diff --git a/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_openapc.json b/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_openapc.json index abee510..293087f 100644 --- a/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_openapc.json +++ b/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_openapc.json @@ -6,8 +6,8 @@ "instance": [ { "collectedfrom": { - "key": "10|openaire____::96c67b8f18814e8428a958028cf5bcc1", - "value": "OpenAPC Initiative" + "key": "10|apc_________::e2b1600b229fc30663c8a1f662debddf", + "value": "OpenAPC Global Initiative" }, "pid": [ { From 26f543a03f17e9df11ff935cd9c93e3a4030c9ab Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Tue, 1 Feb 2022 16:40:48 +0100 Subject: [PATCH 094/146] [maven-release-plugin] prepare release dhp-schemas-2.10.27 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 175777b..db1fe4c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.27-SNAPSHOT + 2.10.27 @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.25 + dhp-schemas-2.10.27 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 2b9d7580c33fe0a96311be690785596f423c879d Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Tue, 1 Feb 2022 16:48:46 +0100 Subject: [PATCH 095/146] [maven-release-plugin] prepare release dhp-schemas-2.10.27 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 175777b..db1fe4c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.27-SNAPSHOT + 2.10.27 @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.25 + dhp-schemas-2.10.27 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 5b0e2f707683a8506a6bf2f3f4cee23423db8ab1 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Tue, 1 Feb 2022 16:48:50 +0100 Subject: [PATCH 096/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index db1fe4c..eae6636 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.27 + 2.10.28-SNAPSHOT @@ -32,7 +32,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.27 + dhp-schemas-2.10.25 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 4c2e635aa2a5963e9d4d01da42c86fff429f3ad3 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Tue, 1 Feb 2022 17:01:25 +0100 Subject: [PATCH 097/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b6f9390..a68550d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.27-SNAPSHOT + 2.10.28-SNAPSHOT @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.27 + dhp-schemas-2.10.25 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 2c39d27469cf8754cf7df222a11dd80e130c1b38 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Wed, 2 Feb 2022 10:07:08 +0100 Subject: [PATCH 098/146] reverted version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a68550d..67b63bf 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.28-SNAPSHOT + 2.10.27-SNAPSHOT From bfe4da29eada61c11513b2b329a6586b212f6a4d Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Wed, 2 Feb 2022 10:07:43 +0100 Subject: [PATCH 099/146] [maven-release-plugin] prepare release dhp-schemas-2.10.27 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 67b63bf..051d10b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.27-SNAPSHOT + 2.10.27 @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.25 + dhp-schemas-2.10.27 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 8833c32d2203f552f8167de131e5d0bbc9484e9d Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Wed, 2 Feb 2022 10:08:35 +0100 Subject: [PATCH 100/146] [maven-release-plugin] rollback the release of dhp-schemas-2.10.27 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 051d10b..a68550d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.27 + 2.10.28-SNAPSHOT @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.27 + dhp-schemas-2.10.25 This module contains common schema classes meant to be used across the dnet-hadoop submodules From bfafc0fbaf887577aa6f62c4a433bd11182da677 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Wed, 2 Feb 2022 10:10:07 +0100 Subject: [PATCH 101/146] reverted version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a68550d..67b63bf 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.28-SNAPSHOT + 2.10.27-SNAPSHOT From f8a63457b1b0b6e7afbb2495090f2f0dbf7830b5 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Wed, 2 Feb 2022 10:10:39 +0100 Subject: [PATCH 102/146] [maven-release-plugin] prepare release dhp-schemas-2.10.27 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 67b63bf..051d10b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.27-SNAPSHOT + 2.10.27 @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.25 + dhp-schemas-2.10.27 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 5abcb0a1cbff5ab8acb77fa6f02d148f4428bbdf Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Wed, 2 Feb 2022 10:12:55 +0100 Subject: [PATCH 103/146] [maven-release-plugin] rollback the release of dhp-schemas-2.10.27 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 051d10b..a68550d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.27 + 2.10.28-SNAPSHOT @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.27 + dhp-schemas-2.10.25 This module contains common schema classes meant to be used across the dnet-hadoop submodules From a81aa83c4fd24d749c19411f97c9838c16ce9300 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Wed, 2 Feb 2022 10:13:15 +0100 Subject: [PATCH 104/146] reverted version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a68550d..67b63bf 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.28-SNAPSHOT + 2.10.27-SNAPSHOT From 768de3c28886a573f11551186c34dd8de57ffa49 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Wed, 2 Feb 2022 10:13:53 +0100 Subject: [PATCH 105/146] [maven-release-plugin] prepare release dhp-schemas-2.10.27 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 67b63bf..051d10b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.27-SNAPSHOT + 2.10.27 @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.25 + dhp-schemas-2.10.27 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 00608312005aadf2909e1339232fcdef6167dfc5 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Wed, 2 Feb 2022 10:13:57 +0100 Subject: [PATCH 106/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 051d10b..a68550d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.27 + 2.10.28-SNAPSHOT @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.27 + dhp-schemas-2.10.25 This module contains common schema classes meant to be used across the dnet-hadoop submodules From a8c9f8e6661cfc9ea90a096db6adfedd3c8f56fb Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Wed, 2 Feb 2022 17:28:32 +0100 Subject: [PATCH 107/146] added URL to OpenAPC test record --- .../dnetlib/dhp/schema/oaf/utils/publication_openapc.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_openapc.json b/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_openapc.json index 293087f..f06ac18 100644 --- a/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_openapc.json +++ b/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_openapc.json @@ -22,7 +22,10 @@ "qualifier": {"classid": "pmid"}, "value": "25811027" } - ] + ], + "url":["https://doi.org/10.1155/2015/439379"] } ] -} \ No newline at end of file +} + + From 2895988f2bd6e5a798f2b0caf463c5a5413b22ee Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Fri, 4 Feb 2022 12:52:12 +0100 Subject: [PATCH 108/146] [APC at the result level] added the APC at the level of the result and test for the merge and resource for the tes --- .../eu/dnetlib/dhp/schema/oaf/Result.java | 34 +++++++++++++++ .../eu/dnetlib/dhp/schema/oaf/MergeTest.java | 43 +++++++++++++++++++ .../dhp/schema/oaf/utils/publication_apc.json | 2 + 3 files changed, 79 insertions(+) create mode 100644 src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_apc.json diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java index 9d1f52c..cd70b47 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java @@ -5,6 +5,7 @@ import java.io.Serializable; import java.util.*; import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; @@ -17,6 +18,18 @@ import eu.dnetlib.dhp.schema.oaf.utils.CleaningFunctions; */ public class Result extends OafEntity implements Serializable { + /** + * ( article | book ) processing charges. + */ + + private Field processingchargeamount; + + + /** + * currency - alphabetic code describe in ISO-4217. + */ + private Field processingchargecurrency; + /** * The Measures. */ @@ -147,6 +160,22 @@ public class Result extends OafEntity implements Serializable { this.measures = measures; } + public Field getProcessingchargeamount() { + return processingchargeamount; + } + + public void setProcessingchargeamount(Field processingchargeamount) { + this.processingchargeamount = processingchargeamount; + } + + public Field getProcessingchargecurrency() { + return processingchargecurrency; + } + + public void setProcessingchargecurrency(Field processingchargecurrency) { + this.processingchargecurrency = processingchargecurrency; + } + /** * Gets author. * @@ -713,6 +742,11 @@ public class Result extends OafEntity implements Serializable { Result r = (Result) e; + if(processingchargeamount == null || StringUtils.isBlank(processingchargeamount.getValue() )){ + processingchargeamount = r.getProcessingchargeamount(); + processingchargecurrency = r.getProcessingchargecurrency(); + } + measures = mergeLists(measures, r.getMeasures()); if( !isAnEnrichment(this) && !isAnEnrichment(e)) diff --git a/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java b/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java index 69af8e3..ea00dd0 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java +++ b/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java @@ -12,6 +12,7 @@ import java.util.Objects; import java.util.stream.Collectors; import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -130,6 +131,48 @@ class MergeTest { } + /** + * Test the merge of the APC at the level of the result and the instance. + * + * @throws Exception the exception + */ + + @Test + void testAPCMerge() throws Exception { + List publications = loadResourceResult("/eu/dnetlib/dhp/schema/oaf/utils/publication_apc.json", Publication.class); + System.out.println(publications.size()); + publications.forEach(p -> assertEquals(1, p.getInstance().size())); + publications.forEach(p -> assertTrue(p.getProcessingchargeamount() != null )); + publications.forEach(p -> assertTrue(p.getProcessingchargecurrency() != null )); + publications.forEach(p -> assertTrue(StringUtils.isNotBlank(p.getProcessingchargeamount().getValue() ))); + publications.forEach(p -> assertTrue(StringUtils.isNotBlank(p.getProcessingchargecurrency().getValue() ))); + + publications.forEach(p -> p.getInstance().stream() + .forEach(i -> assertTrue(i.getProcessingchargeamount() != null))); + publications.forEach(p -> p.getInstance().stream() + .forEach(i -> assertTrue(i.getProcessingchargecurrency() != null))); + + publications.forEach(p -> p.getInstance().stream() + .forEach(i -> assertTrue(StringUtils.isNotBlank(i.getProcessingchargeamount().getValue())))); + publications.forEach(p -> p.getInstance().stream() + .forEach(i -> assertTrue(StringUtils.isNotBlank(i.getProcessingchargecurrency().getValue())))); + + Result p1 = publications.get(0); + Result p2 = publications.get(1); + + p1.mergeFrom(p2); + + assertEquals(2 , p1.getInstance().size()); + p1.getInstance().stream().forEach(i -> assertTrue(i.getProcessingchargeamount() != null)); + p1.getInstance().stream().forEach(i -> assertTrue(i.getProcessingchargecurrency() != null)); + + p1.getInstance().stream().anyMatch(i -> i.getProcessingchargeamount().getValue().equals("2000.47")); + p1.getInstance().stream().anyMatch(i -> i.getProcessingchargeamount().getValue().equals("1721.47")); + + p1.getInstance().stream().anyMatch(i -> i.getProcessingchargecurrency().getValue().equals("EUR")); + p1.getInstance().stream().anyMatch(i -> i.getProcessingchargecurrency().getValue().equals("USD")); + System.out.println(new ObjectMapper().writeValueAsString(p1)); + } /** diff --git a/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_apc.json b/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_apc.json new file mode 100644 index 0000000..6139032 --- /dev/null +++ b/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_apc.json @@ -0,0 +1,2 @@ +{"collectedfrom":[{"key":"10|apc_________::e2b1600b229fc30663c8a1f662debddf","value":"OpenAPC Global Initiative","dataInfo":null}],"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"lastupdatetimestamp":1643970857177,"id":"50|doi_________::000023f9cb6e3a247c764daec4273cbc","originalId":["50|openapc_____::000023f9cb6e3a247c764daec4273cbc","10.1155/2015/439379"],"pid":[{"value":"10.1155/2015/439379","qualifier":{"classid":"doi","classname":"doi","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}}],"dateofcollection":"2022-02-01T15:26:33.817Z","dateoftransformation":"2022-02-02T15:45:32.502Z","extraInfo":[],"oaiprovenance":null,"processingchargeamount":{"value":"1721.47","dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}},"processingchargecurrency":{"value":"EUR","dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}},"measures":null,"author":[],"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"language":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:languages","schemename":"dnet:languages"},"country":[],"subject":[],"title":[],"relevantdate":[],"description":[],"dateofacceptance":null,"publisher":null,"embargoenddate":null,"source":[],"fulltext":[],"format":[],"contributor":[],"resourcetype":null,"coverage":[],"bestaccessright":{"classid":"OPEN","classname":"Open Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"context":[],"externalReference":[],"instance":[{"license":null,"accessright":{"classid":"OPEN","classname":"Open Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes","openAccessRoute":null},"instancetype":{"classid":"0004","classname":"Conference object","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"hostedby":{"key":"10|apc_________::e2b1600b229fc30663c8a1f662debddf","value":"OpenAPC Global Initiative","dataInfo":null},"url":["https://doi.org/10.1155/2015/439379"],"distributionlocation":"","collectedfrom":{"key":"10|apc_________::e2b1600b229fc30663c8a1f662debddf","value":"OpenAPC Global Initiative","dataInfo":null},"pid":[{"value":"10.1155/2015/439379","qualifier":{"classid":"doi","classname":"doi","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}}],"alternateIdentifier":[{"value":"25811027.0","qualifier":{"classid":"pmid","classname":"pmid","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}}],"dateofacceptance":null,"processingchargeamount":{"value":"1721.47","dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}},"processingchargecurrency":{"value":"EUR","dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}},"refereed":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"measures":null}],"journal":{"name":"BioMed Research International","issnPrinted":"2314-6133","issnOnline":"","issnLinking":"","ep":"","iss":"","sp":"","vol":"","edition":"","conferenceplace":null,"conferencedate":null,"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}}} +{"collectedfrom":[{"key":"10|apc_________::f2b1600b229fc30663c8a1f662debddf","value":"OpenAPC Global Initiative","dataInfo":null}],"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"lastupdatetimestamp":1643970857177,"id":"50|doi_________::100023f9cb6e3a247c764daec4273cbc","originalId":["50|openapc_____::a00023f9cb6e3a247c764daec4273cbc","10.1155/2015/fake"],"pid":[{"value":"10.1155/2015/fake","qualifier":{"classid":"doi","classname":"doi","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}}],"dateofcollection":"2022-02-01T15:26:33.817Z","dateoftransformation":"2022-02-02T15:45:32.502Z","extraInfo":[],"oaiprovenance":null,"processingchargeamount":{"value":"2000.47","dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}},"processingchargecurrency":{"value":"USD","dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}},"measures":null,"author":[],"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"language":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:languages","schemename":"dnet:languages"},"country":[],"subject":[],"title":[],"relevantdate":[],"description":[],"dateofacceptance":null,"publisher":null,"embargoenddate":null,"source":[],"fulltext":[],"format":[],"contributor":[],"resourcetype":null,"coverage":[],"bestaccessright":{"classid":"OPEN","classname":"Open Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"context":[],"externalReference":[],"instance":[{"license":null,"accessright":{"classid":"OPEN","classname":"Open Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes","openAccessRoute":null},"instancetype":{"classid":"0004","classname":"Conference object","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"hostedby":{"key":"10|apc_________::e2b1600b229fc30663c8a1f662debddf","value":"OpenAPC Global Initiative","dataInfo":null},"url":["https://doi.org/10.1155/2015/fake"],"distributionlocation":"","collectedfrom":{"key":"10|apc_________::e2b1600b229fc30663c8a1f662debddf","value":"OpenAPC Global Initiative","dataInfo":null},"pid":[{"value":"10.1155/2015/fake","qualifier":{"classid":"doi","classname":"doi","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}}],"alternateIdentifier":[{"value":"25811027.0","qualifier":{"classid":"pmid","classname":"pmid","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}}],"dateofacceptance":null,"processingchargeamount":{"value":"2000.47","dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}},"processingchargecurrency":{"value":"USD","dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}},"refereed":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"measures":null}],"journal":{"name":"BioMed Research International","issnPrinted":"2314-6133","issnOnline":"","issnLinking":"","ep":"","iss":"","sp":"","vol":"","edition":"","conferenceplace":null,"conferencedate":null,"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}}} \ No newline at end of file From 91af2dade8bc793b689e5c68e4f37efa37553dac Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Fri, 4 Feb 2022 13:18:46 +0100 Subject: [PATCH 109/146] [APC at the result level] added other test --- .../eu/dnetlib/dhp/schema/oaf/MergeTest.java | 32 +++++++++++++++++++ .../schema/oaf/utils/publication_apc2.json | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_apc2.json diff --git a/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java b/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java index ea00dd0..7336cf6 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java +++ b/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java @@ -162,7 +162,11 @@ class MergeTest { p1.mergeFrom(p2); + assertEquals("1721.47", p1.getProcessingchargeamount().getValue()); + assertEquals("EUR", p1.getProcessingchargecurrency().getValue()); + assertEquals(2 , p1.getInstance().size()); + p1.getInstance().stream().forEach(i -> assertTrue(i.getProcessingchargeamount() != null)); p1.getInstance().stream().forEach(i -> assertTrue(i.getProcessingchargecurrency() != null)); @@ -173,7 +177,35 @@ class MergeTest { p1.getInstance().stream().anyMatch(i -> i.getProcessingchargecurrency().getValue().equals("USD")); System.out.println(new ObjectMapper().writeValueAsString(p1)); } + @Test + void testAPCMerge2() throws Exception { + List publications = loadResourceResult("/eu/dnetlib/dhp/schema/oaf/utils/publication_apc2.json", Publication.class); + System.out.println(publications.size()); + publications.forEach(p -> assertEquals(1, p.getInstance().size())); + assertTrue(publications.get(0).getProcessingchargeamount() != null ); + assertTrue(publications.get(0).getProcessingchargecurrency() != null ); + assertTrue(publications.get(1).getProcessingchargeamount() == null ); + Result p1 = publications.get(1); + Result p2 = publications.get(0); + + p1.mergeFrom(p2); + + assertEquals("1721.47", p1.getProcessingchargeamount().getValue()); + assertEquals("EUR", p1.getProcessingchargecurrency().getValue()); + + assertEquals(2 , p1.getInstance().size()); + p1.getInstance().stream().anyMatch(i -> i.getProcessingchargeamount() != null); + + p1.getInstance().stream().anyMatch(i -> i.getProcessingchargecurrency() != null); + + assertEquals("1721.47", p1.getInstance().stream().filter(i -> i.getProcessingchargeamount() != null) + .collect(Collectors.toList()).get(0).getProcessingchargeamount().getValue()); + + assertEquals("EUR", p1.getInstance().stream().filter(i -> i.getProcessingchargeamount() != null) + .collect(Collectors.toList()).get(0).getProcessingchargecurrency().getValue()); + System.out.println(new ObjectMapper().writeValueAsString(p1)); + } /** * Test enrichment function. diff --git a/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_apc2.json b/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_apc2.json new file mode 100644 index 0000000..a0b1644 --- /dev/null +++ b/src/test/resources/eu/dnetlib/dhp/schema/oaf/utils/publication_apc2.json @@ -0,0 +1,2 @@ +{"collectedfrom":[{"key":"10|apc_________::e2b1600b229fc30663c8a1f662debddf","value":"OpenAPC Global Initiative","dataInfo":null}],"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}},"lastupdatetimestamp":1643970857177,"id":"50|doi_________::000023f9cb6e3a247c764daec4273cbc","originalId":["50|openapc_____::000023f9cb6e3a247c764daec4273cbc","10.1155/2015/439379"],"pid":[{"value":"10.1155/2015/439379","qualifier":{"classid":"doi","classname":"doi","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}}],"dateofcollection":"2022-02-01T15:26:33.817Z","dateoftransformation":"2022-02-02T15:45:32.502Z","extraInfo":[],"oaiprovenance":null,"processingchargeamount":{"value":"1721.47","dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}},"processingchargecurrency":{"value":"EUR","dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}},"measures":null,"author":[],"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"language":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:languages","schemename":"dnet:languages"},"country":[],"subject":[],"title":[],"relevantdate":[],"description":[],"dateofacceptance":null,"publisher":null,"embargoenddate":null,"source":[],"fulltext":[],"format":[],"contributor":[],"resourcetype":null,"coverage":[],"bestaccessright":{"classid":"OPEN","classname":"Open Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"context":[],"externalReference":[],"instance":[{"license":null,"accessright":{"classid":"OPEN","classname":"Open Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes","openAccessRoute":null},"instancetype":{"classid":"0004","classname":"Conference object","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"hostedby":{"key":"10|apc_________::e2b1600b229fc30663c8a1f662debddf","value":"OpenAPC Global Initiative","dataInfo":null},"url":["https://doi.org/10.1155/2015/439379"],"distributionlocation":"","collectedfrom":{"key":"10|apc_________::e2b1600b229fc30663c8a1f662debddf","value":"OpenAPC Global Initiative","dataInfo":null},"pid":[{"value":"10.1155/2015/439379","qualifier":{"classid":"doi","classname":"doi","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}}],"alternateIdentifier":[{"value":"25811027.0","qualifier":{"classid":"pmid","classname":"pmid","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}}],"dateofacceptance":null,"processingchargeamount":{"value":"1721.47","dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}},"processingchargecurrency":{"value":"EUR","dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}},"refereed":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"measures":null}],"journal":{"name":"BioMed Research International","issnPrinted":"2314-6133","issnOnline":"","issnLinking":"","ep":"","iss":"","sp":"","vol":"","edition":"","conferenceplace":null,"conferencedate":null,"dataInfo":{"invisible":true,"inferred":false,"deletedbyinference":false,"trust":"0.9","inferenceprovenance":"","provenanceaction":{"classid":"sysimport:crosswalk:datasetarchive","classname":"sysimport:crosswalk:datasetarchive","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"}}}} +{"author":[{"fullname":"Antikainen, Maria","name":"Maria","pid":[],"rank":1,"surname":"Antikainen"},{"fullname":"Niemelä, Marketta","name":"Marketta","pid":[],"rank":2,"surname":"Niemelä"}],"bestaccessright":{"classid":"CLOSED","classname":"Closed Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"collectedfrom":[{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"}],"context":[],"contributor":[],"country":[],"coverage":[],"dataInfo":{"deletedbyinference":true,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2017-01-01"},"dateofcollection":"2021-11-06T12:40:11.372Z","dateoftransformation":"2021-11-06T15:30:47.295Z","description":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Local food supports local finance, employment and cultural traditions. Local food producers often have limited resources to invest in R&D, and their risk-taking ability is low. Earlier studies in the online community context indicate that utilising the user's creativity and innovation capability has a great deal of potential for new product development and service design. For local food producers, social media offers cost-efficient opportunities for involving customers in product and service development. The aim of the study is to explore the potential of a co-creation approach for local food producers and how to engage consumers in that co-creation. The study is dyadic, taking both the consumers' and producers' perspectives. The results indicate that consumers seem to be interested in having long-term relationships with producers. Their motivations to participate in co-creation processes were found to be mostly related to the possibility of producing better products and of learning and gaining new insights. The producers who participated in our study have already taken the first steps in using social media, and the next logical step would be utilising social media in the co-creation process."}],"externalReference":[],"extraInfo":[],"format":[],"fulltext":[],"id":"50|355e65625b88::38d0ab3b2212878dee7072170f1561ee","instance":[{"accessright":{"classid":"CLOSED","classname":"Closed Access","schemeid":"dnet:access_modes","schemename":"dnet:access_modes"},"alternateIdentifier":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"doi","classname":"Digital Object Identifier","schemeid":"dnet:pid_types","schemename":"dnet:pid_types"},"value":"10.1504/ijtmkt.2017.081507"}],"collectedfrom":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"dateofacceptance":{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"2017-01-01"},"distributionlocation":"","hostedby":{"key":"10|openaire____::4692342f0992d91f9e705c26959f09e0","value":"VTT Research Information System"},"instancetype":{"classid":"0001","classname":"Article","schemeid":"dnet:publication_resource","schemename":"dnet:publication_resource"},"pid":[],"refereed":{"classid":"0000","classname":"Unknown","schemeid":"dnet:review_levels","schemename":"dnet:review_levels"},"url":["https://cris.vtt.fi/en/publications/44aa6ac9-4763-4cef-a683-220dbcb02712"]}],"language":{"classid":"eng","classname":"English","schemeid":"dnet:languages","schemename":"dnet:languages"},"lastupdatetimestamp":1638458079051,"oaiprovenance":{"originDescription":{"altered":true,"baseURL":"https%3A%2F%2Fcris.vtt.fi%2Fws%2Foai","datestamp":"2021-10-22T11:41:35Z","harvestDate":"2021-11-06T12:40:11.372Z","identifier":"oai:cris.vtt.fi:publications/44aa6ac9-4763-4cef-a683-220dbcb02712","metadataNamespace":"http://www.openarchives.org/OAI/2.0/oai_dc/"}},"originalId":["oai:cris.vtt.fi:publications/44aa6ac9-4763-4cef-a683-220dbcb02712","50|355e65625b88::38d0ab3b2212878dee7072170f1561ee"],"pid":[],"relevantdate":[],"resourcetype":{"classid":"UNKNOWN","classname":"Unknown","schemeid":"dnet:dataCite_resource","schemename":"dnet:dataCite_resource"},"resulttype":{"classid":"publication","classname":"publication","schemeid":"dnet:result_typologies","schemename":"dnet:result_typologies"},"source":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"value":"Antikainen , M & Niemelä , M 2017 , ' How to co-create local food products with consumers? ' , International Journal of Technology Marketing , vol. 12 , no. 1 , pp. 71-89 . https://doi.org/10.1504/IJTMKT.2017.081507"}],"subject":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"co-creation"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"local food"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"new product development"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"open innovation"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"social media"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"case study"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"consumer"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"co-development"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"co-design"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"user involvement"},{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"keyword","classname":"keyword","schemeid":"dnet:result_subject","schemename":"dnet:result_subject"},"value":"sustainability"}],"title":[{"dataInfo":{"deletedbyinference":false,"inferenceprovenance":"","inferred":false,"invisible":false,"provenanceaction":{"classid":"sysimport:crosswalk:repository","classname":"Harvested","schemeid":"dnet:provenanceActions","schemename":"dnet:provenanceActions"},"trust":"0.9"},"qualifier":{"classid":"main title","classname":"main title","schemeid":"dnet:dataCite_title","schemename":"dnet:dataCite_title"},"value":"How to co-create local food products with consumers?"}]} \ No newline at end of file From fb92579fe3f2130301ce13bb147847e3c5a23534 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Fri, 4 Feb 2022 16:02:29 +0100 Subject: [PATCH 110/146] [maven-release-plugin] prepare release dhp-schemas-2.10.28 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index a68550d..b96e4f5 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.28-SNAPSHOT + 2.10.28 @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.25 + dhp-schemas-2.10.28 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 8a1fb330ab8ec20a96f704f8c1d98f52d9ae8acc Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Fri, 4 Feb 2022 16:02:41 +0100 Subject: [PATCH 111/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b96e4f5..329db0b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.28 + 2.10.29-SNAPSHOT @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.28 + dhp-schemas-2.10.25 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 050a1b9e3497cc9c498e0c7d2c2086a6e5897f61 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Fri, 4 Feb 2022 16:33:44 +0100 Subject: [PATCH 112/146] reverted pom --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 329db0b..a68550d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.29-SNAPSHOT + 2.10.28-SNAPSHOT From b07b356307a1517043e8b81ec2824e1383fe3b16 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Fri, 4 Feb 2022 16:35:32 +0100 Subject: [PATCH 113/146] [maven-release-plugin] prepare release dhp-schemas-2.10.28 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index a68550d..b96e4f5 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.28-SNAPSHOT + 2.10.28 @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.25 + dhp-schemas-2.10.28 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 9beef2e678ac9ff379d4e585c8cca99a1b722cb5 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Fri, 4 Feb 2022 16:35:36 +0100 Subject: [PATCH 114/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b96e4f5..329db0b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.28 + 2.10.29-SNAPSHOT @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.28 + dhp-schemas-2.10.25 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 78929fe658dd9c3591bbb49106876f38a2baeecf Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Thu, 10 Feb 2022 18:57:16 +0100 Subject: [PATCH 115/146] merge logics changed to consider invisble in dataInfo --- .../java/eu/dnetlib/dhp/schema/oaf/Oaf.java | 3 ++- .../eu/dnetlib/dhp/schema/oaf/MergeTest.java | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java index 494123f..b0c5165 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java @@ -70,7 +70,8 @@ public abstract class Oaf implements Serializable { } public void mergeOAFDataInfo(Oaf o) { - if (o.getDataInfo() != null && compareTrust(this, o) < 0) + + if (o.getDataInfo() != null && (compareTrust(this, o) < 0 || this.getDataInfo().getInvisible())) dataInfo = o.getDataInfo(); } diff --git a/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java b/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java index 7336cf6..1c66b11 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java +++ b/src/test/java/eu/dnetlib/dhp/schema/oaf/MergeTest.java @@ -189,8 +189,10 @@ class MergeTest { Result p1 = publications.get(1); Result p2 = publications.get(0); + //merge visible record with OpenAPC p1.mergeFrom(p2); + assertFalse(p1.getDataInfo().getInvisible()); assertEquals("1721.47", p1.getProcessingchargeamount().getValue()); assertEquals("EUR", p1.getProcessingchargecurrency().getValue()); @@ -204,7 +206,26 @@ class MergeTest { assertEquals("EUR", p1.getInstance().stream().filter(i -> i.getProcessingchargeamount() != null) .collect(Collectors.toList()).get(0).getProcessingchargecurrency().getValue()); + assertFalse(p1.getDataInfo().getInvisible()); System.out.println(new ObjectMapper().writeValueAsString(p1)); + + //merge OpenAPC with visible record + p2.mergeFrom(p1); + assertFalse(p2.getDataInfo().getInvisible()); + assertEquals("1721.47", p2.getProcessingchargeamount().getValue()); + assertEquals("EUR", p2.getProcessingchargecurrency().getValue()); + + assertEquals(2 , p2.getInstance().size()); + p2.getInstance().stream().anyMatch(i -> i.getProcessingchargeamount() != null); + + p2.getInstance().stream().anyMatch(i -> i.getProcessingchargecurrency() != null); + + assertEquals("1721.47", p2.getInstance().stream().filter(i -> i.getProcessingchargeamount() != null) + .collect(Collectors.toList()).get(0).getProcessingchargeamount().getValue()); + + assertEquals("EUR", p2.getInstance().stream().filter(i -> i.getProcessingchargeamount() != null) + .collect(Collectors.toList()).get(0).getProcessingchargecurrency().getValue()); + } /** From a1c56dbeed9dc9b183b01d3abfb75e4dde601627 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Fri, 11 Feb 2022 17:57:02 +0100 Subject: [PATCH 116/146] [maven-release-plugin] prepare release dhp-schemas-2.10.29 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 329db0b..c2618fb 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.29-SNAPSHOT + 2.10.29 @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.25 + dhp-schemas-2.10.29 This module contains common schema classes meant to be used across the dnet-hadoop submodules From ee4a01f711ec7435c64a19cdf997d1c2d3df6475 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Fri, 11 Feb 2022 17:57:06 +0100 Subject: [PATCH 117/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index c2618fb..0ebb86f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.29 + 2.10.30-SNAPSHOT @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.29 + dhp-schemas-2.10.25 This module contains common schema classes meant to be used across the dnet-hadoop submodules From fb05d15ff23e3f95ff1a169c0ecdcd5dcd163ea2 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Mon, 21 Feb 2022 10:57:47 +0100 Subject: [PATCH 118/146] implemented comparable interface on few fields --- .../dhp/schema/sx/scholix/Scholix.java | 26 +++++++++- .../schema/sx/scholix/ScholixComparator.java | 37 ++++++++++++++ .../schema/sx/scholix/ScholixEntityId.java | 44 +++++++++++++++- .../schema/sx/scholix/ScholixIdentifier.java | 50 +++++++++++++------ .../schema/sx/scholix/ScholixCompareTest.java | 48 ++++++++++++++++++ 5 files changed, 188 insertions(+), 17 deletions(-) create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java create mode 100644 src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java index ca01cb5..fbf3c58 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java @@ -1,10 +1,12 @@ package eu.dnetlib.dhp.schema.sx.scholix; +import org.apache.commons.lang3.StringUtils; + import java.io.Serializable; import java.util.List; -public class Scholix implements Serializable { +public class Scholix implements Serializable, Comparable { private String publicationDate; private List publisher; @@ -74,4 +76,26 @@ public class Scholix implements Serializable { public void setIdentifier(String identifier) { this.identifier = identifier; } + + + + + @Override + public int compareTo(Scholix other) { + + if (other == null) + return -1; + + // Comparing publication date + final int publicationDateCompare =StringUtils.compare(publicationDate, other.getPublicationDate()); + + if (publicationDateCompare != 0) + return publicationDateCompare; + + + + + + return 0; + } } diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java new file mode 100644 index 0000000..40c2ff2 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java @@ -0,0 +1,37 @@ +package eu.dnetlib.dhp.schema.sx.scholix; + +import org.apache.commons.lang3.StringUtils; + +import java.text.Normalizer; +import java.util.List; + +public class ScholixComparator { + + + public static String normalizeString(final String input) { + if (input == null) + return null; + + return Normalizer.normalize(input, Normalizer.Form.NFD) + .toLowerCase() + .replaceAll("[^a-zA-Z0-9]", ""); + } + + + public static int compareScholixEntityId(final List first, final List second) { + return 0; + } + + public static int compareString(final String first, final String second) { + + + if (first == null && second == null) + return 0; + if (first==null ) + return 1; + if (second == null) + return -1; + return first.compareTo(second); + } + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java index e4bcee3..376eff8 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java @@ -1,10 +1,17 @@ package eu.dnetlib.dhp.schema.sx.scholix; +import com.google.common.collect.Iterators; +import org.apache.commons.lang3.StringUtils; + import java.io.Serializable; import java.util.List; +import java.util.Objects; +import java.util.stream.Stream; -public class ScholixEntityId implements Serializable { +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.normalizeString; + +public class ScholixEntityId implements Serializable, Comparable { private String name; private List identifiers; @@ -31,4 +38,39 @@ public class ScholixEntityId implements Serializable { public void setIdentifiers(List identifiers) { this.identifiers = identifiers; } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ScholixEntityId that = (ScholixEntityId) o; + return compareTo(that)==0; + } + + @Override + public int hashCode() { + return Objects.hash(name, identifiers); + } + + @Override + public int compareTo(ScholixEntityId other) { + final int nameComp = StringUtils.compare(normalizeString(name), normalizeString(other.getName())); + if (nameComp != 0) + return nameComp; + if (identifiers == null && other.getIdentifiers() == null) + return 0; + if (identifiers == null) + return 1; + if (other.getIdentifiers() == null) + return -1; + if (identifiers.size()!= other.getIdentifiers().size()) + return -1; + + Stream sortedLeft = identifiers.stream().sorted(); + Stream sortedRight = other.getIdentifiers().stream().sorted(); + + boolean equalsStream = Iterators.elementsEqual(sortedLeft.iterator(), sortedRight.iterator()); + + return equalsStream?0:-1; + } } diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java index 8fc8b08..18c3bbb 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java @@ -1,10 +1,15 @@ package eu.dnetlib.dhp.schema.sx.scholix; +import com.google.common.collect.ComparisonChain; +import org.apache.commons.lang3.StringUtils; + + +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.normalizeString; import java.io.Serializable; import java.util.Objects; -public class ScholixIdentifier implements Serializable { +public class ScholixIdentifier implements Serializable, Comparable { private String identifier; private String schema; private String url; @@ -27,20 +32,6 @@ public class ScholixIdentifier implements Serializable { this.url = url; } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - ScholixIdentifier that = (ScholixIdentifier) o; - return identifier.equals(that.identifier) && schema.equals(that.schema); - } - - @Override - public int hashCode() { - return Objects.hash(identifier, schema); - } - public String getIdentifier() { return identifier; } @@ -56,4 +47,33 @@ public class ScholixIdentifier implements Serializable { public void setSchema(String schema) { this.schema = schema; } + + @Override + public int compareTo(ScholixIdentifier o) { + final int idComp = StringUtils.compare(normalizeString(identifier), normalizeString(o.getIdentifier())); + if (idComp !=0) + return idComp; + final int schemaComp = StringUtils.compare(normalizeString(schema), normalizeString(o.getSchema())); + if (schemaComp !=0) + return schemaComp; + final int urlComp = StringUtils.compare(normalizeString(url), normalizeString(o.getUrl())); + return urlComp; + } + + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ScholixIdentifier that = (ScholixIdentifier) o; + return compareTo(that) == 0; + } + + + @Override + public int hashCode() { + return Objects.hash(normalizeString(identifier), normalizeString(schema), normalizeString(url)); + } + + } diff --git a/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java b/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java new file mode 100644 index 0000000..30b64a5 --- /dev/null +++ b/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java @@ -0,0 +1,48 @@ +package eu.dnetlib.dhp.schema.sx.scholix; + +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.Test; + +public class ScholixCompareTest { + + @Test + public void testNormalization() { + final String input = "Tĥïŝ ĩš â fůňķŷ Šťŕĭńġhttps://doi.org/< >10.11646/zootaxa.5099.1.3"; + final String expected = "thisisafunkystringhttpsdoiorg1011646zootaxa509913"; + final String normalized = ScholixComparator.normalizeString(input); + assertEquals(normalized, expected); + } + + + + @Test + public void testScholixIdentifierComparison() { + final String id = "10.11646/zootaxa.5099.1.3"; + final String schema = "DOI"; + final String url ="http://dx.dOI.org/10.11646/Zootaxa.5099.1.3"; + + final ScholixIdentifier left = new ScholixIdentifier(); + left.setIdentifier(id.toUpperCase()); + left.setSchema(schema.toUpperCase()); + left.setUrl(url.toUpperCase()); + + + final ScholixIdentifier right = new ScholixIdentifier(); + right.setIdentifier(id.toUpperCase()); + right.setSchema(schema.toUpperCase()); + right.setUrl(url.toLowerCase()); + + + assertEquals(0,left.compareTo(right)); + + assertEquals(left, right); + assertEquals(left.hashCode(), right.hashCode()); + + + left.setIdentifier(null); + + assertEquals(-1, left.compareTo(right)); + + + } +} From dc514a7281a8fe98475b41e8c1f6a9f5d0937ad8 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Tue, 22 Feb 2022 17:26:05 +0100 Subject: [PATCH 119/146] implemented comparable on each element of scholix --- pom.xml | 15 ++ .../dhp/schema/sx/scholix/Scholix.java | 35 ++++- .../sx/scholix/ScholixCollectedFrom.java | 47 +++++- .../schema/sx/scholix/ScholixComparator.java | 57 ++++--- .../schema/sx/scholix/ScholixEntityId.java | 23 +-- .../schema/sx/scholix/ScholixIdentifier.java | 62 ++++++-- .../sx/scholix/ScholixRelationship.java | 38 ++++- .../schema/sx/scholix/ScholixResource.java | 75 +++++++++- .../schema/sx/scholix/ScholixCompareTest.java | 139 +++++++++++++++--- 9 files changed, 423 insertions(+), 68 deletions(-) diff --git a/pom.xml b/pom.xml index 0ebb86f..a615670 100644 --- a/pom.xml +++ b/pom.xml @@ -138,6 +138,9 @@ maven-dependency-plugin 3.0.0 + + + org.codehaus.mojo exec-maven-plugin @@ -279,6 +282,12 @@ + + me.xuender + unidecode + 0.0.7 + + org.slf4j jcl-over-slf4j @@ -316,6 +325,7 @@ 2.4 + com.fasterxml.jackson.core jackson-databind @@ -335,6 +345,11 @@ + + me.xuender + unidecode + + org.junit.jupiter junit-jupiter diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java index fbf3c58..95338ea 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java @@ -5,8 +5,13 @@ import org.apache.commons.lang3.StringUtils; import java.io.Serializable; import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; public class Scholix implements Serializable, Comparable { + private String publicationDate; private List publisher; @@ -78,7 +83,21 @@ public class Scholix implements Serializable, Comparable { } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof Scholix)) return false; + Scholix scholix = (Scholix) o; + return compareTo(scholix) == 0; + } + @Override + public int hashCode() { + final int publisherHash = publisher == null ? 0: publisher.stream().sorted().collect(Collectors.toList()).hashCode(); + final int linkProviderHash = linkprovider == null ? 0: linkprovider.stream().sorted().collect(Collectors.toList()).hashCode(); + + return Objects.hash(normalizeString(publicationDate),publisherHash, linkProviderHash, relationship, source, target, normalizeIdnetifier(identifier)); + } @Override public int compareTo(Scholix other) { @@ -92,10 +111,24 @@ public class Scholix implements Serializable, Comparable { if (publicationDateCompare != 0) return publicationDateCompare; + final int linkPublisherComparator = compareList(publisher, other.getPublisher()); + if (linkPublisherComparator!= 0) + return linkPublisherComparator; + + final int linkProviderComparator = compareList(linkprovider, other.getLinkprovider()); + if (linkProviderComparator!= 0) + return linkProviderComparator; + final int relsComparator = compareObjects(relationship, other.getRelationship()); + if (relsComparator!= 0) + return relsComparator; - return 0; + final int sourceComparator = compareObjects(source, other.getSource()); + if (sourceComparator!= 0) + return sourceComparator; + + return compareObjects(target, other.getTarget()); } } diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java index e8e4551..cd415de 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java @@ -1,9 +1,14 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import java.io.Serializable; +import org.apache.commons.lang3.StringUtils; -public class ScholixCollectedFrom implements Serializable { +import java.io.Serializable; +import java.util.Objects; + +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; + +public class ScholixCollectedFrom implements Serializable, Comparable { private ScholixEntityId provider; private String provisionMode; @@ -42,4 +47,42 @@ public class ScholixCollectedFrom implements Serializable { public void setCompletionStatus(String completionStatus) { this.completionStatus = completionStatus; } + + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof ScholixCollectedFrom)) return false; + ScholixCollectedFrom that = (ScholixCollectedFrom) o; + return compareTo(that)==0; + } + + @Override + public int hashCode() { + return Objects.hash(provider, normalizeString(provisionMode), normalizeString(completionStatus)); + } + + @Override + public int compareTo(ScholixCollectedFrom other) { + if (other == null) + return -1; + + int provModeCompare = StringUtils.compare(normalizeString(provisionMode),normalizeString(other.getProvisionMode()) ); + int compStatusCompare =StringUtils.compare(normalizeString(completionStatus),normalizeString(other.getCompletionStatus()) ); + + if (provider == null && other.getProvider() == null) + return provModeCompare == 0 ? compStatusCompare: provModeCompare; + + + if (provider == null) + return 1; + if (other.getProvider() == null) + return -1; + + int provCompare = provider.compareTo(other.getProvider()); + + if (provCompare == 0) + return provModeCompare == 0 ? compStatusCompare: provModeCompare; + return provCompare; + } } diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java index 40c2ff2..55c7c0e 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java @@ -1,37 +1,58 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import org.apache.commons.lang3.StringUtils; - import java.text.Normalizer; import java.util.List; +import java.util.stream.Stream; + +import com.google.common.collect.Iterators; +import me.xuender.unidecode.Unidecode; public class ScholixComparator { + public static String normalizeIdnetifier(final String input) { + if (input == null) + return null; + + return Normalizer.normalize(input, Normalizer.Form.NFD) + .toLowerCase(); + } + + public static String normalizeString(final String input) { if (input == null) return null; - - return Normalizer.normalize(input, Normalizer.Form.NFD) - .toLowerCase() - .replaceAll("[^a-zA-Z0-9]", ""); + return Unidecode.decode(input).toLowerCase(); } - public static int compareScholixEntityId(final List first, final List second) { - return 0; - } - - public static int compareString(final String first, final String second) { - - - if (first == null && second == null) + public static > int compareObjects (T left, T right) { + if (left == null && right==null) return 0; - if (first==null ) + if(left == null) return 1; - if (second == null) - return -1; - return first.compareTo(second); + if (right == null) + return -1; + return left.compareTo(right); } + public static > int compareList (List left, List right) { + + if (left == null && right==null) + return 0; + if(left == null) + return 1; + if (right == null) + return -1; + + Stream sortedLeft = left.stream().sorted(); + Stream sortedRight = right.stream().sorted(); + boolean equals = Iterators.elementsEqual(sortedLeft.iterator(), sortedRight.iterator()); + + return equals? 0: -1; + + + } + + } diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java index 376eff8..266b946 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java @@ -7,6 +7,7 @@ import org.apache.commons.lang3.StringUtils; import java.io.Serializable; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; import java.util.stream.Stream; import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.normalizeString; @@ -49,28 +50,20 @@ public class ScholixEntityId implements Serializable, Comparable sortedLeft = identifiers.stream().sorted(); - Stream sortedRight = other.getIdentifiers().stream().sorted(); - - boolean equalsStream = Iterators.elementsEqual(sortedLeft.iterator(), sortedRight.iterator()); - - return equalsStream?0:-1; } } diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java index 18c3bbb..f8b0cf1 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java @@ -1,22 +1,33 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import com.google.common.collect.ComparisonChain; import org.apache.commons.lang3.StringUtils; - - -import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.normalizeString; import java.io.Serializable; import java.util.Objects; +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.normalizeIdnetifier; + +/** + * The type Scholix identifier. + */ public class ScholixIdentifier implements Serializable, Comparable { private String identifier; private String schema; private String url; + /** + * Instantiates a new Scholix identifier. + */ public ScholixIdentifier() { } + /** + * Instantiates a new Scholix identifier. + * + * @param identifier the identifier + * @param schema the schema + * @param url the url + */ public ScholixIdentifier(String identifier, String schema, String url) { this.identifier = identifier; this.schema = schema; @@ -24,40 +35,71 @@ public class ScholixIdentifier implements Serializable, Comparable { private String name; private String schema; private String inverse; @@ -40,4 +44,34 @@ public class ScholixRelationship implements Serializable { public void setInverse(String inverse) { this.inverse = inverse; } + + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof ScholixRelationship)) return false; + ScholixRelationship that = (ScholixRelationship) o; + return this.compareTo(that) ==0; + } + + @Override + public int hashCode() { + return Objects.hash(normalizeString(getName()), normalizeString(getSchema()), normalizeString(getInverse())); + } + + @Override + public int compareTo(ScholixRelationship other) { + if (other == null) + return -1; + + final int nameCompare = StringUtils.compare(normalizeString(name), normalizeString(other.getName())); + if (nameCompare!= 0 ) + return nameCompare; + + final int schemaCompare = StringUtils.compare(normalizeString(schema), normalizeString(other.getSchema())); + if (schemaCompare!= 0 ) + return schemaCompare; + + return StringUtils.compare(normalizeString(inverse), normalizeString(other.getInverse())); + } } diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java index 569b1f3..d7b61ad 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java @@ -1,10 +1,16 @@ package eu.dnetlib.dhp.schema.sx.scholix; +import org.apache.commons.lang3.StringUtils; + import java.io.Serializable; import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; -public class ScholixResource implements Serializable { +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; + +public class ScholixResource implements Serializable, Comparable { private List identifier; private String dnetIdentifier; @@ -87,4 +93,71 @@ public class ScholixResource implements Serializable { public void setCollectedFrom(List collectedFrom) { this.collectedFrom = collectedFrom; } + + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof ScholixResource)) return false; + ScholixResource that = (ScholixResource) o; + return compareTo(that) == 0; + } + + @Override + public int hashCode() { + int idHash = identifier == null ? 0 : identifier.stream().sorted().collect(Collectors.toList()).hashCode(); + int creatorHash = creator == null ? 0 : creator.stream().sorted().collect(Collectors.toList()).hashCode(); + + int publisherHash = publisher == null ? 0 : publisher.stream().sorted().collect(Collectors.toList()).hashCode(); + int collectedFromHash = collectedFrom == null ? 0 : collectedFrom.stream().sorted().collect(Collectors.toList()).hashCode(); + + return Objects.hash(idHash, normalizeIdnetifier(dnetIdentifier), normalizeString(objectType), + normalizeString(objectSubType), normalizeString(title),creatorHash, normalizeString(publicationDate), publisherHash, collectedFromHash); + } + + @Override + public int compareTo(ScholixResource other) { + if (other == null) + return -1; + final int compIdentifiers = compareList(identifier, other.getIdentifier()); + if (compIdentifiers!= 0) + return compIdentifiers; + + final int dnetIdComp = StringUtils.compare(dnetIdentifier, other.getDnetIdentifier()); + + if (dnetIdComp != 0) + return dnetIdComp; + + final int objTypeComparator = StringUtils.compare(normalizeString(objectType), normalizeString(other.getObjectType())); + + if (objTypeComparator != 0) + return objTypeComparator; + + + final int objSubTypeComparator = StringUtils.compare(normalizeString(objectSubType), normalizeString(other.getObjectSubType())); + + if (objSubTypeComparator != 0) + return objSubTypeComparator; + + + final int titleComparator = StringUtils.compare(normalizeString(title), normalizeString(other.getTitle())); + + if (titleComparator != 0) + return titleComparator; + + final int creatorComparator = compareList(creator, other.getCreator()); + if (creatorComparator!= 0) + return creatorComparator; + + final int pubDateComparator = StringUtils.compare(normalizeString(publicationDate), normalizeString(other.getPublicationDate())); + if (pubDateComparator!= 0) + return pubDateComparator; + + final int publisherComparator = compareList(publisher, other.getPublisher()); + if (publisherComparator!= 0) + return publisherComparator; + + return compareList(collectedFrom, other.getCollectedFrom()); + + } } diff --git a/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java b/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java index 30b64a5..53a489d 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java +++ b/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java @@ -1,37 +1,91 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; +import java.util.ArrayList; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; + public class ScholixCompareTest { - @Test - public void testNormalization() { - final String input = "Tĥïŝ ĩš â fůňķŷ Šťŕĭńġhttps://doi.org/< >10.11646/zootaxa.5099.1.3"; - final String expected = "thisisafunkystringhttpsdoiorg1011646zootaxa509913"; - final String normalized = ScholixComparator.normalizeString(input); - assertEquals(normalized, expected); + + + + + + + private ScholixIdentifier generateMockScholixId(boolean toUpper, int idCount) { + + final String id = String.format("10.11646/zootaxa.5099.1.%d", idCount); + final String schema = "DOI"; + final String url =String.format("http://dx.dOI.org/10.11646/Zootaxa.5099.1.%d", idCount); + + final ScholixIdentifier result = new ScholixIdentifier(); + result.setIdentifier(toUpper ? id.toUpperCase(): id.toLowerCase()); + result.setSchema(toUpper ? schema.toUpperCase():schema.toLowerCase()); + result.setUrl(toUpper ? url.toUpperCase():url.toLowerCase()); + return result; + + } + + + private ScholixEntityId generateMockScholixEntityId(boolean toUpper, boolean invertOrder, int numberOfIds) { + + final String datasourceName = "Datacite"; + + final List ids = new ArrayList<>(); + + if (!invertOrder) { + for (int i = 0; i < numberOfIds; i++) { + ids.add(generateMockScholixId(toUpper, i)); + } + } + else { + for (int i = numberOfIds-1; i >=0; i--) { + ids.add(generateMockScholixId(toUpper, i)); + } + } + + return new ScholixEntityId(toUpper? datasourceName.toUpperCase(): datasourceName.toLowerCase(), ids); + } + + private ScholixCollectedFrom generateMockScholixCollectedFrom(boolean toUpper, boolean invertOrder, int numberOfIds) { + + final ScholixCollectedFrom result = new ScholixCollectedFrom(); + final String completionStatus = "complete"; + final String provisionMode = "collected"; + result.setProvider(generateMockScholixEntityId(toUpper, invertOrder, numberOfIds)); + result.setCompletionStatus(toUpper ? completionStatus.toUpperCase(): completionStatus.toLowerCase()); + result.setProvisionMode(toUpper ? provisionMode.toUpperCase(): provisionMode.toLowerCase()); + return result; + } + + private ScholixRelationship generateMockScholixRelationships(boolean toUpper) { + + final String name = "IsRelatedTo"; + final String inverse = "RelatedTo"; + final String schema = "datacite"; + + final ScholixRelationship rel = new ScholixRelationship(); + + rel.setName(toUpper? name.toUpperCase():name.toLowerCase()); + rel.setInverse(toUpper? inverse.toUpperCase():inverse.toLowerCase()); + rel.setSchema(toUpper? schema.toUpperCase():schema.toLowerCase()); + + return rel; } @Test public void testScholixIdentifierComparison() { - final String id = "10.11646/zootaxa.5099.1.3"; - final String schema = "DOI"; - final String url ="http://dx.dOI.org/10.11646/Zootaxa.5099.1.3"; - final ScholixIdentifier left = new ScholixIdentifier(); - left.setIdentifier(id.toUpperCase()); - left.setSchema(schema.toUpperCase()); - left.setUrl(url.toUpperCase()); + final ScholixIdentifier left = generateMockScholixId(true, 1); - final ScholixIdentifier right = new ScholixIdentifier(); - right.setIdentifier(id.toUpperCase()); - right.setSchema(schema.toUpperCase()); - right.setUrl(url.toLowerCase()); - + final ScholixIdentifier right = generateMockScholixId(false,1); assertEquals(0,left.compareTo(right)); @@ -45,4 +99,51 @@ public class ScholixCompareTest { } + + + @Test + public void testScholixEntityIDComparison() { + + final ScholixEntityId first =generateMockScholixEntityId(true,false,10); + final ScholixEntityId second =generateMockScholixEntityId(false,true,10); + assertEquals(first,second); + assertEquals(first.hashCode(), second.hashCode()); + + } + + + @Test + public void testScholixCollectedFromComparison() { + final ScholixCollectedFrom cfLeft = generateMockScholixCollectedFrom(true, true, 20); + + + + final ScholixCollectedFrom cfRight = generateMockScholixCollectedFrom(false, false, 20); + + assertEquals(cfLeft, cfRight); + + assertEquals(cfLeft.hashCode(), cfRight.hashCode()); + + cfRight.setCompletionStatus(null); + + assertNotEquals(cfLeft, cfRight); + + + } + + + @Test + public void testCompareScholixRelation() { + + + final ScholixRelationship left = generateMockScholixRelationships(true); + final ScholixRelationship right = generateMockScholixRelationships(false); + + assertEquals(left, right); + assertEquals(left.hashCode(), right.hashCode()); + + + + } + } From 88a347d9780c25c360583e60005e0b9da8584ea0 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Wed, 23 Feb 2022 10:42:23 +0100 Subject: [PATCH 120/146] implemented unitTest to verify if compare works --- .../schema/sx/scholix/ScholixCompareTest.java | 156 ++++++++++++++---- 1 file changed, 123 insertions(+), 33 deletions(-) diff --git a/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java b/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java index 53a489d..2762873 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java +++ b/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java @@ -1,39 +1,34 @@ package eu.dnetlib.dhp.schema.sx.scholix; import org.junit.jupiter.api.Test; - import java.util.ArrayList; import java.util.List; - +import java.util.stream.Collectors; +import java.util.stream.IntStream; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; public class ScholixCompareTest { + private ScholixIdentifier generateMockScholixId(final String baseId ,boolean toUpper, int idCount) { - - - - - - private ScholixIdentifier generateMockScholixId(boolean toUpper, int idCount) { - - final String id = String.format("10.11646/zootaxa.5099.1.%d", idCount); + final String id = String.format("%s.%d",baseId, idCount); final String schema = "DOI"; - final String url =String.format("http://dx.dOI.org/10.11646/Zootaxa.5099.1.%d", idCount); + final String url =String.format("http://dx.dOI.org/%s.%d",baseId, idCount); final ScholixIdentifier result = new ScholixIdentifier(); result.setIdentifier(toUpper ? id.toUpperCase(): id.toLowerCase()); result.setSchema(toUpper ? schema.toUpperCase():schema.toLowerCase()); result.setUrl(toUpper ? url.toUpperCase():url.toLowerCase()); return result; - } + private ScholixIdentifier generateMockScholixId(boolean toUpper, int idCount) { + return generateMockScholixId("10.11646/zootaxa.5099.1", toUpper, idCount); + } - private ScholixEntityId generateMockScholixEntityId(boolean toUpper, boolean invertOrder, int numberOfIds) { + private ScholixEntityId generateMockScholixEntityId(String name, boolean toUpper, boolean invertOrder, int numberOfIds) { - final String datasourceName = "Datacite"; final List ids = new ArrayList<>(); @@ -48,20 +43,30 @@ public class ScholixCompareTest { } } - return new ScholixEntityId(toUpper? datasourceName.toUpperCase(): datasourceName.toLowerCase(), ids); + return new ScholixEntityId(toUpper? name.toUpperCase(): name.toLowerCase(), ids); } - private ScholixCollectedFrom generateMockScholixCollectedFrom(boolean toUpper, boolean invertOrder, int numberOfIds) { + private ScholixEntityId generateMockScholixEntityId(boolean toUpper, boolean invertOrder, int numberOfIds) { + + return generateMockScholixEntityId("datacite", toUpper, invertOrder,numberOfIds); + } + + private ScholixCollectedFrom generateMockScholixCollectedFrom(final String dsName , final boolean toUpper, final boolean invertOrder, final int numberOfIds) { final ScholixCollectedFrom result = new ScholixCollectedFrom(); final String completionStatus = "complete"; final String provisionMode = "collected"; - result.setProvider(generateMockScholixEntityId(toUpper, invertOrder, numberOfIds)); + result.setProvider(generateMockScholixEntityId(dsName,toUpper, invertOrder, numberOfIds)); result.setCompletionStatus(toUpper ? completionStatus.toUpperCase(): completionStatus.toLowerCase()); result.setProvisionMode(toUpper ? provisionMode.toUpperCase(): provisionMode.toLowerCase()); return result; } + + private ScholixCollectedFrom generateMockScholixCollectedFrom(boolean toUpper, boolean invertOrder, int numberOfIds) { + return generateMockScholixCollectedFrom("datasource", toUpper, invertOrder,numberOfIds); + } + private ScholixRelationship generateMockScholixRelationships(boolean toUpper) { final String name = "IsRelatedTo"; @@ -78,26 +83,86 @@ public class ScholixCompareTest { } + private ScholixResource generateMockScholixResource(final String sourceBase, boolean toUpper, int idCount, boolean invertOrder, int numEntityIds) { + final ScholixResource resource = new ScholixResource(); + final String baseSourceId = "%s_10.1000/ID_%d/"; + final String creatorBase ="Creator %d"; + final String publisherBase ="Publisher %d"; + final String collectedFromBase ="Datasource %d"; + final String title = String.format("Resource %s Title 1", sourceBase); + final List ids = IntStream.range(0,numEntityIds) + .mapToObj(i -> String.format(baseSourceId,sourceBase, i)) + .map(s ->generateMockScholixId(s, toUpper, idCount)) + .collect(Collectors.toList()); + resource.setIdentifier(ids); + resource.setDnetIdentifier("dnetId"); + + resource.setObjectType("dataset"); + resource.setObjectSubType("dataset"); + resource.setTitle(title); + final List creators = IntStream.range(0,numEntityIds) + .mapToObj(i -> String.format(creatorBase, i)) + .map(s ->generateMockScholixEntityId(s, toUpper,invertOrder,idCount)) + .collect(Collectors.toList()); + resource.setCreator(creators); + resource.setPublicationDate("22-02-2022"); + + + final List publishers = IntStream.range(0,numEntityIds) + .mapToObj(i -> String.format(publisherBase, i)) + .map(s ->generateMockScholixEntityId(s, toUpper,invertOrder,idCount)) + .collect(Collectors.toList()); + resource.setPublisher(publishers); + + + final List collectedFroms = IntStream.range(0,numEntityIds) + .mapToObj(i -> String.format(collectedFromBase, i)) + .map(s -> generateMockScholixCollectedFrom(s,toUpper, invertOrder, idCount)) + .collect(Collectors.toList()); + + resource.setCollectedFrom(collectedFroms); + return resource; + } + + + + private Scholix generateMockScholix( boolean toUpper, int idCount, boolean invertOrder, int numEntityIds) { + final Scholix result = new Scholix(); + result.setPublicationDate("2022-02-22"); + + final String id = "dnetID"; + final String publisherBase ="Publisher %d"; + + result.setPublisher(IntStream.range(0,numEntityIds) + .mapToObj(i -> String.format(publisherBase, i)) + .map(s ->generateMockScholixEntityId(s, toUpper,invertOrder,idCount)) + .collect(Collectors.toList())); + + result.setLinkprovider(IntStream.range(0,numEntityIds) + .mapToObj(i -> String.format(publisherBase, i)) + .map(s ->generateMockScholixEntityId(s, toUpper,invertOrder,idCount)) + .collect(Collectors.toList())); + + result.setRelationship(generateMockScholixRelationships(toUpper)); + result.setSource(generateMockScholixResource("source", toUpper, idCount,invertOrder, numEntityIds)); + result.setTarget(generateMockScholixResource("target", toUpper, idCount,invertOrder, numEntityIds)); + + result.setIdentifier(toUpper?id.toUpperCase():id.toLowerCase()); + return result; + } + + @Test public void testScholixIdentifierComparison() { final ScholixIdentifier left = generateMockScholixId(true, 1); - - final ScholixIdentifier right = generateMockScholixId(false,1); - assertEquals(0,left.compareTo(right)); - assertEquals(left, right); assertEquals(left.hashCode(), right.hashCode()); - - left.setIdentifier(null); - assertEquals(-1, left.compareTo(right)); - - } @@ -116,8 +181,6 @@ public class ScholixCompareTest { public void testScholixCollectedFromComparison() { final ScholixCollectedFrom cfLeft = generateMockScholixCollectedFrom(true, true, 20); - - final ScholixCollectedFrom cfRight = generateMockScholixCollectedFrom(false, false, 20); assertEquals(cfLeft, cfRight); @@ -127,6 +190,35 @@ public class ScholixCompareTest { cfRight.setCompletionStatus(null); assertNotEquals(cfLeft, cfRight); + } + + @Test + public void testCompareScholixResource() { + final ScholixResource left = generateMockScholixResource("source",true,5, true,5); + final ScholixResource right = generateMockScholixResource("source",false,5, false,5); + assertEquals(left,right); + assertEquals(left.hashCode(), right.hashCode()); + final ScholixResource different = generateMockScholixResource("source",false,4, false,5); + assertNotEquals(different,right); + assertNotEquals(different,left); + assertNotEquals(left.hashCode(), different.hashCode()); + assertNotEquals(right.hashCode(), different.hashCode()); + } + + + @Test + public void testCompareScholix() { + + final Scholix left = generateMockScholix(true,5, true,5); + final Scholix right = generateMockScholix(false,5, false,5); + assertEquals(left,right); + assertEquals(left.hashCode(), right.hashCode()); + final Scholix different = generateMockScholix(true,4, false,5); + + assertNotEquals(different,right); + assertNotEquals(different,left); + assertNotEquals(left.hashCode(), different.hashCode()); + assertNotEquals(right.hashCode(), different.hashCode()); } @@ -134,16 +226,14 @@ public class ScholixCompareTest { @Test public void testCompareScholixRelation() { - - final ScholixRelationship left = generateMockScholixRelationships(true); final ScholixRelationship right = generateMockScholixRelationships(false); - assertEquals(left, right); assertEquals(left.hashCode(), right.hashCode()); - - } + + + } From 4fecbed21b14f4a95941d9332da98fa1129d7443 Mon Sep 17 00:00:00 2001 From: Miriam Baglioni Date: Thu, 24 Feb 2022 11:49:44 +0100 Subject: [PATCH 121/146] Aggiornare 'CHANGES.md' --- CHANGES.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 5fce58f..faec30f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,10 @@ | **Version** | **Changes** | **Readiness** | |--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| +| 2.10.29. | [Merge Result]
merge logics changed to consider invisble in dataInfo | beta | +| 2.10.28. | [Graph Model]
Added APC information at the level of the result | beta | +| 2.10.27 | [Graph Model]
change name and id of OpenAPC datasource | beta | +| 2.10.26 | [Graph Model]
OpenAIRE ids of the delegated authorities and enrichment providers in the identifier creation strategy | beta | | 2.10.25 | [Graph model]
implements enrichment on Result specializing in the method mergefrom. | beta | | 2.10.24 | [Graph model]
added utility method and constants for checking weather is an OafEntity represents an enrichment. | beta | | 2.9.24 | [Dump model]
change the names of the classes to be able to automatically create the json schema with specific descriptions | beta | From 1dd572de0cf9c0108c77923d147de6f0c30a9864 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Thu, 24 Feb 2022 12:09:43 +0100 Subject: [PATCH 122/146] Update 'CHANGES.md' minor --- CHANGES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index faec30f..38efecf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,8 +4,8 @@ | **Version** | **Changes** | **Readiness** | |--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| -| 2.10.29. | [Merge Result]
merge logics changed to consider invisble in dataInfo | beta | -| 2.10.28. | [Graph Model]
Added APC information at the level of the result | beta | +| 2.10.29 | [Merge Result]
merge logics changed to consider invisble in dataInfo | beta | +| 2.10.28 | [Graph Model]
Added APC information at the level of the result | beta | | 2.10.27 | [Graph Model]
change name and id of OpenAPC datasource | beta | | 2.10.26 | [Graph Model]
OpenAIRE ids of the delegated authorities and enrichment providers in the identifier creation strategy | beta | | 2.10.25 | [Graph model]
implements enrichment on Result specializing in the method mergefrom. | beta | From 826a20aa26ffd6f21ce0d64f8c26c45c384cd118 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Thu, 24 Feb 2022 15:17:50 +0100 Subject: [PATCH 123/146] added fields consenttermsofuse, fulltextdownload, consenttermsofusedate to the Datasource entity --- .../eu/dnetlib/dhp/schema/oaf/Datasource.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Datasource.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Datasource.java index 0e7606d..7e59372 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Datasource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Datasource.java @@ -108,6 +108,12 @@ public class Datasource extends OafEntity implements Serializable { // New field for EOSC private List contentpolicies; + private Boolean consenttermsofuse; + + private Boolean fulltextdownload; + + private String consenttermsofusedate; + public Qualifier getDatasourcetype() { return datasourcetype; } @@ -444,6 +450,30 @@ public class Datasource extends OafEntity implements Serializable { this.contentpolicies = contentpolicies; } + 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; + } + @Override public void mergeFrom(final OafEntity e) { super.mergeFrom(e); From 87818acd141b73e919eafc790c077ed523d448fb Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 25 Feb 2022 09:32:00 +0100 Subject: [PATCH 124/146] Update 'CHANGES.md' --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 38efecf..7b0e957 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,7 +8,7 @@ | 2.10.28 | [Graph Model]
Added APC information at the level of the result | beta | | 2.10.27 | [Graph Model]
change name and id of OpenAPC datasource | beta | | 2.10.26 | [Graph Model]
OpenAIRE ids of the delegated authorities and enrichment providers in the identifier creation strategy | beta | -| 2.10.25 | [Graph model]
implements enrichment on Result specializing in the method mergefrom. | beta | +| 2.10.25 | [Graph model]
implemented enrichment on Result specializing in the method mergefrom. | beta | | 2.10.24 | [Graph model]
added utility method and constants for checking weather is an OafEntity represents an enrichment. | beta | | 2.9.24 | [Dump model]
change the names of the classes to be able to automatically create the json schema with specific descriptions | beta | | 2.9.23 | [Graph model]
Added Instance.measures field, allowing to maintain the association between them and the individual result instance
[Dump model]
added json schemas | beta | From a92be975013922fa51b6b298b0e873a23b4bd103 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Mon, 28 Feb 2022 12:11:24 +0100 Subject: [PATCH 125/146] moved scholix API data model from dnet-applications to dhp-schemas --- pom.xml | 18 ++ .../schema/sx/api/model/v1/LinkPublisher.java | 97 ++++++++ .../sx/api/model/v1/ScholixCreator.java | 69 ++++++ .../sx/api/model/v1/ScholixIdentifier.java | 71 ++++++ .../schema/sx/api/model/v1/ScholixItem.java | 161 +++++++++++++ .../sx/api/model/v1/ScholixProvider.java | 129 +++++++++++ .../sx/api/model/v1/ScholixRelationship.java | 134 +++++++++++ .../dhp/schema/sx/api/model/v1/ScholixV1.java | 184 +++++++++++++++ .../sx/api/model/v2/LinkProviderType.java | 123 ++++++++++ .../sx/api/model/v2/PageResultType.java | 114 ++++++++++ .../sx/api/model/v2/RelationshipType.java | 107 +++++++++ .../sx/api/model/v2/ScholixCreatorType.java | 86 +++++++ .../api/model/v2/ScholixIdentifierType.java | 104 +++++++++ .../sx/api/model/v2/ScholixItemType.java | 188 +++++++++++++++ .../api/model/v2/ScholixLinkProviderType.java | 86 +++++++ .../schema/sx/api/model/v2/ScholixType.java | 197 ++++++++++++++++ .../sx/api/model/v3/ScholixItemType.java | 215 ++++++++++++++++++ .../schema/sx/api/model/v3/ScholixType.java | 199 ++++++++++++++++ 18 files changed, 2282 insertions(+) create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/LinkPublisher.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixCreator.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixIdentifier.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixItem.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixProvider.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixRelationship.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixV1.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/LinkProviderType.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/PageResultType.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/RelationshipType.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixCreatorType.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixIdentifierType.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixItemType.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixLinkProviderType.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixType.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixItemType.java create mode 100644 src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixType.java diff --git a/pom.xml b/pom.xml index a615670..1b691d5 100644 --- a/pom.xml +++ b/pom.xml @@ -349,6 +349,24 @@ me.xuender unidecode
+ + io.swagger + swagger-annotations + 1.5.20 + + + io.swagger.core.v3 + swagger-annotations + 2.1.12 + + + + + javax.validation + validation-api + 2.0.1.Final + + org.junit.jupiter diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/LinkPublisher.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/LinkPublisher.java new file mode 100644 index 0000000..91c3f97 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/LinkPublisher.java @@ -0,0 +1,97 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import java.util.Objects; + +public class LinkPublisher { + @NotBlank + @JsonProperty("name") + private String name = null; + + @NotBlank + @JsonProperty("totalRelationships") + private Integer totalRelationships = null; + + public LinkPublisher name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @Schema(description = "The Publisher Name") + + @Size(max=300) public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public LinkPublisher totalRelationships(Integer totalRelationships) { + this.totalRelationships = totalRelationships; + return this; + } + + /** + * Get totalRelationships + * @return totalRelationships + **/ + @Schema(description = "Total number of relationships that the publisher provides") + + public Integer getTotalRelationships() { + return totalRelationships; + } + + public void setTotalRelationships(Integer totalRelationships) { + this.totalRelationships = totalRelationships; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LinkPublisher linkPublisher = (LinkPublisher) o; + return Objects.equals(this.name, linkPublisher.name) && + Objects.equals(this.totalRelationships, linkPublisher.totalRelationships); + } + + @Override + public int hashCode() { + return Objects.hash(name, totalRelationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LinkPublisher {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" totalRelationships: ").append(toIndentedString(totalRelationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixCreator.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixCreator.java new file mode 100644 index 0000000..da53442 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixCreator.java @@ -0,0 +1,69 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; +import io.swagger.v3.oas.annotations.media.Schema; + +import java.util.List; +import java.util.stream.Collectors; + +public class ScholixCreator { + + @JsonProperty("name") + private String name = null; + + @JsonProperty("identifier") + private List identifier = null; + + public ScholixCreator name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @Schema(required = true, description = "The name of the Object Creator") + public String getName() { + return name; + } + + public ScholixCreator setName(String name) { + this.name = name; + return this; + } + + + /** + * Get identifier + * @return identifier + **/ + @Schema(description = "A unique string that identifies the Object Creator") + public List getIdentifier() { + return identifier; + } + + public ScholixCreator setIdentifier(List identifier) { + this.identifier = identifier; + return this; + } + + public static ScholixCreator fromScholixEntityId(final ScholixEntityId provider) { + if (provider == null) + return null; + ScholixCreator instance = new ScholixCreator().setName(provider.getName()); + + + if (provider.getIdentifiers()!= null && provider.getIdentifiers().size()>0) + instance.setIdentifier(provider.getIdentifiers() + .stream() + .map(i ->new ScholixIdentifier() + .setIdentifier(i.getIdentifier()) + .setSchema(i.getSchema())) + .collect(Collectors.toList())); + return instance; + + + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixIdentifier.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixIdentifier.java new file mode 100644 index 0000000..752aa82 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixIdentifier.java @@ -0,0 +1,71 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import java.util.Objects; + +public class ScholixIdentifier { + + @JsonProperty("identifier") + private String identifier = null; + + @JsonProperty("schema") + private String schema = null; + + + + public ScholixIdentifier Identifier(String ID) { + this.identifier = ID; + return this; + } + + /** + * Get ID + * @return ID + **/ + @Schema(description = "The value of the Identifier") + public String getIdentifier() { + return identifier; + } + + public ScholixIdentifier setIdentifier(String identifier) { + this.identifier = identifier; + return this; + } + + public ScholixIdentifier Schema(String idScheme) { + this.schema = idScheme; + return this; + } + + /** + * Get the Schema + * @return Schema + **/ + @Schema(description = "The Schema URL of the identifier type") + + public String getSchema() { + return schema; + } + + public ScholixIdentifier setSchema(String schema) { + this.schema = schema; + return this; + } + + public static ScholixIdentifier fromScholixIdentifier(eu.dnetlib.dhp.schema.sx.scholix.ScholixIdentifier input) { + if (input == null) + return null; + + final ScholixIdentifier result = new ScholixIdentifier(); + result.setSchema(input.getSchema()); + result.setIdentifier(input.getIdentifier()); + return result; + + + + } + + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixItem.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixItem.java new file mode 100644 index 0000000..bd84344 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixItem.java @@ -0,0 +1,161 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; +import io.swagger.v3.oas.annotations.media.Schema; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +public class ScholixItem { + + @JsonProperty("identifiers") + private List identifiers; + + @JsonProperty("objectType") + private String objectType; + + @JsonProperty("objectSubType") + private String objectSubType; + + @JsonProperty("title") + private String title; + + @JsonProperty("creator") + private List creator; + + @JsonProperty("publicationDate") + private String publicationDate; + + @JsonProperty("publisher") + private List publisher; + + @Schema(description = "The list of identifiers") + public List getIdentifiers() { + return identifiers; + } + + public ScholixItem setIdentifiers(List identifiers) { + this.identifiers = identifiers; + return this; + } + + public ScholixItem objectType(String objectType) { + this.objectType = objectType; + return this; + } + + @Schema(description = "Describes the nature of the object (its intended usage)") + public String getObjectType() { + return objectType; + } + + public void setObjectType(String objectType) { + this.objectType = objectType; + } + + public ScholixItem objectSubType(String objectSubType) { + this.objectSubType = objectSubType; + return this; + } + + @Schema(description = "The sub-type of Object") + public String getObjectSubType() { + return objectSubType; + } + + public void setObjectSubType(String objectSubType) { + this.objectSubType = objectSubType; + } + + public ScholixItem title(String title) { + this.title = title; + return this; + } + + @Schema(description = "The name of the object") + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public ScholixItem creator(List creator) { + this.creator = creator; + return this; + } + + public ScholixItem addCreatorInstance(ScholixCreator creatorInstance) { + if(this.creator == null) + this.creator = new ArrayList<>(); + this.creator.add(creatorInstance); + return this; + } + + @Schema(description = "Party responsible for the creation of the object") + public List getCreator() { + return creator; + } + + public void setCreator(List creator) { + this.creator = creator; + } + + @Schema(description = "The date the object was formally issued, published or distributed") + public String getPublicationDate() { + return publicationDate; + } + + public void setPublicationDate(String publicationDate) { + this.publicationDate = publicationDate; + } + + @Schema(description = "The list name of the publisher of the object") + public List getPublisher() { + return publisher; + } + + public ScholixItem setPublisher(List publisher) { + this.publisher = publisher; + return this; + } + + public static ScholixItem fromScholixResource(final ScholixResource input) { + if (input == null) + return null; + + + final ScholixItem result = new ScholixItem(); + + if (input.getIdentifier()!= null) + result.setIdentifiers( + input.getIdentifier().stream() + .map(ScholixIdentifier::fromScholixIdentifier) + .collect(Collectors.toList()) + ); + + result.setTitle(input.getTitle()); + result.setObjectType(input.getObjectType()); + result.setObjectSubType(input.getObjectSubType()); + result.setPublicationDate(input.getPublicationDate()); + if(input.getPublisher()!= null) + result.setPublisher(input.getPublisher().stream() + .map(ScholixProvider::fromScholixEntityId) + .collect(Collectors.toList()) + ); + + + if (input.getCreator()!= null) + result.setCreator(input.getCreator().stream() + .map(ScholixCreator::fromScholixEntityId) + .collect(Collectors.toList()) + ); + + return result; + + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixProvider.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixProvider.java new file mode 100644 index 0000000..fd700ef --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixProvider.java @@ -0,0 +1,129 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.validation.Valid; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +public class ScholixProvider { + + public static ScholixProvider fromScholixEntityId(final ScholixEntityId provider) { + if (provider == null) + return null; + ScholixProvider instance = new ScholixProvider().setName(provider.getName()); + + + if (provider.getIdentifiers()!= null && provider.getIdentifiers().size()>0) + instance.setIdentifier(provider.getIdentifiers() + .stream() + .map(i ->new ScholixIdentifier() + .setIdentifier(i.getIdentifier()) + .setSchema(i.getSchema())) + .collect(Collectors.toList())); + return instance; + + + } + + + @JsonProperty("name") + private String name = null; + + @JsonProperty("identifier") + @Valid + private List identifier = null; + + public ScholixProvider name(String name) { + this.name = name; + return this; + } + + /** + * Get the provider name + * @return name + **/ + @Schema(description = "The provider name") + + public String getName() { + return name; + } + + public ScholixProvider setName(String name) { + this.name = name; + return this; + } + + public ScholixProvider identifier(List identifier) { + this.identifier = identifier; + return this; + } + + public ScholixProvider addIdentifierItem(ScholixIdentifier identifierItem) { + if (this.identifier == null) { + this.identifier = new ArrayList<>(); + } + this.identifier.add(identifierItem); + return this; + } + + /** + * Get identifier + * @return identifier + **/ + @Schema(description = "the identifiers of the provider") + @Valid + public List getIdentifier() { + return identifier; + } + + public ScholixProvider setIdentifier(List identifier) { + this.identifier = identifier; + return this; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScholixProvider scholixProviderType = (ScholixProvider) o; + return Objects.equals(this.name, scholixProviderType.name) && + Objects.equals(this.identifier, scholixProviderType.identifier); + } + + @Override + public int hashCode() { + return Objects.hash(name, identifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScholixProviderType {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" identifiers: ").append(toIndentedString(identifier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixRelationship.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixRelationship.java new file mode 100644 index 0000000..4d357f2 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixRelationship.java @@ -0,0 +1,134 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.validation.constraints.NotBlank; +import java.util.Objects; + +import static eu.dnetlib.dhp.schema.sx.api.model.v2.RelationshipType.relationMapping; + +public class ScholixRelationship { + + @JsonProperty("name") + private String name = null; + + @JsonProperty("schema") + private String schema = null; + + @NotBlank + @JsonProperty("inverseRelationship") + private String inverseRelationship = null; + + public ScholixRelationship name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @Schema(required = true, description = "The relationship type chosen from a Scholix controlled vocabulary") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ScholixRelationship schema(String schema) { + this.schema = schema; + return this; + } + + /** + * Get The name of the schema or controlled list from which Relationship Sub-type is sourced + * @return subType + **/ + @Schema(description = "The name of the schema or controlled list from which Relationship Sub-type is sourced") + public String getSchema() { + return schema; + } + + public void setSchema(String schema) { + this.schema = schema; + } + + public ScholixRelationship inverseRelationship(String inverseRelationship) { + this.inverseRelationship = inverseRelationship; + return this; + } + + /** + * Get inverseRelationship + * @return inverseRelationship + **/ + @Schema(description = "The value of the inverse relation") + + public String getInverseRelationship() { + return inverseRelationship; + } + + public void setInverseRelationship(String inverseRelationship) { + this.inverseRelationship = inverseRelationship; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScholixRelationship relationshipType = (ScholixRelationship) o; + return Objects.equals(this.name, relationshipType.name) && + Objects.equals(this.schema, relationshipType.schema) && + Objects.equals(this.inverseRelationship, relationshipType.inverseRelationship); + } + + @Override + public int hashCode() { + return Objects.hash(name, schema, inverseRelationship); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelationshipType {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" subType: ").append(toIndentedString(schema)).append("\n"); + sb.append(" subTypeSchema: ").append(toIndentedString(inverseRelationship)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static ScholixRelationship fromScholixIndexRelationship(eu.dnetlib.dhp.schema.sx.scholix.ScholixRelationship inputRel) { + if(inputRel==null) + return null; + + ScholixRelationship result = new ScholixRelationship(); + + result.setName(relationMapping.getOrDefault(inputRel.getName(), "IsRelatedTo")); + result.setInverseRelationship(relationMapping.getOrDefault(inputRel.getInverse(), "IsRelatedTo")); + result.setSchema(inputRel.getSchema()); + return result; + + } + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixV1.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixV1.java new file mode 100644 index 0000000..3cd3e7b --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixV1.java @@ -0,0 +1,184 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import eu.dnetlib.dhp.schema.sx.scholix.Scholix; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +public class ScholixV1 implements Serializable { + + @JsonProperty("linkProvider") + private List linkProvider; + + @JsonProperty("publicationDate") + private String publicationDate; + + @NotBlank + @JsonProperty("relationship") + private ScholixRelationship relationship; + + @NotBlank + @JsonProperty("source") + private ScholixItem source; + + @NotBlank + @JsonProperty("target") + private ScholixItem target; + + + + public ScholixV1 linkProvider (final List linkProvider ) { + this.linkProvider = linkProvider; + return this; + } + + @Schema(description = "An entity responsible for making this record available online") + public List getLinkProvider() { + return linkProvider; + } + + public ScholixV1 addLinkProviderItem(ScholixProvider linkProviderItem) { + if (this.linkProvider == null) { + this.linkProvider = new ArrayList<>(); + } + this.linkProvider.add(linkProviderItem); + return this; + } + + public void setLinkProvider(List linkProvider) { + this.linkProvider = linkProvider; + } + + @Schema(description = "date of formal issuance (e.g., publication) of the resource; generally different from source object and target object publication dates") + public String getPublicationDate() { + return publicationDate; + } + + public ScholixV1 publicationDate(String publicationDate) { + this.publicationDate = publicationDate; + return this; + } + + public void setPublicationDate(String publicationDate) { + this.publicationDate = publicationDate; + } + + @Schema(description = "Semantics of the relationship from source to target") + public ScholixRelationship getRelationship() { + return relationship; + } + + public ScholixV1 relationship(ScholixRelationship relationship) { + this.relationship = relationship; + return this; + } + + public void setRelationship(ScholixRelationship relationship) { + this.relationship = relationship; + } + + @Schema(description = "Root element relative to all properties describing the link’s source object.") + public ScholixItem getSource() { + return source; + } + + + public ScholixV1 source(ScholixItem source) { + this.source = source; + return this; + } + public void setSource(ScholixItem source) { + this.source = source; + } + + @Schema(description = "Root element relative to all properties describing the link’s target object.") + public ScholixItem getTarget() { + return target; + } + + public ScholixV1 target(ScholixItem target) { + this.target = target; + return this; + } + + public void setTarget(ScholixItem target) { + this.target = target; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScholixV1 scholixV1 = (ScholixV1) o; + return Objects.equals(this.linkProvider, scholixV1.getLinkProvider()) && + Objects.equals(this.publicationDate, scholixV1.getPublicationDate()) && + Objects.equals(this.relationship, scholixV1.getRelationship()) && + Objects.equals(this.source, scholixV1.getSource()) && + Objects.equals(this.target, scholixV1.getTarget()); + } + + @Override + public int hashCode() { + return Objects.hash(linkProvider, publicationDate, relationship, source, target); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScholixV1 {\n"); + + sb.append(" linkProvider: ").append(toIndentedString(linkProvider)).append("\n"); + sb.append(" publicationDate: ").append(toIndentedString(publicationDate)).append("\n"); + sb.append(" relationship: ").append(toIndentedString(relationship)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" target: ").append(toIndentedString(target)).append("\n"); + + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static ScholixV1 fromScholix(Scholix input) { + if (input == null) + return null; + final ScholixV1 result = new ScholixV1(); + + + if (input.getLinkprovider()!= null) + result.setLinkProvider(input.getLinkprovider() + .stream() + .map(ScholixProvider::fromScholixEntityId) + .collect(Collectors.toList())); + + result.setPublicationDate(input.getPublicationDate()); + + result.setRelationship(ScholixRelationship.fromScholixIndexRelationship(input.getRelationship())); + + result.setSource(ScholixItem.fromScholixResource(input.getSource())); + result.setTarget(ScholixItem.fromScholixResource(input.getTarget())); + return result; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/LinkProviderType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/LinkProviderType.java new file mode 100644 index 0000000..01c9adb --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/LinkProviderType.java @@ -0,0 +1,123 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v2; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import java.util.Objects; + +/** + * The type Link provider type. + */ +public class LinkProviderType { + @NotBlank + @JsonProperty("name") + private String name = null; + + @NotBlank + @JsonProperty("totalRelationships") + private Integer totalRelationships = null; + + /** + * Name link provider type. + * + * @param name the name + * @return the link provider type + */ + public LinkProviderType name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name name + */ + @Schema(description = "The Publisher Name") + @Size(max=300) + public String getName() { + return name; + } + + /** + * Sets name. + * + * @param name the name + */ + public void setName(String name) { + this.name = name; + } + + /** + * Total relationships link provider type. + * + * @param totalRelationships the total relationships + * @return the link provider type + */ + public LinkProviderType totalRelationships(Integer totalRelationships) { + this.totalRelationships = totalRelationships; + return this; + } + + /** + * Get totalRelationships + * + * @return totalRelationships total relationships + */ + @Schema(description = "Total number of relationships that the publisher provides") + public Integer getTotalRelationships() { + return totalRelationships; + } + + /** + * Sets total relationships. + * + * @param totalRelationships the total relationships + */ + public void setTotalRelationships(Integer totalRelationships) { + this.totalRelationships = totalRelationships; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LinkProviderType linkPublisher = (LinkProviderType) o; + return Objects.equals(this.name, linkPublisher.name) && + Objects.equals(this.totalRelationships, linkPublisher.totalRelationships); + } + + @Override + public int hashCode() { + return Objects.hash(name, totalRelationships); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LinkPublisher {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" totalRelationships: ").append(toIndentedString(totalRelationships)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/PageResultType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/PageResultType.java new file mode 100644 index 0000000..8ebbbf5 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/PageResultType.java @@ -0,0 +1,114 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v2; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * The main class that show the page result from the method + * /l2/links + */ +public class PageResultType implements Serializable { + + @NotBlank + @JsonProperty("currentPage") + @ApiModelProperty(position = 0) + private Integer currentPage = 0; + + @NotBlank + @JsonProperty("totalLinks") + @ApiModelProperty(position = 1) + private Integer totalLinks= 0; + + @NotBlank + @JsonProperty("totalPages") + @ApiModelProperty(position = 2) + private Integer totalPages = 0; + + @NotBlank + @JsonProperty("result") + @ApiModelProperty(position = 3) + private List result = new ArrayList<>(); + + + /** + * Gets current page. + * + * @return the current page + */ + @Schema(description = "The Current page of the results") + public Integer getCurrentPage() { + return currentPage; + } + + /** + * Sets current page. + * + * @param currentPage the current page + */ + public void setCurrentPage(Integer currentPage) { + this.currentPage = currentPage; + } + + /** + * Gets total links. + * + * @return the total links + */ + @Schema(description = "The total number of Links found by the query") + public Integer getTotalLinks() { + return totalLinks; + } + + /** + * Sets total links. + * + * @param totalLinks the total links + */ + public void setTotalLinks(Integer totalLinks) { + this.totalLinks = totalLinks; + } + + /** + * Gets total pages. + * + * @return the total pages + */ + @Schema(description = "The Total number of pages") + public Integer getTotalPages() { + return totalPages; + } + + /** + * Sets total pages. + * + * @param totalPages the total pages + */ + public void setTotalPages(Integer totalPages) { + this.totalPages = totalPages; + } + + /** + * Gets result. + * + * @return the result + */ + @Schema(description = "The First page of Scholix results") + public List getResult() { + return result; + } + + /** + * Sets result. + * + * @param result the result + */ + public void setResult(List result) { + this.result = result; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/RelationshipType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/RelationshipType.java new file mode 100644 index 0000000..a6f37a5 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/RelationshipType.java @@ -0,0 +1,107 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v2; + +import com.fasterxml.jackson.annotation.JsonProperty; +import eu.dnetlib.dhp.schema.sx.scholix.ScholixRelationship; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.validation.constraints.NotNull; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * The type Relationship type. + */ +public class RelationshipType { + + @NotNull + @JsonProperty("Name") + private String name; + + @JsonProperty("SubType") + private String subType; + + @JsonProperty("SubTypeSchema") + private String subTypeSchema; + + + public static Map relationMapping = Stream.of(new String[][] { + { "issupplementto", "IsSupplementTo" }, + { "issupplementedby", "IsSupplementedBy" }, + { "references", "References" }, + { "isreferencedby", "IsReferencedBy" }, + }).collect(Collectors.toMap(data -> data[0], data -> data[1])); + + + /** + * Gets The relationship type chosen from a Scholix controlled vocabulary + * + * @return the name + */ + @Schema(description = "The relationship type chosen from a Scholix controlled vocabulary") + public String getName() { + return name; + } + + /** + * Sets The relationship type chosen from a Scholix controlled vocabulary + * + * @param name the name + * @return the RelationshipType instance + */ + public RelationshipType setName(String name) { + this.name = name; + return this; + } + + /** + * Gets The sub-type of RelationshipType.Name + * + * @return the sub type + */ + @Schema(description = "The sub-type of RelationshipType.Name") + public String getSubType() { + return subType; + } + + /** + * Sets The sub-type of RelationshipType.Name + * + * @param subType the sub type + * @return the RelationshipType instance + */ + public RelationshipType setSubType(String subType) { + this.subType = subType; + return this; + } + + /** + * Gets The name of the schema or controlled list from which RelationshipSub-type is sourced. + * + * @return the sub type schema + */ + @Schema(description = "The name of the schema or controlled list from which RelationshipSub-type is sourced") + public String getSubTypeSchema() { + return subTypeSchema; + } + + /** + * Sets The name of the schema or controlled list from which RelationshipSub-type is sourced. + * + * @param subTypeSchema the sub type schema + * @return the RelationshipType instance + */ + public RelationshipType setSubTypeSchema(String subTypeSchema) { + this.subTypeSchema = subTypeSchema; + return this; + } + + public static RelationshipType fromScholixRelationship(ScholixRelationship inputRels) { + + return new RelationshipType() + .setName(relationMapping.getOrDefault(inputRels.getName(), "IsRelatedTo")) + .setSubType(inputRels.getName()) + .setSubTypeSchema(inputRels.getSchema()); + + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixCreatorType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixCreatorType.java new file mode 100644 index 0000000..e06f9c2 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixCreatorType.java @@ -0,0 +1,86 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v2; + +import com.fasterxml.jackson.annotation.JsonProperty; +import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.validation.constraints.NotBlank; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * The type Scholix creator type. + */ +public class ScholixCreatorType { + + @NotBlank + @JsonProperty("name") + private String name = null; + + + @NotBlank + @JsonProperty("identifier") + private List identifier = new ArrayList<>(); + + /** + * Gets A List of unique string that identifies the creator + * + * @return the identifier + */ + @Schema(description = "A List of unique string that identifies the creator") + public List getIdentifier() { + return identifier; + } + + /** + * Sets A List of unique string that identifies the creator + * + * @param identifier the identifier + * @return the identifier + */ + public ScholixCreatorType setIdentifier(List identifier) { + this.identifier = identifier; + return this; + } + + + /** + * Gets The name of the Object Creator + * + * @return the name + */ + @Schema(description = "The name of the Object Creator") + public String getName() { + return name; + } + + /** + * Sets The name of the Object Creator + * + * @param name the name + * @return the name + */ + public ScholixCreatorType setName(String name) { + this.name = name; + return this; + } + + public static ScholixCreatorType fromScholixEntityId(final ScholixEntityId inputCreator) { + if (inputCreator == null) + return null; + ScholixCreatorType instance = new ScholixCreatorType().setName(inputCreator.getName()); + + + if (inputCreator.getIdentifiers()!= null && inputCreator.getIdentifiers().size()>0) + instance.setIdentifier(inputCreator.getIdentifiers() + .stream() + .map(i ->new ScholixIdentifierType() + .setId(i.getIdentifier()) + .setIdScheme(i.getSchema())) + .collect(Collectors.toList())); + return instance; + + + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixIdentifierType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixIdentifierType.java new file mode 100644 index 0000000..e85dcd4 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixIdentifierType.java @@ -0,0 +1,104 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v2; + +import com.fasterxml.jackson.annotation.JsonProperty; +import eu.dnetlib.dhp.schema.sx.scholix.ScholixIdentifier; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.validation.constraints.NotBlank; + +/** + * The type Scholix identifier type. + */ +public class ScholixIdentifierType { + + @NotBlank + @JsonProperty("ID") + private String id = null; + + @NotBlank + @JsonProperty("IDScheme") + private String idScheme = null; + + @NotBlank + @JsonProperty("IDURL") + private String idURL = null; + + + /** + * Gets The identifier + * + * @return the id + */ + @Schema(description = "The identifier") + public String getId() { + return id; + } + + /** + * Sets The identifier + * + * @param id the id + * @return the id + */ + public ScholixIdentifierType setId(String id) { + this.id = id; + return this; + } + + /** + * Gets The scheme or namespace of the identifier string + * + * @return the id scheme + */ + @Schema(description = "The scheme or namespace of the identifier string") + public String getIdScheme() { + return idScheme; + } + + /** + * Sets The scheme or namespace of the identifier string + * + * @param idScheme the id scheme + * @return the id scheme + */ + public ScholixIdentifierType setIdScheme(String idScheme) { + this.idScheme = idScheme; + return this; + } + + /** + * Gets An internet resolvable form of the identifier + * + * @return the id url + */ + @Schema(description = "An internet resolvable form of the identifier") + public String getIdURL() { + return idURL; + } + + /** + * Sets An internet resolvable form of the identifier + * + * @param idURL the id url + * @return the id url + */ + public ScholixIdentifierType setIdURL(String idURL) { + this.idURL = idURL; + return this; + } + + + public static ScholixIdentifierType fromScholixIdentifier(ScholixIdentifier input) { + if (input== null) + return null; + final ScholixIdentifierType instance = new ScholixIdentifierType(); + + instance.setId(input.getIdentifier()); + instance.setIdScheme(input.getSchema()); + instance.setIdURL(input.getUrl()); + return instance; + } + + + +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixItemType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixItemType.java new file mode 100644 index 0000000..a053d13 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixItemType.java @@ -0,0 +1,188 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v2; + +import com.fasterxml.jackson.annotation.JsonProperty; +import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * The type Scholix item type. + */ +public class ScholixItemType { + + @JsonProperty("Identifier") + private List identifier = new ArrayList(); + + @JsonProperty("Title") + private String title; + + @JsonProperty("Type") + private String type; + + @JsonProperty("Creator") + private List creator = new ArrayList<>(); + + @JsonProperty("PublicationDate") + private String publicationDate; + + @JsonProperty("Publisher") + private List publisher = new ArrayList<>(); + + + /** + * Gets identifier. + * + * @return the identifier + */ + public List getIdentifier() { + return identifier; + } + + /** + * Sets identifier. + * + * @param identifier the identifier + * @return the identifier + */ + public ScholixItemType setIdentifier(List identifier) { + this.identifier = identifier; + return this; + } + + /** + * Gets title. + * + * @return the title + */ + public String getTitle() { + return title; + } + + /** + * Sets title. + * + * @param title the title + * @return the title + */ + public ScholixItemType setTitle(String title) { + this.title = title; + return this; + } + + /** + * Gets type. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Sets type. + * + * @param type the type + * @return the type + */ + public ScholixItemType setType(String type) { + this.type = type; + return this; + } + + /** + * Gets creator. + * + * @return the creator + */ + public List getCreator() { + return creator; + } + + /** + * Sets creator. + * + * @param creator the creator + * @return the creator + */ + public ScholixItemType setCreator(List creator) { + this.creator = creator; + return this; + } + + /** + * Gets publication date. + * + * @return the publication date + */ + public String getPublicationDate() { + return publicationDate; + } + + /** + * Sets publication date. + * + * @param publicationDate the publication date + * @return the publication date + */ + public ScholixItemType setPublicationDate(String publicationDate) { + this.publicationDate = publicationDate; + return this; + } + + /** + * Gets publisher. + * + * @return the publisher + */ + public List getPublisher() { + return publisher; + } + + /** + * Sets publisher. + * + * @param publisher the publisher + * @return the publisher + */ + public ScholixItemType setPublisher(List publisher) { + this.publisher = publisher; + return this; + } + + + + public static ScholixItemType fromScholixResource(final ScholixResource input) { + if (input == null) + return null; + final ScholixItemType instance = new ScholixItemType(); + instance.setType("publication".equalsIgnoreCase(input.getObjectType())?"literature": "dataset"); + instance.setTitle(input.getTitle()); + + if (input.getIdentifier()!= null) + instance.setIdentifier(input.getIdentifier() + .stream() + .map(ScholixIdentifierType::fromScholixIdentifier ) + .collect(Collectors.toList()) + ); + + + if (input.getPublisher()!= null) { + instance.setPublisher( + input.getPublisher().stream() + .map(ScholixLinkProviderType::fromScholixEntityId) + .collect(Collectors.toList()) + ); + } + + instance.setPublicationDate(input.getPublicationDate()); + if(input.getCreator()!=null) + instance.setCreator(input.getCreator() + .stream() + .map(ScholixCreatorType::fromScholixEntityId) + .collect(Collectors.toList())); + + return instance; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixLinkProviderType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixLinkProviderType.java new file mode 100644 index 0000000..7b7acb6 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixLinkProviderType.java @@ -0,0 +1,86 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v2; + +import com.fasterxml.jackson.annotation.JsonProperty; +import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.validation.constraints.NotBlank; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * The type Scholix link provider type. + */ +public class ScholixLinkProviderType { + @NotBlank + @JsonProperty("name") + private String name = null; + + + @NotBlank + @JsonProperty("identifier") + private List identifier = new ArrayList<>(); + + /** + * Gets A List of unique string that identifies the object + * + * @return the identifier + */ + @Schema(description = "A List of unique string that identifies the object") + public List getIdentifier() { + return identifier; + } + + /** + * Sets A List of unique string that identifies the object + * + * @param identifier the identifier + * @return the identifier + */ + public ScholixLinkProviderType setIdentifier(List identifier) { + this.identifier = identifier; + return this; + } + + + /** + * Gets The name of the Provider + * + * @return the name + */ + @Schema(description = "The name of the Provider") + public String getName() { + return name; + } + + /** + * Sets The name of the Provider + * + * @param name the name + * @return the name + */ + public ScholixLinkProviderType setName(String name) { + this.name = name; + return this; + } + + + public static ScholixLinkProviderType fromScholixEntityId(final ScholixEntityId provider) { + if (provider == null) + return null; + ScholixLinkProviderType instance = new ScholixLinkProviderType().setName(provider.getName()); + + + if (provider.getIdentifiers()!= null && provider.getIdentifiers().size()>0) + instance.setIdentifier(provider.getIdentifiers() + .stream() + .map(i ->new ScholixIdentifierType() + .setId(i.getIdentifier()) + .setIdScheme(i.getSchema())) + .collect(Collectors.toList())); + return instance; + + + } +} \ No newline at end of file diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixType.java new file mode 100644 index 0000000..0306120 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixType.java @@ -0,0 +1,197 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v2; + +import com.fasterxml.jackson.annotation.JsonProperty; +import eu.dnetlib.dhp.schema.sx.scholix.Scholix; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; +import java.util.stream.Collectors; + +/** + * The type Scholix type. + */ +public class ScholixType implements Serializable { + + + @NotBlank + @JsonProperty("RelationshipType") + private RelationshipType relationshipType ; + + @NotBlank + @JsonProperty("source") + private ScholixItemType source ; + + @NotBlank + @JsonProperty("target") + private ScholixItemType target ; + + @JsonProperty("HarvestDate") + private String harvestDate ; + + + @JsonProperty("LicenseURL") + private String licenseURL ; + + @JsonProperty("LinkProvider") + private List linkProvider ; + + @JsonProperty("LinkPublicationDate") + private String linkPublicationDate ; + + + /** + * Gets the nature of the relationship between the source object and target object in this Link Information Package + * + * @return the relationship type + */ + @Schema(description = "The nature of the relationship between the source object and target object in this Link Information Package") + public RelationshipType getRelationshipType() { + return relationshipType; + } + + /** + * Sets relationship type. + * + * @param relationshipType the relationship type + */ + public void setRelationshipType(RelationshipType relationshipType) { + this.relationshipType = relationshipType; + } + + /** + * Gets Root element relative to all properties describing the link’s source object + * + * @return the source + */ + @Schema(description = "Root element relative to all properties describing the link’s source object") + public ScholixItemType getSource() { + return source; + } + + /** + * Sets source. + * + * @param source the source + */ + public void setSource(ScholixItemType source) { + this.source = source; + } + + /** + * Gets Root element relative to all properties describing the link’s target object + * + * @return the target + */ + @Schema(description = "Gets Root element relative to all properties describing the link’s target object") + public ScholixItemType getTarget() { + return target; + } + + /** + * Sets target. + * + * @param target the target + */ + public void setTarget(ScholixItemType target) { + this.target = target; + } + + /** + * Gets harvest date. + * + * @return the harvest date + */ + public String getHarvestDate() { + return harvestDate; + } + + /** + * Sets harvest date. + * + * @param harvestDate the harvest date + */ + public void setHarvestDate(String harvestDate) { + this.harvestDate = harvestDate; + } + + /** + * Gets The URL of the license for the Scholix Link Information Package + * + * @return the license url + */ + @Schema(description = "The URL of the license for the Scholix Link Information Package") + public String getLicenseURL() { + return licenseURL; + } + + /** + * Sets license url. + * + * @param licenseURL the license url + */ + public void setLicenseURL(String licenseURL) { + this.licenseURL = licenseURL; + } + + /** + * Gets The source(s) of this Link Information Package. + * + * @return the link provider + */ + @Schema(description = "The source(s) of this Link Information Package") + public List getLinkProvider() { + return linkProvider; + } + + /** + * Sets link provider. + * + * @param linkProvider the link provider + */ + public void setLinkProvider(List linkProvider) { + this.linkProvider = linkProvider; + } + + /** + * Gets Date when this Link Information Package was first formally issued from this current Provider + * + * @return the link publication date + */ + @Schema(description = "Date when this Link Information Package was first formally issued from this current Provider") + + public String getLinkPublicationDate() { + return linkPublicationDate; + } + + /** + * Sets link publication date. + * + * @param linkPublicationDate the link publication date + */ + public void setLinkPublicationDate(String linkPublicationDate) { + this.linkPublicationDate = linkPublicationDate; + } + + + + public static ScholixType fromScholix(Scholix input) { + final ScholixType instance = new ScholixType(); + instance.setLinkPublicationDate(input.getPublicationDate()); + instance.setHarvestDate(input.getPublicationDate()); + instance.setRelationshipType(RelationshipType.fromScholixRelationship(input.getRelationship())); + + if(input.getLinkprovider()!= null && input.getLinkprovider().size()>0) + instance.setLinkProvider(input.getLinkprovider() + .stream() + .map(ScholixLinkProviderType::fromScholixEntityId) + .collect(Collectors.toList()) + ); + + + instance.setSource(ScholixItemType.fromScholixResource(input.getSource())); + instance.setTarget(ScholixItemType.fromScholixResource(input.getTarget())); + return instance; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixItemType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixItemType.java new file mode 100644 index 0000000..0fb6a65 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixItemType.java @@ -0,0 +1,215 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixCreatorType; +import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixIdentifierType; +import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixLinkProviderType; +import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * The type Scholix item type. + */ +public class ScholixItemType { + + @JsonProperty("Identifier") + private List identifier = new ArrayList(); + + @JsonProperty("Title") + private String title; + + @JsonProperty("Type") + private String type; + + @JsonProperty("subType") + private String subType; + + @JsonProperty("Creator") + private List creator = new ArrayList<>(); + + @JsonProperty("PublicationDate") + private String publicationDate; + + @JsonProperty("Publisher") + private List publisher = new ArrayList<>(); + + + /** + * Gets identifier. + * + * @return the identifier + */ + public List getIdentifier() { + return identifier; + } + + /** + * Sets identifier. + * + * @param identifier the identifier + * @return the identifier + */ + public ScholixItemType setIdentifier(List identifier) { + this.identifier = identifier; + return this; + } + + /** + * Gets title. + * + * @return the title + */ + public String getTitle() { + return title; + } + + /** + * Sets title. + * + * @param title the title + * @return the title + */ + public ScholixItemType setTitle(String title) { + this.title = title; + return this; + } + + /** + * Gets type. + * + * @return the type + */ + public String getSubType() { + return subType; + } + + /** + * Sets sub Type. + * + * @param subType the subType + * @return the title + */ + public ScholixItemType setSubType(String subType) { + this.subType = subType; + return this; + } + + /** + * Gets type. + * + * @return the type + */ + public String getType() { + return type; + } + + + /** + * Sets type. + * + * @param type the type + * @return the type + */ + public ScholixItemType setType(String type) { + this.type = type; + return this; + } + + /** + * Gets creator. + * + * @return the creator + */ + public List getCreator() { + return creator; + } + + /** + * Sets creator. + * + * @param creator the creator + * @return the creator + */ + public ScholixItemType setCreator(List creator) { + this.creator = creator; + return this; + } + + /** + * Gets publication date. + * + * @return the publication date + */ + public String getPublicationDate() { + return publicationDate; + } + + /** + * Sets publication date. + * + * @param publicationDate the publication date + * @return the publication date + */ + public ScholixItemType setPublicationDate(String publicationDate) { + this.publicationDate = publicationDate; + return this; + } + + /** + * Gets publisher. + * + * @return the publisher + */ + public List getPublisher() { + return publisher; + } + + /** + * Sets publisher. + * + * @param publisher the publisher + * @return the publisher + */ + public ScholixItemType setPublisher(List publisher) { + this.publisher = publisher; + return this; + } + + + + public static ScholixItemType fromScholixResource(final ScholixResource input) { + if (input == null) + return null; + final ScholixItemType instance = new ScholixItemType(); + instance.setType("publication".equalsIgnoreCase(input.getObjectType())?"literature": "dataset"); + instance.setTitle(input.getTitle()); + + if (input.getIdentifier()!= null) + instance.setIdentifier(input.getIdentifier() + .stream() + .map(ScholixIdentifierType::fromScholixIdentifier ) + .collect(Collectors.toList()) + ); + + + if (input.getPublisher()!= null) { + instance.setPublisher( + input.getPublisher().stream() + .map(ScholixLinkProviderType::fromScholixEntityId) + .collect(Collectors.toList()) + ); + } + + instance.setPublicationDate(input.getPublicationDate()); + if(input.getCreator()!=null) + instance.setCreator(input.getCreator() + .stream() + .map(ScholixCreatorType::fromScholixEntityId) + .collect(Collectors.toList())); + + return instance; + } +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixType.java new file mode 100644 index 0000000..aa41988 --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixType.java @@ -0,0 +1,199 @@ +package eu.dnetlib.dhp.schema.sx.api.model.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import eu.dnetlib.dhp.schema.sx.api.model.v2.RelationshipType; +import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixLinkProviderType; +import eu.dnetlib.dhp.schema.sx.scholix.Scholix; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; +import java.util.stream.Collectors; + +/** + * The type Scholix type. + */ +public class ScholixType implements Serializable { + + + @NotBlank + @JsonProperty("RelationshipType") + private RelationshipType relationshipType ; + + @NotBlank + @JsonProperty("source") + private ScholixItemType source ; + + @NotBlank + @JsonProperty("target") + private ScholixItemType target ; + + @JsonProperty("HarvestDate") + private String harvestDate ; + + + @JsonProperty("LicenseURL") + private String licenseURL ; + + @JsonProperty("LinkProvider") + private List linkProvider ; + + @JsonProperty("LinkPublicationDate") + private String linkPublicationDate ; + + + /** + * Gets the nature of the relationship between the source object and target object in this Link Information Package + * + * @return the relationship type + */ + @Schema(description = "The nature of the relationship between the source object and target object in this Link Information Package") + public RelationshipType getRelationshipType() { + return relationshipType; + } + + /** + * Sets relationship type. + * + * @param relationshipType the relationship type + */ + public void setRelationshipType(RelationshipType relationshipType) { + this.relationshipType = relationshipType; + } + + /** + * Gets Root element relative to all properties describing the link’s source object + * + * @return the source + */ + @Schema(description = "Root element relative to all properties describing the link’s source object") + public ScholixItemType getSource() { + return source; + } + + /** + * Sets source. + * + * @param source the source + */ + public void setSource(ScholixItemType source) { + this.source = source; + } + + /** + * Gets Root element relative to all properties describing the link’s target object + * + * @return the target + */ + @Schema(description = "Gets Root element relative to all properties describing the link’s target object") + public ScholixItemType getTarget() { + return target; + } + + /** + * Sets target. + * + * @param target the target + */ + public void setTarget(ScholixItemType target) { + this.target = target; + } + + /** + * Gets harvest date. + * + * @return the harvest date + */ + public String getHarvestDate() { + return harvestDate; + } + + /** + * Sets harvest date. + * + * @param harvestDate the harvest date + */ + public void setHarvestDate(String harvestDate) { + this.harvestDate = harvestDate; + } + + /** + * Gets The URL of the license for the Scholix Link Information Package + * + * @return the license url + */ + @Schema(description = "The URL of the license for the Scholix Link Information Package") + public String getLicenseURL() { + return licenseURL; + } + + /** + * Sets license url. + * + * @param licenseURL the license url + */ + public void setLicenseURL(String licenseURL) { + this.licenseURL = licenseURL; + } + + /** + * Gets The source(s) of this Link Information Package. + * + * @return the link provider + */ + @Schema(description = "The source(s) of this Link Information Package") + public List getLinkProvider() { + return linkProvider; + } + + /** + * Sets link provider. + * + * @param linkProvider the link provider + */ + public void setLinkProvider(List linkProvider) { + this.linkProvider = linkProvider; + } + + /** + * Gets Date when this Link Information Package was first formally issued from this current Provider + * + * @return the link publication date + */ + @Schema(description = "Date when this Link Information Package was first formally issued from this current Provider") + + public String getLinkPublicationDate() { + return linkPublicationDate; + } + + /** + * Sets link publication date. + * + * @param linkPublicationDate the link publication date + */ + public void setLinkPublicationDate(String linkPublicationDate) { + this.linkPublicationDate = linkPublicationDate; + } + + + + public static ScholixType fromScholix(Scholix input) { + final ScholixType instance = new ScholixType(); + instance.setLinkPublicationDate(input.getPublicationDate()); + instance.setHarvestDate(input.getPublicationDate()); + instance.setRelationshipType(RelationshipType.fromScholixRelationship(input.getRelationship())); + + if(input.getLinkprovider()!= null && input.getLinkprovider().size()>0) + instance.setLinkProvider(input.getLinkprovider() + .stream() + .map(ScholixLinkProviderType::fromScholixEntityId) + .collect(Collectors.toList()) + ); + + + instance.setSource(ScholixItemType.fromScholixResource(input.getSource())); + instance.setTarget(ScholixItemType.fromScholixResource(input.getTarget())); + return instance; + } +} From d08c2744f57093a93195f323cdca51282817f590 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 23 Mar 2022 13:59:40 +0100 Subject: [PATCH 126/146] added comparator for refereed field instances --- .../dhp/schema/common/ModelConstants.java | 3 ++ .../dhp/schema/common/RefereedComparator.java | 44 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 src/main/java/eu/dnetlib/dhp/schema/common/RefereedComparator.java diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java index bd893bf..1ce1a73 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java @@ -57,6 +57,9 @@ public class ModelConstants { public static final String DNET_RELATION_SUBRELTYPE = "dnet:relation_subRelType"; public static final String DNET_RELATION_RELCLASS = "dnet:relation_relClass"; + public static final String PEER_REVIEWED = "nonPeerReviewed"; + public static final String NON_PEER_REVIEWED = "nonPeerReviewed"; + public static final String SYSIMPORT_CROSSWALK_REPOSITORY = "sysimport:crosswalk:repository"; public static final String SYSIMPORT_CROSSWALK_ENTITYREGISTRY = "sysimport:crosswalk:entityregistry"; public static final String SYSIMPORT_ACTIONSET = "sysimport:actionset"; diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/RefereedComparator.java b/src/main/java/eu/dnetlib/dhp/schema/common/RefereedComparator.java new file mode 100644 index 0000000..3c962ce --- /dev/null +++ b/src/main/java/eu/dnetlib/dhp/schema/common/RefereedComparator.java @@ -0,0 +1,44 @@ + +package eu.dnetlib.dhp.schema.common; + +import eu.dnetlib.dhp.schema.oaf.Qualifier; + +import java.util.Comparator; + +public class RefereedComparator implements Comparator { + + @Override + public int compare(Qualifier left, Qualifier right) { + + if (left == null && right == null) + return 0; + if (left == null) + return 1; + if (right == null) + return -1; + + String lClass = left.getClassid(); + String rClass = right.getClassid(); + + if (lClass.equals(rClass)) + return 0; + + if (lClass.equals(ModelConstants.PEER_REVIEWED)) + return -1; + if (rClass.equals(ModelConstants.PEER_REVIEWED)) + return 1; + + if (lClass.equals(ModelConstants.NON_PEER_REVIEWED)) + return -1; + if (rClass.equals(ModelConstants.NON_PEER_REVIEWED)) + return 1; + + if (lClass.equals(ModelConstants.UNKNOWN)) + return -1; + if (rClass.equals(ModelConstants.UNKNOWN)) + return 1; + + // Else (but unlikely), lexicographical ordering will do. + return lClass.compareTo(rClass); + } +} From f05d76fa7ca067a1a67c6eab685f924910f109fb Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 23 Mar 2022 14:02:16 +0100 Subject: [PATCH 127/146] updated changelog --- CHANGES.md | 55 +++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7b0e957..591780b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,31 +2,32 @@ ## Changelog -| **Version** | **Changes** | **Readiness** | -|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| -| 2.10.29 | [Merge Result]
merge logics changed to consider invisble in dataInfo | beta | -| 2.10.28 | [Graph Model]
Added APC information at the level of the result | beta | -| 2.10.27 | [Graph Model]
change name and id of OpenAPC datasource | beta | -| 2.10.26 | [Graph Model]
OpenAIRE ids of the delegated authorities and enrichment providers in the identifier creation strategy | beta | -| 2.10.25 | [Graph model]
implemented enrichment on Result specializing in the method mergefrom. | beta | -| 2.10.24 | [Graph model]
added utility method and constants for checking weather is an OafEntity represents an enrichment. | beta | -| 2.9.24 | [Dump model]
change the names of the classes to be able to automatically create the json schema with specific descriptions | beta | -| 2.9.23 | [Graph model]
Added Instance.measures field, allowing to maintain the association between them and the individual result instance
[Dump model]
added json schemas | beta | -| 2.8.22 | [Graph model]
minor: added serializable to the Measures model class
[Dump model]
added dedicated BestAccessRight class, used at the result level instead of AccessRight | production | -| 2.8.21 | [Graph model]
added the following relation terms Describes/IsDescribedBy, IsMetadataFor/IsMetadataOf, HasAssociationWith/HasAssociationWith, IsRequiredBy/Requires. All these are used in combination with the relation subRelType "relationship" | production | -| 2.8.20 | [Graph model]
added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | production | -| 2.7.18-19 | [Dump model]
include validation info in relations
[Graph model]
added constants declaring vocabulary names for relation fields | production | -| 2.7.17 | [Dump model]
aligned the graph dump schema to mirror the changes in the model
1. Added openaccessroute at the level of the instance inside the AccessRight element;
2. Added pid and the alternate identifiers at the level of the instance;
3. Added the bipFinder measures | production | -| 2.7.16 | [Graph model]
Updated the casing of the following terms (`relation.relClass`):
1. `isRelatedTo -> IsRelatedTo`
Added the following `relClass` terms:
1. `IsAmongTopNSimilarDocuments`
2. `HasAmongTopNSimilarDocuments` | production | -| 2.7.15 | 1. added support for delegated authorities
2. fixed regex for DOI cleaning | production | -| 2.7.14 | [Graph model]
Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion` | production | -| 2.6.14 | [Scholexplorer]
1. Added model classes for Scholexplorer, package `eu.dnetlib.dhp.schema.sx` | production | -| 2.6.13 | 1. `Result.mergeFrom` handles field `dateOfAcceptance` | production | -| 2.5.12 | 1. delegating the date parsing to https://github.com/sisyphsu/dateparser | production | -| 2.5.[11-9] | 1. support for more date formats
2. enable the possibility to extend the date formats used to parse `Relation.validationDate` | production | -| 2.4.8 | 1. added constant for ORCID datasource name | production | -| 2.4.7 | refactoring | production | -| 2.3.6 | [Aggregation]
1. introduced MetadataStoreManager (MdSM) model classes | production | -| 2.2.5 | [Graph model]
1. introduced fields `Instance.pid` and `Instance.alternateIdentifier`
2. `LicenseComparator` renamed as `AccessRightComparator`
3. introduced `AccessRight` model class defining the `OpenAccessRoute` field to keep track of the OpenAccess color at the `Instance` level
4. `ExternalReference` cleanup (removed description, added alternateLabel(s))
5. added several ModelConstants
[Aggregation]
7. introduced MDStore record model classes
8. Introduced ORCID specific model classes | production | -| 2.2.4 | 1. ORCID specific model classes backported in the version used in PROD
2. added constant for dnet:externalReference_typologies
3. added constant for ORCID datasource name
4. `Result.mergeFrom` handles field `dateOfAcceptance` | production | +| **Version** | **Changes** | **Readiness** | +|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| +| 2.10.30 | [Minor]
added comparator for refereed field instances | beta | +| 2.10.29 | [Merge Result]
merge logics changed to consider invisble in dataInfo | beta | +| 2.10.28 | [Graph Model]
Added APC information at the level of the result | beta | +| 2.10.27 | [Graph Model]
change name and id of OpenAPC datasource | beta | +| 2.10.26 | [Graph Model]
OpenAIRE ids of the delegated authorities and enrichment providers in the identifier creation strategy | beta | +| 2.10.25 | [Graph model]
implemented enrichment on Result specializing in the method mergefrom. | beta | +| 2.10.24 | [Graph model]
added utility method and constants for checking weather is an OafEntity represents an enrichment. | beta | +| 2.9.24 | [Dump model]
change the names of the classes to be able to automatically create the json schema with specific descriptions | beta | +| 2.9.23 | [Graph model]
Added Instance.measures field, allowing to maintain the association between them and the individual result instance
[Dump model]
added json schemas | beta | +| 2.8.22 | [Graph model]
minor: added serializable to the Measures model class
[Dump model]
added dedicated BestAccessRight class, used at the result level instead of AccessRight | production | +| 2.8.21 | [Graph model]
added the following relation terms Describes/IsDescribedBy, IsMetadataFor/IsMetadataOf, HasAssociationWith/HasAssociationWith, IsRequiredBy/Requires. All these are used in combination with the relation subRelType "relationship" | production | +| 2.8.20 | [Graph model]
added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | production | +| 2.7.18-19 | [Dump model]
include validation info in relations
[Graph model]
added constants declaring vocabulary names for relation fields | production | +| 2.7.17 | [Dump model]
aligned the graph dump schema to mirror the changes in the model
1. Added openaccessroute at the level of the instance inside the AccessRight element;
2. Added pid and the alternate identifiers at the level of the instance;
3. Added the bipFinder measures | production | +| 2.7.16 | [Graph model]
Updated the casing of the following terms (`relation.relClass`):
1. `isRelatedTo -> IsRelatedTo`
Added the following `relClass` terms:
1. `IsAmongTopNSimilarDocuments`
2. `HasAmongTopNSimilarDocuments` | production | +| 2.7.15 | 1. added support for delegated authorities
2. fixed regex for DOI cleaning | production | +| 2.7.14 | [Graph model]
Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
The changes involve the values stored in `relation.subRelType` and `relation.relClass`:
Updated the casing of the following terms (`relation.relClass`):
1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`
2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`
3. `cites -> Cites` / `isCitedBy -> IsCitedBy`
4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`
Added the following terms [`subRelType: relClass / relClass (inverse)`]:
1. `relationship: References / IsReferencedBy`
2. `relationship: IsIdenticalTo`
3. `relationship: IsContinuedBy / Continues`
4. `relationship: IsDocumentedBy / Documents`
5. `relationship: Documents / IsDocumentedBy`
6. `relationship: IsCompiledBy / Compiles`
7. `version: IsPreviousVersionOf / IsNewVersionOf`
8. `version: IsSourceOf / IsDerivedFrom`
9. `version: IsVariantFormOf / IsOriginalFormOf`
10. `version: IsObsoletedBy / Obsoletes`
11. `version: IsVersionOf / HasVersion` | production | +| 2.6.14 | [Scholexplorer]
1. Added model classes for Scholexplorer, package `eu.dnetlib.dhp.schema.sx` | production | +| 2.6.13 | 1. `Result.mergeFrom` handles field `dateOfAcceptance` | production | +| 2.5.12 | 1. delegating the date parsing to https://github.com/sisyphsu/dateparser | production | +| 2.5.[11-9] | 1. support for more date formats
2. enable the possibility to extend the date formats used to parse `Relation.validationDate` | production | +| 2.4.8 | 1. added constant for ORCID datasource name | production | +| 2.4.7 | refactoring | production | +| 2.3.6 | [Aggregation]
1. introduced MetadataStoreManager (MdSM) model classes | production | +| 2.2.5 | [Graph model]
1. introduced fields `Instance.pid` and `Instance.alternateIdentifier`
2. `LicenseComparator` renamed as `AccessRightComparator`
3. introduced `AccessRight` model class defining the `OpenAccessRoute` field to keep track of the OpenAccess color at the `Instance` level
4. `ExternalReference` cleanup (removed description, added alternateLabel(s))
5. added several ModelConstants
[Aggregation]
7. introduced MDStore record model classes
8. Introduced ORCID specific model classes | production | +| 2.2.4 | 1. ORCID specific model classes backported in the version used in PROD
2. added constant for dnet:externalReference_typologies
3. added constant for ORCID datasource name
4. `Result.mergeFrom` handles field `dateOfAcceptance` | production | From 3270b05ac9992982e89222483088acbee7d59ae5 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 23 Mar 2022 14:02:43 +0100 Subject: [PATCH 128/146] [maven-release-plugin] prepare release dhp-schemas-2.10.30 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0ebb86f..5d1b346 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.30-SNAPSHOT + 2.10.30 @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.25 + dhp-schemas-2.10.30 This module contains common schema classes meant to be used across the dnet-hadoop submodules From f683019c3d400adfd5448f0d742adb35e59cd4cb Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 23 Mar 2022 14:02:47 +0100 Subject: [PATCH 129/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 5d1b346..666f465 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.30 + 2.10.31-SNAPSHOT @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.30 + dhp-schemas-2.10.25 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 5a21b8bee36e38b0c544a20308986d8b981b1cfe Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 23 Mar 2022 14:33:21 +0100 Subject: [PATCH 130/146] added comparator for refereed field instances, updated constants --- pom.xml | 4 ++-- .../eu/dnetlib/dhp/schema/common/ModelConstants.java | 6 ++++-- .../dhp/schema/common/RefereedComparator.java | 12 ++++++------ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index 666f465..62959a7 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.31-SNAPSHOT + 2.10.30-SNAPSHOT @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.25 + dhp-schemas-2.10.30 This module contains common schema classes meant to be used across the dnet-hadoop submodules diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java index 1ce1a73..1f32c33 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/ModelConstants.java @@ -57,8 +57,10 @@ public class ModelConstants { public static final String DNET_RELATION_SUBRELTYPE = "dnet:relation_subRelType"; public static final String DNET_RELATION_RELCLASS = "dnet:relation_relClass"; - public static final String PEER_REVIEWED = "nonPeerReviewed"; - public static final String NON_PEER_REVIEWED = "nonPeerReviewed"; + public static final String PEER_REVIEWED_CLASSNAME = "nonPeerReviewed"; + public static final String NON_PEER_REVIEWED_CLASSNAME = "nonPeerReviewed"; + public static final String PEER_REVIEWED_CLASSID = "0001"; + public static final String NON_PEER_REVIEWED_CLASSID = "0002"; public static final String SYSIMPORT_CROSSWALK_REPOSITORY = "sysimport:crosswalk:repository"; public static final String SYSIMPORT_CROSSWALK_ENTITYREGISTRY = "sysimport:crosswalk:entityregistry"; diff --git a/src/main/java/eu/dnetlib/dhp/schema/common/RefereedComparator.java b/src/main/java/eu/dnetlib/dhp/schema/common/RefereedComparator.java index 3c962ce..86c0d97 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/common/RefereedComparator.java +++ b/src/main/java/eu/dnetlib/dhp/schema/common/RefereedComparator.java @@ -1,10 +1,10 @@ package eu.dnetlib.dhp.schema.common; -import eu.dnetlib.dhp.schema.oaf.Qualifier; - import java.util.Comparator; +import eu.dnetlib.dhp.schema.oaf.Qualifier; + public class RefereedComparator implements Comparator { @Override @@ -23,14 +23,14 @@ public class RefereedComparator implements Comparator { if (lClass.equals(rClass)) return 0; - if (lClass.equals(ModelConstants.PEER_REVIEWED)) + if (lClass.equals(ModelConstants.PEER_REVIEWED_CLASSID)) return -1; - if (rClass.equals(ModelConstants.PEER_REVIEWED)) + if (rClass.equals(ModelConstants.PEER_REVIEWED_CLASSID)) return 1; - if (lClass.equals(ModelConstants.NON_PEER_REVIEWED)) + if (lClass.equals(ModelConstants.NON_PEER_REVIEWED_CLASSID)) return -1; - if (rClass.equals(ModelConstants.NON_PEER_REVIEWED)) + if (rClass.equals(ModelConstants.NON_PEER_REVIEWED_CLASSID)) return 1; if (lClass.equals(ModelConstants.UNKNOWN)) From 5df6c09062d158ac941fe1868b99678bb71ea16b Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 23 Mar 2022 14:33:47 +0100 Subject: [PATCH 131/146] [maven-release-plugin] prepare release dhp-schemas-2.10.30 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 62959a7..5d1b346 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.30-SNAPSHOT + 2.10.30 From b073935a64e9043c8c453e57eb82b0ddfdd054c5 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 23 Mar 2022 14:33:50 +0100 Subject: [PATCH 132/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5d1b346..d750e47 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.30 + 2.10.31-SNAPSHOT From ffa6bbf392af6ef27cfb0d0b7f13cc5d5e3e0710 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 25 Mar 2022 15:05:17 +0100 Subject: [PATCH 133/146] added MPE checks in the mergeOAFDataInfo method --- src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java index b0c5165..0df5572 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java @@ -70,9 +70,14 @@ public abstract class Oaf implements Serializable { } public void mergeOAFDataInfo(Oaf o) { - - if (o.getDataInfo() != null && (compareTrust(this, o) < 0 || this.getDataInfo().getInvisible())) - dataInfo = o.getDataInfo(); + Optional.ofNullable(o) + .ifPresent(other -> Optional.ofNullable(other.getDataInfo()) + .ifPresent(otherDataInfo -> Optional.ofNullable(this.getDataInfo()) + .ifPresent(thisDataInfo -> { + if (compareTrust(this, other) < 0 || thisDataInfo.getInvisible()) { + setDataInfo(otherDataInfo); + } + }))); } protected String extractTrust(Oaf e) { From 2c809318b90dfe0c954e58a91df3dfe92d64ef86 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 25 Mar 2022 15:07:40 +0100 Subject: [PATCH 134/146] bumped version --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 591780b..750c2a4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ | **Version** | **Changes** | **Readiness** | |-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| +| 2.10.31 | [Minor]
NPE checks | beta | | 2.10.30 | [Minor]
added comparator for refereed field instances | beta | | 2.10.29 | [Merge Result]
merge logics changed to consider invisble in dataInfo | beta | | 2.10.28 | [Graph Model]
Added APC information at the level of the result | beta | From c781f5542cd4dd13c35c5259623ea2aef3db0996 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 25 Mar 2022 15:08:19 +0100 Subject: [PATCH 135/146] [maven-release-plugin] prepare release dhp-schemas-2.10.31 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d750e47..afe4020 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.31-SNAPSHOT + 2.10.31 @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.30 + dhp-schemas-2.10.31 This module contains common schema classes meant to be used across the dnet-hadoop submodules From b6d9516dafb36f7c1066f560a071cdb954ab03d6 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 25 Mar 2022 15:08:23 +0100 Subject: [PATCH 136/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index afe4020..3ae2473 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.31 + 2.10.32-SNAPSHOT @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.31 + dhp-schemas-2.10.30 This module contains common schema classes meant to be used across the dnet-hadoop submodules From d275d91c59b48b71d6760a36b346fb7abf268ee3 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 29 Mar 2022 09:39:17 +0200 Subject: [PATCH 137/146] [maven-release-plugin] prepare release dhp-schemas-2.10.32 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 3ae2473..0be634b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.32-SNAPSHOT + 2.10.32 @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.30 + dhp-schemas-2.10.32 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 5aca5915b668bc9beb78b0f82012fde5cbd41ae5 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 29 Mar 2022 09:39:21 +0200 Subject: [PATCH 138/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0be634b..33eef04 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.32 + 2.10.33-SNAPSHOT @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.32 + dhp-schemas-2.10.30 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 986f60b5fedf4939ecda987b2db2d22c58b584ed Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Tue, 29 Mar 2022 11:12:08 +0200 Subject: [PATCH 139/146] code formatted --- pom.xml | 2 +- .../dhp/schema/sx/api/model/v1/LinkPublisher.java | 10 ++++++---- .../dhp/schema/sx/api/model/v1/ScholixCreator.java | 9 +++++---- .../schema/sx/api/model/v1/ScholixIdentifier.java | 7 ++++--- .../dhp/schema/sx/api/model/v1/ScholixItem.java | 9 +++++---- .../schema/sx/api/model/v1/ScholixProvider.java | 12 +++++++----- .../sx/api/model/v1/ScholixRelationship.java | 10 ++++++---- .../dhp/schema/sx/api/model/v1/ScholixV1.java | 12 +++++++----- .../schema/sx/api/model/v2/LinkProviderType.java | 10 ++++++---- .../dhp/schema/sx/api/model/v2/PageResultType.java | 12 +++++++----- .../schema/sx/api/model/v2/RelationshipType.java | 12 +++++++----- .../schema/sx/api/model/v2/ScholixCreatorType.java | 12 +++++++----- .../sx/api/model/v2/ScholixIdentifierType.java | 5 +++-- .../schema/sx/api/model/v2/ScholixItemType.java | 7 ++++--- .../sx/api/model/v2/ScholixLinkProviderType.java | 14 ++++++++------ .../dhp/schema/sx/api/model/v2/ScholixType.java | 12 +++++++----- .../schema/sx/api/model/v3/ScholixItemType.java | 13 +++++++------ .../dhp/schema/sx/api/model/v3/ScholixType.java | 12 +++++++----- .../eu/dnetlib/dhp/schema/sx/scholix/Scholix.java | 4 ++-- .../schema/sx/scholix/ScholixCollectedFrom.java | 4 ++-- .../dhp/schema/sx/scholix/ScholixComparator.java | 1 + .../dhp/schema/sx/scholix/ScholixEntityId.java | 7 ++++--- .../dhp/schema/sx/scholix/ScholixIdentifier.java | 5 +++-- .../dhp/schema/sx/scholix/ScholixRelationship.java | 5 +++-- .../dhp/schema/sx/scholix/ScholixResource.java | 4 ++-- .../dhp/schema/sx/scholix/ScholixCompareTest.java | 8 +++++--- 26 files changed, 126 insertions(+), 92 deletions(-) diff --git a/pom.xml b/pom.xml index 1b691d5..828e19d 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,4 @@ - + 4.0.0 diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/LinkPublisher.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/LinkPublisher.java index 91c3f97..3582da3 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/LinkPublisher.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/LinkPublisher.java @@ -1,11 +1,13 @@ package eu.dnetlib.dhp.schema.sx.api.model.v1; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; +import java.util.Objects; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; -import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.v3.oas.annotations.media.Schema; public class LinkPublisher { @NotBlank @@ -94,4 +96,4 @@ public class LinkPublisher { } return o.toString().replace("\n", "\n "); } -} \ No newline at end of file +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixCreator.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixCreator.java index da53442..d0c9943 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixCreator.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixCreator.java @@ -1,12 +1,13 @@ package eu.dnetlib.dhp.schema.sx.api.model.v1; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; -import io.swagger.v3.oas.annotations.media.Schema; - import java.util.List; import java.util.stream.Collectors; +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; +import io.swagger.v3.oas.annotations.media.Schema; + public class ScholixCreator { @JsonProperty("name") diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixIdentifier.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixIdentifier.java index 752aa82..167230b 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixIdentifier.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixIdentifier.java @@ -1,10 +1,11 @@ package eu.dnetlib.dhp.schema.sx.api.model.v1; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; - import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.v3.oas.annotations.media.Schema; + public class ScholixIdentifier { @JsonProperty("identifier") diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixItem.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixItem.java index bd84344..a98f780 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixItem.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixItem.java @@ -1,14 +1,15 @@ package eu.dnetlib.dhp.schema.sx.api.model.v1; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; -import io.swagger.v3.oas.annotations.media.Schema; - import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; +import io.swagger.v3.oas.annotations.media.Schema; + public class ScholixItem { @JsonProperty("identifiers") diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixProvider.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixProvider.java index fd700ef..58c8af9 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixProvider.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixProvider.java @@ -1,15 +1,17 @@ package eu.dnetlib.dhp.schema.sx.api.model.v1; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; -import io.swagger.v3.oas.annotations.media.Schema; - -import javax.validation.Valid; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; +import javax.validation.Valid; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; +import io.swagger.v3.oas.annotations.media.Schema; + public class ScholixProvider { public static ScholixProvider fromScholixEntityId(final ScholixEntityId provider) { diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixRelationship.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixRelationship.java index 4d357f2..0337253 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixRelationship.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixRelationship.java @@ -1,12 +1,14 @@ package eu.dnetlib.dhp.schema.sx.api.model.v1; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; +import static eu.dnetlib.dhp.schema.sx.api.model.v2.RelationshipType.relationMapping; -import javax.validation.constraints.NotBlank; import java.util.Objects; -import static eu.dnetlib.dhp.schema.sx.api.model.v2.RelationshipType.relationMapping; +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.v3.oas.annotations.media.Schema; public class ScholixRelationship { diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixV1.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixV1.java index 3cd3e7b..ac28653 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixV1.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v1/ScholixV1.java @@ -1,16 +1,18 @@ package eu.dnetlib.dhp.schema.sx.api.model.v1; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.Scholix; -import io.swagger.v3.oas.annotations.media.Schema; - -import javax.validation.constraints.NotBlank; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.Scholix; +import io.swagger.v3.oas.annotations.media.Schema; + public class ScholixV1 implements Serializable { @JsonProperty("linkProvider") diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/LinkProviderType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/LinkProviderType.java index 01c9adb..510d53e 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/LinkProviderType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/LinkProviderType.java @@ -1,11 +1,13 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; +import java.util.Objects; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; -import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.v3.oas.annotations.media.Schema; /** * The type Link provider type. @@ -120,4 +122,4 @@ public class LinkProviderType { } return o.toString().replace("\n", "\n "); } -} \ No newline at end of file +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/PageResultType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/PageResultType.java index 8ebbbf5..f804865 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/PageResultType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/PageResultType.java @@ -1,14 +1,16 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; -import io.swagger.v3.oas.annotations.media.Schema; - -import javax.validation.constraints.NotBlank; import java.io.Serializable; import java.util.ArrayList; import java.util.List; +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; + /** * The main class that show the page result from the method * /l2/links diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/RelationshipType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/RelationshipType.java index a6f37a5..8dd4545 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/RelationshipType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/RelationshipType.java @@ -1,14 +1,16 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixRelationship; -import io.swagger.v3.oas.annotations.media.Schema; - -import javax.validation.constraints.NotNull; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.Stream; +import javax.validation.constraints.NotNull; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.ScholixRelationship; +import io.swagger.v3.oas.annotations.media.Schema; + /** * The type Relationship type. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixCreatorType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixCreatorType.java index e06f9c2..6e5713a 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixCreatorType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixCreatorType.java @@ -1,14 +1,16 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; -import io.swagger.v3.oas.annotations.media.Schema; - -import javax.validation.constraints.NotBlank; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; +import io.swagger.v3.oas.annotations.media.Schema; + /** * The type Scholix creator type. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixIdentifierType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixIdentifierType.java index e85dcd4..a6f0dec 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixIdentifierType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixIdentifierType.java @@ -1,11 +1,12 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; +import javax.validation.constraints.NotBlank; + import com.fasterxml.jackson.annotation.JsonProperty; + import eu.dnetlib.dhp.schema.sx.scholix.ScholixIdentifier; import io.swagger.v3.oas.annotations.media.Schema; -import javax.validation.constraints.NotBlank; - /** * The type Scholix identifier type. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixItemType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixItemType.java index a053d13..d86da31 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixItemType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixItemType.java @@ -1,12 +1,13 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; - import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; + /** * The type Scholix item type. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixLinkProviderType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixLinkProviderType.java index 7b7acb6..f2a5afb 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixLinkProviderType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixLinkProviderType.java @@ -1,14 +1,16 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; -import io.swagger.v3.oas.annotations.media.Schema; - -import javax.validation.constraints.NotBlank; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.ScholixEntityId; +import io.swagger.v3.oas.annotations.media.Schema; + /** * The type Scholix link provider type. */ @@ -83,4 +85,4 @@ public class ScholixLinkProviderType { } -} \ No newline at end of file +} diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixType.java index 0306120..ed05a27 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v2/ScholixType.java @@ -1,14 +1,16 @@ package eu.dnetlib.dhp.schema.sx.api.model.v2; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.scholix.Scholix; -import io.swagger.v3.oas.annotations.media.Schema; - -import javax.validation.constraints.NotBlank; import java.io.Serializable; import java.util.List; import java.util.stream.Collectors; +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.scholix.Scholix; +import io.swagger.v3.oas.annotations.media.Schema; + /** * The type Scholix type. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixItemType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixItemType.java index 0fb6a65..79a5740 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixItemType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixItemType.java @@ -1,15 +1,16 @@ package eu.dnetlib.dhp.schema.sx.api.model.v3; -import com.fasterxml.jackson.annotation.JsonProperty; -import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixCreatorType; -import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixIdentifierType; -import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixLinkProviderType; -import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; - import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import com.fasterxml.jackson.annotation.JsonProperty; + +import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixCreatorType; +import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixIdentifierType; +import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixLinkProviderType; +import eu.dnetlib.dhp.schema.sx.scholix.ScholixResource; + /** * The type Scholix item type. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixType.java b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixType.java index aa41988..90722a5 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixType.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/api/model/v3/ScholixType.java @@ -1,16 +1,18 @@ package eu.dnetlib.dhp.schema.sx.api.model.v3; +import java.io.Serializable; +import java.util.List; +import java.util.stream.Collectors; + +import javax.validation.constraints.NotBlank; + import com.fasterxml.jackson.annotation.JsonProperty; + import eu.dnetlib.dhp.schema.sx.api.model.v2.RelationshipType; import eu.dnetlib.dhp.schema.sx.api.model.v2.ScholixLinkProviderType; import eu.dnetlib.dhp.schema.sx.scholix.Scholix; import io.swagger.v3.oas.annotations.media.Schema; -import javax.validation.constraints.NotBlank; -import java.io.Serializable; -import java.util.List; -import java.util.stream.Collectors; - /** * The type Scholix type. */ diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java index 95338ea..ec8bcc9 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/Scholix.java @@ -1,14 +1,14 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import org.apache.commons.lang3.StringUtils; +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; import java.io.Serializable; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; -import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; +import org.apache.commons.lang3.StringUtils; public class Scholix implements Serializable, Comparable { diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java index cd415de..832617d 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCollectedFrom.java @@ -1,12 +1,12 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import org.apache.commons.lang3.StringUtils; +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; import java.io.Serializable; import java.util.Objects; -import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; +import org.apache.commons.lang3.StringUtils; public class ScholixCollectedFrom implements Serializable, Comparable { diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java index 55c7c0e..f71c9b5 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixComparator.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.stream.Stream; import com.google.common.collect.Iterators; + import me.xuender.unidecode.Unidecode; public class ScholixComparator { diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java index 266b946..3753e6d 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixEntityId.java @@ -1,8 +1,7 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import com.google.common.collect.Iterators; -import org.apache.commons.lang3.StringUtils; +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.normalizeString; import java.io.Serializable; import java.util.List; @@ -10,7 +9,9 @@ import java.util.Objects; import java.util.stream.Collectors; import java.util.stream.Stream; -import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.normalizeString; +import org.apache.commons.lang3.StringUtils; + +import com.google.common.collect.Iterators; public class ScholixEntityId implements Serializable, Comparable { private String name; diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java index f8b0cf1..9e1a0a2 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixIdentifier.java @@ -1,11 +1,12 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import org.apache.commons.lang3.StringUtils; +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.normalizeIdnetifier; + import java.io.Serializable; import java.util.Objects; -import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.normalizeIdnetifier; +import org.apache.commons.lang3.StringUtils; /** * The type Scholix identifier. diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixRelationship.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixRelationship.java index deeaab8..f05a16d 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixRelationship.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixRelationship.java @@ -1,11 +1,12 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import org.apache.commons.lang3.StringUtils; +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; import java.io.Serializable; import java.util.Objects; -import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; + +import org.apache.commons.lang3.StringUtils; public class ScholixRelationship implements Serializable, Comparable { private String name; diff --git a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java index d7b61ad..55ef84e 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixResource.java @@ -1,14 +1,14 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import org.apache.commons.lang3.StringUtils; +import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; import java.io.Serializable; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; -import static eu.dnetlib.dhp.schema.sx.scholix.ScholixComparator.*; +import org.apache.commons.lang3.StringUtils; public class ScholixResource implements Serializable, Comparable { diff --git a/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java b/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java index 2762873..cf534c9 100644 --- a/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java +++ b/src/test/java/eu/dnetlib/dhp/schema/sx/scholix/ScholixCompareTest.java @@ -1,12 +1,14 @@ package eu.dnetlib.dhp.schema.sx.scholix; -import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; + import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import java.util.stream.IntStream; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotEquals; + +import org.junit.jupiter.api.Test; public class ScholixCompareTest { From 0798a35924c3914f58b0c0cd897f449821c45e84 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Tue, 29 Mar 2022 11:18:30 +0200 Subject: [PATCH 140/146] removed wrong string --- pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 828e19d..b740d66 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,4 @@ - + 4.0.0 @@ -352,7 +352,7 @@ io.swagger swagger-annotations - 1.5.20 + ${dhp.swagger-annotations-version} io.swagger.core.v3 @@ -438,6 +438,7 @@
+ 1.5.20 UTF-8 UTF-8 3.6.0 From f8d7a15c3265ed6a2f3bfd437703d8a2484e4128 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Tue, 29 Mar 2022 11:29:05 +0200 Subject: [PATCH 141/146] converted all explicit dependencies version to maven property --- pom.xml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index b740d66..346ea56 100644 --- a/pom.xml +++ b/pom.xml @@ -285,13 +285,13 @@ me.xuender unidecode - 0.0.7 + ${dhp.unidecode.version} org.slf4j jcl-over-slf4j - 1.7.25 + ${dhp.slf4j.version} provided @@ -304,7 +304,7 @@ com.github.sisyphsu dateparser - 1.0.7 + ${dhp.dateparser.version} @@ -316,13 +316,13 @@ commons-codec commons-codec - 1.9 + ${dhp.commons.codec.version} commons-io commons-io - 2.4 + ${dhp.commons.io.version} @@ -336,7 +336,7 @@ javax.persistence javax.persistence-api - 2.2 + ${dhp.javax.persistence.api.version} provided @@ -357,14 +357,14 @@ io.swagger.core.v3 swagger-annotations - 2.1.12 + ${dhp.swagger.annotations.version} javax.validation validation-api - 2.0.1.Final + ${dhp.validation.api.version} @@ -432,12 +432,23 @@ com.github.imifou jsonschema-module-addon - 1.2.1 + ${dhp.jsonschema.module.addon.version}
+ + + 1.0.7 + 1.2.1 + 2.0.1.Final + 2.1.12 + 2.2 + 1.9 + 2.4 + 1.7.25 + 0.0.7 1.5.20 UTF-8 UTF-8 From 0be00f4361a78f03560c39390923f84dc044ab79 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Tue, 29 Mar 2022 11:39:48 +0200 Subject: [PATCH 142/146] moved all dependency with version under dependency-management section --- pom.xml | 70 +++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index 91b2e45..66a26ce 100644 --- a/pom.xml +++ b/pom.xml @@ -340,6 +340,55 @@ provided + + io.swagger + swagger-annotations + ${dhp.swagger-annotations-version} + + + io.swagger.core.v3 + swagger-annotations + ${dhp.swagger.annotations.version} + + + + javax.validation + validation-api + ${dhp.validation.api.version} + + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + + org.mockito + mockito-core + ${mockito-core.version} + test + + + + org.mockito + mockito-junit-jupiter + ${mockito-core.version} + test + + + + com.github.victools + jsonschema-generator + ${jsonschemagenerator.version} + + + com.github.imifou + jsonschema-module-addon + ${dhp.jsonschema.module.addon.version} + +
@@ -352,41 +401,30 @@ io.swagger swagger-annotations - ${dhp.swagger-annotations-version} + io.swagger.core.v3 swagger-annotations - ${dhp.swagger.annotations.version} - javax.validation validation-api - ${dhp.validation.api.version} - - org.junit.jupiter junit-jupiter - ${junit-jupiter.version} - test org.mockito mockito-core - ${mockito-core.version} - test org.mockito mockito-junit-jupiter - ${mockito-core.version} - test @@ -426,20 +464,14 @@ com.github.victools jsonschema-generator - ${jsonschemagenerator.version} - com.github.imifou jsonschema-module-addon - ${dhp.jsonschema.module.addon.version} - - + - - 1.0.7 1.2.1 2.0.1.Final From 0980b87619f9ea9a03c2705f9b463b98888a669d Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Tue, 29 Mar 2022 11:52:36 +0200 Subject: [PATCH 143/146] updated changes.md ready to deploy --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 750c2a4..4991045 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ | **Version** | **Changes** | **Readiness** | |-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| +| 2.10.33 | [Scholexplorer Incremental]
  • implementation of the compareTo method on Scholix objects and all model properties
  • Unit Test to verify that compareTo works on different case
  • Moved Scholix API Data model into dhp-schemas
    • | beta | | 2.10.31 | [Minor]
      NPE checks | beta | | 2.10.30 | [Minor]
      added comparator for refereed field instances | beta | | 2.10.29 | [Merge Result]
      merge logics changed to consider invisble in dataInfo | beta | From c8e6bf9199feb7bf8f4801dc0a296a3257d8c98d Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Tue, 29 Mar 2022 12:10:59 +0200 Subject: [PATCH 144/146] updated mid version --- CHANGES.md | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 4991045..6b0a2ff 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,7 +4,7 @@ | **Version** | **Changes** | **Readiness** | |-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| -| 2.10.33 | [Scholexplorer Incremental]
      • implementation of the compareTo method on Scholix objects and all model properties
      • Unit Test to verify that compareTo works on different case
      • Moved Scholix API Data model into dhp-schemas
        • | beta | +| 2.11.33 | [Scholexplorer]
          • Moved Scholix API Data model into dhp-schemas
          • implementation of the compareTo method on Scholix objects and all model properties
          • Unit Test to verify that compareTo works on different case
            • | beta | | 2.10.31 | [Minor]
              NPE checks | beta | | 2.10.30 | [Minor]
              added comparator for refereed field instances | beta | | 2.10.29 | [Merge Result]
              merge logics changed to consider invisble in dataInfo | beta | diff --git a/pom.xml b/pom.xml index 66a26ce..79f6d67 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.10.33-SNAPSHOT + 2.11.33-SNAPSHOT From 863237461137004cce1f9f11ae7b70b5ab1cbd4d Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Tue, 29 Mar 2022 12:11:25 +0200 Subject: [PATCH 145/146] [maven-release-plugin] prepare release dhp-schemas-2.11.33 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 79f6d67..c080679 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.11.33-SNAPSHOT + 2.11.33 @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.10.30 + dhp-schemas-2.11.33 This module contains common schema classes meant to be used across the dnet-hadoop submodules From 56c9af6ee559dc3467c4774de2f088e12c66ef79 Mon Sep 17 00:00:00 2001 From: Sandro La Bruzzo Date: Tue, 29 Mar 2022 12:11:29 +0200 Subject: [PATCH 146/146] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index c080679..a69fbfd 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.dnetlib.dhp dhp-schemas jar - 2.11.33 + 2.11.34-SNAPSHOT @@ -33,7 +33,7 @@ scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git https://code-repo.d4science.org/D-Net/dhp-schemas/ - dhp-schemas-2.11.33 + dhp-schemas-2.10.30 This module contains common schema classes meant to be used across the dnet-hadoop submodules