Compare commits
20 Commits
doidoost_d
...
master
Author | SHA1 | Date |
---|---|---|
|
c46c235c83 | |
|
ca02fc29b3 | |
|
8658cf9a01 | |
|
ae5337f266 | |
|
39fa75ae3f | |
|
b03a9f497d | |
|
642f535498 | |
|
eb7dcf6f11 | |
|
2dc10b8afe | |
|
9eaad49a2e | |
|
055afdc5fc | |
|
cf3135ac5a | |
|
2502d512d1 | |
|
3531ac7f66 | |
|
f422a58b95 | |
|
97df2e3c48 | |
|
4a7e960409 | |
|
a835c8db1e | |
|
2a4b84af79 | |
|
2324536a61 |
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
| **Version** | **Changes** | **Readiness** |
|
| **Version** | **Changes** | **Readiness** |
|
||||||
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
|
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
|
||||||
|
| 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 |
|
| 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 |
|
| 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.3 | [Graph model] </br> <ul><li>moved context at the level of the entity. </li></ul> | beta |
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -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>6.1.1-SNAPSHOT</version>
|
<version>6.1.3-SNAPSHOT</version>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class models the access rights of research products.
|
* This class models the access rights of research products.
|
||||||
*/
|
*/
|
||||||
public class AccessRight extends Qualifier {
|
public class AccessRight extends Qualifier {
|
||||||
|
|
||||||
private static final long serialVersionUID = -8945177777173510134L;
|
private static final long serialVersionUID = -8945177777173510134L;
|
||||||
|
|
||||||
private OpenAccessRoute openAccessRoute;
|
private OpenAccessRoute openAccessRoute;
|
||||||
|
|
||||||
public OpenAccessRoute getOpenAccessRoute() {
|
public OpenAccessRoute getOpenAccessRoute() {
|
||||||
|
|
|
@ -3,7 +3,6 @@ package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class Context implements Serializable {
|
public class Context implements Serializable {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class DataInfo implements Serializable {
|
public class DataInfo implements Serializable {
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
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
|
* Describes a reference to the EOSC Interoperability Framework (IF) Guidelines
|
||||||
|
|
|
@ -3,7 +3,6 @@ package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class ExternalReference implements Serializable {
|
public class ExternalReference implements Serializable {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class ExtraInfo implements Serializable {
|
public class ExtraInfo implements Serializable {
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,6 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
|
|
||||||
public class GeoLocation implements Serializable {
|
public class GeoLocation implements Serializable {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
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
|
* To store information about the classification for the project. The classification depends on the programme. For example
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To store information about the ec programme for the project. It has the following parameters:
|
* To store information about the ec programme for the project. It has the following parameters:
|
||||||
|
|
|
@ -3,9 +3,6 @@ package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
import com.google.common.base.Joiner;
|
|
||||||
|
|
||||||
public class Instance implements Serializable {
|
public class Instance implements Serializable {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class Journal implements Serializable {
|
public class Journal implements Serializable {
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,6 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
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 {
|
public class KeyValue implements Serializable {
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@ package eu.dnetlib.dhp.schema.oaf;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
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.
|
* Represent a measure, must be further described by a system available resource providing name and descriptions.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class OAIProvenance implements Serializable {
|
public class OAIProvenance implements Serializable {
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,7 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
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 {
|
public abstract class Oaf implements Serializable {
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
public abstract class OafEntity extends Oaf implements Serializable {
|
public abstract class OafEntity extends Oaf implements Serializable {
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,10 @@ import java.util.List;
|
||||||
|
|
||||||
public class Organization extends OafEntity implements Serializable {
|
public class Organization extends OafEntity implements Serializable {
|
||||||
|
|
||||||
|
public enum OrganizationType {
|
||||||
|
Archive, Company, Education, Facility, Government, Healthcare, Nonprofit, Other, Unknown
|
||||||
|
}
|
||||||
|
|
||||||
private static final long serialVersionUID = -9048723860770504113L;
|
private static final long serialVersionUID = -9048723860770504113L;
|
||||||
|
|
||||||
private Field<String> legalshortname;
|
private Field<String> legalshortname;
|
||||||
|
@ -40,6 +44,8 @@ public class Organization extends OafEntity implements Serializable {
|
||||||
|
|
||||||
private Qualifier country;
|
private Qualifier country;
|
||||||
|
|
||||||
|
private OrganizationType organizationType;
|
||||||
|
|
||||||
public Field<String> getLegalshortname() {
|
public Field<String> getLegalshortname() {
|
||||||
return legalshortname;
|
return legalshortname;
|
||||||
}
|
}
|
||||||
|
@ -169,4 +175,11 @@ public class Organization extends OafEntity implements Serializable {
|
||||||
this.country = country;
|
this.country = country;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public OrganizationType getOrganizationType() {
|
||||||
|
return organizationType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrganizationType(OrganizationType organizationType) {
|
||||||
|
this.organizationType = organizationType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class OriginDescription implements Serializable {
|
public class OriginDescription implements Serializable {
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@ package eu.dnetlib.dhp.schema.oaf;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
public class Project extends OafEntity implements Serializable {
|
public class Project extends OafEntity implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 5783959097903529424L;
|
private static final long serialVersionUID = 5783959097903529424L;
|
||||||
|
|
|
@ -2,12 +2,6 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
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 {
|
public class Qualifier implements Serializable {
|
||||||
private static final long serialVersionUID = 6632548656644563076L;
|
private static final long serialVersionUID = 6632548656644563076L;
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
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.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
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
|
* 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,
|
* graph node identifiers and it is further characterised by the semantic of the link through the fields relType,
|
||||||
|
|
|
@ -2,12 +2,6 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
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 {
|
public class StructuredProperty implements Serializable {
|
||||||
|
|
||||||
|
|
|
@ -10,23 +10,34 @@ public class AccessRight implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 7995566912611238604L;
|
private static final long serialVersionUID = 7995566912611238604L;
|
||||||
|
|
||||||
private String value;
|
private String code;
|
||||||
|
|
||||||
|
private String label;
|
||||||
|
|
||||||
private OpenAccessRoute openAccessRoute;
|
private OpenAccessRoute openAccessRoute;
|
||||||
|
|
||||||
public static AccessRight newInstance(String value, OpenAccessRoute openAccessRoute) {
|
public static AccessRight newInstance(String code, String label, OpenAccessRoute openAccessRoute) {
|
||||||
AccessRight accessRight = new AccessRight();
|
AccessRight accessRight = new AccessRight();
|
||||||
accessRight.setValue(value);
|
accessRight.setCode(code);
|
||||||
|
accessRight.setLabel(label);
|
||||||
accessRight.setOpenAccessRoute(openAccessRoute);
|
accessRight.setOpenAccessRoute(openAccessRoute);
|
||||||
return accessRight;
|
return accessRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getValue() {
|
public String getCode() {
|
||||||
return value;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValue(String value) {
|
public void setCode(String code) {
|
||||||
this.value = value;
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OpenAccessRoute getOpenAccessRoute() {
|
public OpenAccessRoute getOpenAccessRoute() {
|
||||||
|
|
|
@ -1,10 +1,36 @@
|
||||||
package eu.dnetlib.dhp.schema.solr;
|
package eu.dnetlib.dhp.schema.solr;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class Measure implements Serializable {
|
public class Measure implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 57939927121851504L;
|
private static final long serialVersionUID = 57939927121851504L;
|
||||||
|
|
||||||
//TODO define me!
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,25 +6,20 @@ public class Pid implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -943684282582228545L;
|
private static final long serialVersionUID = -943684282582228545L;
|
||||||
|
|
||||||
private String type;
|
|
||||||
|
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
public static Pid newInstance(String type, String value) {
|
private String typeCode;
|
||||||
|
|
||||||
|
private String typeLabel;
|
||||||
|
|
||||||
|
public static Pid newInstance(String value, String typeCode, String typeLabel) {
|
||||||
Pid p = new Pid();
|
Pid p = new Pid();
|
||||||
p.setType(type);
|
|
||||||
p.setValue(value);
|
p.setValue(value);
|
||||||
|
p.setTypeCode(typeCode);
|
||||||
|
p.setTypeLabel(typeLabel);
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(String type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
@ -32,4 +27,20 @@ public class Pid implements Serializable {
|
||||||
public void setValue(String value) {
|
public void setValue(String value) {
|
||||||
this.value = 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,8 @@ public class Project implements Serializable {
|
||||||
private String keywords;
|
private String keywords;
|
||||||
private String duration;
|
private String duration;
|
||||||
|
|
||||||
|
private String oamandatepublications;
|
||||||
|
|
||||||
private String ecarticle29_3;
|
private String ecarticle29_3;
|
||||||
|
|
||||||
private List<Subject> subjects;
|
private List<Subject> subjects;
|
||||||
|
@ -107,6 +109,14 @@ public class Project implements Serializable {
|
||||||
this.duration = duration;
|
this.duration = duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getOamandatepublications() {
|
||||||
|
return oamandatepublications;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOamandatepublications(String oamandatepublications) {
|
||||||
|
this.oamandatepublications = oamandatepublications;
|
||||||
|
}
|
||||||
|
|
||||||
public String getEcarticle29_3() {
|
public String getEcarticle29_3() {
|
||||||
return ecarticle29_3;
|
return ecarticle29_3;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@ public class RelatedRecord implements Serializable {
|
||||||
private String acronym;
|
private String acronym;
|
||||||
private CodeLabel contracttype;
|
private CodeLabel contracttype;
|
||||||
private Funding funding;
|
private Funding funding;
|
||||||
|
private String validationDate;
|
||||||
|
|
||||||
public RelatedRecordHeader getHeader() {
|
public RelatedRecordHeader getHeader() {
|
||||||
return header;
|
return header;
|
||||||
|
@ -215,4 +216,12 @@ public class RelatedRecord implements Serializable {
|
||||||
public void setFunding(Funding funding) {
|
public void setFunding(Funding funding) {
|
||||||
this.funding = funding;
|
this.funding = funding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getValidationDate() {
|
||||||
|
return validationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValidationDate(String validationDate) {
|
||||||
|
this.validationDate = validationDate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,12 +14,18 @@ public class RelatedRecordHeader implements Serializable {
|
||||||
|
|
||||||
private RecordType relatedRecordType;
|
private RecordType relatedRecordType;
|
||||||
|
|
||||||
public static RelatedRecordHeader newInstance(String relationType, String relationClass, String relatedIdentifier, RecordType relatedRecordType) {
|
private String relationProvenance;
|
||||||
|
|
||||||
|
private String trust;
|
||||||
|
|
||||||
|
public static RelatedRecordHeader newInstance(String relationType, String relationClass, String relatedIdentifier, RecordType relatedRecordType, String relationProvenance, String trust) {
|
||||||
RelatedRecordHeader header = new RelatedRecordHeader();
|
RelatedRecordHeader header = new RelatedRecordHeader();
|
||||||
header.setRelationType(relationType);
|
header.setRelationType(relationType);
|
||||||
header.setRelationClass(relationClass);
|
header.setRelationClass(relationClass);
|
||||||
header.setRelatedIdentifier(relatedIdentifier);
|
header.setRelatedIdentifier(relatedIdentifier);
|
||||||
header.setRelatedRecordType(relatedRecordType);
|
header.setRelatedRecordType(relatedRecordType);
|
||||||
|
header.setRelationProvenance(relationProvenance);
|
||||||
|
header.setTrust(trust);
|
||||||
return header;
|
return header;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,4 +60,20 @@ public class RelatedRecordHeader implements Serializable {
|
||||||
public void setRelatedRecordType(RecordType relatedRecordType) {
|
public void setRelatedRecordType(RecordType relatedRecordType) {
|
||||||
this.relatedRecordType = 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,8 +3,6 @@ package eu.dnetlib.dhp.schema.solr;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
|
|
||||||
public class Result implements Serializable {
|
public class Result implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -9121038426985022737L;
|
private static final long serialVersionUID = -9121038426985022737L;
|
||||||
|
@ -147,12 +145,10 @@ public class Result implements Serializable {
|
||||||
*/
|
*/
|
||||||
private List<EoscIfGuidelines> eoscifguidelines;
|
private List<EoscIfGuidelines> eoscifguidelines;
|
||||||
|
|
||||||
@JsonProperty("isGreen")
|
|
||||||
private Boolean isGreen;
|
private Boolean isGreen;
|
||||||
|
|
||||||
private OpenAccessColor openAccessColor;
|
private OpenAccessColor openAccessColor;
|
||||||
|
|
||||||
@JsonProperty("isInDiamondJournal")
|
|
||||||
private Boolean isInDiamondJournal;
|
private Boolean isInDiamondJournal;
|
||||||
|
|
||||||
private Boolean publiclyFunded;
|
private Boolean publiclyFunded;
|
||||||
|
@ -381,11 +377,11 @@ public class Result implements Serializable {
|
||||||
this.eoscifguidelines = eoscifguidelines;
|
this.eoscifguidelines = eoscifguidelines;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getGreen() {
|
public Boolean getIsGreen() {
|
||||||
return isGreen;
|
return isGreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGreen(Boolean green) {
|
public void setIsGreen(Boolean green) {
|
||||||
isGreen = green;
|
isGreen = green;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -397,11 +393,11 @@ public class Result implements Serializable {
|
||||||
this.openAccessColor = openAccessColor;
|
this.openAccessColor = openAccessColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getInDiamondJournal() {
|
public Boolean getIsInDiamondJournal() {
|
||||||
return isInDiamondJournal;
|
return isInDiamondJournal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setInDiamondJournal(Boolean inDiamondJournal) {
|
public void setIsInDiamondJournal(Boolean inDiamondJournal) {
|
||||||
isInDiamondJournal = inDiamondJournal;
|
isInDiamondJournal = inDiamondJournal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@ public class SolrRecordHeader implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -6052397109220149426L;
|
private static final long serialVersionUID = -6052397109220149426L;
|
||||||
|
|
||||||
|
public enum Status { UNDER_CURATION }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The OpenAIRE identifiers for this record
|
* The OpenAIRE identifiers for this record
|
||||||
*/
|
*/
|
||||||
|
@ -19,13 +21,20 @@ public class SolrRecordHeader implements Serializable {
|
||||||
|
|
||||||
private RecordType recordType;
|
private RecordType recordType;
|
||||||
|
|
||||||
|
private Status status = null;
|
||||||
|
|
||||||
private Boolean deletedbyinference;
|
private Boolean deletedbyinference;
|
||||||
|
|
||||||
public static SolrRecordHeader newInstance(String id, List<String> originalId, RecordType recordType, 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();
|
SolrRecordHeader header = new SolrRecordHeader();
|
||||||
header.setId(id);
|
header.setId(id);
|
||||||
header.setOriginalId(originalId);
|
header.setOriginalId(originalId);
|
||||||
header.setRecordType(recordType);
|
header.setRecordType(recordType);
|
||||||
|
header.setStatus(status);
|
||||||
header.setDeletedbyinference(deletedbyinference);
|
header.setDeletedbyinference(deletedbyinference);
|
||||||
return header;
|
return header;
|
||||||
}
|
}
|
||||||
|
@ -58,6 +67,14 @@ public class SolrRecordHeader implements Serializable {
|
||||||
return deletedbyinference;
|
return deletedbyinference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Status getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Status status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
public void setDeletedbyinference(Boolean deletedbyinference) {
|
public void setDeletedbyinference(Boolean deletedbyinference) {
|
||||||
this.deletedbyinference = deletedbyinference;
|
this.deletedbyinference = deletedbyinference;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,12 +8,15 @@ public class Subject implements Serializable {
|
||||||
|
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
private String type;
|
private String typeCode;
|
||||||
|
|
||||||
public static Subject newInstance(String value, String type) {
|
private String typeLabel;
|
||||||
|
|
||||||
|
public static Subject newInstance(String value, String typeCode, String typeLabel) {
|
||||||
Subject s = new Subject();
|
Subject s = new Subject();
|
||||||
s.setValue(value);
|
s.setValue(value);
|
||||||
s.setType(type);
|
s.setTypeCode(typeCode);
|
||||||
|
s.setTypeLabel(typeLabel);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,11 +28,19 @@ public class Subject implements Serializable {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getType() {
|
public String getTypeCode() {
|
||||||
return type;
|
return typeCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setType(String type) {
|
public void setTypeCode(String typeCode) {
|
||||||
this.type = type;
|
this.typeCode = typeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeLabel() {
|
||||||
|
return typeLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypeLabel(String typeLabel) {
|
||||||
|
this.typeLabel = typeLabel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
package eu.dnetlib.dhp.schema.solr;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
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