package org.gcube.data_catalogue.grsf_publish_ws.AAA_PORTED; import java.util.List; import javax.validation.Valid; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import org.gcube.datacatalogue.common.AAA_PORTED.Abundance_Level; import org.gcube.datacatalogue.common.AAA_PORTED.Constants; import org.gcube.datacatalogue.common.AAA_PORTED.Fishing_Pressure; import org.gcube.datacatalogue.common.AAA_PORTED.Stock_Type; import com.fasterxml.jackson.annotation.JsonProperty; /** * A stock record bean. * @author Costantino Perciante (ISTI - CNR) * @author Luca Frosini (ISTI - CNR) */ public class StockRecord extends Common{ @JsonProperty(Constants.STOCK_NAME_JSON_KEY) @NotNull(message=Constants.STOCK_NAME_JSON_KEY + " cannot be null") @Size(min=2, message=Constants.STOCK_NAME_JSON_KEY + " cannot be empty") @CustomField(key=Constants.STOCK_NAME_CUSTOM_KEY) private String stockName; @JsonProperty(Constants.GRSF_SEMANTIC_IDENTIFIER_JSON_KEY) @CustomField(key=Constants.GRSF_SEMANTIC_IDENTIFIER_CUSTOM_KEY) private String stockId; @JsonProperty(Constants.ASSESSMENT_AREA_JSON_KEY) @CustomField(key=Constants.ASSESSMENT_AREA_CUSTOM_KEY) @Tag private List area; @JsonProperty(Constants.EXPLOITING_FISHERY_JSON_KEY) @CustomField(key=Constants.EXPLOITING_FISHERY_CUSTOM_KEY) private List exploitingFishery; @JsonProperty(Constants.ASSESSMENT_METHODS_JSON_KEY) @CustomField(key=Constants.ASSESSMENT_METHODS_CUSTOM_KEY) private List assessmentMethods; @JsonProperty(Constants.FIRMS_ABUNDANCE_LEVEL_JSON_KEY) @CustomField(key=Constants.FIRMS_ABUNDANCE_LEVEL_CUSTOM_KEY) @TimeSeries @Group(groupNameOverValue=Constants.FIRMS_ABUNDANCE_LEVEL_CUSTOM_KEY, prependSourceToGroupName=false) @Valid private List> abundanceLevelStandard; @JsonProperty(Constants.ABUNDANCE_LEVEL_JSON_KEY) @CustomField(key=Constants.ABUNDANCE_LEVEL_CUSTOM_KEY) @TimeSeries @Group(groupNameOverValue=Constants.ABUNDANCE_LEVEL_CUSTOM_KEY, prependSourceToGroupName=false) @Valid private List> abundanceLevel; @JsonProperty(Constants.BIOMASS_JSON_KEY) @CustomField(key=Constants.BIOMASS_CUSTOM_KEY) @TimeSeries @Group(groupNameOverValue=Constants.BIOMASS_CUSTOM_KEY, prependSourceToGroupName=false) @Valid private List> biomass; @JsonProperty(Constants.FISHING_PRESSURE_FIRMS_JSON_KEY) @CustomField(key=Constants.FISHING_PRESSURE_FIRMS_CUSTOM_KEY) @TimeSeries @Group(groupNameOverValue=Constants.FISHING_PRESSURE_FIRMS_CUSTOM_KEY, prependSourceToGroupName=false) @Valid private List> fishingPressureStandard; @JsonProperty(Constants.FISHING_PRESSURE_JSON_KEY) @CustomField(key=Constants.FISHING_PRESSURE_CUSTOM_KEY) @TimeSeries @Group(groupNameOverValue=Constants.FISHING_PRESSURE_CUSTOM_KEY, prependSourceToGroupName=false) @Valid private List> fishingPressure; @JsonProperty(Constants.STATE_AND_TREND_MARINE_RESOURCE_JSON_KEY) @CustomField(key=Constants.STATE_AND_TREND_MARINE_RESOURCE_CUSTOM_KEY) @TimeSeries @Group(groupNameOverValue=Constants.STATE_AND_TREND_MARINE_RESOURCE_CUSTOM_KEY, prependSourceToGroupName=false) @Valid private List> narrativeState; @JsonProperty(Constants.FAO_CATEGORIES_JSON_KEY) @CustomField(key=Constants.FAO_CATEGORIES_CUSTOM_KEY) @TimeSeries @Group(groupNameOverValue=Constants.FAO_CATEGORIES_CUSTOM_KEY, prependSourceToGroupName=false) @Valid private List> faoState; @JsonProperty(Constants.SCIENTIFIC_ADVICE_JSON_KEY) @CustomField(key=Constants.SCIENTIFIC_ADVICE_CUSTOM_KEY) @Group(groupNameOverValue=Constants.SCIENTIFIC_ADVICE_CUSTOM_KEY, prependSourceToGroupName=false) private List scientificAdvice; @JsonProperty(Constants.ASSESSOR_JSON_KEY) @CustomField(key=Constants.ASSESSOR_CUSTOM_KEY) private String assessor; @JsonProperty(Constants.GRSF_TYPE_JSON_KEY) @CustomField(key=Constants.GRSF_TYPE_CUSTOM_KEY) @Group @Tag private Stock_Type type; public StockRecord() { super(); } /** * @param stockName * @param stockId * @param area * @param exploitingFishery * @param managementEntity * @param assessmentMethods * @param abundanceLevelStandard * @param abundanceLevel * @param fishingPressureStandard * @param fishingPressure * @param narrativeState * @param faoState * @param scientificAdvice * @param assessor * @param type */ public StockRecord( String stockName, String stockId, List area, List exploitingFishery, List assessmentMethods, List> abundanceLevelStandard, List> abundanceLevel, List> biomass, List> fishingPressureStandard, List> fishingPressure, List> narrativeState, List> faoState, List scientificAdvice, String assessor, Stock_Type type) { super(); this.stockName = stockName; this.stockId = stockId; this.area = area; this.exploitingFishery = exploitingFishery; this.assessmentMethods = assessmentMethods; this.abundanceLevelStandard = abundanceLevelStandard; this.abundanceLevel = abundanceLevel; this.biomass = biomass; this.fishingPressureStandard = fishingPressureStandard; this.fishingPressure = fishingPressure; this.narrativeState = narrativeState; this.faoState = faoState; this.scientificAdvice = scientificAdvice; this.assessor = assessor; this.type = type; } public void setAssessmentMethods(List assessmentMethods) { this.assessmentMethods = assessmentMethods; } public Stock_Type getType() { return type; } public void setType(Stock_Type type) { this.type = type; } 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 List getArea() { return area; } public List> getFishingPressureStandard() { return fishingPressureStandard; } public void setFishingPressureStandard( List> fishingPressureStandard) { this.fishingPressureStandard = fishingPressureStandard; } public List> getFishingPressure() { return fishingPressure; } public void setFishingPressure( List> fishingPressure) { this.fishingPressure = fishingPressure; } public void setArea(List area) { this.area = area; } public List getExploitingFishery() { return exploitingFishery; } public void setExploitingFishery(List exploitingFishery) { this.exploitingFishery = exploitingFishery; } public List> getAbundanceLevelStandard() { return abundanceLevelStandard; } public void setAbundanceLevelStandard( List> abundanceLevelStandard) { this.abundanceLevelStandard = abundanceLevelStandard; } public List> getAbundanceLevel() { return abundanceLevel; } public void setAbundanceLevel( List> abundanceLevel) { this.abundanceLevel = abundanceLevel; } public List> getBiomass() { return biomass; } public void setBiomass( List> biomass) { this.biomass = biomass; } public List> getNarrativeState() { return narrativeState; } public void setNarrativeState(List> narrativeState) { this.narrativeState = narrativeState; } public List getScientificAdvice() { return scientificAdvice; } public void setScientificAdvice(List scientificAdvice) { this.scientificAdvice = scientificAdvice; } public String getAssessor() { return assessor; } public void setAssessor(String assessor) { this.assessor = assessor; } public List> getFaoState() { return faoState; } public void setFaoState(List> faoState) { this.faoState = faoState; } public List getAssessmentMethods() { return assessmentMethods; } @Override public String toString() { return super.toString() + "- StockRecord [stockName=" + stockName + ", stockId=" + stockId + ", area=" + area + ", exploitingFishery=" + exploitingFishery + ", assessmentMethods=" + assessmentMethods + ", abundanceLevelStandard=" + abundanceLevelStandard + ", abundanceLevel=" + abundanceLevel + ", biomass=" + biomass + ", fishingPressureStandard=" + fishingPressureStandard + ", fishingPressure=" + fishingPressure + ", narrativeState=" + narrativeState + ", faoState=" + faoState + ", scientificAdvice=" + scientificAdvice + ", assessor=" + assessor + ", type=" + type + "]"; } }