Merge pull request 'Moving the BipFinder! Measures' (#6) from instance_measures into master

Reviewed-on: #6
This commit is contained in:
Miriam Baglioni 2021-11-16 10:52:54 +01:00
commit 0d55c92e68
6 changed files with 57 additions and 10 deletions

View File

@ -4,6 +4,7 @@
| **Version** | **Changes** | **Readiness** | | **Version** | **Changes** | **Readiness** |
|---|---|---| |---|---|---|
| 2.9.23 | [Graph model]<br>Added Instance.measures field, allowing to maintain the association between them and the individual result instance</br>[Dump model]</br>added json schemas | beta |
| 2.8.22 | [Graph model]<br>minor: added serializable to the Measures model class</br>[Dump model]</br>added dedicated BestAccessRight class, used at the result level instead of AccessRight | beta | | 2.8.22 | [Graph model]<br>minor: added serializable to the Measures model class</br>[Dump model]</br>added dedicated BestAccessRight class, used at the result level instead of AccessRight | beta |
| 2.8.21 | [Graph model]<br>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.21 | [Graph model]<br>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]<br>added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | beta | | 2.8.20 | [Graph model]<br>added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | beta |

View File

@ -5,7 +5,7 @@
<groupId>eu.dnetlib.dhp</groupId> <groupId>eu.dnetlib.dhp</groupId>
<artifactId>dhp-schemas</artifactId> <artifactId>dhp-schemas</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>2.8.23-SNAPSHOT</version> <version>2.9.23-SNAPSHOT</version>
<licenses> <licenses>
<license> <license>
@ -32,7 +32,7 @@
<connection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</connection> <connection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</connection>
<developerConnection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</developerConnection> <developerConnection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</developerConnection>
<url>https://code-repo.d4science.org/D-Net/dhp-schemas/</url> <url>https://code-repo.d4science.org/D-Net/dhp-schemas/</url>
<tag>dhp-schemas-2.8.20</tag> <tag>dhp-schemas-2.9.23</tag>
</scm> </scm>
<description>This module contains common schema classes meant to be used across the dnet-hadoop submodules</description> <description>This module contains common schema classes meant to be used across the dnet-hadoop submodules</description>

View File

@ -19,9 +19,12 @@ import java.util.List;
* -pid of type List<ControlledField> that is the list of pids associated to the result coming from authoritative sources for that pid * -pid of type List<ControlledField> that is the list of pids associated to the result coming from authoritative sources for that pid
* -alternateIdentifier of type List<ControlledField> that is the list of pids associated to the result coming from NON authoritative * -alternateIdentifier of type List<ControlledField> that is the list of pids associated to the result coming from NON authoritative
* sources for that pid * sources for that pid
* -measure list<KeyValue> 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 { public class Instance implements Serializable {
private List<KeyValue> measures;
private List<ControlledField> pid; private List<ControlledField> pid;
private List<ControlledField> alternateIdentifier; private List<ControlledField> alternateIdentifier;
@ -111,4 +114,12 @@ public class Instance implements Serializable {
public void setAlternateIdentifier(List<ControlledField> alternateIdentifier) { public void setAlternateIdentifier(List<ControlledField> alternateIdentifier) {
this.alternateIdentifier = alternateIdentifier; this.alternateIdentifier = alternateIdentifier;
} }
public List<KeyValue> getMeasures() {
return measures;
}
public void setMeasures(List<KeyValue> measures) {
this.measures = measures;
}
} }

View File

@ -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 * 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 * 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 * the record. It corresponds to lastupdatetimestamp of the resord represented in the internal model
* -measure list<KeyValue> to represent the measure of beepFinder. It corresponds to measures in the model *
*/ */
public class Result implements Serializable { public class Result implements Serializable {
private List<KeyValue> measures;
private List<Author> author; private List<Author> author;
@ -378,11 +378,5 @@ public class Result implements Serializable {
this.geolocation = geolocation; this.geolocation = geolocation;
} }
public List<KeyValue> getMeasures() {
return measures;
}
public void setMeasures(List<KeyValue> measures) {
this.measures = measures;
}
} }

View File

@ -37,6 +37,8 @@ public class Instance implements Serializable {
private Qualifier refereed; // peer-review status private Qualifier refereed; // peer-review status
private List<Measure> measures;
public Field<String> getLicense() { public Field<String> getLicense() {
return license; return license;
} }
@ -141,6 +143,14 @@ public class Instance implements Serializable {
this.refereed = refereed; this.refereed = refereed;
} }
public List<Measure> getMeasures() {
return measures;
}
public void setMeasures(List<Measure> measures) {
this.measures = measures;
}
public String toComparableString() { public String toComparableString() {
return String return String
.format( .format(

View File

@ -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":{ "articleprocessingcharge":{
"description": "The money spent to make this book or article available in Open Access. Source for this information is the OpenAPC initiative.", "description": "The money spent to make this book or article available in Open Access. Source for this information is the OpenAPC initiative.",
"type":"object", "type":"object",
@ -276,6 +289,24 @@
"license":{ "license":{
"type":"string" "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 for this instance, for example Bip!Finder ones"
}
},
"pid":{ "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)", "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", "type":"array",