Compare commits
1 Commits
master
...
size_geolo
Author | SHA1 | Date |
---|---|---|
Claudio Atzori | 71f52003d1 |
13
CHANGES.md
13
CHANGES.md
|
@ -4,15 +4,10 @@
|
|||
|
||||
| **Version** | **Changes** | **Readiness** |
|
||||
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
|
||||
| 9.0.0 | [Graph model] </br> <ul><li>added OafEntity.mergedIds</li><li>added Result.bestInstanceType</li></ul></br>[Solr model]</br> <ul><li>added Result.bestInstanceType</li><li>added RelatedRecord.description</li><li>added RelatedRecord.author[]</li></ul></br> | beta |
|
||||
| 8.0.1 | [Solr model] </br> <ul><li>using string to represent PersonTopic.(fromYear/toYear)</li></ul> | beta |
|
||||
| 8.0.0 | [Graph model] </br> <ul><li>Renamed `Result.author.affiliation` to `rawAffiliationString`. Updated Solr JSON payload model classes</li></ul> | beta |
|
||||
| 7.0.0 | [Graph model] </br> <ul><li>Introduced Person entity and its relations: authorship, coauthorship, affiliation</li><li>Updated Solr JSON payload model classes</li></ul> | production |
|
||||
| 6.1.3 | [Graph model] </br> <ul><li>Updated Solr JSON payload model classes</li></ul> | production |
|
||||
| 6.1.1 | [Graph model] </br> <ul><li>Introduced constants used in the DOIBoost dismission.</li></ul> | production |
|
||||
| 6.1.0 | [Graph model] </br> <ul><li>Introduced model classes to provide a JSON representation of records embedding information from the related entities.</li></ul> | production |
|
||||
| 5.17.3 | [Graph model] </br> <ul><li>added result level textual field to store the transformative agreement information.</li></ul> | production |
|
||||
| 4.17.3 | [Graph model] </br> <ul><li>moved context at the level of the entity. </li></ul> | production |
|
||||
| 6.1.1 | [Graph model] </br> <ul><li>Introduced constants used in the DOIBoost dismission.</li></ul> | beta |
|
||||
| 6.1.0 | [Graph model] </br> <ul><li>Introduced model classes to provide a JSON representation of records embedding information from the related entities.</li></ul> | beta |
|
||||
| 5.17.3 | [Graph model] </br> <ul><li>added result level textual field to store the transformative agreement information.</li></ul> | beta |
|
||||
| 4.17.3 | [Graph model] </br> <ul><li>moved context at the level of the entity. </li></ul> | beta |
|
||||
| 4.17.2 | [Graph model] </br> <ul><li>added InstaceTypeMapping field on the instance level.</li><li>new result level fields to support the activities in the Irish tender `isGreen`, `openAccessColor`, `isInDiamondJournal`, `publiclyFunded`</li><ul> | production |
|
||||
| 3.17.1 | [Graph model] </br> <ul><li>added fulltext field on the instance level.</li><li>added extra organization specific PID types</li><ul> | production |
|
||||
| 3.16.0 | [Graph model] </br> <ul><li>added entity level measures.</li><ul> | production |
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -5,7 +5,7 @@
|
|||
<groupId>eu.dnetlib.dhp</groupId>
|
||||
<artifactId>dhp-schemas</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>9.0.1-SNAPSHOT</version>
|
||||
<version>6.1.3-SNAPSHOT</version>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<connection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</connection>
|
||||
<developerConnection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</developerConnection>
|
||||
<url>https://code-repo.d4science.org/D-Net/dhp-schemas/</url>
|
||||
<tag>HEAD</tag>
|
||||
<tag>dhp-schemas-2.10.30</tag>
|
||||
</scm>
|
||||
|
||||
<description>This module contains common schema classes meant to be used across the dnet-hadoop submodules</description>
|
||||
|
|
|
@ -25,7 +25,7 @@ public class AtomicActionDeserializer<T extends Oaf> extends JsonDeserializer<At
|
|||
try {
|
||||
final Class<T> clazz = (Class<T>) Class.forName(classTag);
|
||||
final T oaf = mapper.readValue(payload.toString(), clazz);
|
||||
return new AtomicAction<>(clazz, oaf);
|
||||
return new AtomicAction(clazz, oaf);
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
|
||||
package eu.dnetlib.dhp.schema.common;
|
||||
|
||||
import eu.dnetlib.dhp.schema.oaf.OafEntity;
|
||||
|
||||
/** Actual entity types in the Graph */
|
||||
public enum EntityType {
|
||||
publication, dataset, otherresearchproduct, software, datasource, organization, project, person;
|
||||
publication, dataset, otherresearchproduct, software, datasource, organization, project;
|
||||
|
||||
/**
|
||||
* Resolves the EntityType, given the relative class name
|
||||
|
@ -12,7 +14,7 @@ public enum EntityType {
|
|||
* @param <T> actual OafEntity subclass
|
||||
* @return the EntityType associated to the given class
|
||||
*/
|
||||
public static <T> EntityType fromClass(Class<T> clazz) {
|
||||
public static <T extends OafEntity> EntityType fromClass(Class<T> clazz) {
|
||||
|
||||
return EntityType.valueOf(clazz.getSimpleName().toLowerCase());
|
||||
}
|
||||
|
|
|
@ -3,5 +3,5 @@ package eu.dnetlib.dhp.schema.common;
|
|||
|
||||
/** Main entity types in the Graph */
|
||||
public enum MainEntityType {
|
||||
result, datasource, organization, project, person
|
||||
result, datasource, organization, project
|
||||
}
|
||||
|
|
|
@ -190,23 +190,6 @@ public class ModelConstants {
|
|||
public static final String UNKNOWN = "UNKNOWN";
|
||||
public static final String NOT_AVAILABLE = "not available";
|
||||
|
||||
public static final String RESULT_PERSON_RELTYPE = "resultPerson"; // relType
|
||||
public static final String RESULT_PERSON_SUBRELTYPE = "authorship"; // subreltype
|
||||
public static final String RESULT_PERSON_HASAUTHORED = "hasAuthored"; // relclass
|
||||
|
||||
public static final String PERSON_PERSON_RELTYPE = "personPerson"; // relType
|
||||
public static final String PERSON_PERSON_SUBRELTYPE = "coAuthorship"; // subreltype
|
||||
public static final String PERSON_PERSON_HASCOAUTHORED = "hasCoAuthor"; // relclass
|
||||
|
||||
public static final String PROJECT_PERSON_RELTYPE = "projectPerson"; // relType
|
||||
public static final String PROJECT_PERSON_SUBRELTYPE = "participation"; // subreltype
|
||||
public static final String PROJECT_PERSON_PARTICIPATES = "participatesToProject"; // relclass
|
||||
|
||||
// author affiliations are intended to be characterised by a start and an end date
|
||||
public static final String ORG_PERSON_RELTYPE = "organizationPerson"; // relType
|
||||
public static final String ORG_PERSON_SUBRELTYPE = "affiliation"; // subreltype
|
||||
public static final String ORG_PERSON_PARTICIPATES = "isAffiliatedWith"; // relclass
|
||||
|
||||
public static final Qualifier PUBLICATION_DEFAULT_RESULTTYPE = qualifier(
|
||||
PUBLICATION_RESULTTYPE_CLASSID, PUBLICATION_RESULTTYPE_CLASSID,
|
||||
DNET_RESULT_TYPOLOGIES, DNET_RESULT_TYPOLOGIES);
|
||||
|
|
|
@ -36,7 +36,6 @@ public class ModelSupport {
|
|||
entityMapping.put(EntityType.datasource, MainEntityType.datasource);
|
||||
entityMapping.put(EntityType.organization, MainEntityType.organization);
|
||||
entityMapping.put(EntityType.project, MainEntityType.project);
|
||||
entityMapping.put(EntityType.person, MainEntityType.person);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,7 +51,6 @@ public class ModelSupport {
|
|||
entityTypes.put(EntityType.otherresearchproduct, OtherResearchProduct.class);
|
||||
entityTypes.put(EntityType.software, Software.class);
|
||||
entityTypes.put(EntityType.publication, Publication.class);
|
||||
entityTypes.put(EntityType.person, Person.class);
|
||||
}
|
||||
|
||||
public static final Map<String, Class> oafTypes = Maps.newHashMap();
|
||||
|
@ -66,7 +64,6 @@ public class ModelSupport {
|
|||
oafTypes.put("software", Software.class);
|
||||
oafTypes.put("publication", Publication.class);
|
||||
oafTypes.put("relation", Relation.class);
|
||||
oafTypes.put("person", Person.class);
|
||||
}
|
||||
|
||||
public static final Map<Class, String> idPrefixMap = Maps.newHashMap();
|
||||
|
@ -79,7 +76,6 @@ public class ModelSupport {
|
|||
idPrefixMap.put(OtherResearchProduct.class, "50");
|
||||
idPrefixMap.put(Software.class, "50");
|
||||
idPrefixMap.put(Publication.class, "50");
|
||||
idPrefixMap.put(Person.class, "30");
|
||||
}
|
||||
|
||||
public static final Map<String, String> entityIdPrefix = Maps.newHashMap();
|
||||
|
@ -89,7 +85,6 @@ public class ModelSupport {
|
|||
entityIdPrefix.put("organization", "20");
|
||||
entityIdPrefix.put("project", "40");
|
||||
entityIdPrefix.put("result", "50");
|
||||
entityIdPrefix.put("person", "30");
|
||||
}
|
||||
|
||||
public static final Map<String, String> idPrefixEntity = Maps.newHashMap();
|
||||
|
@ -97,7 +92,6 @@ public class ModelSupport {
|
|||
static {
|
||||
idPrefixEntity.put("10", "datasource");
|
||||
idPrefixEntity.put("20", "organization");
|
||||
idPrefixEntity.put("30", "person");
|
||||
idPrefixEntity.put("40", "project");
|
||||
idPrefixEntity.put("50", "result");
|
||||
}
|
||||
|
@ -212,7 +206,7 @@ public class ModelSupport {
|
|||
private ModelSupport() {
|
||||
}
|
||||
|
||||
public static <E> String getIdPrefix(Class<E> clazz) {
|
||||
public static <E extends OafEntity> String getIdPrefix(Class<E> clazz) {
|
||||
return idPrefixMap.get(clazz);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
|
||||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* This class models the access rights of research products.
|
||||
*/
|
||||
public class AccessRight extends Qualifier {
|
||||
|
||||
private static final long serialVersionUID = -8945177777173510134L;
|
||||
|
||||
private OpenAccessRoute openAccessRoute;
|
||||
|
||||
public OpenAccessRoute getOpenAccessRoute() {
|
||||
|
|
|
@ -7,7 +7,6 @@ import java.util.*;
|
|||
public class Author implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1625492739044457437L;
|
||||
|
||||
private String fullname;
|
||||
|
||||
private String name;
|
||||
|
@ -19,7 +18,7 @@ public class Author implements Serializable {
|
|||
|
||||
private List<StructuredProperty> pid;
|
||||
|
||||
private List<String> rawAffiliationString;
|
||||
private List<Field<String>> affiliation;
|
||||
|
||||
public String getFullname() {
|
||||
return fullname;
|
||||
|
@ -61,11 +60,12 @@ public class Author implements Serializable {
|
|||
this.pid = pid;
|
||||
}
|
||||
|
||||
public List<String> getRawAffiliationString() {
|
||||
return rawAffiliationString;
|
||||
public List<Field<String>> getAffiliation() {
|
||||
return affiliation;
|
||||
}
|
||||
|
||||
public void setRawAffiliationString(List<String> rawAffiliationString) {
|
||||
this.rawAffiliationString = rawAffiliationString;
|
||||
public void setAffiliation(List<Field<String>> affiliation) {
|
||||
this.affiliation = affiliation;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package eu.dnetlib.dhp.schema.oaf;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class Context implements Serializable {
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
public class DataInfo implements Serializable {
|
||||
|
||||
|
|
|
@ -9,12 +9,13 @@ import eu.dnetlib.dhp.schema.common.ModelConstants;
|
|||
public class Dataset extends Result implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 916526716184645549L;
|
||||
|
||||
private Field<String> storagedate;
|
||||
|
||||
// candidate for removal
|
||||
private Field<String> device;
|
||||
|
||||
private Field<String> size;
|
||||
private List<String> size;
|
||||
|
||||
private Field<String> version;
|
||||
|
||||
|
@ -44,11 +45,11 @@ public class Dataset extends Result implements Serializable {
|
|||
this.device = device;
|
||||
}
|
||||
|
||||
public Field<String> getSize() {
|
||||
public List<String> getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(Field<String> size) {
|
||||
public void setSize(List<String> size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* Describes a reference to the EOSC Interoperability Framework (IF) Guidelines
|
||||
|
|
|
@ -3,6 +3,7 @@ package eu.dnetlib.dhp.schema.oaf;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class ExternalReference implements Serializable {
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
public class ExtraInfo implements Serializable {
|
||||
|
||||
|
|
|
@ -3,37 +3,98 @@ package eu.dnetlib.dhp.schema.oaf;
|
|||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <geoLocation>
|
||||
* <geoLocationPlace>Atlantic Ocean</geoLocationPlace>
|
||||
* <geoLocationPoint>
|
||||
* <pointLongitude>-67.302</pointLongitude>
|
||||
* <pointLatitude>31.233</pointLatitude>
|
||||
* </geoLocationPoint>
|
||||
* <geoLocationBox>
|
||||
* <westBoundLongitude>-71.032</westBoundLongitude>
|
||||
* <eastBoundLongitude>-68.211</eastBoundLongitude>
|
||||
* <southBoundLatitude>41.090</southBoundLatitude>
|
||||
* <northBoundLatitude>42.893</northBoundLatitude>
|
||||
* </geoLocationBox>
|
||||
* <geoLocationPolygon>
|
||||
* <polygonPoint>
|
||||
* <pointLatitude>41.991</pointLatitude>
|
||||
* <pointLongitude>-71.032</pointLongitude>
|
||||
* </polygonPoint>
|
||||
* <polygonPoint>
|
||||
* <pointLatitude>42.893</pointLatitude>
|
||||
* <pointLongitude>-69.622</pointLongitude>
|
||||
* </polygonPoint>
|
||||
* <polygonPoint>
|
||||
* <pointLatitude>41.991</pointLatitude>
|
||||
* <pointLongitude>-68.211</pointLongitude>
|
||||
* </polygonPoint>
|
||||
* <polygonPoint>
|
||||
* <pointLatitude>41.090</pointLatitude>
|
||||
* <pointLongitude>-69.622</pointLongitude>
|
||||
* </polygonPoint>
|
||||
* <polygonPoint>
|
||||
* <pointLatitude>41.991</pointLatitude>
|
||||
* <pointLongitude>-71.032</pointLongitude>
|
||||
* </polygonPoint>
|
||||
* <inPolygonPoint>
|
||||
* <pointLatitude>41.991</pointLatitude>
|
||||
* <pointLongitude>-71.032</pointLongitude>
|
||||
* </inPolygonPoint>
|
||||
* </geoLocationPolygon>
|
||||
* </geoLocation>
|
||||
*/
|
||||
public class GeoLocation implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 8096534610208458404L;
|
||||
private String point;
|
||||
|
||||
private String box;
|
||||
private String geoLocationPlace;
|
||||
|
||||
private String place;
|
||||
private GeoLocationPoint geoLocationPoint;
|
||||
|
||||
public String getPoint() {
|
||||
return point;
|
||||
private GeoLocationBox geoLocationBox;
|
||||
|
||||
private GeoLocationPolygon geoLocationPolygon;
|
||||
|
||||
public GeoLocation() {
|
||||
}
|
||||
|
||||
public void setPoint(String point) {
|
||||
this.point = point;
|
||||
public GeoLocation(String geoLocationPlace, GeoLocationPoint geoLocationPoint, GeoLocationBox geoLocationBox, GeoLocationPolygon geoLocationPolygon) {
|
||||
this.geoLocationPlace = geoLocationPlace;
|
||||
this.geoLocationPoint = geoLocationPoint;
|
||||
this.geoLocationBox = geoLocationBox;
|
||||
this.geoLocationPolygon = geoLocationPolygon;
|
||||
}
|
||||
|
||||
public String getBox() {
|
||||
return box;
|
||||
public String getGeoLocationPlace() {
|
||||
return geoLocationPlace;
|
||||
}
|
||||
|
||||
public void setBox(String box) {
|
||||
this.box = box;
|
||||
public void setGeoLocationPlace(String geoLocationPlace) {
|
||||
this.geoLocationPlace = geoLocationPlace;
|
||||
}
|
||||
|
||||
public String getPlace() {
|
||||
return place;
|
||||
public GeoLocationPoint getGeoLocationPoint() {
|
||||
return geoLocationPoint;
|
||||
}
|
||||
|
||||
public void setPlace(String place) {
|
||||
this.place = place;
|
||||
public void setGeoLocationPoint(GeoLocationPoint geoLocationPoint) {
|
||||
this.geoLocationPoint = geoLocationPoint;
|
||||
}
|
||||
|
||||
public GeoLocationBox getGeoLocationBox() {
|
||||
return geoLocationBox;
|
||||
}
|
||||
|
||||
public void setGeoLocationBox(GeoLocationBox geoLocationBox) {
|
||||
this.geoLocationBox = geoLocationBox;
|
||||
}
|
||||
|
||||
public GeoLocationPolygon getGeoLocationPolygon() {
|
||||
return geoLocationPolygon;
|
||||
}
|
||||
|
||||
public void setGeoLocationPolygon(GeoLocationPolygon geoLocationPolygon) {
|
||||
this.geoLocationPolygon = geoLocationPolygon;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
/**
|
||||
* <geoLocationBox>
|
||||
* <westBoundLongitude>-71.032</westBoundLongitude>
|
||||
* <eastBoundLongitude>-68.211</eastBoundLongitude>
|
||||
* <southBoundLatitude>41.090</southBoundLatitude>
|
||||
* <northBoundLatitude>42.893</northBoundLatitude>
|
||||
* </geoLocationBox>
|
||||
*/
|
||||
public class GeoLocationBox {
|
||||
|
||||
private Double westBoundLongitude;
|
||||
|
||||
private Double eastBoundLongitude;
|
||||
|
||||
private Double southBoundLatitude;
|
||||
|
||||
private Double northBoundLatitude;
|
||||
|
||||
public GeoLocationBox() {
|
||||
}
|
||||
|
||||
public GeoLocationBox(Double westBoundLongitude, Double eastBoundLongitude, Double southBoundLatitude, Double northBoundLatitude) {
|
||||
this.westBoundLongitude = westBoundLongitude;
|
||||
this.eastBoundLongitude = eastBoundLongitude;
|
||||
this.southBoundLatitude = southBoundLatitude;
|
||||
this.northBoundLatitude = northBoundLatitude;
|
||||
}
|
||||
|
||||
public Double getWestBoundLongitude() {
|
||||
return westBoundLongitude;
|
||||
}
|
||||
|
||||
public void setWestBoundLongitude(Double westBoundLongitude) {
|
||||
this.westBoundLongitude = westBoundLongitude;
|
||||
}
|
||||
|
||||
public Double getEastBoundLongitude() {
|
||||
return eastBoundLongitude;
|
||||
}
|
||||
|
||||
public void setEastBoundLongitude(Double eastBoundLongitude) {
|
||||
this.eastBoundLongitude = eastBoundLongitude;
|
||||
}
|
||||
|
||||
public Double getSouthBoundLatitude() {
|
||||
return southBoundLatitude;
|
||||
}
|
||||
|
||||
public void setSouthBoundLatitude(Double southBoundLatitude) {
|
||||
this.southBoundLatitude = southBoundLatitude;
|
||||
}
|
||||
|
||||
public Double getNorthBoundLatitude() {
|
||||
return northBoundLatitude;
|
||||
}
|
||||
|
||||
public void setNorthBoundLatitude(Double northBoundLatitude) {
|
||||
this.northBoundLatitude = northBoundLatitude;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
/**
|
||||
*
|
||||
* <geoLocationPoint>
|
||||
* <pointLongitude>-67.302</pointLongitude>
|
||||
* <pointLatitude>31.233</pointLatitude>
|
||||
* </geoLocationPoint>
|
||||
*/
|
||||
public class GeoLocationPoint {
|
||||
|
||||
private Double pointLongitude;
|
||||
|
||||
private Double pointLatitude;
|
||||
|
||||
public GeoLocationPoint() {
|
||||
}
|
||||
|
||||
public GeoLocationPoint(Double pointLongitude, Double pointLatitude) {
|
||||
this.pointLongitude = pointLongitude;
|
||||
this.pointLatitude = pointLatitude;
|
||||
}
|
||||
|
||||
public Double getPointLongitude() {
|
||||
return pointLongitude;
|
||||
}
|
||||
|
||||
public void setPointLongitude(Double pointLongitude) {
|
||||
this.pointLongitude = pointLongitude;
|
||||
}
|
||||
|
||||
public Double getPointLatitude() {
|
||||
return pointLatitude;
|
||||
}
|
||||
|
||||
public void setPointLatitude(Double pointLatitude) {
|
||||
this.pointLatitude = pointLatitude;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <geoLocationPolygon>
|
||||
* <polygonPoint>
|
||||
* <pointLatitude>41.991</pointLatitude>
|
||||
* <pointLongitude>-71.032</pointLongitude>
|
||||
* </polygonPoint>
|
||||
* <polygonPoint>
|
||||
* <pointLatitude>42.893</pointLatitude>
|
||||
* <pointLongitude>-69.622</pointLongitude>
|
||||
* </polygonPoint>
|
||||
* <polygonPoint>
|
||||
* <pointLatitude>41.991</pointLatitude>
|
||||
* <pointLongitude>-68.211</pointLongitude>
|
||||
* </polygonPoint>
|
||||
* <polygonPoint>
|
||||
* <pointLatitude>41.090</pointLatitude>
|
||||
* <pointLongitude>-69.622</pointLongitude>
|
||||
* </polygonPoint>
|
||||
* <polygonPoint>
|
||||
* <pointLatitude>41.991</pointLatitude>
|
||||
* <pointLongitude>-71.032</pointLongitude>
|
||||
* </polygonPoint>
|
||||
* </geoLocationPolygon>
|
||||
*/
|
||||
public class GeoLocationPolygon {
|
||||
|
||||
private List<GeoLocationPoint> polygonPint;
|
||||
|
||||
private GeoLocationPoint inPolygonPoint;
|
||||
|
||||
public GeoLocationPolygon() {
|
||||
}
|
||||
|
||||
public GeoLocationPolygon(List<GeoLocationPoint> polygonPint, GeoLocationPoint inPolygonPoint) {
|
||||
this.polygonPint = polygonPint;
|
||||
this.inPolygonPoint = inPolygonPoint;
|
||||
}
|
||||
|
||||
public List<GeoLocationPoint> getPolygonPint() {
|
||||
return polygonPint;
|
||||
}
|
||||
|
||||
public void setPolygonPint(List<GeoLocationPoint> polygonPint) {
|
||||
this.polygonPint = polygonPint;
|
||||
}
|
||||
|
||||
public GeoLocationPoint getInPolygonPoint() {
|
||||
return inPolygonPoint;
|
||||
}
|
||||
|
||||
public void setInPolygonPoint(GeoLocationPoint inPolygonPoint) {
|
||||
this.inPolygonPoint = inPolygonPoint;
|
||||
}
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* To store information about the classification for the project. The classification depends on the programme. For example
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* To store information about the ec programme for the project. It has the following parameters:
|
||||
|
|
|
@ -3,6 +3,9 @@ package eu.dnetlib.dhp.schema.oaf;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
|
||||
public class Instance implements Serializable {
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
public class Journal implements Serializable {
|
||||
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.google.common.base.Joiner;
|
||||
|
||||
public class KeyValue implements Serializable {
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ package eu.dnetlib.dhp.schema.oaf;
|
|||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
/**
|
||||
* Represent a measure, must be further described by a system available resource providing name and descriptions.
|
||||
*/
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
public class OAIProvenance implements Serializable {
|
||||
|
||||
|
|
|
@ -2,7 +2,12 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public abstract class Oaf implements Serializable {
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package eu.dnetlib.dhp.schema.oaf;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public abstract class OafEntity extends Oaf implements Serializable {
|
||||
|
||||
|
@ -10,11 +11,6 @@ public abstract class OafEntity extends Oaf implements Serializable {
|
|||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* MergedIds contains the list of the OpenAIRE IDs of the records merged into this one.
|
||||
*/
|
||||
private List<String> mergedIds;
|
||||
|
||||
private List<String> originalId;
|
||||
|
||||
private List<StructuredProperty> pid;
|
||||
|
@ -85,14 +81,6 @@ public abstract class OafEntity extends Oaf implements Serializable {
|
|||
return originalId;
|
||||
}
|
||||
|
||||
public List<String> getMergedIds() {
|
||||
return mergedIds;
|
||||
}
|
||||
|
||||
public void setMergedIds(List<String> mergedIds) {
|
||||
this.mergedIds = mergedIds;
|
||||
}
|
||||
|
||||
public void setOriginalId(List<String> originalId) {
|
||||
this.originalId = originalId;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.List;
|
|||
|
||||
public class Organization extends OafEntity implements Serializable {
|
||||
|
||||
public enum OrganizationType {
|
||||
enum OrganizationType {
|
||||
Archive, Company, Education, Facility, Government, Healthcare, Nonprofit, Other, Unknown
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
public class OriginDescription implements Serializable {
|
||||
|
||||
|
|
|
@ -1,72 +0,0 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class Person extends OafEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -2366333710489222265L;
|
||||
|
||||
private String givenName;
|
||||
|
||||
private String familyName;
|
||||
|
||||
private List<String> alternativeNames;
|
||||
|
||||
private String biography;
|
||||
|
||||
private List<PersonTopic> subject;
|
||||
|
||||
private Boolean consent;
|
||||
|
||||
public Person() {
|
||||
}
|
||||
|
||||
public String getGivenName() {
|
||||
return givenName;
|
||||
}
|
||||
|
||||
public void setGivenName(String givenName) {
|
||||
this.givenName = givenName;
|
||||
}
|
||||
|
||||
public String getFamilyName() {
|
||||
return familyName;
|
||||
}
|
||||
|
||||
public void setFamilyName(String familyName) {
|
||||
this.familyName = familyName;
|
||||
}
|
||||
|
||||
public List<String> getAlternativeNames() {
|
||||
return alternativeNames;
|
||||
}
|
||||
|
||||
public void setAlternativeNames(List<String> alternativeNames) {
|
||||
this.alternativeNames = alternativeNames;
|
||||
}
|
||||
|
||||
public String getBiography() {
|
||||
return biography;
|
||||
}
|
||||
|
||||
public void setBiography(String biography) {
|
||||
this.biography = biography;
|
||||
}
|
||||
|
||||
public List<PersonTopic> getSubject() {
|
||||
return subject;
|
||||
}
|
||||
|
||||
public void setSubject(List<PersonTopic> subject) {
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
public Boolean getConsent() {
|
||||
return consent;
|
||||
}
|
||||
|
||||
public void setConsent(Boolean consent) {
|
||||
this.consent = consent;
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class PersonTopic implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 102011326860637199L;
|
||||
|
||||
private String value;
|
||||
|
||||
private String schema;
|
||||
|
||||
private String fromYear;
|
||||
|
||||
private String toYear;
|
||||
|
||||
public PersonTopic() {
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getSchema() {
|
||||
return schema;
|
||||
}
|
||||
|
||||
public void setSchema(String schema) {
|
||||
this.schema = schema;
|
||||
}
|
||||
|
||||
public String getFromYear() {
|
||||
return fromYear;
|
||||
}
|
||||
|
||||
public void setFromYear(String fromYear) {
|
||||
this.fromYear = fromYear;
|
||||
}
|
||||
|
||||
public String getToYear() {
|
||||
return toYear;
|
||||
}
|
||||
|
||||
public void setToYear(String toYear) {
|
||||
this.toYear = toYear;
|
||||
}
|
||||
}
|
|
@ -4,6 +4,8 @@ package eu.dnetlib.dhp.schema.oaf;
|
|||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class Project extends OafEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 5783959097903529424L;
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
|
||||
public class Qualifier implements Serializable {
|
||||
private static final long serialVersionUID = 6632548656644563076L;
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
|
||||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import eu.dnetlib.dhp.schema.common.ModelSupport;
|
||||
|
||||
/**
|
||||
* Relation models any edge between two nodes in the OpenAIRE graph. It has a source id and a target id pointing to
|
||||
* graph node identifiers and it is further characterised by the semantic of the link through the fields relType,
|
||||
|
|
|
@ -125,11 +125,6 @@ public class Result extends OafEntity implements Serializable {
|
|||
*/
|
||||
private List<ExternalReference> externalReference;
|
||||
|
||||
/**
|
||||
* The most representative instanceType among the instances.
|
||||
*/
|
||||
private Qualifier bestInstancetype;
|
||||
|
||||
/**
|
||||
* The Instance.
|
||||
*/
|
||||
|
@ -526,14 +521,6 @@ public class Result extends OafEntity implements Serializable {
|
|||
this.externalReference = externalReference;
|
||||
}
|
||||
|
||||
public Qualifier getBestInstancetype() {
|
||||
return bestInstancetype;
|
||||
}
|
||||
|
||||
public void setBestInstancetype(Qualifier bestInstancetype) {
|
||||
this.bestInstancetype = bestInstancetype;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets instance.
|
||||
*
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
package eu.dnetlib.dhp.schema.oaf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class StructuredProperty implements Serializable {
|
||||
|
||||
|
|
|
@ -10,34 +10,23 @@ public class AccessRight implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 7995566912611238604L;
|
||||
|
||||
private String code;
|
||||
|
||||
private String label;
|
||||
private String value;
|
||||
|
||||
private OpenAccessRoute openAccessRoute;
|
||||
|
||||
public static AccessRight newInstance(String code, String label, OpenAccessRoute openAccessRoute) {
|
||||
public static AccessRight newInstance(String value, OpenAccessRoute openAccessRoute) {
|
||||
AccessRight accessRight = new AccessRight();
|
||||
accessRight.setCode(code);
|
||||
accessRight.setLabel(label);
|
||||
accessRight.setValue(value);
|
||||
accessRight.setOpenAccessRoute(openAccessRoute);
|
||||
return accessRight;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public OpenAccessRoute getOpenAccessRoute() {
|
||||
|
|
|
@ -1,100 +0,0 @@
|
|||
|
||||
package eu.dnetlib.dhp.schema.solr;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class ExternalReference implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 781487309068059180L;
|
||||
|
||||
// source
|
||||
private String sitename;
|
||||
|
||||
// title
|
||||
private String label;
|
||||
|
||||
// alternative labels
|
||||
private List<String> alternateLabel;
|
||||
|
||||
// text()
|
||||
private String url;
|
||||
|
||||
// type
|
||||
private CodeLabel qualifier;
|
||||
|
||||
// site internal identifier
|
||||
private String refidentifier;
|
||||
|
||||
// maps the oaf:reference/@query attribute
|
||||
private String query;
|
||||
|
||||
public static ExternalReference newInstance(String sitename, String label, List<String> alternateLabel, String url, CodeLabel qualifier, String refidentifier, String query) {
|
||||
final ExternalReference e = new ExternalReference();
|
||||
e.setSitename(sitename);
|
||||
e.setLabel(label);
|
||||
e.setAlternateLabel(alternateLabel);
|
||||
e.setUrl(url);
|
||||
e.setQualifier(qualifier);
|
||||
e.setRefidentifier(refidentifier);
|
||||
e.setQuery(query);
|
||||
return e;
|
||||
}
|
||||
|
||||
public String getSitename() {
|
||||
return sitename;
|
||||
}
|
||||
|
||||
public void setSitename(String sitename) {
|
||||
this.sitename = sitename;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public List<String> getAlternateLabel() {
|
||||
return alternateLabel;
|
||||
}
|
||||
|
||||
public void setAlternateLabel(List<String> alternateLabel) {
|
||||
this.alternateLabel = alternateLabel;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public CodeLabel getQualifier() {
|
||||
return qualifier;
|
||||
}
|
||||
|
||||
public void setQualifier(CodeLabel qualifier) {
|
||||
this.qualifier = qualifier;
|
||||
}
|
||||
|
||||
public String getRefidentifier() {
|
||||
return refidentifier;
|
||||
}
|
||||
|
||||
public void setRefidentifier(String refidentifier) {
|
||||
this.refidentifier = refidentifier;
|
||||
}
|
||||
|
||||
public String getQuery() {
|
||||
return query;
|
||||
}
|
||||
|
||||
public void setQuery(String query) {
|
||||
this.query = query;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package eu.dnetlib.dhp.schema.solr;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ExtraInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -6627854860189757709L;
|
||||
|
||||
//TODO define me!
|
||||
}
|
|
@ -1,36 +1,10 @@
|
|||
package eu.dnetlib.dhp.schema.solr;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class Measure implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 57939927121851504L;
|
||||
|
||||
private String id;
|
||||
|
||||
private List<CodeLabel> unit;
|
||||
|
||||
public static Measure newInstance(String id, List<CodeLabel> unit) {
|
||||
Measure m = new Measure();
|
||||
m.setId(id);
|
||||
m.setUnit(unit);
|
||||
return m;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public List<CodeLabel> getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setUnit(List<CodeLabel> unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
//TODO define me!
|
||||
}
|
||||
|
|
|
@ -1,113 +0,0 @@
|
|||
package eu.dnetlib.dhp.schema.solr;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class Person implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3923041787040187202L;
|
||||
|
||||
private String givenName;
|
||||
|
||||
private String familyName;
|
||||
|
||||
private List<String> alternativeNames;
|
||||
|
||||
private String biography;
|
||||
|
||||
private List<PersonTopic> subject;
|
||||
|
||||
/**
|
||||
* The Measures.
|
||||
*/
|
||||
private List<Measure> indicator;
|
||||
|
||||
/**
|
||||
* The Context.
|
||||
*/
|
||||
private List<Context> context;
|
||||
|
||||
private Boolean consent;
|
||||
|
||||
public static Person newInstance(String givenName, String familyName, List<String> alternativeNames, String biography, List<PersonTopic> subject, List<Measure> indicator, List<Context> context, Boolean consent) {
|
||||
final Person p = new Person();
|
||||
|
||||
p.setGivenName(givenName);
|
||||
p.setFamilyName(familyName);
|
||||
p.setAlternativeNames(alternativeNames);
|
||||
p.setBiography(biography);
|
||||
p.setSubject(subject);
|
||||
p.setIndicator(indicator);
|
||||
p.setContext(context);
|
||||
p.setConsent(consent);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
public Person() {
|
||||
}
|
||||
|
||||
public String getGivenName() {
|
||||
return givenName;
|
||||
}
|
||||
|
||||
public void setGivenName(String givenName) {
|
||||
this.givenName = givenName;
|
||||
}
|
||||
|
||||
public String getFamilyName() {
|
||||
return familyName;
|
||||
}
|
||||
|
||||
public void setFamilyName(String familyName) {
|
||||
this.familyName = familyName;
|
||||
}
|
||||
|
||||
public List<String> getAlternativeNames() {
|
||||
return alternativeNames;
|
||||
}
|
||||
|
||||
public void setAlternativeNames(List<String> alternativeNames) {
|
||||
this.alternativeNames = alternativeNames;
|
||||
}
|
||||
|
||||
public String getBiography() {
|
||||
return biography;
|
||||
}
|
||||
|
||||
public void setBiography(String biography) {
|
||||
this.biography = biography;
|
||||
}
|
||||
|
||||
public List<PersonTopic> getSubject() {
|
||||
return subject;
|
||||
}
|
||||
|
||||
public void setSubject(List<PersonTopic> subject) {
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
public List<Measure> getIndicator() {
|
||||
return indicator;
|
||||
}
|
||||
|
||||
public void setIndicator(List<Measure> indicator) {
|
||||
this.indicator = indicator;
|
||||
}
|
||||
|
||||
public List<Context> getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public void setContext(List<Context> context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public Boolean getConsent() {
|
||||
return consent;
|
||||
}
|
||||
|
||||
public void setConsent(Boolean consent) {
|
||||
this.consent = consent;
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
package eu.dnetlib.dhp.schema.solr;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Year;
|
||||
|
||||
public class PersonTopic implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 6866697695308782412L;
|
||||
|
||||
private String value;
|
||||
|
||||
private String schema;
|
||||
|
||||
private String fromYear;
|
||||
|
||||
private String toYear;
|
||||
|
||||
public static PersonTopic newInstance(String value, String schema, String fromYear, String toYear) {
|
||||
final PersonTopic personTopic = new PersonTopic();
|
||||
personTopic.setValue(value);
|
||||
personTopic.setSchema(schema);
|
||||
personTopic.setFromYear(fromYear);
|
||||
personTopic.setToYear(toYear);
|
||||
return personTopic;
|
||||
}
|
||||
|
||||
public PersonTopic() {
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getSchema() {
|
||||
return schema;
|
||||
}
|
||||
|
||||
public void setSchema(String schema) {
|
||||
this.schema = schema;
|
||||
}
|
||||
|
||||
public String getFromYear() {
|
||||
return fromYear;
|
||||
}
|
||||
|
||||
public void setFromYear(String fromYear) {
|
||||
this.fromYear = fromYear;
|
||||
}
|
||||
|
||||
public String getToYear() {
|
||||
return toYear;
|
||||
}
|
||||
|
||||
public void setToYear(String toYear) {
|
||||
this.toYear = toYear;
|
||||
}
|
||||
}
|
|
@ -6,20 +6,25 @@ public class Pid implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = -943684282582228545L;
|
||||
|
||||
private String type;
|
||||
|
||||
private String value;
|
||||
|
||||
private String typeCode;
|
||||
|
||||
private String typeLabel;
|
||||
|
||||
public static Pid newInstance(String value, String typeCode, String typeLabel) {
|
||||
public static Pid newInstance(String type, String value) {
|
||||
Pid p = new Pid();
|
||||
p.setType(type);
|
||||
p.setValue(value);
|
||||
p.setTypeCode(typeCode);
|
||||
p.setTypeLabel(typeLabel);
|
||||
return p;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
@ -27,20 +32,4 @@ public class Pid implements Serializable {
|
|||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getTypeCode() {
|
||||
return typeCode;
|
||||
}
|
||||
|
||||
public void setTypeCode(String typeCode) {
|
||||
this.typeCode = typeCode;
|
||||
}
|
||||
|
||||
public String getTypeLabel() {
|
||||
return typeLabel;
|
||||
}
|
||||
|
||||
public void setTypeLabel(String typeLabel) {
|
||||
this.typeLabel = typeLabel;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,26 +1,14 @@
|
|||
package eu.dnetlib.dhp.schema.solr;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
public enum RecordType implements Serializable {
|
||||
publication,
|
||||
dataset,
|
||||
other,
|
||||
otherresearchproduct,
|
||||
software,
|
||||
datasource,
|
||||
organization,
|
||||
project,
|
||||
person;
|
||||
|
||||
public static RecordType fromString(String s) {
|
||||
if (Objects.isNull(s)) {
|
||||
return null;
|
||||
}
|
||||
if ("otherresearchproduct".equalsIgnoreCase(s)) {
|
||||
return other;
|
||||
}
|
||||
return valueOf(s);
|
||||
}
|
||||
project;
|
||||
|
||||
}
|
||||
|
|
|
@ -14,8 +14,6 @@ public class RelatedRecord implements Serializable {
|
|||
private String websiteurl; // datasource, organizations, projects
|
||||
|
||||
// results
|
||||
private List<String> author;
|
||||
private String description;
|
||||
private String dateofacceptance;
|
||||
private String publisher;
|
||||
private List<Pid> pid;
|
||||
|
@ -41,7 +39,6 @@ public class RelatedRecord implements Serializable {
|
|||
private String acronym;
|
||||
private CodeLabel contracttype;
|
||||
private Funding funding;
|
||||
private String validationDate;
|
||||
|
||||
public RelatedRecordHeader getHeader() {
|
||||
return header;
|
||||
|
@ -59,22 +56,6 @@ public class RelatedRecord implements Serializable {
|
|||
this.title = title;
|
||||
}
|
||||
|
||||
public List<String> getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public void setAuthor(List<String> author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getWebsiteurl() {
|
||||
return websiteurl;
|
||||
}
|
||||
|
@ -234,12 +215,4 @@ public class RelatedRecord implements Serializable {
|
|||
public void setFunding(Funding funding) {
|
||||
this.funding = funding;
|
||||
}
|
||||
|
||||
public String getValidationDate() {
|
||||
return validationDate;
|
||||
}
|
||||
|
||||
public void setValidationDate(String validationDate) {
|
||||
this.validationDate = validationDate;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,18 +14,12 @@ public class RelatedRecordHeader implements Serializable {
|
|||
|
||||
private RecordType relatedRecordType;
|
||||
|
||||
private String relationProvenance;
|
||||
|
||||
private String trust;
|
||||
|
||||
public static RelatedRecordHeader newInstance(String relationType, String relationClass, String relatedIdentifier, RecordType relatedRecordType, String relationProvenance, String trust) {
|
||||
public static RelatedRecordHeader newInstance(String relationType, String relationClass, String relatedIdentifier, RecordType relatedRecordType) {
|
||||
RelatedRecordHeader header = new RelatedRecordHeader();
|
||||
header.setRelationType(relationType);
|
||||
header.setRelationClass(relationClass);
|
||||
header.setRelatedIdentifier(relatedIdentifier);
|
||||
header.setRelatedRecordType(relatedRecordType);
|
||||
header.setRelationProvenance(relationProvenance);
|
||||
header.setTrust(trust);
|
||||
return header;
|
||||
}
|
||||
|
||||
|
@ -60,20 +54,4 @@ public class RelatedRecordHeader implements Serializable {
|
|||
public void setRelatedRecordType(RecordType relatedRecordType) {
|
||||
this.relatedRecordType = relatedRecordType;
|
||||
}
|
||||
|
||||
public String getRelationProvenance() {
|
||||
return relationProvenance;
|
||||
}
|
||||
|
||||
public void setRelationProvenance(String relationProvenance) {
|
||||
this.relationProvenance = relationProvenance;
|
||||
}
|
||||
|
||||
public String getTrust() {
|
||||
return trust;
|
||||
}
|
||||
|
||||
public void setTrust(String trust) {
|
||||
this.trust = trust;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,15 +3,15 @@ package eu.dnetlib.dhp.schema.solr;
|
|||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class Result implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -9121038426985022737L;
|
||||
|
||||
/**
|
||||
* Type of the result: one of 'publication', 'dataset', 'software', 'other' (see also https://api.openaire.eu/vocabularies/dnet:result_typologies)
|
||||
* This field is deprecated. See eu.dnetlib.dhp.schema.solr.SolrRecordHeader.RecordType
|
||||
*/
|
||||
@Deprecated
|
||||
private String resulttype;
|
||||
|
||||
/**
|
||||
|
@ -147,36 +147,28 @@ public class Result implements Serializable {
|
|||
*/
|
||||
private List<EoscIfGuidelines> eoscifguidelines;
|
||||
|
||||
@JsonProperty("isGreen")
|
||||
private Boolean isGreen;
|
||||
|
||||
private OpenAccessColor openAccessColor;
|
||||
|
||||
@JsonProperty("isInDiamondJournal")
|
||||
private Boolean isInDiamondJournal;
|
||||
|
||||
private Boolean publiclyFunded;
|
||||
|
||||
private String transformativeAgreement;
|
||||
|
||||
private List<ExternalReference> externalReference;
|
||||
|
||||
private String bestinstancetype;
|
||||
|
||||
/**
|
||||
* Each instance is one specific materialisation or version of the result. For example, you can have one result with
|
||||
* three instance: one is the pre-print, one is the post-print, one is te published version
|
||||
*/
|
||||
private List<Instance> instance;
|
||||
|
||||
/**
|
||||
* This field is deprecated. See eu.dnetlib.dhp.schema.solr.SolrRecordHeader.RecordType
|
||||
* @return resulttype
|
||||
*/
|
||||
@Deprecated
|
||||
public String getResulttype() {
|
||||
return resulttype;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setResulttype(String resulttype) {
|
||||
this.resulttype = resulttype;
|
||||
}
|
||||
|
@ -389,11 +381,11 @@ public class Result implements Serializable {
|
|||
this.eoscifguidelines = eoscifguidelines;
|
||||
}
|
||||
|
||||
public Boolean getIsGreen() {
|
||||
public Boolean getGreen() {
|
||||
return isGreen;
|
||||
}
|
||||
|
||||
public void setIsGreen(Boolean green) {
|
||||
public void setGreen(Boolean green) {
|
||||
isGreen = green;
|
||||
}
|
||||
|
||||
|
@ -405,11 +397,11 @@ public class Result implements Serializable {
|
|||
this.openAccessColor = openAccessColor;
|
||||
}
|
||||
|
||||
public Boolean getIsInDiamondJournal() {
|
||||
public Boolean getInDiamondJournal() {
|
||||
return isInDiamondJournal;
|
||||
}
|
||||
|
||||
public void setIsInDiamondJournal(Boolean inDiamondJournal) {
|
||||
public void setInDiamondJournal(Boolean inDiamondJournal) {
|
||||
isInDiamondJournal = inDiamondJournal;
|
||||
}
|
||||
|
||||
|
@ -429,22 +421,6 @@ public class Result implements Serializable {
|
|||
this.transformativeAgreement = transformativeAgreement;
|
||||
}
|
||||
|
||||
public List<ExternalReference> getExternalReference() {
|
||||
return externalReference;
|
||||
}
|
||||
|
||||
public void setExternalReference(List<ExternalReference> externalReference) {
|
||||
this.externalReference = externalReference;
|
||||
}
|
||||
|
||||
public String getBestinstancetype() {
|
||||
return bestinstancetype;
|
||||
}
|
||||
|
||||
public void setBestinstancetype(String bestinstancetype) {
|
||||
this.bestinstancetype = bestinstancetype;
|
||||
}
|
||||
|
||||
public List<Instance> getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ public class SolrRecord implements Serializable {
|
|||
|
||||
private List<Measure> measures;
|
||||
|
||||
private List<ExtraInfo> extraInfo;
|
||||
|
||||
private Result result;
|
||||
|
||||
private Datasource datasource;
|
||||
|
@ -28,8 +30,6 @@ public class SolrRecord implements Serializable {
|
|||
|
||||
private Organization organization;
|
||||
|
||||
private Person person;
|
||||
|
||||
private List<RelatedRecord> links;
|
||||
|
||||
public SolrRecordHeader getHeader() {
|
||||
|
@ -72,6 +72,14 @@ public class SolrRecord implements Serializable {
|
|||
this.measures = measures;
|
||||
}
|
||||
|
||||
public List<ExtraInfo> getExtraInfo() {
|
||||
return extraInfo;
|
||||
}
|
||||
|
||||
public void setExtraInfo(List<ExtraInfo> extraInfo) {
|
||||
this.extraInfo = extraInfo;
|
||||
}
|
||||
|
||||
public Result getResult() {
|
||||
return result;
|
||||
}
|
||||
|
@ -104,14 +112,6 @@ public class SolrRecord implements Serializable {
|
|||
this.organization = organization;
|
||||
}
|
||||
|
||||
public Person getPerson() {
|
||||
return person;
|
||||
}
|
||||
|
||||
public void setPerson(Person person) {
|
||||
this.person = person;
|
||||
}
|
||||
|
||||
public List<RelatedRecord> getLinks() {
|
||||
return links;
|
||||
}
|
||||
|
|
|
@ -7,8 +7,6 @@ public class SolrRecordHeader implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = -6052397109220149426L;
|
||||
|
||||
public enum Status { UNDER_CURATION }
|
||||
|
||||
/**
|
||||
* The OpenAIRE identifiers for this record
|
||||
*/
|
||||
|
@ -21,20 +19,13 @@ public class SolrRecordHeader implements Serializable {
|
|||
|
||||
private RecordType recordType;
|
||||
|
||||
private Status status = null;
|
||||
|
||||
private Boolean deletedbyinference;
|
||||
|
||||
public static SolrRecordHeader newInstance(String id, List<String> originalId, RecordType recordType, Boolean deletedbyinference) {
|
||||
return newInstance(id, originalId, recordType, null, deletedbyinference);
|
||||
}
|
||||
|
||||
public static SolrRecordHeader newInstance(String id, List<String> originalId, RecordType recordType, Status status, Boolean deletedbyinference) {
|
||||
SolrRecordHeader header = new SolrRecordHeader();
|
||||
header.setId(id);
|
||||
header.setOriginalId(originalId);
|
||||
header.setRecordType(recordType);
|
||||
header.setStatus(status);
|
||||
header.setDeletedbyinference(deletedbyinference);
|
||||
return header;
|
||||
}
|
||||
|
@ -67,14 +58,6 @@ public class SolrRecordHeader implements Serializable {
|
|||
return deletedbyinference;
|
||||
}
|
||||
|
||||
public Status getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Status status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public void setDeletedbyinference(Boolean deletedbyinference) {
|
||||
this.deletedbyinference = deletedbyinference;
|
||||
}
|
||||
|
|
|
@ -8,15 +8,12 @@ public class Subject implements Serializable {
|
|||
|
||||
private String value;
|
||||
|
||||
private String typeCode;
|
||||
private String type;
|
||||
|
||||
private String typeLabel;
|
||||
|
||||
public static Subject newInstance(String value, String typeCode, String typeLabel) {
|
||||
public static Subject newInstance(String value, String type) {
|
||||
Subject s = new Subject();
|
||||
s.setValue(value);
|
||||
s.setTypeCode(typeCode);
|
||||
s.setTypeLabel(typeLabel);
|
||||
s.setType(type);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
@ -28,19 +25,11 @@ public class Subject implements Serializable {
|
|||
this.value = value;
|
||||
}
|
||||
|
||||
public String getTypeCode() {
|
||||
return typeCode;
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setTypeCode(String typeCode) {
|
||||
this.typeCode = typeCode;
|
||||
}
|
||||
|
||||
public String getTypeLabel() {
|
||||
return typeLabel;
|
||||
}
|
||||
|
||||
public void setTypeLabel(String typeLabel) {
|
||||
this.typeLabel = typeLabel;
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
package eu.dnetlib.dhp.schema.solr;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
public class TestJsonSerialization {
|
||||
|
||||
private static ObjectMapper MAPPER = new ObjectMapper();
|
||||
|
||||
@Test
|
||||
void testSerialiseJsonPayload() throws IOException {
|
||||
Result r = new Result();
|
||||
|
||||
r.setIsGreen(true);
|
||||
r.setIsInDiamondJournal(false);
|
||||
|
||||
final String json = MAPPER.writeValueAsString(r);
|
||||
|
||||
assertNotNull(json);
|
||||
|
||||
System.out.println("json = " + json);
|
||||
|
||||
Result r1 = MAPPER.readValue(json, Result.class);
|
||||
|
||||
assertTrue(r1.getIsGreen());
|
||||
assertFalse(r1.getIsInDiamondJournal());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue