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

View File

@ -95,12 +95,6 @@ public class Common extends Base{
@CustomField(key="Species") @CustomField(key="Species")
private List<String> species; private List<String> species;
@JsonProperty("fao_state")
@CustomField(key="Fao State")
@TimeSeries
@Valid
private List<TimeSeriesBean<String, Void>> faoState;
public Common() { public Common() {
super(); super();
} }
@ -145,7 +139,6 @@ public class Common extends Base{
this.catches = catches; this.catches = catches;
this.landings = landings; this.landings = landings;
this.species = species; this.species = species;
this.faoState = faoState;
} }
public String getGrsfType() { public String getGrsfType() {
@ -159,7 +152,7 @@ public class Common extends Base{
public String getSourceType() { public String getSourceType() {
return sourceType; return sourceType;
} }
@ -268,14 +261,6 @@ public class Common extends Base{
this.referenceYear = referenceYear; this.referenceYear = referenceYear;
} }
public List<TimeSeriesBean<String, Void>> getFaoState() {
return faoState;
}
public void setFaoState(List<TimeSeriesBean<String, Void>> faoState) {
this.faoState = faoState;
}
@Override @Override
public String toString() { public String toString() {
return "Common [dataOwner=" + dataOwner + ", databaseSources=" return "Common [dataOwner=" + dataOwner + ", databaseSources="
@ -286,7 +271,7 @@ public class Common extends Base{
+ reportingYear + ", referenceYear=" + referenceYear + reportingYear + ", referenceYear=" + referenceYear
+ ", grsfType=" + grsfType + ", sourceType=" + sourceType + ", grsfType=" + grsfType + ", sourceType=" + sourceType
+ ", catches=" + catches + ", landings=" + landings + ", 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") @CustomField(key="Fishery id")
private String fisheryId; private String fisheryId;
@JsonProperty("species")
@Tag
@CustomField(key="Species")
private List<String> species;
@JsonProperty("fishing_area") @JsonProperty("fishing_area")
@CustomField(key="Fishing area") @CustomField(key="Fishing area")
@Tag //@Tag
private List<String> fishingArea; private List<String> fishingArea;
@JsonProperty("exploited_stocks") @JsonProperty("exploited_stocks")
@ -47,7 +42,7 @@ public class FisheryRecord extends Common{
@JsonProperty("management_entity") @JsonProperty("management_entity")
@CustomField(key="Management entity") @CustomField(key="Management entity")
@Tag //@Tag
private List<String> managementEntity; private List<String> managementEntity;
@JsonProperty("jurisdiction_area") @JsonProperty("jurisdiction_area")
@ -67,14 +62,14 @@ public class FisheryRecord extends Common{
private List<String> flagState; private List<String> flagState;
@JsonProperty("fishing_gear") @JsonProperty("fishing_gear")
@Tag //@Tag
@CustomField(key="Fishing gear") @CustomField(key="Fishing gear")
private List<String> fishingGear; private List<String> fishingGear;
@JsonProperty("environment") @JsonProperty("environment")
@CustomField(key="Environment") @CustomField(key="Environment")
private String environment; private String environment;
@JsonProperty("fishery_uri") @JsonProperty("fishery_uri")
@CustomField(key="Fishery Uri") @CustomField(key="Fishery Uri")
private String fisheryUri; private String fisheryUri;
@ -92,7 +87,6 @@ public class FisheryRecord extends Common{
/** /**
* @param fisheryName * @param fisheryName
* @param fisheryId * @param fisheryId
* @param species
* @param fishingArea * @param fishingArea
* @param exploitingStocks * @param exploitingStocks
* @param managementEntity * @param managementEntity
@ -105,16 +99,14 @@ public class FisheryRecord extends Common{
* @param type * @param type
*/ */
public FisheryRecord(String fisheryName, String fisheryId, public FisheryRecord(String fisheryName, String fisheryId,
List<String> species, List<String> fishingArea, List<String> fishingArea, List<String> exploitingStocks,
List<String> exploitingStocks, List<String> managementEntity, List<String> managementEntity, List<String> jurisdictionArea,
List<String> jurisdictionArea,
List<Production_System_Type> productionSystemType, List<Production_System_Type> productionSystemType,
List<String> flagState, List<String> fishingGear, List<String> flagState, List<String> fishingGear,
String environment, String fisheryUri, Fishery_Type type) { String environment, String fisheryUri, Fishery_Type type) {
super(); super();
this.fisheryName = fisheryName; this.fisheryName = fisheryName;
this.fisheryId = fisheryId; this.fisheryId = fisheryId;
this.species = species;
this.fishingArea = fishingArea; this.fishingArea = fishingArea;
this.exploitingStocks = exploitingStocks; this.exploitingStocks = exploitingStocks;
this.managementEntity = managementEntity; this.managementEntity = managementEntity;
@ -183,14 +175,6 @@ public class FisheryRecord extends Common{
this.type = type; this.type = type;
} }
public List<String> getSpecies() {
return species;
}
public void setSpecies(List<String> species) {
this.species = species;
}
public List<String> getExploitingStocks() { public List<String> getExploitingStocks() {
return exploitingStocks; return exploitingStocks;
} }
@ -235,8 +219,8 @@ public class FisheryRecord extends Common{
@Override @Override
public String toString() { public String toString() {
return "FisheryRecord [fisheryName=" + fisheryName + ", fisheryId=" return "FisheryRecord [fisheryName=" + fisheryName + ", fisheryId="
+ fisheryId + ", species=" + species + ", fishingArea=" + fisheryId + ", fishingArea=" + fishingArea
+ fishingArea + ", exploitingStocks=" + exploitingStocks + ", exploitingStocks=" + exploitingStocks
+ ", managementEntity=" + managementEntity + ", managementEntity=" + managementEntity
+ ", jurisdictionArea=" + jurisdictionArea + ", jurisdictionArea=" + jurisdictionArea
+ ", productionSystemType=" + productionSystemType + ", productionSystemType=" + productionSystemType

View File

@ -120,6 +120,12 @@ public class StockRecord extends Common{
@Group @Group
private Stock_Type type; private Stock_Type type;
@JsonProperty("fao_state")
@CustomField(key="Fao State")
@TimeSeries
@Valid
private List<TimeSeriesBean<String, Void>> faoState;
public StockRecord() { public StockRecord() {
super(); super();
} }
@ -144,6 +150,7 @@ public class StockRecord extends Common{
* @param stockUri * @param stockUri
* @param waterArea * @param waterArea
* @param type * @param type
* @param faoState
*/ */
public StockRecord( public StockRecord(
String stockName, String stockName,
@ -161,7 +168,8 @@ public class StockRecord extends Common{
List<TimeSeriesBean<String, String>> fishingPressure, List<TimeSeriesBean<String, String>> fishingPressure,
List<TimeSeriesBean<String, Void>> narrativeState, List<TimeSeriesBean<String, Void>> narrativeState,
String scientificAdvice, String assessor, String stockUri, String scientificAdvice, String assessor, String stockUri,
List<String> waterArea, Stock_Type type) { List<String> waterArea, Stock_Type type,
List<TimeSeriesBean<String, Void>> faoState) {
super(); super();
this.stockName = stockName; this.stockName = stockName;
this.stockId = stockId; this.stockId = stockId;
@ -182,8 +190,11 @@ public class StockRecord extends Common{
this.stockUri = stockUri; this.stockUri = stockUri;
this.waterArea = waterArea; this.waterArea = waterArea;
this.type = type; this.type = type;
this.faoState = faoState;
} }
public void setAssessmentMethods(List<String> assessmentMethods) { public void setAssessmentMethods(List<String> assessmentMethods) {
this.assessmentMethods = assessmentMethods; this.assessmentMethods = assessmentMethods;
} }
@ -338,6 +349,18 @@ public class StockRecord extends Common{
this.exploitationRate = exploitationRate; 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 @Override
public String toString() { public String toString() {
return "StockRecord [stockName=" + stockName + ", stockId=" + stockId return "StockRecord [stockName=" + stockName + ", stockId=" + stockId
@ -353,7 +376,8 @@ public class StockRecord extends Common{
+ ", fishingPressure=" + fishingPressure + ", narrativeState=" + ", fishingPressure=" + fishingPressure + ", narrativeState="
+ narrativeState + ", scientificAdvice=" + scientificAdvice + narrativeState + ", scientificAdvice=" + scientificAdvice
+ ", assessor=" + assessor + ", stockUri=" + stockUri + ", 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 // write a post if the product has been published in grsf context
if(context.equals((String)contextServlet.getInitParameter(HelperMethods.PUBLIC_CONTEX_KEY))){ if(context.equals((String)contextServlet.getInitParameter(HelperMethods.PUBLIC_CONTEX_KEY))){
// TODO uncomment later
/*new WritePostCatalogueManagerThread( /*new WritePostCatalogueManagerThread(
context, context,
token, token,

View File

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