330 lines
9.3 KiB
Java
330 lines
9.3 KiB
Java
package org.gcube.data_catalogue.grsf_publish_ws.json.input;
|
|
|
|
import java.util.List;
|
|
|
|
import javax.validation.Valid;
|
|
import javax.validation.constraints.NotNull;
|
|
import javax.validation.constraints.Size;
|
|
|
|
import org.gcube.data_catalogue.grsf_publish_ws.custom_annotations.CustomField;
|
|
import org.gcube.data_catalogue.grsf_publish_ws.custom_annotations.Group;
|
|
import org.gcube.data_catalogue.grsf_publish_ws.custom_annotations.Tag;
|
|
import org.gcube.data_catalogue.grsf_publish_ws.utils.groups.Abundance_Level;
|
|
import org.gcube.data_catalogue.grsf_publish_ws.utils.groups.Exploitation_Rate;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
/**
|
|
* A stock record bean
|
|
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
|
*/
|
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
|
public class StockRecord extends Common{
|
|
|
|
@JsonProperty("stock_name")
|
|
@NotNull(message="stock_name cannot be null")
|
|
@Size(min=2, message="stock_name cannot be empty")
|
|
@CustomField(key="Stock Name")
|
|
private String stockName;
|
|
|
|
@JsonProperty("stock_id")
|
|
@CustomField(key="Stock Id")
|
|
private String stockID;
|
|
|
|
@JsonProperty("species_scientific_name")
|
|
@CustomField(key="Species scientific name")
|
|
@Tag
|
|
@NotNull(message="species_scientific_name cannot be null")
|
|
@Size(min=1, message="species_scientific_name cannot be empty")
|
|
private String speciesScientificName;
|
|
|
|
@JsonProperty("assessment_distribution_area")
|
|
@CustomField(key="Assessment distribution area")
|
|
@NotNull(message="assessment distribution cannot be null")
|
|
@Size(min=1, message="assessment distribution area cannot be empty")
|
|
private String area;
|
|
|
|
@JsonProperty("exploiting_fishery")
|
|
@CustomField(key="Exploiting fishery")
|
|
private String exploitingFishery;
|
|
|
|
@JsonProperty("management_entity")
|
|
@CustomField(key="Management entity")
|
|
private String managementEntity;
|
|
|
|
@JsonProperty("assessment_methods")
|
|
@CustomField(key="Assessment methods")
|
|
private String assessmentMethods;
|
|
|
|
@JsonProperty("state_of_marine_resource")
|
|
@CustomField(key="State of marine resources")
|
|
private String stateOfMarineResource;
|
|
|
|
@JsonProperty("exploitation_rate")
|
|
@CustomField(key="Exploitation Rate")
|
|
@Tag
|
|
@Valid
|
|
private List<TimeSeriesBean<Exploitation_Rate, Void>> exploitationRate;
|
|
|
|
@JsonProperty("abundance_level")
|
|
@CustomField(key="Abundance Level")
|
|
@Tag
|
|
@Valid
|
|
private List<TimeSeriesBean<Abundance_Level, Void>> abundanceLevel;
|
|
|
|
@JsonProperty("exploitation_rate_for_grouping")
|
|
@Group
|
|
private Exploitation_Rate exploitationRateForGrouping;
|
|
|
|
@JsonProperty("abundance_level_for_grouping")
|
|
@Group
|
|
private Abundance_Level abundanceLevelForGrouping;
|
|
|
|
@JsonProperty("narrative_state_and_trend")
|
|
@CustomField(key="Narrative state and trend")
|
|
private String narrativeStateAndTrend;
|
|
|
|
@JsonProperty("scientific_advice")
|
|
@CustomField(key="Scientific advice")
|
|
private String scientificAdvice;
|
|
|
|
@JsonProperty("reporting_entity")
|
|
@CustomField(key="Reporting entity")
|
|
private String reportingEntity;
|
|
|
|
@JsonProperty("reporting_year")
|
|
@CustomField(key="Reporting year")
|
|
private Long reportingYear;
|
|
|
|
@JsonProperty("stock_uri")
|
|
@CustomField(key="Stock Uri")
|
|
private String stockUri;
|
|
|
|
@JsonProperty("water_area")
|
|
@CustomField(key="Water Area")
|
|
private List<String> waterArea;
|
|
|
|
public StockRecord() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Create a Stock element.
|
|
* @param stockName
|
|
* @param stockID
|
|
* @param speciesScientificName
|
|
* @param area
|
|
* @param exploitingFishery
|
|
* @param managementEntity
|
|
* @param assessmentMethods
|
|
* @param stateOfMarineResource
|
|
* @param exploitationRate
|
|
* @param abundanceLevel
|
|
* @param exploitationRateForGrouping
|
|
* @param abundanceLevelForGrouping
|
|
* @param narrativeStateAndTrend
|
|
* @param scientificAdvice
|
|
* @param reportingEntity
|
|
* @param reportingYear
|
|
* @param stockUri
|
|
* @param waterArea
|
|
*/
|
|
public StockRecord(String stockName, String stockID,
|
|
String speciesScientificName, String area,
|
|
String exploitingFishery, String managementEntity,
|
|
String assessmentMethods, String stateOfMarineResource,
|
|
List<TimeSeriesBean<Exploitation_Rate, Void>> exploitationRate,
|
|
List<TimeSeriesBean<Abundance_Level, Void>> abundanceLevel,
|
|
Exploitation_Rate exploitationRateForGrouping,
|
|
Abundance_Level abundanceLevelForGrouping,
|
|
String narrativeStateAndTrend, String scientificAdvice,
|
|
String reportingEntity, Long reportingYear, String stockUri,
|
|
List<String> waterArea) {
|
|
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;
|
|
this.exploitationRateForGrouping = exploitationRateForGrouping;
|
|
this.abundanceLevelForGrouping = abundanceLevelForGrouping;
|
|
this.narrativeStateAndTrend = narrativeStateAndTrend;
|
|
this.scientificAdvice = scientificAdvice;
|
|
this.reportingEntity = reportingEntity;
|
|
this.reportingYear = reportingYear;
|
|
this.stockUri = stockUri;
|
|
this.waterArea = waterArea;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
public List<TimeSeriesBean<Exploitation_Rate, Void>> getExploitationRate() {
|
|
return exploitationRate;
|
|
}
|
|
|
|
public void setExploitationRate(List<TimeSeriesBean<Exploitation_Rate, Void>> exploitationRate) {
|
|
this.exploitationRate = exploitationRate;
|
|
}
|
|
|
|
public List<TimeSeriesBean<Abundance_Level, Void>> getAbundanceLevel() {
|
|
return abundanceLevel;
|
|
}
|
|
|
|
public void setAbundanceLevel(List<TimeSeriesBean<Abundance_Level, Void>> abundanceLevel) {
|
|
this.abundanceLevel = abundanceLevel;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
public Long getReportingYear() {
|
|
return reportingYear;
|
|
}
|
|
|
|
public void setReportingYear(Long reportingYear) {
|
|
this.reportingYear = reportingYear;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "StockRecord [" + super.toString() + "stockName=" + stockName + ", stockID=" + stockID
|
|
+ ", speciesScientificName=" + speciesScientificName
|
|
+ ", area=" + area + ", exploitingFishery=" + exploitingFishery
|
|
+ ", managementEntity=" + managementEntity
|
|
+ ", assessmentMethods=" + assessmentMethods
|
|
+ ", stateOfMarineResource=" + stateOfMarineResource
|
|
+ ", exploitationRate=" + exploitationRate
|
|
+ ", abundanceLevel=" + abundanceLevel
|
|
+ ", exploitationRateForGrouping="
|
|
+ exploitationRateForGrouping + ", abundanceLevelForGrouping="
|
|
+ abundanceLevelForGrouping + ", narrativeStateAndTrend="
|
|
+ narrativeStateAndTrend + ", scientificAdvice="
|
|
+ scientificAdvice + ", reportingEntity=" + reportingEntity
|
|
+ ", reportingYear=" + reportingYear + ", stockUri=" + stockUri
|
|
+ ", waterArea=" + waterArea + "]";
|
|
}
|
|
}
|