2016-10-08 20:46:17 +02:00
|
|
|
package org.gcube.data_catalogue.grsf_publish_ws.json.input;
|
2016-10-07 18:23:23 +02:00
|
|
|
|
2016-11-25 13:56:27 +01:00
|
|
|
import java.util.Collections;
|
2016-10-26 18:40:10 +02:00
|
|
|
import java.util.List;
|
|
|
|
|
2016-11-01 22:35:52 +01:00
|
|
|
import javax.validation.Valid;
|
2016-10-13 11:46:42 +02:00
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
import javax.validation.constraints.Size;
|
|
|
|
|
2016-10-08 23:10:25 +02:00
|
|
|
import org.gcube.data_catalogue.grsf_publish_ws.custom_annotations.CustomField;
|
2016-10-08 20:46:17 +02:00
|
|
|
import org.gcube.data_catalogue.grsf_publish_ws.custom_annotations.Group;
|
|
|
|
import org.gcube.data_catalogue.grsf_publish_ws.custom_annotations.Tag;
|
2016-11-04 16:26:19 +01:00
|
|
|
import org.gcube.data_catalogue.grsf_publish_ws.utils.groups.Abundance_Level;
|
|
|
|
import org.gcube.data_catalogue.grsf_publish_ws.utils.groups.Exploitation_Rate;
|
2016-11-30 18:29:44 +01:00
|
|
|
import org.gcube.data_catalogue.grsf_publish_ws.utils.groups.Stock_Type;
|
2016-10-07 18:23:23 +02:00
|
|
|
|
2016-10-26 18:40:10 +02:00
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
2016-10-07 18:23:23 +02:00
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A stock record bean
|
|
|
|
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
|
|
|
*/
|
2016-10-26 18:40:10 +02:00
|
|
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
2016-10-07 18:23:23 +02:00
|
|
|
public class StockRecord extends Common{
|
2016-11-25 13:56:27 +01:00
|
|
|
|
2016-10-07 18:23:23 +02:00
|
|
|
@JsonProperty("stock_name")
|
2016-10-13 11:46:42 +02:00
|
|
|
@NotNull(message="stock_name cannot be null")
|
|
|
|
@Size(min=2, message="stock_name cannot be empty")
|
2016-10-14 18:44:34 +02:00
|
|
|
@CustomField(key="Stock Name")
|
2016-10-07 18:23:23 +02:00
|
|
|
private String stockName;
|
|
|
|
|
|
|
|
@JsonProperty("stock_id")
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Stock Id")
|
2016-10-07 18:23:23 +02:00
|
|
|
private String stockID;
|
|
|
|
|
|
|
|
@JsonProperty("species_scientific_name")
|
2016-11-06 21:21:11 +01:00
|
|
|
@CustomField(key="Species scientific name")
|
2016-10-08 20:46:17 +02:00
|
|
|
@Tag
|
2016-10-13 11:46:42 +02:00
|
|
|
@NotNull(message="species_scientific_name cannot be null")
|
|
|
|
@Size(min=1, message="species_scientific_name cannot be empty")
|
2016-10-07 18:23:23 +02:00
|
|
|
private String speciesScientificName;
|
|
|
|
|
2016-10-12 16:30:52 +02:00
|
|
|
@JsonProperty("assessment_distribution_area")
|
|
|
|
@CustomField(key="Assessment distribution area")
|
2016-10-26 18:40:10 +02:00
|
|
|
@NotNull(message="assessment distribution cannot be null")
|
|
|
|
@Size(min=1, message="assessment distribution area cannot be empty")
|
2016-10-07 18:23:23 +02:00
|
|
|
private String area;
|
|
|
|
|
|
|
|
@JsonProperty("exploiting_fishery")
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Exploiting fishery")
|
2016-10-07 18:23:23 +02:00
|
|
|
private String exploitingFishery;
|
|
|
|
|
|
|
|
@JsonProperty("management_entity")
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Management entity")
|
2016-10-07 18:23:23 +02:00
|
|
|
private String managementEntity;
|
|
|
|
|
|
|
|
@JsonProperty("assessment_methods")
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Assessment methods")
|
2016-10-07 18:23:23 +02:00
|
|
|
private String assessmentMethods;
|
|
|
|
|
|
|
|
@JsonProperty("state_of_marine_resource")
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="State of marine resources")
|
2016-10-07 18:23:23 +02:00
|
|
|
private String stateOfMarineResource;
|
|
|
|
|
|
|
|
@JsonProperty("exploitation_rate")
|
2016-11-04 16:26:19 +01:00
|
|
|
@CustomField(key="Exploitation Rate")
|
2016-10-13 14:06:15 +02:00
|
|
|
@Tag
|
2016-11-01 22:35:52 +01:00
|
|
|
@Valid
|
2016-11-24 17:53:50 +01:00
|
|
|
private List<TimeSeriesBean<Exploitation_Rate, Void>> exploitationRate;
|
2016-10-07 18:23:23 +02:00
|
|
|
|
|
|
|
@JsonProperty("abundance_level")
|
2016-11-04 16:26:19 +01:00
|
|
|
@CustomField(key="Abundance Level")
|
2016-10-13 14:06:15 +02:00
|
|
|
@Tag
|
2016-11-01 22:35:52 +01:00
|
|
|
@Valid
|
2016-11-24 17:53:50 +01:00
|
|
|
private List<TimeSeriesBean<Abundance_Level, Void>> abundanceLevel;
|
2016-11-04 16:26:19 +01:00
|
|
|
|
|
|
|
@JsonProperty("exploitation_rate_for_grouping")
|
|
|
|
@Group
|
|
|
|
private Exploitation_Rate exploitationRateForGrouping;
|
|
|
|
|
|
|
|
@JsonProperty("abundance_level_for_grouping")
|
|
|
|
@Group
|
|
|
|
private Abundance_Level abundanceLevelForGrouping;
|
2016-10-07 18:23:23 +02:00
|
|
|
|
|
|
|
@JsonProperty("narrative_state_and_trend")
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Narrative state and trend")
|
2016-10-07 18:23:23 +02:00
|
|
|
private String narrativeStateAndTrend;
|
|
|
|
|
|
|
|
@JsonProperty("scientific_advice")
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Scientific advice")
|
2016-10-07 18:23:23 +02:00
|
|
|
private String scientificAdvice;
|
|
|
|
|
|
|
|
@JsonProperty("reporting_entity")
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Reporting entity")
|
2016-10-07 18:23:23 +02:00
|
|
|
private String reportingEntity;
|
|
|
|
|
|
|
|
@JsonProperty("reporting_year")
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Reporting year")
|
|
|
|
private Long reportingYear;
|
2016-10-26 18:40:10 +02:00
|
|
|
|
|
|
|
@JsonProperty("stock_uri")
|
|
|
|
@CustomField(key="Stock Uri")
|
|
|
|
private String stockUri;
|
|
|
|
|
|
|
|
@JsonProperty("water_area")
|
|
|
|
@CustomField(key="Water Area")
|
2016-11-04 16:26:19 +01:00
|
|
|
private List<String> waterArea;
|
2016-11-25 18:25:23 +01:00
|
|
|
|
|
|
|
@JsonProperty("type")
|
|
|
|
@CustomField(key="Type")
|
|
|
|
@Tag
|
|
|
|
@Group
|
2016-11-30 18:29:44 +01:00
|
|
|
private Stock_Type type;
|
2016-11-01 22:35:52 +01:00
|
|
|
|
2016-10-07 18:23:23 +02:00
|
|
|
public StockRecord() {
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-11-06 21:21:11 +01:00
|
|
|
* Create a Stock element.
|
2016-10-07 18:23:23 +02:00
|
|
|
* @param stockName
|
|
|
|
* @param stockID
|
|
|
|
* @param speciesScientificName
|
|
|
|
* @param area
|
|
|
|
* @param exploitingFishery
|
|
|
|
* @param managementEntity
|
|
|
|
* @param assessmentMethods
|
|
|
|
* @param stateOfMarineResource
|
|
|
|
* @param exploitationRate
|
|
|
|
* @param abundanceLevel
|
2016-11-04 16:26:19 +01:00
|
|
|
* @param exploitationRateForGrouping
|
|
|
|
* @param abundanceLevelForGrouping
|
2016-10-07 18:23:23 +02:00
|
|
|
* @param narrativeStateAndTrend
|
|
|
|
* @param scientificAdvice
|
|
|
|
* @param reportingEntity
|
|
|
|
* @param reportingYear
|
2016-10-26 18:40:10 +02:00
|
|
|
* @param stockUri
|
|
|
|
* @param waterArea
|
2016-11-25 18:25:23 +01:00
|
|
|
* @param type
|
2016-10-07 18:23:23 +02:00
|
|
|
*/
|
|
|
|
public StockRecord(String stockName, String stockID,
|
|
|
|
String speciesScientificName, String area,
|
|
|
|
String exploitingFishery, String managementEntity,
|
|
|
|
String assessmentMethods, String stateOfMarineResource,
|
2016-11-24 17:53:50 +01:00
|
|
|
List<TimeSeriesBean<Exploitation_Rate, Void>> exploitationRate,
|
|
|
|
List<TimeSeriesBean<Abundance_Level, Void>> abundanceLevel,
|
2016-11-04 16:26:19 +01:00
|
|
|
Exploitation_Rate exploitationRateForGrouping,
|
|
|
|
Abundance_Level abundanceLevelForGrouping,
|
2016-10-07 18:23:23 +02:00
|
|
|
String narrativeStateAndTrend, String scientificAdvice,
|
2016-11-04 16:26:19 +01:00
|
|
|
String reportingEntity, Long reportingYear, String stockUri,
|
2016-11-30 18:29:44 +01:00
|
|
|
List<String> waterArea, Stock_Type type) {
|
2016-10-07 18:23:23 +02:00
|
|
|
super();
|
|
|
|
this.stockName = stockName;
|
|
|
|
this.stockID = stockID;
|
|
|
|
this.speciesScientificName = speciesScientificName;
|
|
|
|
this.area = area;
|
|
|
|
this.exploitingFishery = exploitingFishery;
|
|
|
|
this.managementEntity = managementEntity;
|
|
|
|
this.assessmentMethods = assessmentMethods;
|
|
|
|
this.stateOfMarineResource = stateOfMarineResource;
|
|
|
|
this.exploitationRate = exploitationRate;
|
|
|
|
this.abundanceLevel = abundanceLevel;
|
2016-11-04 16:26:19 +01:00
|
|
|
this.exploitationRateForGrouping = exploitationRateForGrouping;
|
|
|
|
this.abundanceLevelForGrouping = abundanceLevelForGrouping;
|
2016-10-07 18:23:23 +02:00
|
|
|
this.narrativeStateAndTrend = narrativeStateAndTrend;
|
|
|
|
this.scientificAdvice = scientificAdvice;
|
|
|
|
this.reportingEntity = reportingEntity;
|
|
|
|
this.reportingYear = reportingYear;
|
2016-10-26 18:40:10 +02:00
|
|
|
this.stockUri = stockUri;
|
|
|
|
this.waterArea = waterArea;
|
2016-11-25 18:25:23 +01:00
|
|
|
this.type = type;
|
|
|
|
}
|
|
|
|
|
2016-11-30 18:29:44 +01:00
|
|
|
public Stock_Type getType() {
|
2016-11-25 18:25:23 +01:00
|
|
|
return type;
|
2016-10-26 18:40:10 +02:00
|
|
|
}
|
|
|
|
|
2016-11-30 18:29:44 +01:00
|
|
|
public void setType(Stock_Type type) {
|
2016-11-25 18:25:23 +01:00
|
|
|
this.type = type;
|
|
|
|
}
|
|
|
|
|
2016-11-04 16:26:19 +01:00
|
|
|
public Exploitation_Rate getExploitationRateForGrouping() {
|
|
|
|
return exploitationRateForGrouping;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setExploitationRateForGrouping(
|
|
|
|
Exploitation_Rate exploitationRateForGrouping) {
|
|
|
|
this.exploitationRateForGrouping = exploitationRateForGrouping;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Abundance_Level getAbundanceLevelForGrouping() {
|
|
|
|
return abundanceLevelForGrouping;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setAbundanceLevelForGrouping(
|
|
|
|
Abundance_Level abundanceLevelForGrouping) {
|
|
|
|
this.abundanceLevelForGrouping = abundanceLevelForGrouping;
|
|
|
|
}
|
|
|
|
|
2016-10-26 18:40:10 +02:00
|
|
|
public String getStockUri() {
|
|
|
|
return stockUri;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setStockUri(String stockUri) {
|
|
|
|
this.stockUri = stockUri;
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<String> getWaterArea() {
|
|
|
|
return waterArea;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setWaterArea(List<String> waterArea) {
|
|
|
|
this.waterArea = waterArea;
|
2016-10-07 18:23:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public String getStockName() {
|
|
|
|
return stockName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setStockName(String stockName) {
|
|
|
|
this.stockName = stockName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getStockID() {
|
|
|
|
return stockID;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setStockID(String stockID) {
|
|
|
|
this.stockID = stockID;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getSpeciesScientificName() {
|
|
|
|
return speciesScientificName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setSpeciesScientificName(String speciesScientificName) {
|
|
|
|
this.speciesScientificName = speciesScientificName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getArea() {
|
|
|
|
return area;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setArea(String area) {
|
|
|
|
this.area = area;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getExploitingFishery() {
|
|
|
|
return exploitingFishery;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setExploitingFishery(String exploitingFishery) {
|
|
|
|
this.exploitingFishery = exploitingFishery;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getManagementEntity() {
|
|
|
|
return managementEntity;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setManagementEntity(String managementEntity) {
|
|
|
|
this.managementEntity = managementEntity;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getAssessmentMethods() {
|
|
|
|
return assessmentMethods;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setAssessmentMethods(String assessmentMethods) {
|
|
|
|
this.assessmentMethods = assessmentMethods;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getStateOfMarineResource() {
|
|
|
|
return stateOfMarineResource;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setStateOfMarineResource(String stateOfMarineResource) {
|
|
|
|
this.stateOfMarineResource = stateOfMarineResource;
|
|
|
|
}
|
|
|
|
|
2016-11-24 17:53:50 +01:00
|
|
|
public List<TimeSeriesBean<Exploitation_Rate, Void>> getExploitationRate() {
|
2016-10-07 18:23:23 +02:00
|
|
|
return exploitationRate;
|
|
|
|
}
|
|
|
|
|
2016-11-24 17:53:50 +01:00
|
|
|
public void setExploitationRate(List<TimeSeriesBean<Exploitation_Rate, Void>> exploitationRate) {
|
2016-10-07 18:23:23 +02:00
|
|
|
this.exploitationRate = exploitationRate;
|
2016-11-25 13:56:27 +01:00
|
|
|
|
|
|
|
if(exploitationRate != null){
|
|
|
|
Collections.sort(exploitationRate);
|
|
|
|
}
|
2016-10-07 18:23:23 +02:00
|
|
|
}
|
|
|
|
|
2016-11-24 17:53:50 +01:00
|
|
|
public List<TimeSeriesBean<Abundance_Level, Void>> getAbundanceLevel() {
|
2016-10-07 18:23:23 +02:00
|
|
|
return abundanceLevel;
|
|
|
|
}
|
|
|
|
|
2016-11-24 17:53:50 +01:00
|
|
|
public void setAbundanceLevel(List<TimeSeriesBean<Abundance_Level, Void>> abundanceLevel) {
|
2016-10-07 18:23:23 +02:00
|
|
|
this.abundanceLevel = abundanceLevel;
|
2016-11-25 13:56:27 +01:00
|
|
|
|
|
|
|
if(abundanceLevel != null){
|
|
|
|
Collections.sort(abundanceLevel);
|
|
|
|
}
|
2016-10-07 18:23:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public String getNarrativeStateAndTrend() {
|
|
|
|
return narrativeStateAndTrend;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setNarrativeStateAndTrend(String narrativeStateAndTrend) {
|
|
|
|
this.narrativeStateAndTrend = narrativeStateAndTrend;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getScientificAdvice() {
|
|
|
|
return scientificAdvice;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setScientificAdvice(String scientificAdvice) {
|
|
|
|
this.scientificAdvice = scientificAdvice;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getReportingEntity() {
|
|
|
|
return reportingEntity;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setReportingEntity(String reportingEntity) {
|
|
|
|
this.reportingEntity = reportingEntity;
|
|
|
|
}
|
|
|
|
|
2016-10-08 23:10:25 +02:00
|
|
|
public Long getReportingYear() {
|
2016-10-07 18:23:23 +02:00
|
|
|
return reportingYear;
|
|
|
|
}
|
|
|
|
|
2016-10-08 23:10:25 +02:00
|
|
|
public void setReportingYear(Long reportingYear) {
|
2016-10-07 18:23:23 +02:00
|
|
|
this.reportingYear = reportingYear;
|
|
|
|
}
|
2016-10-26 18:40:10 +02:00
|
|
|
|
2016-10-07 18:23:23 +02:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
2016-11-25 18:25:23 +01:00
|
|
|
return "StockRecord [stockName=" + stockName + ", stockID=" + stockID
|
2016-10-07 18:23:23 +02:00
|
|
|
+ ", speciesScientificName=" + speciesScientificName
|
|
|
|
+ ", area=" + area + ", exploitingFishery=" + exploitingFishery
|
|
|
|
+ ", managementEntity=" + managementEntity
|
|
|
|
+ ", assessmentMethods=" + assessmentMethods
|
|
|
|
+ ", stateOfMarineResource=" + stateOfMarineResource
|
|
|
|
+ ", exploitationRate=" + exploitationRate
|
|
|
|
+ ", abundanceLevel=" + abundanceLevel
|
2016-11-04 16:26:19 +01:00
|
|
|
+ ", exploitationRateForGrouping="
|
|
|
|
+ exploitationRateForGrouping + ", abundanceLevelForGrouping="
|
|
|
|
+ abundanceLevelForGrouping + ", narrativeStateAndTrend="
|
|
|
|
+ narrativeStateAndTrend + ", scientificAdvice="
|
|
|
|
+ scientificAdvice + ", reportingEntity=" + reportingEntity
|
|
|
|
+ ", reportingYear=" + reportingYear + ", stockUri=" + stockUri
|
2016-11-25 18:25:23 +01:00
|
|
|
+ ", waterArea=" + waterArea + ", type=" + type + "]";
|
|
|
|
}
|
|
|
|
|
2016-10-07 18:23:23 +02:00
|
|
|
}
|