updated JSON payloads to consider the ExternalReferences
This commit is contained in:
parent
14fe99d2c5
commit
fe961af8c1
|
@ -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<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;
|
||||
}
|
||||
|
||||
}
|
|
@ -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!
|
||||
}
|
|
@ -155,6 +155,8 @@ public class Result implements Serializable {
|
|||
|
||||
private String transformativeAgreement;
|
||||
|
||||
private List<ExternalReference> 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
|
||||
|
@ -417,6 +419,14 @@ public class Result implements Serializable {
|
|||
this.transformativeAgreement = transformativeAgreement;
|
||||
}
|
||||
|
||||
public List<ExternalReference> getExternalReference() {
|
||||
return externalReference;
|
||||
}
|
||||
|
||||
public void setExternalReference(List<ExternalReference> externalReference) {
|
||||
this.externalReference = externalReference;
|
||||
}
|
||||
|
||||
public List<Instance> getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
|
|
@ -20,8 +20,6 @@ public class SolrRecord implements Serializable {
|
|||
|
||||
private List<Measure> measures;
|
||||
|
||||
private List<ExtraInfo> extraInfo;
|
||||
|
||||
private Result result;
|
||||
|
||||
private Datasource datasource;
|
||||
|
@ -72,14 +70,6 @@ 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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue