|
|
|
@ -6,7 +6,6 @@ package org.gcube.portlets.user.td.client;
|
|
|
|
|
import org.gcube.portlets.user.sdmxexportwizardtd.client.SDMXExportWizardTD;
|
|
|
|
|
import org.gcube.portlets.user.sdmximportwizardtd.client.SDMXImportWizardTD;
|
|
|
|
|
import org.gcube.portlets.user.sdmximportwizardtd.client.general.WizardListener;
|
|
|
|
|
import org.gcube.portlets.user.sdmximportwizardtd.shared.TRId;
|
|
|
|
|
import org.gcube.portlets.user.td.ciw.client.CSVImporterWidget;
|
|
|
|
|
import org.gcube.portlets.user.td.client.event.CloseTabularResourceEvent;
|
|
|
|
|
import org.gcube.portlets.user.td.client.event.CloseTabularResourceType;
|
|
|
|
@ -20,61 +19,52 @@ import org.gcube.portlets.user.td.client.event.OpenTabularResourceEvent;
|
|
|
|
|
import org.gcube.portlets.user.td.client.event.OpenTabularResourceType;
|
|
|
|
|
import org.gcube.portlets.user.td.importer.client.TabularDataImporterListener;
|
|
|
|
|
import org.gcube.portlets.user.td.information.client.TabularResourceProperties;
|
|
|
|
|
import org.gcube.portlets.user.td.information.shared.TRId;
|
|
|
|
|
import org.gcube.portlets.user.td.open.client.TDOpen;
|
|
|
|
|
import org.gcube.portlets.user.tdw.client.TabularData;
|
|
|
|
|
import org.gcube.portlets.user.tdw.shared.model.TableId;
|
|
|
|
|
|
|
|
|
|
import com.allen_sauer.gwt.log.client.Log;
|
|
|
|
|
import com.extjs.gxt.ui.client.event.ResizeEvent;
|
|
|
|
|
import com.google.gwt.core.client.GWT;
|
|
|
|
|
import com.google.gwt.core.client.RunAsyncCallback;
|
|
|
|
|
import com.google.gwt.event.shared.GwtEvent;
|
|
|
|
|
import com.google.gwt.user.client.ui.Label;
|
|
|
|
|
import com.google.gwt.user.client.ui.Widget;
|
|
|
|
|
import com.google.web.bindery.event.shared.EventBus;
|
|
|
|
|
import com.google.web.bindery.event.shared.SimpleEventBus;
|
|
|
|
|
import com.sencha.gxt.core.client.util.Margins;
|
|
|
|
|
import com.sencha.gxt.widget.core.client.ContentPanel;
|
|
|
|
|
import com.sencha.gxt.widget.core.client.TabItemConfig;
|
|
|
|
|
import com.sencha.gxt.widget.core.client.TabPanel;
|
|
|
|
|
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer;
|
|
|
|
|
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer.BorderLayoutData;
|
|
|
|
|
import com.sencha.gxt.widget.core.client.event.BeforeCloseEvent;
|
|
|
|
|
import com.sencha.gxt.widget.core.client.event.BeforeCloseEvent.BeforeCloseHandler;
|
|
|
|
|
import com.sencha.gxt.widget.core.client.info.Info;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @author "Federico De Faveri defaveri@isti.cnr.it"
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
public class TabularDataController {
|
|
|
|
|
//implements HasCloseHandlers<Long>, HasOpenHandlers<Long> {
|
|
|
|
|
// implements HasCloseHandlers<Long>, HasOpenHandlers<Long> {
|
|
|
|
|
|
|
|
|
|
protected SimpleEventBus eventBus;
|
|
|
|
|
protected TabularData tabularData;
|
|
|
|
|
protected UIState uiState = UIState.START;
|
|
|
|
|
protected UIProperties uiProperties = UIProperties.CLOSED;
|
|
|
|
|
|
|
|
|
|
protected BorderLayoutContainer centerContainer;
|
|
|
|
|
protected ContentPanel functionalityPanel;
|
|
|
|
|
protected TabPanel functionalityTab;
|
|
|
|
|
protected int indexFunctionalityTab = 0;
|
|
|
|
|
protected boolean functionalityOpen;
|
|
|
|
|
|
|
|
|
|
protected Label propertiesLabel;
|
|
|
|
|
|
|
|
|
|
protected TabularResourceProperties trProperties;
|
|
|
|
|
protected BorderLayoutData eastData;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Table Open
|
|
|
|
|
*/
|
|
|
|
|
protected boolean tableOpen=false;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Tabular Resource Id
|
|
|
|
|
* Tabular Resource Id
|
|
|
|
|
*/
|
|
|
|
|
protected TRId trId;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Grid TableId
|
|
|
|
|
*/
|
|
|
|
|
* Grid TableId
|
|
|
|
|
*/
|
|
|
|
|
protected TableId tableOpening;
|
|
|
|
|
|
|
|
|
|
public TabularDataController() {
|
|
|
|
@ -89,21 +79,10 @@ public class TabularDataController {
|
|
|
|
|
return eventBus;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setTabularData(TabularData tabularData){
|
|
|
|
|
this.tabularData=tabularData;
|
|
|
|
|
public void setTabularData(TabularData tabularData) {
|
|
|
|
|
this.tabularData = tabularData;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public BorderLayoutContainer getCenterContainer() {
|
|
|
|
|
return centerContainer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setCenterContainer(BorderLayoutContainer centerContainer) {
|
|
|
|
|
this.centerContainer = centerContainer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ContentPanel getFunctionalityPanel() {
|
|
|
|
|
return functionalityPanel;
|
|
|
|
|
}
|
|
|
|
@ -128,11 +107,6 @@ public class TabularDataController {
|
|
|
|
|
this.eastData = eastData;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void bindToEvents() {
|
|
|
|
|
eventBus.addHandler(ImportTableEvent.TYPE,
|
|
|
|
|
new ImportTableEvent.ImportTableHandler() {
|
|
|
|
@ -154,7 +128,8 @@ public class TabularDataController {
|
|
|
|
|
new OpenTabularResourceEvent.OpenTabularResourceHandler() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onOpenTabularResource(OpenTabularResourceEvent event) {
|
|
|
|
|
public void onOpenTabularResource(
|
|
|
|
|
OpenTabularResourceEvent event) {
|
|
|
|
|
doOpenTabularResource(event.getOpenType());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -162,7 +137,8 @@ public class TabularDataController {
|
|
|
|
|
new CloseTabularResourceEvent.CloseTabularResourceHandler() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onCloseTabularResource(CloseTabularResourceEvent event) {
|
|
|
|
|
public void onCloseTabularResource(
|
|
|
|
|
CloseTabularResourceEvent event) {
|
|
|
|
|
doCloseTabularResource(event.getCloseType());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -175,7 +151,6 @@ public class TabularDataController {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void doImportTable(ImportTableType importType) {
|
|
|
|
@ -196,7 +171,8 @@ public class TabularDataController {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
Log.error("doImportTable Error : " + e.getLocalizedMessage()+ " \n "+e.getMessage());
|
|
|
|
|
Log.error("doImportTable Error : " + e.getLocalizedMessage()
|
|
|
|
|
+ " \n " + e.getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -218,11 +194,11 @@ public class TabularDataController {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
Log.error("doImportTable Error : " + e.getLocalizedMessage()+ " \n "+e.getMessage());
|
|
|
|
|
Log.error("doImportTable Error : " + e.getLocalizedMessage()
|
|
|
|
|
+ " \n " + e.getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void doOpenTabularResource(OpenTabularResourceType openType) {
|
|
|
|
|
Log.trace("doOpenTabularResource openType: " + openType);
|
|
|
|
|
Info.display("Open Tabular Resource", "open: " + openType);
|
|
|
|
@ -235,11 +211,11 @@ public class TabularDataController {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
Log.error("doOpenTable Error : " + e.getLocalizedMessage()+ " \n "+e.getMessage());
|
|
|
|
|
Log.error("doOpenTable Error : " + e.getLocalizedMessage() + " \n "
|
|
|
|
|
+ e.getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void doCloseTabularResource(CloseTabularResourceType closeType) {
|
|
|
|
|
Log.trace("doCloseTabularResource closeType: " + closeType);
|
|
|
|
|
Info.display("Close Tabular Resource", "close: " + closeType);
|
|
|
|
@ -252,13 +228,13 @@ public class TabularDataController {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
Log.error("doOpenTable Error : " + e.getLocalizedMessage()+ " \n "+e.getMessage());
|
|
|
|
|
Log.error("doOpenTable Error : " + e.getLocalizedMessage() + " \n "
|
|
|
|
|
+ e.getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void doOpenFunctionality(OpenFunctionalityType openType) {
|
|
|
|
|
Log.trace("doOpenFunctionality openType: " + openType);
|
|
|
|
|
Info.display("Open Functionality", "open: " + openType);
|
|
|
|
|
try {
|
|
|
|
|
switch (openType) {
|
|
|
|
|
case PROPERTIES:
|
|
|
|
@ -273,55 +249,58 @@ public class TabularDataController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void openFunctionalityProperties() {
|
|
|
|
|
if (uiState == UIState.TR_OPEN) {
|
|
|
|
|
if (uiProperties == UIProperties.OPENED) {
|
|
|
|
|
functionalityPanel.collapse();
|
|
|
|
|
functionalityPanel.disable();
|
|
|
|
|
uiProperties=UIProperties.CLOSED;
|
|
|
|
|
functionalityTab.remove(trProperties);
|
|
|
|
|
Info.display("Properties", "Closed");
|
|
|
|
|
} else {
|
|
|
|
|
TabItemConfig propertiesItemConf = new TabItemConfig(
|
|
|
|
|
"Properties", true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void openFunctionalityProperties(){
|
|
|
|
|
if(propertiesLabel==null){
|
|
|
|
|
propertiesLabel = new Label("Tabular Resources Properties");
|
|
|
|
|
propertiesLabel.addStyleName("pad-text");
|
|
|
|
|
TabItemConfig propertiesItemConf=new TabItemConfig("Properties", true);
|
|
|
|
|
trProperties = new TabularResourceProperties(
|
|
|
|
|
"TRProperties", eventBus, trId);
|
|
|
|
|
trProperties.setHeaderVisible(false);
|
|
|
|
|
functionalityTab.add(trProperties, propertiesItemConf);
|
|
|
|
|
functionalityTab
|
|
|
|
|
.addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
|
|
|
|
|
|
|
|
|
org.gcube.portlets.user.td.information.shared.TRId trId=new org.gcube.portlets.user.td.information.shared.TRId("0","1");
|
|
|
|
|
TabularResourceProperties trProperties=new TabularResourceProperties("TRProperties",eventBus,trId);
|
|
|
|
|
trProperties.setHeaderVisible(false);
|
|
|
|
|
functionalityTab.add(trProperties, propertiesItemConf);
|
|
|
|
|
functionalityTab.addBeforeCloseHandler(new BeforeCloseHandler<Widget>(){
|
|
|
|
|
@Override
|
|
|
|
|
public void onBeforeClose(
|
|
|
|
|
BeforeCloseEvent<Widget> event) {
|
|
|
|
|
if (functionalityTab.getWidgetCount() == 1) {
|
|
|
|
|
functionalityPanel.disable();
|
|
|
|
|
functionalityPanel.collapse();
|
|
|
|
|
uiProperties=UIProperties.CLOSED;
|
|
|
|
|
functionalityTab.remove(trProperties);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onBeforeClose(BeforeCloseEvent<Widget> event) {
|
|
|
|
|
if(functionalityTab.getWidgetCount()==1){
|
|
|
|
|
functionalityPanel.disable();
|
|
|
|
|
functionalityPanel.collapse();
|
|
|
|
|
functionalityOpen=false;
|
|
|
|
|
propertiesLabel=null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
/*Label taskLabel = new Label("Task Properties");
|
|
|
|
|
taskLabel.addStyleName("pad-text");
|
|
|
|
|
functionalityTab
|
|
|
|
|
.add(taskLabel, new TabItemConfig("Task", true));
|
|
|
|
|
|
|
|
|
|
Label taskLabel = new Label("Task Properties");
|
|
|
|
|
taskLabel.addStyleName("pad-text");
|
|
|
|
|
functionalityTab.add(taskLabel, new TabItemConfig("Task", true));
|
|
|
|
|
*/
|
|
|
|
|
functionalityTab.setActiveWidget(functionalityTab.getWidget(0));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Last is functionalityTab.getWidgetCount() - 1)
|
|
|
|
|
functionalityTab.setActiveWidget(functionalityTab
|
|
|
|
|
.getWidget(0));
|
|
|
|
|
|
|
|
|
|
centerContainer.onResize();
|
|
|
|
|
}
|
|
|
|
|
functionalityPanel.enable();
|
|
|
|
|
functionalityPanel.expand();
|
|
|
|
|
uiProperties=UIProperties.OPENED;
|
|
|
|
|
|
|
|
|
|
if(functionalityOpen){
|
|
|
|
|
functionalityPanel.collapse();
|
|
|
|
|
functionalityOpen=false;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
functionalityPanel.enable();
|
|
|
|
|
functionalityPanel.expand();
|
|
|
|
|
functionalityOpen=true;
|
|
|
|
|
Info.display("Properties", "No table open");
|
|
|
|
|
}
|
|
|
|
|
centerContainer.onResize();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
protected void openSDMXImportWizard() {
|
|
|
|
@ -330,16 +309,19 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onSuccess() {
|
|
|
|
|
SDMXImportWizardTD importWizard= new SDMXImportWizardTD("SDMX Import");
|
|
|
|
|
SDMXImportWizardTD importWizard = new SDMXImportWizardTD(
|
|
|
|
|
"SDMX Import");
|
|
|
|
|
|
|
|
|
|
importWizard.addListener(new WizardListener(){
|
|
|
|
|
importWizard.addListener(new WizardListener() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void completed(TRId tabularResourceId) {
|
|
|
|
|
trId=tabularResourceId;
|
|
|
|
|
tableOpening=new TableId(Constants.TD_DATASOURCE_FACTORY_ID,trId.getTableId());
|
|
|
|
|
tabularData.openTable(tableOpening);
|
|
|
|
|
tableOpen=true;
|
|
|
|
|
trId = tabularResourceId;
|
|
|
|
|
tableOpening = new TableId(
|
|
|
|
|
Constants.TD_DATASOURCE_FACTORY_ID, trId
|
|
|
|
|
.getTableId());
|
|
|
|
|
tabularData.openTable(tableOpening);
|
|
|
|
|
uiState = UIState.TR_OPEN;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -358,20 +340,18 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
/*
|
|
|
|
|
importWizard.addWizardSelectionHandler(new WizardSelectionHandler<Dataset>() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onSelected(
|
|
|
|
|
SDMXWizardSelectionEvent<Dataset> event) {
|
|
|
|
|
doSDMXDatasetImport(event.getSelected());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onClosed(
|
|
|
|
|
SDMXWizardSelectionEvent<Dataset> event) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});*/
|
|
|
|
|
* importWizard.addWizardSelectionHandler(new
|
|
|
|
|
* WizardSelectionHandler<Dataset>() {
|
|
|
|
|
*
|
|
|
|
|
* @Override public void onSelected(
|
|
|
|
|
* SDMXWizardSelectionEvent<Dataset> event) {
|
|
|
|
|
* doSDMXDatasetImport(event.getSelected()); }
|
|
|
|
|
*
|
|
|
|
|
* @Override public void onClosed(
|
|
|
|
|
* SDMXWizardSelectionEvent<Dataset> event) {
|
|
|
|
|
*
|
|
|
|
|
* } });
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
importWizard.show();
|
|
|
|
|
}
|
|
|
|
@ -384,36 +364,37 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void openSDMXExportWizard() {
|
|
|
|
|
|
|
|
|
|
GWT.runAsync(new RunAsyncCallback() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onSuccess() {
|
|
|
|
|
SDMXExportWizardTD exportWizard= new SDMXExportWizardTD("SDMX Export");
|
|
|
|
|
SDMXExportWizardTD exportWizard = new SDMXExportWizardTD(
|
|
|
|
|
"SDMX Export");
|
|
|
|
|
|
|
|
|
|
exportWizard.addListener(new org.gcube.portlets.user.sdmxexportwizardtd.client.general.WizardListener() {
|
|
|
|
|
exportWizard
|
|
|
|
|
.addListener(new org.gcube.portlets.user.sdmxexportwizardtd.client.general.WizardListener() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void failed(Throwable throwable, String reason, String details) {
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
@Override
|
|
|
|
|
public void failed(Throwable throwable,
|
|
|
|
|
String reason, String details) {
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void completed(
|
|
|
|
|
org.gcube.portlets.user.sdmxexportwizardtd.shared.TRId id) {
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
@Override
|
|
|
|
|
public void completed(TRId id) {
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void aborted() {
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
@Override
|
|
|
|
|
public void aborted() {
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
exportWizard.show();
|
|
|
|
|
}
|
|
|
|
@ -429,8 +410,17 @@ public class TabularDataController {
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
protected void closeTabularResources(){
|
|
|
|
|
if(tableOpen) tabularData.closeTable();
|
|
|
|
|
protected void closeTabularResources() {
|
|
|
|
|
if (uiState == UIState.TR_OPEN) {
|
|
|
|
|
tabularData.closeTable();
|
|
|
|
|
uiState = UIState.START;
|
|
|
|
|
if(uiProperties==UIProperties.OPENED){
|
|
|
|
|
functionalityPanel.collapse();
|
|
|
|
|
functionalityPanel.disable();
|
|
|
|
|
uiProperties=UIProperties.CLOSED;
|
|
|
|
|
functionalityTab.remove(trProperties);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -444,9 +434,9 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onSuccess() {
|
|
|
|
|
TDOpen tdOpen= new TDOpen("Tabular Resources Open");
|
|
|
|
|
TDOpen tdOpen = new TDOpen("Tabular Resources Open");
|
|
|
|
|
|
|
|
|
|
tdOpen.addListener(new org.gcube.portlets.user.td.open.client.general.WizardListener(){
|
|
|
|
|
tdOpen.addListener(new org.gcube.portlets.user.td.open.client.general.WizardListener() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void aborted() {
|
|
|
|
@ -462,19 +452,17 @@ public class TabularDataController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void completed(
|
|
|
|
|
org.gcube.portlets.user.td.open.shared.TRId tabularResourceId) {
|
|
|
|
|
trId= new TRId(tabularResourceId.getId(),tabularResourceId.getTableId());
|
|
|
|
|
tableOpening=new TableId(Constants.TD_DATASOURCE_FACTORY_ID,trId.getTableId());
|
|
|
|
|
tabularData.openTable(tableOpening);
|
|
|
|
|
tableOpen=true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void completed(TRId tabularResourceId) {
|
|
|
|
|
trId = new TRId(tabularResourceId.getId(),
|
|
|
|
|
tabularResourceId.getTableId());
|
|
|
|
|
tableOpening = new TableId(
|
|
|
|
|
Constants.TD_DATASOURCE_FACTORY_ID, trId
|
|
|
|
|
.getTableId());
|
|
|
|
|
tabularData.openTable(tableOpening);
|
|
|
|
|
uiState = UIState.TR_OPEN;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
Log.info("TDOpen add Listener");
|
|
|
|
|
tdOpen.show();
|
|
|
|
@ -488,16 +476,14 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
protected void doSDMXDatasetImport(List<Dataset> datasets) {
|
|
|
|
|
Log.info("doSDMXDatasetImport: " + datasets.size());
|
|
|
|
|
for (Dataset d : datasets) {
|
|
|
|
|
Log.info("Dataset: " + d.getId() + d.getName() + d.getAgencyId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
* protected void doSDMXDatasetImport(List<Dataset> datasets) {
|
|
|
|
|
* Log.info("doSDMXDatasetImport: " + datasets.size()); for (Dataset d :
|
|
|
|
|
* datasets) { Log.info("Dataset: " + d.getId() + d.getName() +
|
|
|
|
|
* d.getAgencyId()); }
|
|
|
|
|
*
|
|
|
|
|
* }
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
protected void openCSVImportWizard() {
|
|
|
|
|
/*
|
|
|
|
@ -542,34 +528,24 @@ public class TabularDataController {
|
|
|
|
|
"Please retry to lunch the operation");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* {@inheritDoc}
|
|
|
|
|
*
|
|
|
|
|
* @Override public HandlerRegistration addCloseHandler(CloseHandler<Long>
|
|
|
|
|
* handler) { //return eventBus.addHandler(CloseEvent.getType(),
|
|
|
|
|
* handler); }
|
|
|
|
|
*
|
|
|
|
|
* /** {@inheritDoc}
|
|
|
|
|
* @Override public HandlerRegistration addOpenHandler(OpenHandler<Long>
|
|
|
|
|
* handler) { //return eventBus.addHandler(OpenEvent.getType(),
|
|
|
|
|
* handler); }
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* {@inheritDoc}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public HandlerRegistration addCloseHandler(CloseHandler<Long> handler) {
|
|
|
|
|
//return eventBus.addHandler(CloseEvent.getType(), handler);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* {@inheritDoc}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public HandlerRegistration addOpenHandler(OpenHandler<Long> handler) {
|
|
|
|
|
//return eventBus.addHandler(OpenEvent.getType(), handler);
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* {@inheritDoc}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void fireEvent(GwtEvent<?> event) {
|
|
|
|
|
eventBus.fireEvent(event);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*
|
|
|
|
|
* @Override public void fireEvent(GwtEvent<?> event) {
|
|
|
|
|
* eventBus.fireEvent(event); }
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|