added similar_record property
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/grsf-publisher-ws@151091 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
bbb94d70a3
commit
c60da0676d
|
@ -97,6 +97,10 @@ public class Common extends Base{
|
||||||
@CustomField(key="Species")
|
@CustomField(key="Species")
|
||||||
private List<String> species;
|
private List<String> species;
|
||||||
|
|
||||||
|
@JsonProperty("similar_records")
|
||||||
|
@CustomField(key="Similar Records")
|
||||||
|
private List<SimilarRecordBean> similarRecords;
|
||||||
|
|
||||||
public Common() {
|
public Common() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -116,6 +120,7 @@ public class Common extends Base{
|
||||||
* @param catches
|
* @param catches
|
||||||
* @param landings
|
* @param landings
|
||||||
* @param species
|
* @param species
|
||||||
|
* @param similarRecords
|
||||||
*/
|
*/
|
||||||
public Common(List<String> dataOwner,
|
public Common(List<String> dataOwner,
|
||||||
List<Resource<Sources>> databaseSources,
|
List<Resource<Sources>> databaseSources,
|
||||||
|
@ -125,7 +130,8 @@ public class Common extends Base{
|
||||||
List<TimeSeriesBean<Void, Void>> reportingYear,
|
List<TimeSeriesBean<Void, Void>> reportingYear,
|
||||||
List<TimeSeriesBean<Void, Void>> referenceYear, String grsfType,
|
List<TimeSeriesBean<Void, Void>> referenceYear, String grsfType,
|
||||||
String sourceType, List<TimeSeriesBean<String, String>> catches,
|
String sourceType, List<TimeSeriesBean<String, String>> catches,
|
||||||
List<TimeSeriesBean<String, String>> landings, List<String> species) {
|
List<TimeSeriesBean<String, String>> landings,
|
||||||
|
List<String> species, List<SimilarRecordBean> similarRecords) {
|
||||||
super();
|
super();
|
||||||
this.dataOwner = dataOwner;
|
this.dataOwner = dataOwner;
|
||||||
this.databaseSources = databaseSources;
|
this.databaseSources = databaseSources;
|
||||||
|
@ -141,6 +147,7 @@ public class Common extends Base{
|
||||||
this.catches = catches;
|
this.catches = catches;
|
||||||
this.landings = landings;
|
this.landings = landings;
|
||||||
this.species = species;
|
this.species = species;
|
||||||
|
this.similarRecords = similarRecords;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getGrsfType() {
|
public String getGrsfType() {
|
||||||
|
@ -259,17 +266,38 @@ public class Common extends Base{
|
||||||
return referenceYear;
|
return referenceYear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<SimilarRecordBean> getSimilarRecords() {
|
||||||
|
return similarRecords;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSimilarRecords(List<SimilarRecordBean> similarRecords) {
|
||||||
|
this.similarRecords = similarRecords;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Common [dataOwner=" + dataOwner + ", databaseSources="
|
return "Common ["
|
||||||
+ databaseSources + ", sourceOfInformation="
|
+ (dataOwner != null ? "dataOwner=" + dataOwner + ", " : "")
|
||||||
+ sourceOfInformation + ", refersTo=" + refersTo
|
+ (databaseSources != null ? "databaseSources="
|
||||||
+ ", shortTitle=" + shortTitle + ", traceabilityFlag="
|
+ databaseSources + ", " : "")
|
||||||
+ traceabilityFlag + ", status=" + status + ", reportingYear="
|
+ (sourceOfInformation != null ? "sourceOfInformation="
|
||||||
+ reportingYear + ", referenceYear=" + referenceYear
|
+ sourceOfInformation + ", " : "")
|
||||||
+ ", grsfType=" + grsfType + ", sourceType=" + sourceType
|
+ (refersTo != null ? "refersTo=" + refersTo + ", " : "")
|
||||||
+ ", catches=" + catches + ", landings=" + landings
|
+ (shortTitle != null ? "shortTitle=" + shortTitle + ", " : "")
|
||||||
+ ", species=" + species + "]";
|
+ (traceabilityFlag != null ? "traceabilityFlag="
|
||||||
|
+ traceabilityFlag + ", " : "")
|
||||||
|
+ (status != null ? "status=" + status + ", " : "")
|
||||||
|
+ (reportingYear != null ? "reportingYear=" + reportingYear
|
||||||
|
+ ", " : "")
|
||||||
|
+ (referenceYear != null ? "referenceYear=" + referenceYear
|
||||||
|
+ ", " : "")
|
||||||
|
+ (grsfType != null ? "grsfType=" + grsfType + ", " : "")
|
||||||
|
+ (sourceType != null ? "sourceType=" + sourceType + ", " : "")
|
||||||
|
+ (catches != null ? "catches=" + catches + ", " : "")
|
||||||
|
+ (landings != null ? "landings=" + landings + ", " : "")
|
||||||
|
+ (species != null ? "species=" + species + ", " : "")
|
||||||
|
+ (similarRecords != null ? "similarRecords=" + similarRecords
|
||||||
|
: "") + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,69 @@
|
||||||
|
package org.gcube.data_catalogue.grsf_publish_ws.json.input;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Similar record information.
|
||||||
|
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||||
|
*/
|
||||||
|
public class SimilarRecordBean {
|
||||||
|
|
||||||
|
@JsonProperty("url")
|
||||||
|
String url;
|
||||||
|
|
||||||
|
@JsonProperty("id")
|
||||||
|
String id;
|
||||||
|
|
||||||
|
@JsonProperty("description")
|
||||||
|
String description;
|
||||||
|
|
||||||
|
public SimilarRecordBean() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param url
|
||||||
|
* @param id
|
||||||
|
* @param description
|
||||||
|
*/
|
||||||
|
public SimilarRecordBean(String url, String id, String description) {
|
||||||
|
super();
|
||||||
|
this.url = url;
|
||||||
|
this.id = id;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
String toReturn = "";
|
||||||
|
toReturn += url != null ? "url = " + url + ", " : "";
|
||||||
|
toReturn += id != null ? "id = " + id + ", " : "";
|
||||||
|
toReturn += description != null ? "description = " + description : "";
|
||||||
|
toReturn = toReturn.endsWith(", ") ? toReturn.substring(0, toReturn.length() - 2) : toReturn;
|
||||||
|
return toReturn;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue