ref 17252: Enable DEA Analysis
https://support.d4science.org/issues/17252 Updated DEA Analysis git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/performfish-analytics-portlet@182243 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
13a3cb0919
commit
e5251afac0
|
@ -162,7 +162,6 @@ public class DeaAnnualPanelResult extends Composite {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(ClickEvent event) {
|
public void onClick(ClickEvent event) {
|
||||||
button_dea_analys_request.setEnabled(false);
|
|
||||||
alert_error.clear();
|
alert_error.clear();
|
||||||
cg_list_dea_input_kpi.setType(ControlGroupType.NONE);
|
cg_list_dea_input_kpi.setType(ControlGroupType.NONE);
|
||||||
cg_list_dea_output_kpi.setType(ControlGroupType.NONE);
|
cg_list_dea_output_kpi.setType(ControlGroupType.NONE);
|
||||||
|
@ -170,14 +169,12 @@ public class DeaAnnualPanelResult extends Composite {
|
||||||
if (list_dea_input_kpi.getItemCount() < 1) {
|
if (list_dea_input_kpi.getItemCount() < 1) {
|
||||||
showAlert("You must select at least one Input KPI", AlertType.ERROR, true, alert_error);
|
showAlert("You must select at least one Input KPI", AlertType.ERROR, true, alert_error);
|
||||||
cg_list_dea_input_kpi.setType(ControlGroupType.ERROR);
|
cg_list_dea_input_kpi.setType(ControlGroupType.ERROR);
|
||||||
button_dea_analys_request.setEnabled(true);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list_dea_output_kpi.getItemCount() < 1) {
|
if (list_dea_output_kpi.getItemCount() < 1) {
|
||||||
showAlert("You must select at least one Output KPI", AlertType.ERROR, true, alert_error);
|
showAlert("You must select at least one Output KPI", AlertType.ERROR, true, alert_error);
|
||||||
cg_list_dea_output_kpi.setType(ControlGroupType.ERROR);
|
cg_list_dea_output_kpi.setType(ControlGroupType.ERROR);
|
||||||
button_dea_analys_request.setEnabled(true);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -697,8 +694,6 @@ public class DeaAnnualPanelResult extends Composite {
|
||||||
title = title.substring(0, title.length() - 1) + "]";
|
title = title.substring(0, title.length() - 1) + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
button_dea_analys_request.setEnabled(true);
|
|
||||||
|
|
||||||
if (displayError) {
|
if (displayError) {
|
||||||
Alert alert = new Alert(title);
|
Alert alert = new Alert(title);
|
||||||
alert.setType(AlertType.ERROR);
|
alert.setType(AlertType.ERROR);
|
||||||
|
|
|
@ -164,7 +164,7 @@ public class DeaPanelResult extends Composite {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(ClickEvent event) {
|
public void onClick(ClickEvent event) {
|
||||||
button_dea_analys_request.setEnabled(false);
|
|
||||||
alert_error.clear();
|
alert_error.clear();
|
||||||
cg_list_dea_input_kpi.setType(ControlGroupType.NONE);
|
cg_list_dea_input_kpi.setType(ControlGroupType.NONE);
|
||||||
cg_list_dea_output_kpi.setType(ControlGroupType.NONE);
|
cg_list_dea_output_kpi.setType(ControlGroupType.NONE);
|
||||||
|
@ -172,14 +172,12 @@ public class DeaPanelResult extends Composite {
|
||||||
if (list_dea_input_kpi.getItemCount() < 1) {
|
if (list_dea_input_kpi.getItemCount() < 1) {
|
||||||
showAlert("You must select at least one Input KPI", AlertType.ERROR, true, alert_error);
|
showAlert("You must select at least one Input KPI", AlertType.ERROR, true, alert_error);
|
||||||
cg_list_dea_input_kpi.setType(ControlGroupType.ERROR);
|
cg_list_dea_input_kpi.setType(ControlGroupType.ERROR);
|
||||||
button_dea_analys_request.setEnabled(true);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list_dea_output_kpi.getItemCount() < 1) {
|
if (list_dea_output_kpi.getItemCount() < 1) {
|
||||||
showAlert("You must select at least one Output KPI", AlertType.ERROR, true, alert_error);
|
showAlert("You must select at least one Output KPI", AlertType.ERROR, true, alert_error);
|
||||||
cg_list_dea_output_kpi.setType(ControlGroupType.ERROR);
|
cg_list_dea_output_kpi.setType(ControlGroupType.ERROR);
|
||||||
button_dea_analys_request.setEnabled(true);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -697,8 +695,6 @@ public class DeaPanelResult extends Composite {
|
||||||
title = title.substring(0, title.length() - 1) + "]";
|
title = title.substring(0, title.length() - 1) + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
button_dea_analys_request.setEnabled(true);
|
|
||||||
|
|
||||||
if (displayError) {
|
if (displayError) {
|
||||||
Alert alert = new Alert(title);
|
Alert alert = new Alert(title);
|
||||||
alert.setType(AlertType.ERROR);
|
alert.setType(AlertType.ERROR);
|
||||||
|
|
|
@ -12,7 +12,6 @@ import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -373,7 +372,7 @@ public class PerformFishAnalyticsServiceImpl extends RemoteServiceServlet
|
||||||
if(response==null)
|
if(response==null)
|
||||||
throw new Exception("The response is null");
|
throw new Exception("The response is null");
|
||||||
|
|
||||||
LinkedHashMap<String, String> theResponseParams = GsonUtil.toMap(response);
|
Map<String, String> theResponseParams = GsonUtil.toMap(response);
|
||||||
log.debug("The response was converted into map: "+theResponseParams);
|
log.debug("The response was converted into map: "+theResponseParams);
|
||||||
|
|
||||||
UUID respSessionID = UUID.randomUUID();
|
UUID respSessionID = UUID.randomUUID();
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
package org.gcube.portlets.user.performfishanalytics.server.util;
|
package org.gcube.portlets.user.performfishanalytics.server.util;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -30,14 +31,14 @@ public class GsonUtil {
|
||||||
* @param json the json
|
* @param json the json
|
||||||
* @return the map
|
* @return the map
|
||||||
*/
|
*/
|
||||||
public static LinkedHashMap<String, String> toMap(String json){
|
public static Map<String, String> toMap(String json){
|
||||||
log.debug("Converting JSON: "+json);
|
log.debug("Converting JSON: "+json);
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
Type type = new TypeToken<LinkedHashMap<String, String>>(){}.getType();
|
Type type = new TypeToken<Map<String, String>>(){}.getType();
|
||||||
LinkedHashMap<String, String> myMap = gson.fromJson(json, type);
|
Map<String, String> myMap = gson.fromJson(json, type);
|
||||||
log.debug("Converted as map: "+myMap);
|
log.debug("Converted as map: "+myMap);
|
||||||
//FOR GWT SERIALIZATION
|
//FOR GWT SERIALIZATION
|
||||||
LinkedHashMap<String,String> theGWTMap = new LinkedHashMap<String, String>(myMap.size());
|
Map<String,String> theGWTMap = new HashMap<String, String>(myMap.size());
|
||||||
theGWTMap.putAll(myMap);
|
theGWTMap.putAll(myMap);
|
||||||
return theGWTMap;
|
return theGWTMap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
*/
|
*/
|
||||||
package org.gcube.portlets.user.performfishanalytics.server.util.dataminer;
|
package org.gcube.portlets.user.performfishanalytics.server.util.dataminer;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,7 +17,7 @@ public class DataMinerOutputData {
|
||||||
private String fileDescription;
|
private String fileDescription;
|
||||||
private String mimeType;
|
private String mimeType;
|
||||||
private String publicURL;
|
private String publicURL;
|
||||||
private LinkedHashMap<String, String> dataMinerOutputData;
|
private Map<String, String> dataMinerOutputData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new data miner output data.
|
* Instantiates a new data miner output data.
|
||||||
|
@ -38,7 +37,7 @@ public class DataMinerOutputData {
|
||||||
*/
|
*/
|
||||||
public DataMinerOutputData(
|
public DataMinerOutputData(
|
||||||
String fileDescription, String mimeType, String publicURL,
|
String fileDescription, String mimeType, String publicURL,
|
||||||
LinkedHashMap<String, String> dataMinerOutputData) {
|
Map<String, String> dataMinerOutputData) {
|
||||||
|
|
||||||
super();
|
super();
|
||||||
this.fileDescription = fileDescription;
|
this.fileDescription = fileDescription;
|
||||||
|
@ -132,7 +131,7 @@ public class DataMinerOutputData {
|
||||||
*
|
*
|
||||||
* @param dataMinerOutputData the dataMinerOutputData to set
|
* @param dataMinerOutputData the dataMinerOutputData to set
|
||||||
*/
|
*/
|
||||||
public void setDataMinerOutputData(LinkedHashMap<String, String> dataMinerOutputData) {
|
public void setDataMinerOutputData(Map<String, String> dataMinerOutputData) {
|
||||||
|
|
||||||
this.dataMinerOutputData = dataMinerOutputData;
|
this.dataMinerOutputData = dataMinerOutputData;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,9 @@ package org.gcube.portlets.user.performfishanalytics.server.util.xml;
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.xml.parsers.DocumentBuilder;
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
import javax.xml.parsers.DocumentBuilderFactory;
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
|
@ -126,7 +127,7 @@ public class WPSParserUtil {
|
||||||
Element mdMetadata = (Element) nodes.item(i);
|
Element mdMetadata = (Element) nodes.item(i);
|
||||||
|
|
||||||
DataMinerOutputData dmOutput = new DataMinerOutputData();
|
DataMinerOutputData dmOutput = new DataMinerOutputData();
|
||||||
LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
|
||||||
String tagSearch = "d4science:Data";
|
String tagSearch = "d4science:Data";
|
||||||
NodeList nodeList = mdMetadata.getElementsByTagName(tagSearch);
|
NodeList nodeList = mdMetadata.getElementsByTagName(tagSearch);
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
package org.gcube.portlets.user.performfishanalytics.shared.performfishservice;
|
package org.gcube.portlets.user.performfishanalytics.shared.performfishservice;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,7 +20,7 @@ public class PerformFishResponse implements Serializable{
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 6064068032560730872L;
|
private static final long serialVersionUID = 6064068032560730872L;
|
||||||
|
|
||||||
private LinkedHashMap<String, String> mapParameters;
|
private Map<String, String> mapParameters;
|
||||||
private String respSessionId;
|
private String respSessionId;
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,7 +37,7 @@ public class PerformFishResponse implements Serializable{
|
||||||
* @param respSessionId the resp session id
|
* @param respSessionId the resp session id
|
||||||
*/
|
*/
|
||||||
public PerformFishResponse(
|
public PerformFishResponse(
|
||||||
LinkedHashMap<String, String> mapParameters, String respSessionId) {
|
Map<String, String> mapParameters, String respSessionId) {
|
||||||
|
|
||||||
super();
|
super();
|
||||||
this.mapParameters = mapParameters;
|
this.mapParameters = mapParameters;
|
||||||
|
@ -73,7 +72,7 @@ public class PerformFishResponse implements Serializable{
|
||||||
*
|
*
|
||||||
* @param mapParameters the mapParameters to set
|
* @param mapParameters the mapParameters to set
|
||||||
*/
|
*/
|
||||||
public void setMapParameters(LinkedHashMap<String, String> mapParameters) {
|
public void setMapParameters(Map<String, String> mapParameters) {
|
||||||
|
|
||||||
this.mapParameters = mapParameters;
|
this.mapParameters = mapParameters;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue