minor fixes

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/grsf-publisher-ws@150982 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2017-07-10 14:41:24 +00:00
parent 704984215c
commit 983104aad2
6 changed files with 40 additions and 45 deletions

View File

@ -37,7 +37,7 @@ public class Base {
// filled automatically by the service
@JsonProperty("author")
private String author;
// filled automatically by the service
@JsonProperty("author_contact")
private String authorContact;
@ -175,7 +175,7 @@ public class Base {
public void setUuid(String uuid) {
this.uuid = uuid;
}
/**
* Use for generics object (unrecognized from Jackson) to be put into the map
* @param key

View File

@ -95,12 +95,6 @@ public class Common extends Base{
@CustomField(key="Species")
private List<String> species;
@JsonProperty("fao_state")
@CustomField(key="Fao State")
@TimeSeries
@Valid
private List<TimeSeriesBean<String, Void>> faoState;
public Common() {
super();
}
@ -145,7 +139,6 @@ public class Common extends Base{
this.catches = catches;
this.landings = landings;
this.species = species;
this.faoState = faoState;
}
public String getGrsfType() {
@ -159,7 +152,7 @@ public class Common extends Base{
public String getSourceType() {
return sourceType;
return sourceType;
}
@ -268,14 +261,6 @@ public class Common extends Base{
this.referenceYear = referenceYear;
}
public List<TimeSeriesBean<String, Void>> getFaoState() {
return faoState;
}
public void setFaoState(List<TimeSeriesBean<String, Void>> faoState) {
this.faoState = faoState;
}
@Override
public String toString() {
return "Common [dataOwner=" + dataOwner + ", databaseSources="
@ -286,7 +271,7 @@ public class Common extends Base{
+ reportingYear + ", referenceYear=" + referenceYear
+ ", grsfType=" + grsfType + ", sourceType=" + sourceType
+ ", catches=" + catches + ", landings=" + landings
+ ", species=" + species + ", faoState=" + faoState + "]";
+ ", species=" + species + "]";
}
}

View File

@ -31,14 +31,9 @@ public class FisheryRecord extends Common{
@CustomField(key="Fishery id")
private String fisheryId;
@JsonProperty("species")
@Tag
@CustomField(key="Species")
private List<String> species;
@JsonProperty("fishing_area")
@CustomField(key="Fishing area")
@Tag
//@Tag
private List<String> fishingArea;
@JsonProperty("exploited_stocks")
@ -47,7 +42,7 @@ public class FisheryRecord extends Common{
@JsonProperty("management_entity")
@CustomField(key="Management entity")
@Tag
//@Tag
private List<String> managementEntity;
@JsonProperty("jurisdiction_area")
@ -67,14 +62,14 @@ public class FisheryRecord extends Common{
private List<String> flagState;
@JsonProperty("fishing_gear")
@Tag
//@Tag
@CustomField(key="Fishing gear")
private List<String> fishingGear;
@JsonProperty("environment")
@CustomField(key="Environment")
private String environment;
@JsonProperty("fishery_uri")
@CustomField(key="Fishery Uri")
private String fisheryUri;
@ -92,7 +87,6 @@ public class FisheryRecord extends Common{
/**
* @param fisheryName
* @param fisheryId
* @param species
* @param fishingArea
* @param exploitingStocks
* @param managementEntity
@ -105,16 +99,14 @@ public class FisheryRecord extends Common{
* @param type
*/
public FisheryRecord(String fisheryName, String fisheryId,
List<String> species, List<String> fishingArea,
List<String> exploitingStocks, List<String> managementEntity,
List<String> jurisdictionArea,
List<String> fishingArea, List<String> exploitingStocks,
List<String> managementEntity, List<String> jurisdictionArea,
List<Production_System_Type> productionSystemType,
List<String> flagState, List<String> fishingGear,
String environment, String fisheryUri, Fishery_Type type) {
super();
this.fisheryName = fisheryName;
this.fisheryId = fisheryId;
this.species = species;
this.fishingArea = fishingArea;
this.exploitingStocks = exploitingStocks;
this.managementEntity = managementEntity;
@ -183,14 +175,6 @@ public class FisheryRecord extends Common{
this.type = type;
}
public List<String> getSpecies() {
return species;
}
public void setSpecies(List<String> species) {
this.species = species;
}
public List<String> getExploitingStocks() {
return exploitingStocks;
}
@ -235,8 +219,8 @@ public class FisheryRecord extends Common{
@Override
public String toString() {
return "FisheryRecord [fisheryName=" + fisheryName + ", fisheryId="
+ fisheryId + ", species=" + species + ", fishingArea="
+ fishingArea + ", exploitingStocks=" + exploitingStocks
+ fisheryId + ", fishingArea=" + fishingArea
+ ", exploitingStocks=" + exploitingStocks
+ ", managementEntity=" + managementEntity
+ ", jurisdictionArea=" + jurisdictionArea
+ ", productionSystemType=" + productionSystemType

View File

@ -120,6 +120,12 @@ public class StockRecord extends Common{
@Group
private Stock_Type type;
@JsonProperty("fao_state")
@CustomField(key="Fao State")
@TimeSeries
@Valid
private List<TimeSeriesBean<String, Void>> faoState;
public StockRecord() {
super();
}
@ -144,6 +150,7 @@ public class StockRecord extends Common{
* @param stockUri
* @param waterArea
* @param type
* @param faoState
*/
public StockRecord(
String stockName,
@ -161,7 +168,8 @@ public class StockRecord extends Common{
List<TimeSeriesBean<String, String>> fishingPressure,
List<TimeSeriesBean<String, Void>> narrativeState,
String scientificAdvice, String assessor, String stockUri,
List<String> waterArea, Stock_Type type) {
List<String> waterArea, Stock_Type type,
List<TimeSeriesBean<String, Void>> faoState) {
super();
this.stockName = stockName;
this.stockId = stockId;
@ -182,8 +190,11 @@ public class StockRecord extends Common{
this.stockUri = stockUri;
this.waterArea = waterArea;
this.type = type;
this.faoState = faoState;
}
public void setAssessmentMethods(List<String> assessmentMethods) {
this.assessmentMethods = assessmentMethods;
}
@ -338,6 +349,18 @@ public class StockRecord extends Common{
this.exploitationRate = exploitationRate;
}
public List<TimeSeriesBean<String, Void>> getFaoState() {
return faoState;
}
public void setFaoState(List<TimeSeriesBean<String, Void>> faoState) {
this.faoState = faoState;
}
public List<String> getAssessmentMethods() {
return assessmentMethods;
}
@Override
public String toString() {
return "StockRecord [stockName=" + stockName + ", stockId=" + stockId
@ -353,7 +376,8 @@ public class StockRecord extends Common{
+ ", fishingPressure=" + fishingPressure + ", narrativeState="
+ narrativeState + ", scientificAdvice=" + scientificAdvice
+ ", assessor=" + assessor + ", stockUri=" + stockUri
+ ", waterArea=" + waterArea + ", type=" + type + "]";
+ ", waterArea=" + waterArea + ", type=" + type + ", faoState="
+ faoState + "]";
}
}

View File

@ -291,6 +291,7 @@ public class GrsfPublisherFisheryService {
// write a post if the product has been published in grsf context
if(context.equals((String)contextServlet.getInitParameter(HelperMethods.PUBLIC_CONTEX_KEY))){
// TODO uncomment later
/*new WritePostCatalogueManagerThread(
context,
token,

View File

@ -288,6 +288,7 @@ public class GrsfPublisherStockService {
// write a post if the product has been published in grsf context
if(context.equals((String)contextServlet.getInitParameter(HelperMethods.PUBLIC_CONTEX_KEY))){
// TODO uncomment later
/*new WritePostCatalogueManagerThread(
context,
token,