From 8b1bcc065d314853bb2d69822a726258286ede58 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 12 Nov 2021 15:16:44 +0100 Subject: [PATCH 1/3] - 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( -- 2.17.1 From 80a29910169b3ea0ad7b7831be2496ebcf3a6292 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Mon, 15 Nov 2021 16:26:32 +0100 Subject: [PATCH 2/3] [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; - } } -- 2.17.1 From 3fe8e14d5a607c816a6d4e083fb001acb2ad0159 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Mon, 15 Nov 2021 16:53:03 +0100 Subject: [PATCH 3/3] [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", -- 2.17.1