diff --git a/CHANGES.md b/CHANGES.md
index 704fd19..f6e6283 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -4,10 +4,11 @@
| **Version** | **Changes** | **Readiness** |
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
-| 6.1.1 | [Graph model]
- Introduced constants used in the DOIBoost dismission.
| beta |
-| 6.1.0 | [Graph model] - Introduced model classes to provide a JSON representation of records embedding information from the related entities.
| beta |
-| 5.17.3 | [Graph model] - added result level textual field to store the transformative agreement information.
| beta |
-| 4.17.3 | [Graph model] - moved context at the level of the entity.
| beta |
+| 6.1.3 | [Graph model] - Updated Solr JSON payload model classes
| beta |
+| 6.1.1 | [Graph model] - Introduced constants used in the DOIBoost dismission.
| production |
+| 6.1.0 | [Graph model] - Introduced model classes to provide a JSON representation of records embedding information from the related entities.
| production |
+| 5.17.3 | [Graph model] - added result level textual field to store the transformative agreement information.
| production |
+| 4.17.3 | [Graph model] - moved context at the level of the entity.
| production |
| 4.17.2 | [Graph model] - added InstaceTypeMapping field on the instance level.
- new result level fields to support the activities in the Irish tender `isGreen`, `openAccessColor`, `isInDiamondJournal`, `publiclyFunded`
| production |
| 3.17.1 | [Graph model] - added fulltext field on the instance level.
- added extra organization specific PID types
| production |
| 3.16.0 | [Graph model] - added entity level measures.
| production |
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/AccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/AccessRight.java
index d8481a8..1daa0c4 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/AccessRight.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/AccessRight.java
@@ -1,15 +1,13 @@
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() {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Context.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Context.java
index 0cfa391..81c374c 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Context.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Context.java
@@ -3,7 +3,6 @@ package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.List;
-import java.util.Objects;
public class Context implements Serializable {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/DataInfo.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/DataInfo.java
index 3180b41..5c05e09 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/DataInfo.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/DataInfo.java
@@ -2,7 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
-import java.util.Objects;
public class DataInfo implements Serializable {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/EoscIfGuidelines.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/EoscIfGuidelines.java
index 85b620d..8659166 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/EoscIfGuidelines.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/EoscIfGuidelines.java
@@ -1,12 +1,6 @@
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
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/ExternalReference.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/ExternalReference.java
index 73ea48c..bf761d1 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/ExternalReference.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/ExternalReference.java
@@ -3,7 +3,6 @@ package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.List;
-import java.util.Objects;
public class ExternalReference implements Serializable {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/ExtraInfo.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/ExtraInfo.java
index 8d83e6a..224cf6d 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/ExtraInfo.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/ExtraInfo.java
@@ -2,7 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
-import java.util.Objects;
public class ExtraInfo implements Serializable {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/GeoLocation.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/GeoLocation.java
index 1bdf256..229b5eb 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/GeoLocation.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/GeoLocation.java
@@ -2,11 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
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 {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Classification.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Classification.java
index 9b3a3c7..64bd9aa 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Classification.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Classification.java
@@ -2,7 +2,6 @@
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
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Programme.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Programme.java
index f50006f..9028a4b 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Programme.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Programme.java
@@ -2,7 +2,6 @@
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:
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Instance.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Instance.java
index 722e765..1446926 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Instance.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Instance.java
@@ -3,9 +3,6 @@ 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 {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Journal.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Journal.java
index 2776bdd..55528ba 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Journal.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Journal.java
@@ -2,7 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
-import java.util.Objects;
public class Journal implements Serializable {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/KeyValue.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/KeyValue.java
index d762212..548d42d 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/KeyValue.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/KeyValue.java
@@ -2,13 +2,6 @@
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 {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Measure.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Measure.java
index 343aa20..e67207c 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Measure.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Measure.java
@@ -4,8 +4,6 @@ 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.
*/
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/OAIProvenance.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/OAIProvenance.java
index 68f09cf..b138549 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/OAIProvenance.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/OAIProvenance.java
@@ -2,7 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
-import java.util.Objects;
public class OAIProvenance implements Serializable {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java
index ae39fc7..8117c88 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Oaf.java
@@ -2,12 +2,7 @@
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 {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/OafEntity.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/OafEntity.java
index afbfaeb..3aba118 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/OafEntity.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/OafEntity.java
@@ -3,7 +3,6 @@ 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 {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/OriginDescription.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/OriginDescription.java
index 1397897..34e74eb 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/OriginDescription.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/OriginDescription.java
@@ -2,7 +2,6 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
-import java.util.Objects;
public class OriginDescription implements Serializable {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java
index 3eefe8f..e90d6e3 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java
@@ -4,8 +4,6 @@ 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;
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Qualifier.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Qualifier.java
index ed768fa..ec90fba 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Qualifier.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Qualifier.java
@@ -2,12 +2,6 @@
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;
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Relation.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Relation.java
index a5004e5..9263d44 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Relation.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Relation.java
@@ -1,15 +1,10 @@
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,
diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/StructuredProperty.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/StructuredProperty.java
index 34f8bf2..0718602 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/oaf/StructuredProperty.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/StructuredProperty.java
@@ -2,12 +2,6 @@
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 {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/AccessRight.java b/src/main/java/eu/dnetlib/dhp/schema/solr/AccessRight.java
index 7981bc9..01aa69e 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/solr/AccessRight.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/solr/AccessRight.java
@@ -10,23 +10,34 @@ public class AccessRight implements Serializable {
private static final long serialVersionUID = 7995566912611238604L;
- private String value;
+ private String code;
+
+ private String label;
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.setValue(value);
+ accessRight.setCode(code);
+ accessRight.setLabel(label);
accessRight.setOpenAccessRoute(openAccessRoute);
return accessRight;
}
- public String getValue() {
- return value;
+ public String getCode() {
+ return code;
}
- public void setValue(String value) {
- this.value = value;
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
}
public OpenAccessRoute getOpenAccessRoute() {
diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/ExternalReference.java b/src/main/java/eu/dnetlib/dhp/schema/solr/ExternalReference.java
new file mode 100644
index 0000000..2373627
--- /dev/null
+++ b/src/main/java/eu/dnetlib/dhp/schema/solr/ExternalReference.java
@@ -0,0 +1,100 @@
+
+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 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 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 getAlternateLabel() {
+ return alternateLabel;
+ }
+
+ public void setAlternateLabel(List 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;
+ }
+
+}
diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/ExtraInfo.java b/src/main/java/eu/dnetlib/dhp/schema/solr/ExtraInfo.java
deleted file mode 100644
index 2e3ea83..0000000
--- a/src/main/java/eu/dnetlib/dhp/schema/solr/ExtraInfo.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package eu.dnetlib.dhp.schema.solr;
-
-import java.io.Serializable;
-
-public class ExtraInfo implements Serializable {
-
- private static final long serialVersionUID = -6627854860189757709L;
-
- //TODO define me!
-}
diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Measure.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Measure.java
index 5495ab2..9c5742f 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/solr/Measure.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Measure.java
@@ -1,10 +1,36 @@
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;
- //TODO define me!
+ private String id;
+
+ private List unit;
+
+ public static Measure newInstance(String id, List 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 getUnit() {
+ return unit;
+ }
+
+ public void setUnit(List unit) {
+ this.unit = unit;
+ }
}
diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Pid.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Pid.java
index 7c42c29..27dcff5 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/solr/Pid.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Pid.java
@@ -6,25 +6,20 @@ public class Pid implements Serializable {
private static final long serialVersionUID = -943684282582228545L;
- private String type;
-
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();
- 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;
}
@@ -32,4 +27,20 @@ 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;
+ }
}
diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecord.java b/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecord.java
index 1b20777..d91d5ef 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecord.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecord.java
@@ -39,6 +39,7 @@ public class RelatedRecord implements Serializable {
private String acronym;
private CodeLabel contracttype;
private Funding funding;
+ private String validationDate;
public RelatedRecordHeader getHeader() {
return header;
@@ -215,4 +216,12 @@ 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;
+ }
}
diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecordHeader.java b/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecordHeader.java
index db89b6c..4d7fc92 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecordHeader.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/solr/RelatedRecordHeader.java
@@ -14,12 +14,18 @@ public class RelatedRecordHeader implements Serializable {
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();
header.setRelationType(relationType);
header.setRelationClass(relationClass);
header.setRelatedIdentifier(relatedIdentifier);
header.setRelatedRecordType(relatedRecordType);
+ header.setRelationProvenance(relationProvenance);
+ header.setTrust(trust);
return header;
}
@@ -54,4 +60,20 @@ 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;
+ }
}
diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Result.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Result.java
index a8e481d..5da57f5 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/solr/Result.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Result.java
@@ -3,8 +3,6 @@ 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;
@@ -147,18 +145,18 @@ public class Result implements Serializable {
*/
private List eoscifguidelines;
- @JsonProperty("isGreen")
private Boolean isGreen;
private OpenAccessColor openAccessColor;
- @JsonProperty("isInDiamondJournal")
private Boolean isInDiamondJournal;
private Boolean publiclyFunded;
private String transformativeAgreement;
+ private List externalReference;
+
/**
* 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
@@ -381,11 +379,11 @@ public class Result implements Serializable {
this.eoscifguidelines = eoscifguidelines;
}
- public Boolean getGreen() {
+ public Boolean getIsGreen() {
return isGreen;
}
- public void setGreen(Boolean green) {
+ public void setIsGreen(Boolean green) {
isGreen = green;
}
@@ -397,11 +395,11 @@ public class Result implements Serializable {
this.openAccessColor = openAccessColor;
}
- public Boolean getInDiamondJournal() {
+ public Boolean getIsInDiamondJournal() {
return isInDiamondJournal;
}
- public void setInDiamondJournal(Boolean inDiamondJournal) {
+ public void setIsInDiamondJournal(Boolean inDiamondJournal) {
isInDiamondJournal = inDiamondJournal;
}
@@ -421,6 +419,14 @@ public class Result implements Serializable {
this.transformativeAgreement = transformativeAgreement;
}
+ public List getExternalReference() {
+ return externalReference;
+ }
+
+ public void setExternalReference(List externalReference) {
+ this.externalReference = externalReference;
+ }
+
public List getInstance() {
return instance;
}
diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecord.java b/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecord.java
index ae8779e..52351cf 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecord.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecord.java
@@ -20,8 +20,6 @@ public class SolrRecord implements Serializable {
private List measures;
- private List extraInfo;
-
private Result result;
private Datasource datasource;
@@ -74,14 +72,6 @@ public class SolrRecord implements Serializable {
this.measures = measures;
}
- public List getExtraInfo() {
- return extraInfo;
- }
-
- public void setExtraInfo(List extraInfo) {
- this.extraInfo = extraInfo;
- }
-
public Result getResult() {
return result;
}
diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecordHeader.java b/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecordHeader.java
index 04bde53..f15530b 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecordHeader.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/solr/SolrRecordHeader.java
@@ -7,6 +7,8 @@ public class SolrRecordHeader implements Serializable {
private static final long serialVersionUID = -6052397109220149426L;
+ public enum Status { UNDER_CURATION }
+
/**
* The OpenAIRE identifiers for this record
*/
@@ -19,13 +21,20 @@ public class SolrRecordHeader implements Serializable {
private RecordType recordType;
+ private Status status = null;
+
private Boolean deletedbyinference;
public static SolrRecordHeader newInstance(String id, List originalId, RecordType recordType, Boolean deletedbyinference) {
+ return newInstance(id, originalId, recordType, null, deletedbyinference);
+ }
+
+ public static SolrRecordHeader newInstance(String id, List 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;
}
@@ -58,6 +67,14 @@ 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;
}
diff --git a/src/main/java/eu/dnetlib/dhp/schema/solr/Subject.java b/src/main/java/eu/dnetlib/dhp/schema/solr/Subject.java
index 9f13c41..f7cbe06 100644
--- a/src/main/java/eu/dnetlib/dhp/schema/solr/Subject.java
+++ b/src/main/java/eu/dnetlib/dhp/schema/solr/Subject.java
@@ -8,12 +8,15 @@ public class Subject implements Serializable {
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();
s.setValue(value);
- s.setType(type);
+ s.setTypeCode(typeCode);
+ s.setTypeLabel(typeLabel);
return s;
}
@@ -25,11 +28,19 @@ public class Subject implements Serializable {
this.value = value;
}
- public String getType() {
- return type;
+ public String getTypeCode() {
+ return typeCode;
}
- public void setType(String type) {
- this.type = type;
+ public void setTypeCode(String typeCode) {
+ this.typeCode = typeCode;
+ }
+
+ public String getTypeLabel() {
+ return typeLabel;
+ }
+
+ public void setTypeLabel(String typeLabel) {
+ this.typeLabel = typeLabel;
}
}
diff --git a/src/test/java/eu/dnetlib/dhp/schema/solr/TestJsonSerialization.java b/src/test/java/eu/dnetlib/dhp/schema/solr/TestJsonSerialization.java
new file mode 100644
index 0000000..d42ba63
--- /dev/null
+++ b/src/test/java/eu/dnetlib/dhp/schema/solr/TestJsonSerialization.java
@@ -0,0 +1,33 @@
+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());
+ }
+}