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@182239 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2019-11-08 16:53:37 +00:00
parent cd34779008
commit 5ba3a81d18
15 changed files with 151 additions and 221 deletions

View File

@ -286,6 +286,7 @@
</executions>
<configuration>
<webappDirectory>${webappDirectory}</webappDirectory>
<warName>${project.build.finalName}</warName>
</configuration>
</plugin>
<plugin>
@ -301,7 +302,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2</version>
<configuration>
<descriptors>
<descriptor>${distroDirectory}/descriptor.xml</descriptor>

View File

@ -564,7 +564,6 @@ public class PerformFishAnnualAnalyticsController {
DeaAnnualPanelResult deaAnnualPanelResult = new DeaAnnualPanelResult();
deaAnnualPanelResult.addSelectedKPIs(selectedKPI);
deaAnnualPanelResult.addListFocusIds(focusIds);
deaAnnualPanelResult.addParameters(PerformFishAnalyticsConstant.DATA_INPUTS, mapParameters,
viewAnnualController.getForm().getBatchType());
submitRequestPanel.addWidget(deaAnnualPanelResult);

View File

@ -172,8 +172,8 @@ public class PerformFishAnalyticsController {
selectedKPI.getSelectedPopulationType());
int selectedKPIsSize = viewController.getSelectedKPIs().size();
// viewController.manageAlgorithmsSubmit(selectedKPIsSize);
List<String> batchIds = viewController.getSelectedBatchID();
if (batchIds == null || batchIds.size() == 0) {
String selectedBatchId = viewController.getSelectedBatchID();
if (selectedBatchId == null || selectedBatchId.isEmpty()) {
viewController.enableAllAlgorithmsForSubmit(false);
} else
viewController.manageAlgorithmsSubmit(selectedKPIsSize);
@ -303,13 +303,13 @@ public class PerformFishAnalyticsController {
case BOXPLOT:
// UNARY
callAlgorithm(submitRequestEvent.getChartType(), viewController.getSelectedBatchID().get(0),
callAlgorithm(submitRequestEvent.getChartType(), viewController.getSelectedBatchID(),
selectedKPI, null);
break;
case SCATTER:
if (selectedKPI.size() == 2)
callAlgorithm(submitRequestEvent.getChartType(), viewController.getSelectedBatchID().get(0),
callAlgorithm(submitRequestEvent.getChartType(), viewController.getSelectedBatchID(),
selectedKPI, null);
else
Window.alert("Something seems wrong... You must select exactly two KPIs to execute the "
@ -321,7 +321,7 @@ public class PerformFishAnalyticsController {
break;
case SPEEDOMETER:
// UNARY
callAlgorithm(submitRequestEvent.getChartType(), viewController.getSelectedBatchID().get(0),
callAlgorithm(submitRequestEvent.getChartType(), viewController.getSelectedBatchID(),
selectedKPI, selectedKPI);
break;
case DEA_ANALYSIS:
@ -494,7 +494,7 @@ public class PerformFishAnalyticsController {
dataInputsFormatter
.append(PerformFishAnalyticsConstant.DM_CHARTTYPE_PARAM + "=" + DataMinerAlgorithms.CORRELATION + ";");
dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_FARMFILE_PARAM + "=" + batchTableURL + ";");
dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_FOCUS_PARAM + "=ID;");
dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_FOCUS_PARAM + "="+viewController.getSelectedBatchID()+";");
String kpiCodes = "";
for (KPI kpi : viewController.getSelectedKPIs()) {
@ -518,11 +518,9 @@ public class PerformFishAnalyticsController {
PerformFishResources.INSTANCE.batch_DEAANALYSIS().getText(), submitRequestPanel);
viewController.noSpinner(tab);
final List<KPI> selectedKPI = new ArrayList<KPI>(viewController.getSelectedKPIs());
final List<String> batchIDs = new ArrayList<String>(viewController.getListBatchesID());
DeaPanelResult deaPanelResult = new DeaPanelResult();
deaPanelResult.addSelectedKPIs(selectedKPI);
deaPanelResult.addListFocusIds(batchIDs);
deaPanelResult.addParameters(PerformFishAnalyticsConstant.DATA_INPUTS, mapParameters,
viewController.getForm().getBatchType());
submitRequestPanel.addWidget(deaPanelResult);
@ -652,9 +650,9 @@ public class PerformFishAnalyticsController {
private void callAlgorithm(DataMinerAlgorithms algorithm, String focusID, List<KPI> inputKPI,
final List<KPI> outputKPI) {
List<String> listBatchID = viewController.getSelectedBatchID();
String selectedBatchID = viewController.getSelectedBatchID();
if (listBatchID == null || listBatchID.size() == 0)
if (selectedBatchID == null || selectedBatchID.isEmpty())
Window.alert("Something seems wrong, no selected BatchID, try again");
// submitRequestPanel.getElement().addClassName("ext-horizontal-panel");
@ -782,8 +780,7 @@ public class PerformFishAnalyticsController {
dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_CHARTTYPE_PARAM + "=" + chartType + ";");
dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_FARMFILE_PARAM + "=" + batchTableURL + ";");
dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_FOCUS_PARAM + "=" + focusID + ";");
// dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_FOCUS_PARAM+"=ID;");
if (inputKPI != null && inputKPI.size() > 0) {
String kpiCodes = "";
for (KPI kpi : inputKPI) {
@ -943,7 +940,7 @@ public class PerformFishAnalyticsController {
break;
case SPEEDOMETER:
title = chartType.getTitle() + "<br>";
title += "Selected BATCH ID: " + focusID + "<br>";
title += "Selected Batch ID: " + focusID + "<br>";
title += "Normalized with respect to all batches in the VRE";
break;
case DEA_CHART:

View File

@ -551,7 +551,7 @@ public class PerformFishAnalyticsViewController {
*
* @return the selected batch id
*/
public List<String> getSelectedBatchID() {
public String getSelectedBatchID() {
return batchIDAndListKPI.getSelectedBatchID();

View File

@ -1 +1 @@
The correlation matrix is a table displaying the correlation between pairs of KPIs. Correlation coefficients are calculated using the Person parametric correation test and coloured according to the value in red (significant positive correlation), yellow (significant negative correlation), and in light blue (non-significant correlation). The Student t-test is used to determine the ranges of correlation for Pearson coefficients.
The correlation matrix is a table displaying the correlation between pairs of KPIs. Correlation coefficients are calculated using the Person parametric correlation test and coloured according to the value in red (significant positive correlation), yellow (significant negative correlation), and in light blue (non-significant correlation). The Student t-test is used to determine the ranges of correlation for Pearson coefficients.

View File

@ -9,7 +9,6 @@ import java.util.List;
import java.util.Map;
import org.gcube.portlets.user.performfishanalytics.client.DataMinerAlgorithms;
import org.gcube.portlets.user.performfishanalytics.client.PerformFishAnalyticsConstant;
import org.gcube.portlets.user.performfishanalytics.client.PerformFishAnalyticsServiceAsync;
import org.gcube.portlets.user.performfishanalytics.client.controllers.PerformFishAnalyticsController;
import org.gcube.portlets.user.performfishanalytics.client.event.CallAlgorithmEvent;
@ -257,7 +256,7 @@ public class AnalyticsAnnualPanelResult extends Composite {
flexTable.setWidget(2, 0, new HTML("KPI:"));
flexTable.setWidget(2, 1, new HTML(KPINames));
uib_label_focus_id.setText("FOCUS ID");
} catch (Exception e) {
// silent

View File

@ -14,17 +14,6 @@
addStyleNames="the_margin_top_bottom">
<b:Label text="Parameters"></b:Label>
</g:VerticalPanel>
<g:HorizontalPanel addStyleNames="the_margin_top">
<g:Label ui:field="uib_label_focus_id">Focus ID</g:Label>
<b:ControlGroup ui:field="cg_focus_id_correlation">
<b:Controls>
<b:ListBox name="Select Focus ID" b:id="field_list_focus_id_correlation"
ui:field="field_list_focus_id_correlation" multipleSelect="false"
addStyleNames="the_margin_left">
</b:ListBox>
</b:Controls>
</b:ControlGroup>
</g:HorizontalPanel>
</g:VerticalPanel>
<g:VerticalPanel ui:field="field_results"
@ -32,6 +21,17 @@
<b:Label text="CORRELATION Matrix"></b:Label>
<g:VerticalPanel ui:field="uib_vp_correlation_results_container"
addStyleNames="the_margin_left">
<g:HorizontalPanel addStyleNames="the_margin_top">
<g:Label ui:field="uib_label_focus_id">Focus ID</g:Label>
<b:ControlGroup ui:field="cg_focus_id_correlation">
<b:Controls>
<b:ListBox name="Select Focus ID" b:id="field_list_focus_id_correlation"
ui:field="field_list_focus_id_correlation" multipleSelect="false"
addStyleNames="the_margin_left">
</b:ListBox>
</b:Controls>
</b:ControlGroup>
</g:HorizontalPanel>
</g:VerticalPanel>

View File

@ -41,7 +41,6 @@ import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
@ -74,15 +73,6 @@ public class DeaAnnualPanelResult extends Composite {
@UiField
VerticalPanel field_parameters_container;
@UiField
Label uib_label_focus_id;
@UiField
ControlGroup cg_focus_id_correlation;
@UiField
ListBox field_list_focus_id_correlation;
@UiField
ComplexPanel alert_info;
@ -428,18 +418,7 @@ public class DeaAnnualPanelResult extends Composite {
return dataInputParameters;
}
/**
* Adds the list focus ids.
*
* @param listFocusIDs
* the list focus I ds
*/
public void addListFocusIds(List<String> listFocusIDs) {
for (String batchID : listFocusIDs) {
field_list_focus_id_correlation.addItem(batchID, batchID);
}
}
/**
* Show alert.
*
@ -549,18 +528,18 @@ public class DeaAnnualPanelResult extends Composite {
// flexTable.setWidget(1, 0, new HTML("Level:"));
// flexTable.setWidget(1, 1, new
// HTML(dataInputParameters.get(PerformFishAnalyticsConstant.DM_SCALEP_PARAM)));
//flexTable.setWidget(1, 0, new HTML("Focus ID:"));
//flexTable.setWidget(1, 1, new HTML(dataInputParameters.get(PerformFishAnalyticsConstant.DM_FOCUS_PARAM)));
String KPINames = "";
for (KPI kpi : selectedKPIs) {
KPINames += kpi.getName() + ", ";
}
KPINames = KPINames.substring(0, KPINames.length() - 2);
flexTable.setWidget(2, 0, new HTML("KPI:"));
flexTable.setWidget(2, 1, new HTML(KPINames));
flexTable.setWidget(1, 0, new HTML("KPI:"));
flexTable.setWidget(1, 1, new HTML(KPINames));
// CHANGING LABEL TEXT TO SCAPE_PARAM
// uib_label_focus_id.setText(dataInputParameters.get(PerformFishAnalyticsConstant.DM_SCALEP_PARAM)
// + " ID");
fillDeaListBoxes();
@ -629,7 +608,7 @@ public class DeaAnnualPanelResult extends Composite {
hp.add(deaAnalysis);
uib_vp_deanalanlysis_algorithm_container.add(hp);
// TODO
final FlexTable flexTable = new FlexTable();
flexTable.setStyleName("colgrouptable");
@ -753,7 +732,7 @@ public class DeaAnnualPanelResult extends Composite {
case BOXPLOT:
break;
case SPEEDOMETER:
title += " " + uib_label_focus_id.getText() + ": " + focusID;
title += " Focus ID: " + focusID;
break;
case CORRELATION:
break;
@ -803,7 +782,7 @@ public class DeaAnnualPanelResult extends Composite {
title += " Statistics on all data";
break;
case SPEEDOMETER:
title += " " + uib_label_focus_id.getText() + ": " + focusID;
title += " Focus ID: " + focusID;
break;
case CORRELATION:
break;

View File

@ -14,18 +14,6 @@
addStyleNames="the_margin_top_bottom">
<b:Label text="Parameters"></b:Label>
</g:VerticalPanel>
<g:HorizontalPanel addStyleNames="the_margin_top">
<g:Label ui:field="uib_label_focus_id" addStyleNames="the_margin_left">Focus
ID</g:Label>
<b:ControlGroup ui:field="cg_focus_id_correlation">
<b:Controls>
<b:ListBox name="Select Focus ID" b:id="field_list_focus_id_correlation"
ui:field="field_list_focus_id_correlation" multipleSelect="false"
addStyleNames="the_margin_left">
</b:ListBox>
</b:Controls>
</b:ControlGroup>
</g:HorizontalPanel>
</g:VerticalPanel>
@ -108,9 +96,10 @@
<g:VerticalPanel ui:field="uib_vp_deanalanlysis_algorithm"
addStyleNames="the_margin_top_bottom" visible="false">
<b:Label text="DEA ANALYSIS Results" type="INFO"></b:Label>
<g:HorizontalPanel verticalAlignment="ALIGN_TOP" horizontalAlignment="ALIGN_LEFT">
<g:HorizontalPanel verticalAlignment="ALIGN_TOP"
horizontalAlignment="ALIGN_LEFT">
<g:VerticalPanel ui:field="uib_vp_deanalanlysis_algorithm_container"
addStyleNames="the_margin_left" horizontalAlignment="ALIGN_LEFT">
addStyleNames="the_margin_left" horizontalAlignment="ALIGN_LEFT">
</g:VerticalPanel>
</g:HorizontalPanel>
</g:VerticalPanel>

View File

@ -265,8 +265,7 @@ public class AnalyticsPanelResult extends Composite {
flexTable.setWidget(2, 1, new HTML(KPINames));
//CHANGING LABEL TEXT TO SCAPE_PARAM
uib_label_focus_id.setText(dataInputParameters.get(PerformFishAnalyticsConstant.DM_SCALEP_PARAM) + " ID");
}catch(Exception e){
//silent

View File

@ -14,18 +14,6 @@
addStyleNames="the_margin_top_bottom">
<b:Label text="Parameters"></b:Label>
</g:VerticalPanel>
<g:HorizontalPanel addStyleNames="the_margin_top">
<g:Label ui:field="uib_label_focus_id" addStyleNames="the_margin_left">Focus
ID</g:Label>
<b:ControlGroup ui:field="cg_focus_id_correlation">
<b:Controls>
<b:ListBox name="Select Focus ID" b:id="field_list_focus_id_correlation"
ui:field="field_list_focus_id_correlation" multipleSelect="false"
addStyleNames="the_margin_left">
</b:ListBox>
</b:Controls>
</b:ControlGroup>
</g:HorizontalPanel>
</g:VerticalPanel>
<g:VerticalPanel ui:field="field_results"
@ -33,6 +21,19 @@
<b:Label text="CORRELATION Matrix"></b:Label>
<g:VerticalPanel ui:field="uib_vp_correlation_results_container"
addStyleNames="the_margin_left">
<g:HorizontalPanel addStyleNames="the_margin_top">
<g:Label ui:field="uib_label_focus_id" addStyleNames="the_margin_left">Batch
ID</g:Label>
<b:ControlGroup ui:field="cg_focus_id_correlation">
<b:Controls>
<b:ListBox name="Select Focus ID" b:id="field_list_focus_id_correlation"
ui:field="field_list_focus_id_correlation" multipleSelect="false"
addStyleNames="the_margin_left">
</b:ListBox>
</b:Controls>
</b:ControlGroup>
</g:HorizontalPanel>
</g:VerticalPanel>
<g:VerticalPanel ui:field="field_unary_algorithm"

View File

@ -37,29 +37,24 @@ import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
// TODO: Auto-generated Javadoc
/**
* The Class BatchIDAndListKPIView.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
* Feb 28, 2019
* Feb 28, 2019
*/
public class BatchIDAndListKPIView extends Composite {
/** The ui binder. */
private static BatchIDAndListKPIViewUiBinder uiBinder =
GWT.create(BatchIDAndListKPIViewUiBinder.class);
private static BatchIDAndListKPIViewUiBinder uiBinder = GWT.create(BatchIDAndListKPIViewUiBinder.class);
/**
* The Interface BatchIDAndListKPIViewUiBinder.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
* Feb 28, 2019
* @author Francesco Mangiacrapa at ISTI-CNR
* (francesco.mangiacrapa@isti.cnr.it) Feb 28, 2019
*/
interface BatchIDAndListKPIViewUiBinder
extends UiBinder<Widget, BatchIDAndListKPIView> {
interface BatchIDAndListKPIViewUiBinder extends UiBinder<Widget, BatchIDAndListKPIView> {
}
/** The the panel container. */
@ -77,7 +72,7 @@ public class BatchIDAndListKPIView extends Composite {
/** The cg batch id. */
@UiField
ControlGroup cg_batch_id;
/** The uib button load batches. */
@UiField
Button uib_button_load_batches;
@ -88,11 +83,9 @@ public class BatchIDAndListKPIView extends Composite {
/** The map parameters. */
private Map<String, List<String>> mapParameters;
/** The list batches ID. */
private List<String> listBatchesID = new ArrayList<String>();
/**
* Instantiates a new batch id and list kpi view.
*/
@ -100,10 +93,9 @@ public class BatchIDAndListKPIView extends Composite {
initWidget(uiBinder.createAndBindUi(this));
uib_list_batch_id.setEnabled(false);
uib_button_load_batches.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
PerformFishAnalyticsController.eventBus.fireEvent(new LoadBatchesEvent());
@ -111,13 +103,13 @@ public class BatchIDAndListKPIView extends Composite {
});
}
/**
* Adds the.
*
* @param w the w
* @param w
* the w
*/
public void add(Widget w){
public void add(Widget w) {
the_panel_container.add(w);
}
@ -127,71 +119,54 @@ public class BatchIDAndListKPIView extends Composite {
*
* @return the all batches ID
*/
public List<String> getAllBatchesID(){
public List<String> getAllBatchesID() {
return listBatchesID;
}
/**
* Gets the selected.
*
* @param listBox the list box
* @return the selected
*/
private List<String> getSelected(ListBox listBox){
if(listBox==null)
listBox = uib_list_batch_id;
List<String> selected = new ArrayList<String>();
for (int i=0; i<listBox.getItemCount(); i++) {
if (listBox.isItemSelected(i)) {
selected.add(listBox.getValue(i)); //reading the value
}
}
return selected;
}
/**
* Gets the selected batch id.
*
* @return the selected batch id
*/
public List<String> getSelectedBatchID(){
return getSelected(uib_list_batch_id);
public String getSelectedBatchID() {
return uib_list_batch_id.getSelectedItemText();
}
/**
* Manage perform fish service response.
*
* @param performFishResponse the perform fish response
* @param mapParameters the map parameters
* @param level the level
* @param performFishResponse
* the perform fish response
* @param mapParameters
* the map parameters
* @param level
* the level
*/
public void managePerformFishServiceResponse(
PerformFishResponse performFishResponse,
Map<String, List<String>> mapParameters, final POPULATION_LEVEL level) {
public void managePerformFishServiceResponse(PerformFishResponse performFishResponse,
Map<String, List<String>> mapParameters, final POPULATION_LEVEL level) {
this.performFishResponse = performFishResponse;
this.mapParameters = mapParameters;
GWT.log("PerformFish Response: "+performFishResponse);
GWT.log("PerformFish Response: " + performFishResponse);
String fileURL = performFishResponse.getMapParameters().get(PerformFishAnalyticsConstant.BATCHES_TABLE_INTERNAL);
String fileURL = performFishResponse.getMapParameters()
.get(PerformFishAnalyticsConstant.BATCHES_TABLE_INTERNAL);
GWT.log("BatchesTable_internal is: "+fileURL);
GWT.log("BatchesTable_internal is: " + fileURL);
//Resetting batch ID and panel error after calling Perform Fish Service
// Resetting batch ID and panel error after calling Perform Fish Service
resetBatchIdStatus();
//Managing the Perform Fish Service Response
if(fileURL==null){
showAlert("No select found for "+PerformFishAnalyticsConstant.BATCHES_TABLE_INTERNAL, AlertType.ERROR, false, the_panel_error);
}else{
// Managing the Perform Fish Service Response
if (fileURL == null) {
showAlert("No select found for " + PerformFishAnalyticsConstant.BATCHES_TABLE_INTERNAL, AlertType.ERROR,
false, the_panel_error);
} else {
final LoaderIcon loader = new LoaderIcon("Loading Values...");
the_panel_container.insert(loader, 1);
//field_list_focus_id_dea.setEnabled(false);
// field_list_focus_id_dea.setEnabled(false);
uib_list_batch_id.setEnabled(false);
PerformFishAnalyticsServiceAsync.Util.getInstance().readCSVFile(fileURL, new AsyncCallback<CSVFile>() {
@ -209,35 +184,38 @@ public class BatchIDAndListKPIView extends Composite {
loader.setVisible(false);
the_panel_container.remove(loader);
if(result==null){
showAlert("No value found for "+PerformFishAnalyticsConstant.BATCHES_TABLE_INTERNAL, AlertType.ERROR, false, the_panel_error);
if (result == null) {
showAlert("No value found for " + PerformFishAnalyticsConstant.BATCHES_TABLE_INTERNAL,
AlertType.ERROR, false, the_panel_error);
enableButtonLoadBatches(false);
return;
}
//field_list_focus_id_dea.setEnabled(true);
// field_list_focus_id_dea.setEnabled(true);
uib_list_batch_id.setEnabled(true);
//IT CAN BE "BATCH", "FARM", etc.
// IT CAN BE "BATCH", "FARM", etc.
String theScalePParamValue = level.name();
int indexOfTheScaleValue = result.getHeaderRow().getListValues().indexOf(theScalePParamValue);
if(indexOfTheScaleValue>-1){
if (indexOfTheScaleValue > -1) {
List<CSVRow> rows = result.getValueRows();
if(rows==null || rows.isEmpty()){
if (rows == null || rows.isEmpty()) {
PerformFishAnalyticsController.eventBus.fireEvent(new AddedBatchIdEvent());
return;
}
for (CSVRow row : rows) {
String valuePerScaleP = row.getListValues().get(indexOfTheScaleValue);
//field_list_focus_id_dea.addItem(valuePerScaleP, valuePerScaleP);
// field_list_focus_id_dea.addItem(valuePerScaleP,
// valuePerScaleP);
uib_list_batch_id.addItem(valuePerScaleP, valuePerScaleP);
listBatchesID.add(valuePerScaleP);
}
uib_list_batch_id.addItem(PerformFishAnalyticsConstant.DM_FOCUS_ID_ALL_ITEM_TEXT, PerformFishAnalyticsConstant.DM_FOCUS_ID_ALL_ITEM_VALUE);
uib_list_batch_id.addItem(PerformFishAnalyticsConstant.DM_FOCUS_ID_ALL_ITEM_TEXT,
PerformFishAnalyticsConstant.DM_FOCUS_ID_ALL_ITEM_VALUE);
listBatchesID.add(PerformFishAnalyticsConstant.DM_FOCUS_ID_ALL_ITEM_VALUE);
PerformFishAnalyticsController.eventBus.fireEvent(new AddedBatchIdEvent());
@ -246,12 +224,12 @@ public class BatchIDAndListKPIView extends Composite {
});
}
}
/**
* Reset batch id status.
*/
public void resetBatchIdStatus() {
//Resetting batch ID and panel error after calling Perform Fish Service
// Resetting batch ID and panel error after calling Perform Fish Service
uib_list_batch_id.clear();
the_panel_error.clear();
listBatchesID.clear();
@ -260,12 +238,16 @@ public class BatchIDAndListKPIView extends Composite {
/**
* Show alert.
*
* @param error the error
* @param type the type
* @param closable the closable
* @param panel the panel
* @param error
* the error
* @param type
* the type
* @param closable
* the closable
* @param panel
* the panel
*/
private void showAlert(String error, AlertType type, boolean closable, ComplexPanel panel){
private void showAlert(String error, AlertType type, boolean closable, ComplexPanel panel) {
panel.clear();
Alert alert = new Alert(error);
alert.setType(type);
@ -274,30 +256,32 @@ public class BatchIDAndListKPIView extends Composite {
panel.add(alert);
}
/**
* Show alert.
*
* @param error the error
* @param type the type
* @param closable the closable
* @param error
* the error
* @param type
* the type
* @param closable
* the closable
*/
public void showAlert(String error, AlertType type, boolean closable){
public void showAlert(String error, AlertType type, boolean closable) {
showAlert(error, type, closable, the_panel_error);
}
/**
* Show selection ok.
*
* @param msg the msg
* @param closable the closable
* @param msg
* the msg
* @param closable
* the closable
*/
public void showSelectionOK(String msg, boolean closable){
public void showSelectionOK(String msg, boolean closable) {
showAlert(msg, AlertType.INFO, closable, the_panel_error);
}
/**
* Gets the control group batch id.
*
@ -308,7 +292,6 @@ public class BatchIDAndListKPIView extends Composite {
return cg_batch_id;
}
/**
* Gets the list box batch id.
*
@ -319,7 +302,6 @@ public class BatchIDAndListKPIView extends Composite {
return uib_list_batch_id;
}
/**
* Gets the perform fish response.
*
@ -330,7 +312,6 @@ public class BatchIDAndListKPIView extends Composite {
return performFishResponse;
}
/**
* Gets the map parameters.
*
@ -340,21 +321,21 @@ public class BatchIDAndListKPIView extends Composite {
return mapParameters;
}
/**
* Enable button load batches.
*
* @param enable the enable
* @param enable
* the enable
*/
public void enableButtonLoadBatches(boolean enable) {
uib_button_load_batches.setEnabled(enable);
if(enable)
if (enable)
uib_list_batch_id.setTitle("Click the 'Load Batches' button");
else
uib_list_batch_id.setTitle("");
}
}

View File

@ -8,10 +8,10 @@
<g:HTMLPanel>
<g:VerticalPanel ui:field="the_panel_container">
<g:HorizontalPanel addStyleNames="the_margin_top">
<g:Label ui:field="uib_label_batch_id">BATCH ID</g:Label>
<g:Label ui:field="uib_label_batch_id">Batch ID</g:Label>
<b:ControlGroup ui:field="cg_batch_id">
<b:Controls>
<b:ListBox name="Select BATCH ID"
<b:ListBox name="Select Batch ID"
b:id="uib_list_batch_id" ui:field="uib_list_batch_id"
multipleSelect="false" addStyleNames="the_margin_left">
</b:ListBox>

View File

@ -40,7 +40,6 @@ import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
@ -73,14 +72,14 @@ public class DeaPanelResult extends Composite {
@UiField
VerticalPanel field_parameters_container;
@UiField
Label uib_label_focus_id;
// @UiField
// Label uib_label_focus_id;
@UiField
ControlGroup cg_focus_id_correlation;
// @UiField
// ControlGroup cg_focus_id_correlation;
@UiField
ListBox field_list_focus_id_correlation;
// @UiField
// ListBox field_list_focus_id_correlation;
@UiField
ComplexPanel alert_info;
@ -421,18 +420,6 @@ public class DeaPanelResult extends Composite {
return dataInputParameters;
}
/**
* Adds the list focus ids.
*
* @param listFocusIDs
* the list focus I ds
*/
public void addListFocusIds(List<String> listFocusIDs) {
for (String batchID : listFocusIDs) {
field_list_focus_id_correlation.addItem(batchID, batchID);
}
}
/**
* Show alert.
*
@ -541,6 +528,8 @@ public class DeaPanelResult extends Composite {
flexTable.setWidget(0, 1, new HTML(toShowBatchTypeValue));
flexTable.setWidget(1, 0, new HTML("Level:"));
flexTable.setWidget(1, 1, new HTML(dataInputParameters.get(PerformFishAnalyticsConstant.DM_SCALEP_PARAM)));
//flexTable.setWidget(2, 0, new HTML("Batch ID:"));
//flexTable.setWidget(2, 1, new HTML(dataInputParameters.get(PerformFishAnalyticsConstant.DM_FOCUS_PARAM)));
String KPINames = "";
for (KPI kpi : selectedKPIs) {
@ -550,13 +539,10 @@ public class DeaPanelResult extends Composite {
flexTable.setWidget(2, 0, new HTML("KPI:"));
flexTable.setWidget(2, 1, new HTML(KPINames));
// CHANGING LABEL TEXT TO SCAPE_PARAM
uib_label_focus_id.setText(dataInputParameters.get(PerformFishAnalyticsConstant.DM_SCALEP_PARAM) + " ID");
fillDeaListBoxes();
} catch (Exception e) {
// silent
GWT.log("Error in addParameters for DeaResulPanel: " + e.getLocalizedMessage(), e);
}
field_parameters_container.add(flexTable);
@ -663,7 +649,7 @@ public class DeaPanelResult extends Composite {
GWT.log("Calling Dea Analysys... with input: " + inputKPI + " and output: " + outputKPI);
uib_vp_deanalanlysis_algorithm.setVisible(true);
callDataMinerServiceForChart(dataInputParameters, inputKPI, outputKPI, DataMinerAlgorithms.DEA_ANALYSIS, "ID",
callDataMinerServiceForChart(dataInputParameters, inputKPI, outputKPI, DataMinerAlgorithms.DEA_ANALYSIS,
deaAnalysis);
}
@ -793,8 +779,7 @@ public class DeaPanelResult extends Composite {
* the panel
*/
private void callDataMinerServiceForChart(Map<String, String> dataInputParameters, final List<KPI> inputKPI,
final List<KPI> outputKPI, final DataMinerAlgorithms chartType, final String focusID,
final ComplexPanel panel) {
final List<KPI> outputKPI, final DataMinerAlgorithms chartType, final ComplexPanel panel) {
GWT.log("Call DM wiht Selected KPI: " + inputKPI);
StringBuilder dataInputsFormatter = new StringBuilder();
@ -834,6 +819,7 @@ public class DeaPanelResult extends Composite {
}
final String focusID = dataInputParameters.get(PerformFishAnalyticsConstant.DM_FOCUS_PARAM);
dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_FOCUS_PARAM + "=" + focusID + ";");
String dataInParameters = dataInputsFormatter.toString();

View File

@ -14,18 +14,18 @@
addStyleNames="the_margin_top_bottom">
<b:Label text="Parameters"></b:Label>
</g:VerticalPanel>
<g:HorizontalPanel addStyleNames="the_margin_top">
<g:Label ui:field="uib_label_focus_id" addStyleNames="the_margin_left">Focus
ID</g:Label>
<b:ControlGroup ui:field="cg_focus_id_correlation">
<b:Controls>
<b:ListBox name="Select Focus ID" b:id="field_list_focus_id_correlation"
ui:field="field_list_focus_id_correlation" multipleSelect="false"
addStyleNames="the_margin_left">
</b:ListBox>
</b:Controls>
</b:ControlGroup>
</g:HorizontalPanel>
<!-- <g:HorizontalPanel addStyleNames="the_margin_top"> -->
<!-- <g:Label ui:field="uib_label_focus_id" addStyleNames="the_margin_left">Focus -->
<!-- ID</g:Label> -->
<!-- <b:ControlGroup ui:field="cg_focus_id_correlation"> -->
<!-- <b:Controls> -->
<!-- <b:ListBox name="Select Focus ID" b:id="field_list_focus_id_correlation" -->
<!-- ui:field="field_list_focus_id_correlation" multipleSelect="false" -->
<!-- addStyleNames="the_margin_left"> -->
<!-- </b:ListBox> -->
<!-- </b:Controls> -->
<!-- </b:ControlGroup> -->
<!-- </g:HorizontalPanel> -->
</g:VerticalPanel>