grsf-publisher-ws/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/json/input/FisheryRecord.java

197 lines
5.1 KiB
Java

package org.gcube.data_catalogue.grsf_publish_ws.json.input;
import java.util.List;
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.Fishery_Type;
import org.gcube.data_catalogue.grsf_publish_ws.utils.groups.Production_System_Type;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* A record bean
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class FisheryRecord extends Common{
@JsonProperty("fishery_name")
@NotNull(message="fishery_name cannot be null")
@Size(min=1, message="fishery_name cannot be empty")
@CustomField(key="GRSF Name")
private String fisheryName;
@JsonProperty("fishery_id")
@CustomField(key="GRSF Semantic identifier")
private String fisheryId;
@JsonProperty("fishing_area")
@CustomField(key="Fishing area")
private List<String> fishingArea;
@JsonProperty("exploited_stocks")
@CustomField(key="Resources Exploited")
private List<String> exploitingStocks;
@JsonProperty("management_entity")
@CustomField(key="Management Body/Authority(ies)")
private List<String> managementEntity;
@JsonProperty("jurisdiction_area")
@CustomField(key="Jurisdiction Area")
@Tag
private List<String> jurisdictionArea;
@JsonProperty("production_system_type")
@CustomField(key="Type of Production System")
@Tag
private List<Production_System_Type> productionSystemType;
@JsonProperty("flag_state")
@CustomField(key="Flag State")
@Tag
private List<String> flagState;
@JsonProperty("fishing_gear")
@CustomField(key="Fishing gear")
private List<String> fishingGear;
@JsonProperty("type")
@CustomField(key="GRSF Type")
@Group
private Fishery_Type type;
public FisheryRecord() {
super();
}
/**
* @param fisheryName
* @param fisheryId
* @param fishingArea
* @param exploitingStocks
* @param managementEntity
* @param jurisdictionArea
* @param productionSystemType
* @param flagState
* @param fishingGear
* @param type
*/
public FisheryRecord(String fisheryName, String fisheryId,
List<String> fishingArea, List<String> exploitingStocks,
List<String> managementEntity, List<String> jurisdictionArea,
List<Production_System_Type> productionSystemType,
List<String> flagState, List<String> fishingGear, Fishery_Type type) {
super();
this.fisheryName = fisheryName;
this.fisheryId = fisheryId;
this.fishingArea = fishingArea;
this.exploitingStocks = exploitingStocks;
this.managementEntity = managementEntity;
this.jurisdictionArea = jurisdictionArea;
this.productionSystemType = productionSystemType;
this.flagState = flagState;
this.fishingGear = fishingGear;
this.type = type;
}
public String getFisheryName() {
return fisheryName;
}
public void setFisheryName(String fisheryName) {
this.fisheryName = fisheryName;
}
public String getFisheryId() {
return fisheryId;
}
public void setFisheryId(String fisheryId) {
this.fisheryId = fisheryId;
}
public List<String> getFishingArea() {
return fishingArea;
}
public void setFishingArea(List<String> fishingArea) {
this.fishingArea = fishingArea;
}
public List<String> getJurisdictionArea() {
return jurisdictionArea;
}
public void setJurisdictionArea(List<String> jurisdictionArea) {
this.jurisdictionArea = jurisdictionArea;
}
public Fishery_Type getType() {
return type;
}
public void setType(Fishery_Type type) {
this.type = type;
}
public List<String> getExploitingStocks() {
return exploitingStocks;
}
public void setExploitingStocks(List<String> exploitingStocks) {
this.exploitingStocks = exploitingStocks;
}
public List<String> getManagementEntity() {
return managementEntity;
}
public void setManagementEntity(List<String> managementEntity) {
this.managementEntity = managementEntity;
}
public List<Production_System_Type> getProductionSystemType() {
return productionSystemType;
}
public void setProductionSystemType(
List<Production_System_Type> productionSystemType) {
this.productionSystemType = productionSystemType;
}
public List<String> getFlagState() {
return flagState;
}
public void setFlagState(List<String> flagState) {
this.flagState = flagState;
}
public List<String> getFishingGear() {
return fishingGear;
}
public void setFishingGear(List<String> fishingGear) {
this.fishingGear = fishingGear;
}
@Override
public String toString() {
return "FisheryRecord [fisheryName=" + fisheryName + ", fisheryId="
+ fisheryId + ", fishingArea=" + fishingArea
+ ", exploitingStocks=" + exploitingStocks
+ ", managementEntity=" + managementEntity
+ ", jurisdictionArea=" + jurisdictionArea
+ ", productionSystemType=" + productionSystemType
+ ", flagState=" + flagState + ", fishingGear=" + fishingGear
+ ", type=" + type + "]";
}
}