297 lines
7.8 KiB
Java
297 lines
7.8 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.CkanResource;
|
|
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 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")
|
|
@Tag
|
|
@NotNull(message="species_scientific_name cannot be null")
|
|
@Size(min=1, message="species_scientific_name cannot be empty")
|
|
@CustomField(key="Species scientific name")
|
|
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")
|
|
@Group
|
|
@Tag
|
|
@CkanResource(inspect=true)
|
|
@Valid
|
|
private Resource exploitationRate;
|
|
|
|
@JsonProperty("abundance_level")
|
|
@Group
|
|
@Tag
|
|
@CkanResource(inspect=true)
|
|
@Valid
|
|
private Resource abundanceLevel;
|
|
|
|
@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;// TODO check that multiple values are mapped to ckan
|
|
|
|
|
|
public StockRecord() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* @param stockName
|
|
* @param stockID
|
|
* @param speciesScientificName
|
|
* @param area
|
|
* @param exploitingFishery
|
|
* @param managementEntity
|
|
* @param assessmentMethods
|
|
* @param stateOfMarineResource
|
|
* @param exploitationRate
|
|
* @param abundanceLevel
|
|
* @param narrativeStateAndTrend
|
|
* @param scientificAdvice
|
|
* @param reportingEntity
|
|
* @param reportingYear
|
|
* @param status
|
|
* @param stockUri
|
|
* @param waterArea
|
|
*/
|
|
public StockRecord(String stockName, String stockID,
|
|
String speciesScientificName, String area,
|
|
String exploitingFishery, String managementEntity,
|
|
String assessmentMethods, String stateOfMarineResource,
|
|
Resource exploitationRate, Resource abundanceLevel,
|
|
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.narrativeStateAndTrend = narrativeStateAndTrend;
|
|
this.scientificAdvice = scientificAdvice;
|
|
this.reportingEntity = reportingEntity;
|
|
this.reportingYear = reportingYear;
|
|
this.stockUri = stockUri;
|
|
this.waterArea = waterArea;
|
|
}
|
|
|
|
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 Resource getExploitationRate() {
|
|
return exploitationRate;
|
|
}
|
|
|
|
public void setExploitationRate(Resource exploitationRate) {
|
|
this.exploitationRate = exploitationRate;
|
|
}
|
|
|
|
public Resource getAbundanceLevel() {
|
|
return abundanceLevel;
|
|
}
|
|
|
|
public void setAbundanceLevel(Resource 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
|
|
+ ", narrativeStateAndTrend=" + narrativeStateAndTrend
|
|
+ ", scientificAdvice=" + scientificAdvice
|
|
+ ", reportingEntity=" + reportingEntity + ", reportingYear="
|
|
+ reportingYear + ", stockUri=" + stockUri + ", waterArea="
|
|
+ waterArea + "]";
|
|
}
|
|
}
|