"+codelist.getName()+"
"+codelist.getDescription()+"
"+dataset.getName()+"
"+dataset.getDescription()+"
onModuleLoad()
.
+ */
+public class SDMXImportWizardTD extends WizardWindow {
+
+ protected SDMXImportSession importSession;
+
+
+ /**
+ * The id of the {@link CSVTarget} to use.
+ * @param targetId
+ */
+
+ public SDMXImportWizardTD(String title) {
+ super(title);
+ setWidth(550);
+ setHeight(520);
+
+ importSession= new SDMXImportSession();
+
+
+ SDMXDocumentSelectionCard sdmxdocumentSelection= new SDMXDocumentSelectionCard(importSession);
+ addCard(sdmxdocumentSelection);
+
+ SourceSelectionCard sourceSelection= new SourceSelectionCard(importSession);
+ addCard(sourceSelection);
+
+
+
+ }
+
+
+}
\ No newline at end of file
diff --git a/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/SDMXImportWizardTDEntry.java b/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/SDMXImportWizardTDEntry.java
new file mode 100644
index 0000000..8529168
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/SDMXImportWizardTDEntry.java
@@ -0,0 +1,15 @@
+package org.gcube.portlets.user.td.sdmximportwidget.client;
+
+
+
+import com.allen_sauer.gwt.log.client.Log;
+import com.google.gwt.core.client.EntryPoint;
+
+public class SDMXImportWizardTDEntry implements EntryPoint {
+
+ @Override
+ public void onModuleLoad() {
+ SDMXImportWizardTD importWizard= new SDMXImportWizardTD("SDMXImport");
+ Log.info(importWizard.getId());
+ }
+}
diff --git a/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/SDMXOperationInProgressCard.java b/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/SDMXOperationInProgressCard.java
new file mode 100644
index 0000000..206013e
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/td/sdmximportwidget/client/SDMXOperationInProgressCard.java
@@ -0,0 +1,203 @@
+/**
+ *
+ */
+package org.gcube.portlets.user.td.sdmximportwidget.client;
+
+import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
+import org.gcube.portlets.user.td.gwtservice.shared.TRId;
+import org.gcube.portlets.user.td.gwtservice.shared.sdmx.SDMXImportSession;
+import org.gcube.portlets.user.td.gwtservice.shared.source.SDMXRegistrySource;
+import org.gcube.portlets.user.td.sdmximportwidget.client.general.WizardCard;
+import org.gcube.portlets.user.td.sdmximportwidget.client.progress.ImportProgressBarUpdater;
+import org.gcube.portlets.user.td.sdmximportwidget.client.progress.OperationProgressListener;
+import org.gcube.portlets.user.td.sdmximportwidget.client.progress.OperationProgressUpdater;
+
+import com.allen_sauer.gwt.log.client.Log;
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
+import com.google.gwt.user.client.ui.HasVerticalAlignment;
+import com.sencha.gxt.core.client.util.Margins;
+import com.sencha.gxt.widget.core.client.FramedPanel;
+import com.sencha.gxt.widget.core.client.ProgressBar;
+import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
+import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer;
+import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer.VBoxLayoutAlign;
+
+//import com.allen_sauer.gwt.log.client.Log;
+//import com.google.gwt.user.client.Command;
+
+/**
+ *
+ * @author "Giancarlo Panichi" g.panichi@isti.cnr.it
+ *
+ */
+public class SDMXOperationInProgressCard extends WizardCard implements
+ OperationProgressListener {
+
+ public static final int STATUS_POLLING_DELAY = 1000;
+ protected SDMXOperationInProgressCard thisCard;
+ protected SDMXImportSession importSession;
+ protected OperationProgressUpdater progressUpdater;
+
+ public SDMXOperationInProgressCard(final SDMXImportSession importSession) {
+ super("Operation In Progress", "");
+
+ this.importSession = importSession;
+ thisCard = this;
+
+ VBoxLayoutContainer operationInProgressPanel = new VBoxLayoutContainer();
+ operationInProgressPanel.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
+
+ final FlexTable description = new FlexTable();
+ FlexCellFormatter cellFormatter = description.getFlexCellFormatter();
+ description.setCellSpacing(10);
+ description.setCellPadding(4);
+ description.setBorderWidth(0);
+
+ // display:block;vertical-align:text-top;
+ description.setHTML(0, 0,
+ "Document: ");
+ description.setText(0, 1, importSession.getSDMXDocument().getName());
+ description.setHTML(1, 0,
+ "Source: ");
+ description.setText(1, 1, importSession.getSource().getName());
+
+ if (importSession.getSource().getId().compareTo("SDMXRegistry") == 0) {
+ description.setHTML(2, 0,
+ "Url: ");
+ description
+ .setText(
+ 2,
+ 1,
+ ((SDMXRegistrySource) importSession.getSource())
+ .getUrl() == null ? "Internal"
+ : ((SDMXRegistrySource) importSession
+ .getSource()).getUrl());
+ if (importSession.getSDMXDocument().getId().compareTo("codelist") == 0) {
+ cellFormatter.setVerticalAlignment(3, 0,
+ HasVerticalAlignment.ALIGN_TOP);
+ description
+ .setHTML(3, 0,
+ "Codelist Selected: ");
+ final FlexTable codelistDescription = new FlexTable();
+ codelistDescription.setBorderWidth(0);
+ codelistDescription.setCellPadding(4);
+ codelistDescription.setCellSpacing(10);
+
+ codelistDescription
+ .setHTML(0, 0,
+ "Id: ");
+ codelistDescription.setText(0, 1, importSession
+ .getSelectedCodelist().getId());
+ codelistDescription
+ .setHTML(1, 0,
+ "Name: ");
+ codelistDescription.setText(1, 1, importSession
+ .getSelectedCodelist().getName());
+ codelistDescription
+ .setHTML(2, 0,
+ "Agency: ");
+ codelistDescription.setText(2, 1, importSession
+ .getSelectedCodelist().getAgencyId());
+ codelistDescription
+ .setHTML(3, 0,
+ "Version: ");
+ codelistDescription.setText(3, 1, importSession
+ .getSelectedCodelist().getVersion());
+
+ description.setWidget(3, 1, codelistDescription);
+ }
+ }
+
+ FramedPanel summary = new FramedPanel();
+ summary.setHeadingText("Import Summary");
+ summary.setWidth(400);
+ summary.add(description);
+ operationInProgressPanel.add(summary, new BoxLayoutData(new Margins(20,
+ 5, 10, 5)));
+
+ ProgressBar progressBar = new ProgressBar();
+ operationInProgressPanel.add(progressBar, new BoxLayoutData(
+ new Margins(10, 5, 10, 5)));
+
+ progressUpdater = new OperationProgressUpdater();
+ progressUpdater.addListener(new ImportProgressBarUpdater(progressBar));
+
+ progressUpdater.addListener(this);
+
+ setContent(operationInProgressPanel);
+
+ }
+
+ public void importSDMX() {
+ TDGWTServiceAsync.INSTANCE.importSDMXClientLibraryRequest(
+ importSession, new AsyncCallbackInternal SDMX Registry"
+ + "
Select this if you want use the Internal Registry
Another SDMX Registry
"+sdmxRegistrySource.getName()+"
"+sdmxRegistrySource.getDescription()+"
"+workspaceSource.getName()+"
"+workspaceSource.getDescription()+"
"+fileSource.getName()+"
"+fileSource.getDescription()+"