2017-08-04 15:04:35 +02:00
|
|
|
package org.gcube.data_catalogue.grsf_publish_ws.json.input.record;
|
2016-10-07 18:23:23 +02:00
|
|
|
|
2016-11-24 17:53:50 +01:00
|
|
|
import java.util.List;
|
|
|
|
|
2016-10-13 11:46:42 +02:00
|
|
|
import javax.validation.constraints.NotNull;
|
2016-12-01 22:41:24 +01:00
|
|
|
import javax.validation.constraints.Size;
|
2016-10-13 11:46:42 +02:00
|
|
|
|
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;
|
2017-10-27 14:37:41 +02:00
|
|
|
import org.gcube.datacatalogue.common.Constants;
|
|
|
|
import org.gcube.datacatalogue.common.enums.Fishery_Type;
|
|
|
|
import org.gcube.datacatalogue.common.enums.Production_System_Type;
|
2016-10-07 18:23:23 +02:00
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
|
|
|
|
/**
|
2017-10-04 17:30:07 +02:00
|
|
|
* A fishery record bean.
|
2018-09-03 11:07:06 +02:00
|
|
|
* @author Costantino Perciante (ISTI - CNR)
|
|
|
|
* @author Luca Frosini (ISTI - CNR)
|
2016-10-07 18:23:23 +02:00
|
|
|
*/
|
2018-09-03 11:07:06 +02:00
|
|
|
public class FisheryRecord extends Common {
|
2016-10-07 18:23:23 +02:00
|
|
|
|
2018-09-03 11:07:06 +02:00
|
|
|
|
2017-10-27 14:37:41 +02:00
|
|
|
@JsonProperty(Constants.FISHERY_NAME_JSON_KEY)
|
2016-10-13 11:46:42 +02:00
|
|
|
@NotNull(message="fishery_name cannot be null")
|
2016-12-01 22:41:24 +01:00
|
|
|
@Size(min=1, message="fishery_name cannot be empty")
|
2017-10-27 14:37:41 +02:00
|
|
|
@CustomField(key=Constants.FISHERY_NAME_CUSTOM_KEY)
|
2016-10-07 18:23:23 +02:00
|
|
|
private String fisheryName;
|
2016-10-09 12:36:25 +02:00
|
|
|
|
2017-10-27 14:37:41 +02:00
|
|
|
@JsonProperty(Constants.GRSF_SEMANTIC_IDENTIFIER_JSON_KEY)
|
|
|
|
@CustomField(key=Constants.GRSF_SEMANTIC_IDENTIFIER_CUSTOM_KEY)
|
2016-10-07 18:23:23 +02:00
|
|
|
private String fisheryId;
|
2016-10-09 12:36:25 +02:00
|
|
|
|
2017-10-27 14:37:41 +02:00
|
|
|
@JsonProperty(Constants.FISHING_AREA_JSON_KEY)
|
|
|
|
@CustomField(key=Constants.FISHING_AREA_CUSTOM_KEY)
|
2017-10-31 12:42:37 +01:00
|
|
|
@Tag
|
2016-12-01 15:37:26 +01:00
|
|
|
private List<String> fishingArea;
|
2016-10-09 12:36:25 +02:00
|
|
|
|
2017-10-27 14:37:41 +02:00
|
|
|
@JsonProperty(Constants.RESOURCES_EXPLOITED_JSON_KEY)
|
|
|
|
@CustomField(key=Constants.RESOURCES_EXPLOITED_CUSTOM_KEY)
|
2017-08-01 10:26:33 +02:00
|
|
|
private List<String> resourcesExploited;
|
2016-10-09 12:36:25 +02:00
|
|
|
|
2017-10-27 14:37:41 +02:00
|
|
|
@JsonProperty(Constants.JURISDICTION_AREA_JSON_KEY)
|
|
|
|
@CustomField(key=Constants.JURISDICTION_AREA_CUSTOM_KEY)
|
2016-12-01 15:37:26 +01:00
|
|
|
private List<String> jurisdictionArea;
|
2016-10-09 12:36:25 +02:00
|
|
|
|
2017-10-27 14:37:41 +02:00
|
|
|
@JsonProperty(Constants.PRODUCTION_SYSTEM_TYPE_JSON_KEY)
|
|
|
|
@CustomField(key=Constants.PRODUCTION_SYSTEM_TYPE_CUSTOM_KEY)
|
2016-12-09 14:06:19 +01:00
|
|
|
private List<Production_System_Type> productionSystemType;
|
2016-10-09 12:36:25 +02:00
|
|
|
|
2017-10-27 14:37:41 +02:00
|
|
|
@JsonProperty(Constants.FLAG_STATE_JSON_KEY)
|
|
|
|
@CustomField(key=Constants.FLAG_STATE_CUSTOM_KEY)
|
2018-05-10 16:41:02 +02:00
|
|
|
@Tag
|
2016-12-09 14:06:19 +01:00
|
|
|
private List<String> flagState;
|
2016-10-09 12:36:25 +02:00
|
|
|
|
2017-10-27 14:37:41 +02:00
|
|
|
@JsonProperty(Constants.FISHING_GEAR_JSON_KEY)
|
|
|
|
@CustomField(key=Constants.FISHING_GEAR_CUSTOM_KEY)
|
2018-05-10 16:41:02 +02:00
|
|
|
@Tag
|
2016-12-09 14:06:19 +01:00
|
|
|
private List<String> fishingGear;
|
2016-10-07 18:23:23 +02:00
|
|
|
|
2017-10-27 14:37:41 +02:00
|
|
|
@JsonProperty(Constants.GRSF_TYPE_JSON_KEY)
|
|
|
|
@CustomField(key=Constants.GRSF_TYPE_CUSTOM_KEY)
|
2016-11-25 18:25:23 +01:00
|
|
|
@Group
|
2017-10-25 16:45:34 +02:00
|
|
|
@Tag
|
2016-11-30 18:29:44 +01:00
|
|
|
private Fishery_Type type;
|
2016-11-24 17:53:50 +01:00
|
|
|
|
2016-10-07 18:23:23 +02:00
|
|
|
public FisheryRecord() {
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param fisheryName
|
|
|
|
* @param fisheryId
|
|
|
|
* @param fishingArea
|
2017-08-01 10:26:33 +02:00
|
|
|
* @param resourcesExploited
|
|
|
|
* @param managementBodyAuthorities
|
2016-10-07 18:23:23 +02:00
|
|
|
* @param jurisdictionArea
|
|
|
|
* @param productionSystemType
|
|
|
|
* @param flagState
|
|
|
|
* @param fishingGear
|
2016-11-25 18:25:23 +01:00
|
|
|
* @param type
|
2016-10-07 18:23:23 +02:00
|
|
|
*/
|
|
|
|
public FisheryRecord(String fisheryName, String fisheryId,
|
2017-08-01 10:26:33 +02:00
|
|
|
List<String> fishingArea, List<String> resourcesExploited,
|
|
|
|
List<String> jurisdictionArea,
|
2016-12-09 14:06:19 +01:00
|
|
|
List<Production_System_Type> productionSystemType,
|
2017-07-27 16:45:18 +02:00
|
|
|
List<String> flagState, List<String> fishingGear, Fishery_Type type) {
|
2016-10-07 18:23:23 +02:00
|
|
|
super();
|
|
|
|
this.fisheryName = fisheryName;
|
|
|
|
this.fisheryId = fisheryId;
|
|
|
|
this.fishingArea = fishingArea;
|
2017-08-01 10:26:33 +02:00
|
|
|
this.resourcesExploited = resourcesExploited;
|
2016-10-07 18:23:23 +02:00
|
|
|
this.jurisdictionArea = jurisdictionArea;
|
|
|
|
this.productionSystemType = productionSystemType;
|
|
|
|
this.flagState = flagState;
|
|
|
|
this.fishingGear = fishingGear;
|
2016-11-25 18:25:23 +01:00
|
|
|
this.type = type;
|
2016-10-07 18:23:23 +02:00
|
|
|
}
|
2017-05-24 16:53:31 +02:00
|
|
|
|
2016-10-07 18:23:23 +02:00
|
|
|
public String getFisheryName() {
|
|
|
|
return fisheryName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setFisheryName(String fisheryName) {
|
|
|
|
this.fisheryName = fisheryName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getFisheryId() {
|
|
|
|
return fisheryId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setFisheryId(String fisheryId) {
|
2018-01-17 10:27:30 +01:00
|
|
|
this.fisheryId = fisheryId;//super.cleanSemanticId(fisheryId);
|
2016-10-07 18:23:23 +02:00
|
|
|
}
|
|
|
|
|
2016-12-01 15:37:26 +01:00
|
|
|
public List<String> getFishingArea() {
|
2016-10-07 18:23:23 +02:00
|
|
|
return fishingArea;
|
|
|
|
}
|
|
|
|
|
2016-12-01 15:37:26 +01:00
|
|
|
public void setFishingArea(List<String> fishingArea) {
|
2016-10-07 18:23:23 +02:00
|
|
|
this.fishingArea = fishingArea;
|
|
|
|
}
|
|
|
|
|
2016-12-01 15:37:26 +01:00
|
|
|
public List<String> getJurisdictionArea() {
|
2016-10-07 18:23:23 +02:00
|
|
|
return jurisdictionArea;
|
|
|
|
}
|
|
|
|
|
2016-12-01 15:37:26 +01:00
|
|
|
public void setJurisdictionArea(List<String> jurisdictionArea) {
|
2016-10-07 18:23:23 +02:00
|
|
|
this.jurisdictionArea = jurisdictionArea;
|
|
|
|
}
|
|
|
|
|
2016-11-30 18:29:44 +01:00
|
|
|
public Fishery_Type getType() {
|
2016-11-25 18:25:23 +01:00
|
|
|
return type;
|
|
|
|
}
|
|
|
|
|
2016-11-30 18:29:44 +01:00
|
|
|
public void setType(Fishery_Type type) {
|
2016-11-25 18:25:23 +01:00
|
|
|
this.type = type;
|
|
|
|
}
|
|
|
|
|
2017-08-01 10:26:33 +02:00
|
|
|
public List<String> getResourcesExploited() {
|
|
|
|
return resourcesExploited;
|
2016-12-09 14:06:19 +01:00
|
|
|
}
|
|
|
|
|
2017-08-01 10:26:33 +02:00
|
|
|
public void setResourcesExploited(List<String> resourcesExploited) {
|
|
|
|
this.resourcesExploited = resourcesExploited;
|
2016-12-09 14:06:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-10-07 18:23:23 +02:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
2019-06-14 17:07:35 +02:00
|
|
|
return super.toString() + " - FisheryRecord [fisheryName=" + fisheryName + ", fisheryId="
|
2017-07-10 16:41:24 +02:00
|
|
|
+ fisheryId + ", fishingArea=" + fishingArea
|
2017-08-01 10:26:33 +02:00
|
|
|
+ ", resourcesExploited=" + resourcesExploited
|
2016-10-07 18:23:23 +02:00
|
|
|
+ ", jurisdictionArea=" + jurisdictionArea
|
|
|
|
+ ", productionSystemType=" + productionSystemType
|
|
|
|
+ ", flagState=" + flagState + ", fishingGear=" + fishingGear
|
2017-07-04 16:41:56 +02:00
|
|
|
+ ", type=" + type + "]";
|
2016-10-07 18:23:23 +02:00
|
|
|
}
|
2016-12-01 19:19:22 +01:00
|
|
|
|
2017-07-12 18:05:35 +02:00
|
|
|
}
|