WIP: align Solr JSON records to the explore portal requirements

This commit is contained in:
Claudio Atzori 2024-06-20 14:28:58 +02:00
parent 39fa75ae3f
commit ae5337f266
3 changed files with 31 additions and 9 deletions

View File

@ -5,7 +5,7 @@
<groupId>eu.dnetlib.dhp</groupId>
<artifactId>dhp-schemas</artifactId>
<packaging>jar</packaging>
<version>6.1.2-SNAPSHOT</version>
<version>6.1.3-SNAPSHOT</version>
<licenses>
<license>

View File

@ -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() {

View File

@ -16,13 +16,16 @@ public class RelatedRecordHeader implements Serializable {
private String relationProvenance;
public static RelatedRecordHeader newInstance(String relationType, String relationClass, String relatedIdentifier, RecordType relatedRecordType, 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;
}
@ -65,4 +68,12 @@ public class RelatedRecordHeader implements Serializable {
public void setRelationProvenance(String relationProvenance) {
this.relationProvenance = relationProvenance;
}
public String getTrust() {
return trust;
}
public void setTrust(String trust) {
this.trust = trust;
}
}