You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by st...@apache.org on 2016/08/12 13:13:10 UTC

[22/46] incubator-taverna-plugin-gis git commit: Clean imports

Clean imports

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/commit/7322d0d1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/tree/7322d0d1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/diff/7322d0d1

Branch: refs/heads/taverna2
Commit: 7322d0d1aa2f9ed25d4c228d413a51141cbcc88b
Parents: 7b90c73
Author: edikaradumi <ed...@gmail.com>
Authored: Tue Aug 2 22:44:52 2016 +0100
Committer: edikaradumi <ed...@gmail.com>
Committed: Tue Aug 2 22:44:52 2016 +0100

----------------------------------------------------------------------
 .../ui/serviceprovider/GisServiceProvider.java  | 36 +++++++++++++++++---
 .../org/apache/taverna/gis/GisActivity.java     |  7 ----
 2 files changed, 32 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/7322d0d1/apache-taverna-plugin-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceProvider.java
----------------------------------------------------------------------
diff --git a/apache-taverna-plugin-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceProvider.java b/apache-taverna-plugin-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceProvider.java
index 24e8604..e53cfec 100644
--- a/apache-taverna-plugin-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceProvider.java
+++ b/apache-taverna-plugin-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceProvider.java
@@ -12,12 +12,14 @@ import org.apache.taverna.gis.client.impl.TypeDescriptor;
 
 import net.sf.taverna.t2.servicedescriptions.AbstractConfigurableServiceProvider;
 import net.sf.taverna.t2.servicedescriptions.ConfigurableServiceProvider;
+import net.sf.taverna.t2.servicedescriptions.CustomizedConfigurePanelProvider;
 import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
 import net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean;
 import net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean;
 
 public class GisServiceProvider extends AbstractConfigurableServiceProvider<GisServiceProviderConfig>
-		implements ConfigurableServiceProvider<GisServiceProviderConfig> {
+		implements ConfigurableServiceProvider<GisServiceProviderConfig>,
+		CustomizedConfigurePanelProvider<GisServiceProviderConfig> {
 
 	public GisServiceProvider() {
 		super(new GisServiceProviderConfig());
@@ -36,9 +38,6 @@ public class GisServiceProvider extends AbstractConfigurableServiceProvider<GisS
 
 		List<ServiceDescription> results = new ArrayList<ServiceDescription>();
 
-		// FIXME: Implement the actual service search/lookup instead
-		// of dummy for-loop
-
 		GisServiceDesc service = new GisServiceDesc();
 		// Populate the service description bean
 		service.setOgcServiceUri(getConfiguration().getOgcServiceUri());
@@ -146,5 +145,34 @@ public class GisServiceProvider extends AbstractConfigurableServiceProvider<GisS
 		
 		
 	}
+
+	@Override
+	public void createCustomizedConfigurePanel(
+			net.sf.taverna.t2.servicedescriptions.CustomizedConfigurePanelProvider.CustomizedConfigureCallBack<GisServiceProviderConfig> callBack) {
+
+
+		AddGisServiceDialog addGISServiceDialog = new AddGisServiceDialog(null);
+
+		addGISServiceDialog.setVisible(true);
+//		
+//		
+//		// Possible choices for drop-down box
+//	    URI[] uris = new URI[3];
+//	    uris[0] = URI.create("http://example.com/serviceA");
+//	    uris[1] = URI.create("http://example.com/serviceB");
+//	    uris[2] = URI.create("http://example.com/serviceC");
+//	 
+//	    // Dialogue with drop-down
+//	    String message = "Choose the example service URI";
+//	    String title = "Which service?";
+//	    Object uri = JOptionPane.showInputDialog(null, message, title,
+//	            JOptionPane.PLAIN_MESSAGE, null, uris, uris[0]);
+//	 
+//	    // Return a new provider configuration
+//	    GisServiceProviderConfig config = new GisServiceProviderConfig();
+//	    config.setOgcServiceUri((URI) uri);
+//	    callBack.newProviderConfiguration(config);
+		
+	}
 	
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/7322d0d1/apache-taverna-plugin-gis-activity/src/main/java/org/apache/taverna/gis/GisActivity.java
----------------------------------------------------------------------
diff --git a/apache-taverna-plugin-gis-activity/src/main/java/org/apache/taverna/gis/GisActivity.java b/apache-taverna-plugin-gis-activity/src/main/java/org/apache/taverna/gis/GisActivity.java
index b0ad827..267f26e 100644
--- a/apache-taverna-plugin-gis-activity/src/main/java/org/apache/taverna/gis/GisActivity.java
+++ b/apache-taverna-plugin-gis-activity/src/main/java/org/apache/taverna/gis/GisActivity.java
@@ -1,19 +1,13 @@
 package org.apache.taverna.gis;
 
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 
-import org.geotools.ows.ServiceException;
 import org.n52.wps.client.ExecuteRequestBuilder;
 import org.n52.wps.client.ExecuteResponseAnalyser;
 import org.n52.wps.client.WPSClientException;
 import org.n52.wps.client.WPSClientSession;
-import org.n52.wps.io.data.IData;
-import org.n52.wps.io.data.binding.complex.GTVectorDataBinding;
 
 import net.opengis.wps.x100.DataType;
 import net.opengis.wps.x100.ExecuteDocument;
@@ -38,7 +32,6 @@ public class GisActivity extends AbstractAsynchronousActivity<GisActivityConfigu
 	@Override
 	public void configure(GisActivityConfigurationBean configBean) throws ActivityConfigurationException {
 
-		// TODO: Should I call HealthChecker here??
 		// Any pre-config sanity checks
 		if (configBean.getOgcServiceUri().equals("")) {
 			throw new ActivityConfigurationException("Geospatial web service URI can't be empty");