From 09090550934050e4a3c9febc5dd9a325c3716132 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 7 Jul 2017 13:45:47 +0000 Subject: [PATCH] ref 9056:TabMan - Improve resource management in TabMan https://support.d4science.org/issues/9056 Improve resources management git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-resources-widget@150916 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/ResourcesListViewDetailPanel.java | 7 ----- .../client/ResourcesListViewPanel.java | 26 ++----------------- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/resourceswidget/client/ResourcesListViewDetailPanel.java b/src/main/java/org/gcube/portlets/user/td/resourceswidget/client/ResourcesListViewDetailPanel.java index 7b79a79..f566a91 100644 --- a/src/main/java/org/gcube/portlets/user/td/resourceswidget/client/ResourcesListViewDetailPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/resourceswidget/client/ResourcesListViewDetailPanel.java @@ -131,8 +131,6 @@ public class ResourcesListViewDetailPanel extends SimpleContainer { case SDMX: thumbnailPath = ResourceBundle.INSTANCE.sdmx160().getSafeUri(); break; - case WEB: - thumbnailPath = ResourceBundle.INSTANCE.world160().getSafeUri(); default: thumbnailPath = ResourceBundle.INSTANCE.resources160() .getSafeUri(); @@ -303,11 +301,6 @@ public class ResourcesListViewDetailPanel extends SimpleContainer { btnSave.setVisible(false); btnDelete.setVisible(true); break; - case WEB: - btnOpen.setVisible(true); - btnSave.setVisible(false); - btnDelete.setVisible(true); - break; default: btnOpen.setVisible(false); btnSave.setVisible(false); diff --git a/src/main/java/org/gcube/portlets/user/td/resourceswidget/client/ResourcesListViewPanel.java b/src/main/java/org/gcube/portlets/user/td/resourceswidget/client/ResourcesListViewPanel.java index 46bdc38..80e6d27 100644 --- a/src/main/java/org/gcube/portlets/user/td/resourceswidget/client/ResourcesListViewPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/resourceswidget/client/ResourcesListViewPanel.java @@ -17,7 +17,6 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.SDMXResourceTD; import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.SaveResourceSession; import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.StringResourceTD; import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.TableResourceTD; -import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.WebResourceTD; import org.gcube.portlets.user.td.gwtservice.shared.uriresolver.UriResolverSession; import org.gcube.portlets.user.td.resourceswidget.client.charts.ChartViewerDialog; import org.gcube.portlets.user.td.resourceswidget.client.resources.ResourceBundle; @@ -476,10 +475,6 @@ public class ResourcesListViewPanel extends FramedPanel { case SDMX: thumbnailPath = ResourceBundle.INSTANCE.sdmx80().getSafeUri(); break; - case WEB: - thumbnailPath = ResourceBundle.INSTANCE.world80().getSafeUri(); - break; - default: thumbnailPath = ResourceBundle.INSTANCE.resources80() .getSafeUri(); @@ -739,8 +734,6 @@ public class ResourcesListViewPanel extends FramedPanel { break; case SDMX: break; - case WEB: - break; case GENERIC_FILE: requestSaveResource(resourceTDDescriptor, MimeTypeSupport._unknow); break; @@ -864,9 +857,6 @@ public class ResourcesListViewPanel extends FramedPanel { case SDMX: requestOpenSDMX(resourceTDDescriptor); break; - case WEB: - requestOpenWEB(resourceTDDescriptor); - break; case GENERIC_FILE: requestOpenGenericFile(resourceTDDescriptor); break; @@ -891,7 +881,7 @@ public class ResourcesListViewPanel extends FramedPanel { if (resource instanceof SDMXResourceTD) { SDMXResourceTD sdmxResourceTD=(SDMXResourceTD) resource; String link= - sdmxResourceTD.getStringValue(); + sdmxResourceTD.getResourceUrl(); Log.debug("Retrieved link: " + link); Window.open(link, resourceTDDescriptor.getName(), ""); @@ -901,19 +891,7 @@ public class ResourcesListViewPanel extends FramedPanel { } - private void requestOpenWEB(ResourceTDDescriptor resourceTDDescriptor) { - ResourceTD resource = resourceTDDescriptor.getResourceTD(); - if (resource instanceof WebResourceTD) { - WebResourceTD sdmxResourceTD=(WebResourceTD) resource; - String link= - sdmxResourceTD.getStringValue(); - Log.debug("Retrieved link: " + link); - Window.open(link, - resourceTDDescriptor.getName(), ""); - - - } - } +