This commit is contained in:
Gianpaolo Coro 2015-10-22 10:06:29 +00:00
parent 999db66eeb
commit a79f27d4a1
2 changed files with 26 additions and 35 deletions

View File

@ -2,28 +2,25 @@ package org.gcube.dataanalysis.seadatanet;
public class DivaAnalysisGetResponse {
public DivaAnalysisGetResponse(String) {
Double vmin;
Double vmax;
Double stat_obs_count_used;
Double stat_posteriori_stn;
public DivaAnalysisGetResponse(Double vmin,
Double vmax,
Double stat_obs_count_used,
Double stat_posteriori_stn){
super();
this.x0 = x0;
this.x1 = x1;
this.dx = dx;
this.y0 = y0;
this.y1 = y1;
this.dy = dy;
this.len = len;
this.stn = stn;
this.sessionid = id;
this.vmin=vmin;
this.vmax=vmax;
this.stat_obs_count_used=stat_obs_count_used;
this.stat_posteriori_stn=stat_posteriori_stn;
}
@Override
public String toString() {
return "DivaFilePostResponse [obs_x0=" + obs_x0 + ", obs_x1="
+ obs_x1 + ", obs_y0=" + obs_y0 + ", obs_y1=" + obs_y1
+ ", obs_v0=" + obs_v0 + ", obs_v1=" + obs_v1
+ ", obs_count=" + obs_count + ", sessionid=" + sessionid
+ "]";
}
@ -51,19 +48,11 @@ public class DivaAnalysisGetResponse {
this.stat_posteriori_stn = stat_posteriori_stn;
}
public String getSessionid() {
return sessionid;
@Override
public String toString() {
return "DivaFilePostResponse [VMAX=" + vmax + ", VMIN="
+ vmin + ", STAT_OBS_COUNT_USED=" + stat_obs_count_used + ", STAT_POSTERIORI_STN=" + stat_posteriori_stn
+ "]";
}
public void setSessionid(String sessionid) {
this.sessionid = sessionid;
}
Double vmax;
Double stat_obs_count_used;
Double stat_posteriori_stn;
String sessionid;
}

View File

@ -112,7 +112,7 @@ public class DivaHTTPClient {
level
depth level
*/
public static String getAnalysis (String id,double len,double stn,double x0,double x1, double dx,double y0,double y1,double dy,double level) throws Exception {
public static DivaAnalysisGetResponse getAnalysis (String id,double len,double stn,double x0,double x1, double dx,double y0,double y1,double dy,double level) throws Exception {
HttpURLConnection httpUrlConnection = null;
try {
@ -182,7 +182,9 @@ public class DivaHTTPClient {
responseStream.close();
httpUrlConnection.disconnect();
AnalysisLogger.getLogger().debug("Response "+response);
return response;
//return response;
return new DivaAnalysisGetResponse(vmin, vmax, stat_obs_count_used, stat_posteriori_stn);
} catch (IOException e) {
throw new Exception(e);
@ -190,7 +192,7 @@ public class DivaHTTPClient {
if (httpUrlConnection != null)
httpUrlConnection.disconnect();
}
return new DivaAnalysisGetResponse(vmin, vmax, stat_obs_count_used, stat_posteriori_stn, sessionid);
}