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 2015/02/17 12:48:20 UTC

[01/50] [abbrv] incubator-taverna-workbench-common-activities git commit: Using taverna-parent

Repository: incubator-taverna-workbench-common-activities
Updated Branches:
  refs/heads/master [created] c64d5ce68


Using taverna-parent


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/f8adc463
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/f8adc463
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/f8adc463

Branch: refs/heads/master
Commit: f8adc463e792a851bf858e8a3f1b327b4d9bff76
Parents: 064b5da
Author: Christian-B <br...@cs.man.ac.uk>
Authored: Tue Sep 23 16:53:35 2014 +0100
Committer: Christian-B <br...@cs.man.ac.uk>
Committed: Tue Sep 23 16:53:35 2014 +0100

----------------------------------------------------------------------
 pom.xml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/f8adc463/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 77e4508..3f713cc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,12 +2,13 @@
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
-		<groupId>net.sf.taverna.t2</groupId>
-		<artifactId>ui-activities</artifactId>
-		<version>2.0-SNAPSHOT</version>
+		<groupId>net.sf.taverna</groupId>
+		<artifactId>taverna-parent</artifactId>
+		<version>3.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>net.sf.taverna.t2.ui-activities</groupId>
 	<artifactId>spreadsheet-import-activity-ui</artifactId>
+        <version>2.0-SNAPSHOT</version>
 	<packaging>bundle</packaging>
 	<name>Taverna 2 Spreadsheet Import Activity UI</name>
 	<dependencies>


[43/50] [abbrv] incubator-taverna-workbench-common-activities git commit: Merge from https://github.com/taverna/taverna-external-tool-activity-ui master

Posted by st...@apache.org.
Merge from https://github.com/taverna/taverna-external-tool-activity-ui master


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/a7b85069
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/a7b85069
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/a7b85069

Branch: refs/heads/master
Commit: a7b850692237fa5ef07fd94c2e3c5526cadd5f0d
Parents: abdaaa6 e48c319
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:34:40 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:34:40 2015 +0000

----------------------------------------------------------------------
 taverna-external-tool-activity-ui/pom.xml       | 108 +++
 .../ExternalToolActivityConfigureAction.java    |  83 ++
 .../ToolInvocationConfiguration.java            |  57 ++
 .../externaltool/manager/GroupPanel.java        | 113 +++
 .../InvocationGroupManagerShutdownHook.java     |  34 +
 .../InvocationGroupManagerStartupHook.java      |  47 +
 .../manager/InvocationMechanismEditor.java      |  28 +
 .../externaltool/manager/MechanismPanel.java    | 121 +++
 .../ToolInvocationConfigurationPanel.java       | 379 ++++++++
 .../ToolInvocationConfigurationUIFactory.java   |  54 ++
 .../local/LocalInvocationMechanismEditor.java   | 122 +++
 .../manager/ssh/ExternalToolSshNodeViewer.java  | 110 +++
 .../ssh/SshInvocationMechanismEditor.java       | 234 +++++
 .../AddExternalToolContextualMenuAction.java    | 111 +++
 .../menu/AddExternalToolMenuAction.java         | 111 +++
 .../menu/ConfigureExternalToolMenuAction.java   |  69 ++
 .../externaltool/menu/FeedbackMenuAction.java   |  82 ++
 .../AddExternalToolServiceDialog.java           | 189 ++++
 .../ExternalToolActivityIcon.java               |  73 ++
 .../ExternalToolServiceDescription.java         | 149 ++++
 .../ExternalToolServiceProvider.java            | 132 +++
 .../ExternalToolServiceProviderConfig.java      |  56 ++
 .../ExternalToolTemplateServiceDescription.java |  77 ++
 .../t2/activities/externaltool/utils/Tools.java | 129 +++
 .../externaltool/views/AnnotationPanel.java     |  41 +
 .../externaltool/views/EditablePanel.java       |  76 ++
 .../ExternalToolActivityContextualView.java     | 181 ++++
 .../views/ExternalToolActivityViewFactory.java  |  76 ++
 .../views/ExternalToolConfigView.java           | 868 +++++++++++++++++++
 .../views/ExternalToolFileViewer.java           | 103 +++
 .../ExternalToolRuntimeEnvironmentViewer.java   |  56 ++
 .../views/ExternalToolStaticStringViewer.java   |  53 ++
 .../views/ExternalToolStaticUrlViewer.java      |  56 ++
 .../ExternalToolStringReplacementViewer.java    |  97 +++
 .../externaltool/views/FilePanel.java           | 119 +++
 .../externaltool/views/InvocationPanel.java     | 396 +++++++++
 .../views/LoadDescriptionAction.java            |  89 ++
 .../views/SaveDescriptionAction.java            | 124 +++
 .../externaltool/views/ScriptPanel.java         | 149 ++++
 .../externaltool/views/StaticStringPanel.java   | 106 +++
 .../externaltool/views/StaticUrlPanel.java      | 108 +++
 .../views/StringReplacementPanel.java           | 134 +++
 .../externaltool/views/ToolXMLPanel.java        |  33 +
 ...ternaltool.manager.InvocationMechanismEditor |   2 +
 ...rvicedescriptions.ServiceDescriptionProvider |   2 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |   4 +
 .../net.sf.taverna.t2.workbench.ShutdownSPI     |   1 +
 .../net.sf.taverna.t2.workbench.StartupSPI      |   1 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |   1 +
 ...rkbench.configuration.ConfigurationUIFactory |   1 +
 ...ntextualviews.activity.ContextualViewFactory |   1 +
 .../external-tool-activity-ui-context-osgi.xml  |  39 +
 .../external-tool-activity-ui-context.xml       |  50 ++
 .../src/main/resources/externaltool.png         | Bin 0 -> 743 bytes
 54 files changed, 5635 insertions(+)
----------------------------------------------------------------------



[12/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-external-tool-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/EditablePanel.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/EditablePanel.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/EditablePanel.java
new file mode 100644
index 0000000..b395983
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/EditablePanel.java
@@ -0,0 +1,76 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.AbstractAction;
+import javax.swing.JButton;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseEnumeration;
+
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
+import net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolServiceDescription;
+import net.sf.taverna.t2.activities.externaltool.utils.Tools;
+import net.sf.taverna.t2.lang.ui.DeselectingButton;
+
+/**
+ * @author alanrw
+ *
+ */
+public class EditablePanel extends JPanel {
+	public EditablePanel(final ExternalToolConfigView view) {
+		super(new FlowLayout());
+		
+		JButton update = new DeselectingButton("Update tool description",
+				new AbstractAction() {
+
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				ExternalToolActivityConfigurationBean bean = view.getConfiguration();
+				String repositoryUrl = bean.getRepositoryUrl();
+				String id = bean.getExternaltoolid();
+				UseCaseDescription usecase = null;
+				try {
+					usecase = UseCaseEnumeration.readDescriptionFromUrl(
+						repositoryUrl, id);
+				}
+				catch (IOException ex) {
+					// Already logged
+				}
+				if (usecase != null) {
+					bean.setUseCaseDescription(usecase);
+					view.refreshConfiguration(bean);
+				} else {
+					JOptionPane.showMessageDialog(view, "Unable to find tool description " + id, "Missing tool description", JOptionPane.ERROR_MESSAGE);
+				}
+			}});
+		this.add(update);
+		
+		JButton makeEditable = new DeselectingButton("Edit tool description",
+				new AbstractAction() {
+
+			@Override
+			public void actionPerformed(ActionEvent arg0) {
+				ExternalToolActivityConfigurationBean config = view.makeConfiguration();
+				view.setEditable(true, config);
+				
+			}
+		});
+		makeEditable.setToolTipText("Edit the tool description");
+		if (Tools.areAllUnderstood(view.getConfiguration().getUseCaseDescription().getInputs())) {
+		this.add(makeEditable);
+		}
+		
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityContextualView.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityContextualView.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityContextualView.java
new file mode 100644
index 0000000..46c14be
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityContextualView.java
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * Copyright (C) 2010 Hajo Nils Krabbenhoeft, INB, University of Luebeck
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.Frame;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.TreeMap;
+
+import javax.swing.Action;
+
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
+import net.sf.taverna.t2.activities.externaltool.actions.ExternalToolActivityConfigureAction;
+import net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolActivityIcon;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
+import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInputStatic;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptOutput;
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
+
+/**
+ * ExternalToolActivityContextualView displays the use case information in a HTML table. Currently,
+ * this is only the use case ID.
+ *
+ * @author Hajo Nils Krabbenhoeft
+ */
+public class ExternalToolActivityContextualView extends
+		HTMLBasedActivityContextualView<ExternalToolActivityConfigurationBean> {
+	private static final long serialVersionUID = 1L;
+	private final EditManager editManager;
+	private final FileManager fileManager;
+	private final ActivityIconManager activityIconManager;
+
+	public ExternalToolActivityContextualView(Activity<?> activity, EditManager editManager,
+			FileManager fileManager, ColourManager colourManager, ActivityIconManager activityIconManager) {
+		super(activity, colourManager);
+		this.editManager = editManager;
+		this.fileManager = fileManager;
+		this.activityIconManager = activityIconManager;
+	}
+
+	@Override
+	protected String getRawTableRowsHtml() {
+		String html = "";
+		ExternalToolActivityConfigurationBean bean = getConfigBean();
+		String repositoryUrl = bean.getRepositoryUrl();
+		if ((repositoryUrl == null) || repositoryUrl.isEmpty()) {
+			repositoryUrl = "<b>Not specified</b>";
+		}
+		html += "<tr><td>Repository URL</td><td>" + repositoryUrl + "</td></tr>";
+
+		String id = bean.getExternaltoolid();
+		if ((id == null) || id.isEmpty()) {
+			id = "<b>Not specified</b>";
+		}
+		html += "<tr><td>Id</td><td>" + id + "</td></tr>";
+
+		UseCaseDescription useCaseDescription = bean.getUseCaseDescription();
+		String name = useCaseDescription.getUsecaseid();
+		if ((name == null) || name.isEmpty()) {
+			name = "<b>Not specified</b>";
+		}
+		html += "<tr><td>Name</td><td>" + name + "</td></tr>";
+
+		Map<String, ScriptInput> stringReplacements = new TreeMap<String, ScriptInput>();
+		Map<String, ScriptInput> fileInputs = new TreeMap<String, ScriptInput>();
+
+		for (Entry<String, ScriptInput> entry : useCaseDescription.getInputs().entrySet()) {
+			String key = entry.getKey();
+			ScriptInput value = entry.getValue();
+			if (value.isFile()) {
+				fileInputs.put(key, value);
+			} else if (value.isTempFile()) {
+				// Nothing
+			} else {
+				stringReplacements.put(key, value);
+			}
+		}
+
+		if (!stringReplacements.isEmpty()) {
+			html += "<tr><td colspan=2 align=center><b>String replacements</b></td></tr>";
+			html += "<tr><td><b>Port name</b></td><td><b>Replaces</b></td></tr>";
+			for (String siName : stringReplacements.keySet()) {
+				html += "<tr><td>" + siName + "</td>";
+				ScriptInput si = stringReplacements.get(siName);
+				html += "<td>%%" + si.getTag() + "%%</td>";
+
+				html += "</tr>";
+			}
+		}
+
+		if (!fileInputs.isEmpty()) {
+			html += "<tr><td colspan=2 align=center><b>File inputs</b></td></tr>";
+			html += "<tr><td><b>Port name</b></td><td><b>To file</b></td></tr>";
+			for (String siName : fileInputs.keySet()) {
+				html += "<tr><td>" + siName + "</td>";
+				ScriptInput si = fileInputs.get(siName);
+				html += "<td>" + si.getTag() + "</td>";
+
+				html += "</tr>";
+			}
+		}
+
+		List<ScriptInputStatic> staticInputs = useCaseDescription.getStatic_inputs();
+		if (!staticInputs.isEmpty()) {
+			html += "<tr><td colspan=2 align=center><b>Static inputs</b></td></tr>";
+			html += "<tr><td><b>Type</b></td><td><b>To file</b></td></tr>";
+			for (ScriptInputStatic si : staticInputs) {
+				if (si.getUrl() != null) {
+					html += "<td><b>URL</b></td>";
+				} else {
+					html += "<td><b>Explicit content</b></td>";
+				}
+				if (si.isFile()) {
+					html += "<td>" + si.getTag() + "</td>";
+				}
+				html += "</tr>";
+			}
+		}
+		Map<String, ScriptOutput> outputs = useCaseDescription.getOutputs();
+		if (!outputs.isEmpty()) {
+			html += "<tr><td colspan=2 align=center><b>File outputs</b></td></tr>";
+			html += "<tr><td><b>Port name</b></td><td><b>From file</b></td></tr>";
+			for (String soName : outputs.keySet()) {
+				html += "<tr><td>" + soName + "</td>";
+				ScriptOutput so = outputs.get(soName);
+				html += "<td>" + so.getPath() + "</td>";
+				html += "</tr>";
+			}
+		}
+		return html;
+	}
+
+	@Override
+	public String getViewTitle() {
+		return "Tool service";
+	}
+
+	@Override
+	public Action getConfigureAction(final Frame owner) {
+		return new ExternalToolActivityConfigureAction((ExternalToolActivity) getActivity(), owner,
+				editManager, fileManager, activityIconManager);
+	}
+
+	public String getBackgroundColour() {
+
+		return ExternalToolActivityIcon.getColourString();
+	}
+
+	@Override
+	public int getPreferredPosition() {
+		return 100;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityViewFactory.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityViewFactory.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityViewFactory.java
new file mode 100644
index 0000000..902c736
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityViewFactory.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (C) 2010 Hajo Nils Krabbenhoeft, INB, University of Luebeck
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.util.Arrays;
+import java.util.List;
+
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
+
+/**
+ * ExternalToolActivityViewFactory produces an ExternalToolActivityContextualView to show
+ * information for a use case activity.
+ *
+ * @author Hajo Nils Krabbenhoeft
+ */
+public class ExternalToolActivityViewFactory implements ContextualViewFactory<ExternalToolActivity> {
+
+	private EditManager editManager;
+	private FileManager fileManager;
+	private ActivityIconManager activityIconManager;
+	private ColourManager colourManager;
+
+	public boolean canHandle(Object object) {
+		if (object instanceof ExternalToolActivity) {
+			return true;
+		}
+		return false;
+	}
+
+	public List<ContextualView> getViews(ExternalToolActivity selection) {
+		return Arrays.asList(new ContextualView[] { new ExternalToolActivityContextualView(
+				selection, editManager, fileManager, colourManager, activityIconManager) });
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setColourManager(ColourManager colourManager) {
+		this.colourManager = colourManager;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolConfigView.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolConfigView.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolConfigView.java
new file mode 100644
index 0000000..4723a78
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolConfigView.java
@@ -0,0 +1,868 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester   
+ * 
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ * 
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *    
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *    
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.Map.Entry;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.help.CSH;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JEditorPane;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTabbedPane;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.JTextPane;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityHealthChecker;
+import net.sf.taverna.t2.activities.externaltool.utils.Tools;
+import net.sf.taverna.t2.lang.ui.KeywordDocument;
+import net.sf.taverna.t2.lang.ui.LinePainter;
+import net.sf.taverna.t2.lang.ui.NoWrapEditorKit;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationPanel;
+
+import org.apache.log4j.Logger;
+
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInputStatic;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInputUser;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptOutput;
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
+
+/**
+ * Provides the configurable view for a {@link ExternalToolActivity} through
+ * it's {@link ExternalToolActivityConfigurationBean}. Has 3 main tabs - Script,
+ * Ports & Dependencies. The {@link #inputViewList} contains the
+ * {@link ExternalToolInputViewer}s describing the input ports and
+ * {@link #outputViewList} has the {@link ExternalToolFileViewer}s
+ * 
+ * @author Ian Dunlop
+ * @author Alex Nenadic
+ * @author Alan R Williams
+ * 
+ */
+@SuppressWarnings("serial")
+public class ExternalToolConfigView
+		extends
+		ActivityConfigurationPanel<ExternalToolActivity, ExternalToolActivityConfigurationBean> {
+	
+	private static final Color LINE_COLOR = new Color(225,225,225);
+
+	private static final String FILE_INPUT_DESCRIPTION = "You can use a file input to feed data into " +
+			"the service via an input port and have that data written to the specified file.";
+
+	private static final String FILE_OUTPUT_DESCRIPTION = "You can use a file output to take the " +
+			"content of a file produced by the tool and send it to an output port of the service.";
+
+	private static final String FILE_LIST_DESCRIPTION = "If you feed a list of data into a file list " +
+			"input, then each data item is written to a temporary file. A file is produced containing " +
+			"the names of those temporary file. That index file can then be used as part of the tool " +
+			"command.";
+
+	private static final String VALID_NAME_REGEX = "[\\p{L}\\p{Digit}_]+";
+
+	private static Logger logger = Logger
+			.getLogger(ExternalToolConfigView.class);
+
+	/** The activity which this view describes */
+	protected ExternalToolActivity activity;
+
+	/** The configuration bean used to configure the activity */
+	private ExternalToolActivityConfigurationBean configuration;
+
+	private JTabbedPane tabbedPane = null;
+	private JPanel advancedPanel = null;
+	private JTabbedPane advancedTab = null;
+	private AnnotationPanel annotationPanel = null;
+	
+	private int stringReplacementGridy = 1;
+	private List<ExternalToolStringReplacementViewer> stringReplacementViewList = new ArrayList<ExternalToolStringReplacementViewer>();
+
+	private List<ExternalToolFileViewer> inputFileViewList = new ArrayList<ExternalToolFileViewer>();
+
+	private List<ExternalToolFileViewer> fileListViewList = new ArrayList<ExternalToolFileViewer>();
+
+	private int inputGridy = 1;
+
+	private int outputGridy = 1;
+	private List<ExternalToolFileViewer> outputViewList = new ArrayList<ExternalToolFileViewer>();
+
+	private int staticGridy = 1;
+	private List<ExternalToolStaticUrlViewer> staticUrlViewList = new ArrayList<ExternalToolStaticUrlViewer>();
+
+	private List<ExternalToolStaticStringViewer> staticStringViewList = new ArrayList<ExternalToolStaticStringViewer>();
+
+/*	private List<ExternalToolRuntimeEnvironmentViewer> runtimeEnvironmentViewList = new ArrayList<ExternalToolRuntimeEnvironmentViewer>();
+*/
+
+	private JTextField nameField = new JTextField(20);
+	private JTextField groupField = new JTextField(20);
+	private JTextArea descriptionArea = new JTextArea(6, 40);
+
+	private JEditorPane scriptTextArea;
+
+	private InvocationPanel invocationPanel;
+
+	private JCheckBox stdInCheckBox = new JCheckBox("Show STDIN");
+	private JCheckBox stdOutCheckBox = new JCheckBox("Show STDOUT");
+	private JCheckBox stdErrCheckBox = new JCheckBox("Show STDERR");
+	
+	private JTextField returnCodesField = new JTextField(20);
+
+	/**
+	 * Stores the {@link ExternalToolActivity}, gets its
+	 * {@link ExternalToolActivityConfigurationBean}, sets the layout and calls
+	 * {@link #initialise()} to get the view going
+	 * 
+	 * @param activity
+	 *            the {@link ExternalToolActivity} that the view is over
+	 */
+	public ExternalToolConfigView(ExternalToolActivity activity) {
+		this.activity = activity;
+		ExternalToolActivityHealthChecker.updateLocation(activity.getConfiguration());
+		configuration = (ExternalToolActivityConfigurationBean) cloneBean(activity
+				.getConfiguration());
+		setLayout(new GridBagLayout());
+		initialise(configuration);
+	}
+
+	public void noteConfiguration() {
+		configuration = makeConfiguration();
+	}
+
+	public ExternalToolActivityConfigurationBean makeConfiguration() {
+		ExternalToolActivityConfigurationBean newConfiguration = (ExternalToolActivityConfigurationBean) cloneBean(configuration);
+		ExternalToolActivityHealthChecker.updateLocation(newConfiguration);
+		
+
+		if (!isFromRepository()) {
+			UseCaseDescription ucd = newConfiguration.getUseCaseDescription();
+
+			ucd.setUsecaseid(nameField.getText());
+			if (groupField.getText().isEmpty()) {
+				ucd.setGroup(null);
+			} else {
+				ucd.setGroup(groupField.getText());
+			}
+			ucd.setDescription(descriptionArea.getText());
+			ucd.setCommand(scriptTextArea.getText());
+			ucd.setReturnCodesAsText(returnCodesField.getText());
+			ucd.setIncludeStdIn(stdInCheckBox.isSelected());
+			ucd.setIncludeStdOut(stdOutCheckBox.isSelected());
+			ucd.setIncludeStdErr(stdErrCheckBox.isSelected());
+
+			ucd.getInputs().clear();
+			ucd.getTags().clear();
+			synchronized (fileListViewList) {
+				for (ExternalToolFileViewer viewer : fileListViewList) {
+					ScriptInputUser si = new ScriptInputUser();
+					si.setBinary(viewer.isBinary());
+					si.setList(true);
+					si.setTag(viewer.getValue());
+					si.setTempFile(false);
+					si.setFile(true);
+					ucd.getInputs().put(viewer.getName(), si);
+				}
+			}
+
+			synchronized (stringReplacementViewList) {
+				for (ExternalToolStringReplacementViewer viewer : stringReplacementViewList) {
+					ScriptInputUser si = new ScriptInputUser();
+					si.setBinary(false);
+					si.setList(false);
+					si.setTag(viewer.getValue());
+					si.setTempFile(false);
+					si.setFile(false);
+					ucd.getTags().add(si.getTag());
+					ucd.getInputs().put(viewer.getName(), si);
+				}
+			}
+
+			synchronized (inputFileViewList) {
+				for (ExternalToolFileViewer viewer : inputFileViewList) {
+					ScriptInputUser si = new ScriptInputUser();
+					si.setBinary(viewer.isBinary());
+					si.setList(false);
+					si.setTag(viewer.getValue());
+					si.setTempFile(false);
+					si.setFile(true);
+					ucd.getInputs().put(viewer.getName(), si);
+				}
+			}
+
+			synchronized (outputViewList) {
+				ucd.getOutputs().clear();
+				for (ExternalToolFileViewer viewer : outputViewList) {
+					ScriptOutput so = new ScriptOutput();
+					so.setBinary(viewer.isBinary());
+					so.setPath(viewer.getValue());
+					ucd.getOutputs().put(viewer.getName(), so);
+				}
+			}
+			ucd.getStatic_inputs().clear();
+			synchronized (staticStringViewList) {
+				for (ExternalToolStaticStringViewer viewer : staticStringViewList) {
+					ScriptInputStatic sis = new ScriptInputStatic();
+					sis.setContent(viewer.getContent());
+					sis.setTag(viewer.getValue());
+					sis.setTempFile(false);
+					sis.setFile(true);
+					ucd.getStatic_inputs().add(sis);
+				}
+			}
+			synchronized (staticUrlViewList) {
+				for (ExternalToolStaticUrlViewer viewer : staticUrlViewList) {
+					ScriptInputStatic sis = new ScriptInputStatic();
+					sis.setUrl(viewer.getContent());
+					sis.setTag(viewer.getValue());
+					sis.setTempFile(false);
+					sis.setFile(true);
+					ucd.getStatic_inputs().add(sis);
+				}
+			}
+
+/*			synchronized (runtimeEnvironmentViewList) {
+				ucd.getREs().clear();
+				for (ExternalToolRuntimeEnvironmentViewer viewer : runtimeEnvironmentViewList) {
+					RuntimeEnvironmentConstraint newConstraint = new RuntimeEnvironmentConstraint(
+							viewer.getId(), viewer.getRelation());
+					ucd.getREs().add(newConstraint);
+				}
+			}*/
+		}
+		invocationPanel.fillInConfiguration(newConfiguration);
+
+		return newConfiguration;
+	}
+
+	public boolean isConfigurationChanged() {
+		String configurationString = convertBeanToString(activity
+				.getConfiguration());
+		return (!convertBeanToString(makeConfiguration()).equals(
+				configurationString));
+	}
+
+	/**
+	 * Adds a {@link JButton} which handles the reconfiguring of the
+	 * {@link ExternalToolActivity} through the altered
+	 * {@link ExternalToolActivityConfigurationBean}. Sets up the initial tabs -
+	 * Script (also sets the initial value), Ports & Dependencies and their
+	 * initial values through {@link #setDependencies()},
+	 * {@link #getPortPanel()}
+	 */
+	private void initialise(ExternalToolActivityConfigurationBean configuration) {
+		CSH.setHelpIDString(
+				this,
+				"net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ExternalToolConfigView");
+		this.configuration = configuration;
+		setBorder(javax.swing.BorderFactory.createTitledBorder(null, null,
+				javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+				javax.swing.border.TitledBorder.DEFAULT_POSITION,
+				new java.awt.Font("Lucida Grande", 1, 12)));
+
+		tabbedPane = new JTabbedPane();
+		
+		if (invocationPanel != null) {
+			invocationPanel.stopObserving();
+		}
+
+		if (!isFromRepository()) {
+			UseCaseDescription useCaseDescription = configuration
+					.getUseCaseDescription();
+
+			nameField.setText(useCaseDescription.getUsecaseid());
+			if (useCaseDescription.getGroup() != null) {
+				groupField.setText(useCaseDescription.getGroup());
+			}
+			descriptionArea.setText(useCaseDescription.getDescription());
+			stringReplacementViewList = new ArrayList<ExternalToolStringReplacementViewer>();
+			inputFileViewList = new ArrayList<ExternalToolFileViewer>();
+			fileListViewList = new ArrayList<ExternalToolFileViewer>();
+			outputViewList = new ArrayList<ExternalToolFileViewer>();
+			staticUrlViewList = new ArrayList<ExternalToolStaticUrlViewer>();
+			staticStringViewList = new ArrayList<ExternalToolStaticStringViewer>();
+/*			runtimeEnvironmentViewList = new ArrayList<ExternalToolRuntimeEnvironmentViewer>();*/
+
+			for (Entry<String, ScriptInput> entry : useCaseDescription
+					.getInputs().entrySet()) {
+				String name = entry.getKey();
+				ScriptInputUser si = (ScriptInputUser) entry.getValue();
+				if (Tools.isStringReplacement(si)) {
+					final ExternalToolStringReplacementViewer inputView = new ExternalToolStringReplacementViewer(
+							name, si);
+					stringReplacementViewList.add(inputView);
+				}
+
+			}
+			Collections.sort(stringReplacementViewList,
+					new Comparator<ExternalToolStringReplacementViewer>() {
+
+						@Override
+						public int compare(
+								ExternalToolStringReplacementViewer o1,
+								ExternalToolStringReplacementViewer o2) {
+							return o1.getName().compareTo(o2.getName());
+						}
+					});
+
+			for (Entry<String, ScriptInput> entry : useCaseDescription
+					.getInputs().entrySet()) {
+				String name = entry.getKey();
+				ScriptInputUser si = (ScriptInputUser) entry.getValue();
+				if (Tools.isInputFile(si)) {
+					final ExternalToolFileViewer inputView = new ExternalToolFileViewer(
+							name, si.getTag(), si.isBinary());
+					inputFileViewList.add(inputView);
+				}
+
+			}
+			Collections.sort(inputFileViewList,
+					new Comparator<ExternalToolFileViewer>() {
+
+						@Override
+						public int compare(ExternalToolFileViewer o1,
+								ExternalToolFileViewer o2) {
+							return o1.getName().compareTo(o2.getName());
+						}
+					});
+
+			for (Entry<String, ScriptInput> entry : useCaseDescription
+					.getInputs().entrySet()) {
+				String name = entry.getKey();
+				ScriptInputUser si = (ScriptInputUser) entry.getValue();
+				if (Tools.isFileList(si)) {
+					final ExternalToolFileViewer inputView = new ExternalToolFileViewer(
+							name, si.getTag(), si.isBinary());
+					fileListViewList.add(inputView);
+				}
+
+			}
+			Collections.sort(fileListViewList,
+					new Comparator<ExternalToolFileViewer>() {
+
+						@Override
+						public int compare(ExternalToolFileViewer o1,
+								ExternalToolFileViewer o2) {
+							return o1.getName().compareTo(o2.getName());
+						}
+					});
+
+			for (Entry<String, ScriptOutput> entry : useCaseDescription
+					.getOutputs().entrySet()) {
+				ScriptOutput so = entry.getValue();
+				final ExternalToolFileViewer outputView = new ExternalToolFileViewer(
+						entry.getKey(), so.getPath(), so.isBinary());
+				outputViewList.add(outputView);
+			}
+			Collections.sort(outputViewList,
+					new Comparator<ExternalToolFileViewer>() {
+
+						@Override
+						public int compare(ExternalToolFileViewer o1,
+								ExternalToolFileViewer o2) {
+							return o1.getName().compareTo(o2.getName());
+						}
+					});
+
+			for (ScriptInputStatic siss : useCaseDescription.getStatic_inputs()) {
+				if ((siss.getUrl() == null) && siss.isFile()) {
+					final ExternalToolStaticStringViewer staticView = new ExternalToolStaticStringViewer(
+							siss);
+					staticStringViewList.add(staticView);
+				}
+			}
+			Collections.sort(staticStringViewList,
+					new Comparator<ExternalToolStaticStringViewer>() {
+
+						@Override
+						public int compare(ExternalToolStaticStringViewer o1,
+								ExternalToolStaticStringViewer o2) {
+							return o1.getContent().compareTo(o2.getContent());
+						}
+					});
+
+			for (ScriptInputStatic sis : useCaseDescription.getStatic_inputs()) {
+				if ((sis.getUrl() != null) && sis.isFile()) {
+					final ExternalToolStaticUrlViewer staticView = new ExternalToolStaticUrlViewer(
+							sis);
+					staticUrlViewList.add(staticView);
+				}
+			}
+			Collections.sort(staticUrlViewList,
+					new Comparator<ExternalToolStaticUrlViewer>() {
+
+						@Override
+						public int compare(ExternalToolStaticUrlViewer o1,
+								ExternalToolStaticUrlViewer o2) {
+							return o1.getContent().compareTo(o2.getContent());
+						}
+					});
+
+/*			for (RuntimeEnvironmentConstraint rec : useCaseDescription.getREs()) {
+				final ExternalToolRuntimeEnvironmentViewer newView = new ExternalToolRuntimeEnvironmentViewer(
+						rec.getID(), rec.getRelation());
+				runtimeEnvironmentViewList.add(newView);
+			}
+			Collections.sort(runtimeEnvironmentViewList,
+					new Comparator<ExternalToolRuntimeEnvironmentViewer>() {
+
+						@Override
+						public int compare(
+								ExternalToolRuntimeEnvironmentViewer o1,
+								ExternalToolRuntimeEnvironmentViewer o2) {
+							return o1.getId().compareTo(o2.getId());
+						}
+					});*/
+
+			scriptTextArea = new JTextPane();
+			new LinePainter(scriptTextArea, LINE_COLOR);
+
+			final KeywordDocument doc = new KeywordDocument(
+					new HashSet<String>());
+			// NOTE: Due to T2-1145 - always set editor kit BEFORE setDocument
+			scriptTextArea.setEditorKit(new NoWrapEditorKit());
+			scriptTextArea.setFont(new Font("Monospaced", Font.PLAIN, 14));
+			scriptTextArea.setDocument(doc);
+			scriptTextArea.setText(useCaseDescription.getCommand());
+			scriptTextArea.setCaretPosition(0);
+			scriptTextArea.setPreferredSize(new Dimension(200, 100));
+
+			tabbedPane.addTab("Command", new ScriptPanel(this, scriptTextArea, stdInCheckBox, stdOutCheckBox, stdErrCheckBox, returnCodesField));
+			tabbedPane.addTab("String replacements",
+					new StringReplacementPanel(this, stringReplacementViewList));
+			tabbedPane.addTab(
+					"File inputs",
+					new FilePanel(this, inputFileViewList, "To file", "File type",
+							"in", FILE_INPUT_DESCRIPTION, "Add file input"));
+			tabbedPane.addTab(
+					"File outputs",
+					new FilePanel(this, outputViewList, "From file", "File type",
+							"out", FILE_OUTPUT_DESCRIPTION, "Add file output"));
+			advancedPanel = new JPanel();
+			advancedPanel.setLayout(new GridBagLayout());
+			GridBagConstraints advancedConstraint = new GridBagConstraints();
+			advancedConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
+			advancedConstraint.gridx = 0;
+			advancedConstraint.gridy = 0;
+
+			advancedConstraint.fill = GridBagConstraints.BOTH;
+			advancedConstraint.weighty = 0.1;
+			advancedConstraint.weightx = 0.1;
+			advancedTab = new JTabbedPane();
+			advancedTab.addTab("Strings", new StaticStringPanel(staticStringViewList));
+			advancedTab.addTab("URLs", new StaticUrlPanel(staticUrlViewList));
+			advancedTab.addTab(
+					"File lists",
+					new FilePanel(this, fileListViewList,
+							"To file containing list", "Individual file type",
+							"in", FILE_LIST_DESCRIPTION, "Add file list"));
+			annotationPanel = new AnnotationPanel(nameField, descriptionArea, groupField);
+			advancedTab.addTab("Annotation", annotationPanel);
+			final ToolXMLPanel toolXMLPanel = new ToolXMLPanel(configuration.getUseCaseDescription());
+			advancedTab.addTab("XML", toolXMLPanel);
+			advancedTab.addChangeListener(new ChangeListener() {
+
+				@Override
+				public void stateChanged(ChangeEvent e) {
+					if (advancedTab.getSelectedComponent() == toolXMLPanel) {
+						toolXMLPanel.regenerateTree(makeConfiguration().getUseCaseDescription());
+					}
+				}});
+			tabbedPane.addChangeListener(new ChangeListener() {
+
+				@Override
+				public void stateChanged(ChangeEvent e) {
+					if ((tabbedPane.getSelectedComponent() == advancedPanel) &&
+							(advancedTab.getSelectedComponent() == toolXMLPanel)) {
+						toolXMLPanel.regenerateTree(makeConfiguration().getUseCaseDescription());						
+					}
+				}
+				
+			});
+/*			advancedTab.addTab("Runtime environments",
+					createRuntimeEnvironmentPanel(runtimeEnvironmentViewList));*/
+			advancedPanel.add(advancedTab, advancedConstraint);
+			tabbedPane.addTab("Advanced", advancedPanel);
+		}
+		invocationPanel = new InvocationPanel(configuration);
+		
+		tabbedPane.addTab("Location", invocationPanel);
+		if (isFromRepository()) {
+			tabbedPane.addTab("Edit", new EditablePanel(this));
+		}
+		GridBagConstraints outerConstraint = new GridBagConstraints();
+		outerConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
+		outerConstraint.gridx = 0;
+		outerConstraint.gridy = 0;
+
+		outerConstraint.fill = GridBagConstraints.BOTH;
+		outerConstraint.weighty = 0.1;
+		outerConstraint.weightx = 0.1;
+		add(tabbedPane, outerConstraint);
+
+		setPreferredSize(new Dimension(700, 500));
+		this.validate();
+	}
+
+	public void whenOpened() {
+		if (scriptTextArea != null) {
+			scriptTextArea.requestFocus();
+		}
+	}
+
+	private boolean isFromRepository() {
+		return (!this.configuration.isEdited() && isOriginallyFromRepository());
+	}
+	
+	public boolean isOriginallyFromRepository() {
+		String repositoryUrl = this.configuration.getRepositoryUrl();
+		return ((repositoryUrl != null) && !repositoryUrl
+				.isEmpty());
+		
+	}
+
+
+	@Override
+	public ExternalToolActivityConfigurationBean getConfiguration() {
+		return configuration;
+	}
+
+	public void refreshConfiguration(
+			ExternalToolActivityConfigurationBean config) {
+		int visibleTab = -1;
+		int secondaryTab = -1;
+		if (tabbedPane != null) {
+			visibleTab = tabbedPane.getSelectedIndex();
+			if (tabbedPane.getSelectedComponent().equals(advancedTab)) {
+				secondaryTab = advancedTab.getSelectedIndex();
+			}
+		}
+		this.removeAll();
+		initialise(config);
+		if (visibleTab != -1) {
+			tabbedPane.setSelectedIndex(visibleTab);
+		}
+		if (secondaryTab != -1) {
+			advancedTab.setSelectedIndex(secondaryTab);
+		}
+	}
+	
+	public void showAnnotationPanel() {
+		tabbedPane.setSelectedComponent(advancedPanel);
+		advancedTab.setSelectedComponent(annotationPanel);
+	}
+
+	@Override
+	public void refreshConfiguration() {
+		refreshConfiguration(activity.getConfiguration());
+	}
+
+	static Pattern tagPattern = Pattern.compile("%%([^%]*)%%");
+
+	@Override
+	/**
+	 * Need to check that the script contains the string replacements and only them - done
+	 * 
+	 * Need to check the input port names are valid and unique - done
+	 * Need to check the output port names are valid and unique - done
+	 * 
+	 * Need to check the input files and static files are unique - done
+	 * Need to check the file names are valid
+	 * Need to check the URLs are valid
+	 * Need to check the replacement tags are unique - done
+	 */
+	public boolean checkValues() {
+		if (isFromRepository()) {
+			return true;
+		}
+		boolean result = true;
+		String text = "";
+		Set<String> stringReplacementPortNames = new HashSet<String>();
+		Set<String> stringReplacementTags = new HashSet<String>();
+		for (ExternalToolStringReplacementViewer v : stringReplacementViewList) {
+			String name = v.getName();
+			if (name.equalsIgnoreCase("stdin") || name.equalsIgnoreCase("stdout") || name.equalsIgnoreCase("stderr")) {
+				text += "A string replacement port has a reserved name \"" + name + "\"\n";
+				result = false;
+			}
+			else if (stringReplacementPortNames.contains(name)) {
+				text += "Two string replacement ports have the name \"" + name
+						+ "\"\n";
+				result = false;
+			} else if (!name.matches(VALID_NAME_REGEX)) {
+				text += "String replacement port name \"" + name
+						+ "\" is invalid\n";
+				result = false;
+			} else {
+				stringReplacementPortNames.add(name);
+			}
+
+			String tag = v.getValue();
+			if (stringReplacementTags.contains(tag)) {
+				text += "Two string replacement ports replace \"%%" + tag
+						+ "%%\"\n";
+				result = false;
+			} else if (!tag.matches(VALID_NAME_REGEX)) {
+				text += "String replacement tag \"%%" + tag
+						+ "%%\" is invalid\n";
+				result = false;
+			} else {
+				stringReplacementTags.add(tag);
+			}
+		}
+
+		Matcher m = tagPattern.matcher(scriptTextArea.getText());
+		Set<String> tags = new HashSet<String>();
+		while (m.find()) {
+			String tag = m.group(1);
+			if (tag != null) {
+				if (tag.isEmpty()) {
+					text += "The command contains an empty tag i.e. %%%%\n";
+					result = false;
+				} else {
+					if (!tag.matches(VALID_NAME_REGEX)) {
+						text += "The command contains an invalid tag \"%%"
+								+ tag + "\"%%\n";
+						result = false;
+					}
+					if (!stringReplacementTags.contains(tag)) {
+						text += "There is no string replacement for %%" + tag
+								+ "%%\n";
+						result = false;
+					} else {
+						tags.add(tag);
+					}
+				}
+			}
+		}
+
+		for (String tag : stringReplacementTags) {
+			if (!tags.contains(tag)) {
+				text += "String replacement for %%" + tag
+						+ "%% is not used in the command\n";
+				result = false;
+			}
+		}
+
+		Set<String> inputFilePortNames = new HashSet<String>();
+		Set<String> inputFileNames = new HashSet<String>();
+		for (ExternalToolFileViewer v : inputFileViewList) {
+			String name = v.getName();
+			if (name.equalsIgnoreCase("stdin") || name.equalsIgnoreCase("stdout") || name.equalsIgnoreCase("stderr")) {
+				text += "An input file port has a reserved name \"" + name + "\"\n";
+				result = false;
+			}
+			else if (stringReplacementPortNames.contains(name)) {
+				text += "A string replacement port and an input file port have the name \""
+						+ name + "\"\n";
+				result = false;
+			} else if (inputFilePortNames.contains(name)) {
+				text += "Two file input ports have the name \"" + name + "\"\n";
+				result = false;
+			} else if (!name.matches(VALID_NAME_REGEX)) {
+				text += "File input port name \"" + name + "\" is invalid\n";
+				result = false;
+			} else {
+				inputFilePortNames.add(name);
+			}
+
+			String fileName = v.getValue();
+			if (inputFileNames.contains(fileName)) {
+				text += "Two file inputs ports write to the same file \""
+						+ fileName + "\"\n";
+				result = false;
+			} else {
+				inputFileNames.add(fileName);
+			}
+		}
+
+		Set<String> fileListPortNames = new HashSet<String>();
+		Set<String> fileListFileNames = new HashSet<String>();
+		for (ExternalToolFileViewer v : fileListViewList) {
+			String name = v.getName();
+			if (name.equalsIgnoreCase("stdin") || name.equalsIgnoreCase("stdout") || name.equalsIgnoreCase("stderr")) {
+				text += "A file list port has a reserved name \"" + name + "\"\n";
+				result = false;
+			} else if (stringReplacementPortNames.contains(name)) {
+				text += "A string replacement port and a file list port have the name \""
+						+ name + "\"\n";
+				result = false;
+			} else if (inputFilePortNames.contains(name)) {
+				text += "A file input port and a file list port have the name \""
+						+ name + "\"\n";
+				result = false;
+			} else if (fileListPortNames.contains(name)) {
+				text += "Two file list ports have the name \"" + name + "\"\n";
+				result = false;
+			} else if (!name.matches(VALID_NAME_REGEX)) {
+				text += "File list port name \"" + name + "\" is invalid\n";
+				result = false;
+			} else {
+				fileListPortNames.add(name);
+			}
+
+			String fileName = v.getValue();
+			if (fileListFileNames.contains(fileName)) {
+				text += "Two file list ports write to the same file \""
+						+ fileName + "\"\n";
+				result = false;
+			} else if (inputFileNames.contains(fileName)) {
+				text += "A file input port and a file list port write to the same file \""
+						+ fileName + "\"\n";
+				result = false;
+			} else {
+				fileListFileNames.add(fileName);
+			}
+		}
+
+		Set<String> staticStringFileNames = new HashSet<String>();
+		for (ExternalToolStaticStringViewer v : staticStringViewList) {
+			String fileName = v.getValue();
+			if (staticStringFileNames.contains(fileName)) {
+				text += "Two static strings write to the same file \""
+						+ fileName + "\"\n";
+				result = false;
+			} else if (inputFileNames.contains(fileName)) {
+				text += "A file input port and a static string write to the same file \""
+						+ fileName + "\"\n";
+				result = false;
+			} else if (fileListFileNames.contains(fileName)) {
+				text += "A file list port and a static string write to the same file \""
+						+ fileName + "\"\n";
+				result = false;
+			} else {
+				staticStringFileNames.add(fileName);
+			}
+		}
+
+		Set<String> staticUrlFileNames = new HashSet<String>();
+		for (ExternalToolStaticUrlViewer v : staticUrlViewList) {
+			String fileName = v.getValue();
+			if (staticUrlFileNames.contains(fileName)) {
+				text += "Two static URLss write to the same file \"" + fileName
+						+ "\"\n";
+				result = false;
+			} else if (inputFileNames.contains(fileName)) {
+				text += "A file input port and a static URL write to the same file \""
+						+ fileName + "\"\n";
+				result = false;
+			} else if (fileListFileNames.contains(fileName)) {
+				text += "A file list port and a static URL write to the same file \""
+						+ fileName + "\"\n";
+				result = false;
+			} else if (staticStringFileNames.contains(fileName)) {
+				text += "A static string and a static URL write to the same file \""
+						+ fileName + "\"\n";
+				result = false;
+			} else {
+				staticUrlFileNames.add(fileName);
+			}
+		}
+		Set<String> outputPortNames = new HashSet<String>();
+		for (ExternalToolFileViewer v : outputViewList) {
+			String name = v.getName();
+			if (name.equalsIgnoreCase("stdin") || name.equalsIgnoreCase("stdout") || name.equalsIgnoreCase("stderr")) {
+				text += "An output port has a reserved name \"" + name + "\"\n";
+				result = false;
+			} else if (outputPortNames.contains(name)) {
+				text += "Two output file ports have the name \"" + name
+						+ "\"\n";
+				result = false;
+			} else if (!name.matches(VALID_NAME_REGEX)) {
+				text += "Output file port name \"" + name + "\" is invalid\n";
+				result = false;
+			} else {
+				outputPortNames.add(name);
+			}
+		}
+		if (!result) {
+			JOptionPane.showMessageDialog(this, text, "Problems",
+					JOptionPane.ERROR_MESSAGE);
+		}
+		return result;
+	}
+
+	/**
+	 * Check the proposed port name against the set of ports
+	 * 
+	 * @return
+	 */
+	public boolean portNameExists(String name) {
+		if (name.equalsIgnoreCase("stdin") || name.equalsIgnoreCase("stdout") || name.equalsIgnoreCase("stderr")) {
+			return true;
+		}
+		
+		for (ExternalToolFileViewer v : inputFileViewList) {
+			if (name.equals(v.getName())) {
+				return true;
+			}
+		}
+		for (ExternalToolFileViewer v : fileListViewList) {
+			if (name.equals(v.getName())) {
+				return true;
+			}
+		}
+		for (ExternalToolStringReplacementViewer v : stringReplacementViewList) {
+			if (name.equals(v.getName())) {
+				return true;
+			}
+		}
+		for (ExternalToolFileViewer v : outputViewList) {
+			if (name.equals(v.getName())) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+
+	public void setEditable(boolean editable, ExternalToolActivityConfigurationBean config) {
+		ExternalToolActivityConfigurationBean newConfig = (ExternalToolActivityConfigurationBean) cloneBean(config);
+		ExternalToolActivityHealthChecker.updateLocation(newConfig);
+		newConfig.setEdited(editable);
+		refreshConfiguration(newConfig);		
+	}
+	
+	public void whenClosed() {
+		if (invocationPanel != null) {
+			invocationPanel.stopObserving();
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolFileViewer.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolFileViewer.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolFileViewer.java
new file mode 100644
index 0000000..11fb0c4
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolFileViewer.java
@@ -0,0 +1,103 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JTextField;
+
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInputUser;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptOutput;
+
+/**
+ * @author alanrw
+ *
+ */
+public class ExternalToolFileViewer {
+	
+	private JTextField nameField;
+	private String name;
+	private JTextField valueField;
+	private JCheckBox valueFromField;
+	private JComboBox typeSelector;
+
+	public ExternalToolFileViewer(String name, String value, boolean isBinary) {
+		this(name);
+		nameField.setText(name);
+		if (!value.equals(name)) {
+			valueFromField.setSelected(false);
+			valueField.setText(value);
+			valueField.setEnabled(true);
+		}
+		if (isBinary) {
+			typeSelector.setSelectedItem("Binary");
+		} else {
+			typeSelector.setSelectedItem("Text");
+		}
+	}
+
+	public ExternalToolFileViewer(final String name) {
+		this.name = name;
+		nameField = new JTextField(20);
+		valueField = new JTextField(20);
+		valueFromField = new JCheckBox(new AbstractAction() {
+
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				if (valueFromField.isSelected()) {
+					valueField.setText("");
+					valueField.setEnabled(false);
+				} else {
+					valueField.setText(getName());
+					valueField.setEnabled(true);
+				}
+			}});
+		valueFromField.setSelected(true);
+		valueField.setEnabled(false);
+		typeSelector = new JComboBox(new String[] {"Binary", "Text"});
+		nameField.setText(name);
+		typeSelector.setSelectedItem("Text");
+		
+	}
+
+	public JTextField getNameField() {
+		return nameField;
+	}
+
+	public JTextField getValueField() {
+		return valueField;
+	}
+
+	public JComboBox getTypeSelector() {
+		return typeSelector;
+	}
+
+	public String getName() {
+		return nameField.getText();
+	}
+
+	public boolean isBinary() {
+		return (typeSelector.getSelectedItem().equals("Binary"));
+	}
+
+	public String getValue() {
+		if (valueFromField.isSelected()) {
+			return getName();
+		}
+		return valueField.getText();
+	}
+	
+	/**
+	 * @return the valueFromField
+	 */
+	public JCheckBox getValueFromField() {
+		return valueFromField;
+	}
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolRuntimeEnvironmentViewer.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolRuntimeEnvironmentViewer.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolRuntimeEnvironmentViewer.java
new file mode 100644
index 0000000..1451660
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolRuntimeEnvironmentViewer.java
@@ -0,0 +1,56 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import javax.swing.JComboBox;
+import javax.swing.JTextField;
+
+import de.uni_luebeck.inb.knowarc.usecases.RuntimeEnvironmentConstraint;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInputUser;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptOutput;
+
+/**
+ * @author alanrw
+ *
+ */
+public class ExternalToolRuntimeEnvironmentViewer {
+	
+	private JTextField idField;
+	private JComboBox relationSelector;
+
+	public ExternalToolRuntimeEnvironmentViewer(String id, String relation) {
+		this(id);
+		idField.setText(id);
+		relationSelector.setSelectedItem(relation);
+	}
+
+	public ExternalToolRuntimeEnvironmentViewer(String id) {
+		this();
+		idField.setText(id);	
+	}
+	
+	public ExternalToolRuntimeEnvironmentViewer() {
+		idField = new JTextField(20);
+		relationSelector = new JComboBox(RuntimeEnvironmentConstraint.getAcceptedRelations());
+		relationSelector.setSelectedItem(RuntimeEnvironmentConstraint.getDefaultRelation());			
+	}
+
+	public JTextField getIdField() {
+		return idField;
+	}
+
+	public JComboBox getRelationSelector() {
+		return relationSelector;
+	}
+
+	public String getId() {
+		return idField.getText();
+	}
+
+	public String getRelation() {
+		return (String) relationSelector.getSelectedItem();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticStringViewer.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticStringViewer.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticStringViewer.java
new file mode 100644
index 0000000..d82d9b7
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticStringViewer.java
@@ -0,0 +1,53 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInputStatic;
+
+/**
+ * @author alanrw
+ *
+ */
+public class ExternalToolStaticStringViewer {
+	
+	ScriptInputStatic input;
+	private JTextArea contentField = new JTextArea();
+	private JTextField valueField;
+
+
+	public ExternalToolStaticStringViewer(ScriptInputStatic input) {
+		this();
+		this.input = input;
+			contentField.setText((String) input.getContent());
+		valueField.setText(input.getTag());
+	}
+
+	public ExternalToolStaticStringViewer() {
+		contentField = new JTextArea(5, 40);
+		contentField.setText("");
+		valueField = new JTextField(20);
+		valueField.setText("");
+	}
+
+	public String getContent() {
+		return contentField.getText();
+	}
+
+	public JTextArea getContentField() {
+		return contentField;
+	}
+
+
+	public JTextField getValueField() {
+		return valueField;
+	}
+
+	public String getValue() {
+		return valueField.getText();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticUrlViewer.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticUrlViewer.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticUrlViewer.java
new file mode 100644
index 0000000..f7a1793
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticUrlViewer.java
@@ -0,0 +1,56 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import javax.swing.JComboBox;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInputStatic;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInputUser;
+
+/**
+ * @author alanrw
+ *
+ */
+public class ExternalToolStaticUrlViewer {
+	
+	ScriptInputStatic input;
+	private JTextField contentField = new JTextField();
+	private JTextField valueField;
+
+
+	public ExternalToolStaticUrlViewer(ScriptInputStatic input) {
+		this();
+		this.input = input;
+		contentField.setText(input.getUrl());
+		valueField.setText(input.getTag());
+	}
+
+	public ExternalToolStaticUrlViewer() {
+		contentField = new JTextField(40);
+		contentField.setText("");
+		valueField = new JTextField(20);
+		valueField.setText("");
+	}
+
+	public String getContent() {
+		return contentField.getText();
+	}
+
+	public JTextField getContentField() {
+		return contentField;
+	}
+
+
+	public JTextField getValueField() {
+		return valueField;
+	}
+
+	public String getValue() {
+		return valueField.getText();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStringReplacementViewer.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStringReplacementViewer.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStringReplacementViewer.java
new file mode 100644
index 0000000..8e24183
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStringReplacementViewer.java
@@ -0,0 +1,97 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.event.ActionEvent;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.swing.AbstractAction;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JTextField;
+
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInputUser;
+
+/**
+ * @author alanrw
+ *
+ */
+public class ExternalToolStringReplacementViewer {
+	
+	private static Pattern p = Pattern.compile("\\w+");
+	private static final String PERCENTS = "%%";
+	ScriptInput input;
+	private JTextField nameField;
+	private String name;
+	private JTextField valueField;
+	private JCheckBox valueFromField;
+
+	public ExternalToolStringReplacementViewer(String name, ScriptInputUser input) {
+		this(name);
+		this.input = input;
+		nameField.setText(name);
+		if (!input.getTag().equals(name)) {
+			valueFromField.setSelected(false);
+			valueField.setText(PERCENTS + input.getTag() + PERCENTS);
+			valueField.setEnabled(true);
+		}
+	}
+
+	public ExternalToolStringReplacementViewer(String name) {
+		this.name = name;
+		nameField = new JTextField(20);
+		nameField.setText(name);
+		valueField = new JTextField(20);
+		valueFromField = new JCheckBox(new AbstractAction() {
+
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				if (valueFromField.isSelected()) {
+					valueField.setText("");
+					valueField.setEnabled(false);
+				} else {
+					valueField.setText(PERCENTS + getName() + PERCENTS);
+					valueField.setEnabled(true);
+				}
+			}});
+		valueFromField.setSelected(true);
+		valueField.setEnabled(false);
+	}
+
+	public JTextField getNameField() {
+		return nameField;
+	}
+	
+	public JTextField getValueField() {
+		return valueField;
+	}
+
+	public String getName() {
+		return nameField.getText();
+	}
+
+	public String getValue() {
+		if (valueFromField.isSelected()) {
+			return getName();
+		}
+		String enteredValue = valueField.getText();
+
+		Matcher m = p.matcher(enteredValue);
+		String result = "";
+		if (m.find()) {
+			result = m.group();
+		}
+		return result;
+	}
+
+	/**
+	 * @return the valueFromField
+	 */
+	public JCheckBox getValueFromField() {
+		return valueFromField;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/FilePanel.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/FilePanel.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/FilePanel.java
new file mode 100644
index 0000000..678711c
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/FilePanel.java
@@ -0,0 +1,119 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.BorderLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.util.List;
+
+import javax.swing.AbstractAction;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.border.EmptyBorder;
+
+import net.sf.taverna.t2.activities.externaltool.utils.Tools;
+import net.sf.taverna.t2.lang.ui.DeselectingButton;
+import net.sf.taverna.t2.lang.ui.ReadOnlyTextArea;
+
+/**
+ * @author alanrw
+ *
+ */
+public class FilePanel extends JPanel {
+	
+	private int outputGridy = 1;
+	private final ExternalToolConfigView view;
+	
+	public FilePanel(final ExternalToolConfigView view,
+			final List<ExternalToolFileViewer> viewList,
+			String fileHeader, String typeHeader, final String portPrefix,
+			final String description, String addText) {
+		super();
+		this.view = view;
+		this.setLayout(new BorderLayout());
+		final JPanel fileEditPanel = new JPanel(new GridBagLayout());
+
+		final GridBagConstraints fileConstraint = new GridBagConstraints();
+		fileConstraint.insets = new Insets(5, 5, 5, 5);
+		fileConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
+		fileConstraint.gridx = 0;
+		fileConstraint.gridy = 0;
+		fileConstraint.weightx = 0.1;
+		fileConstraint.fill = GridBagConstraints.BOTH;
+		
+		final String[] elementLabels = new String[] {"Taverna port name",
+				"Use port name for file",
+				fileHeader,
+				typeHeader
+		};
+
+		fileConstraint.gridx = 0;
+		synchronized (viewList) {
+			for (ExternalToolFileViewer outputView : viewList) {
+				addFileViewer(viewList, this, fileEditPanel,
+						outputView, elementLabels);
+			}
+		}
+		JButton addFilePortButton = new DeselectingButton(addText,
+				new AbstractAction() {
+			public void actionPerformed(ActionEvent e) {
+
+				int portNumber = 1;
+
+				String name2 = portPrefix + portNumber++;
+				boolean nameExists = true;
+				while (nameExists == true) {
+					nameExists = view.portNameExists(name2);
+					if (nameExists) {
+						name2 = portPrefix + portNumber++;
+					}
+				}
+
+				ExternalToolFileViewer newViewer = new ExternalToolFileViewer(
+						name2);
+				synchronized (viewList) {
+					viewList.add(newViewer);
+					addFileViewer(viewList, FilePanel.this, fileEditPanel,
+							newViewer, elementLabels);
+					fileEditPanel.revalidate();
+					fileEditPanel.repaint();
+				}
+			}
+
+		});
+		JTextArea descriptionText = new ReadOnlyTextArea(description);
+		descriptionText.setEditable(false);
+		descriptionText.setFocusable(false);
+		descriptionText.setBorder(new EmptyBorder(5, 5, 10, 5));
+
+		this.add(descriptionText, BorderLayout.NORTH);
+
+		this.add(new JScrollPane(fileEditPanel), BorderLayout.CENTER);
+
+		JPanel buttonPanel = new JPanel(new BorderLayout());
+
+		buttonPanel.add(addFilePortButton, BorderLayout.EAST);
+
+		this.add(buttonPanel, BorderLayout.SOUTH);
+	
+	}
+	
+	private void addFileViewer(final List<ExternalToolFileViewer> viewList,
+			final JPanel outerPanel, final JPanel panel,
+			ExternalToolFileViewer viewer, String[] elementLabels) {
+		Tools.addViewer(panel,
+				elementLabels,
+				new JComponent[] {viewer.getNameField(), viewer.getValueFromField(), viewer.getValueField(), viewer.getTypeSelector()},
+				viewList,
+				viewer,
+				outerPanel);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/InvocationPanel.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/InvocationPanel.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/InvocationPanel.java
new file mode 100644
index 0000000..803328b
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/InvocationPanel.java
@@ -0,0 +1,396 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Arrays;
+import java.util.Comparator;
+
+import javax.swing.AbstractAction;
+import javax.swing.Box;
+import javax.swing.BoxLayout;
+import javax.swing.ButtonGroup;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JTextArea;
+import javax.swing.SwingUtilities;
+import javax.swing.border.EmptyBorder;
+
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityHealthChecker;
+import net.sf.taverna.t2.activities.externaltool.configuration.ToolInvocationConfiguration;
+import net.sf.taverna.t2.activities.externaltool.manager.InvocationGroup;
+import net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupAddedEvent;
+import net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupRemovedEvent;
+import net.sf.taverna.t2.activities.externaltool.manager.InvocationManagerEvent;
+import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanism;
+import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismAddedEvent;
+import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismRemovedEvent;
+import net.sf.taverna.t2.activities.externaltool.manager.ToolInvocationConfigurationPanel;
+import net.sf.taverna.t2.activities.externaltool.manager.impl.InvocationGroupManagerImpl;
+import net.sf.taverna.t2.lang.observer.Observable;
+import net.sf.taverna.t2.lang.observer.Observer;
+import net.sf.taverna.t2.lang.ui.DeselectingButton;
+import net.sf.taverna.t2.workbench.ui.impl.configuration.ui.T2ConfigurationFrame;
+
+import org.apache.log4j.Logger;
+
+/**
+ * @author alanrw
+ *
+ */
+public class InvocationPanel extends JPanel implements Observer<InvocationManagerEvent> {
+	
+	private static final String LOCATION_DESCRIPTION = ToolInvocationConfigurationPanel.HEADER_TEXT;
+	private final JComboBox mechanismSelection;
+	private final JComboBox groupSelection;
+	
+	private DefaultComboBoxModel mechanismSelectionModel = new DefaultComboBoxModel();
+	private DefaultComboBoxModel groupSelectionModel = new DefaultComboBoxModel();
+
+	private static InvocationGroupManagerImpl manager = InvocationGroupManagerImpl.getInstance();
+	
+	private static Logger logger = Logger
+	.getLogger(InvocationPanel.class);
+	
+	private JRadioButton unmanagedLocation;
+	private JRadioButton groupSelected;
+	private JRadioButton mechanismSelected;
+	private JButton manageInvocation;
+	private ButtonGroup mechanismOrGroup;
+	private ExternalToolActivityConfigurationBean configuration;
+	
+	private ActionListener radioChangeListener;
+	
+	boolean unmanagedShown = false;
+
+	public InvocationPanel(ExternalToolActivityConfigurationBean configuration) {
+		super();
+		manager.addObserver(this);
+		
+		mechanismSelection = new JComboBox();
+		populateMechanismList();
+		mechanismSelection.setModel(mechanismSelectionModel);
+		
+		groupSelection = new JComboBox();
+		populateGroupList();
+		groupSelection.setModel(groupSelectionModel);
+		populateInvocationPanel(configuration);
+		
+		radioChangeListener = new AbstractAction() {
+
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				if (unmanagedShown && unmanagedLocation.isSelected()) {
+					setUnmanagedLocationSelectability(true);
+					setMechanismSelectability(false);
+					setGroupSelectability(false);
+					return;
+				}
+				if (mechanismSelected.isSelected()) {
+					if (unmanagedShown) {
+						setUnmanagedLocationSelectability(false);
+					}
+					setMechanismSelectability(true);
+					setGroupSelectability(false);
+					return;
+				}
+				if (unmanagedShown) {
+					setUnmanagedLocationSelectability(false);
+				}
+				setMechanismSelectability(false);
+				setGroupSelectability(true);
+				return;			}
+			
+		};
+		if (unmanagedShown) {
+			unmanagedLocation.addActionListener(radioChangeListener);
+		}
+		groupSelected.addActionListener(radioChangeListener);
+		mechanismSelected.addActionListener(radioChangeListener);
+	}
+	
+	private void populateMechanismList() {
+		InvocationMechanism currentSelection = (InvocationMechanism) mechanismSelection.getSelectedItem();
+		InvocationMechanism[] mechanisms = InvocationGroupManagerImpl.getInstance()
+				.getMechanisms().toArray(new InvocationMechanism[] {});
+		Arrays.sort(mechanisms, new Comparator<InvocationMechanism>() {
+
+			@Override
+			public int compare(InvocationMechanism arg0, InvocationMechanism arg1) {
+				return arg0.getName().compareTo(
+						arg1.getName());
+			}
+		});
+		mechanismSelectionModel.removeAllElements();
+		for (InvocationMechanism mechanism : mechanisms) {
+			mechanismSelectionModel.addElement(mechanism);
+			logger.info("Added mechanism " + mechanism.hashCode());
+		}
+		if (currentSelection != null) {
+			mechanismSelection.setSelectedItem(currentSelection);
+		}
+		
+	}
+
+	private void populateGroupList() {
+		InvocationGroup currentSelection = (InvocationGroup) groupSelection.getSelectedItem();
+		InvocationGroup[] groups = InvocationGroupManagerImpl.getInstance()
+				.getInvocationGroups().toArray(new InvocationGroup[] {});
+		Arrays.sort(groups, new Comparator<InvocationGroup>() {
+
+			@Override
+			public int compare(InvocationGroup arg0, InvocationGroup arg1) {
+				return arg0.getName().compareTo(
+						arg1.getName());
+			}
+		});
+		groupSelectionModel.removeAllElements();
+		for (InvocationGroup group : groups) {
+			groupSelectionModel.addElement(group);
+			logger.info("Added group " + group.hashCode());
+		}
+		if (currentSelection != null) {
+			groupSelection.setSelectedItem(currentSelection);
+		}
+		
+	}
+
+	
+	private void populateInvocationPanel(ExternalToolActivityConfigurationBean configuration) {
+		this.configuration = configuration;
+		this.removeAll();
+		this.setLayout(new BorderLayout());
+
+		JTextArea descriptionText = new JTextArea(
+				LOCATION_DESCRIPTION);
+		descriptionText.setEditable(false);
+		descriptionText.setFocusable(false);
+		descriptionText.setBorder(new EmptyBorder(5, 5, 10, 5));
+		descriptionText.setLineWrap(true);
+		descriptionText.setWrapStyleWord(true);
+		descriptionText.setRows(3);
+		this.add(descriptionText, BorderLayout.NORTH);
+		
+		JPanel innerPanel = new JPanel(new BorderLayout());
+		
+		mechanismOrGroup = new ButtonGroup();
+
+		JPanel subPanel = new JPanel(new GridLayout(4,1));
+		
+		if (isUnmanaged(configuration)) {
+			createUnmanagedLocation(subPanel);
+			unmanagedShown = true;
+		}
+		
+		subPanel.add(createMechanismPanel());
+		
+		subPanel.add(createGroupPanel());
+		
+		subPanel.add(createButtonPanel());
+		
+		innerPanel.add(subPanel, BorderLayout.NORTH);
+		innerPanel.add(new JPanel(), BorderLayout.CENTER);
+		
+		initializeSelectability();
+		this.add(innerPanel, BorderLayout.CENTER);
+		this.repaint();
+	}
+
+	private boolean isUnmanaged(
+			ExternalToolActivityConfigurationBean configuration2) {
+		return (!ExternalToolActivityHealthChecker.updateLocation(configuration2));
+	}
+
+	private void initializeSelectability() {
+		if (isUnmanaged(configuration)) {
+			unmanagedLocation.setSelected(true);
+			setUnmanagedLocationSelectability(true);
+			setMechanismSelectability(false);
+			setGroupSelectability(false);
+			return;
+		}
+		if (configuration.getInvocationGroup() == null) {
+			mechanismSelected.setSelected(true);
+			if (unmanagedShown) {
+				setUnmanagedLocationSelectability(false);
+			}
+			setMechanismSelectability(true);
+			setGroupSelectability(false);
+			return;
+		}
+		groupSelected.setSelected(true);
+		if (unmanagedShown) {
+			setUnmanagedLocationSelectability(false);
+		}
+		setMechanismSelectability(false);
+		setGroupSelectability(true);
+		return;
+	}
+
+	private void setGroupSelectability(boolean b) {
+		groupSelection.setEnabled(b);
+	}
+
+	private void setMechanismSelectability(boolean b) {
+		mechanismSelection.setEnabled(b);
+	}
+
+	private void setUnmanagedLocationSelectability(boolean b) {
+		// Nothing to do
+	}
+
+	private JPanel createGroupPanel() {
+		JPanel groupPanel = new JPanel(new BorderLayout());
+		
+		JPanel groupSelectionPanel = new JPanel(new GridLayout(1, 2));
+		groupSelected = new JRadioButton("Select a symbolic location");
+		mechanismOrGroup.add(groupSelected);
+		groupSelected.setBorder(new EmptyBorder(10, 10, 10, 10));
+		groupSelectionPanel.add(groupSelected);
+
+		groupSelection.setRenderer(new DefaultListCellRenderer() {
+
+			@Override
+			public Component getListCellRendererComponent(JList arg0,
+					Object arg1, int arg2, boolean arg3, boolean arg4) {
+				if (arg1 instanceof InvocationGroup) {
+					return super.getListCellRendererComponent(arg0,
+							((InvocationGroup) arg1).getName(),
+							arg2, arg3, arg4);
+				}
+				return super.getListCellRendererComponent(arg0, arg1, arg2,
+						arg3, arg4);
+			}
+		});
+
+		groupSelectionPanel.add(groupSelection); 
+
+		groupPanel.add(groupSelectionPanel, BorderLayout.CENTER);
+		
+		if (configuration.getInvocationGroup() != null) {
+			groupSelection.setSelectedItem(configuration.getInvocationGroup());
+		} else {
+			groupSelection.setSelectedItem(manager.getDefaultGroup());
+		}
+
+		return groupPanel;
+	}
+
+	private JPanel createMechanismPanel() {
+		JPanel mechanismPanel = new JPanel(new BorderLayout());
+		JPanel mechanismSelectionPanel = new JPanel(new GridLayout(1, 3));
+		mechanismSelected = new JRadioButton("Select an explicit location");
+		mechanismOrGroup.add(mechanismSelected);
+		mechanismSelected.setBorder(new EmptyBorder(10, 10, 10, 10));
+		mechanismSelectionPanel.add(mechanismSelected);
+
+		mechanismSelection.setRenderer(new DefaultListCellRenderer() {
+
+			@Override
+			public Component getListCellRendererComponent(JList arg0,
+					Object arg1, int arg2, boolean arg3, boolean arg4) {
+				if (arg1 instanceof InvocationMechanism) {
+					return super.getListCellRendererComponent(arg0,
+							((InvocationMechanism) arg1).getName(),
+							arg2, arg3, arg4);
+				}
+				return super.getListCellRendererComponent(arg0, arg1, arg2,
+						arg3, arg4);
+			}
+		});
+
+		mechanismSelectionPanel.add(mechanismSelection);
+
+		mechanismPanel.add(mechanismSelectionPanel, BorderLayout.CENTER);
+		if (configuration.getMechanism() != null) {
+			mechanismSelection.setSelectedItem(configuration.getMechanism());
+		} else {
+			mechanismSelection.setSelectedItem(manager.getDefaultMechanism());
+		}
+		return mechanismPanel;
+
+	}
+	
+	private JPanel createButtonPanel() {
+		JPanel buttonPanel = new JPanel(new FlowLayout());
+		manageInvocation = new DeselectingButton("Manage locations",
+				new AbstractAction() {
+
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				T2ConfigurationFrame.showConfiguration(ToolInvocationConfiguration.getInstance().getDisplayName());
+			}});
+		buttonPanel.add(manageInvocation); 
+		return buttonPanel;		
+	}
+
+	private void createUnmanagedLocation(JPanel subPanel) {
+		unmanagedLocation = new JRadioButton("Continue using unmanaged location");
+		subPanel.add(unmanagedLocation);
+		mechanismOrGroup.add(unmanagedLocation);
+	}
+
+	private void handleInvocationManagerMessage(InvocationManagerEvent message) {
+		if (message instanceof InvocationMechanismRemovedEvent) {
+			InvocationMechanism removedMechanism = ((InvocationMechanismRemovedEvent) message).getRemovedMechanism();
+			InvocationMechanism replacementMechanism = ((InvocationMechanismRemovedEvent) message).getReplacementMechanism();
+			if (mechanismSelection.getSelectedItem().equals(removedMechanism)) {
+				mechanismSelection.setSelectedItem(replacementMechanism);
+			}
+			mechanismSelectionModel.removeElement(removedMechanism);
+		} else if (message instanceof InvocationMechanismAddedEvent) {
+			populateMechanismList();
+		}
+		else if (message instanceof InvocationGroupRemovedEvent) {
+			InvocationGroup removedGroup = ((InvocationGroupRemovedEvent) message).getRemovedGroup();
+			InvocationGroup replacementGroup = ((InvocationGroupRemovedEvent) message).getReplacementGroup();
+			if (groupSelection.getSelectedItem().equals(removedGroup)) {
+				groupSelection.setSelectedItem(replacementGroup);
+			}
+			groupSelectionModel.removeElement(removedGroup);
+		} else if (message instanceof InvocationGroupAddedEvent) {
+			populateGroupList();
+		}	
+	}
+	
+	@Override
+	public void notify(Observable<InvocationManagerEvent> sender,
+			final InvocationManagerEvent message) throws Exception {
+		if (SwingUtilities.isEventDispatchThread()) {
+			handleInvocationManagerMessage(message);
+		} else {
+			SwingUtilities.invokeLater(new Runnable() {
+				public void run() {
+					handleInvocationManagerMessage(message);
+				}
+			});
+		}	}
+
+	public void fillInConfiguration(
+			ExternalToolActivityConfigurationBean newConfiguration) {
+		if (unmanagedShown && unmanagedLocation.isSelected()) {
+			return;
+		}
+		if (mechanismSelected.isSelected()) {
+			newConfiguration.setMechanism((InvocationMechanism) mechanismSelection.getSelectedItem());
+			return;
+		}
+		newConfiguration.setInvocationGroup((InvocationGroup) groupSelection.getSelectedItem());	
+	}
+
+	public void stopObserving() {
+		manager.removeObserver(this);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/LoadDescriptionAction.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/LoadDescriptionAction.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/LoadDescriptionAction.java
new file mode 100644
index 0000000..7f0d82f
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/LoadDescriptionAction.java
@@ -0,0 +1,89 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.event.ActionEvent;
+import java.io.IOException;
+import java.io.StringBufferInputStream;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.swing.AbstractAction;
+import javax.swing.JOptionPane;
+
+import net.sf.taverna.t2.lang.ui.FileTools;
+
+import org.jdom.Document;
+import org.jdom.JDOMException;
+
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseEnumeration;
+
+final class LoadDescriptionAction extends AbstractAction {
+	/**
+	 * 
+	 */
+	private final ScriptPanel scriptPanel;
+	private final ExternalToolConfigView view;
+
+	LoadDescriptionAction(ScriptPanel scriptPanel, ExternalToolConfigView view) {
+		this.scriptPanel = scriptPanel;
+		this.view = view;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		String descriptionsString = FileTools.readStringFromFile(
+				this.scriptPanel, "Load tool description",
+				".xml");
+		if (descriptionsString != null) {
+			String errorMessage = null;
+			try {
+				Document doc = ScriptPanel.builder
+						.build(new StringReader(descriptionsString));
+				List<UseCaseDescription> descriptions = UseCaseEnumeration.readDescriptionsFromStream(new StringBufferInputStream(descriptionsString));
+				if (descriptions.isEmpty()) {
+					JOptionPane.showMessageDialog(this.scriptPanel, "No tool descriptions found", "File content", JOptionPane.ERROR_MESSAGE);
+					return;
+				}
+				
+				if (descriptions.size() == 1) {
+					view.getConfiguration().setUseCaseDescription(descriptions.get(0));
+					view.refreshConfiguration(view.getConfiguration());
+					return;
+				}
+				
+				List<String> descriptionNames = new ArrayList();
+				for (UseCaseDescription ud : descriptions) {
+					descriptionNames.add(ud.getUsecaseid());
+				}
+				Collections.sort(descriptionNames);
+				String chosenName = (String) JOptionPane.showInputDialog(this.scriptPanel, "Please select a tool description",
+						"Select tool description", JOptionPane.PLAIN_MESSAGE, null, descriptionNames.toArray(), descriptionNames.get(0));
+				if (chosenName != null) {
+					for (UseCaseDescription ud : descriptions) {
+						if (ud.getUsecaseid().equals(chosenName)) {
+							view.getConfiguration().setUseCaseDescription(ud);
+							view.refreshConfiguration(view.getConfiguration());
+							return;
+							
+						}
+					}
+				}
+			} catch (JDOMException e1) {
+				errorMessage = e1.getMessage();
+			} catch (IOException e1) {
+				errorMessage = e1.getMessage();
+			} catch (Exception e1) {
+				errorMessage = e1.getMessage();
+			}
+			if (errorMessage != null) {
+				JOptionPane.showMessageDialog(null, errorMessage,
+						"Tool description load error",
+						JOptionPane.ERROR_MESSAGE);
+			}
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/SaveDescriptionAction.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/SaveDescriptionAction.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/SaveDescriptionAction.java
new file mode 100644
index 0000000..31266b4
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/SaveDescriptionAction.java
@@ -0,0 +1,124 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.prefs.Preferences;
+
+import javax.swing.AbstractAction;
+import javax.swing.JFileChooser;
+import javax.swing.JOptionPane;
+
+import net.sf.taverna.t2.lang.ui.ExtensionFileFilter;
+import net.sf.taverna.t2.lang.ui.FileTools;
+
+import org.apache.log4j.Logger;
+import org.jdom.Element;
+import org.jdom.output.Format;
+import org.jdom.output.XMLOutputter;
+
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseEnumeration;
+
+final class SaveDescriptionAction extends AbstractAction {
+	/**
+	 * 
+	 */
+	private final ScriptPanel scriptPanel;
+	private final ExternalToolConfigView view;
+	
+	private static Logger logger = Logger.getLogger(SaveDescriptionAction.class);
+
+	private static XMLOutputter outputter = new XMLOutputter(Format
+			.getPrettyFormat());
+
+	SaveDescriptionAction(ScriptPanel scriptPanel, ExternalToolConfigView view) {
+		this.scriptPanel = scriptPanel;
+		this.view = view;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		UseCaseDescription currentDescription = view.makeConfiguration().getUseCaseDescription();
+		String usecaseid = currentDescription.getUsecaseid();
+		String description = currentDescription.getDescription();
+		String group = currentDescription.getGroup();
+		if ((usecaseid == null) || usecaseid.isEmpty() || (description == null) || description.isEmpty() || (group == null) || group.isEmpty()) {
+			JOptionPane.showMessageDialog(view, "Please fill in the tool annotation and\nthen re-export the description", "Missing annotation", JOptionPane.PLAIN_MESSAGE, null);
+			view.showAnnotationPanel();
+		} else {
+		saveStringToFile(this.scriptPanel,
+				"Save tool description", ".xml", currentDescription);
+		}
+	}
+	
+	public static boolean saveStringToFile(Component parent, String dialogTitle, String extension, UseCaseDescription description) {
+		JFileChooser fileChooser = new JFileChooser();
+		fileChooser.setDialogTitle(dialogTitle);
+
+		fileChooser.resetChoosableFileFilters();
+		fileChooser.setAcceptAllFileFilterUsed(true);
+		
+		fileChooser.setFileFilter(new ExtensionFileFilter(new String[] { extension }));
+
+		Preferences prefs = Preferences.userNodeForPackage(FileTools.class);
+		String curDir = prefs
+				.get("currentDir", System.getProperty("user.home"));
+		fileChooser.setCurrentDirectory(new File(curDir));
+
+		boolean tryAgain = true;
+		while (tryAgain) {
+			tryAgain = false;
+			int returnVal = fileChooser.showSaveDialog(parent);
+			if (returnVal == JFileChooser.APPROVE_OPTION) {
+				prefs.put("currentDir", fileChooser.getCurrentDirectory()
+						.toString());
+				File file = fileChooser.getSelectedFile();
+				if (!file.getName().contains(".")) {
+					String newName = file.getName() + extension;
+					file = new File(file.getParentFile(), newName);
+				}
+
+				// TODO: Open in separate thread to avoid hanging UI
+				try {
+					List<UseCaseDescription> currentDescriptions;
+					if (file.exists()) {
+						currentDescriptions = UseCaseEnumeration.readDescriptionsFromStream(new FileInputStream(file));
+					} else {
+						currentDescriptions = new ArrayList<UseCaseDescription>();
+					}
+					Element overallElement = new Element("usecases");
+					for (UseCaseDescription ud : currentDescriptions) {
+						if (!ud.getUsecaseid().equals(description.getUsecaseid())) {
+							overallElement.addContent(ud.writeToXMLElement());
+						}
+					}
+
+					overallElement.addContent(description.writeToXMLElement());
+					BufferedWriter out = new BufferedWriter(new FileWriter(file));
+			        out.write(outputter.outputString(overallElement));
+			        out.close();
+					logger.info("Saved content by overwriting " + file);
+					return true;
+				} catch (IOException ex) {
+					logger.warn("Could not save content to " + file, ex);
+					JOptionPane.showMessageDialog(parent,
+							"Could not save to " + file + ": \n\n"
+									+ ex.getMessage(), "Warning",
+							JOptionPane.WARNING_MESSAGE);
+					return false;
+				}
+			}
+		}
+		return false;
+	}
+	
+}
\ No newline at end of file


[16/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-external-tool-activity-ui/

Posted by st...@apache.org.
taverna-external-tool-activity-ui/


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/e48c3199
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/e48c3199
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/e48c3199

Branch: refs/heads/master
Commit: e48c3199d09bc5ae06e16333ff162618a7d1f61b
Parents: d8bffc9
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:27:30 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:27:30 2015 +0000

----------------------------------------------------------------------
 .gitignore                                      |  24 -
 .travis.yml                                     |   1 -
 README.md                                       |   5 -
 pom.xml                                         | 108 ---
 .../ExternalToolActivityConfigureAction.java    |  83 --
 .../ToolInvocationConfiguration.java            |  57 --
 .../externaltool/manager/GroupPanel.java        | 113 ---
 .../InvocationGroupManagerShutdownHook.java     |  34 -
 .../InvocationGroupManagerStartupHook.java      |  47 -
 .../manager/InvocationMechanismEditor.java      |  28 -
 .../externaltool/manager/MechanismPanel.java    | 121 ---
 .../ToolInvocationConfigurationPanel.java       | 379 --------
 .../ToolInvocationConfigurationUIFactory.java   |  54 --
 .../local/LocalInvocationMechanismEditor.java   | 122 ---
 .../manager/ssh/ExternalToolSshNodeViewer.java  | 110 ---
 .../ssh/SshInvocationMechanismEditor.java       | 234 -----
 .../AddExternalToolContextualMenuAction.java    | 111 ---
 .../menu/AddExternalToolMenuAction.java         | 111 ---
 .../menu/ConfigureExternalToolMenuAction.java   |  69 --
 .../externaltool/menu/FeedbackMenuAction.java   |  82 --
 .../AddExternalToolServiceDialog.java           | 189 ----
 .../ExternalToolActivityIcon.java               |  73 --
 .../ExternalToolServiceDescription.java         | 149 ----
 .../ExternalToolServiceProvider.java            | 132 ---
 .../ExternalToolServiceProviderConfig.java      |  56 --
 .../ExternalToolTemplateServiceDescription.java |  77 --
 .../t2/activities/externaltool/utils/Tools.java | 129 ---
 .../externaltool/views/AnnotationPanel.java     |  41 -
 .../externaltool/views/EditablePanel.java       |  76 --
 .../ExternalToolActivityContextualView.java     | 181 ----
 .../views/ExternalToolActivityViewFactory.java  |  76 --
 .../views/ExternalToolConfigView.java           | 868 -------------------
 .../views/ExternalToolFileViewer.java           | 103 ---
 .../ExternalToolRuntimeEnvironmentViewer.java   |  56 --
 .../views/ExternalToolStaticStringViewer.java   |  53 --
 .../views/ExternalToolStaticUrlViewer.java      |  56 --
 .../ExternalToolStringReplacementViewer.java    |  97 ---
 .../externaltool/views/FilePanel.java           | 119 ---
 .../externaltool/views/InvocationPanel.java     | 396 ---------
 .../views/LoadDescriptionAction.java            |  89 --
 .../views/SaveDescriptionAction.java            | 124 ---
 .../externaltool/views/ScriptPanel.java         | 149 ----
 .../externaltool/views/StaticStringPanel.java   | 106 ---
 .../externaltool/views/StaticUrlPanel.java      | 108 ---
 .../views/StringReplacementPanel.java           | 134 ---
 .../externaltool/views/ToolXMLPanel.java        |  33 -
 ...ternaltool.manager.InvocationMechanismEditor |   2 -
 ...rvicedescriptions.ServiceDescriptionProvider |   2 -
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |   4 -
 .../net.sf.taverna.t2.workbench.ShutdownSPI     |   1 -
 .../net.sf.taverna.t2.workbench.StartupSPI      |   1 -
 ...a.t2.workbench.activityicons.ActivityIconSPI |   1 -
 ...rkbench.configuration.ConfigurationUIFactory |   1 -
 ...ntextualviews.activity.ContextualViewFactory |   1 -
 .../external-tool-activity-ui-context-osgi.xml  |  39 -
 .../external-tool-activity-ui-context.xml       |  50 --
 src/main/resources/externaltool.png             | Bin 743 -> 0 bytes
 taverna-external-tool-activity-ui/pom.xml       | 108 +++
 .../ExternalToolActivityConfigureAction.java    |  83 ++
 .../ToolInvocationConfiguration.java            |  57 ++
 .../externaltool/manager/GroupPanel.java        | 113 +++
 .../InvocationGroupManagerShutdownHook.java     |  34 +
 .../InvocationGroupManagerStartupHook.java      |  47 +
 .../manager/InvocationMechanismEditor.java      |  28 +
 .../externaltool/manager/MechanismPanel.java    | 121 +++
 .../ToolInvocationConfigurationPanel.java       | 379 ++++++++
 .../ToolInvocationConfigurationUIFactory.java   |  54 ++
 .../local/LocalInvocationMechanismEditor.java   | 122 +++
 .../manager/ssh/ExternalToolSshNodeViewer.java  | 110 +++
 .../ssh/SshInvocationMechanismEditor.java       | 234 +++++
 .../AddExternalToolContextualMenuAction.java    | 111 +++
 .../menu/AddExternalToolMenuAction.java         | 111 +++
 .../menu/ConfigureExternalToolMenuAction.java   |  69 ++
 .../externaltool/menu/FeedbackMenuAction.java   |  82 ++
 .../AddExternalToolServiceDialog.java           | 189 ++++
 .../ExternalToolActivityIcon.java               |  73 ++
 .../ExternalToolServiceDescription.java         | 149 ++++
 .../ExternalToolServiceProvider.java            | 132 +++
 .../ExternalToolServiceProviderConfig.java      |  56 ++
 .../ExternalToolTemplateServiceDescription.java |  77 ++
 .../t2/activities/externaltool/utils/Tools.java | 129 +++
 .../externaltool/views/AnnotationPanel.java     |  41 +
 .../externaltool/views/EditablePanel.java       |  76 ++
 .../ExternalToolActivityContextualView.java     | 181 ++++
 .../views/ExternalToolActivityViewFactory.java  |  76 ++
 .../views/ExternalToolConfigView.java           | 868 +++++++++++++++++++
 .../views/ExternalToolFileViewer.java           | 103 +++
 .../ExternalToolRuntimeEnvironmentViewer.java   |  56 ++
 .../views/ExternalToolStaticStringViewer.java   |  53 ++
 .../views/ExternalToolStaticUrlViewer.java      |  56 ++
 .../ExternalToolStringReplacementViewer.java    |  97 +++
 .../externaltool/views/FilePanel.java           | 119 +++
 .../externaltool/views/InvocationPanel.java     | 396 +++++++++
 .../views/LoadDescriptionAction.java            |  89 ++
 .../views/SaveDescriptionAction.java            | 124 +++
 .../externaltool/views/ScriptPanel.java         | 149 ++++
 .../externaltool/views/StaticStringPanel.java   | 106 +++
 .../externaltool/views/StaticUrlPanel.java      | 108 +++
 .../views/StringReplacementPanel.java           | 134 +++
 .../externaltool/views/ToolXMLPanel.java        |  33 +
 ...ternaltool.manager.InvocationMechanismEditor |   2 +
 ...rvicedescriptions.ServiceDescriptionProvider |   2 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |   4 +
 .../net.sf.taverna.t2.workbench.ShutdownSPI     |   1 +
 .../net.sf.taverna.t2.workbench.StartupSPI      |   1 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |   1 +
 ...rkbench.configuration.ConfigurationUIFactory |   1 +
 ...ntextualviews.activity.ContextualViewFactory |   1 +
 .../external-tool-activity-ui-context-osgi.xml  |  39 +
 .../external-tool-activity-ui-context.xml       |  50 ++
 .../src/main/resources/externaltool.png         | Bin 0 -> 743 bytes
 111 files changed, 5635 insertions(+), 5665 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index ebe0e5b..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# ignore project files #
-.classpath
-.project
-.settings/
-catalog-v001.xml
-
-# ignore target files #
-target/
-bin/
-build/
-dist/
-apidoc/
-*.swp
-
-# ignore svn files if there
-.svn
-
-# ignore log files #
-*.log
-/logs/*
-*/logs/*
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index dff5f3a..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1 +0,0 @@
-language: java

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
deleted file mode 100644
index a7f83c1..0000000
--- a/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Taverna Workflow system External Tool Activity: User Interface part for use in the Taverna Workbench.
-
-Extends https://github.com/taverna/taverna-external-tool-activity
-
-This code was previously hosted at http://taverna.googlecode.com/svn/taverna/ui/net.sf.taverna.t2.ui-activities/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 376cd5c..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>net.sf.taverna</groupId>
-    <artifactId>taverna-parent</artifactId>
-    <version>3.0.1-SNAPSHOT</version>
-  </parent>
-	<groupId>net.sf.taverna.t2.ui-activities</groupId>
-	<artifactId>external-tool-activity-ui</artifactId>
-	<name>Taverna 2 ExternalTool Activity UI</name>
-	<dependencies>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>menu-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-components</groupId>
-			<artifactId>graph-view</artifactId>
-			<version>${t2.ui.components.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-icons-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-palette-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.activities</groupId>
-			<artifactId>wsdl-activity</artifactId>
-			<version>${t2.activities.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-impl</groupId>
-			<artifactId>contextual-views-impl</artifactId>
-			<version>${t2.ui.impl.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>contextual-views-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-components</groupId>
-			<artifactId>workflow-view</artifactId>
-			<version>${t2.ui.components.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-tools</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-impl</groupId>
-			<artifactId>renderers-impl</artifactId>
-			<version>${t2.ui.impl.version}</version>
-		</dependency>
-
-		<!--  testing dependencies -->
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-                        <version>${junit.version}</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-impl</groupId>
-			<artifactId>activity-palette-impl</artifactId>
-			<version>${t2.ui.impl.version}</version>
-			<scope>test</scope>
-		</dependency>
-
-		<!-- function dependencies for invocation -->
-		<dependency>
-			<groupId>net.sf.taverna.t2.activities</groupId>
-			<artifactId>external-tool-activity</artifactId>
-			<version>${t2.activities.version}</version>
-		</dependency>
-
-	</dependencies>
-        <repositories>
-                <repository>
-                        <releases />
-                        <snapshots>
-                                <enabled>false</enabled>
-                        </snapshots>
-                        <id>mygrid-repository</id>
-                        <name>myGrid Repository</name>
-                        <url>http://www.mygrid.org.uk/maven/repository</url>
-                </repository>
-                <repository>
-                        <releases>
-                                <enabled>false</enabled>
-                        </releases>
-                        <snapshots />
-                        <id>mygrid-snapshot-repository</id>
-                        <name>myGrid Snapshot Repository</name>
-                        <url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
-                </repository>
-        </repositories>
-</project>
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/actions/ExternalToolActivityConfigureAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/actions/ExternalToolActivityConfigureAction.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/actions/ExternalToolActivityConfigureAction.java
deleted file mode 100644
index 398ee7c..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/actions/ExternalToolActivityConfigureAction.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 Hajo Nils Krabbenhoeft, INB, University of Luebeck
- * modified 2010 Hajo Nils Krabbenhoeft, spratpix GmbH & Co. KG
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-
-package net.sf.taverna.t2.activities.externaltool.actions;
-
-import java.awt.Frame;
-import java.awt.event.ActionEvent;
-
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
-import net.sf.taverna.t2.activities.externaltool.views.ExternalToolConfigView;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
-
-/**
- * This class implements an ActivityConfigurationAction to configure the ExternalToolActivity
- * plugin. The configuration action is called "Configure UseCase invocation" and is implemented in
- * the KnowARCConfigurationDialog inside the knowarc-usecases maven artifact.
- *
- * @author Hajo Nils Krabbenhoeft
- */
-@SuppressWarnings("serial")
-public class ExternalToolActivityConfigureAction extends
-		ActivityConfigurationAction<ExternalToolActivity, ExternalToolActivityConfigurationBean> {
-
-	private final Frame owner;
-	private final EditManager editManager;
-	private final FileManager fileManager;
-
-	public ExternalToolActivityConfigureAction(ExternalToolActivity activity, Frame owner,
-			EditManager editManager, FileManager fileManager, ActivityIconManager activityIconManager) {
-		super(activity, activityIconManager);
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		putValue(Action.NAME, "Configure tool invocation");
-		this.owner = owner;
-	}
-
-	public void actionPerformed(ActionEvent e) {
-		/*
-		 * if (getActivity().getConfiguration() instanceof
-		 * RegisteredExternalToolActivityConfigurationBean) { new KnowARCConfigurationDialog(owner,
-		 * false, KnowARCConfigurationFactory.getConfiguration()).setVisible(true); } else
-		 */{
-			ActivityConfigurationDialog currentDialog = ActivityConfigurationAction
-					.getDialog(getActivity());
-			if (currentDialog != null) {
-				currentDialog.toFront();
-				return;
-			}
-			final ExternalToolConfigView externalToolConfigView = new ExternalToolConfigView(
-					(ExternalToolActivity) getActivity());
-			final ActivityConfigurationDialog<ExternalToolActivity, ExternalToolActivityConfigurationBean> dialog = new ActivityConfigurationDialog<ExternalToolActivity, ExternalToolActivityConfigurationBean>(
-					getActivity(), externalToolConfigView, editManager, fileManager);
-
-			ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/configuration/ToolInvocationConfiguration.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/configuration/ToolInvocationConfiguration.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/configuration/ToolInvocationConfiguration.java
deleted file mode 100644
index 0877045..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/configuration/ToolInvocationConfiguration.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- */
-package net.sf.taverna.t2.activities.externaltool.configuration;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import uk.org.taverna.configuration.AbstractConfigurable;
-
-
-/**
- * @author alanrw
- *
- */
-public class ToolInvocationConfiguration extends AbstractConfigurable {
-
-	private static ToolInvocationConfiguration instance;
-
-	private Map<String, String> defaultPropertyMap;
-
-	public static ToolInvocationConfiguration getInstance() {
-		if (instance == null) {
-			instance = new ToolInvocationConfiguration();
-		}
-		return instance;
-	}
-
-	@Override
-	public String getCategory() {
-		return "general";
-	}
-
-	@Override
-	public Map<String, String> getDefaultPropertyMap() {
-		if (defaultPropertyMap == null) {
-			defaultPropertyMap = new HashMap<String, String>();
-		}
-		return defaultPropertyMap;
-	}
-
-	@Override
-	public String getDisplayName() {
-		return "Tool invocation";
-	}
-
-	@Override
-	public String getFilePrefix() {
-		return "ToolInvocation";
-	}
-
-	@Override
-	public String getUUID() {
-		return "B611F5C2-EB49-479E-B01A-7F3F56E6918A";
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/GroupPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/GroupPanel.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/GroupPanel.java
deleted file mode 100644
index 8f62787..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/GroupPanel.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.externaltool.manager;
-
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import javax.swing.border.EmptyBorder;
-
-import net.sf.taverna.t2.activities.externaltool.manager.impl.InvocationGroupManagerImpl;
-
-/**
- * UI for creating/editing dataflow input ports.
- *
- * @author David Withers
- */
-public class GroupPanel extends JPanel {
-
-	private static final long serialVersionUID = 1L;
-
-	private JTextField groupNameField;
-
-	private JComboBox mechanismComboBox;
-
-	private static InvocationGroupManager manager = InvocationGroupManagerImpl.getInstance();
-
-	public GroupPanel(Object[] mechanisms) {
-		super(new GridBagLayout());
-
-		groupNameField = new JTextField();
-
-
-		setBorder(new EmptyBorder(10, 10, 10, 10));
-
-		GridBagConstraints constraints = new GridBagConstraints();
-
-		constraints.anchor = GridBagConstraints.WEST;
-		constraints.gridx = 0;
-		constraints.gridy = 0;
-		constraints.ipadx = 10;
-		add(new JLabel("Name:"), constraints);
-
-		constraints.gridx = 1;
-		constraints.gridwidth = 2;
-		constraints.ipadx = 0;
-		constraints.weightx = 1d;
-		constraints.fill = GridBagConstraints.HORIZONTAL;
-		add(groupNameField, constraints);
-
-		constraints.gridx = 0;
-		constraints.gridy = 1;
-		constraints.gridwidth = 1;
-		constraints.weightx = 0d;
-		constraints.fill = GridBagConstraints.NONE;
-		constraints.ipadx = 10;
-		constraints.insets = new Insets(10, 0, 0, 0);
-		add(new JLabel("Explicit location:"), constraints);
-
-		mechanismComboBox = new JComboBox(mechanisms);
-		mechanismComboBox.setSelectedItem(manager.getDefaultMechanism());
-
-		constraints.gridx = 1;
-		constraints.gridwidth = 2;
-		constraints.ipadx = 0;
-		add(mechanismComboBox, constraints);
-	}
-
-	/**
-	 * Returns the portNameField.
-	 *
-	 * @return the portNameField
-	 */
-	public JTextField getGroupNameField() {
-		return groupNameField;
-	}
-
-	/**
-	 * Returns the group name.
-	 *
-	 * @return the group name
-	 */
-	public String getGroupName() {
-		return groupNameField.getText();
-	}
-
-	public InvocationMechanism getSelectedMechanism() {
-		return (InvocationMechanism) mechanismComboBox.getSelectedItem();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerShutdownHook.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerShutdownHook.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerShutdownHook.java
deleted file mode 100644
index 3d54b26..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerShutdownHook.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.manager;
-
-import net.sf.taverna.t2.activities.externaltool.manager.impl.InvocationGroupManagerImpl;
-import net.sf.taverna.t2.workbench.ShutdownSPI;
-
-/**
- * @author alanrw
- *
- */
-public class InvocationGroupManagerShutdownHook implements ShutdownSPI {
-
-	/* (non-Javadoc)
-	 * @see net.sf.taverna.t2.workbench.ShutdownSPI#positionHint()
-	 */
-	@Override
-	public int positionHint() {
-		return 710;
-	}
-
-	/* (non-Javadoc)
-	 * @see net.sf.taverna.t2.workbench.ShutdownSPI#shutdown()
-	 */
-	@Override
-	public boolean shutdown() {
-		InvocationGroupManager manager = InvocationGroupManagerImpl.getInstance();
-		manager.saveConfiguration();
-		manager.persistInvocations();
-		return true;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerStartupHook.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerStartupHook.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerStartupHook.java
deleted file mode 100644
index 43cf4df..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerStartupHook.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2010 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.externaltool.manager;
-
-import net.sf.taverna.t2.activities.externaltool.manager.impl.InvocationGroupManagerImpl;
-import net.sf.taverna.t2.workbench.StartupSPI;
-
-/**
- * Load previously saved workflow ids that were scheduled to be deleted before
- * previous Taverna shutdown, and initiate deletion of them now.
- * 
- * @see StoreRunIdsToDeleteLaterShutdownHook
- * @see DatabaseCleanup
- * 
- * @author Stian Soiland-Reyes
- * 
- */
-public class InvocationGroupManagerStartupHook implements StartupSPI {
-
-	public int positionHint() {
-		return 900;
-	}
-
-	public boolean startup() {
-		InvocationGroupManagerImpl.getInstance().loadInvocations();
-		return true;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationMechanismEditor.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationMechanismEditor.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationMechanismEditor.java
deleted file mode 100644
index 495d22b..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationMechanismEditor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- *
- */
-package net.sf.taverna.t2.activities.externaltool.manager;
-
-import javax.swing.JPanel;
-
-/**
- * @author alanrw
- *
- */
-public abstract class InvocationMechanismEditor<T extends InvocationMechanism> extends JPanel {
-
-	public abstract String getName();
-
-	public abstract boolean canShow(Class<?> c);
-
-	public abstract void show(T invocationMechanism);
-
-	public abstract T updateInvocationMechanism();
-
-	public abstract InvocationMechanism createMechanism(String mechanismName);
-
-	public boolean isSingleton() {
-		return false;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/MechanismPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/MechanismPanel.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/MechanismPanel.java
deleted file mode 100644
index c068d56..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/MechanismPanel.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.externaltool.manager;
-
-import java.awt.Component;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.util.List;
-
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import javax.swing.border.EmptyBorder;
-
-/**
- * UI for creating/editing dataflow input ports.
- *
- * @author David Withers
- */
-public class MechanismPanel extends JPanel {
-
-	private static final long serialVersionUID = 1L;
-
-	private JTextField mechanismNameField;
-
-	private JComboBox mechanismTypeSelector;
-
-	public MechanismPanel(List<InvocationMechanismEditor<?>> invocationMechanismEditors) {
-		super(new GridBagLayout());
-
-		mechanismNameField = new JTextField();
-
-
-		setBorder(new EmptyBorder(10, 10, 10, 10));
-
-		GridBagConstraints constraints = new GridBagConstraints();
-
-		constraints.anchor = GridBagConstraints.WEST;
-		constraints.gridx = 0;
-		constraints.gridy = 0;
-		constraints.ipadx = 10;
-		add(new JLabel("Name:"), constraints);
-
-		constraints.gridx = 1;
-		constraints.gridwidth = 2;
-		constraints.ipadx = 0;
-		constraints.weightx = 1d;
-		constraints.fill = GridBagConstraints.HORIZONTAL;
-		add(mechanismNameField, constraints);
-
-		constraints.gridx = 0;
-		constraints.gridy = 1;
-		constraints.gridwidth = 1;
-		constraints.weightx = 0d;
-		constraints.fill = GridBagConstraints.NONE;
-		constraints.ipadx = 10;
-		constraints.insets = new Insets(10, 0, 0, 0);
-		add(new JLabel("Type:"), constraints);
-
-		mechanismTypeSelector = new JComboBox();
-		for (InvocationMechanismEditor<?> ime : invocationMechanismEditors) {
-			if (!ime.isSingleton()) {
-				mechanismTypeSelector.addItem(ime.getName());
-			}
-		}
-		constraints.gridx = 1;
-		constraints.gridwidth = 2;
-		constraints.ipadx = 0;
-		add(mechanismTypeSelector, constraints);
-
-
-	}
-
-	/**
-	 * Returns the portNameField.
-	 *
-	 * @return the portNameField
-	 */
-	public JTextField getMechanismNameField() {
-		return mechanismNameField;
-	}
-
-	/**
-	 * Returns the port name.
-	 *
-	 * @return the port name
-	 */
-	public String getMechanismName() {
-		return mechanismNameField.getText();
-	}
-
-	public String getMechanismTypeName() {
-		return (String) mechanismTypeSelector.getSelectedItem();
-	}
-
-	public Component getMechanismTypeSelector() {
-		return mechanismTypeSelector;
-	}
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationPanel.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationPanel.java
deleted file mode 100644
index 22500cd..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationPanel.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/**
- *
- */
-package net.sf.taverna.t2.activities.externaltool.manager;
-
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.FlowLayout;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.swing.AbstractAction;
-import javax.swing.DefaultListCellRenderer;
-import javax.swing.DefaultListModel;
-import javax.swing.JButton;
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JList;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import javax.swing.ListSelectionModel;
-import javax.swing.SwingUtilities;
-import javax.swing.border.EmptyBorder;
-
-import net.sf.taverna.t2.activities.externaltool.manager.impl.InvocationGroupManagerImpl;
-import net.sf.taverna.t2.lang.observer.Observable;
-import net.sf.taverna.t2.lang.observer.Observer;
-import net.sf.taverna.t2.lang.ui.DeselectingButton;
-import net.sf.taverna.t2.lang.ui.ValidatingUserInputDialog;
-import net.sf.taverna.t2.workbench.helper.Helper;
-
-/**
- * @author alanrw
- *
- */
-public class ToolInvocationConfigurationPanel extends JPanel implements
-		Observer<InvocationManagerEvent> {
-
-	public static final String HEADER_TEXT = "A tool can be set to run at an explicit location (e.g. on a specificic machine or one of a set of machines). Alternatively, it can be set to run at a symbolic location, which means the tool will then be run at the explicit location pointed to by the symbolic location.";
-
-	private static InvocationGroupManagerImpl manager = InvocationGroupManagerImpl.getInstance();
-
-	private final List<InvocationMechanismEditor<?>> invocationMechanismEditors;
-
-	private JTextArea headerText;
-
-	private static String EXPLICIT_LOCATIONS = "explicit locations";
-	private static String SYMBOLIC_LOCATIONS = "symbolic locations";
-
-	private List<MechanismCreator> mechanismCreators;
-
-	JList locationList = new JList();
-
-	DefaultListModel groupListModel = new DefaultListModel();
-	DefaultListModel mechanismListModel = new DefaultListModel();
-	JComboBox locationTypeCombo = new JComboBox(new String[] { EXPLICIT_LOCATIONS,
-			SYMBOLIC_LOCATIONS });
-
-	public ToolInvocationConfigurationPanel(List<MechanismCreator> mechanismCreators,
-			List<InvocationMechanismEditor<?>> invocationMechanismEditors) {
-		super();
-		this.mechanismCreators = mechanismCreators;
-		this.invocationMechanismEditors = invocationMechanismEditors;
-		manager.addObserver(this);
-
-		this.setLayout(new GridBagLayout());
-		GridBagConstraints gbc = new GridBagConstraints();
-
-		headerText = new JTextArea(HEADER_TEXT);
-		headerText.setLineWrap(true);
-		headerText.setWrapStyleWord(true);
-		headerText.setEditable(false);
-		headerText.setFocusable(false);
-		headerText.setBorder(new EmptyBorder(10, 10, 10, 10));
-
-		gbc.anchor = GridBagConstraints.WEST;
-		gbc.insets = new Insets(0, 0, 10, 0);
-		gbc.gridx = 0;
-		gbc.gridy = 0;
-		gbc.gridwidth = 1;
-		gbc.weightx = 1.0;
-		gbc.weighty = 0.0;
-		gbc.fill = GridBagConstraints.HORIZONTAL;
-		add(headerText, gbc);
-
-		JPanel locationPanel = new JPanel(new BorderLayout());
-		JPanel subPanel = new JPanel(new FlowLayout());
-		JLabel modify = new JLabel("Modify:");
-
-		locationTypeCombo.setSelectedItem(EXPLICIT_LOCATIONS);
-		locationTypeCombo.addActionListener(new ActionListener() {
-
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				switchList();
-			}
-		});
-		subPanel.add(modify);
-		subPanel.add(locationTypeCombo);
-
-		populateLists();
-		switchList();
-		locationList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-		locationList.setCellRenderer(new DefaultListCellRenderer() {
-			public Component getListCellRendererComponent(JList list, Object value, int index,
-					boolean isSelected, boolean cellHasFocus) {
-				Object toShow = value;
-				if (value instanceof InvocationGroup) {
-					InvocationGroup invocationGroup = (InvocationGroup) value;
-					toShow = invocationGroup.getName() + "  -->  "
-							+ invocationGroup.getMechanismName();
-				}
-				return super.getListCellRendererComponent(list, toShow, index, isSelected,
-						cellHasFocus);
-			}
-		});
-		locationPanel.add(new JScrollPane(locationList), BorderLayout.CENTER);
-		locationPanel.add(subPanel, BorderLayout.NORTH);
-
-		JPanel buttonPanel = new JPanel(new FlowLayout());
-		JButton helpButton = new DeselectingButton("Help", new AbstractAction() {
-
-			public void actionPerformed(ActionEvent e) {
-				Helper.showHelp(ToolInvocationConfigurationPanel.this);
-			}
-		});
-
-		buttonPanel.add(helpButton);
-
-		buttonPanel.add(addLocationButton());
-		buttonPanel.add(removeLocationButton());
-		buttonPanel.add(editLocationButton());
-		locationPanel.add(buttonPanel, BorderLayout.SOUTH);
-
-		gbc.gridy++;
-		gbc.weighty = 1;
-
-		gbc.fill = GridBagConstraints.BOTH;
-		gbc.anchor = GridBagConstraints.SOUTH;
-		gbc.insets = new Insets(10, 0, 0, 0);
-		this.add(locationPanel, gbc);
-	}
-
-	private void switchList() {
-		if (isShowingGroups()) {
-			locationList.setModel(groupListModel);
-		} else {
-			locationList.setModel(mechanismListModel);
-		}
-	}
-
-	private void populateLists() {
-		poopulateGroupList();
-		populateMechanismList();
-	}
-
-	private void populateMechanismList() {
-		Object currentSelection = locationList.getSelectedValue();
-		ArrayList<InvocationMechanism> mechanisms = new ArrayList<InvocationMechanism>();
-		mechanisms.addAll(manager.getMechanisms());
-		Collections.sort(mechanisms, new Comparator<InvocationMechanism>() {
-
-			@Override
-			public int compare(InvocationMechanism o1, InvocationMechanism o2) {
-				return o1.getName().compareTo(o2.getName());
-			}
-		});
-		mechanismListModel.clear();
-		for (InvocationMechanism m : mechanisms) {
-			mechanismListModel.addElement(m);
-		}
-		if ((currentSelection != null) && !isShowingGroups()) {
-			locationList.setSelectedValue(currentSelection, true);
-		}
-	}
-
-	private void poopulateGroupList() {
-		Object currentSelection = locationList.getSelectedValue();
-		ArrayList<InvocationGroup> groups = new ArrayList<InvocationGroup>();
-		groups.addAll(manager.getInvocationGroups());
-		Collections.sort(groups, new Comparator<InvocationGroup>() {
-
-			@Override
-			public int compare(InvocationGroup o1, InvocationGroup o2) {
-				return o1.getName().compareTo(o2.getName());
-			}
-		});
-		groupListModel.clear();
-		for (InvocationGroup g : groups) {
-			groupListModel.addElement(g);
-		}
-		if ((currentSelection != null) && isShowingGroups()) {
-			locationList.setSelectedValue(currentSelection, true);
-		}
-	}
-
-	private boolean isShowingGroups() {
-		return (locationTypeCombo.getSelectedItem().equals(SYMBOLIC_LOCATIONS));
-	}
-
-	private JButton addLocationButton() {
-		final JButton result = new DeselectingButton("Add", new AbstractAction() {
-
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				if (isShowingGroups()) {
-					Set<String> usedGroupNames = new HashSet<String>();
-					for (InvocationGroup g : manager.getInvocationGroups()) {
-						usedGroupNames.add(g.getName());
-					}
-
-					GroupPanel inputPanel = new GroupPanel(mechanismListModel.toArray());
-
-					ValidatingUserInputDialog vuid = new ValidatingUserInputDialog(
-							"Add symbolic location", inputPanel);
-					vuid.addTextComponentValidation(inputPanel.getGroupNameField(),
-							"Set the symbolic location name.", usedGroupNames,
-							"Duplicate symbolic location name.", "[\\p{L}\\p{Digit}_.]+",
-							"Invalid symbolic location name.");
-					vuid.setSize(new Dimension(400, 250));
-
-					if (vuid.show(ToolInvocationConfigurationPanel.this)) {
-						String groupName = inputPanel.getGroupName();
-						InvocationGroup newGroup = new InvocationGroup(mechanismCreators);
-						newGroup.setName(groupName);
-						newGroup.setMechanism(inputPanel.getSelectedMechanism());
-						manager.addInvocationGroup(newGroup);
-						locationList.setSelectedValue(newGroup, true);
-					}
-				} else {
-					Set<String> usedNames = new HashSet<String>();
-					for (InvocationMechanism m : manager.getMechanisms()) {
-						usedNames.add(m.getName());
-					}
-
-					MechanismPanel inputPanel = new MechanismPanel(invocationMechanismEditors);
-
-					ValidatingUserInputDialog vuid = new ValidatingUserInputDialog(
-							"Add explicit location", inputPanel);
-					vuid.addTextComponentValidation(inputPanel.getMechanismNameField(),
-							"Set the explicit location name.", usedNames,
-							"Duplicate explicit location name.", "[\\p{L}\\p{Digit}_.]+",
-							"Invalid explicit location name.");
-					vuid.addMessageComponent(inputPanel.getMechanismTypeSelector(),
-							"Set the location name and type.");
-					vuid.setSize(new Dimension(400, 250));
-
-					if (vuid.show(ToolInvocationConfigurationPanel.this)) {
-						String mechanismName = inputPanel.getMechanismName();
-						String mechanismTypeName = inputPanel.getMechanismTypeName();
-						InvocationMechanismEditor ime = findEditor(mechanismTypeName);
-						InvocationMechanism newMechanism = ime.createMechanism(mechanismName);
-						manager.addMechanism(newMechanism);
-						ime.show(newMechanism);
-						ime.setPreferredSize(new Dimension(550, 500));
-						int answer = JOptionPane.showConfirmDialog(
-								ToolInvocationConfigurationPanel.this, ime,
-								"New explicit location", JOptionPane.OK_CANCEL_OPTION,
-								JOptionPane.PLAIN_MESSAGE, null);
-						if (answer == JOptionPane.OK_OPTION) {
-							ime.updateInvocationMechanism();
-							InvocationGroupManagerImpl.getInstance().mechanismChanged(newMechanism);
-						}
-						locationList.setSelectedValue(newMechanism, true);
-					}
-				}
-			}
-		});
-		return result;
-	}
-
-	private JButton removeLocationButton() {
-		JButton result = new DeselectingButton("Remove", new AbstractAction() {
-
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				if (isShowingGroups()) {
-					InvocationGroup toRemove = (InvocationGroup) locationList.getSelectedValue();
-					if ((toRemove != null) && !toRemove.equals(manager.getDefaultGroup())) {
-						manager.removeInvocationGroup(toRemove);
-					}
-					locationList.setSelectedValue(manager.getDefaultGroup(), true);
-				} else {
-					InvocationMechanism toRemove = (InvocationMechanism) locationList
-							.getSelectedValue();
-					if ((toRemove != null) && !toRemove.equals(manager.getDefaultMechanism())) {
-						manager.removeMechanism(toRemove);
-						locationList.setSelectedValue(manager.getDefaultMechanism(), true);
-					}
-				}
-			}
-		});
-		return result;
-	}
-
-	private JButton editLocationButton() {
-		final JButton result = new DeselectingButton("Edit", new AbstractAction() {
-
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				if (isShowingGroups()) {
-					InvocationGroup toEdit = (InvocationGroup) locationList.getSelectedValue();
-					if (toEdit != null) {
-						InvocationMechanism chosenMechanism = (InvocationMechanism) JOptionPane
-								.showInputDialog(ToolInvocationConfigurationPanel.this,
-										"Select an explicit location", "Edit symbolic location",
-										JOptionPane.PLAIN_MESSAGE, null,
-										mechanismListModel.toArray(), toEdit.getMechanism());
-						if (chosenMechanism != null) {
-							toEdit.setMechanism(chosenMechanism);
-							manager.groupChanged(toEdit);
-						}
-					}
-				} else {
-					InvocationMechanism toEdit = (InvocationMechanism) locationList
-							.getSelectedValue();
-					if (toEdit != null) {
-						InvocationMechanismEditor ime = findEditor(toEdit.getClass());
-						ime.show(toEdit);
-						ime.setPreferredSize(new Dimension(550, 500));
-						int answer = JOptionPane.showConfirmDialog(
-								ToolInvocationConfigurationPanel.this, ime,
-								"Edit explicit location", JOptionPane.OK_CANCEL_OPTION,
-								JOptionPane.PLAIN_MESSAGE, null);
-						if (answer == JOptionPane.OK_OPTION) {
-							ime.updateInvocationMechanism();
-							InvocationGroupManagerImpl.getInstance().mechanismChanged(toEdit);
-						}
-					}
-				}
-			}
-		});
-		return result;
-	}
-
-	protected InvocationMechanismEditor findEditor(String name) {
-		for (InvocationMechanismEditor ime : invocationMechanismEditors) {
-			if (ime.getName().equalsIgnoreCase(name)) {
-				return ime;
-			}
-		}
-		return null;
-	}
-
-	protected InvocationMechanismEditor findEditor(Class c) {
-		for (InvocationMechanismEditor ime : invocationMechanismEditors) {
-			if (ime.canShow(c)) {
-				return ime;
-			}
-		}
-		return null;
-	}
-
-	@Override
-	public void notify(Observable<InvocationManagerEvent> arg0, InvocationManagerEvent arg1)
-			throws Exception {
-		if (SwingUtilities.isEventDispatchThread()) {
-			populateLists();
-		} else {
-			SwingUtilities.invokeLater(new Runnable() {
-				public void run() {
-					populateLists();
-				}
-			});
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationUIFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationUIFactory.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationUIFactory.java
deleted file mode 100644
index 82dd443..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationUIFactory.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- *
- */
-package net.sf.taverna.t2.activities.externaltool.manager;
-
-import java.util.List;
-
-import javax.swing.JPanel;
-
-import uk.org.taverna.configuration.Configurable;
-import uk.org.taverna.configuration.ConfigurationUIFactory;
-
-import net.sf.taverna.t2.activities.externaltool.configuration.ToolInvocationConfiguration;
-
-/**
- * @author alanrw
- *
- */
-public class ToolInvocationConfigurationUIFactory implements ConfigurationUIFactory {
-
-	private List<MechanismCreator> mechanismCreators;
-	private List<InvocationMechanismEditor<?>> invocationMechanismEditors;
-
-	private ToolInvocationConfigurationPanel configPanel;
-
-	@Override
-	public boolean canHandle(String uuid) {
-		return uuid.equals(getConfigurable().getUUID());
-	}
-
-	@Override
-	public Configurable getConfigurable() {
-		return ToolInvocationConfiguration.getInstance();
-	}
-
-	@Override
-	public JPanel getConfigurationPanel() {
-		if (configPanel == null) {
-			configPanel = new ToolInvocationConfigurationPanel(mechanismCreators,
-					invocationMechanismEditors);
-		}
-		return configPanel;
-	}
-
-	public void setMechanismCreators(List<MechanismCreator> mechanismCreators) {
-		this.mechanismCreators = mechanismCreators;
-	}
-
-	public void setInvocationMechanismEditors(
-			List<InvocationMechanismEditor<?>> invocationMechanismEditors) {
-		this.invocationMechanismEditors = invocationMechanismEditors;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/local/LocalInvocationMechanismEditor.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/local/LocalInvocationMechanismEditor.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/local/LocalInvocationMechanismEditor.java
deleted file mode 100644
index 64fcc36..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/local/LocalInvocationMechanismEditor.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.manager.local;
-
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-
-import javax.swing.JCheckBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-
-import net.sf.taverna.t2.activities.externaltool.local.ExternalToolLocalInvocationMechanism;
-import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanism;
-import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor;
-
-/**
- * @author alanrw
- *
- */
-public final class LocalInvocationMechanismEditor extends
-		InvocationMechanismEditor<ExternalToolLocalInvocationMechanism> {
-
-	private ExternalToolLocalInvocationMechanism invocationMechanism;
-	
-	private JTextField directoryField = new JTextField(30);
-	
-	private JTextField shellPrefixField = new JTextField(30);
-	
-	private JTextField linkCommandField = new JTextField(30);
-	
-	private JCheckBox retrieveDataField = new JCheckBox();
-	
-
-	@Override
-	public boolean canShow(Class<?> c) {
-		return ExternalToolLocalInvocationMechanism.class.isAssignableFrom(c);
-	}
-
-	@Override
-	public String getName() {
-		return ("Local");
-	}
-
-	@Override
-	public void show(ExternalToolLocalInvocationMechanism invocationMechanism) {
-		this.invocationMechanism = invocationMechanism;
-		this.removeAll();
-		final JPanel innerPanel = new JPanel(new GridBagLayout());
-		final GridBagConstraints inputConstraint = new GridBagConstraints();
-//		inputConstraint.insets = new Insets(5,5,5,5);
-		inputConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
-		inputConstraint.gridx = 0;
-		inputConstraint.gridy = 0;
-		inputConstraint.weightx = 0.1;
-		inputConstraint.fill = GridBagConstraints.BOTH;
-		innerPanel.add(new JLabel("Working directory: "), inputConstraint);
-		inputConstraint.gridx++;
-		directoryField.setText(invocationMechanism.getDirectory());
-		innerPanel.add(directoryField, inputConstraint);
-		inputConstraint.gridx = 0;
-		inputConstraint.gridy++;
-		innerPanel.add(new JLabel("Shell: "), inputConstraint);
-		inputConstraint.gridx++;
-		shellPrefixField.setText(invocationMechanism.getShellPrefix());
-		innerPanel.add(shellPrefixField, inputConstraint);
-		
-		inputConstraint.gridx = 0;
-		inputConstraint.gridy++;
-		innerPanel.add(new JLabel("Link command: "), inputConstraint);
-		inputConstraint.gridx++;
-		linkCommandField.setText(invocationMechanism.getLinkCommand());
-		innerPanel.add(linkCommandField, inputConstraint);
-		
-		inputConstraint.gridx = 0;
-		inputConstraint.gridy++;
-		innerPanel.add(new JLabel("Fetch data: "), inputConstraint);
-		inputConstraint.gridx++;
-		retrieveDataField.setSelected(invocationMechanism.isRetrieveData());
-		innerPanel.add(retrieveDataField, inputConstraint);
-		
-		this.add(innerPanel);
-	}
-
-	@Override
-	public ExternalToolLocalInvocationMechanism updateInvocationMechanism() {
-		if ((directoryField.getText() == null) || (directoryField.getText().length() == 0)) {
-			invocationMechanism.setDirectory(null);
-		} else {
-			invocationMechanism.setDirectory(directoryField.getText());
-		}
-		if ((shellPrefixField.getText() == null) || (shellPrefixField.getText().length() == 0)) {
-			invocationMechanism.setShellPrefix(null);
-		} else {
-			invocationMechanism.setShellPrefix(shellPrefixField.getText());
-		}
-		if ((shellPrefixField.getText() == null) || (shellPrefixField.getText().length() == 0)) {
-			invocationMechanism.setShellPrefix(null);
-		} else {
-			invocationMechanism.setShellPrefix(shellPrefixField.getText());
-		}
-		if ((linkCommandField.getText() == null) || (linkCommandField.getText().length() == 0)) {
-			invocationMechanism.setLinkCommand(null);
-		} else {
-			invocationMechanism.setLinkCommand(linkCommandField.getText());
-		}
-		invocationMechanism.setRetrieveData(retrieveDataField.isSelected());
-		return invocationMechanism;
-	}
-
-	@Override
-	public InvocationMechanism createMechanism(String mechanismName) {
-		ExternalToolLocalInvocationMechanism result = new ExternalToolLocalInvocationMechanism();
-		result.setName(mechanismName);
-		return(result);
-	}
-
-	public boolean isSingleton() {
-		return true;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/ExternalToolSshNodeViewer.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/ExternalToolSshNodeViewer.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/ExternalToolSshNodeViewer.java
deleted file mode 100644
index fb837c5..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/ExternalToolSshNodeViewer.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.manager.ssh;
-
-import javax.swing.JCheckBox;
-import javax.swing.JTextField;
-
-import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanism;
-
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNode;
-
-
-
-/**
- * @author alanrw
- *
- */
-public class ExternalToolSshNodeViewer {
-	
-	private JTextField hostnameField;
-	private JTextField portField;
-	private JTextField directoryField;
-	private JTextField linkCommandField;
-	private JTextField copyCommandField;
-	private JCheckBox retrieveDataField;
-
-	public ExternalToolSshNodeViewer(SshNode node) {
-		this();
-		hostnameField.setText(node.getHost());
-		portField.setText(Integer.toString(node.getPort()));
-		if (node.getDirectory() != null) {
-			directoryField.setText(node.getDirectory());
-		} else {
-			directoryField.setText("");
-		}
-		if (node.getLinkCommand() != null) {
-			linkCommandField.setText(node.getLinkCommand());
-		} else {
-			linkCommandField.setText("");
-		}
-		if (node.getCopyCommand() != null) {
-			copyCommandField.setText(node.getCopyCommand());
-		} else {
-			copyCommandField.setText("");
-		}
-		retrieveDataField.setSelected(node.isRetrieveData());
-	}
-
-	public ExternalToolSshNodeViewer() {
-		hostnameField = new JTextField(30);
-		hostnameField.setText(SshNode.DEFAULT_HOST);
-		portField = new JTextField(3);
-		portField.setText("" + SshNode.DEFAULT_PORT);
-		directoryField = new JTextField(30);
-		directoryField.setText(SshNode.DEFAULT_DIRECTORY);
-		linkCommandField = new JTextField(30);
-		linkCommandField.setText(InvocationMechanism.UNIX_LINK);
-		copyCommandField = new JTextField(30);
-		copyCommandField.setText(InvocationMechanism.UNIX_COPY);
-		retrieveDataField = new JCheckBox();
-	}
-
-	public JTextField getHostnameField() {
-		return hostnameField;
-	}
-
-	public JTextField getPortField() {
-		return portField;
-	}
-	
-	public JTextField getDirectoryField() {
-		return directoryField;
-	}
-
-	public JTextField getLinkCommandField() {
-		return linkCommandField;
-	}
-
-	public JTextField getCopyCommandField() {
-		return copyCommandField;
-	}
-
-	public String getHostname() {
-		return hostnameField.getText();
-	}
-
-	public int getPort() {
-		return Integer.parseInt(portField.getText());
-	}
-	
-	public String getDirectory() {
-		return directoryField.getText();
-	}
-	
-	public String getLinkCommand() {
-		return linkCommandField.getText();
-	}
-	
-	public String getCopyCommand() {
-		return copyCommandField.getText();
-	}
-
-	/**
-	 * @return the retrieveDataField
-	 */
-	public JCheckBox getRetrieveDataField() {
-		return retrieveDataField;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/SshInvocationMechanismEditor.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/SshInvocationMechanismEditor.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/SshInvocationMechanismEditor.java
deleted file mode 100644
index e8291ed..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/SshInvocationMechanismEditor.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.manager.ssh;
-
-import java.awt.Color;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.swing.AbstractAction;
-import javax.swing.BorderFactory;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextField;
-import javax.swing.border.CompoundBorder;
-
-import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanism;
-import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor;
-import net.sf.taverna.t2.activities.externaltool.ssh.ExternalToolSshInvocationMechanism;
-import net.sf.taverna.t2.lang.ui.DeselectingButton;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNode;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNodeFactory;
-
-/**
- * @author alanrw
- *
- */
-public final class SshInvocationMechanismEditor extends
-		InvocationMechanismEditor<ExternalToolSshInvocationMechanism> {
-	
-	private ArrayList<ExternalToolSshNodeViewer> nodeViewers = new ArrayList<ExternalToolSshNodeViewer>();
-	private int inputGridy = 0;
-	
-	private ExternalToolSshInvocationMechanism mechanism = null;
-	
-	private static Insets insets = new Insets(1,5,1,5);
-	
-	private static CompoundBorder border = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,5,5,5), BorderFactory.createLineBorder(Color.BLACK, 1));
-
-	@Override
-	public boolean canShow(Class<?> c) {
-		return ExternalToolSshInvocationMechanism.class.isAssignableFrom(c);
-	}
-
-	@Override
-	public void show(ExternalToolSshInvocationMechanism invocationMechanism) {
-		mechanism = invocationMechanism;
-		this.removeAll();
-		inputGridy = 1;
-		final JPanel innerPanel = new JPanel(new GridBagLayout());
-
-		final GridBagConstraints inputConstraint = new GridBagConstraints();
-		inputConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
-		inputConstraint.gridx = 0;
-		inputConstraint.gridy = 0;
-		inputConstraint.weightx = 0.1;
-		inputConstraint.fill = GridBagConstraints.BOTH;
-
-		inputConstraint.gridx = 0;
-			nodeViewers.clear();
-			for (SshNode node : invocationMechanism.getNodes()) {
-				ExternalToolSshNodeViewer nodeViewer = new ExternalToolSshNodeViewer(node);
-				addNodeViewer(this, innerPanel, nodeViewer);
-			}
-
-		this.setLayout(new GridBagLayout());
-		GridBagConstraints outerPanelConstraint = new GridBagConstraints();
-		outerPanelConstraint.gridx = 0;
-		outerPanelConstraint.gridy = 0;
-		outerPanelConstraint.weightx = 0.1;
-		outerPanelConstraint.weighty = 0.1;
-		outerPanelConstraint.fill = GridBagConstraints.BOTH;
-		this.add(new JScrollPane(innerPanel),
-				outerPanelConstraint);
-		outerPanelConstraint.weighty = 0;
-		final JButton addHostButton = new DeselectingButton("Add host",
-				new AbstractAction() {
-			public void actionPerformed(ActionEvent e) {
-
-				ExternalToolSshNodeViewer newViewer = new ExternalToolSshNodeViewer();
-
-					addNodeViewer(SshInvocationMechanismEditor.this, innerPanel, newViewer);
-					innerPanel.revalidate();
-					innerPanel.repaint();
-			}
-
-		});
-		JPanel buttonPanel = new JPanel();
-		buttonPanel.setLayout(new GridBagLayout());
-
-		JPanel filler = new JPanel();
-		outerPanelConstraint.weightx = 0.1;
-		outerPanelConstraint.weighty = 0;
-		outerPanelConstraint.gridx = 0;
-		outerPanelConstraint.gridy = 0;
-
-		buttonPanel.add(filler, outerPanelConstraint);
-
-		outerPanelConstraint.weightx = 0;
-		outerPanelConstraint.weighty = 0;
-		outerPanelConstraint.gridx = 1;
-		outerPanelConstraint.gridy = 0;
-
-		buttonPanel.add(addHostButton, outerPanelConstraint);
-
-		outerPanelConstraint.weightx = 0;
-		outerPanelConstraint.weighty = 0;
-		outerPanelConstraint.gridx = 0;
-		outerPanelConstraint.gridy = 1;
-		outerPanelConstraint.fill = GridBagConstraints.BOTH;
-		this.add(buttonPanel, outerPanelConstraint);
-	}
-
-	protected void addNodeViewer(final JPanel result, final JPanel innerPanel,
-			ExternalToolSshNodeViewer viewer) {
-		final JPanel subPanel = new JPanel();
-		subPanel.setLayout(new GridBagLayout());
-		subPanel.setBorder(border);
-		final GridBagConstraints inputConstraint = new GridBagConstraints();
-		inputConstraint.insets = insets;
-		inputConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
-		inputConstraint.weightx = 0.1;
-		inputConstraint.fill = GridBagConstraints.BOTH;
-
-		inputConstraint.gridy = 0 ;
-		inputConstraint.gridx = 0;
-		
-		subPanel.add(new JLabel("Host: "), inputConstraint);
-		final JTextField hostnameField = viewer.getHostnameField();
-		inputConstraint.gridx++;
-		subPanel.add(hostnameField, inputConstraint);
-
-		inputConstraint.gridy++ ;
-		inputConstraint.gridx = 0;
-		subPanel.add(new JLabel("Port: "), inputConstraint);
-		final JTextField portField = viewer.getPortField();
-		inputConstraint.gridx++;
-		subPanel.add(portField ,inputConstraint);
-		
-		inputConstraint.gridy++ ;
-		inputConstraint.gridx = 0;
-		subPanel.add(new JLabel("Working directory: "), inputConstraint);
-		final JTextField directoryField = viewer.getDirectoryField();
-		inputConstraint.gridx++;
-		subPanel.add(directoryField ,inputConstraint);
-		
-		inputConstraint.gridy++ ;
-		inputConstraint.gridx = 0;
-		subPanel.add(new JLabel("Link command: "), inputConstraint);
-		final JTextField linkCommandField = viewer.getLinkCommandField();
-		inputConstraint.gridx++;
-		subPanel.add(linkCommandField ,inputConstraint);
-
-		inputConstraint.gridy++ ;
-		inputConstraint.gridx = 0;
-		subPanel.add(new JLabel("Copy command: "), inputConstraint);
-		final JTextField copyCommandField = viewer.getCopyCommandField();
-		inputConstraint.gridx++;
-		subPanel.add(copyCommandField ,inputConstraint);
-
-		inputConstraint.gridy++ ;
-		inputConstraint.gridx = 0;
-		subPanel.add(new JLabel("Fetch data: "), inputConstraint);
-		inputConstraint.gridx++;
-		final JCheckBox retrieveDataField = viewer.getRetrieveDataField();
-		subPanel.add(retrieveDataField ,inputConstraint);
-
-		inputConstraint.gridy++ ;
-		inputConstraint.gridx = 1;
-		inputConstraint.fill = GridBagConstraints.NONE;
-		inputConstraint.anchor = GridBagConstraints.EAST;
-		final ExternalToolSshNodeViewer v = viewer;
-		final JButton removeButton = new DeselectingButton("Remove",
-				new AbstractAction() {
-
-			public void actionPerformed(ActionEvent e) {
-				synchronized(nodeViewers) {
-					nodeViewers.remove(v);
-				}
-				innerPanel.remove(subPanel);
-				innerPanel.revalidate();
-				innerPanel.repaint();
-				result.revalidate();
-				result.repaint();
-			}
-
-		});
-		subPanel.add(removeButton, inputConstraint);
-		
-		inputConstraint.gridy = ++inputGridy;
-		innerPanel.add(subPanel, inputConstraint);
-
-		nodeViewers.add(viewer);
-		inputGridy++;		
-	}
-
-	private List<SshNode> getNodeList() {
-		List<SshNode> result = new ArrayList<SshNode>();
-		for (ExternalToolSshNodeViewer viewer : nodeViewers) {
-			SshNode node = SshNodeFactory.getInstance().getSshNode(viewer.getHostname(), viewer.getPort(), viewer.getDirectory());
-			node.setLinkCommand(viewer.getLinkCommand());
-			node.setCopyCommand(viewer.getCopyCommand());
-			node.setRetrieveData(viewer.getRetrieveDataField().isSelected());
-			result.add(node);
-		}
-		return result;
-	}
-
-	@Override
-	public ExternalToolSshInvocationMechanism updateInvocationMechanism() {
-		mechanism.setNodes(getNodeList());
-		return mechanism;
-	}
-
-	@Override
-	public InvocationMechanism createMechanism(String mechanismName) {
-		ExternalToolSshInvocationMechanism result = new ExternalToolSshInvocationMechanism();
-		result.setName(mechanismName);
-		return result;
-	}
-
-	@Override
-	public String getName() {
-		return ("SSH");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolContextualMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolContextualMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolContextualMenuAction.java
deleted file mode 100644
index 505546d..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolContextualMenuAction.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.externaltool.menu;
-
-import java.awt.event.ActionEvent;
-import java.net.URI;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
-import net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolTemplateServiceDescription;
-import net.sf.taverna.t2.ui.menu.AbstractContextualMenuAction;
-import net.sf.taverna.t2.ui.menu.MenuManager;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
-import net.sf.taverna.t2.workflowmodel.Dataflow;
-
-import org.apache.log4j.Logger;
-
-/**
- * An action to add an external tool + a wrapping processor to the workflow.
- *
- * @author Alex Nenadic
- * @author Alan Williamns
- *
- */
-@SuppressWarnings("serial")
-public class AddExternalToolContextualMenuAction extends AbstractContextualMenuAction {
-
-	private static final String ADD_EXTERNAL_TOOL = "Tool";
-
-	private static final URI insertSection = URI
-			.create("http://taverna.sf.net/2009/contextMenu/insert");
-
-	private static Logger logger = Logger.getLogger(AddExternalToolMenuAction.class);
-
-	private EditManager editManager;
-
-	private MenuManager menuManager;
-
-	private SelectionManager selectionManager;
-
-	private ActivityIconManager activityIconManager;
-
-	public AddExternalToolContextualMenuAction() {
-		super(insertSection, 900);
-	}
-
-	@Override
-	public boolean isEnabled() {
-		return super.isEnabled() && getContextualSelection().getSelection() instanceof Dataflow;
-	}
-
-	@Override
-	protected Action createAction() {
-
-		return new AddExternalToolAction();
-	}
-
-	protected class AddExternalToolAction extends AbstractAction {
-		AddExternalToolAction() {
-			super(ADD_EXTERNAL_TOOL, activityIconManager.iconForActivity(
-					new ExternalToolActivity()));
-		}
-
-		public void actionPerformed(ActionEvent e) {
-			WorkflowView.importServiceDescription(
-					ExternalToolTemplateServiceDescription.getServiceDescription(), false,
-					editManager, menuManager, selectionManager);
-		}
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setMenuManager(MenuManager menuManager) {
-		this.menuManager = menuManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolMenuAction.java
deleted file mode 100644
index ff1f11e..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolMenuAction.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.externaltool.menu;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-import java.net.URI;
-
-import javax.swing.Action;
-import javax.swing.KeyStroke;
-
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
-import net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolTemplateServiceDescription;
-import net.sf.taverna.t2.ui.menu.AbstractMenuAction;
-import net.sf.taverna.t2.ui.menu.DesignOnlyAction;
-import net.sf.taverna.t2.ui.menu.MenuManager;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
-import net.sf.taverna.t2.workbench.views.graph.menu.InsertMenu;
-
-import org.apache.log4j.Logger;
-
-/**
- * An action to add a externaltool activity + a wrapping processor to the workflow.
- *
- * @author Alex Nenadic
- * @author alanrw
- *
- */
-@SuppressWarnings("serial")
-public class AddExternalToolMenuAction extends AbstractMenuAction {
-
-	private static final String ADD_EXTERNAL_TOOL = "Tool";
-
-	private static final URI ADD_EXTERNAL_TOOL_URI = URI
-	.create("http://taverna.sf.net/2008/t2workbench/menu#graphMenuAddExternalTool");
-
-	private static Logger logger = Logger
-			.getLogger(AddExternalToolMenuAction.class);
-
-	private EditManager editManager;
-	private MenuManager menuManager;
-	private SelectionManager selectionManager;
-
-	private ActivityIconManager activityIconManager;
-
-	public AddExternalToolMenuAction() {
-		super(InsertMenu.INSERT, 900, ADD_EXTERNAL_TOOL_URI);
-	}
-
-	@Override
-	protected Action createAction() {
-
-		return new AddExternalToolAction();
-	}
-
-	protected class AddExternalToolAction extends DesignOnlyAction {
-		AddExternalToolAction () {
-			super ();
-			putValue(SMALL_ICON, activityIconManager.iconForActivity(
-					new ExternalToolActivity()));
-			putValue(NAME, ADD_EXTERNAL_TOOL);
-			putValue(SHORT_DESCRIPTION, "Tool");
-			putValue(Action.ACCELERATOR_KEY,
-					KeyStroke.getKeyStroke(KeyEvent.VK_T, InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_DOWN_MASK));
-		}
-
-		public void actionPerformed(ActionEvent e) {
-			WorkflowView.importServiceDescription(ExternalToolTemplateServiceDescription.getServiceDescription(),
-			false, editManager, menuManager, selectionManager);
-		}
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setMenuManager(MenuManager menuManager) {
-		this.menuManager = menuManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/ConfigureExternalToolMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/ConfigureExternalToolMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/ConfigureExternalToolMenuAction.java
deleted file mode 100644
index f57b25c..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/ConfigureExternalToolMenuAction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2010 Hajo Nils Krabbenhoeft, spratpix GmbH & Co. KG
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-
-package net.sf.taverna.t2.activities.externaltool.menu;
-
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
-import net.sf.taverna.t2.activities.externaltool.actions.ExternalToolActivityConfigureAction;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-
-/**
- * This class adds the plugin configuration action to the context menu of every use case activity.
- *
- * @author Hajo Nils Krabbenhoeft
- */
-public class ConfigureExternalToolMenuAction extends
-		AbstractConfigureActivityMenuAction<ExternalToolActivity> {
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private ActivityIconManager activityIconManager;
-
-	public ConfigureExternalToolMenuAction() {
-		super(ExternalToolActivity.class);
-	}
-
-	@Override
-	protected Action createAction() {
-		ExternalToolActivityConfigureAction configAction = new ExternalToolActivityConfigureAction(
-				findActivity(), getParentFrame(), editManager, fileManager, activityIconManager);
-		addMenuDots(configAction);
-		return configAction;
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/FeedbackMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/FeedbackMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/FeedbackMenuAction.java
deleted file mode 100644
index 8c7a284..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/FeedbackMenuAction.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2010 Hajo Nils Krabbenhoeft, spratpix GmbH & Co. KG
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-
-package net.sf.taverna.t2.activities.externaltool.menu;
-
-import java.awt.Desktop;
-import java.awt.event.ActionEvent;
-import java.io.IOException;
-import java.net.URI;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.Icon;
-import javax.swing.JOptionPane;
-
-import net.sf.taverna.t2.ui.menu.AbstractMenuAction;
-
-import org.apache.log4j.Logger;
-
-/**
- * This class adds the feedback item to the context menu of every use case
- * activity.
- *
- * @author Hajo Nils Krabbenhoeft
- */
-public class FeedbackMenuAction extends AbstractMenuAction {
-
-	private static Logger logger = Logger.getLogger(FeedbackMenuAction.class);
-
-
-	private static final URI feedbackSection = URI.create("http://taverna.sf.net/2009/contextMenu/configure");
-
-	public FeedbackMenuAction() {
-		super(feedbackSection, 51);
-	}
-
-	protected Action createAction() {
-	    // final ImageIcon icon = KnowARCConfigurationFactory.getConfiguration().getIcon();
-		return new SendFeedbackAction("Send Feedback...", null);
-	}
-
-	private final class SendFeedbackAction extends AbstractAction {
-		private static final long serialVersionUID = 1L;
-
-		private static final String errTitle = "Could not open web browser for feedback:";
-		private static final String feedbackUrl = "http://www.taverna.org.uk/about/contact-us/feedback?product=ExternalToolService";
-
-		private SendFeedbackAction(String name, Icon icon) {
-			super(name, icon);
-		}
-
-		public void actionPerformed(ActionEvent e) {
-			if (Desktop.isDesktopSupported()) {
-				try {
-					Desktop.getDesktop().browse(URI.create(feedbackUrl));
-				} catch (IOException e1) {
-					JOptionPane.showMessageDialog(null, feedbackUrl + "\n" + e1.getLocalizedMessage(), errTitle, JOptionPane.ERROR_MESSAGE);
-				}
-			} else {
-				JOptionPane.showMessageDialog(null, "Go to " + feedbackUrl, errTitle, JOptionPane.ERROR_MESSAGE);
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/AddExternalToolServiceDialog.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/AddExternalToolServiceDialog.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/AddExternalToolServiceDialog.java
deleted file mode 100644
index 86b0882..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/AddExternalToolServiceDialog.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.externaltool.servicedescriptions;
-
-import java.awt.BorderLayout;
-import java.awt.FlowLayout;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-import java.io.IOException;
-import java.net.URL;
-import java.net.URLConnection;
-
-import javax.swing.JButton;
-import javax.swing.JDialog;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import javax.swing.border.EmptyBorder;
-
-import net.sf.taverna.t2.workbench.MainWindow;
-import net.sf.taverna.t2.workbench.helper.HelpEnabledDialog;
-
-import org.apache.log4j.Logger;
-
-/**
- * Dialog that lets user specify a URL of a Tool service they want 
- * to add to the Service Panel. In the case the Tool URL is behind
- * HTTPS or service's endpoints require HTTPS it will ask user to confirm
- * if they want to trust it. 
- * 
- * @author Alex Nenadic
- *
- */
-@SuppressWarnings("serial")
-public abstract class AddExternalToolServiceDialog extends HelpEnabledDialog {
-
-	private JTextField toolLocationField;
-	private Logger logger = Logger.getLogger(AddExternalToolServiceDialog.class);
-
-	public AddExternalToolServiceDialog()  {
-		super(MainWindow.getMainWindow(), "Add tool service", true, null); // create a non-modal dialog
-		initComponents();
-		setLocationRelativeTo(getParent());
-	}
-
-	private void initComponents() {
-		JPanel mainPanel = new JPanel(new GridBagLayout());
-		mainPanel.setBorder(new EmptyBorder(10,10,10,10));
-		
-		JLabel toolLocatitionLabel = new JLabel("Tool registry location",ExternalToolActivityIcon.getExternalToolIcon(), JLabel.LEFT);		
-		GridBagConstraints gbc = new GridBagConstraints();
-		gbc.weighty = 0.0;
-		
-		gbc.weightx = 0.0;
-		gbc.gridx = 0;
-		gbc.gridy = 0;
-		gbc.fill = GridBagConstraints.NONE;
-		gbc.anchor = GridBagConstraints.WEST;
-		gbc.insets = new Insets(5, 10, 0, 0);
-		mainPanel.add(toolLocatitionLabel, gbc);
-        
-		toolLocationField = new JTextField("http://taverna.nordugrid.org/sharedRepository/xml.php");
-		gbc.weightx = 1.0;
-		gbc.gridx = 1;
-		gbc.gridy = 0;
-		gbc.fill = GridBagConstraints.HORIZONTAL;
-		gbc.anchor = GridBagConstraints.WEST;
-		gbc.insets = new Insets(5, 10, 0, 5);		
-		mainPanel.add(toolLocationField, gbc);
-		
-	    final JButton addServiceButton = new JButton("Add");
-	    addServiceButton.addActionListener(new ActionListener()
-	        {
-	            public void actionPerformed(ActionEvent evt)
-	            {
-	                addPressed();
-	            }
-	        });
-	    
-	    // When user presses "Return" key fire the action on the "Add" button
-	    addServiceButton.addKeyListener(new java.awt.event.KeyAdapter() {
-			public void keyPressed(java.awt.event.KeyEvent evt) {
-				if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
-					addPressed();
-				}
-			}
-		});
-		getRootPane().setDefaultButton(addServiceButton);
-	    
-        JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
-        buttonsPanel.add(addServiceButton);
-        
-        getContentPane().setLayout(new BorderLayout());
-        getContentPane().add(mainPanel, BorderLayout.CENTER);
-        getContentPane().add(buttonsPanel, BorderLayout.SOUTH);
-        
-		setSize(getPreferredSize());
-        pack();
-	}
-	
-    /**
-     * 'Add service' button pressed or otherwise activated.
-     */
-    private void addPressed()
-    {
-		final String toolURLString = toolLocationField.getText().trim();
-		new Thread("Adding tool " + toolURLString) {
-			public void run() {
-				// Only add the service provider for this service if service URL
-				// starts with 'http'
-				// or if it starts with 'https' and user explicitly said they
-				// wanted to trust this service.
-				/*
-				 * if (shouldTrust(toolURLString)){ addRegistry(toolURLString);
-				 * }
-				 */
-				try {
-					URL url = new URL(toolURLString);
-					URLConnection connection = url.openConnection();
-					try {
-						// If the url starts with 'https' - security hook for
-						// https connection's trust manager
-						// will be engaged and user will be asked automatically
-						// if they want
-						// to trust the connection (if it is not already
-						// trusted). If the urls starts with 'http' -
-						// this will not have any effect apart from checking if
-						// we can open a connection.
-						connection.connect(); // if this does not fail - add the
-						// tool
-						// service provider for this service to
-						// the registry
-					} finally {
-						try {
-							connection.getInputStream().close();
-						} catch (IOException ex) {
-						}
-					}
-					addRegistry(toolURLString);
-				} catch (Exception ex) { // anything failed
-					JOptionPane.showMessageDialog(null,
-							"Could not read the tool descriptions from "
-									+ toolURLString + ":\n" + ex,
-							"Could not add tool service",
-							JOptionPane.ERROR_MESSAGE);
-
-					logger.error(
-							"Failed to add tool description provider for service: "
-									+ toolURLString, ex);
-
-				}
-			};
-		}.start();
-		closeDialog();
-    }
-
-	protected abstract void addRegistry(String tool);	
-	
-	/**
-	 * Closes the dialog.
-	 */
-	private void closeDialog() {
-		setVisible(false);
-		dispose();
-	}
-}


[15/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-external-tool-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolActivityIcon.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolActivityIcon.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolActivityIcon.java
deleted file mode 100644
index f91755f..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolActivityIcon.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 Hajo Nils Krabbenhoeft, INB, University of Luebeck
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-
-package net.sf.taverna.t2.activities.externaltool.servicedescriptions;
-
-import java.awt.Color;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
-
-/**
- * This class provides an icon for the use case activity.
- *
- * @author Hajo Nils Krabbenhoeft
- */
-public class ExternalToolActivityIcon implements ActivityIconSPI {
-
-	private static final String PROCESSOR_COLOUR_STRING = "#F28C55";
-
-	private static Icon icon;
-
-	public int canProvideIconScore(Activity<?> activity) {
-		if (activity.getClass().getName().equals(ExternalToolActivity.class.getName()))
-			return DEFAULT_ICON + 1;
-		else
-			return NO_ICON;
-	}
-
-	public Icon getIcon(Activity<?> activity) {
-		return getExternalToolIcon();
-	}
-
-	public static Icon getExternalToolIcon() {
-		if (icon == null) {
-			icon = new ImageIcon(ExternalToolActivityIcon.class.getResource("/externaltool.png"));
-		}
-		return icon;
-	}
-
-	public static String getColourString() {
-		return PROCESSOR_COLOUR_STRING;
-	}
-
-	public void setColourManager(ColourManager colourManager) {
-		// set colour for XPath processors in the workflow diagram
-		colourManager.setPreferredColour(ExternalToolActivity.class.getCanonicalName(),
-				Color.decode(PROCESSOR_COLOUR_STRING));
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceDescription.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceDescription.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceDescription.java
deleted file mode 100644
index 02c2bf6..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceDescription.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 Hajo Nils Krabbenhoeft, INB, University of Luebeck   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-
-package net.sf.taverna.t2.activities.externaltool.servicedescriptions;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-
-import org.apache.log4j.Logger;
-
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
-import net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupManager;
-import net.sf.taverna.t2.activities.externaltool.manager.impl.InvocationGroupManagerImpl;
-import net.sf.taverna.t2.activities.externaltool.views.ExternalToolConfigView;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
-import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-
-/**
- * ExternalToolServiceDescription stores the repository URL and the use case id so
- * that it can create an ExternalToolActivityConfigurationBean
- * 
- * @author Hajo Nils Krabbenhoeft
- */
-public class ExternalToolServiceDescription extends ServiceDescription<ExternalToolActivityConfigurationBean> {
-	
-	private static Logger logger = Logger
-	.getLogger(ExternalToolServiceDescription.class);
-
-	
-	private static InvocationGroupManager manager = InvocationGroupManagerImpl.getInstance();
-
-	private String repositoryUrl;
-	private String externaltoolid;
-	private UseCaseDescription useCaseDescription;
-
-	public String getRepositoryUrl() {
-		return repositoryUrl;
-	}
-
-	public void setRepositoryUrl(String repositoryUrl) {
-		this.repositoryUrl = repositoryUrl;
-	}
-
-	public String getExternaltoolid() {
-		return externaltoolid;
-	}
-
-	public void setExternaltoolid(String externaltoolid) {
-		this.externaltoolid = externaltoolid;
-	}
-
-	public Icon getIcon() {
-		if (useCaseDescription != null) {
-			String icon_url = useCaseDescription.getIcon_url();
-			if ((icon_url != null) && !icon_url.isEmpty() && !icon_url.endsWith(".ico"))
-				try {
-					ImageIcon result = new ImageIcon(new URL(icon_url));
-					if ((result != null) && (result.getIconHeight() != 0) && (result.getIconWidth() != 0)){
-						return result;
-					}
-				} catch (MalformedURLException e) {
-					logger.error("Problematic URL" + icon_url, e);
-				}
-		}
-		return ExternalToolActivityIcon.getExternalToolIcon();
-	}
-
-	public Class<? extends Activity<ExternalToolActivityConfigurationBean>> getActivityClass() {
-		return ExternalToolActivity.class;
-	}
-
-	public ExternalToolActivityConfigurationBean getActivityConfiguration() {
-		ExternalToolActivityConfigurationBean bean = new ExternalToolActivityConfigurationBean();
-		bean.setRepositoryUrl(repositoryUrl);
-		bean.setExternaltoolid(externaltoolid);
-		bean.setUseCaseDescription(useCaseDescription);
-		bean.setMechanism(manager.getDefaultMechanism());
-
-		return bean;
-	}
-
-	public String getName() {
-		return externaltoolid;
-	}
-
-	@SuppressWarnings("unchecked")
-	public List<? extends Comparable> getPath() {
-		List<String> result = new ArrayList<String>();
-		result.add("Tools decribed @ " + repositoryUrl);
-		String group = useCaseDescription.getGroup();
-		if ((group != null) && !group.isEmpty()) {
-			String[] groups = group.split(":");
-			for (String g : groups) {
-				result.add(g);
-			}
-		}
-		return result;
-	}
-
-	protected List<Object> getIdentifyingData() {
-		// we require use cases inside one XML file to have unique IDs, which
-		// means every externaltool is uniquely identified by its repository URL and
-		// its use case ID.
-		return Arrays.<Object> asList(repositoryUrl, externaltoolid);
-	}
-	
-	public String getDescription() {
-		if (useCaseDescription != null) {
-			String description = useCaseDescription.getDescription();
-			if (description == null) {
-				return "";
-			}
-			return description;
-		}
-		return "";
-	}
-
-	public void setUseCaseDescription(UseCaseDescription usecase) {
-		this.useCaseDescription = usecase;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProvider.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProvider.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProvider.java
deleted file mode 100644
index 4f3cbf2..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProvider.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 Hajo Nils Krabbenhoeft, INB, University of Luebeck   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-
-package net.sf.taverna.t2.activities.externaltool.servicedescriptions;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.swing.Icon;
-
-import net.sf.taverna.t2.servicedescriptions.AbstractConfigurableServiceProvider;
-import net.sf.taverna.t2.servicedescriptions.CustomizedConfigurePanelProvider;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseEnumeration;
-
-/**
- * ExternalToolServiceProvider searches an use case repository XML for use case
- * descriptions.
- * 
- * @author Hajo Nils Krabbenhoeft
- */
-public class ExternalToolServiceProvider extends AbstractConfigurableServiceProvider<ExternalToolServiceProviderConfig>  implements
-CustomizedConfigurePanelProvider<ExternalToolServiceProviderConfig>{
-
-	private static final URI providerId = URI
-	.create("http://taverna.sf.net/2010/service-provider/externaltool");
-	
-	public ExternalToolServiceProvider() {
-		super(new ExternalToolServiceProviderConfig("http://taverna.nordugrid.org/sharedRepository/xml.php"));
-	}
-
-	public String getName() {
-		return "Tool service";
-	}
-
-	public List<ExternalToolServiceProviderConfig> getDefaultConfigurations() {
-		List<ExternalToolServiceProviderConfig> defaults = new ArrayList<ExternalToolServiceProviderConfig>();
-		// Disabled until sensible set
-//		defaults.add(new ExternalToolServiceProviderConfig("http://taverna.nordugrid.org/sharedRepository/xml.php"));
-		return defaults;
-	}
-
-	public void findServiceDescriptionsAsync(FindServiceDescriptionsCallBack callBack) {
-		String repositoryUrl = serviceProviderConfig.getRepositoryUrl();
-		callBack.status("Parsing use case repository:" + repositoryUrl);
-			// prepare a list of all use case descriptions which are stored in
-			// the given repository URL
-			List<UseCaseDescription> usecases = new ArrayList<UseCaseDescription> ();
-			try {
-				usecases = UseCaseEnumeration.readDescriptionsFromUrl(
-						repositoryUrl);
-			} catch (IOException e) {
-				callBack.fail("Unable to read tool descriptions", e);
-			}
-			callBack.status("Found " + usecases.size() + " use cases:" + repositoryUrl);
-			// convert all the UseCaseDescriptions in the XML file into
-			// ExternalToolServiceDescription items
-			List<ExternalToolServiceDescription> items = new ArrayList<ExternalToolServiceDescription>();
-			for (UseCaseDescription usecase : usecases) {
-				ExternalToolServiceDescription item = new ExternalToolServiceDescription();
-				item.setRepositoryUrl(repositoryUrl);
-				item.setExternaltoolid(usecase.getUsecaseid());
-				item.setUseCaseDescription(usecase);
-				items.add(item);
-			}
-			// we dont have streaming data loading or partial results, so return
-			// results and finish
-			callBack.partialResults(items);
-			callBack.finished();
-	}
-
-	@Override
-	public String toString() {
-		return getName() + " " + getConfiguration().getRepositoryUrl();
-	}
-
-	public Icon getIcon() {
-	    return ExternalToolActivityIcon.getExternalToolIcon();
-	}
-
-	@Override
-	protected List<? extends Object> getIdentifyingData() {
-		List<String> result;
-		// one can fully identify an use case repository by its URL
-		result = Arrays.asList(getConfiguration().getRepositoryUrl());
-		return result;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry registry) {
-	}
-	
-	@SuppressWarnings("serial")
-	public void createCustomizedConfigurePanel(final CustomizedConfigureCallBack<ExternalToolServiceProviderConfig> callBack) {
-			
-		AddExternalToolServiceDialog addWSDLServiceDialog = new AddExternalToolServiceDialog() {
-				@Override
-				protected void addRegistry(String externalToolURL) {
-					
-					ExternalToolServiceProviderConfig providerConfig = new ExternalToolServiceProviderConfig(externalToolURL);					
-					callBack.newProviderConfiguration(providerConfig);
-				}
-			};
-			addWSDLServiceDialog.setVisible(true);		
-	}
-
-
-	public String getId() {
-		return providerId.toString();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProviderConfig.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProviderConfig.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProviderConfig.java
deleted file mode 100644
index 0967a6e..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProviderConfig.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 Hajo Nils Krabbenhoeft, INB, University of Luebeck   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-
-package net.sf.taverna.t2.activities.externaltool.servicedescriptions;
-
-import net.sf.taverna.t2.lang.beans.PropertyAnnotated;
-import net.sf.taverna.t2.lang.beans.PropertyAnnotation;
-
-/**
- * ExternalToolServiceProviderConfig stores the URL of the use case repository XML file
- * 
- * @author Hajo Nils Krabbenhoeft
- */
-public class ExternalToolServiceProviderConfig extends PropertyAnnotated {
-	private String repositoryUrl;
-
-	public ExternalToolServiceProviderConfig() {
-	}
-
-	public ExternalToolServiceProviderConfig(String repositoryUrl) {
-		this.repositoryUrl = repositoryUrl;
-	}
-
-	@PropertyAnnotation(displayName = "Tool registry location", preferred = true)
-	public String getRepositoryUrl() {
-		return repositoryUrl;
-	}
-
-	public void setRepositoryUrl(String repositoryUrl) {
-		this.repositoryUrl = repositoryUrl;
-	}
-
-	@Override
-	public String toString() {
-		return repositoryUrl;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolTemplateServiceDescription.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolTemplateServiceDescription.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolTemplateServiceDescription.java
deleted file mode 100644
index 30ae3eb..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolTemplateServiceDescription.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.servicedescriptions;
-
-import java.net.URI;
-import java.util.UUID;
-
-import javax.swing.Icon;
-
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
-import net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupManager;
-import net.sf.taverna.t2.activities.externaltool.manager.impl.InvocationGroupManagerImpl;
-import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
-import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
-
-/**
- * @author alanrw
- *
- */
-public class ExternalToolTemplateServiceDescription extends
-		AbstractTemplateService<ExternalToolActivityConfigurationBean> {
-	
-	private static final URI providerId = URI
-	.create("http://taverna.sf.net/2010/service-provider/external-tool");
-	
-	private static final String EXTERNAL_TOOL = "Tool";
-	
-	private static InvocationGroupManager manager = InvocationGroupManagerImpl.getInstance();
-
-	@Override
-	public Class<? extends Activity<ExternalToolActivityConfigurationBean>> getActivityClass() {
-		return ExternalToolActivity.class;
-	}
-
-	@Override
-	public ExternalToolActivityConfigurationBean getActivityConfiguration() {
-		ExternalToolActivityConfigurationBean result = new ExternalToolActivityConfigurationBean();
-		result.setExternaltoolid(UUID.randomUUID().toString());
-		result.setUseCaseDescription(new UseCaseDescription(""));
-		result.setMechanism(manager.getDefaultMechanism());
-		return result;
-	}
-
-	@Override
-	public Icon getIcon() {
-		return ExternalToolActivityIcon.getExternalToolIcon();
-	}
-	
-	@Override
-	public String getDescription() {
-		return "A service that allows tools to be used as services";	
-	}
-	
-	@SuppressWarnings("unchecked")
-	public static ServiceDescription getServiceDescription() {
-		ExternalToolTemplateServiceDescription bts = new ExternalToolTemplateServiceDescription();
-		return bts.templateService;
-	}
-
-
-
-	@Override
-	public String getId() {
-		return providerId.toString();
-	}
-
-	@Override
-	public String getName() {
-		return EXTERNAL_TOOL;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/utils/Tools.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/utils/Tools.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/utils/Tools.java
deleted file mode 100644
index 55cda5c..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/utils/Tools.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.utils;
-
-import java.awt.Color;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.util.List;
-import java.util.Map;
-
-import javax.swing.AbstractAction;
-import javax.swing.BorderFactory;
-import javax.swing.JButton;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.border.CompoundBorder;
-
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInputUser;
-
-import net.sf.taverna.t2.lang.ui.DeselectingButton;
-
-/**
- * @author alanrw
- *
- */
-public class Tools {
-	
-	private static CompoundBorder border = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,5,5,5), BorderFactory.createLineBorder(Color.BLACK, 1));
-	
-	private static Insets insets = new Insets(5,5,5,5);
-	
-	public static void addViewer(final JPanel innerPanel, String[] labels, JComponent[] elements,
-			final List viewerList, final Object viewer, final JPanel outerPanel) {
-		final JPanel subPanel = new JPanel();
-		subPanel.setLayout(new GridBagLayout());
-		subPanel.setBorder(border);
-		
-		final GridBagConstraints labelConstraint = new GridBagConstraints();
-		labelConstraint.insets = insets;
-		labelConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
-		labelConstraint.fill = GridBagConstraints.BOTH;
-		labelConstraint.gridy = 0;
-		labelConstraint.gridx = 0;
-		labelConstraint.weightx = 0;
-
-		final GridBagConstraints elementConstraint = new GridBagConstraints();
-		elementConstraint.insets = insets;
-		elementConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
-		elementConstraint.fill = GridBagConstraints.BOTH;
-		elementConstraint.gridy = 0;
-		elementConstraint.gridx = 1;
-		elementConstraint.weightx = 1.0;
-		
-		final GridBagConstraints removeConstraint = new GridBagConstraints();
-		removeConstraint.insets = insets;
-		removeConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
-		removeConstraint.fill = GridBagConstraints.BOTH;
-		removeConstraint.gridx = 1;
-		removeConstraint.weightx = 0;
-		removeConstraint.fill = GridBagConstraints.NONE;
-		removeConstraint.anchor = GridBagConstraints.EAST;
-		
-		final GridBagConstraints subPanelConstraint = new GridBagConstraints();
-		subPanelConstraint.insets = insets;
-		subPanelConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
-		subPanelConstraint.fill = GridBagConstraints.BOTH;
-		subPanelConstraint.gridx = 1;
-//		subPanelConstraint.gridy = ++stringReplacementGridy;
-		subPanelConstraint.weightx = 1.00;
-		subPanelConstraint.fill = GridBagConstraints.HORIZONTAL;
-		subPanelConstraint.anchor = GridBagConstraints.WEST;		
-		
-		for (int i = 0; i < labels.length; i++) {
-			subPanel.add(new JLabel(labels[i] + ":"), labelConstraint);
-			subPanel.add(elements[i], elementConstraint);
-			labelConstraint.gridy++;
-			elementConstraint.gridy++;
-		}
-		
-		removeConstraint.gridy = labelConstraint.gridy + 1;
-		final JButton removeButton = new DeselectingButton("Remove",
-				new AbstractAction() {
-
-			public void actionPerformed(ActionEvent e) {
-				synchronized (viewerList) {
-					viewerList.remove(viewer);
-				}
-				innerPanel.remove(subPanel);
-				innerPanel.revalidate();
-				innerPanel.repaint();
-				outerPanel.revalidate();
-				outerPanel.repaint();
-			}
-
-		});
-		subPanel.add(removeButton, removeConstraint);
-		innerPanel.add(subPanel, subPanelConstraint);
-	}
-	
-	public static boolean isStringReplacement(ScriptInputUser si) {
-		return !si.isList() && !si.isFile() && !si.isTempFile();
-	}
-	
-	public static boolean isInputFile(ScriptInputUser si) {
-		return !si.isList() && si.isFile();
-	}
-
-	public static boolean isFileList(ScriptInputUser si) {
-		return si.isList() && si.isFile();
-	}
-	
-	public static boolean isUnderstood(ScriptInputUser si) {
-		return isStringReplacement(si) || isInputFile(si) || isFileList(si);
-	}
-	
-	public static boolean areAllUnderstood(Map<String, ScriptInput> inputs) {
-		for (ScriptInput si : inputs.values()) {
-			if ((si instanceof ScriptInputUser) && !isUnderstood((ScriptInputUser) si)) {
-				return false;
-			}
-		}
-		return true;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/AnnotationPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/AnnotationPanel.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/AnnotationPanel.java
deleted file mode 100644
index 83e75e8..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/AnnotationPanel.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.FlowLayout;
-
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-
-/**
- * @author alanrw
- *
- */
-public class AnnotationPanel extends JPanel {
-	
-	public AnnotationPanel(Component nameField, Component descriptionArea, Component groupField) {
-		super();
-		this.setLayout(new BorderLayout());
-		JPanel subPanel = new JPanel(new BorderLayout());
-		JPanel namePanel = new JPanel();
-		namePanel.setLayout(new FlowLayout(FlowLayout.LEFT));
-		namePanel.add(new JLabel("Name: "));
-		namePanel.add(nameField);
-		subPanel.add(namePanel, BorderLayout.NORTH);
-		JPanel groupPanel = new JPanel();
-		groupPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
-		groupPanel.add(new JLabel("Group: "));
-		groupPanel.add(groupField);
-		subPanel.add(groupPanel, BorderLayout.SOUTH);
-		this.add(subPanel, BorderLayout.NORTH);
-		JPanel descriptionPanel = new JPanel();
-		descriptionPanel.setLayout(new BorderLayout());
-		descriptionPanel.add(new JLabel("Description:"), BorderLayout.NORTH);
-		descriptionPanel.add(descriptionArea, BorderLayout.CENTER);
-		this.add(descriptionPanel, BorderLayout.CENTER);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/EditablePanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/EditablePanel.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/EditablePanel.java
deleted file mode 100644
index b395983..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/EditablePanel.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.FlowLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.swing.AbstractAction;
-import javax.swing.JButton;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseEnumeration;
-
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
-import net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolServiceDescription;
-import net.sf.taverna.t2.activities.externaltool.utils.Tools;
-import net.sf.taverna.t2.lang.ui.DeselectingButton;
-
-/**
- * @author alanrw
- *
- */
-public class EditablePanel extends JPanel {
-	public EditablePanel(final ExternalToolConfigView view) {
-		super(new FlowLayout());
-		
-		JButton update = new DeselectingButton("Update tool description",
-				new AbstractAction() {
-
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				ExternalToolActivityConfigurationBean bean = view.getConfiguration();
-				String repositoryUrl = bean.getRepositoryUrl();
-				String id = bean.getExternaltoolid();
-				UseCaseDescription usecase = null;
-				try {
-					usecase = UseCaseEnumeration.readDescriptionFromUrl(
-						repositoryUrl, id);
-				}
-				catch (IOException ex) {
-					// Already logged
-				}
-				if (usecase != null) {
-					bean.setUseCaseDescription(usecase);
-					view.refreshConfiguration(bean);
-				} else {
-					JOptionPane.showMessageDialog(view, "Unable to find tool description " + id, "Missing tool description", JOptionPane.ERROR_MESSAGE);
-				}
-			}});
-		this.add(update);
-		
-		JButton makeEditable = new DeselectingButton("Edit tool description",
-				new AbstractAction() {
-
-			@Override
-			public void actionPerformed(ActionEvent arg0) {
-				ExternalToolActivityConfigurationBean config = view.makeConfiguration();
-				view.setEditable(true, config);
-				
-			}
-		});
-		makeEditable.setToolTipText("Edit the tool description");
-		if (Tools.areAllUnderstood(view.getConfiguration().getUseCaseDescription().getInputs())) {
-		this.add(makeEditable);
-		}
-		
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityContextualView.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityContextualView.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityContextualView.java
deleted file mode 100644
index 46c14be..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityContextualView.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2010 Hajo Nils Krabbenhoeft, INB, University of Luebeck
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.Frame;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.TreeMap;
-
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
-import net.sf.taverna.t2.activities.externaltool.actions.ExternalToolActivityConfigureAction;
-import net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolActivityIcon;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
-import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInputStatic;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptOutput;
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-
-/**
- * ExternalToolActivityContextualView displays the use case information in a HTML table. Currently,
- * this is only the use case ID.
- *
- * @author Hajo Nils Krabbenhoeft
- */
-public class ExternalToolActivityContextualView extends
-		HTMLBasedActivityContextualView<ExternalToolActivityConfigurationBean> {
-	private static final long serialVersionUID = 1L;
-	private final EditManager editManager;
-	private final FileManager fileManager;
-	private final ActivityIconManager activityIconManager;
-
-	public ExternalToolActivityContextualView(Activity<?> activity, EditManager editManager,
-			FileManager fileManager, ColourManager colourManager, ActivityIconManager activityIconManager) {
-		super(activity, colourManager);
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		this.activityIconManager = activityIconManager;
-	}
-
-	@Override
-	protected String getRawTableRowsHtml() {
-		String html = "";
-		ExternalToolActivityConfigurationBean bean = getConfigBean();
-		String repositoryUrl = bean.getRepositoryUrl();
-		if ((repositoryUrl == null) || repositoryUrl.isEmpty()) {
-			repositoryUrl = "<b>Not specified</b>";
-		}
-		html += "<tr><td>Repository URL</td><td>" + repositoryUrl + "</td></tr>";
-
-		String id = bean.getExternaltoolid();
-		if ((id == null) || id.isEmpty()) {
-			id = "<b>Not specified</b>";
-		}
-		html += "<tr><td>Id</td><td>" + id + "</td></tr>";
-
-		UseCaseDescription useCaseDescription = bean.getUseCaseDescription();
-		String name = useCaseDescription.getUsecaseid();
-		if ((name == null) || name.isEmpty()) {
-			name = "<b>Not specified</b>";
-		}
-		html += "<tr><td>Name</td><td>" + name + "</td></tr>";
-
-		Map<String, ScriptInput> stringReplacements = new TreeMap<String, ScriptInput>();
-		Map<String, ScriptInput> fileInputs = new TreeMap<String, ScriptInput>();
-
-		for (Entry<String, ScriptInput> entry : useCaseDescription.getInputs().entrySet()) {
-			String key = entry.getKey();
-			ScriptInput value = entry.getValue();
-			if (value.isFile()) {
-				fileInputs.put(key, value);
-			} else if (value.isTempFile()) {
-				// Nothing
-			} else {
-				stringReplacements.put(key, value);
-			}
-		}
-
-		if (!stringReplacements.isEmpty()) {
-			html += "<tr><td colspan=2 align=center><b>String replacements</b></td></tr>";
-			html += "<tr><td><b>Port name</b></td><td><b>Replaces</b></td></tr>";
-			for (String siName : stringReplacements.keySet()) {
-				html += "<tr><td>" + siName + "</td>";
-				ScriptInput si = stringReplacements.get(siName);
-				html += "<td>%%" + si.getTag() + "%%</td>";
-
-				html += "</tr>";
-			}
-		}
-
-		if (!fileInputs.isEmpty()) {
-			html += "<tr><td colspan=2 align=center><b>File inputs</b></td></tr>";
-			html += "<tr><td><b>Port name</b></td><td><b>To file</b></td></tr>";
-			for (String siName : fileInputs.keySet()) {
-				html += "<tr><td>" + siName + "</td>";
-				ScriptInput si = fileInputs.get(siName);
-				html += "<td>" + si.getTag() + "</td>";
-
-				html += "</tr>";
-			}
-		}
-
-		List<ScriptInputStatic> staticInputs = useCaseDescription.getStatic_inputs();
-		if (!staticInputs.isEmpty()) {
-			html += "<tr><td colspan=2 align=center><b>Static inputs</b></td></tr>";
-			html += "<tr><td><b>Type</b></td><td><b>To file</b></td></tr>";
-			for (ScriptInputStatic si : staticInputs) {
-				if (si.getUrl() != null) {
-					html += "<td><b>URL</b></td>";
-				} else {
-					html += "<td><b>Explicit content</b></td>";
-				}
-				if (si.isFile()) {
-					html += "<td>" + si.getTag() + "</td>";
-				}
-				html += "</tr>";
-			}
-		}
-		Map<String, ScriptOutput> outputs = useCaseDescription.getOutputs();
-		if (!outputs.isEmpty()) {
-			html += "<tr><td colspan=2 align=center><b>File outputs</b></td></tr>";
-			html += "<tr><td><b>Port name</b></td><td><b>From file</b></td></tr>";
-			for (String soName : outputs.keySet()) {
-				html += "<tr><td>" + soName + "</td>";
-				ScriptOutput so = outputs.get(soName);
-				html += "<td>" + so.getPath() + "</td>";
-				html += "</tr>";
-			}
-		}
-		return html;
-	}
-
-	@Override
-	public String getViewTitle() {
-		return "Tool service";
-	}
-
-	@Override
-	public Action getConfigureAction(final Frame owner) {
-		return new ExternalToolActivityConfigureAction((ExternalToolActivity) getActivity(), owner,
-				editManager, fileManager, activityIconManager);
-	}
-
-	public String getBackgroundColour() {
-
-		return ExternalToolActivityIcon.getColourString();
-	}
-
-	@Override
-	public int getPreferredPosition() {
-		return 100;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityViewFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityViewFactory.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityViewFactory.java
deleted file mode 100644
index 902c736..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolActivityViewFactory.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2010 Hajo Nils Krabbenhoeft, INB, University of Luebeck
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.util.Arrays;
-import java.util.List;
-
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
-
-/**
- * ExternalToolActivityViewFactory produces an ExternalToolActivityContextualView to show
- * information for a use case activity.
- *
- * @author Hajo Nils Krabbenhoeft
- */
-public class ExternalToolActivityViewFactory implements ContextualViewFactory<ExternalToolActivity> {
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private ActivityIconManager activityIconManager;
-	private ColourManager colourManager;
-
-	public boolean canHandle(Object object) {
-		if (object instanceof ExternalToolActivity) {
-			return true;
-		}
-		return false;
-	}
-
-	public List<ContextualView> getViews(ExternalToolActivity selection) {
-		return Arrays.asList(new ContextualView[] { new ExternalToolActivityContextualView(
-				selection, editManager, fileManager, colourManager, activityIconManager) });
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setColourManager(ColourManager colourManager) {
-		this.colourManager = colourManager;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolConfigView.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolConfigView.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolConfigView.java
deleted file mode 100644
index 4723a78..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolConfigView.java
+++ /dev/null
@@ -1,868 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.Map.Entry;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.help.CSH;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JEditorPane;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JTabbedPane;
-import javax.swing.JTextArea;
-import javax.swing.JTextField;
-import javax.swing.JTextPane;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
-
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityHealthChecker;
-import net.sf.taverna.t2.activities.externaltool.utils.Tools;
-import net.sf.taverna.t2.lang.ui.KeywordDocument;
-import net.sf.taverna.t2.lang.ui.LinePainter;
-import net.sf.taverna.t2.lang.ui.NoWrapEditorKit;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationPanel;
-
-import org.apache.log4j.Logger;
-
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInputStatic;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInputUser;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptOutput;
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-
-/**
- * Provides the configurable view for a {@link ExternalToolActivity} through
- * it's {@link ExternalToolActivityConfigurationBean}. Has 3 main tabs - Script,
- * Ports & Dependencies. The {@link #inputViewList} contains the
- * {@link ExternalToolInputViewer}s describing the input ports and
- * {@link #outputViewList} has the {@link ExternalToolFileViewer}s
- * 
- * @author Ian Dunlop
- * @author Alex Nenadic
- * @author Alan R Williams
- * 
- */
-@SuppressWarnings("serial")
-public class ExternalToolConfigView
-		extends
-		ActivityConfigurationPanel<ExternalToolActivity, ExternalToolActivityConfigurationBean> {
-	
-	private static final Color LINE_COLOR = new Color(225,225,225);
-
-	private static final String FILE_INPUT_DESCRIPTION = "You can use a file input to feed data into " +
-			"the service via an input port and have that data written to the specified file.";
-
-	private static final String FILE_OUTPUT_DESCRIPTION = "You can use a file output to take the " +
-			"content of a file produced by the tool and send it to an output port of the service.";
-
-	private static final String FILE_LIST_DESCRIPTION = "If you feed a list of data into a file list " +
-			"input, then each data item is written to a temporary file. A file is produced containing " +
-			"the names of those temporary file. That index file can then be used as part of the tool " +
-			"command.";
-
-	private static final String VALID_NAME_REGEX = "[\\p{L}\\p{Digit}_]+";
-
-	private static Logger logger = Logger
-			.getLogger(ExternalToolConfigView.class);
-
-	/** The activity which this view describes */
-	protected ExternalToolActivity activity;
-
-	/** The configuration bean used to configure the activity */
-	private ExternalToolActivityConfigurationBean configuration;
-
-	private JTabbedPane tabbedPane = null;
-	private JPanel advancedPanel = null;
-	private JTabbedPane advancedTab = null;
-	private AnnotationPanel annotationPanel = null;
-	
-	private int stringReplacementGridy = 1;
-	private List<ExternalToolStringReplacementViewer> stringReplacementViewList = new ArrayList<ExternalToolStringReplacementViewer>();
-
-	private List<ExternalToolFileViewer> inputFileViewList = new ArrayList<ExternalToolFileViewer>();
-
-	private List<ExternalToolFileViewer> fileListViewList = new ArrayList<ExternalToolFileViewer>();
-
-	private int inputGridy = 1;
-
-	private int outputGridy = 1;
-	private List<ExternalToolFileViewer> outputViewList = new ArrayList<ExternalToolFileViewer>();
-
-	private int staticGridy = 1;
-	private List<ExternalToolStaticUrlViewer> staticUrlViewList = new ArrayList<ExternalToolStaticUrlViewer>();
-
-	private List<ExternalToolStaticStringViewer> staticStringViewList = new ArrayList<ExternalToolStaticStringViewer>();
-
-/*	private List<ExternalToolRuntimeEnvironmentViewer> runtimeEnvironmentViewList = new ArrayList<ExternalToolRuntimeEnvironmentViewer>();
-*/
-
-	private JTextField nameField = new JTextField(20);
-	private JTextField groupField = new JTextField(20);
-	private JTextArea descriptionArea = new JTextArea(6, 40);
-
-	private JEditorPane scriptTextArea;
-
-	private InvocationPanel invocationPanel;
-
-	private JCheckBox stdInCheckBox = new JCheckBox("Show STDIN");
-	private JCheckBox stdOutCheckBox = new JCheckBox("Show STDOUT");
-	private JCheckBox stdErrCheckBox = new JCheckBox("Show STDERR");
-	
-	private JTextField returnCodesField = new JTextField(20);
-
-	/**
-	 * Stores the {@link ExternalToolActivity}, gets its
-	 * {@link ExternalToolActivityConfigurationBean}, sets the layout and calls
-	 * {@link #initialise()} to get the view going
-	 * 
-	 * @param activity
-	 *            the {@link ExternalToolActivity} that the view is over
-	 */
-	public ExternalToolConfigView(ExternalToolActivity activity) {
-		this.activity = activity;
-		ExternalToolActivityHealthChecker.updateLocation(activity.getConfiguration());
-		configuration = (ExternalToolActivityConfigurationBean) cloneBean(activity
-				.getConfiguration());
-		setLayout(new GridBagLayout());
-		initialise(configuration);
-	}
-
-	public void noteConfiguration() {
-		configuration = makeConfiguration();
-	}
-
-	public ExternalToolActivityConfigurationBean makeConfiguration() {
-		ExternalToolActivityConfigurationBean newConfiguration = (ExternalToolActivityConfigurationBean) cloneBean(configuration);
-		ExternalToolActivityHealthChecker.updateLocation(newConfiguration);
-		
-
-		if (!isFromRepository()) {
-			UseCaseDescription ucd = newConfiguration.getUseCaseDescription();
-
-			ucd.setUsecaseid(nameField.getText());
-			if (groupField.getText().isEmpty()) {
-				ucd.setGroup(null);
-			} else {
-				ucd.setGroup(groupField.getText());
-			}
-			ucd.setDescription(descriptionArea.getText());
-			ucd.setCommand(scriptTextArea.getText());
-			ucd.setReturnCodesAsText(returnCodesField.getText());
-			ucd.setIncludeStdIn(stdInCheckBox.isSelected());
-			ucd.setIncludeStdOut(stdOutCheckBox.isSelected());
-			ucd.setIncludeStdErr(stdErrCheckBox.isSelected());
-
-			ucd.getInputs().clear();
-			ucd.getTags().clear();
-			synchronized (fileListViewList) {
-				for (ExternalToolFileViewer viewer : fileListViewList) {
-					ScriptInputUser si = new ScriptInputUser();
-					si.setBinary(viewer.isBinary());
-					si.setList(true);
-					si.setTag(viewer.getValue());
-					si.setTempFile(false);
-					si.setFile(true);
-					ucd.getInputs().put(viewer.getName(), si);
-				}
-			}
-
-			synchronized (stringReplacementViewList) {
-				for (ExternalToolStringReplacementViewer viewer : stringReplacementViewList) {
-					ScriptInputUser si = new ScriptInputUser();
-					si.setBinary(false);
-					si.setList(false);
-					si.setTag(viewer.getValue());
-					si.setTempFile(false);
-					si.setFile(false);
-					ucd.getTags().add(si.getTag());
-					ucd.getInputs().put(viewer.getName(), si);
-				}
-			}
-
-			synchronized (inputFileViewList) {
-				for (ExternalToolFileViewer viewer : inputFileViewList) {
-					ScriptInputUser si = new ScriptInputUser();
-					si.setBinary(viewer.isBinary());
-					si.setList(false);
-					si.setTag(viewer.getValue());
-					si.setTempFile(false);
-					si.setFile(true);
-					ucd.getInputs().put(viewer.getName(), si);
-				}
-			}
-
-			synchronized (outputViewList) {
-				ucd.getOutputs().clear();
-				for (ExternalToolFileViewer viewer : outputViewList) {
-					ScriptOutput so = new ScriptOutput();
-					so.setBinary(viewer.isBinary());
-					so.setPath(viewer.getValue());
-					ucd.getOutputs().put(viewer.getName(), so);
-				}
-			}
-			ucd.getStatic_inputs().clear();
-			synchronized (staticStringViewList) {
-				for (ExternalToolStaticStringViewer viewer : staticStringViewList) {
-					ScriptInputStatic sis = new ScriptInputStatic();
-					sis.setContent(viewer.getContent());
-					sis.setTag(viewer.getValue());
-					sis.setTempFile(false);
-					sis.setFile(true);
-					ucd.getStatic_inputs().add(sis);
-				}
-			}
-			synchronized (staticUrlViewList) {
-				for (ExternalToolStaticUrlViewer viewer : staticUrlViewList) {
-					ScriptInputStatic sis = new ScriptInputStatic();
-					sis.setUrl(viewer.getContent());
-					sis.setTag(viewer.getValue());
-					sis.setTempFile(false);
-					sis.setFile(true);
-					ucd.getStatic_inputs().add(sis);
-				}
-			}
-
-/*			synchronized (runtimeEnvironmentViewList) {
-				ucd.getREs().clear();
-				for (ExternalToolRuntimeEnvironmentViewer viewer : runtimeEnvironmentViewList) {
-					RuntimeEnvironmentConstraint newConstraint = new RuntimeEnvironmentConstraint(
-							viewer.getId(), viewer.getRelation());
-					ucd.getREs().add(newConstraint);
-				}
-			}*/
-		}
-		invocationPanel.fillInConfiguration(newConfiguration);
-
-		return newConfiguration;
-	}
-
-	public boolean isConfigurationChanged() {
-		String configurationString = convertBeanToString(activity
-				.getConfiguration());
-		return (!convertBeanToString(makeConfiguration()).equals(
-				configurationString));
-	}
-
-	/**
-	 * Adds a {@link JButton} which handles the reconfiguring of the
-	 * {@link ExternalToolActivity} through the altered
-	 * {@link ExternalToolActivityConfigurationBean}. Sets up the initial tabs -
-	 * Script (also sets the initial value), Ports & Dependencies and their
-	 * initial values through {@link #setDependencies()},
-	 * {@link #getPortPanel()}
-	 */
-	private void initialise(ExternalToolActivityConfigurationBean configuration) {
-		CSH.setHelpIDString(
-				this,
-				"net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ExternalToolConfigView");
-		this.configuration = configuration;
-		setBorder(javax.swing.BorderFactory.createTitledBorder(null, null,
-				javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
-				javax.swing.border.TitledBorder.DEFAULT_POSITION,
-				new java.awt.Font("Lucida Grande", 1, 12)));
-
-		tabbedPane = new JTabbedPane();
-		
-		if (invocationPanel != null) {
-			invocationPanel.stopObserving();
-		}
-
-		if (!isFromRepository()) {
-			UseCaseDescription useCaseDescription = configuration
-					.getUseCaseDescription();
-
-			nameField.setText(useCaseDescription.getUsecaseid());
-			if (useCaseDescription.getGroup() != null) {
-				groupField.setText(useCaseDescription.getGroup());
-			}
-			descriptionArea.setText(useCaseDescription.getDescription());
-			stringReplacementViewList = new ArrayList<ExternalToolStringReplacementViewer>();
-			inputFileViewList = new ArrayList<ExternalToolFileViewer>();
-			fileListViewList = new ArrayList<ExternalToolFileViewer>();
-			outputViewList = new ArrayList<ExternalToolFileViewer>();
-			staticUrlViewList = new ArrayList<ExternalToolStaticUrlViewer>();
-			staticStringViewList = new ArrayList<ExternalToolStaticStringViewer>();
-/*			runtimeEnvironmentViewList = new ArrayList<ExternalToolRuntimeEnvironmentViewer>();*/
-
-			for (Entry<String, ScriptInput> entry : useCaseDescription
-					.getInputs().entrySet()) {
-				String name = entry.getKey();
-				ScriptInputUser si = (ScriptInputUser) entry.getValue();
-				if (Tools.isStringReplacement(si)) {
-					final ExternalToolStringReplacementViewer inputView = new ExternalToolStringReplacementViewer(
-							name, si);
-					stringReplacementViewList.add(inputView);
-				}
-
-			}
-			Collections.sort(stringReplacementViewList,
-					new Comparator<ExternalToolStringReplacementViewer>() {
-
-						@Override
-						public int compare(
-								ExternalToolStringReplacementViewer o1,
-								ExternalToolStringReplacementViewer o2) {
-							return o1.getName().compareTo(o2.getName());
-						}
-					});
-
-			for (Entry<String, ScriptInput> entry : useCaseDescription
-					.getInputs().entrySet()) {
-				String name = entry.getKey();
-				ScriptInputUser si = (ScriptInputUser) entry.getValue();
-				if (Tools.isInputFile(si)) {
-					final ExternalToolFileViewer inputView = new ExternalToolFileViewer(
-							name, si.getTag(), si.isBinary());
-					inputFileViewList.add(inputView);
-				}
-
-			}
-			Collections.sort(inputFileViewList,
-					new Comparator<ExternalToolFileViewer>() {
-
-						@Override
-						public int compare(ExternalToolFileViewer o1,
-								ExternalToolFileViewer o2) {
-							return o1.getName().compareTo(o2.getName());
-						}
-					});
-
-			for (Entry<String, ScriptInput> entry : useCaseDescription
-					.getInputs().entrySet()) {
-				String name = entry.getKey();
-				ScriptInputUser si = (ScriptInputUser) entry.getValue();
-				if (Tools.isFileList(si)) {
-					final ExternalToolFileViewer inputView = new ExternalToolFileViewer(
-							name, si.getTag(), si.isBinary());
-					fileListViewList.add(inputView);
-				}
-
-			}
-			Collections.sort(fileListViewList,
-					new Comparator<ExternalToolFileViewer>() {
-
-						@Override
-						public int compare(ExternalToolFileViewer o1,
-								ExternalToolFileViewer o2) {
-							return o1.getName().compareTo(o2.getName());
-						}
-					});
-
-			for (Entry<String, ScriptOutput> entry : useCaseDescription
-					.getOutputs().entrySet()) {
-				ScriptOutput so = entry.getValue();
-				final ExternalToolFileViewer outputView = new ExternalToolFileViewer(
-						entry.getKey(), so.getPath(), so.isBinary());
-				outputViewList.add(outputView);
-			}
-			Collections.sort(outputViewList,
-					new Comparator<ExternalToolFileViewer>() {
-
-						@Override
-						public int compare(ExternalToolFileViewer o1,
-								ExternalToolFileViewer o2) {
-							return o1.getName().compareTo(o2.getName());
-						}
-					});
-
-			for (ScriptInputStatic siss : useCaseDescription.getStatic_inputs()) {
-				if ((siss.getUrl() == null) && siss.isFile()) {
-					final ExternalToolStaticStringViewer staticView = new ExternalToolStaticStringViewer(
-							siss);
-					staticStringViewList.add(staticView);
-				}
-			}
-			Collections.sort(staticStringViewList,
-					new Comparator<ExternalToolStaticStringViewer>() {
-
-						@Override
-						public int compare(ExternalToolStaticStringViewer o1,
-								ExternalToolStaticStringViewer o2) {
-							return o1.getContent().compareTo(o2.getContent());
-						}
-					});
-
-			for (ScriptInputStatic sis : useCaseDescription.getStatic_inputs()) {
-				if ((sis.getUrl() != null) && sis.isFile()) {
-					final ExternalToolStaticUrlViewer staticView = new ExternalToolStaticUrlViewer(
-							sis);
-					staticUrlViewList.add(staticView);
-				}
-			}
-			Collections.sort(staticUrlViewList,
-					new Comparator<ExternalToolStaticUrlViewer>() {
-
-						@Override
-						public int compare(ExternalToolStaticUrlViewer o1,
-								ExternalToolStaticUrlViewer o2) {
-							return o1.getContent().compareTo(o2.getContent());
-						}
-					});
-
-/*			for (RuntimeEnvironmentConstraint rec : useCaseDescription.getREs()) {
-				final ExternalToolRuntimeEnvironmentViewer newView = new ExternalToolRuntimeEnvironmentViewer(
-						rec.getID(), rec.getRelation());
-				runtimeEnvironmentViewList.add(newView);
-			}
-			Collections.sort(runtimeEnvironmentViewList,
-					new Comparator<ExternalToolRuntimeEnvironmentViewer>() {
-
-						@Override
-						public int compare(
-								ExternalToolRuntimeEnvironmentViewer o1,
-								ExternalToolRuntimeEnvironmentViewer o2) {
-							return o1.getId().compareTo(o2.getId());
-						}
-					});*/
-
-			scriptTextArea = new JTextPane();
-			new LinePainter(scriptTextArea, LINE_COLOR);
-
-			final KeywordDocument doc = new KeywordDocument(
-					new HashSet<String>());
-			// NOTE: Due to T2-1145 - always set editor kit BEFORE setDocument
-			scriptTextArea.setEditorKit(new NoWrapEditorKit());
-			scriptTextArea.setFont(new Font("Monospaced", Font.PLAIN, 14));
-			scriptTextArea.setDocument(doc);
-			scriptTextArea.setText(useCaseDescription.getCommand());
-			scriptTextArea.setCaretPosition(0);
-			scriptTextArea.setPreferredSize(new Dimension(200, 100));
-
-			tabbedPane.addTab("Command", new ScriptPanel(this, scriptTextArea, stdInCheckBox, stdOutCheckBox, stdErrCheckBox, returnCodesField));
-			tabbedPane.addTab("String replacements",
-					new StringReplacementPanel(this, stringReplacementViewList));
-			tabbedPane.addTab(
-					"File inputs",
-					new FilePanel(this, inputFileViewList, "To file", "File type",
-							"in", FILE_INPUT_DESCRIPTION, "Add file input"));
-			tabbedPane.addTab(
-					"File outputs",
-					new FilePanel(this, outputViewList, "From file", "File type",
-							"out", FILE_OUTPUT_DESCRIPTION, "Add file output"));
-			advancedPanel = new JPanel();
-			advancedPanel.setLayout(new GridBagLayout());
-			GridBagConstraints advancedConstraint = new GridBagConstraints();
-			advancedConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
-			advancedConstraint.gridx = 0;
-			advancedConstraint.gridy = 0;
-
-			advancedConstraint.fill = GridBagConstraints.BOTH;
-			advancedConstraint.weighty = 0.1;
-			advancedConstraint.weightx = 0.1;
-			advancedTab = new JTabbedPane();
-			advancedTab.addTab("Strings", new StaticStringPanel(staticStringViewList));
-			advancedTab.addTab("URLs", new StaticUrlPanel(staticUrlViewList));
-			advancedTab.addTab(
-					"File lists",
-					new FilePanel(this, fileListViewList,
-							"To file containing list", "Individual file type",
-							"in", FILE_LIST_DESCRIPTION, "Add file list"));
-			annotationPanel = new AnnotationPanel(nameField, descriptionArea, groupField);
-			advancedTab.addTab("Annotation", annotationPanel);
-			final ToolXMLPanel toolXMLPanel = new ToolXMLPanel(configuration.getUseCaseDescription());
-			advancedTab.addTab("XML", toolXMLPanel);
-			advancedTab.addChangeListener(new ChangeListener() {
-
-				@Override
-				public void stateChanged(ChangeEvent e) {
-					if (advancedTab.getSelectedComponent() == toolXMLPanel) {
-						toolXMLPanel.regenerateTree(makeConfiguration().getUseCaseDescription());
-					}
-				}});
-			tabbedPane.addChangeListener(new ChangeListener() {
-
-				@Override
-				public void stateChanged(ChangeEvent e) {
-					if ((tabbedPane.getSelectedComponent() == advancedPanel) &&
-							(advancedTab.getSelectedComponent() == toolXMLPanel)) {
-						toolXMLPanel.regenerateTree(makeConfiguration().getUseCaseDescription());						
-					}
-				}
-				
-			});
-/*			advancedTab.addTab("Runtime environments",
-					createRuntimeEnvironmentPanel(runtimeEnvironmentViewList));*/
-			advancedPanel.add(advancedTab, advancedConstraint);
-			tabbedPane.addTab("Advanced", advancedPanel);
-		}
-		invocationPanel = new InvocationPanel(configuration);
-		
-		tabbedPane.addTab("Location", invocationPanel);
-		if (isFromRepository()) {
-			tabbedPane.addTab("Edit", new EditablePanel(this));
-		}
-		GridBagConstraints outerConstraint = new GridBagConstraints();
-		outerConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
-		outerConstraint.gridx = 0;
-		outerConstraint.gridy = 0;
-
-		outerConstraint.fill = GridBagConstraints.BOTH;
-		outerConstraint.weighty = 0.1;
-		outerConstraint.weightx = 0.1;
-		add(tabbedPane, outerConstraint);
-
-		setPreferredSize(new Dimension(700, 500));
-		this.validate();
-	}
-
-	public void whenOpened() {
-		if (scriptTextArea != null) {
-			scriptTextArea.requestFocus();
-		}
-	}
-
-	private boolean isFromRepository() {
-		return (!this.configuration.isEdited() && isOriginallyFromRepository());
-	}
-	
-	public boolean isOriginallyFromRepository() {
-		String repositoryUrl = this.configuration.getRepositoryUrl();
-		return ((repositoryUrl != null) && !repositoryUrl
-				.isEmpty());
-		
-	}
-
-
-	@Override
-	public ExternalToolActivityConfigurationBean getConfiguration() {
-		return configuration;
-	}
-
-	public void refreshConfiguration(
-			ExternalToolActivityConfigurationBean config) {
-		int visibleTab = -1;
-		int secondaryTab = -1;
-		if (tabbedPane != null) {
-			visibleTab = tabbedPane.getSelectedIndex();
-			if (tabbedPane.getSelectedComponent().equals(advancedTab)) {
-				secondaryTab = advancedTab.getSelectedIndex();
-			}
-		}
-		this.removeAll();
-		initialise(config);
-		if (visibleTab != -1) {
-			tabbedPane.setSelectedIndex(visibleTab);
-		}
-		if (secondaryTab != -1) {
-			advancedTab.setSelectedIndex(secondaryTab);
-		}
-	}
-	
-	public void showAnnotationPanel() {
-		tabbedPane.setSelectedComponent(advancedPanel);
-		advancedTab.setSelectedComponent(annotationPanel);
-	}
-
-	@Override
-	public void refreshConfiguration() {
-		refreshConfiguration(activity.getConfiguration());
-	}
-
-	static Pattern tagPattern = Pattern.compile("%%([^%]*)%%");
-
-	@Override
-	/**
-	 * Need to check that the script contains the string replacements and only them - done
-	 * 
-	 * Need to check the input port names are valid and unique - done
-	 * Need to check the output port names are valid and unique - done
-	 * 
-	 * Need to check the input files and static files are unique - done
-	 * Need to check the file names are valid
-	 * Need to check the URLs are valid
-	 * Need to check the replacement tags are unique - done
-	 */
-	public boolean checkValues() {
-		if (isFromRepository()) {
-			return true;
-		}
-		boolean result = true;
-		String text = "";
-		Set<String> stringReplacementPortNames = new HashSet<String>();
-		Set<String> stringReplacementTags = new HashSet<String>();
-		for (ExternalToolStringReplacementViewer v : stringReplacementViewList) {
-			String name = v.getName();
-			if (name.equalsIgnoreCase("stdin") || name.equalsIgnoreCase("stdout") || name.equalsIgnoreCase("stderr")) {
-				text += "A string replacement port has a reserved name \"" + name + "\"\n";
-				result = false;
-			}
-			else if (stringReplacementPortNames.contains(name)) {
-				text += "Two string replacement ports have the name \"" + name
-						+ "\"\n";
-				result = false;
-			} else if (!name.matches(VALID_NAME_REGEX)) {
-				text += "String replacement port name \"" + name
-						+ "\" is invalid\n";
-				result = false;
-			} else {
-				stringReplacementPortNames.add(name);
-			}
-
-			String tag = v.getValue();
-			if (stringReplacementTags.contains(tag)) {
-				text += "Two string replacement ports replace \"%%" + tag
-						+ "%%\"\n";
-				result = false;
-			} else if (!tag.matches(VALID_NAME_REGEX)) {
-				text += "String replacement tag \"%%" + tag
-						+ "%%\" is invalid\n";
-				result = false;
-			} else {
-				stringReplacementTags.add(tag);
-			}
-		}
-
-		Matcher m = tagPattern.matcher(scriptTextArea.getText());
-		Set<String> tags = new HashSet<String>();
-		while (m.find()) {
-			String tag = m.group(1);
-			if (tag != null) {
-				if (tag.isEmpty()) {
-					text += "The command contains an empty tag i.e. %%%%\n";
-					result = false;
-				} else {
-					if (!tag.matches(VALID_NAME_REGEX)) {
-						text += "The command contains an invalid tag \"%%"
-								+ tag + "\"%%\n";
-						result = false;
-					}
-					if (!stringReplacementTags.contains(tag)) {
-						text += "There is no string replacement for %%" + tag
-								+ "%%\n";
-						result = false;
-					} else {
-						tags.add(tag);
-					}
-				}
-			}
-		}
-
-		for (String tag : stringReplacementTags) {
-			if (!tags.contains(tag)) {
-				text += "String replacement for %%" + tag
-						+ "%% is not used in the command\n";
-				result = false;
-			}
-		}
-
-		Set<String> inputFilePortNames = new HashSet<String>();
-		Set<String> inputFileNames = new HashSet<String>();
-		for (ExternalToolFileViewer v : inputFileViewList) {
-			String name = v.getName();
-			if (name.equalsIgnoreCase("stdin") || name.equalsIgnoreCase("stdout") || name.equalsIgnoreCase("stderr")) {
-				text += "An input file port has a reserved name \"" + name + "\"\n";
-				result = false;
-			}
-			else if (stringReplacementPortNames.contains(name)) {
-				text += "A string replacement port and an input file port have the name \""
-						+ name + "\"\n";
-				result = false;
-			} else if (inputFilePortNames.contains(name)) {
-				text += "Two file input ports have the name \"" + name + "\"\n";
-				result = false;
-			} else if (!name.matches(VALID_NAME_REGEX)) {
-				text += "File input port name \"" + name + "\" is invalid\n";
-				result = false;
-			} else {
-				inputFilePortNames.add(name);
-			}
-
-			String fileName = v.getValue();
-			if (inputFileNames.contains(fileName)) {
-				text += "Two file inputs ports write to the same file \""
-						+ fileName + "\"\n";
-				result = false;
-			} else {
-				inputFileNames.add(fileName);
-			}
-		}
-
-		Set<String> fileListPortNames = new HashSet<String>();
-		Set<String> fileListFileNames = new HashSet<String>();
-		for (ExternalToolFileViewer v : fileListViewList) {
-			String name = v.getName();
-			if (name.equalsIgnoreCase("stdin") || name.equalsIgnoreCase("stdout") || name.equalsIgnoreCase("stderr")) {
-				text += "A file list port has a reserved name \"" + name + "\"\n";
-				result = false;
-			} else if (stringReplacementPortNames.contains(name)) {
-				text += "A string replacement port and a file list port have the name \""
-						+ name + "\"\n";
-				result = false;
-			} else if (inputFilePortNames.contains(name)) {
-				text += "A file input port and a file list port have the name \""
-						+ name + "\"\n";
-				result = false;
-			} else if (fileListPortNames.contains(name)) {
-				text += "Two file list ports have the name \"" + name + "\"\n";
-				result = false;
-			} else if (!name.matches(VALID_NAME_REGEX)) {
-				text += "File list port name \"" + name + "\" is invalid\n";
-				result = false;
-			} else {
-				fileListPortNames.add(name);
-			}
-
-			String fileName = v.getValue();
-			if (fileListFileNames.contains(fileName)) {
-				text += "Two file list ports write to the same file \""
-						+ fileName + "\"\n";
-				result = false;
-			} else if (inputFileNames.contains(fileName)) {
-				text += "A file input port and a file list port write to the same file \""
-						+ fileName + "\"\n";
-				result = false;
-			} else {
-				fileListFileNames.add(fileName);
-			}
-		}
-
-		Set<String> staticStringFileNames = new HashSet<String>();
-		for (ExternalToolStaticStringViewer v : staticStringViewList) {
-			String fileName = v.getValue();
-			if (staticStringFileNames.contains(fileName)) {
-				text += "Two static strings write to the same file \""
-						+ fileName + "\"\n";
-				result = false;
-			} else if (inputFileNames.contains(fileName)) {
-				text += "A file input port and a static string write to the same file \""
-						+ fileName + "\"\n";
-				result = false;
-			} else if (fileListFileNames.contains(fileName)) {
-				text += "A file list port and a static string write to the same file \""
-						+ fileName + "\"\n";
-				result = false;
-			} else {
-				staticStringFileNames.add(fileName);
-			}
-		}
-
-		Set<String> staticUrlFileNames = new HashSet<String>();
-		for (ExternalToolStaticUrlViewer v : staticUrlViewList) {
-			String fileName = v.getValue();
-			if (staticUrlFileNames.contains(fileName)) {
-				text += "Two static URLss write to the same file \"" + fileName
-						+ "\"\n";
-				result = false;
-			} else if (inputFileNames.contains(fileName)) {
-				text += "A file input port and a static URL write to the same file \""
-						+ fileName + "\"\n";
-				result = false;
-			} else if (fileListFileNames.contains(fileName)) {
-				text += "A file list port and a static URL write to the same file \""
-						+ fileName + "\"\n";
-				result = false;
-			} else if (staticStringFileNames.contains(fileName)) {
-				text += "A static string and a static URL write to the same file \""
-						+ fileName + "\"\n";
-				result = false;
-			} else {
-				staticUrlFileNames.add(fileName);
-			}
-		}
-		Set<String> outputPortNames = new HashSet<String>();
-		for (ExternalToolFileViewer v : outputViewList) {
-			String name = v.getName();
-			if (name.equalsIgnoreCase("stdin") || name.equalsIgnoreCase("stdout") || name.equalsIgnoreCase("stderr")) {
-				text += "An output port has a reserved name \"" + name + "\"\n";
-				result = false;
-			} else if (outputPortNames.contains(name)) {
-				text += "Two output file ports have the name \"" + name
-						+ "\"\n";
-				result = false;
-			} else if (!name.matches(VALID_NAME_REGEX)) {
-				text += "Output file port name \"" + name + "\" is invalid\n";
-				result = false;
-			} else {
-				outputPortNames.add(name);
-			}
-		}
-		if (!result) {
-			JOptionPane.showMessageDialog(this, text, "Problems",
-					JOptionPane.ERROR_MESSAGE);
-		}
-		return result;
-	}
-
-	/**
-	 * Check the proposed port name against the set of ports
-	 * 
-	 * @return
-	 */
-	public boolean portNameExists(String name) {
-		if (name.equalsIgnoreCase("stdin") || name.equalsIgnoreCase("stdout") || name.equalsIgnoreCase("stderr")) {
-			return true;
-		}
-		
-		for (ExternalToolFileViewer v : inputFileViewList) {
-			if (name.equals(v.getName())) {
-				return true;
-			}
-		}
-		for (ExternalToolFileViewer v : fileListViewList) {
-			if (name.equals(v.getName())) {
-				return true;
-			}
-		}
-		for (ExternalToolStringReplacementViewer v : stringReplacementViewList) {
-			if (name.equals(v.getName())) {
-				return true;
-			}
-		}
-		for (ExternalToolFileViewer v : outputViewList) {
-			if (name.equals(v.getName())) {
-				return true;
-			}
-		}
-		return false;
-	}
-
-
-	public void setEditable(boolean editable, ExternalToolActivityConfigurationBean config) {
-		ExternalToolActivityConfigurationBean newConfig = (ExternalToolActivityConfigurationBean) cloneBean(config);
-		ExternalToolActivityHealthChecker.updateLocation(newConfig);
-		newConfig.setEdited(editable);
-		refreshConfiguration(newConfig);		
-	}
-	
-	public void whenClosed() {
-		if (invocationPanel != null) {
-			invocationPanel.stopObserving();
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolFileViewer.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolFileViewer.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolFileViewer.java
deleted file mode 100644
index 11fb0c4..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolFileViewer.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.JCheckBox;
-import javax.swing.JComboBox;
-import javax.swing.JTextField;
-
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInputUser;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptOutput;
-
-/**
- * @author alanrw
- *
- */
-public class ExternalToolFileViewer {
-	
-	private JTextField nameField;
-	private String name;
-	private JTextField valueField;
-	private JCheckBox valueFromField;
-	private JComboBox typeSelector;
-
-	public ExternalToolFileViewer(String name, String value, boolean isBinary) {
-		this(name);
-		nameField.setText(name);
-		if (!value.equals(name)) {
-			valueFromField.setSelected(false);
-			valueField.setText(value);
-			valueField.setEnabled(true);
-		}
-		if (isBinary) {
-			typeSelector.setSelectedItem("Binary");
-		} else {
-			typeSelector.setSelectedItem("Text");
-		}
-	}
-
-	public ExternalToolFileViewer(final String name) {
-		this.name = name;
-		nameField = new JTextField(20);
-		valueField = new JTextField(20);
-		valueFromField = new JCheckBox(new AbstractAction() {
-
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				if (valueFromField.isSelected()) {
-					valueField.setText("");
-					valueField.setEnabled(false);
-				} else {
-					valueField.setText(getName());
-					valueField.setEnabled(true);
-				}
-			}});
-		valueFromField.setSelected(true);
-		valueField.setEnabled(false);
-		typeSelector = new JComboBox(new String[] {"Binary", "Text"});
-		nameField.setText(name);
-		typeSelector.setSelectedItem("Text");
-		
-	}
-
-	public JTextField getNameField() {
-		return nameField;
-	}
-
-	public JTextField getValueField() {
-		return valueField;
-	}
-
-	public JComboBox getTypeSelector() {
-		return typeSelector;
-	}
-
-	public String getName() {
-		return nameField.getText();
-	}
-
-	public boolean isBinary() {
-		return (typeSelector.getSelectedItem().equals("Binary"));
-	}
-
-	public String getValue() {
-		if (valueFromField.isSelected()) {
-			return getName();
-		}
-		return valueField.getText();
-	}
-	
-	/**
-	 * @return the valueFromField
-	 */
-	public JCheckBox getValueFromField() {
-		return valueFromField;
-	}
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolRuntimeEnvironmentViewer.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolRuntimeEnvironmentViewer.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolRuntimeEnvironmentViewer.java
deleted file mode 100644
index 1451660..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolRuntimeEnvironmentViewer.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import javax.swing.JComboBox;
-import javax.swing.JTextField;
-
-import de.uni_luebeck.inb.knowarc.usecases.RuntimeEnvironmentConstraint;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInputUser;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptOutput;
-
-/**
- * @author alanrw
- *
- */
-public class ExternalToolRuntimeEnvironmentViewer {
-	
-	private JTextField idField;
-	private JComboBox relationSelector;
-
-	public ExternalToolRuntimeEnvironmentViewer(String id, String relation) {
-		this(id);
-		idField.setText(id);
-		relationSelector.setSelectedItem(relation);
-	}
-
-	public ExternalToolRuntimeEnvironmentViewer(String id) {
-		this();
-		idField.setText(id);	
-	}
-	
-	public ExternalToolRuntimeEnvironmentViewer() {
-		idField = new JTextField(20);
-		relationSelector = new JComboBox(RuntimeEnvironmentConstraint.getAcceptedRelations());
-		relationSelector.setSelectedItem(RuntimeEnvironmentConstraint.getDefaultRelation());			
-	}
-
-	public JTextField getIdField() {
-		return idField;
-	}
-
-	public JComboBox getRelationSelector() {
-		return relationSelector;
-	}
-
-	public String getId() {
-		return idField.getText();
-	}
-
-	public String getRelation() {
-		return (String) relationSelector.getSelectedItem();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticStringViewer.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticStringViewer.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticStringViewer.java
deleted file mode 100644
index d82d9b7..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticStringViewer.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import javax.swing.JTextArea;
-import javax.swing.JTextField;
-
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInputStatic;
-
-/**
- * @author alanrw
- *
- */
-public class ExternalToolStaticStringViewer {
-	
-	ScriptInputStatic input;
-	private JTextArea contentField = new JTextArea();
-	private JTextField valueField;
-
-
-	public ExternalToolStaticStringViewer(ScriptInputStatic input) {
-		this();
-		this.input = input;
-			contentField.setText((String) input.getContent());
-		valueField.setText(input.getTag());
-	}
-
-	public ExternalToolStaticStringViewer() {
-		contentField = new JTextArea(5, 40);
-		contentField.setText("");
-		valueField = new JTextField(20);
-		valueField.setText("");
-	}
-
-	public String getContent() {
-		return contentField.getText();
-	}
-
-	public JTextArea getContentField() {
-		return contentField;
-	}
-
-
-	public JTextField getValueField() {
-		return valueField;
-	}
-
-	public String getValue() {
-		return valueField.getText();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticUrlViewer.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticUrlViewer.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticUrlViewer.java
deleted file mode 100644
index f7a1793..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStaticUrlViewer.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import javax.swing.JComboBox;
-import javax.swing.JTextArea;
-import javax.swing.JTextField;
-
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInputStatic;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInputUser;
-
-/**
- * @author alanrw
- *
- */
-public class ExternalToolStaticUrlViewer {
-	
-	ScriptInputStatic input;
-	private JTextField contentField = new JTextField();
-	private JTextField valueField;
-
-
-	public ExternalToolStaticUrlViewer(ScriptInputStatic input) {
-		this();
-		this.input = input;
-		contentField.setText(input.getUrl());
-		valueField.setText(input.getTag());
-	}
-
-	public ExternalToolStaticUrlViewer() {
-		contentField = new JTextField(40);
-		contentField.setText("");
-		valueField = new JTextField(20);
-		valueField.setText("");
-	}
-
-	public String getContent() {
-		return contentField.getText();
-	}
-
-	public JTextField getContentField() {
-		return contentField;
-	}
-
-
-	public JTextField getValueField() {
-		return valueField;
-	}
-
-	public String getValue() {
-		return valueField.getText();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStringReplacementViewer.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStringReplacementViewer.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStringReplacementViewer.java
deleted file mode 100644
index 8e24183..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ExternalToolStringReplacementViewer.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.event.ActionEvent;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.swing.AbstractAction;
-import javax.swing.JCheckBox;
-import javax.swing.JComboBox;
-import javax.swing.JTextField;
-
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInputUser;
-
-/**
- * @author alanrw
- *
- */
-public class ExternalToolStringReplacementViewer {
-	
-	private static Pattern p = Pattern.compile("\\w+");
-	private static final String PERCENTS = "%%";
-	ScriptInput input;
-	private JTextField nameField;
-	private String name;
-	private JTextField valueField;
-	private JCheckBox valueFromField;
-
-	public ExternalToolStringReplacementViewer(String name, ScriptInputUser input) {
-		this(name);
-		this.input = input;
-		nameField.setText(name);
-		if (!input.getTag().equals(name)) {
-			valueFromField.setSelected(false);
-			valueField.setText(PERCENTS + input.getTag() + PERCENTS);
-			valueField.setEnabled(true);
-		}
-	}
-
-	public ExternalToolStringReplacementViewer(String name) {
-		this.name = name;
-		nameField = new JTextField(20);
-		nameField.setText(name);
-		valueField = new JTextField(20);
-		valueFromField = new JCheckBox(new AbstractAction() {
-
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				if (valueFromField.isSelected()) {
-					valueField.setText("");
-					valueField.setEnabled(false);
-				} else {
-					valueField.setText(PERCENTS + getName() + PERCENTS);
-					valueField.setEnabled(true);
-				}
-			}});
-		valueFromField.setSelected(true);
-		valueField.setEnabled(false);
-	}
-
-	public JTextField getNameField() {
-		return nameField;
-	}
-	
-	public JTextField getValueField() {
-		return valueField;
-	}
-
-	public String getName() {
-		return nameField.getText();
-	}
-
-	public String getValue() {
-		if (valueFromField.isSelected()) {
-			return getName();
-		}
-		String enteredValue = valueField.getText();
-
-		Matcher m = p.matcher(enteredValue);
-		String result = "";
-		if (m.find()) {
-			result = m.group();
-		}
-		return result;
-	}
-
-	/**
-	 * @return the valueFromField
-	 */
-	public JCheckBox getValueFromField() {
-		return valueFromField;
-	}
-
-}


[03/50] [abbrv] incubator-taverna-workbench-common-activities git commit: Using taverna-parent

Posted by st...@apache.org.
Using taverna-parent


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/d0f11e5f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/d0f11e5f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/d0f11e5f

Branch: refs/heads/master
Commit: d0f11e5f8d1dc4b919dce737f538ebd3c776f858
Parents: 3cdacaa
Author: Christian-B <br...@cs.man.ac.uk>
Authored: Wed Sep 24 08:57:13 2014 +0100
Committer: Christian-B <br...@cs.man.ac.uk>
Committed: Wed Sep 24 08:57:13 2014 +0100

----------------------------------------------------------------------
 pom.xml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d0f11e5f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 33774cb..be2d224 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,12 +2,13 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
-		<groupId>net.sf.taverna.t2</groupId>
-		<artifactId>ui-activities</artifactId>
-		<version>2.0-SNAPSHOT</version>
+		<groupId>net.sf.taverna</groupId>
+		<artifactId>taverna-parent</artifactId>
+		<version>3.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>net.sf.taverna.t2.ui-activities</groupId>
 	<artifactId>wsdl-activity-ui</artifactId>
+        <version>2.0-SNAPSHOT</version>
 	<packaging>bundle</packaging>
 	<name>Taverna 2 WSDL Activity UI</name>
 	<build>
@@ -65,6 +66,7 @@
 		<dependency>
 			<groupId>junit</groupId>
 			<artifactId>junit</artifactId>
+			<version>${junit.version}</version>
 			<scope>test</scope>
 		</dependency>
 	</dependencies>


[22/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-localworker-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker
deleted file mode 100644
index c82209f..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker
+++ /dev/null
@@ -1,45 +0,0 @@
-<activity  xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>if ((id == void) || (id == null) || id.equals("")) {
-	throw new RunTimeException("port id must have a non-empty value");
-}
-
-URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gbc&amp;db=protein&amp;retmode=xml&amp;id=" + id);
-
-BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
-StringWriter writer = new StringWriter();
-
-char[] buffer = new char[1024];
-    while (true) {
-        int r = reader.read(buffer);
-        if (r &lt;= 0) {
-            break;
-        }
-        writer.write(buffer, 0, r);
-    }
-reader.close();
-outputText = writer.toString();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>id</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>outputText</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker.json
deleted file mode 100644
index 6e36120..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gbc&db=protein&retmode=xml&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker",
-  "inputPorts" : [ {
-    "name" : "id",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputText",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker
deleted file mode 100644
index b6f9337..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker
+++ /dev/null
@@ -1,45 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>if ((id == void) || (id == null) || id.equals("")) {
-	throw new RunTimeException("port id must have a non-empty value");
-}
-
-URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&amp;db=protein&amp;retmode=xml&amp;id=" + id);
-
-BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
-StringWriter writer = new StringWriter();
-
-char[] buffer = new char[1024];
-    while (true) {
-        int r = reader.read(buffer);
-        if (r &lt;= 0) {
-            break;
-        }
-        writer.write(buffer, 0, r);
-    }
-reader.close();
-outputText = writer.toString();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>id</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>outputText</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker.json
deleted file mode 100644
index 471e000..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&db=protein&retmode=xml&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker",
-  "inputPorts" : [ {
-    "name" : "id",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputText",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker
deleted file mode 100644
index 71fef3c..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker
+++ /dev/null
@@ -1,68 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>if ((id == void) || (id == null) || id.equals("")) {
-	throw new RunTimeException("port id must have a non-empty value");
-}
-
-URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed" +
-"&amp;rettype=" + (((rettype == void ) || (rettype == null)) ? "full" : rettype) +
-"&amp;retmode=" + (((retmode == void) || (retmode == null)) ? "xml" : retmode) +
-"&amp;id=" + id);
-
-BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
-StringWriter writer = new StringWriter();
-
-char[] buffer = new char[1024];
-    while (true) {
-        int r = reader.read(buffer);
-        if (r &lt;= 0) {
-            break;
-        }
-        writer.write(buffer, 0, r);
-    }
-reader.close();
-outputText = writer.toString();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>id</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>rettype</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>retmode</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>outputText</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker.json
deleted file mode 100644
index 5e2a7df..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed\" +\n\"&rettype=\" + (((rettype == void ) || (rettype == null)) ? \"full\" : rettype) +\n\"&retmode=\" + (((retmode == void) || (retmode == null)) ? \"xml\" : retmode) +\n\"&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker",
-  "inputPorts" : [ {
-    "name" : "id",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "rettype",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "retmode",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputText",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker
deleted file mode 100644
index 37c440c..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker
+++ /dev/null
@@ -1,124 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>if ((term == void) || (term == null) || term.equals("")) {
-	throw new RunTimeException("port term must have a non-empty value");
-}
-
-URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed" +
-(field == void ? "" : ("&amp;field=" + field)) +
-(retstart == void ? "" : ("&amp;retstart=" + retstart)) +
-(retmax == void ? "" : ("&amp;retmax=" + retmax)) +
-(mindate == void ? "" : ("&amp;mindate=" + mindate)) +
-(maxdate == void ? "" : ("&amp;maxdate=" + maxdate)) +
-"&amp;rettype=" + (rettype == void ? "full" : rettype) +
-"&amp;retmode=" + (retmode == void ? "xml" : retmode) +
-"&amp;tool=taverna" +
-"&amp;term=" + term);
-
-BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
-StringWriter writer = new StringWriter();
-
-char[] buffer = new char[1024];
-    while (true) {
-        int r = reader.read(buffer);
-        if (r &lt;= 0) {
-            break;
-        }
-        writer.write(buffer, 0, r);
-    }
-reader.close();
-outputText = writer.toString();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>term</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>db</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>field</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>retstart</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>retmax</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>mindate</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>maxdate</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>rettype</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>outputText</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker.json
deleted file mode 100644
index bd29f82..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if ((term == void) || (term == null) || term.equals(\"\")) {\n\tthrow new RunTimeException(\"port term must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed\" +\n(field == void ? \"\" : (\"&field=\" + field)) +\n(retstart == void ? \"\" : (\"&retstart=\" + retstart)) +\n(retmax == void ? \"\" : (\"&retmax=\" + retmax)) +\n(mindate == void ? \"\" : (\"&mindate=\" + mindate)) +\n(maxdate == void ? \"\" : (\"&maxdate=\" + maxdate)) +\n\"&rettype=\" + (rettype == void ? \"full\" : rettype) +\n\"&retmode=\" + (retmode == void ? \"xml\" : retmode) +\n\"&tool=taverna\" +\n\"&term=\" + term);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n 
    }\nreader.close();\noutputText = writer.toString();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker",
-  "inputPorts" : [ {
-    "name" : "term",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "db",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "field",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "retstart",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "retmax",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "mindate",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "maxdate",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "rettype",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputText",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl b/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl
deleted file mode 100644
index a2317c5..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl
+++ /dev/null
@@ -1,31 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <name>url</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>text/plain</string>
-      </mimeTypes>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs />
-  <classLoaderSharing>workflow</classLoaderSharing>
-  <localDependencies />
-  <artifactDependencies />
-  <script>import java.awt.Desktop;
-import java.net.URI;
-
-if ((url == void) || (url == null)) {
-	throw new RuntimeException("Url must be specified");
-}
-
-URI uri = null;
-
-uri = new URI(url);
-
-Desktop.getDesktop().browse(uri);</script>
-  <dependencies />
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean><annotations /></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl.json
deleted file mode 100644
index 1a2155e..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import java.awt.Desktop;\nimport java.net.URI;\n\nif ((url == void) || (url == null)) {\n\tthrow new RuntimeException(\"Url must be specified\");\n}\n\nURI uri = null;\n\nuri = new URI(url);\n\nDesktop.getDesktop().browse(uri);",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.net.BrowseUrl",
-  "inputPorts" : [ {
-    "name" : "url",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader b/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader
deleted file mode 100644
index d3149d6..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader
+++ /dev/null
@@ -1,55 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <name>headers</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>text/plain</string>
-      </mimeTypes>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <name>header_key</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>text/plain</string>
-      </mimeTypes>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <name>header_value</name>
-      <depth>0</depth>
-      <mimeTypes />
-      <granularDepth>0</granularDepth>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-  <classLoaderSharing>workflow</classLoaderSharing>
-  <localDependencies />
-  <artifactDependencies />
-  <script>if ((headers == void) || (headers == null)) {
-	throw new RuntimeException("Headers must be specified");
-}
-
-if ((header_key == void) || (header_key == null)) {
-	throw new RuntimeException("Header_key must be specified");
-}
-
-String header_value = "";
-if (!header_key.endsWith(":")) {
-	header_key += ":";
-}
-for (String h : headers) {
-	if (h.startsWith(header_key)) {
-		header_value = h.substring(header_key.length());
-		header_value = header_value.trim();
-		break;
-	}
-}</script>
-  <dependencies />
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean><annotations /></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader.json
deleted file mode 100644
index 0e510fa..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if ((headers == void) || (headers == null)) {\n\tthrow new RuntimeException(\"Headers must be specified\");\n}\n\nif ((header_key == void) || (header_key == null)) {\n\tthrow new RuntimeException(\"Header_key must be specified\");\n}\n\nString header_value = \"\";\nif (!header_key.endsWith(\":\")) {\n\theader_key += \":\";\n}\nfor (String h : headers) {\n\tif (h.startsWith(header_key)) {\n\t\theader_value = h.substring(header_key.length());\n\t\theader_value = header_value.trim();\n\t\tbreak;\n\t}\n}",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.net.ExtractHeader",
-  "inputPorts" : [ {
-    "name" : "headers",
-    "depth" : 1,
-    "type" : "String"
-  }, {
-    "name" : "header_key",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "header_value",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker
deleted file mode 100644
index f094efa..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker
+++ /dev/null
@@ -1,41 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import javax.swing.JOptionPane;
-
-answer = JOptionPane.showInputDialog(null, (message == void ? null : message), (title == void ? null : title), JOptionPane.QUESTION_MESSAGE);
-
-
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>title</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>message</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>answer</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker.json
deleted file mode 100644
index c2095cc..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import javax.swing.JOptionPane;\n\nanswer = JOptionPane.showInputDialog(null, (message == void ? null : message), (title == void ? null : title), JOptionPane.QUESTION_MESSAGE);\n\n\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ui.AskWorker",
-  "inputPorts" : [ {
-    "name" : "title",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "message",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "answer",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker
deleted file mode 100644
index 5244d77..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker
+++ /dev/null
@@ -1,80 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import javax.swing.BoxLayout;
-import javax.swing.ButtonGroup;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-
-if ((selectionValues == void) || (selectionValues == null) || (selectionValues.isEmpty())) {
-    throw new RuntimeException("selectionValues must be specified and non-empty");
-}
-
-ButtonGroup group = new ButtonGroup();
-JPanel messagePanel = new JPanel();
-messagePanel.setLayout(new BoxLayout(messagePanel,BoxLayout.Y_AXIS));
-
-messagePanel.add(new JLabel((message == void ? null : message)));
-		
-JRadioButton[] buttonArray = new JRadioButton[selectionValues.size()];
-for (int i = 0; i &lt; buttonArray.length; i++) {			
-	buttonArray[i] = new JRadioButton(selectionValues.get(i));
-	if (i==0) buttonArray[i].setSelected(true);
-	group.add(buttonArray[i]);
-	messagePanel.add(buttonArray[i]);
-}				
-
-JOptionPane.showOptionDialog(null, messagePanel, (title == void ? null : title),
-		JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, new Object[]{"OK"}, null);
-		
-String answer="";
-for (JRadioButton button : buttonArray) {
-	if (button.isSelected()) {
-		answer=button.getText();
-	}
-}
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>title</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>message</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>selectionValues</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>answer</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker.json
deleted file mode 100644
index 0410fc7..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import javax.swing.BoxLayout;\nimport javax.swing.ButtonGroup;\nimport javax.swing.JLabel;\nimport javax.swing.JOptionPane;\nimport javax.swing.JPanel;\nimport javax.swing.JRadioButton;\n\nif ((selectionValues == void) || (selectionValues == null) || (selectionValues.isEmpty())) {\n    throw new RuntimeException(\"selectionValues must be specified and non-empty\");\n}\n\nButtonGroup group = new ButtonGroup();\nJPanel messagePanel = new JPanel();\nmessagePanel.setLayout(new BoxLayout(messagePanel,BoxLayout.Y_AXIS));\n\nmessagePanel.add(new JLabel((message == void ? null : message)));\n\t\t\nJRadioButton[] buttonArray = new JRadioButton[selectionValues.size()];\nfor (int i = 0; i < buttonArray.length; i++) {\t\t\t\n\tbuttonArray[i] = new JRadioButton(selectionValues.get(i));\n\tif (i==0) buttonArray[i].setSelected(true);\n\tgroup.add(buttonArray[i]);\n\tmessagePanel.add(buttonArray[i]);\n}\t\t\t\t\n\nJOptionPane.showOptionDialog(null, messagePanel, (title == void ? null 
 : title),\n\t\tJOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, new Object[]{\"OK\"}, null);\n\t\t\nString answer=\"\";\nfor (JRadioButton button : buttonArray) {\n\tif (button.isSelected()) {\n\t\tanswer=button.getText();\n\t}\n}\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ui.ChooseWorker",
-  "inputPorts" : [ {
-    "name" : "title",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "message",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "selectionValues",
-    "depth" : 1,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "answer",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker
deleted file mode 100644
index e594b7f..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker
+++ /dev/null
@@ -1,116 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import java.awt.CardLayout;
-import java.awt.Image;
-import java.awt.Toolkit;
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.swing.ImageIcon;
-import javax.swing.JEditorPane;
-import javax.swing.JFileChooser;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.filechooser.FileFilter;
-
-class FileExtFilter extends FileFilter {
-
-	public FileExtFilter(String ext, String label, boolean includeDir) {
-		this.ext = ext;
-		this.label = label;
-		this.includeDir = includeDir;
-	}
-
-	public String getDescription() {
-		return this.label;
-	}
-
-	public boolean accept(File file) {
-		if (file.isDirectory() &amp;&amp; includeDir) {
-			return true;
-		} else {
-			return file.getName().endsWith(this.ext);
-		}
-	}
-
-	String ext, label;
-
-	boolean includeDir;
-}
-
-if (title == void) {
-	title = null;
-}
-
-if ((fileExtensions == void) || (fileExtensions == null)) {
-	fileExtensions = "";
-}
-
-if ((fileExtLabels == void) || (fileExtLabels == null)) {
-	fileExtLabels = "";
-}
-
-JFileChooser chooser = new JFileChooser();
-chooser.setDialogTitle(title);
-
-String[] fileTypeList = fileExtensions.split(",");
-String[] filterLabelList = fileExtLabels.split(",");
-
-if (fileTypeList != null &amp;&amp; filterLabelList != null &amp;&amp; fileTypeList.length != filterLabelList.length) {
-	throw new RuntimeException("The list of extensions and file filter labels must be the same length");
-}
-
-// create the file filters
-for (int i = 0; i &lt; fileTypeList.length; i++) {
-	FileExtFilter filter = new FileExtFilter(fileTypeList[i], filterLabelList[i], true);
-	chooser.setFileFilter(filter);
-}
-
-chooser.showOpenDialog(null);
-File file = chooser.getSelectedFile();
-selectedFile = file.getAbsolutePath();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>title</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>fileExtensions</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>fileExtLabels</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>selectedFile</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker.json
deleted file mode 100644
index 1d71cef..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import java.awt.CardLayout;\nimport java.awt.Image;\nimport java.awt.Toolkit;\nimport java.io.File;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport javax.swing.ImageIcon;\nimport javax.swing.JEditorPane;\nimport javax.swing.JFileChooser;\nimport javax.swing.JLabel;\nimport javax.swing.JPanel;\nimport javax.swing.filechooser.FileFilter;\n\nclass FileExtFilter extends FileFilter {\n\n\tpublic FileExtFilter(String ext, String label, boolean includeDir) {\n\t\tthis.ext = ext;\n\t\tthis.label = label;\n\t\tthis.includeDir = includeDir;\n\t}\n\n\tpublic String getDescription() {\n\t\treturn this.label;\n\t}\n\n\tpublic boolean accept(File file) {\n\t\tif (file.isDirectory() && includeDir) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn file.getName().endsWith(this.ext);\n\t\t}\n\t}\n\n\tString ext, label;\n\n\tboolean includeDir;\n}\n\nif (title == void) {\n\ttitle = null;\n}\n\nif ((fileExtensions == void) || (fileExtensions == null)) {\n\tfileExtensions = \"\
 ";\n}\n\nif ((fileExtLabels == void) || (fileExtLabels == null)) {\n\tfileExtLabels = \"\";\n}\n\nJFileChooser chooser = new JFileChooser();\nchooser.setDialogTitle(title);\n\nString[] fileTypeList = fileExtensions.split(\",\");\nString[] filterLabelList = fileExtLabels.split(\",\");\n\nif (fileTypeList != null && filterLabelList != null && fileTypeList.length != filterLabelList.length) {\n\tthrow new RuntimeException(\"The list of extensions and file filter labels must be the same length\");\n}\n\n// create the file filters\nfor (int i = 0; i < fileTypeList.length; i++) {\n\tFileExtFilter filter = new FileExtFilter(fileTypeList[i], filterLabelList[i], true);\n\tchooser.setFileFilter(filter);\n}\n\nchooser.showOpenDialog(null);\nFile file = chooser.getSelectedFile();\nselectedFile = file.getAbsolutePath();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker",
-  "inputPorts" : [ {
-    "name" : "title",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "fileExtensions",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "fileExtLabels",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "selectedFile",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker
deleted file mode 100644
index 1745844..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker
+++ /dev/null
@@ -1,53 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import javax.swing.JOptionPane;
-
-if ((valueList == void) || (valueList == null) || (valueList.isEmpty())) {
-    throw new RuntimeException("valueList must be specified and non-empty");
-}
-
-answer = (String) JOptionPane.showInputDialog(null, (message == void ? null : message), (title == void ? null : title), JOptionPane.QUESTION_MESSAGE, null, valueList.toArray(), valueList.get(0));
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>valueList</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>message</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>title</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>answer</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker.json
deleted file mode 100644
index 6c287b6..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import javax.swing.JOptionPane;\n\nif ((valueList == void) || (valueList == null) || (valueList.isEmpty())) {\n    throw new RuntimeException(\"valueList must be specified and non-empty\");\n}\n\nanswer = (String) JOptionPane.showInputDialog(null, (message == void ? null : message), (title == void ? null : title), JOptionPane.QUESTION_MESSAGE, null, valueList.toArray(), valueList.get(0));\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ui.SelectWorker",
-  "inputPorts" : [ {
-    "name" : "valueList",
-    "depth" : 1,
-    "type" : "String"
-  }, {
-    "name" : "message",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "title",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "answer",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker
deleted file mode 100644
index 99ee6ab..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker
+++ /dev/null
@@ -1,42 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import javax.swing.JOptionPane;
-
-JOptionPane.showMessageDialog(null, (message == void ? null : message), (title == void ? null : title),	JOptionPane.INFORMATION_MESSAGE);
-
-answer = "answer";
-
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>title</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>message</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>answer</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker.json
deleted file mode 100644
index 8037a42..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import javax.swing.JOptionPane;\n\nJOptionPane.showMessageDialog(null, (message == void ? null : message), (title == void ? null : title),\tJOptionPane.INFORMATION_MESSAGE);\n\nanswer = \"answer\";\n\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ui.TellWorker",
-  "inputPorts" : [ {
-    "name" : "title",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "message",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "answer",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker
deleted file mode 100644
index b211ba5..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker
+++ /dev/null
@@ -1,42 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import javax.swing.JOptionPane;
-
-JOptionPane.showMessageDialog(null, (message == void ? null : message), (title == void ? null : title),	JOptionPane.WARNING_MESSAGE);
-
-answer = "answer";
-  
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>title</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>message</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>answer</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker.json
deleted file mode 100644
index eaa8c93..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import javax.swing.JOptionPane;\n\nJOptionPane.showMessageDialog(null, (message == void ? null : message), (title == void ? null : title),\tJOptionPane.WARNING_MESSAGE);\n\nanswer = \"answer\";\n  \n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ui.WarnWorker",
-  "inputPorts" : [ {
-    "name" : "title",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "message",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "answer",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker
deleted file mode 100644
index 0395225..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker
+++ /dev/null
@@ -1,75 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import org.dom4j.Document;
-import org.dom4j.Node;
-import org.dom4j.io.SAXReader;
-
-SAXReader reader = new SAXReader(false);
-reader.setIncludeInternalDTDDeclarations(false);
-reader.setIncludeExternalDTDDeclarations(false);
-
-Document document = reader.read(new StringReader(xmltext));
-List nodelist = document.selectNodes(xpath);
-
-// Process the elements in the nodelist
-ArrayList outputList = new ArrayList();
-ArrayList outputXmlList = new ArrayList();
-
-String val = null;
-String xmlVal = null;
-for (Iterator iter = nodelist.iterator(); iter.hasNext();) {
-	Node element = (Node) iter.next();
-	xmlVal = element.asXML();
-	val = element.getStringValue();
-	if (val != null &amp;&amp; !val.equals("")) {
-		outputList.add(val);
-		outputXmlList.add(xmlVal);
-	}
-
-}
-
-List nodelist=outputList;
-List nodelistAsXML=outputXmlList;</script>
-  <dependencies>
-    <string>dom4j:dom4j:1.6</string>
-  </dependencies>
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>xpath</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>xml-text</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/xml'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>nodelist</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>nodelistAsXML</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker.json
deleted file mode 100644
index 3fa2385..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import org.dom4j.Document;\nimport org.dom4j.Node;\nimport org.dom4j.io.SAXReader;\n\nSAXReader reader = new SAXReader(false);\nreader.setIncludeInternalDTDDeclarations(false);\nreader.setIncludeExternalDTDDeclarations(false);\n\nDocument document = reader.read(new StringReader(xmltext));\nList nodelist = document.selectNodes(xpath);\n\n// Process the elements in the nodelist\nArrayList outputList = new ArrayList();\nArrayList outputXmlList = new ArrayList();\n\nString val = null;\nString xmlVal = null;\nfor (Iterator iter = nodelist.iterator(); iter.hasNext();) {\n\tNode element = (Node) iter.next();\n\txmlVal = element.asXML();\n\tval = element.getStringValue();\n\tif (val != null && !val.equals(\"\")) {\n\t\toutputList.add(val);\n\t\toutputXmlList.add(xmlVal);\n\t}\n\n}\n\nList nodelist=outputList;\nList nodelistAsXML=outputXmlList;",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker",
-  "inputPorts" : [ {
-    "name" : "xpath",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "xml-text",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "nodelist",
-    "depth" : 1,
-    "granularDepth" : 1
-  }, {
-    "name" : "nodelistAsXML",
-    "depth" : 1,
-    "granularDepth" : 1
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker
deleted file mode 100644
index 1532b63..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker
+++ /dev/null
@@ -1,152 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputStr" to="outputStr" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.SourceLocator;
-import javax.xml.transform.Templates;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-BufferedReader getReader (String fileUrl) throws IOException {
-		InputStreamReader reader;
-		try {
-			reader = new FileReader(fileUrl);
-		}
-		catch (FileNotFoundException e) {
-			// try a real URL instead
-			URL url = new URL(fileUrl);
-			reader = new InputStreamReader (url.openStream());
-		}
-		return new BufferedReader(reader);
-	}
-	
-BufferedWriter getWriter (String fileUrl) throws IOException {
-		Writer writer;
-		try {
-			writer = new FileWriter(fileUrl);
-		}
-		catch (FileNotFoundException e) {
-			// try a real URL instead
-			URL url = new URL(fileUrl);
-			writer = new OutputStreamWriter (url.openConnection().getOutputStream());
-		}
-		return new BufferedWriter(writer);
-	}
-	
-String xslFilename = xslFileURL;
-String outFilename;
-if (outFileURL != void) {
-    outFilename = outFileURL;
-}
-
-String ext;
-if (outputExt != void) {
-    ext = outputExt;
-}
-
-if (((outFilename == null) || outFilename.equals("")) &amp;&amp; (ext != null)) {
-		outFilename = inFileURL.substring(0, inFileURL.indexOf(".")+1) + ext;
-}
-
-// Create transformer factory
-TransformerFactory factory = TransformerFactory.newInstance();
-
-// Use the factory to create a template containing the xsl file
-Templates template = factory.newTemplates(new StreamSource(getReader(xslFilename)));
-
-// Use the template to create a transformer
-Transformer xformer = template.newTransformer();
-
-// Prepare the input and output files
-Reader sourceReader = getReader(inFileURL);
-Source source = new StreamSource(sourceReader);
-StringWriter resultStr = new StringWriter();
-Result result = new StreamResult(resultStr);
-
-// Apply the xsl file to the source file and write the result to the
-// output file
-xformer.transform(source, result);
-
-outputStr = resultStr.toString();
-
-if ((outFilename != null) &amp;&amp; !outFilename.equals("")) {
-
-	BufferedWriter out = getWriter(outFilename);
-
-	out.write(outputStr);
-	out.close();
-}
-sourceReader.close();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>xslFileURL</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>outFileURL</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>inFileURL</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>outputExt</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>outputStr</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/xml'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker.json
deleted file mode 100644
index 09aff0d..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import java.io.BufferedReader;\nimport java.io.BufferedWriter;\nimport java.io.FileInputStream;\nimport java.io.FileNotFoundException;\nimport java.io.FileReader;\nimport java.io.FileWriter;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.OutputStreamWriter;\nimport java.io.StringWriter;\nimport java.io.Writer;\nimport java.net.URL;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport javax.xml.transform.Result;\nimport javax.xml.transform.Source;\nimport javax.xml.transform.SourceLocator;\nimport javax.xml.transform.Templates;\nimport javax.xml.transform.Transformer;\nimport javax.xml.transform.TransformerConfigurationException;\nimport javax.xml.transform.TransformerException;\nimport javax.xml.transform.TransformerFactory;\nimport javax.xml.transform.stream.StreamResult;\nimport javax.xml.transform.stream.StreamSource;\n\nBufferedReader getReader (String fileUrl) throws IOException {\n\t\tInputStreamReader reader;\n\t\ttry {\n\
 t\t\treader = new FileReader(fileUrl);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t// try a real URL instead\n\t\t\tURL url = new URL(fileUrl);\n\t\t\treader = new InputStreamReader (url.openStream());\n\t\t}\n\t\treturn new BufferedReader(reader);\n\t}\n\t\nBufferedWriter getWriter (String fileUrl) throws IOException {\n\t\tWriter writer;\n\t\ttry {\n\t\t\twriter = new FileWriter(fileUrl);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t// try a real URL instead\n\t\t\tURL url = new URL(fileUrl);\n\t\t\twriter = new OutputStreamWriter (url.openConnection().getOutputStream());\n\t\t}\n\t\treturn new BufferedWriter(writer);\n\t}\n\t\nString xslFilename = xslFileURL;\nString outFilename;\nif (outFileURL != void) {\n    outFilename = outFileURL;\n}\n\nString ext;\nif (outputExt != void) {\n    ext = outputExt;\n}\n\nif (((outFilename == null) || outFilename.equals(\"\")) && (ext != null)) {\n\t\toutFilename = inFileURL.substring(0, inFileURL.indexOf(\".\")+1) + ext;\n}\n\
 n// Create transformer factory\nTransformerFactory factory = TransformerFactory.newInstance();\n\n// Use the factory to create a template containing the xsl file\nTemplates template = factory.newTemplates(new StreamSource(getReader(xslFilename)));\n\n// Use the template to create a transformer\nTransformer xformer = template.newTransformer();\n\n// Prepare the input and output files\nReader sourceReader = getReader(inFileURL);\nSource source = new StreamSource(sourceReader);\nStringWriter resultStr = new StringWriter();\nResult result = new StreamResult(resultStr);\n\n// Apply the xsl file to the source file and write the result to the\n// output file\nxformer.transform(source, result);\n\noutputStr = resultStr.toString();\n\nif ((outFilename != null) && !outFilename.equals(\"\")) {\n\n\tBufferedWriter out = getWriter(outFilename);\n\n\tout.write(outputStr);\n\tout.close();\n}\nsourceReader.close();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.xml.XSLTWorker",
-  "inputPorts" : [ {
-    "name" : "xslFileURL",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "outFileURL",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "inFileURL",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "outputExt",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputStr",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters b/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters
deleted file mode 100644
index 768c8f9..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters
+++ /dev/null
@@ -1,100 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow">
-  <class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class>
-  <inputMap>
-    <map from="xsltString" to="xsltString" />
-    <map from="paramList" to="paramList" />
-    <map from="sourceString" to="sourceString" />
-  </inputMap>
-  <outputMap>
-    <map from="outputString" to="outputString" />
-  </outputMap>
-  <configBean encoding="xstream">
-    <net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <name>sourceString</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>text/plain</string>
-      </mimeTypes>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <name>xsltString</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>text/plain</string>
-      </mimeTypes>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <name>paramList</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>text/plain</string>
-      </mimeTypes>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <name>outputString</name>
-      <depth>0</depth>
-      <mimeTypes />
-      <granularDepth>0</granularDepth>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-  <classLoaderSharing>workflow</classLoaderSharing>
-  <localDependencies />
-  <artifactDependencies />
-  <script>//From a proposal by Mikolaj Rybinski
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-param(paramstr) {
-    nameAndValue = paramstr.split("=");
-    if (nameAndValue.length != 2) {
-        throw new RuntimeException("Wrong parameter format: \"" + paramstr + "\".");
-    }
-    name = nameAndValue[0].trim();
-    value = nameAndValue[1].trim();
-    return this;
-}
-
-if ((sourceString == void) || (sourceString == null)) {
-        throw new RuntimeException("sourceString must be specified");
-}
-
-if ((xsltString == void) || (xsltString == null)) {
-        throw new RuntimeException("xsltString must be specified");
-}
-
-Source inSource = new StreamSource(new StringReader(sourceString));
-Source xslSource = new StreamSource(new StringReader(xsltString));
-
-// the factory pattern supports different XSLT processors
-// e.g. set the "javax.xml.transform.TransformerFactory" system property
-TransformerFactory tnfFact = TransformerFactory.newInstance();
-Transformer tnf = tnfFact.newTransformer(xslSource);
-
-if (paramList != void) {
-  for (String paramstr : paramList) {
-    p = param(paramstr);
-    tnf.setParameter(p.name, p.value);
-  }
-}
-
-Writer outputWriter = new StringWriter();
-tnf.transform(inSource, new StreamResult(outputWriter));
-outputString = outputWriter.toString();</script>
-  <dependencies />
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean><annotations /></activity>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters.json
deleted file mode 100644
index 0800c76..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "//From a proposal by Mikolaj Rybinski\nimport javax.xml.transform.Source;\nimport javax.xml.transform.Transformer;\nimport javax.xml.transform.TransformerFactory;\nimport javax.xml.transform.stream.StreamResult;\nimport javax.xml.transform.stream.StreamSource;\n\nparam(paramstr) {\n    nameAndValue = paramstr.split(\"=\");\n    if (nameAndValue.length != 2) {\n        throw new RuntimeException(\"Wrong parameter format: \\\"\" + paramstr + \"\\\".\");\n    }\n    name = nameAndValue[0].trim();\n    value = nameAndValue[1].trim();\n    return this;\n}\n\nif ((sourceString == void) || (sourceString == null)) {\n        throw new RuntimeException(\"sourceString must be specified\");\n}\n\nif ((xsltString == void) || (xsltString == null)) {\n        throw new RuntimeException(\"xsltString must be specified\");\n}\n\nSource inSource = new StreamSource(new StringReader(sourceString));\nSource xslSource = new StreamSource(new StringReader(xsltString));\n\n// the factory patte
 rn supports different XSLT processors\n// e.g. set the \"javax.xml.transform.TransformerFactory\" system property\nTransformerFactory tnfFact = TransformerFactory.newInstance();\nTransformer tnf = tnfFact.newTransformer(xslSource);\n\nif (paramList != void) {\n  for (String paramstr : paramList) {\n    p = param(paramstr);\n    tnf.setParameter(p.name, p.value);\n  }\n}\n\nWriter outputWriter = new StringWriter();\ntnf.transform(inSource, new StreamResult(outputWriter));\noutputString = outputWriter.toString();",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters",
-  "inputPorts" : [ {
-    "name" : "sourceString",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "xsltString",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "paramList",
-    "depth" : 1,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputString",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString
deleted file mode 100644
index 35b50d0..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString
+++ /dev/null
@@ -1,44 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>if ((bytes == void) || (bytes == null)) {
-	throw new RuntimeException("The 'bytes' parameter must be specified");
-}
-if (encoding == void) {
-	string = new String(bytes);
-} else {
-	string = new String(bytes, encoding);
-}
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>[B</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>bytes</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'application/octet-stream'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>encoding</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>string</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString.json
deleted file mode 100644
index ae7f934..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if ((bytes == void) || (bytes == null)) {\n\tthrow new RuntimeException(\"The 'bytes' parameter must be specified\");\n}\nif (encoding == void) {\n\tstring = new String(bytes);\n} else {\n\tstring = new String(bytes, encoding);\n}\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.ByteArrayToString",
-  "inputPorts" : [ {
-    "name" : "bytes",
-    "depth" : 0,
-    "type" : "byte[]"
-  }, {
-    "name" : "encoding",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "string",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file


[29/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-xpath-activity-ui/

Posted by st...@apache.org.
taverna-xpath-activity-ui/


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/90ee9c45
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/90ee9c45
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/90ee9c45

Branch: refs/heads/master
Commit: 90ee9c45aa33c84450806ed1d51664bf81fa6a52
Parents: c58dcee
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:27:31 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:27:31 2015 +0000

----------------------------------------------------------------------
 .gitignore                                      |   24 -
 .travis.yml                                     |    1 -
 README.md                                       |    5 -
 pom.xml                                         |   68 -
 .../xpath/ui/config/TwoFieldQueryPanel.java     |  110 --
 .../config/XPathActivityConfigurationPanel.java | 1202 ------------------
 ...XPathActivityConfigurationPanelProvider.java |  158 ---
 .../ui/config/XPathActivityConfigureAction.java |   52 -
 .../ui/config/xmltree/TableCellListener.java    |  186 ---
 .../ui/config/xmltree/XPathActivityXMLTree.java |  572 ---------
 .../XPathActivityXMLTreeAttributeNode.java      |   50 -
 .../XPathActivityXMLTreeElementNode.java        |   62 -
 .../xmltree/XPathActivityXMLTreeNode.java       |   81 --
 .../XPathActivityXMLTreeSelectionHandler.java   |  251 ----
 .../ConfigureXPathActivityMenuAction.java       |   65 -
 .../XPathActivityMainContextViewFactory.java    |   59 -
 .../XPathActivityMainContextualView.java        |  209 ---
 .../xpath/ui/menu/AddXPathTemplateAction.java   |  110 --
 .../ui/menu/AddXPathTemplateMenuAction.java     |  117 --
 .../servicedescription/XPathActivityIcon.java   |   86 --
 .../XPathTemplateService.java                   |   57 -
 ...rvicedescriptions.ServiceDescriptionProvider |    1 -
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |    3 -
 ...a.t2.workbench.activityicons.ActivityIconSPI |    1 -
 ...ntextualviews.activity.ContextualViewFactory |    1 -
 .../spring/xpath-activity-ui-context-osgi.xml   |   28 -
 .../spring/xpath-activity-ui-context.xml        |   49 -
 .../xpath/ui/servicedescription/arrow_right.png |  Bin 596 -> 0 bytes
 .../famfamfam_silk/accept.png                   |  Bin 781 -> 0 bytes
 .../famfamfam_silk/exclamation.png              |  Bin 701 -> 0 bytes
 .../servicedescription/famfamfam_silk/help.png  |  Bin 786 -> 0 bytes
 .../famfamfam_silk/page_white_code.png          |  Bin 603 -> 0 bytes
 .../servicedescription/famfamfam_silk/tag.png   |  Bin 389 -> 0 bytes
 .../text_linespacing (collapse).png             |  Bin 371 -> 0 bytes
 .../famfamfam_silk/text_linespacing.png         |  Bin 363 -> 0 bytes
 .../xpath/ui/servicedescription/folds/fold.png  |  Bin 331 -> 0 bytes
 .../ui/servicedescription/folds/unfold.png      |  Bin 334 -> 0 bytes
 .../ui/servicedescription/xpath_attribute.png   |  Bin 1426 -> 0 bytes
 src/test/java/Dom4JTest.java                    |   71 --
 taverna-xpath-activity-ui/pom.xml               |   68 +
 .../xpath/ui/config/TwoFieldQueryPanel.java     |  110 ++
 .../config/XPathActivityConfigurationPanel.java | 1202 ++++++++++++++++++
 ...XPathActivityConfigurationPanelProvider.java |  158 +++
 .../ui/config/XPathActivityConfigureAction.java |   52 +
 .../ui/config/xmltree/TableCellListener.java    |  186 +++
 .../ui/config/xmltree/XPathActivityXMLTree.java |  572 +++++++++
 .../XPathActivityXMLTreeAttributeNode.java      |   50 +
 .../XPathActivityXMLTreeElementNode.java        |   62 +
 .../xmltree/XPathActivityXMLTreeNode.java       |   81 ++
 .../XPathActivityXMLTreeSelectionHandler.java   |  251 ++++
 .../ConfigureXPathActivityMenuAction.java       |   65 +
 .../XPathActivityMainContextViewFactory.java    |   59 +
 .../XPathActivityMainContextualView.java        |  209 +++
 .../xpath/ui/menu/AddXPathTemplateAction.java   |  110 ++
 .../ui/menu/AddXPathTemplateMenuAction.java     |  117 ++
 .../servicedescription/XPathActivityIcon.java   |   86 ++
 .../XPathTemplateService.java                   |   57 +
 ...rvicedescriptions.ServiceDescriptionProvider |    1 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |    3 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |    1 +
 ...ntextualviews.activity.ContextualViewFactory |    1 +
 .../spring/xpath-activity-ui-context-osgi.xml   |   28 +
 .../spring/xpath-activity-ui-context.xml        |   49 +
 .../xpath/ui/servicedescription/arrow_right.png |  Bin 0 -> 596 bytes
 .../famfamfam_silk/accept.png                   |  Bin 0 -> 781 bytes
 .../famfamfam_silk/exclamation.png              |  Bin 0 -> 701 bytes
 .../servicedescription/famfamfam_silk/help.png  |  Bin 0 -> 786 bytes
 .../famfamfam_silk/page_white_code.png          |  Bin 0 -> 603 bytes
 .../servicedescription/famfamfam_silk/tag.png   |  Bin 0 -> 389 bytes
 .../text_linespacing (collapse).png             |  Bin 0 -> 371 bytes
 .../famfamfam_silk/text_linespacing.png         |  Bin 0 -> 363 bytes
 .../xpath/ui/servicedescription/folds/fold.png  |  Bin 0 -> 331 bytes
 .../ui/servicedescription/folds/unfold.png      |  Bin 0 -> 334 bytes
 .../ui/servicedescription/xpath_attribute.png   |  Bin 0 -> 1426 bytes
 .../src/test/java/Dom4JTest.java                |   71 ++
 75 files changed, 3649 insertions(+), 3679 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index ebe0e5b..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# ignore project files #
-.classpath
-.project
-.settings/
-catalog-v001.xml
-
-# ignore target files #
-target/
-bin/
-build/
-dist/
-apidoc/
-*.swp
-
-# ignore svn files if there
-.svn
-
-# ignore log files #
-*.log
-/logs/*
-*/logs/*
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index dff5f3a..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1 +0,0 @@
-language: java

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
deleted file mode 100644
index 5be967a..0000000
--- a/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Taverna Workflow system XPath Activity: User Interface part for use in the Taverna Workbench.
-
-Extends https://github.com/taverna/taverna-xpath-activity
-
-This code was previously hosted at http://taverna.googlecode.com/svn/taverna/ui/net.sf.taverna.t2.ui-activities/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 53b81ee..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>net.sf.taverna</groupId>
-		<artifactId>taverna-parent</artifactId>
-		<version>3.0.1-SNAPSHOT</version>
-	</parent>
-	<groupId>net.sf.taverna.t2.ui-activities</groupId>
-	<artifactId>xpath-activity-ui</artifactId>
-	<version>2.0-SNAPSHOT</version>
-	<packaging>bundle</packaging>
-	<name>XPath Activity - UI bindings</name>
-	<dependencies>
-		<dependency>
-			<groupId>net.sf.taverna.t2.activities</groupId>
-			<artifactId>xpath-activity</artifactId>
-			<version>${t2.activities.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-icons-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>contextual-views-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>menu-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>report-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-components</groupId>
-			<artifactId>workflow-view</artifactId>
-			<version>${t2.ui.components.version}</version>
-		</dependency>
-	</dependencies>
-
-	<repositories>
-		<repository>
-			<releases />
-			<snapshots>
-				<enabled>false</enabled>
-			</snapshots>
-			<id>mygrid-repository</id>
-			<name>myGrid Repository</name>
-			<url>http://www.mygrid.org.uk/maven/repository
-			</url>
-		</repository>
-		<repository>
-			<releases>
-				<enabled>false</enabled>
-			</releases>
-			<snapshots />
-			<id>mygrid-snapshot-repository</id>
-			<name>myGrid Snapshot Repository</name>
-			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
-		</repository>
-	</repositories>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/TwoFieldQueryPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/TwoFieldQueryPanel.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/TwoFieldQueryPanel.java
deleted file mode 100644
index d0f131a..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/TwoFieldQueryPanel.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.config;
-
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-
-import javax.swing.BorderFactory;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-
-/**
- * Auxiliary class that creates a JPanel with two labels and two text fields.
- *
- * It can be used to be placed into a dialog made by JOptionPane to get two
- * input values, not just one.
- *
- * @author Sergejs Aleksejevs
- */
-public class TwoFieldQueryPanel extends JPanel {
-	private JTextField tfFirstValue;
-	private JTextField tfSecondValue;
-
-	public TwoFieldQueryPanel(String firstFieldName, String secondFieldName) {
-		this(null, firstFieldName, null, secondFieldName, null);
-	}
-
-	public TwoFieldQueryPanel(String message, String firstFieldName,
-			String secondFieldName) {
-		this(message, firstFieldName, null, secondFieldName, null);
-	}
-
-	public TwoFieldQueryPanel(String firstFieldName,
-			String firstFieldDefaultValue, String secondFieldName,
-			String secondFieldDefaultValue) {
-		this(null, firstFieldName, firstFieldDefaultValue, secondFieldName,
-				secondFieldDefaultValue);
-	}
-
-	public TwoFieldQueryPanel(String message, String firstFieldName,
-			String firstFieldDefaultValue, String secondFieldName,
-			String secondFieldDefaultValue) {
-		super();
-		this.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
-
-		this.setLayout(new GridBagLayout());
-		GridBagConstraints c = new GridBagConstraints();
-
-		c.gridx = 0;
-		c.gridy = 0;
-		c.weightx = 0;
-		c.fill = GridBagConstraints.HORIZONTAL;
-		c.anchor = GridBagConstraints.WEST;
-		c.insets = new Insets(3, 5, 3, 5);
-
-		if (message != null && message.length() > 0) {
-			c.gridwidth = 2;
-			c.insets = new Insets(5, 5, 15, 5);
-			this.add(new JLabel(message), c);
-
-			c.gridwidth = 1;
-			c.gridx = 0;
-			c.gridy++;
-			c.insets = new Insets(3, 5, 3, 5);
-		}
-
-		this.add(new JLabel(firstFieldName), c);
-
-		c.gridx++;
-		c.weightx = 1.0;
-		tfFirstValue = new JTextField(20);
-		if (firstFieldDefaultValue != null) {
-			tfFirstValue.setText(firstFieldDefaultValue);
-		}
-		tfFirstValue.selectAll();
-		tfFirstValue.requestFocusInWindow();
-		this.add(tfFirstValue, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		c.weightx = 0;
-		this.add(new JLabel(secondFieldName), c);
-
-		c.gridx++;
-		c.weightx = 1.0;
-		tfSecondValue = new JTextField(20);
-		if (secondFieldDefaultValue != null) {
-			tfSecondValue.setText(secondFieldDefaultValue);
-		}
-		tfSecondValue.selectAll();
-		this.add(tfSecondValue, c);
-	}
-
-	/**
-	 * @return Trimmed value from the first text field. Guaranteed to be
-	 *         non-null.
-	 */
-	public String getFirstValue() {
-		return (tfFirstValue.getText().trim());
-	}
-
-	/**
-	 * @return Trimmed value from the second text field. Guaranteed to be
-	 *         non-null.
-	 */
-	public String getSecondValue() {
-		return (tfSecondValue.getText().trim());
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanel.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanel.java
deleted file mode 100644
index 4342a4a..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanel.java
+++ /dev/null
@@ -1,1202 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.config;
-
-import java.awt.AWTEvent;
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Cursor;
-import java.awt.Dimension;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.GridLayout;
-import java.awt.Insets;
-import java.awt.Point;
-import java.awt.Toolkit;
-import java.awt.event.AWTEventListener;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.FocusEvent;
-import java.awt.event.FocusListener;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.geom.Area;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.prefs.Preferences;
-
-import javax.swing.AbstractAction;
-import javax.swing.BorderFactory;
-import javax.swing.BoxLayout;
-import javax.swing.JButton;
-import javax.swing.JCheckBoxMenuItem;
-import javax.swing.JFileChooser;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JSeparator;
-import javax.swing.JTabbedPane;
-import javax.swing.JTable;
-import javax.swing.JTextArea;
-import javax.swing.JTextField;
-import javax.swing.JToggleButton;
-import javax.swing.ListSelectionModel;
-import javax.swing.Popup;
-import javax.swing.PopupFactory;
-import javax.swing.SwingUtilities;
-import javax.swing.Timer;
-import javax.swing.event.CaretEvent;
-import javax.swing.event.CaretListener;
-import javax.swing.filechooser.FileFilter;
-import javax.swing.table.DefaultTableModel;
-
-import net.sf.taverna.t2.activities.xpath.XPathActivityConfigurationBean;
-import net.sf.taverna.t2.activities.xpath.ui.config.xmltree.TableCellListener;
-import net.sf.taverna.t2.activities.xpath.ui.config.xmltree.XPathActivityXMLTree;
-import net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathActivityIcon;
-import net.sf.taverna.t2.workbench.icons.WorkbenchIcons;
-
-import org.apache.log4j.Logger;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.DocumentHelper;
-import org.dom4j.InvalidXPathException;
-import org.dom4j.Node;
-import org.dom4j.XPath;
-import org.dom4j.XPathException;
-
-/**
- * @author Sergejs Aleksejevs
- */
-@SuppressWarnings("serial")
-public class XPathActivityConfigurationPanel extends JPanel {
-
-	private Logger logger = Logger.getLogger(XPathActivityConfigurationPanel.class);
-
-	// --- CONSTANTS ---
-	public static final int MAX_NUMBER_OF_MATCHING_NODES_TO_HIGHLIGHT_IN_THE_TREE = 100;
-
-	private static final Color INACTIVE_PANEL_BACKGROUND_COLOR = new Color(215,
-			215, 215);
-
-	private static final String EXAMPLE_XML_PROMPT = "Paste example XML here...";
-
-	private static final String XPATH_XML_DOCUMENT_DIR_PROPERTY="XPathXMLDocumentDir";
-
-	private XPathActivityConfigurationPanel thisPanel;
-
-	// --- COMPONENTS FOR ACTIVITY CONFIGURATION PANEL ---
-	private JPanel jpActivityConfiguration;
-
-	private JPanel jpLeft;
-	private JPanel jpRight;
-
-	private JToggleButton bShowXMLTreeSettings;
-	private Popup xmlTreeSettingsMenu;
-	private long xmlTreeSettingsMenuLastShownAt;
-	private JButton bGenerateXPathExpression;
-	private JPanel jpXMLTreeSettingsMenuContents;
-	private JCheckBoxMenuItem miIncludeAttributes;
-	private JCheckBoxMenuItem miIncludeValues;
-	private JCheckBoxMenuItem miIncludeNamespaces;
-
-	private JTextArea taSourceXML;
-	private JButton bLoadXMLDocument;
-	private JButton bParseXML;
-	private XPathActivityXMLTree xmlTree;
-	private JScrollPane spXMLTreePlaceholder;
-
-	// --- COMPONENTS FOR XPATH EDITING PANEL ---
-	private JLabel jlXPathExpressionStatus;
-	private JLabel jlXPathExpression;
-	private JTextField tfXPathExpression;
-	private Map<String, String> xpathNamespaceMap;
-	private JButton bRunXPath;
-
-	private JLabel jlShowHideNamespaceMappings;
-	private JTable jtXPathNamespaceMappings;
-	private JButton bAddMapping;
-	private JButton bRemoveMapping;
-	private JPanel jpNamespaceMappingsWithButton;
-
-	// --- COMPONENTS FOR XPATH TESTING PANEL ---
-	private JPanel jpXPathTesting;
-
-	private JTextField tfExecutedXPathExpression;
-	private JTextField tfMatchingElementCount;
-
-	private JTabbedPane tpExecutedXPathExpressionResults;
-	private JTextArea taExecutedXPathExpressionResultsAsText;
-	private JScrollPane spExecutedXPathExpressionResultsAsText;
-	private JTextArea taExecutedXPathExpressionResultsAsXML;
-	private JScrollPane spExecutedXPathExpressionResultsAsXML;
-
-	public XPathActivityConfigurationPanel() {
-		this.thisPanel = this;
-
-		this.setLayout(new GridBagLayout());
-		GridBagConstraints c = new GridBagConstraints();
-
-		c.gridx = 0;
-		c.gridy = 0;
-		c.fill = GridBagConstraints.BOTH;
-		c.weightx = 1.0;
-		c.weighty = 0.50;
-		c.insets = new Insets(0, 10, 10, 10);
-		this.jpActivityConfiguration = createActivityConfigurationPanel();
-		this.add(this.jpActivityConfiguration, c);
-
-		c.gridy++;
-		c.fill = GridBagConstraints.HORIZONTAL;
-		c.weighty = 0;
-		c.insets = new Insets(0, 10, 0, 10);
-		this.add(new JSeparator(), c);
-
-		// XPath expression editing panel
-		c.gridy++;
-		c.fill = GridBagConstraints.BOTH;
-		c.weighty = 0.05;
-		c.insets = new Insets(5, 10, 5, 10);
-		this.add(createXPathExpressionEditingPanel(), c);
-
-		c.gridy++;
-		;
-		c.fill = GridBagConstraints.HORIZONTAL;
-		c.weighty = 0;
-		c.insets = new Insets(0, 10, 0, 10);
-		this.add(new JSeparator(), c);
-
-		// XPath expression testing panel
-		c.gridy++;
-		c.fill = GridBagConstraints.BOTH;
-		c.weighty = 0.35;
-		c.insets = new Insets(5, 10, 0, 10);
-		this.jpXPathTesting = createXPathExpressionTestingPanel();
-		this.add(this.jpXPathTesting, c);
-	}
-
-	private JPanel createActivityConfigurationPanel() {
-		JPanel jpConfig = new JPanel(new GridBagLayout());
-		GridBagConstraints c = new GridBagConstraints();
-
-		// text area for example XML document
-		c.gridx = 0;
-		c.gridy = 0;
-		c.fill = GridBagConstraints.BOTH;
-		c.weightx = 0.5;
-		c.weighty = 1.0;
-		c.insets = new Insets(5, 0, 0, 5);
-		taSourceXML = new JTextArea(10, 30);
-		taSourceXML
-				.setToolTipText("<html>Use this text area to paste or load an example XML document.<br>"
-						+ "This document can then be parsed by clicking the button<br>"
-						+ "with a green arrow in order to see its tree structure.</html>");
-		taSourceXML.setText(EXAMPLE_XML_PROMPT);
-		taSourceXML.addFocusListener(new FocusListener() {
-			public void focusGained(FocusEvent e) {
-				taSourceXML.selectAll();
-			}
-
-			public void focusLost(FocusEvent e) { /* do nothing */
-			}
-		});
-		taSourceXML.addCaretListener(new CaretListener() {
-			public void caretUpdate(CaretEvent e) {
-				// make sure that it is only allowed to "parse example XML"
-				// when something is actually present in the text area
-				bParseXML.setEnabled(taSourceXML.getText().trim().length() > 0
-						&& !taSourceXML.getText().trim().equals(
-								EXAMPLE_XML_PROMPT));
-			}
-		});
-		jpLeft = new JPanel(new GridLayout(1, 1));
-		jpLeft.add(new JScrollPane(taSourceXML));
-		jpConfig.add(jpLeft, c);
-
-		// button to parse example XML document
-
-		c.gridx++;
-		c.fill = GridBagConstraints.NONE;
-		c.weightx = 0;
-		c.weighty = 0;
-		c.insets = new Insets(0, 0, 0, 0);
-		bParseXML = new JButton(
-				XPathActivityIcon
-						.getIconById(XPathActivityIcon.XPATH_ACTIVITY_CONFIGURATION_PARSE_XML_ICON));
-		bParseXML
-				.setToolTipText("Parse example XML document and generate its tree structure");
-		bParseXML.setEnabled(false);
-		bParseXML.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				parseXML();
-			}
-		});
-		jpConfig.add(bParseXML, c);
-
-		// placeholder for XML tree (will be replaced by a real tree when the
-		// parsing is done)
-
-		c.gridx++;
-		c.fill = GridBagConstraints.BOTH;
-		c.weightx = 0.5;
-		c.weighty = 1.0;
-		c.insets = new Insets(5, 5, 0, 0);
-		JTextArea taXMLTreePlaceholder = new JTextArea(10, 30);
-		taXMLTreePlaceholder
-				.setToolTipText("<html>This area will show tree structure of the example XML after you<br>"
-						+ "paste it into the space on the left-hand side and press 'Parse'<br>"
-						+ "button with the green arrow.</html>");
-		taXMLTreePlaceholder.setEditable(false);
-		taXMLTreePlaceholder.setBackground(INACTIVE_PANEL_BACKGROUND_COLOR);
-		spXMLTreePlaceholder = new JScrollPane(taXMLTreePlaceholder);
-		jpRight = new JPanel(new GridLayout(1, 1));
-		jpRight.add(spXMLTreePlaceholder);
-		jpConfig.add(jpRight, c);
-
-		// Button to load XML document from a file
-		
-		bLoadXMLDocument = new JButton("Load XML from file", WorkbenchIcons.openIcon);	
-		bLoadXMLDocument.addActionListener(new ActionListener() {
-			
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				JFileChooser fileChooser = new JFileChooser();
-				Preferences prefs = Preferences.userNodeForPackage(getClass());
-				String curDir = prefs.get(XPATH_XML_DOCUMENT_DIR_PROPERTY, System.getProperty("user.home"));
-				fileChooser.setDialogTitle("Select file to load XML from");
-				fileChooser.setFileFilter(new FileFilter() {  
-					public boolean accept(File f) {
-				        return f.isDirectory() || f.getName().toLowerCase().endsWith(".xml");
-				    }
-				    
-				    public String getDescription() {
-				        return ".xml files";
-				    }
-				});
-				fileChooser.setCurrentDirectory(new File(curDir));		
-				int returnVal = fileChooser.showOpenDialog(((JButton) e
-						.getSource()).getParent());
-				if (returnVal == JFileChooser.APPROVE_OPTION) {
-					prefs.put(XPATH_XML_DOCUMENT_DIR_PROPERTY, fileChooser
-							.getCurrentDirectory().toString());
-					File file = fileChooser.getSelectedFile();
-					// Read the contents of a file into a string
-					// and set the value of the XML document text area to it
-					FileInputStream fis = null;
-					try{
-						byte[] fileBytes = new byte[(int)file.length()];
-						fis = new FileInputStream(file);
-						fis.read(fileBytes);
-						String xmlDocument = new String(fileBytes, "UTF-8");
-						setSourceXML(xmlDocument);
-					}
-					catch(Exception ex){
-						logger.error("An error occured while trying to read the XML document from file " + file.getAbsolutePath(), ex);
-						JOptionPane.showMessageDialog(
-								((JButton) e.getSource()).getParent(), 
-								"There was an error while trying to read the file", 
-								"XPath Activity", 
-								JOptionPane.ERROR_MESSAGE);
-					}
-					finally{
-						try {
-							fis.close();
-						} catch (IOException e1) {
-							// Ignore
-						}
-					}
-
-				}
-			}
-		});
-		c.gridx = 0;
-		c.gridy++;
-		c.gridwidth = 1;
-		c.fill = GridBagConstraints.NONE;
-		c.weightx = 0;
-		c.weighty = 0;
-		c.insets = new Insets(5, 0, 0, 5);
-		c.anchor = GridBagConstraints.EAST;
-		jpConfig.add(bLoadXMLDocument, c);
-		
-		// settings for the view of XML tree from example XML document
-
-		miIncludeAttributes = new JCheckBoxMenuItem("Show XML node attributes");
-		miIncludeAttributes.setSelected(true);
-		miIncludeAttributes.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				refreshXMLTreeUI();
-			}
-		});
-
-		miIncludeValues = new JCheckBoxMenuItem(
-				"Show values of XML elements and attributes");
-		miIncludeValues.setSelected(true);
-		miIncludeValues.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				refreshXMLTreeUI();
-			}
-		});
-
-		miIncludeNamespaces = new JCheckBoxMenuItem(
-				"Show namespaces of XML elements");
-		miIncludeNamespaces.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				refreshXMLTreeUI();
-			}
-		});
-
-		jpXMLTreeSettingsMenuContents = new JPanel();
-		jpXMLTreeSettingsMenuContents.setBorder(BorderFactory
-				.createRaisedBevelBorder());
-		jpXMLTreeSettingsMenuContents.setLayout(new BoxLayout(
-				jpXMLTreeSettingsMenuContents, BoxLayout.Y_AXIS));
-		jpXMLTreeSettingsMenuContents.add(miIncludeAttributes);
-		jpXMLTreeSettingsMenuContents.add(miIncludeValues);
-		jpXMLTreeSettingsMenuContents.add(miIncludeNamespaces);
-
-		bShowXMLTreeSettings = new JToggleButton("Show XML tree settings...",
-				XPathActivityIcon.getIconById(XPathActivityIcon.UNFOLD_ICON));
-		bShowXMLTreeSettings.setSelectedIcon(XPathActivityIcon
-				.getIconById(XPathActivityIcon.FOLD_ICON));
-		bShowXMLTreeSettings.setEnabled(false);
-		bShowXMLTreeSettings.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				if (xmlTreeSettingsMenu == null) {
-					xmlTreeSettingsMenuLastShownAt = System.currentTimeMillis();
-
-					Point parentPosition = bShowXMLTreeSettings
-							.getLocationOnScreen();
-					xmlTreeSettingsMenu = PopupFactory.getSharedInstance()
-							.getPopup(
-									bShowXMLTreeSettings,
-									jpXMLTreeSettingsMenuContents,
-									parentPosition.x,
-									parentPosition.y
-											+ bShowXMLTreeSettings.getHeight());
-					xmlTreeSettingsMenu.show();
-				} else {
-					bShowXMLTreeSettings.setSelected(false);
-				}
-			}
-		});
-		
-		bGenerateXPathExpression = new JButton("Generate XPath expression",
-				XPathActivityIcon
-						.getIconById(XPathActivityIcon.XML_TREE_NODE_ICON));
-		bGenerateXPathExpression.addActionListener(new ActionListener() {
-			@Override
-			public void actionPerformed(ActionEvent e) {
-			     updateXPathEditingPanelValues();	
-			}	
-		});
-		
-		JPanel xmlTreeButtonPanel = new JPanel();
-		xmlTreeButtonPanel.add(bGenerateXPathExpression);
-		xmlTreeButtonPanel.add(bShowXMLTreeSettings);
-		
-		c.gridx = 2;
-		c.gridwidth = 1;
-		c.fill = GridBagConstraints.NONE;
-		c.weightx = 0;
-		c.weighty = 0;
-		c.insets = new Insets(5, 0, 0, 0);
-		c.anchor = GridBagConstraints.EAST;
-		jpConfig.add(xmlTreeButtonPanel, c);
-
-		// register a new listener for all AWT mouse events - this will be used
-		// to identify clicks outside of the XML tree popup menu and the toggle
-		// button used to show/hide it
-		Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
-			public void eventDispatched(AWTEvent event) {
-				if (event instanceof MouseEvent && xmlTreeSettingsMenu != null) {
-					MouseEvent e = (MouseEvent) event;
-					if (e.getClickCount() > 0
-							&& (e.getWhen() - xmlTreeSettingsMenuLastShownAt) > 100) {
-						// convert a point where mouse click was made from
-						// relative coordinates of the source component
-						// to the coordinates of the panel that represents the
-						// contents of the popup menu
-						Point clickRelativeToOverlay = SwingUtilities
-								.convertPoint((Component) e.getSource(), e
-										.getPoint(),
-										jpXMLTreeSettingsMenuContents);
-
-						Area areaOfPopupPanelAndToggleButton = new Area(
-								jpXMLTreeSettingsMenuContents.getBounds());
-
-						// only hide the popup menu if a click was made outside
-						// of the calculated area --
-						// plus not on one of the associated toggle buttons
-						if (!areaOfPopupPanelAndToggleButton
-								.contains(clickRelativeToOverlay)) {
-							xmlTreeSettingsMenu.hide();
-							bShowXMLTreeSettings.setSelected(false);
-
-							// if the popup menu was dismissed by a click on the
-							// toggle button that
-							// has made it visible, this timer makes sure that
-							// this click doesn't
-							// re-show the popup menu
-							new Timer(100, new ActionListener() {
-								public void actionPerformed(ActionEvent e) {
-									((Timer) e.getSource()).stop();
-									xmlTreeSettingsMenu = null;
-								}
-							}).start();
-
-						}
-					}
-				}
-			}
-		}, AWTEvent.MOUSE_EVENT_MASK);
-
-		return (jpConfig);
-	}
-
-	private JPanel createXPathExpressionEditingPanel() {
-		this.jlXPathExpressionStatus = new JLabel();
-
-		this.jlXPathExpression = new JLabel("XPath expression");
-
-		this.bRunXPath = new JButton("Run XPath");
-		this.bRunXPath.setEnabled(false);
-		this.bRunXPath.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				runXPath(true);
-			}
-		});
-
-		this.tfXPathExpression = new JTextField(30);
-		this.tfXPathExpression.setPreferredSize(new Dimension(0, this.bRunXPath
-				.getPreferredSize().height));
-		this.tfXPathExpression.setMinimumSize(new Dimension(0, this.bRunXPath
-				.getPreferredSize().height));
-		this.tfXPathExpression.addCaretListener(new CaretListener() {
-			public void caretUpdate(CaretEvent e) {
-				validateXPathAndUpdateUI();
-			}
-		});
-		this.tfXPathExpression.addKeyListener(new KeyListener() {
-			public void keyPressed(KeyEvent e) {
-				if (e.getKeyCode() == KeyEvent.VK_ENTER) {
-					if (bRunXPath.isEnabled()) {
-						// it is safe to check that ENTER key may execute the
-						// XPath expression if the
-						// "Run XPath" button is enabled, as expression
-						// validation is responsible for
-						// enabling / disabling the button as the expression
-						// changes
-						runXPath(true);
-					}
-				}
-			}
-
-			public void keyReleased(KeyEvent e) { /* not in use */
-			}
-
-			public void keyTyped(KeyEvent e) { /* not in use */
-			}
-		});
-
-		JPanel jpXPath = new JPanel(new GridBagLayout());
-		GridBagConstraints c = new GridBagConstraints();
-		c.fill = GridBagConstraints.HORIZONTAL;
-		c.weighty = 0;
-
-		c.gridx = 0;
-		c.gridy = 0;
-		c.weightx = 0;
-		jpXPath.add(jlXPathExpressionStatus);
-
-		c.gridx++;
-		c.weightx = 0.0;
-		c.insets = new Insets(0, 10, 0, 0);
-		jpXPath.add(jlXPathExpression, c);
-		
-		c.gridx++;
-		c.weightx = 1.0;
-		c.insets = new Insets(0, 10, 0, 10);
-		jpXPath.add(tfXPathExpression, c);
-
-		c.gridx++;
-		c.weightx = 0;
-		c.insets = new Insets(0, 0, 0, 0);
-		jpXPath.add(bRunXPath, c);
-
-		c.gridx = 2;
-		c.gridy++;
-		c.weightx = 1.0;
-		c.weighty = 0;
-		c.gridwidth = 2;
-		c.fill = GridBagConstraints.NONE;
-		c.anchor = GridBagConstraints.WEST;
-		c.insets = new Insets(0, 10, 0, 10);
-		jlShowHideNamespaceMappings = new JLabel("Show namespace mappings...");
-		jlShowHideNamespaceMappings.setForeground(Color.BLUE);
-		jlShowHideNamespaceMappings.setCursor(new Cursor(Cursor.HAND_CURSOR));
-		jlShowHideNamespaceMappings.addMouseListener(new MouseAdapter() {
-			public void mouseClicked(MouseEvent e) {
-				jpNamespaceMappingsWithButton
-						.setVisible(!jpNamespaceMappingsWithButton.isVisible());
-				jlShowHideNamespaceMappings
-						.setText((jpNamespaceMappingsWithButton.isVisible() ? "Hide"
-								: "Show")
-								+ " namespace mappings...");
-				thisPanel.validate();
-			}
-		});
-		jpXPath.add(jlShowHideNamespaceMappings, c);
-
-		// namespace mapping table
-		DefaultTableModel tableModel = new DefaultTableModel();
-		tableModel.addColumn("Namespace Prefix");
-		tableModel.addColumn("Namespace URI");
-
-		jtXPathNamespaceMappings = new JTable();
-		jtXPathNamespaceMappings.setModel(tableModel);
-		// ((DefaultCellEditor)jtXPathNamespaceMappings.getDefaultEditor(String.class)).setClickCountToStart(1);
-		// // TODO - enable if one-click-to-start-editing behaviour is required
-		// TODO - next line is to be enabled when Taverna is migrated to Java
-		// 1.6; for now it's fine to run without this
-		// jtXPathNamespaceMappings.setFillsViewportHeight(true); // makes sure
-		// that when the dedicated area is larger than the table, the latter is
-		// stretched vertically to fill the empty space
-		jtXPathNamespaceMappings
-				.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); // only one row can be selected at a time
-		jtXPathNamespaceMappings
-				.setPreferredScrollableViewportSize(new Dimension(200, 50)); // NB! this prevents the table from occupying most of the space in the panel when screen is maximized
-		jtXPathNamespaceMappings.addKeyListener(new KeyAdapter() {
-			public void keyReleased(KeyEvent e) {
-				if (e.getKeyCode() == KeyEvent.VK_DELETE) {
-					removeNamespaceMapping();
-				}
-			}
-		});
-
-		TableCellListener cellListener = new TableCellListener(
-				jtXPathNamespaceMappings, new AbstractAction() {
-					public void actionPerformed(ActionEvent e) {
-						TableCellListener tcl = (TableCellListener) e
-								.getSource();
-
-						if (tcl.getColumn() == 0) {
-							// prefix was modified
-							String newPrefix = (String) tcl.getNewValue();
-							if (xpathNamespaceMap.containsKey(newPrefix)) {
-								// such prefix already exists - change won't be
-								// saved
-								JOptionPane
-										.showMessageDialog(
-												thisPanel,
-												"Cannot update namespace prefix: "
-														+ "updated value already exists",
-												"XPath Activity",
-												JOptionPane.WARNING_MESSAGE);
-							} else {
-								// update the map with the new prefix for the
-								// same URI value
-								String oldPrefix = (String) tcl.getOldValue();
-								xpathNamespaceMap.put(newPrefix,
-										xpathNamespaceMap.remove(oldPrefix));
-							}
-						} else {
-							// simple case - just the URI value has changed:
-							// just overwrite the value in the namespace map
-							String prefixOfUpdatedURI = (String) jtXPathNamespaceMappings
-									.getModel().getValueAt(tcl.getRow(), 0);
-							xpathNamespaceMap.put(prefixOfUpdatedURI,
-									(String) tcl.getNewValue());
-						}
-
-						// either way - reload from the local map (map could be
-						// not updated if the validation didn't succeed)
-						reloadNamespaceMappingTableFromLocalMap();
-					}
-				});
-
-		jtXPathNamespaceMappings.getColumnModel().getColumn(0)
-				.setPreferredWidth(20); // set relative sizes of columns
-		jtXPathNamespaceMappings.getColumnModel().getColumn(1)
-				.setPreferredWidth(300);
-
-		JScrollPane spXPathNamespaceMappings = new JScrollPane(
-				jtXPathNamespaceMappings);
-		spXPathNamespaceMappings.setAlignmentY(TOP_ALIGNMENT);
-		spXPathNamespaceMappings.setMinimumSize(new Dimension(200, 50)); // makes the table to have at least two rows visible in all cases - no matter how small the parent panel is
-
-		bAddMapping = new JButton("Add Mapping");
-		bAddMapping.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				addNamespaceMapping();
-			}
-		});
-
-		bRemoveMapping = new JButton("Remove Mapping");
-		bRemoveMapping.setEnabled(false);
-		bRemoveMapping.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				removeNamespaceMapping();
-			}
-		});
-
-		bAddMapping.setMinimumSize(bRemoveMapping.getPreferredSize()); // make sure that the 'Add Mapping' button is of the same size as 'Remove Mapping'
-															
-		bAddMapping.setPreferredSize(bRemoveMapping.getPreferredSize()); // -- both are required to achieve desired behaviour when window is resized / namespace mapping table is enabled/disabled 												
-
-		bRunXPath.setMinimumSize(bRemoveMapping.getPreferredSize()); // do the same for 'Run XPath' button
-		
-		bRunXPath.setPreferredSize(bRemoveMapping.getPreferredSize());
-
-		JPanel jpAddRemoveButtons = new JPanel();
-		jpAddRemoveButtons.setLayout(new GridBagLayout());
-		GridBagConstraints cAddRemove = new GridBagConstraints();
-		cAddRemove.gridx = 0;
-		cAddRemove.gridy = 0;
-		cAddRemove.weightx = 1.0;
-		cAddRemove.anchor = GridBagConstraints.NORTH;
-		cAddRemove.fill = GridBagConstraints.HORIZONTAL;
-		jpAddRemoveButtons.add(bAddMapping, cAddRemove);
-		cAddRemove.gridy++;
-		cAddRemove.weighty = 1.0;
-		cAddRemove.insets = new Insets(2, 0, 0, 0);
-		jpAddRemoveButtons.add(bRemoveMapping, cAddRemove);
-
-		jpNamespaceMappingsWithButton = new JPanel();
-		jpNamespaceMappingsWithButton.setVisible(false);
-		jpNamespaceMappingsWithButton.setLayout(new BorderLayout(10, 0));
-		jpNamespaceMappingsWithButton.add(spXPathNamespaceMappings,
-				BorderLayout.CENTER);
-		jpNamespaceMappingsWithButton
-				.add(jpAddRemoveButtons, BorderLayout.EAST);
-
-		c.gridx = 0;
-		c.gridy++;
-		c.gridwidth = 4;
-		c.fill = GridBagConstraints.BOTH;
-		c.weightx = 1.0;
-		c.weighty = 1.0;
-		c.insets = new Insets(5, 0, 0, 0);
-		jpXPath.add(jpNamespaceMappingsWithButton, c);
-
-		// initialise some values / tooltips
-		resetXPathEditingPanel();
-
-		return (jpXPath);
-	}
-
-	protected void addNamespaceMapping() {
-		TwoFieldQueryPanel queryPanel = new TwoFieldQueryPanel(
-				"Namespace prefix:", "Namespace URI:");
-		int result = JOptionPane.showConfirmDialog(this, queryPanel,
-				"XPath Activity - Create new namespace mapping",
-				JOptionPane.OK_CANCEL_OPTION);
-
-		if (result == JOptionPane.OK_OPTION) {
-			boolean bInvalidMapping = true;
-			do {
-				bInvalidMapping = queryPanel.getFirstValue().length() == 0
-						|| queryPanel.getSecondValue().length() == 0
-						|| xpathNamespaceMap.containsKey(queryPanel
-								.getFirstValue());
-
-				if (bInvalidMapping) {
-					queryPanel = new TwoFieldQueryPanel(
-							"<html><center><font color=\"red\">ERROR: you must "
-									+ "enter values for both namespace prefix and URI. Prefix must be<br>"
-									+ "unique in the mapping table - duplicates are not allowed!</font></center></html>",
-							"Namespace prefix:", queryPanel.getFirstValue(),
-							"Namespace URI:", queryPanel.getSecondValue());
-					result = JOptionPane.showConfirmDialog(this, queryPanel,
-							"XPath Activity - Create new namespace mapping",
-							JOptionPane.OK_CANCEL_OPTION);
-				}
-			} while (bInvalidMapping && result == JOptionPane.OK_OPTION);
-
-			if (result == JOptionPane.OK_OPTION && !bInvalidMapping) {
-				// the value appears to be valid and OK was pressed - create new
-				// mapping
-				this.xpathNamespaceMap.put(queryPanel.getFirstValue(),
-						queryPanel.getSecondValue());
-				reloadNamespaceMappingTableFromLocalMap();
-			}
-		}
-	}
-
-	protected void removeNamespaceMapping() {
-		int selectedRow = jtXPathNamespaceMappings.getSelectedRow();
-		if (selectedRow != -1) {
-			// some row is selected - need to delete it and refresh table's UI
-			// (but first stop editing to avoid
-			// problems with cell editor trying to store an edited value after
-			// edited row has been deleted)
-			if (jtXPathNamespaceMappings.getCellEditor() != null) {
-				jtXPathNamespaceMappings.getCellEditor().stopCellEditing();
-			}
-			xpathNamespaceMap.remove(jtXPathNamespaceMappings.getValueAt(
-					selectedRow, 0));
-			reloadNamespaceMappingTableFromLocalMap();
-
-			// select another row in the table
-			int rowCount = jtXPathNamespaceMappings.getRowCount();
-			if (rowCount > 0) {
-				if (selectedRow < jtXPathNamespaceMappings.getRowCount()) {
-					// select the row that followed the one that was deleted
-					jtXPathNamespaceMappings.getSelectionModel()
-							.setSelectionInterval(selectedRow, selectedRow);
-				} else {
-					// last row in the table was deleted - select the one that
-					// is the new last row
-					jtXPathNamespaceMappings.getSelectionModel()
-							.setSelectionInterval(rowCount - 1, rowCount - 1);
-				}
-			}
-		} else {
-			JOptionPane.showMessageDialog(thisPanel,
-					"Please select a mapping to delete in the table first!",
-					"XPath Activity", JOptionPane.WARNING_MESSAGE);
-		}
-	}
-
-	private JPanel createXPathExpressionTestingPanel() {
-		JPanel jpTesting = new JPanel(new GridBagLayout());
-		GridBagConstraints c = new GridBagConstraints();
-
-		c.gridx = 0;
-		c.gridy = 0;
-		c.gridwidth = 1;
-		c.anchor = GridBagConstraints.WEST;
-		c.fill = GridBagConstraints.NONE;
-		c.weightx = 0;
-		c.weighty = 0;
-		c.insets = new Insets(0, 0, 10, 10);
-		jpTesting.add(new JLabel("Executed XPath expression:"), c);
-
-		c.gridx++;
-		c.fill = GridBagConstraints.HORIZONTAL;
-		c.weightx = 1.0;
-		c.weighty = 0;
-		c.insets = new Insets(0, 0, 10, 10);
-		tfExecutedXPathExpression = new JTextField();
-		tfExecutedXPathExpression.setEditable(false);
-		tfExecutedXPathExpression.setBorder(null);
-		jpTesting.add(tfExecutedXPathExpression, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		c.fill = GridBagConstraints.NONE;
-		c.weightx = 0;
-		c.weighty = 0;
-		c.insets = new Insets(0, 0, 5, 10);
-		jpTesting.add(new JLabel("Number of matching nodes:"), c);
-
-		c.gridx++;
-		c.fill = GridBagConstraints.HORIZONTAL;
-		c.weightx = 1.0;
-		c.weighty = 0;
-		c.insets = new Insets(0, 0, 5, 10);
-		tfMatchingElementCount = new JTextField();
-		tfMatchingElementCount.setEditable(false);
-		tfMatchingElementCount.setBorder(null);
-		jpTesting.add(tfMatchingElementCount, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		c.gridwidth = 2;
-		c.fill = GridBagConstraints.BOTH;
-		c.weightx = 1.0;
-		c.weighty = 1.0;
-		tpExecutedXPathExpressionResults = new JTabbedPane();
-		jpTesting.add(tpExecutedXPathExpressionResults, c);
-
-		taExecutedXPathExpressionResultsAsText = new JTextArea();
-		taExecutedXPathExpressionResultsAsText.setEditable(false);
-		spExecutedXPathExpressionResultsAsText = new JScrollPane(
-				taExecutedXPathExpressionResultsAsText);
-		spExecutedXPathExpressionResultsAsText.setPreferredSize(new Dimension(
-				200, 60));
-		spExecutedXPathExpressionResultsAsText.setBorder(BorderFactory
-				.createLineBorder(INACTIVE_PANEL_BACKGROUND_COLOR, 3));
-		tpExecutedXPathExpressionResults.add("Results as text",
-				spExecutedXPathExpressionResultsAsText);
-
-		taExecutedXPathExpressionResultsAsXML = new JTextArea();
-		taExecutedXPathExpressionResultsAsXML.setEditable(false);
-		spExecutedXPathExpressionResultsAsXML = new JScrollPane(
-				taExecutedXPathExpressionResultsAsXML);
-		spExecutedXPathExpressionResultsAsXML.setPreferredSize(new Dimension(
-				200, 60));
-		spExecutedXPathExpressionResultsAsXML.setBorder(BorderFactory
-				.createLineBorder(INACTIVE_PANEL_BACKGROUND_COLOR, 3));
-		tpExecutedXPathExpressionResults.add("Results as XML",
-				spExecutedXPathExpressionResultsAsXML);
-
-		// initialise some values / tooltips
-		resetXPathTestingPanel();
-
-		return (jpTesting);
-	}
-
-	protected void parseXML() {
-		String xmlData = taSourceXML.getText();
-
-		try {
-			xmlTree = XPathActivityXMLTree.createFromXMLData(xmlData,
-					miIncludeAttributes.isSelected(), miIncludeValues
-							.isSelected(), miIncludeNamespaces.isSelected(),
-					this);
-			xmlTree
-					.setToolTipText("<html>This is a tree structure of the XML document that you have pasted.<br><br>"
-							+ "Clicking on the nodes in this tree will automatically generate a<br>"
-							+ "corresponding XPath expression. Multiple <b>identical</b> nodes can<br>"
-							+ "be selected at once - in this case <b>wildcards</b> will be used in the<br>"
-							+ "generated XPath expression to if selected nodes have different<br>"
-							+ "ancestors. Other nodes that match the generated XPath expression<br>"
-							+ "will also be selected in the tree.<br><br>"
-							+ "Contextual menu provides convenience methods for expanding or<br>"
-							+ "collapsing the tree." + "</html>");
-			xmlTree.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
-			JScrollPane spXMLTree = new JScrollPane(xmlTree);
-			spXMLTree.setPreferredSize(spXMLTreePlaceholder.getPreferredSize());
-			jpRight.removeAll();
-			jpRight.add(spXMLTree);
-
-			// all successful - enable options to modify the tree
-			this.bShowXMLTreeSettings.setEnabled(true);
-
-			// data structures inside the XML tree were reset (as the tree was
-			// re-created) -
-			// now reset the UI to the initial state as well
-			resetXPathEditingPanel();
-			resetXPathTestingPanel();
-
-			// XML tree has pre-populated the namespace map with the namespaces
-			// specified in the
-			// root element of the tree - load these values
-			updateXPathEditingPanelValues();
-
-			this.validate();
-			this.repaint();
-		} catch (DocumentException e) {
-			JOptionPane.showMessageDialog(this, e.getMessage(),
-					"XPath Activity", JOptionPane.ERROR_MESSAGE);
-			this.taSourceXML.requestFocusInWindow();
-			return;
-		}
-	}
-
-	/**
-	 * Makes the {@link XPathActivityXMLTree} to refresh its UI from the
-	 * original XML document that was used to create it in first place.
-	 * 
-	 * The reason for using this method is to apply new options to the way the
-	 * tree is rendered - e.g. attributes shown/hidden in the tree, values and
-	 * namespaces shown/hidden, etc.
-	 */
-	protected void refreshXMLTreeUI() {
-		this.xmlTree.refreshFromExistingDocument(this.miIncludeAttributes
-				.isSelected(), this.miIncludeValues.isSelected(),
-				this.miIncludeNamespaces.isSelected());
-	}
-
-	/**
-	 * Initialises XPath Editing panel: -- resets XPath expression that is being
-	 * shown; -- resets local copy of namespace map; -- resets UI of namespace
-	 * mapping table;
-	 */
-	private void resetXPathEditingPanel() {
-		tfXPathExpression.setText("");
-		validateXPathAndUpdateUI();
-
-		// clear the local copy of namespace map
-		xpathNamespaceMap = new HashMap<String, String>();
-
-		// clear the namespace mapping table and reload the data from the map
-		DefaultTableModel tableModel = (DefaultTableModel) jtXPathNamespaceMappings
-				.getModel();
-		tableModel.getDataVector().removeAllElements();
-	}
-
-	/**
-	 * Initialises XPath testing panel which shows results of executing current
-	 * XPath expression against the example XML - the panel is returned to the
-	 * way it looks when it is first loaded.
-	 */
-	private void resetXPathTestingPanel() {
-		this.tfExecutedXPathExpression.setText("--");
-		this.tfMatchingElementCount.setText("--");
-
-		this.taExecutedXPathExpressionResultsAsText.setText("");
-		this.taExecutedXPathExpressionResultsAsText
-				.setBackground(INACTIVE_PANEL_BACKGROUND_COLOR);
-
-		this.taExecutedXPathExpressionResultsAsXML.setText("");
-		this.taExecutedXPathExpressionResultsAsXML
-				.setBackground(INACTIVE_PANEL_BACKGROUND_COLOR);
-	}
-
-	public void updateXPathEditingPanelValues() {
-		if (xmlTree.getCurrentXPathExpression() != null) {
-			tfXPathExpression.setText(xmlTree.getCurrentXPathExpression()
-					.getText());
-		}
-
-		// clear the local copy of namespace map and update it with all values
-		// from
-		// the map in XML tree instance (which was apparently just re-generated
-		// on user request)
-		xpathNamespaceMap.clear();
-		xpathNamespaceMap.putAll(xmlTree.getCurrentXPathNamespaces());
-
-		// clear the namespace mapping table and reload the data from the map
-		reloadNamespaceMappingTableFromLocalMap();
-	}
-
-	protected void reloadNamespaceMappingTableFromLocalMap() {
-		// clear the namespace mapping table and reload the data from the map
-		DefaultTableModel tableModel = (DefaultTableModel) jtXPathNamespaceMappings
-				.getModel();
-		tableModel.getDataVector().removeAllElements();
-		for (Map.Entry<String, String> mapping : this.xpathNamespaceMap
-				.entrySet()) {
-			tableModel.addRow(new Object[] { mapping.getKey(),
-					mapping.getValue() });
-		}
-
-		bRemoveMapping.setEnabled(this.xpathNamespaceMap.entrySet().size() > 0);
-
-		repaint();
-	}
-
-	private String getXPathValidationErrorMessage() {
-		try {
-			// try to parse the XPath expression...
-			DocumentHelper.createXPath(tfXPathExpression.getText().trim());
-			// ...success
-			return ("");
-		} catch (InvalidXPathException e) {
-			// ...failed to parse the XPath expression: notify of the error
-			return (e.getMessage());
-		}
-	}
-
-	/**
-	 * Validates the current XPath expression and updates UI accordingly: --
-	 * XPath status icon is updated; -- tooltip for the icon explains the
-	 * status; -- 'Run XPath' button is enabled/disabled depending on validity
-	 * of XPath expression and existence of example data in the XML tree
-	 */
-	protected void validateXPathAndUpdateUI() {
-		String candidatePath = tfXPathExpression.getText();
-		int xpathStatus = XPathActivityConfigurationBean
-				.validateXPath(candidatePath);
-
-		switch (xpathStatus) {
-		case XPathActivityConfigurationBean.XPATH_VALID:
-			// success: expression is correct
-			jlXPathExpressionStatus.setIcon(XPathActivityIcon
-					.getIconById(XPathActivityIcon.XPATH_STATUS_OK_ICON));
-			jlXPathExpressionStatus
-					.setToolTipText("Current XPath expression is well-formed and valid");
-
-			// could allow to execute against example XML, with only condition:
-			// XML tree must be populated
-			// (that is, there should be something to run the expression
-			// against)
-			if (xmlTree != null) {
-				this.bRunXPath.setEnabled(true);
-				this.bRunXPath
-						.setToolTipText("<html>Evaluate current XPath expression against the XML document<br>"
-								+ "whose structure is shown in the tree view above.</html>");
-			} else {
-				this.bRunXPath.setEnabled(false);
-				this.bRunXPath
-						.setToolTipText("<html>No XML document to evaluate the current XPath expression against.<br><br>"
-								+ "Paste some example XML into the area in the top-left section of the<br>"
-								+ "window, then parse it by clicking on the button with the green arrow<br>"
-								+ "in order to test your XPath expression.</html>");
-			}
-			break;
-
-		case XPathActivityConfigurationBean.XPATH_EMPTY:
-			// no XPath expression - can't tell if it is correct + nothing to
-			// execute
-			jlXPathExpressionStatus.setIcon(XPathActivityIcon
-					.getIconById(XPathActivityIcon.XPATH_STATUS_UNKNOWN_ICON));
-			jlXPathExpressionStatus
-					.setToolTipText("<html>There is no XPath expression to validate.<br><br>"
-							+ "<b>Hint:</b> select something in the tree view showing the structure<br>"
-							+ "of the XML document that you have pasted (or type the XPath<br>"
-							+ "expression manually).</html>");
-			this.bRunXPath.setEnabled(false);
-			this.bRunXPath.setToolTipText("No XPath expression to execute");
-			break;
-
-		case XPathActivityConfigurationBean.XPATH_INVALID:
-			// failed to parse the XPath expression: notify of the error
-			jlXPathExpressionStatus.setIcon(XPathActivityIcon
-					.getIconById(XPathActivityIcon.XPATH_STATUS_ERROR_ICON));
-			jlXPathExpressionStatus
-					.setToolTipText(getXPathValidationErrorMessage());
-
-			this.bRunXPath.setEnabled(false);
-			this.bRunXPath
-					.setToolTipText("Cannot execute invalid XPath expression");
-			break;
-		}
-
-	}
-
-	/**
-	 * Executes the current XPath expression against the current XML tree.
-	 * 
-	 * @param displayResults
-	 *            <code>true</code> to execute and display results in the XPath
-	 *            activity configuration panel (this happens when the 'Run
-	 *            XPath' button is clicked);<br/>
-	 *            <false> to run the expression quietly and simply return the
-	 *            number of matching nodes.
-	 * @return Number of nodes in the XML tree that match the current XPath
-	 *         expression. (Or <code>-1</code> if an error has occurred during
-	 *         the execution -- error messages will only be shown if
-	 *         <code>displayResults == true</code>).
-	 */
-	public int runXPath(boolean displayResults) {
-		// ----- RUNNING THE XPath EXPRESSION -----
-		XPath expr = null;
-		try {
-			expr = DocumentHelper.createXPath(this.tfXPathExpression.getText());
-			expr.setNamespaceURIs(this.xpathNamespaceMap);
-		} catch (InvalidXPathException e) {
-			if (displayResults) {
-				JOptionPane
-						.showMessageDialog(
-								thisPanel,
-								"Incorrect XPath Expression\n\n"
-										+ "Please check the expression if you have manually modified it;\n"
-										+ "Alternatively, try to select another node from the XML tree.\n\n"
-										+ "------------------------------------------------------------------------------------\n\n"
-										+ "XPath processing library reported the following error:\n"
-										+ e.getMessage(), "XPath Activity",
-								JOptionPane.ERROR_MESSAGE);
-			}
-			return (-1);
-		}
-
-		Document doc = xmlTree.getDocumentUsedToPopulateTree();
-		List<Node> matchingNodes = null;
-		int matchingNodeCount = -1;
-		try {
-			matchingNodes = expr.selectNodes(doc);
-			matchingNodeCount = matchingNodes.size();
-		} catch (XPathException e) {
-			if (displayResults) {
-				JOptionPane
-						.showMessageDialog(
-								thisPanel,
-								"Unexpected error has occurred while executing the XPath expression.\n\n"
-										+ "If you have manually modified the XPath expression and/or namespace mappings,\n"
-										+ "please check you changes. Alternatively, make your selection in the XML tree and\n"
-										+ "a correct XPath expression with corresponding namespace mapping will be generated.\n\n"
-										+ "-------------------------------------------------------------------------------------------------------------\n\n"
-										+ "XPath processing library reported the following error:\n"
-										+ e.getMessage(), "XPath Activity",
-								JOptionPane.ERROR_MESSAGE);
-			}
-			return (-1);
-		}
-
-		// ----- DISPLAYING THE RESULTS -----
-		if (displayResults) {
-			tfExecutedXPathExpression.setText(expr.getText());
-			tfMatchingElementCount.setText("" + matchingNodeCount);
-
-			StringBuffer outNodesText = new StringBuffer();
-			StringBuffer outNodesXML = new StringBuffer();
-			for (Node n : matchingNodes) {
-				if (n.getStringValue() != null
-						&& n.getStringValue().length() > 0) {
-					outNodesText.append(n.getStringValue() + "\n");
-				}
-				outNodesXML.append(n.asXML() + "\n");
-			}
-
-			// tpExecutedXPathExpressionResults.setSelectedIndex(0); // open the
-			// first tab (should be the one with textual results) // TODO -
-			// enable if needed
-
-			taExecutedXPathExpressionResultsAsText.setText(outNodesText
-					.toString());
-			taExecutedXPathExpressionResultsAsText.setBackground(Color.WHITE);
-			taExecutedXPathExpressionResultsAsText.setCaretPosition(0);
-			spExecutedXPathExpressionResultsAsText.setBorder(BorderFactory
-					.createLineBorder(Color.WHITE, 3));
-
-			taExecutedXPathExpressionResultsAsXML.setText(outNodesXML
-					.toString());
-			taExecutedXPathExpressionResultsAsXML.setBackground(Color.WHITE);
-			taExecutedXPathExpressionResultsAsXML.setCaretPosition(0);
-			spExecutedXPathExpressionResultsAsXML.setBorder(BorderFactory
-					.createLineBorder(Color.WHITE, 3));
-		}
-
-		return (matchingNodeCount);
-	}
-
-	protected void setSourceXML(String xmlData) {
-		this.taSourceXML.setText(xmlData);
-	}
-
-	protected String getCurrentXPathExpression() {
-		return (this.tfXPathExpression.getText().trim());
-	}
-
-	protected void setCurrentXPathExpression(String xpathExpression) {
-		this.tfXPathExpression.setText(xpathExpression);
-	}
-
-	protected Map<String, String> getCurrentXPathNamespaceMap() {
-		return (this.xpathNamespaceMap);
-	}
-
-	/**
-	 * This method doesn't simply set a reference to the passed map, but rather
-	 * performs a shallow copy of values.
-	 * 
-	 * This is because the method is used during configuration panel's
-	 * initialisation from the values that are held in the configuration bean.
-	 * In case of simple reference assignment, any changes made to map in the
-	 * configuration panel are also taking effect on the same map - referenced
-	 * from the configuration bean, which leads to undesired behaviour.
-	 */
-	protected void setCurrentXPathNamespaceMapValues(
-			Map<String, String> xpathNamespaceMap) {
-		this.xpathNamespaceMap.clear();
-		this.xpathNamespaceMap.putAll(xpathNamespaceMap);
-	}
-
-	protected XPathActivityXMLTree getCurrentXMLTree() {
-		return (this.xmlTree);
-	}
-
-	/**
-	 * For testing
-	 */
-	public static void main(String[] args) {
-		JFrame frame = new JFrame();
-		frame.getContentPane().add(new XPathActivityConfigurationPanel());
-		frame.pack();
-		frame.setSize(new Dimension(900, 600));
-		frame.setLocationRelativeTo(null);
-		frame.setVisible(true);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanelProvider.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanelProvider.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanelProvider.java
deleted file mode 100644
index 5954986..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanelProvider.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.config;
-
-import java.awt.BorderLayout;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.swing.BorderFactory;
-import javax.swing.JOptionPane;
-
-import net.sf.taverna.t2.activities.xpath.XPathActivityConfigurationBean;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationPanel;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.node.ArrayNode;
-
-/**
- *
- * @author Sergejs Aleksejevs
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class XPathActivityConfigurationPanelProvider extends ActivityConfigurationPanel {
-
-	private XPathActivityConfigurationPanel configPanel;
-	private final ServiceRegistry serviceRegistry;
-
-	public XPathActivityConfigurationPanelProvider(Activity activity, ServiceRegistry serviceRegistry) {
-		super(activity);
-		this.serviceRegistry = serviceRegistry;
-		initialise();
-	}
-
-	@Override
-	protected void initialise() {
-		super.initialise();
-		removeAll();
-		setLayout(new BorderLayout());
-
-		// create actual contents of the config panel
-		this.configPanel = new XPathActivityConfigurationPanel();
-		add(configPanel, BorderLayout.CENTER);
-
-		// place the whole configuration panel into a raised area, so that
-		// automatically added 'Apply' / 'Close' buttons visually apply to
-		// the whole of the panel, not just part of it
-		this.setBorder(BorderFactory.createCompoundBorder(
-				BorderFactory.createEmptyBorder(12, 12, 2, 12),
-				BorderFactory.createRaisedBevelBorder()));
-
-		// Populate fields from activity configuration bean
-		refreshConfiguration();
-	}
-
-	/**
-	 * Prepare a new configuration bean from the UI, to be returned with
-	 * getConfiguration()
-	 */
-	@Override
-	public void noteConfiguration() {
-		if (configPanel.getCurrentXMLTree() != null) {
-			setProperty("exampleXmlDocument", configPanel.getCurrentXMLTree()
-					.getDocumentUsedToPopulateTree().asXML());
-		}
-		setProperty("xpathExpression", configPanel.getCurrentXPathExpression());
-
-		Map<String, String> xPathNamespaceMap = configPanel.getCurrentXPathNamespaceMap();
-		if (xPathNamespaceMap.isEmpty()) {
-			json.remove("xpathNamespaceMap");
-		} else {
-			ArrayNode namespaceMapNode = json.arrayNode();
-			for (Entry<String, String> namespaceMapping : xPathNamespaceMap.entrySet()) {
-				namespaceMapNode.addObject().put("prefix", namespaceMapping.getKey()).put("uri", namespaceMapping.getValue());
-			}
-			json.set("xpathNamespaceMap", namespaceMapNode);
-		}
-
-		configureInputPorts(serviceRegistry);
-		configureOutputPorts(serviceRegistry);
-}
-
-	/**
-	 * Check that user values in the UI are valid.
-	 */
-	@Override
-	public boolean checkValues() {
-		// the only validity condition is the correctness of the XPath
-		// expression -- so checking that
-		int xpathExpressionStatus = XPathActivityConfigurationBean.validateXPath(this.configPanel
-				.getCurrentXPathExpression());
-
-		// show an explicit warning message to explain the problem
-		if (xpathExpressionStatus == XPathActivityConfigurationBean.XPATH_EMPTY) {
-			JOptionPane.showMessageDialog(this, "XPath expression should not be empty",
-					"XPath Activity", JOptionPane.WARNING_MESSAGE);
-		} else if (xpathExpressionStatus == XPathActivityConfigurationBean.XPATH_INVALID) {
-			JOptionPane.showMessageDialog(this,
-					"<html><center>XPath expression is invalid - hover the mouse over the XPath status<br>"
-							+ "icon to get more information</center></html>", "XPath Activity",
-					JOptionPane.WARNING_MESSAGE);
-		}
-
-		return (xpathExpressionStatus == XPathActivityConfigurationBean.XPATH_VALID);
-	}
-
-	/**
-	 * Update GUI from a changed configuration bean (perhaps by undo / redo).
-	 */
-	@Override
-	public void refreshConfiguration() {
-		if (json.has("exampleXmlDocument")) {
-			configPanel.setSourceXML(getProperty("exampleXmlDocument"));
-			configPanel.parseXML();
-		}
-
-		configPanel.setCurrentXPathExpression(getProperty("xpathExpression"));
-
-		Map<String, String> xpathNamespaceMap = new HashMap<>();
-		if (json.has("xpathNamespaceMap")) {
-			for (JsonNode namespaceMapping : json.get("xpathNamespaceMap")) {
-				xpathNamespaceMap.put(namespaceMapping.get("prefix").asText(), namespaceMapping.get("uri").asText());
-			}
-		}
-		configPanel.setCurrentXPathNamespaceMapValues(xpathNamespaceMap);
-		configPanel.reloadNamespaceMappingTableFromLocalMap();
-
-		// if the XML tree was populated, (re-)run the XPath expression
-		// and restore selection of nodes in the tree, if possible
-		if (configPanel.getCurrentXMLTree() != null) {
-			configPanel.runXPath(true);
-
-			// convert the XPath expression into the required list form;
-			// discard the first 'leg', as it's a side effect of
-			// "String.split()" -
-			// non-existent string to the left of the first "/"
-			String[] xpathLegs = getProperty("xpathExpression").split("/");
-			List<String> xpathLegList = new ArrayList<String>();
-			for (int i = 1; i < xpathLegs.length; i++) {
-				xpathLegList.add("/" + xpathLegs[i]);
-			}
-
-			// if nothing was obtained, we should be looking at the root node -
-			// but add the actual expression as it was, just in case
-			if (xpathLegList.size() == 0) {
-				xpathLegList.add(configPanel.getCurrentXPathExpression());
-			}
-
-			// invoke selection handler of the XML tree to do the job
-			configPanel.getCurrentXMLTree().getXMLTreeSelectionHandler()
-					.selectAllNodesThatMatchTheCurrentXPath(xpathLegList, null);
-		}
-
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigureAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigureAction.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigureAction.java
deleted file mode 100644
index 4e68948..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigureAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.config;
-
-import java.awt.Frame;
-import java.awt.event.ActionEvent;
-
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-/**
- * @author Sergejs Aleksejevs
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class XPathActivityConfigureAction extends ActivityConfigurationAction {
-
-	private final EditManager editManager;
-	private final FileManager fileManager;
-	private final ServiceRegistry serviceRegistry;
-
-	public XPathActivityConfigureAction(Activity activity, Frame owner,
-			EditManager editManager, FileManager fileManager,
-			ActivityIconManager activityIconManager,
-			ServiceDescriptionRegistry serviceDescriptionRegistry, ServiceRegistry serviceRegistry) {
-		super(activity, activityIconManager, serviceDescriptionRegistry);
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		this.serviceRegistry = serviceRegistry;
-	}
-
-	public void actionPerformed(ActionEvent e) {
-		ActivityConfigurationDialog currentDialog = ActivityConfigurationAction.getDialog(getActivity());
-
-		if (currentDialog != null) {
-			currentDialog.toFront();
-			return;
-		}
-
-		XPathActivityConfigurationPanelProvider panel = new XPathActivityConfigurationPanelProvider(
-				getActivity(), serviceRegistry);
-		ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(
-				getActivity(), panel, editManager);
-
-		ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/TableCellListener.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/TableCellListener.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/TableCellListener.java
deleted file mode 100644
index 872fd70..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/TableCellListener.java
+++ /dev/null
@@ -1,186 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.config.xmltree;
-
-import java.awt.event.*;
-import javax.swing.*;
-import java.beans.*;
-
-/**
- *  This class listens for changes made to the data in the table via the
- *  TableCellEditor. When editing is started, the value of the cell is saved
- *  When editing is stopped the new value is saved. When the oold and new
- *  values are different, then the provided Action is invoked.
- *
- *  The source of the Action is a TableCellListener instance.
- *  
- *  TODO: update to work with Java 1.6, when Taverna is migrated to that version
- *        (see the next TODO tag - this is where the change needs to be made) 
- *  
- *  @author Robert Camick
- *  
- *  @see <a href="http://tips4java.wordpress.com/2009/06/07/table-cell-listener/">http://tips4java.wordpress.com/2009/06/07/table-cell-listener/</a>
- *  @see <a href="http://www.camick.com/java/source/TableCellListener.java">http://www.camick.com/java/source/TableCellListener.java</a>
- */
-public class TableCellListener implements PropertyChangeListener, Runnable
-{
-  private JTable table;
-  private Action action;
-
-  private int row;
-  private int column;
-  private Object oldValue;
-  private Object newValue;
-
-  /**
-   *  Create a TableCellListener.
-   *
-   *  @param table   the table to be monitored for data changes
-   *  @param action  the Action to invoke when cell data is changed
-   */
-  public TableCellListener(JTable table, Action action)
-  {
-    this.table = table;
-    this.action = action;
-    this.table.addPropertyChangeListener( this );
-  }
-
-  /**
-   *  Create a TableCellListener with a copy of all the data relevant to
-   *  the change of data for a given cell.
-   *
-   *  @param row  the row of the changed cell
-   *  @param column  the column of the changed cell
-   *  @param oldValue  the old data of the changed cell
-   *  @param newValue  the new data of the changed cell
-   */
-  private TableCellListener(JTable table, int row, int column, Object oldValue, Object newValue)
-  {
-    this.table = table;
-    this.row = row;
-    this.column = column;
-    this.oldValue = oldValue;
-    this.newValue = newValue;
-  }
-
-  /**
-   *  Get the column that was last edited - value as in table model, not in the UI
-   *
-   *  @return the column that was edited
-   */
-  public int getColumn()
-  {
-    return column;
-  }
-
-  /**
-   *  Get the new value in the cell
-   *
-   *  @return the new value in the cell
-   */
-  public Object getNewValue()
-  {
-    return newValue;
-  }
-
-  /**
-   *  Get the old value of the cell
-   *
-   *  @return the old value of the cell
-   */
-  public Object getOldValue()
-  {
-    return oldValue;
-  }
-
-  /**
-   *  Get the row that was last edited - value as in table model, not in the UI
-   *
-   *  @return the row that was edited
-   */
-  public int getRow()
-  {
-    return row;
-  }
-
-  /**
-   *  Get the table of the cell that was changed
-   *
-   *  @return the table of the cell that was changed
-   */
-  public JTable getTable()
-  {
-    return table;
-  }
-  
-  //
-  //  Implement the PropertyChangeListener interface
-  //
-  public void propertyChange(PropertyChangeEvent e)
-  {
-    //  A cell has started/stopped editing
-
-    if ("tableCellEditor".equals(e.getPropertyName()))
-    {
-      if (table.isEditing())
-        processEditingStarted();
-      else
-        processEditingStopped();
-    }
-  }
-
-  /*
-   *  Save information of the cell about to be edited
-   */
-  private void processEditingStarted()
-  {
-    //  The invokeLater is necessary because the editing row and editing
-    //  column of the table have not been set when the "tableCellEditor"
-    //  PropertyChangeEvent is fired.
-    //  This results in the "run" method being invoked
-
-    SwingUtilities.invokeLater( this );
-  }
-  
-  /*
-   *  See above.
-   */
-  public void run()
-  {
-//    TODO - the next line is a correct implementation for Java 1.6    
-//    row = table.convertRowIndexToModel( table.getEditingRow() );
-    
-//    in Java 1.5 which is currently used, tables are not easily sortable
-//    (and that is the case for the XPath Activity, where this class is used) --
-//    hence, row numbers in the view and in the model will always be identical
-//    --> HACK: just use the row number from the view...
-    row = table.getEditingRow();
-    
-    column = table.convertColumnIndexToModel( table.getEditingColumn() );
-    oldValue = table.getModel().getValueAt(row, column);
-    newValue = null;
-  }
-
-  /*
-   *  Update the Cell history when necessary
-   */
-  private void processEditingStopped()
-  {
-    newValue = table.getModel().getValueAt(row, column);
-
-    //  The data has changed, invoke the supplied Action
-
-    if (! newValue.equals(oldValue))
-    {
-      //  Make a copy of the data in case another cell starts editing
-      //  while processing this change
-
-      TableCellListener tcl = new TableCellListener(
-        getTable(), getRow(), getColumn(), getOldValue(), getNewValue());
-
-      ActionEvent event = new ActionEvent(
-        tcl,
-        ActionEvent.ACTION_PERFORMED,
-        "");
-      action.actionPerformed(event);
-    }
-  }
-}


[32/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-rest-activity-ui/

Posted by st...@apache.org.
taverna-rest-activity-ui/


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/11c47f2b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/11c47f2b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/11c47f2b

Branch: refs/heads/master
Commit: 11c47f2b5ac5c75ec2cdd7c19591c05a33a1e77c
Parents: d60b1ea
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:27:31 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:27:31 2015 +0000

----------------------------------------------------------------------
 .gitignore                                      |  24 -
 .travis.yml                                     |   1 -
 README.md                                       |   5 -
 pom.xml                                         |  74 --
 .../rest/ui/config/HTTPHeadersTableModel.java   | 119 ----
 .../config/RESTActivityConfigurationPanel.java  | 670 -------------------
 .../ui/config/RESTActivityConfigureAction.java  |  51 --
 .../rest/ui/menu/AddRESTTemplateAction.java     | 107 ---
 .../rest/ui/menu/AddRESTTemplateMenuAction.java | 114 ----
 .../GenericRESTTemplateService.java             |  76 ---
 .../ui/servicedescription/RESTActivityIcon.java |  54 --
 .../serviceprovider/ExampleServiceDesc.java.bak |  99 ---
 .../ExampleServiceProvider.java.bak             | 106 ---
 .../ExampleServiceProviderConfig.java.bak       |  31 -
 .../view/ConfigureRESTActivityMenuAction.java   |  66 --
 .../RESTActivityMainContextViewFactory.java     |  62 --
 .../ui/view/RESTActivityMainContextualView.java | 220 ------
 ...rvicedescriptions.ServiceDescriptionProvider |   1 -
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |   3 -
 ...a.t2.workbench.activityicons.ActivityIconSPI |   1 -
 ...ntextualviews.activity.ContextualViewFactory |   1 -
 .../spring/rest-activity-ui-context-osgi.xml    |  28 -
 .../spring/rest-activity-ui-context.xml         |  50 --
 .../activities/rest/ui/config/information.png   | Bin 778 -> 0 bytes
 .../t2/activities/rest/ui/config/mediatypes.txt |  65 --
 .../ui/servicedescription/service_type_rest.png | Bin 1137 -> 0 bytes
 taverna-rest-activity-ui/pom.xml                |  74 ++
 .../rest/ui/config/HTTPHeadersTableModel.java   | 119 ++++
 .../config/RESTActivityConfigurationPanel.java  | 670 +++++++++++++++++++
 .../ui/config/RESTActivityConfigureAction.java  |  51 ++
 .../rest/ui/menu/AddRESTTemplateAction.java     | 107 +++
 .../rest/ui/menu/AddRESTTemplateMenuAction.java | 114 ++++
 .../GenericRESTTemplateService.java             |  76 +++
 .../ui/servicedescription/RESTActivityIcon.java |  54 ++
 .../serviceprovider/ExampleServiceDesc.java.bak |  99 +++
 .../ExampleServiceProvider.java.bak             | 106 +++
 .../ExampleServiceProviderConfig.java.bak       |  31 +
 .../view/ConfigureRESTActivityMenuAction.java   |  66 ++
 .../RESTActivityMainContextViewFactory.java     |  62 ++
 .../ui/view/RESTActivityMainContextualView.java | 220 ++++++
 ...rvicedescriptions.ServiceDescriptionProvider |   1 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |   3 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |   1 +
 ...ntextualviews.activity.ContextualViewFactory |   1 +
 .../spring/rest-activity-ui-context-osgi.xml    |  28 +
 .../spring/rest-activity-ui-context.xml         |  50 ++
 .../activities/rest/ui/config/information.png   | Bin 0 -> 778 bytes
 .../t2/activities/rest/ui/config/mediatypes.txt |  65 ++
 .../ui/servicedescription/service_type_rest.png | Bin 0 -> 1137 bytes
 49 files changed, 1998 insertions(+), 2028 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index ebe0e5b..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# ignore project files #
-.classpath
-.project
-.settings/
-catalog-v001.xml
-
-# ignore target files #
-target/
-bin/
-build/
-dist/
-apidoc/
-*.swp
-
-# ignore svn files if there
-.svn
-
-# ignore log files #
-*.log
-/logs/*
-*/logs/*
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index dff5f3a..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1 +0,0 @@
-language: java

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
deleted file mode 100644
index d14cfe6..0000000
--- a/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Taverna Workflow system RESTful Web Service Activity: User Interface part for use in the Taverna Workbench.
-
-Extends https://github.com/taverna/taverna-rest-activity
-
-This code was previously hosted at http://taverna.googlecode.com/svn/taverna/ui/net.sf.taverna.t2.ui-activities/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 99ac649..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>net.sf.taverna</groupId>
-		<artifactId>taverna-parent</artifactId>
-		<version>3.0.1-SNAPSHOT</version>
-	</parent>
-	<groupId>net.sf.taverna.t2.ui-activities</groupId>
-	<artifactId>rest-activity-ui</artifactId>
-        <version>2.0-SNAPSHOT</version>
-	<packaging>bundle</packaging>
-	<name>REST Activity - UI bindings</name>
-
-	<dependencies>
-		<dependency>
-			<groupId>net.sf.taverna.t2.activities</groupId>
-			<artifactId>rest-activity</artifactId>
-			<version>${t2.activities.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-palette-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>menu-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>contextual-views-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>workbench-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>report-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-components</groupId>
-			<artifactId>workflow-view</artifactId>
-			<version>${t2.ui.components.version}</version>
-		</dependency>
-	</dependencies>
-	<repositories>
-		<repository>
-			<releases />
-			<snapshots>
-				<enabled>false</enabled>
-			</snapshots>
-			<id>mygrid-repository</id>
-			<name>myGrid Repository</name>
-			<url>http://www.mygrid.org.uk/maven/repository
-			</url>
-		</repository>
-		<repository>
-			<releases>
-				<enabled>false</enabled>
-			</releases>
-			<snapshots />
-			<id>mygrid-snapshot-repository</id>
-			<name>myGrid Snapshot Repository</name>
-			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
-		</repository>
-	</repositories>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/HTTPHeadersTableModel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/HTTPHeadersTableModel.java b/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/HTTPHeadersTableModel.java
deleted file mode 100644
index 30507c9..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/HTTPHeadersTableModel.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package net.sf.taverna.t2.activities.rest.ui.config;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-
-import javax.swing.table.AbstractTableModel;
-
-@SuppressWarnings("serial")
-public class HTTPHeadersTableModel extends AbstractTableModel {
-
-    protected String[] columnNames;
-    protected ArrayList<ArrayList<String>> data;
-
-    public HTTPHeadersTableModel() {
-    	columnNames = new String[] {"HTTP Header Name", "HTTP Header Value"};
-    	data = new ArrayList<ArrayList<String>>();
-    }
-
-    public String getColumnName(int column) {
-        return columnNames[column];
-    }
-
-    public boolean isCellEditable(int row, int column) {
-        return true;
-    }
-
-    public int getColumnCount()
-    {
-        return columnNames.length;
-    }
-
-    public int getRowCount()
-    {
-        return data.size();
-    }
-
-    public Object getValueAt(int row, int column)
-    {
-        return data.get(row).get(column);
-    }
-
-    public void setValueAt(Object value, int row, int column) {
-        if ((row < 0) || (column < 0)) {
-          throw new IllegalArgumentException("Invalid row/column setting");
-        }
-        data.get(row).set(column, (String)value);
-      }
-    
-    /**
-     * Get the class at of the cells at the given column position.
-     */
-    public Class<? extends Object> getColumnClass(int iCol)
-    {
-        return getValueAt(0, iCol).getClass();
-    }
-
-    
-	public void addEmptyRow() {
-        data.add(new ArrayList<String>(Arrays.asList("", ""))); // add empty row
-        fireTableRowsInserted(
-           data.size() - 1,
-           data.size() - 1);
-    }
-	
-	public void addRow(ArrayList<String> headerValuePair) {
-        data.add(headerValuePair);
-        fireTableRowsInserted(
-           data.size() - 1,
-           data.size() - 1);
-    }
-	
-	public void removeRow(int row)
-	{
-		if (row >=0 && row < data.size()){
-			data.remove(row);
-			fireTableRowsDeleted(row, row);
-		}
-	}
-
-	public ArrayList<ArrayList<String>> getHTTPHeaderData(){
-		// Return a deep copy of the 2-dimensional array
-		return deepCopy(data);
-	}
-	
-	public void setHTTPHeaderData(ArrayList<ArrayList<String>> data){
-		this.data = deepCopy(data);
-		fireTableChanged(null);
-	}
-	
-	public ArrayList<String> getHTTPHeaderNames(){
-		ArrayList<String> headerNames = new ArrayList<String>();
-		for (ArrayList<String> headerNameValuePair : data){
-			headerNames.add(headerNameValuePair.get(0));
-		}
-		return headerNames;
-	}
-	
-	public ArrayList<String> getHTTPHeaderValues(){
-		ArrayList<String> headerValues = new ArrayList<String>();
-		for (ArrayList<String> headerNameValuePair : data){
-			headerValues.add(headerNameValuePair.get(1));
-		}
-		return headerValues;
-	}
-	
-	public static ArrayList<ArrayList<String>> deepCopy(ArrayList<ArrayList<String>> src)
-	{
-	    ArrayList<ArrayList<String>> dest = new ArrayList<ArrayList<String>>();
-
-	    for (int i = 0; i< src.size(); i++){ 	
-	    	dest.add(new ArrayList<String>(Arrays.asList(new String[src.get(i).size()])));  
-	    	Collections.copy(dest.get(i), src.get(i));
-	    }
-	    return dest;
-	}
-
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigurationPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigurationPanel.java b/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigurationPanel.java
deleted file mode 100644
index d6b46e1..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigurationPanel.java
+++ /dev/null
@@ -1,670 +0,0 @@
-package net.sf.taverna.t2.activities.rest.ui.config;
-
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.FlowLayout;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.FocusEvent;
-import java.awt.event.FocusListener;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Scanner;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTable;
-import javax.swing.JTextField;
-import javax.swing.ListSelectionModel;
-
-import net.sf.taverna.t2.activities.rest.RESTActivity;
-import net.sf.taverna.t2.activities.rest.RESTActivity.DATA_FORMAT;
-import net.sf.taverna.t2.activities.rest.RESTActivity.HTTP_METHOD;
-import net.sf.taverna.t2.activities.rest.RESTActivityConfigurationBean;
-import net.sf.taverna.t2.activities.rest.URISignatureHandler;
-import net.sf.taverna.t2.activities.rest.URISignatureHandler.URISignatureParsingException;
-import net.sf.taverna.t2.workbench.MainWindow;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.MultiPageActivityConfigurationPanel;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-import com.fasterxml.jackson.databind.node.ArrayNode;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
-@SuppressWarnings("serial")
-public class RESTActivityConfigurationPanel extends MultiPageActivityConfigurationPanel {
-	private static final Icon infoIcon = new ImageIcon(
-			RESTActivityConfigurationPanel.class.getResource("information.png"));
-
-	// GENERAL tab
-	private JComboBox<HTTP_METHOD> cbHTTPMethod; // HTTP method of this REST activity
-	private JTextField tfURLSignature; // URL signature that determines its
-										// input ports
-	private JComboBox<String> cbAccepts; // for Accepts header
-	private JLabel jlContentTypeExplanation;
-	private JLabel jlContentTypeExplanationPlaceholder;
-	private JLabel jlContentType;
-	private JLabel jlContentTypeLabelPlaceholder; // this placeholder label will
-													// take up space of the
-													// ContentType combo-box
-													// when the latter is not
-													// shown
-	private JLabel jlContentTypeFieldPlaceholder;
-	private JComboBox<String> cbContentType; // for MIME type of data sent to the server
-										// by POST / PUT methods
-	private JLabel jlSendDataAs;
-	private JComboBox<DATA_FORMAT> cbSendDataAs;
-	private JLabel jlSendDataAsLabelPlaceholder;
-	private JLabel jlSendDataAsFieldPlaceholder;
-
-	// ADVANCED tab
-	private JCheckBox cbSendHTTPExpectHeader;
-	private JCheckBox cbShowRedirectionOutputPort;
-	private JCheckBox cbShowActualUrlPort;
-	private JCheckBox cbShowResponseHeadersPort;
-	private JCheckBox cbEscapeParameters;
-	private JButton addHeaderButton;
-	private JButton removeHeaderButton;
-	private JTable httpHeadersTable;
-	private HTTPHeadersTableModel httpHeadersTableModel;
-
-	private String[] mediaTypes;
-
-	private final ServiceRegistry serviceRegistry;
-
-	public RESTActivityConfigurationPanel(Activity activity, ServiceRegistry serviceRegistry) {
-		super(activity);
-		this.serviceRegistry = serviceRegistry;
-		initialise();
-	}
-
-	@Override
-	protected void initialise() {
-		super.initialise();
-		removeAllPages();
-		addPage("General", createGeneralTab());
-		addPage("Advanced", createAdvancedTab());
-		refreshConfiguration();
-	}
-
-	@Override
-	public void noteConfiguration() {
-		ObjectNode requestNode = json.objectNode();
-
-		String methodName = ((HTTP_METHOD) cbHTTPMethod.getSelectedItem()).name();
-		requestNode.put("httpMethod", methodName);
-		requestNode.put("absoluteURITemplate", tfURLSignature.getText().trim());
-
-		ArrayNode headersNode = requestNode.arrayNode();
-		headersNode.addObject().put("header", "Accept").put("value", (String) cbAccepts.getSelectedItem());
-		headersNode.addObject().put("header", "Content-Type").put("value", (String) cbContentType.getSelectedItem());
-		if (cbSendHTTPExpectHeader.isSelected()) {
-			headersNode.addObject().put("header", "Expect").put("value", "100-continue");
-		}
-		ArrayList<String> headerNames = httpHeadersTableModel.getHTTPHeaderNames();
-		ArrayList<String> headerValues = httpHeadersTableModel.getHTTPHeaderValues();
-		for (int i = 0; i < headerNames.size(); i++) {
-			headersNode.addObject().put("header", headerNames.get(i)).put("value", headerValues.get(i));
-		}
-
-		requestNode.set("headers", headersNode);
-		json.set("request", requestNode);
-
-		json.put("outgoingDataFormat", ((DATA_FORMAT) cbSendDataAs.getSelectedItem()).name());
-		json.put("showRedirectionOutputPort", cbShowRedirectionOutputPort
-				.isSelected());
-		json.put("showActualURLPort", cbShowActualUrlPort.isSelected());
-		json.put("showResponseHeadersPort", cbShowResponseHeadersPort.isSelected());
-		json.put("escapeParameters", cbEscapeParameters.isSelected());
-
-		configureInputPorts(serviceRegistry);
-		configureOutputPorts(serviceRegistry);
-	}
-
-	/**
-	 * Check that user values in the UI are valid.
-	 */
-	@Override
-	public boolean checkValues() {
-		// HTTP method is a fixed selection combo-box - no validation required
-
-		// URL signature must be present and be valid
-		String candidateURLSignature = tfURLSignature.getText().trim();
-		if (candidateURLSignature == null
-				|| candidateURLSignature.length() == 0) {
-			JOptionPane.showMessageDialog(MainWindow.getMainWindow(),
-					"URL signature must not be empty",
-					"REST Activity Configuration - Warning",
-					JOptionPane.WARNING_MESSAGE);
-			return (false);
-		} else {
-			try {
-				// Test if any exceptions will be thrown - if not, proceed to
-				// other validations
-				URISignatureHandler.validate(candidateURLSignature);
-			} catch (URISignatureParsingException e) {
-				JOptionPane.showMessageDialog(MainWindow.getMainWindow(), e
-						.getMessage(), "REST Activity Configuration - Warning",
-						JOptionPane.WARNING_MESSAGE);
-				return (false);
-			}
-
-			// Test if the URL string contains "unsafe" characters, i.e. characters
-			// that need URL-encoding.
-			// From RFC 1738: "...Only alphanumerics [0-9a-zA-Z], the special
-			// characters "$-_.+!*'()," (not including the quotes) and reserved
-			// characters used for their reserved purposes may be
-			// used unencoded within a URL."
-			// Reserved characters are: ";/?:@&=" ..." (excluding quotes) and "%" used
-			// for escaping.
-			// We do not warn the user if they have not properly enclosed parameter
-			// names in curly braces as this check is already being done elsewhere in the code.
-			// We do not check the characters in parameter names either.
-			try {
-				// Test if any exceptions will be thrown - if not, proceed to
-				// other validations
-				URISignatureHandler.checkForUnsafeCharacters(candidateURLSignature);
-			} catch (URISignatureParsingException e) {
-				JOptionPane.showMessageDialog(MainWindow.getMainWindow(), e
-						.getMessage(), "REST Activity Configuration - Warning",
-						JOptionPane.WARNING_MESSAGE);
-				return (false);
-			}
-
-			// Other HTTP headers configured must not have empty names
-			ArrayList<String> otherHTTPHeaderNames = httpHeadersTableModel.getHTTPHeaderNames();
-			for (String headerName : otherHTTPHeaderNames){
-				if (headerName.equals("")){
-					JOptionPane.showMessageDialog(MainWindow.getMainWindow(), "One of the HTTP header names is empty", "REST Activity Configuration - Warning",
-							JOptionPane.WARNING_MESSAGE);
-					return false;
-				}
-			}
-		}
-
-		// All valid, return true
-		return true;
-	}
-
-	/**
-	 * Update GUI from a changed configuration bean (perhaps by undo / redo).
-	 */
-	@Override
-	public void refreshConfiguration() {
-		RESTActivityConfigurationBean configBean = new RESTActivityConfigurationBean(json);
-
-		cbHTTPMethod.setSelectedItem(configBean.getHttpMethod());
-		tfURLSignature.setText(configBean.getUrlSignature());
-		tfURLSignature.setCaretPosition(0);
-		cbAccepts.setSelectedItem(configBean.getAcceptsHeaderValue());
-		cbContentType.setSelectedItem(configBean.getContentTypeForUpdates());
-		cbSendDataAs.setSelectedItem(configBean.getOutgoingDataFormat());
-		cbSendHTTPExpectHeader.setSelected(configBean
-				.getSendHTTPExpectRequestHeader());
-		cbShowRedirectionOutputPort.setSelected(configBean
-				.getShowRedirectionOutputPort());
-		cbShowActualUrlPort.setSelected(configBean.getShowActualUrlPort());
-		cbShowResponseHeadersPort.setSelected(configBean.getShowResponseHeadersPort());
-		cbEscapeParameters.setSelected(configBean.getEscapeParameters());
-		httpHeadersTableModel.setHTTPHeaderData(configBean.getOtherHTTPHeaders());
-	}
-
-	private JPanel createGeneralTab() {
-		JPanel jpGeneral = new JPanel(new GridBagLayout());
-		GridBagConstraints c = new GridBagConstraints();
-		// All components to be anchored WEST
-		c.anchor = GridBagConstraints.WEST;
-
-		c.gridx = 0;
-		c.gridy = 0;
-		c.gridwidth = 1;
-		c.insets = new Insets(7, 7, 3, 3);
-		c.weightx = 0.0;
-		c.fill = GridBagConstraints.NONE;
-		JLabel labelMethod = new JLabel("HTTP Method:", infoIcon, JLabel.LEFT);
-		labelMethod
-				.setToolTipText("<html>HTTP method determines how a request to the remote server will be made.<br><br>"
-						+ "Supported HTTP methods are normally used for different purposes:<br>"
-						+ "<b>GET</b> - to fetch data;<br>"
-						+ "<b>POST</b> - to create new resources;<br>"
-						+ "<b>PUT</b> - to update existing resources;<br>"
-						+ "<b>DELETE</b> - to remove existing resources.<br><br>"
-						+ "Documentation of the server that is about to be used may suggest the<br>"
-						+ "HTTP method that should be used.</html>");
-		jpGeneral.add(labelMethod, c);
-
-		// the HTTP method combo-box will always contain the same values - it is
-		// the selected
-		// method which is important; therefore, can prepopulate as the set of
-		// values is known
-		c.gridx++;
-		c.insets = new Insets(7, 3, 3, 7);
-		c.fill = GridBagConstraints.HORIZONTAL;
-		c.weightx = 1.0;
-		cbHTTPMethod = new JComboBox<>(HTTP_METHOD.values());
-		cbHTTPMethod.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				boolean contentTypeSelEnabled = RESTActivity
-						.hasMessageBodyInputPort((HTTP_METHOD) cbHTTPMethod
-								.getSelectedItem());
-
-				jlContentTypeExplanation.setVisible(contentTypeSelEnabled);
-				jlContentType.setVisible(contentTypeSelEnabled);
-				cbContentType.setVisible(contentTypeSelEnabled);
-				jlSendDataAs.setVisible(contentTypeSelEnabled);
-				cbSendDataAs.setVisible(contentTypeSelEnabled);
-
-				jlContentTypeExplanationPlaceholder
-						.setVisible(!contentTypeSelEnabled);
-				jlContentTypeLabelPlaceholder
-						.setVisible(!contentTypeSelEnabled);
-				jlContentTypeFieldPlaceholder
-						.setVisible(!contentTypeSelEnabled);
-				jlSendDataAsLabelPlaceholder.setVisible(!contentTypeSelEnabled);
-				jlSendDataAsFieldPlaceholder.setVisible(!contentTypeSelEnabled);
-			}
-		});
-		jpGeneral.add(cbHTTPMethod, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		c.insets = new Insets(3, 7, 3, 3);
-		c.fill = GridBagConstraints.NONE;
-		c.weightx = 0.0;
-		JLabel labelString = new JLabel("URL Template:", infoIcon, JLabel.LEFT);
-		labelString
-				.setToolTipText("<html>URL template enables to define a URL with <b>configurable<br>"
-						+ "parameters</b> that will be used to access a remote server.<br><br>"
-						+ "The template may contain zero or more <b>parameters</b> - each<br>"
-						+ "enclosed within curly braces <b>\"{\"</b> and <b>\"}\"</b>.<br>"
-						+ "Taverna will automatically create an individual input port for<br>"
-						+ "this activity for each parameter.<br><br>"
-						+ "Values extracted from these input ports during the workflow<br>"
-						+ "execution these will be used to replace the parameters to<br>"
-						+ "produce complete URLs.<br><br>"
-						+ "For example, if the URL template is configured as<br>"
-						+ "\"<i>http://www.myexperiment.org/user.xml?id={userID}</i>\", a<br>"
-						+ "single input port with the name \"<i>userID</i>\" will be created.</html>");
-		labelString.setLabelFor(tfURLSignature);
-		jpGeneral.add(labelString, c);
-
-		c.gridx++;
-		c.insets = new Insets(3, 3, 3, 7);
-		c.fill = GridBagConstraints.HORIZONTAL;
-		c.weightx = 1.0;
-		tfURLSignature = new JTextField(40);
-		tfURLSignature.addFocusListener(new FocusListener() {
-			public void focusGained(FocusEvent e) {
-				tfURLSignature.selectAll();
-			}
-
-			public void focusLost(FocusEvent e) { /* do nothing */
-			}
-		});
-		jpGeneral.add(tfURLSignature, c);
-
-		c.gridx = 0;
-		c.gridwidth = 2;
-		c.gridy++;
-		c.weightx = 0.0;
-		c.fill = GridBagConstraints.NONE;
-		c.insets = new Insets(18, 7, 3, 7);
-		JLabel jlAcceptsExplanation = new JLabel(
-				"Preferred MIME type for data to be fetched from the remote server --");
-		jpGeneral.add(jlAcceptsExplanation, c);
-		c.gridwidth = 1;
-
-		c.gridx = 0;
-		c.gridy++;
-		c.insets = new Insets(3, 7, 3, 3);
-		c.weightx = 0.0;
-		c.fill = GridBagConstraints.NONE;
-		JLabel jlAccepts = new JLabel("'Accept' header:", infoIcon, JLabel.LEFT);
-		jlAccepts
-				.setToolTipText("<html>Select a MIME type from the drop-down menu or type your own.<br>Select blank if you do not want this header to be set.</br>");
-		jlAccepts.setLabelFor(cbAccepts);
-		jpGeneral.add(jlAccepts, c);
-
-		c.gridx++;
-		c.insets = new Insets(3, 3, 3, 7);
-		c.weightx = 1.0;
-		c.fill = GridBagConstraints.HORIZONTAL;
-		cbAccepts = new JComboBox<>(getMediaTypes());
-		cbAccepts.setEditable(true);
-		cbAccepts.getEditor().getEditorComponent().addFocusListener(
-				new FocusListener() {
-					public void focusGained(FocusEvent e) {
-						cbAccepts.getEditor().selectAll();
-					}
-
-					public void focusLost(FocusEvent e) { /* do nothing */
-					}
-				});
-		jpGeneral.add(cbAccepts, c);
-
-		c.gridx = 0;
-		c.gridwidth = 2;
-		c.gridy++;
-		c.insets = new Insets(18, 7, 3, 7);
-		c.weightx = 0.0;
-		c.fill = GridBagConstraints.NONE;
-		jlContentTypeExplanation = new JLabel(
-				"MIME type of data that will be sent to the remote server --");
-		jpGeneral.add(jlContentTypeExplanation, c);
-		c.gridwidth = 1;
-
-		c.gridx = 0;
-		c.gridy++;
-		c.insets = new Insets(3, 7, 3, 3);
-		c.weightx = 0.0;
-		c.fill = GridBagConstraints.NONE;
-		jlContentType = new JLabel("'Content-Type' header:", infoIcon,
-				JLabel.LEFT);
-		jlContentType
-				.setToolTipText("<html>Select a MIME type from the drop-down menu or type your own.<br>Select blank if you do not want this header to be set.</html>");
-		jlContentType.setLabelFor(cbContentType);
-		jpGeneral.add(jlContentType, c);
-
-		c.gridx++;
-		c.insets = new Insets(3, 3, 3, 7);
-		c.weightx = 1.0;
-		c.fill = GridBagConstraints.HORIZONTAL;
-		cbContentType = new JComboBox<>(getMediaTypes());
-		cbContentType.setEditable(true);
-		cbContentType.getEditor().getEditorComponent().addFocusListener(
-				new FocusListener() {
-					public void focusGained(FocusEvent e) {
-						cbContentType.getEditor().selectAll();
-					}
-
-					public void focusLost(FocusEvent e) { /* do nothing */
-					}
-				});
-		cbContentType.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				// change selection in the "Send data as" combo-box, based on
-				// the selection of Content-Type
-				String selectedContentType = (String) cbContentType
-						.getSelectedItem();
-				if (selectedContentType.startsWith("text")) {
-					cbSendDataAs.setSelectedItem(DATA_FORMAT.String);
-				} else {
-					cbSendDataAs.setSelectedItem(DATA_FORMAT.Binary);
-				}
-			}
-		});
-		jpGeneral.add(cbContentType, c);
-
-		c.gridx = 0;
-		c.gridwidth = 2;
-		c.gridy++;
-		c.insets = new Insets(18, 7, 3, 7);
-		c.weightx = 0.0;
-		c.fill = GridBagConstraints.NONE;
-		jlContentTypeExplanationPlaceholder = new JLabel();
-		jlContentTypeExplanationPlaceholder
-				.setPreferredSize(jlContentTypeExplanation.getPreferredSize());
-		jpGeneral.add(jlContentTypeExplanationPlaceholder, c);
-		c.gridwidth = 1;
-
-		c.gridx = 0;
-		c.gridy++;
-		c.insets = new Insets(3, 7, 3, 3);
-		c.weightx = 0.0;
-		c.fill = GridBagConstraints.NONE;
-		jlContentTypeLabelPlaceholder = new JLabel();
-		jlContentTypeLabelPlaceholder.setPreferredSize(jlContentType
-				.getPreferredSize());
-		jpGeneral.add(jlContentTypeLabelPlaceholder, c);
-
-		c.gridx++;
-		c.insets = new Insets(3, 3, 3, 7);
-		c.weightx = 1.0;
-		c.fill = GridBagConstraints.HORIZONTAL;
-		jlContentTypeFieldPlaceholder = new JLabel();
-		jlContentTypeFieldPlaceholder.setPreferredSize(cbContentType
-				.getPreferredSize());
-		jpGeneral.add(jlContentTypeFieldPlaceholder, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		c.weightx = 0.0;
-		c.fill = GridBagConstraints.NONE;
-		c.insets = new Insets(3, 7, 8, 3);
-		jlSendDataAs = new JLabel("Send data as:", infoIcon, JLabel.LEFT);
-		jlSendDataAs
-				.setToolTipText("Select the format for the data to be sent to the remote server");
-		jlSendDataAs.setLabelFor(cbSendDataAs);
-		jpGeneral.add(jlSendDataAs, c);
-
-		c.gridx++;
-		c.insets = new Insets(3, 3, 8, 7);
-		c.weightx = 1.0;
-		c.fill = GridBagConstraints.HORIZONTAL;
-		cbSendDataAs = new JComboBox<>(DATA_FORMAT.values());
-		cbSendDataAs.setEditable(false);
-		jpGeneral.add(cbSendDataAs, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		c.insets = new Insets(3, 7, 8, 3);
-		c.weightx = 0.0;
-		c.fill = GridBagConstraints.NONE;
-		jlSendDataAsLabelPlaceholder = new JLabel();
-		jlSendDataAsLabelPlaceholder.setPreferredSize(jlSendDataAs
-				.getPreferredSize());
-		jpGeneral.add(jlSendDataAsLabelPlaceholder, c);
-
-		c.gridx++;
-		c.insets = new Insets(3, 3, 8, 7);
-		c.weightx = 1.0;
-		c.fill = GridBagConstraints.HORIZONTAL;
-		jlSendDataAsFieldPlaceholder = new JLabel();
-		jlSendDataAsFieldPlaceholder.setPreferredSize(cbSendDataAs
-				.getPreferredSize());
-		jpGeneral.add(jlSendDataAsFieldPlaceholder, c);
-
-		JPanel finalPanel = new JPanel(new BorderLayout());
-		finalPanel.add(jpGeneral, BorderLayout.NORTH);
-		return (finalPanel);
-	}
-
-	private String[] getMediaTypes() {
-		if (mediaTypes != null) {
-			return mediaTypes;
-		}
-		List<String> types = new ArrayList<String>();
-		InputStream typesStream = getClass().getResourceAsStream(
-				"mediatypes.txt");
-		try {
-			// media types must be ASCII and can't have whitespace
-			Scanner scanner = new Scanner(typesStream, "ascii");
-			while (scanner.hasNext()) {
-				types.add(scanner.next());
-			}
-			scanner.close();
-		} finally {
-			try {
-				typesStream.close();
-			} catch (IOException ex) {
-			}
-		}
-		mediaTypes = types.toArray(new String[0]);
-
-		return mediaTypes;
-	}
-
-	private JPanel createAdvancedTab() {
-		JPanel jpAdvanced = new JPanel(new GridBagLayout());
-		GridBagConstraints c = new GridBagConstraints();
-
-		c.gridx = 0;
-		c.gridy = 0;
-		c.anchor = GridBagConstraints.WEST;
-		c.fill = GridBagConstraints.BOTH;
-		c.insets = new Insets(8, 10, 2, 4);
-		JLabel jlExpectHeaderInfoIcon = new JLabel(infoIcon);
-		jlExpectHeaderInfoIcon
-				.setToolTipText("<html>Ticking this checkbox may significantly improve performance when<br>"
-						+ "large volumes of data are sent to the remote server and a redirect<br>"
-						+ "from the original URL to the one specified by the server is likely.<br>"
-						+ "<br>"
-						+ "However, this checkbox <b>must not</b> be ticked to allow this activity<br>"
-						+ "to post updates to Twitter.</html>");
-		jpAdvanced.add(jlExpectHeaderInfoIcon, c);
-
-		c.gridx++;
-		c.weightx = 1.0;
-		c.insets = new Insets(8, 0, 2, 8);
-		cbSendHTTPExpectHeader = new JCheckBox(
-				"Send HTTP Expect request-header field");
-		jpAdvanced.add(cbSendHTTPExpectHeader, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		c.weightx = 0;
-		c.insets = new Insets(2, 10, 5, 4);
-		JLabel jlShowRedirectionOutputPortInfoIcon = new JLabel(infoIcon);
-		jlShowRedirectionOutputPortInfoIcon
-				.setToolTipText("<html>\"Redirection\" output port displays the URL of the final redirect<br>"
-						+ "that has yielded the output data on the \"Response Body\" port.</html>");
-		jpAdvanced.add(jlShowRedirectionOutputPortInfoIcon, c);
-
-		c.gridx++;
-		c.weightx = 1.0;
-		c.insets = new Insets(2, 0, 5, 8);
-		cbShowRedirectionOutputPort = new JCheckBox(
-				"Show \"Redirection\" output port");
-		jpAdvanced.add(cbShowRedirectionOutputPort, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		c.weightx = 0;
-		c.insets = new Insets(2, 10, 5, 4);
-		JLabel jlShowActualUrlPortInfoIcon = new JLabel(infoIcon);
-		jlShowActualUrlPortInfoIcon
-				.setToolTipText("<html>\"Actual URL\" output port displays the URL used by the REST service<br>"
-						+ "with the actual parameter values.</html>");
-		jpAdvanced.add(jlShowActualUrlPortInfoIcon, c);
-
-		c.gridx++;
-		c.weightx = 1.0;
-		c.insets = new Insets(2, 0, 5, 8);
-		cbShowActualUrlPort = new JCheckBox(
-				"Show \"Actual URL\" output port");
-		jpAdvanced.add(cbShowActualUrlPort, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		c.weightx = 0;
-		c.insets = new Insets(2, 10, 5, 4);
-		JLabel jlShowResponseHeadersPortInfoIcon = new JLabel(infoIcon);
-		jlShowResponseHeadersPortInfoIcon
-				.setToolTipText("<html>\"Response headers\" output port displays the HTTP headers<br>"
-						+ "received from the final (after redirection) HTTP call.</html>");
-		jpAdvanced.add(jlShowResponseHeadersPortInfoIcon, c);
-
-		c.gridx++;
-		c.weightx = 1.0;
-		c.insets = new Insets(2, 0, 5, 8);
-		cbShowResponseHeadersPort = new JCheckBox(
-				"Show \"Response headers\" output port");
-		jpAdvanced.add(cbShowResponseHeadersPort, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		c.weightx = 0;
-		c.insets = new Insets(2, 10, 5, 4);
-		JLabel jlEscapeParametersInfoIcon = new JLabel(infoIcon);
-		jlEscapeParametersInfoIcon
-				.setToolTipText("<html>Determines if parameters you pass to form the full URL<br>" +
-						" of the REST service will be URL-escaped.</html>");
-		jpAdvanced.add(jlEscapeParametersInfoIcon, c);
-
-		c.gridx++;
-		c.weightx = 1.0;
-		c.insets = new Insets(2, 0, 5, 8);
-		cbEscapeParameters = new JCheckBox("Escape URL parameter values");
-		jpAdvanced.add(cbEscapeParameters, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		c.weightx = 0;
-		c.anchor = GridBagConstraints.WEST;
-		c.fill = GridBagConstraints.NONE;
-		c.insets = new Insets(2, 10, 5, 4);
-		JLabel jlHTTPHeadersInfoIcon = new JLabel(infoIcon);
-		jlHTTPHeadersInfoIcon
-				.setToolTipText("<html>Set additional HTTP headers</html>");
-		jpAdvanced.add(jlHTTPHeadersInfoIcon, c);
-
-		c.gridx = 1;
-		c.weightx = 0;
-		c.weighty = 0;
-		c.anchor = GridBagConstraints.WEST;
-		c.fill = GridBagConstraints.NONE;
-		c.insets = new Insets(2, 10, 5, 4);
-		addHeaderButton = new JButton("Add HTTP header");
-		addHeaderButton.addActionListener(new ActionListener() {
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				httpHeadersTableModel.addEmptyRow();
-				httpHeadersTable.getSelectionModel().setSelectionInterval(httpHeadersTableModel.getRowCount() - 1, httpHeadersTableModel.getRowCount() - 1);			}
-		});
-		removeHeaderButton = new JButton("Remove HTTP header");
-		removeHeaderButton.addActionListener(new ActionListener() {
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				int row = httpHeadersTable.getSelectedRow();
-				httpHeadersTableModel.removeRow(row);
-			}
-		});
-		JPanel buttonPanel = new JPanel();
-		buttonPanel.add(addHeaderButton, FlowLayout.LEFT);
-		buttonPanel.add(removeHeaderButton);
-		jpAdvanced.add(buttonPanel, c);
-
-		c.gridx = 1;
-		c.gridy++;
-		c.weightx = 0;
-		c.weighty = 1.0;
-		c.fill = GridBagConstraints.BOTH;
-		c.insets = new Insets(2, 10, 5, 4);
-		httpHeadersTableModel = new HTTPHeadersTableModel();
-		httpHeadersTable = new JTable(httpHeadersTableModel);
-		httpHeadersTable.setGridColor(Color.GRAY);
-		httpHeadersTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-		setVisibleRowCount(httpHeadersTable, 3);
-		JScrollPane headersTableScrollPane = new JScrollPane(httpHeadersTable);
-		jpAdvanced.add(headersTableScrollPane, c);
-
-		return (jpAdvanced);
-	}
-
-	/*
-	 * Based on http://www.javalobby.org/java/forums/t19559.html
-	 */
-	public static void setVisibleRowCount(JTable table, int visibleRows){
-	    int height = 0;
-	    for(int row = 0; row < visibleRows; row++)
-	        height += table.getRowHeight(row);
-
-	    table.setPreferredScrollableViewportSize(new Dimension(
-	            table.getPreferredScrollableViewportSize().width,
-	            height));
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigureAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigureAction.java b/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigureAction.java
deleted file mode 100644
index bfb50d0..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigureAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package net.sf.taverna.t2.activities.rest.ui.config;
-
-import java.awt.Frame;
-import java.awt.event.ActionEvent;
-
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-@SuppressWarnings("serial")
-/**
- * @author Sergejs Aleksejevs
- * @author David Withers
- */
-public class RESTActivityConfigureAction extends ActivityConfigurationAction {
-
-	private final EditManager editManager;
-	private final FileManager fileManager;
-	private final ServiceRegistry serviceRegistry;
-
-	public RESTActivityConfigureAction(Activity activity, Frame owner, EditManager editManager,
-			FileManager fileManager, ActivityIconManager activityIconManager,
-			ServiceDescriptionRegistry serviceDescriptionRegistry, ServiceRegistry serviceRegistry) {
-		super(activity, activityIconManager, serviceDescriptionRegistry);
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		this.serviceRegistry = serviceRegistry;
-	}
-
-	public void actionPerformed(ActionEvent e) {
-		ActivityConfigurationDialog currentDialog = ActivityConfigurationAction
-				.getDialog(getActivity());
-
-		if (currentDialog != null) {
-			currentDialog.toFront();
-			return;
-		}
-
-		RESTActivityConfigurationPanel panel = new RESTActivityConfigurationPanel(getActivity(), serviceRegistry);
-		ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(getActivity(), panel,
-				editManager);
-
-		ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateAction.java b/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateAction.java
deleted file mode 100644
index 96326f6..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateAction.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.rest.ui.menu;
-
-import java.awt.event.ActionEvent;
-import java.net.URI;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.rest.ui.servicedescription.GenericRESTTemplateService;
-import net.sf.taverna.t2.ui.menu.AbstractContextualMenuAction;
-import net.sf.taverna.t2.ui.menu.MenuManager;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.core.Workflow;
-
-/**
- * An action to add a REST activity + a wrapping processor to the workflow.
- *
- * @author Alex Nenadic
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class AddRESTTemplateAction extends AbstractContextualMenuAction {
-
-	private static final String ADD_REST = "REST";
-
-	private static final URI insertSection = URI
-			.create("http://taverna.sf.net/2009/contextMenu/insert");
-
-	private EditManager editManager;
-	private MenuManager menuManager;
-	private SelectionManager selectionManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceRegistry serviceRegistry;
-
-	public AddRESTTemplateAction() {
-		super(insertSection, 500);
-	}
-
-	@Override
-	public boolean isEnabled() {
-		return super.isEnabled() && getContextualSelection().getSelection() instanceof Workflow;
-	}
-
-	@Override
-	protected Action createAction() {
-
-		return new AddRestAction();
-	}
-
-	protected class AddRestAction extends AbstractAction {
-		AddRestAction() {
-			super(ADD_REST, activityIconManager
-					.iconForActivity(GenericRESTTemplateService.ACTIVITY_TYPE));
-		}
-
-		public void actionPerformed(ActionEvent e) {
-			WorkflowView.importServiceDescription(
-					GenericRESTTemplateService.getServiceDescription(), false, editManager,
-					menuManager, selectionManager, serviceRegistry);
-		}
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setMenuManager(MenuManager menuManager) {
-		this.menuManager = menuManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateMenuAction.java
deleted file mode 100644
index ec738e2..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateMenuAction.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.rest.ui.menu;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-import java.net.URI;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.KeyStroke;
-
-import net.sf.taverna.t2.activities.rest.ui.servicedescription.GenericRESTTemplateService;
-import net.sf.taverna.t2.ui.menu.AbstractMenuAction;
-import net.sf.taverna.t2.ui.menu.DesignOnlyAction;
-import net.sf.taverna.t2.ui.menu.MenuManager;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
-import uk.org.taverna.commons.services.ServiceRegistry;
-
-/**
- * An action to add a REST activity + a wrapping processor to the workflow.
- *
- * @author Alex Nenadic
- * @author alanrw
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class AddRESTTemplateMenuAction extends AbstractMenuAction {
-
-	private static final String ADD_REST = "REST";
-
-	private static final URI INSERT = URI
-			.create("http://taverna.sf.net/2008/t2workbench/menu#insert");
-
-	private static final URI ADD_REST_URI = URI
-			.create("http://taverna.sf.net/2008/t2workbench/menu#graphMenuAddREST");
-
-	private EditManager editManager;
-	private MenuManager menuManager;
-	private SelectionManager selectionManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceRegistry serviceRegistry;
-
-	public AddRESTTemplateMenuAction() {
-		super(INSERT, 500, ADD_REST_URI);
-	}
-
-	@Override
-	protected Action createAction() {
-		return new AddRESTMenuAction();
-	}
-
-	protected class AddRESTMenuAction extends AbstractAction implements DesignOnlyAction {
-		AddRESTMenuAction() {
-			super();
-			putValue(SMALL_ICON, activityIconManager.iconForActivity(GenericRESTTemplateService.ACTIVITY_TYPE));
-			putValue(NAME, ADD_REST);
-			putValue(SHORT_DESCRIPTION, "REST service");
-			putValue(
-					Action.ACCELERATOR_KEY,
-					KeyStroke.getKeyStroke(KeyEvent.VK_H, InputEvent.SHIFT_DOWN_MASK
-							| InputEvent.ALT_DOWN_MASK));
-		}
-
-		public void actionPerformed(ActionEvent e) {
-			WorkflowView.importServiceDescription(
-					GenericRESTTemplateService.getServiceDescription(), false, editManager,
-					menuManager, selectionManager, serviceRegistry);
-		}
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setMenuManager(MenuManager menuManager) {
-		this.menuManager = menuManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/GenericRESTTemplateService.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/GenericRESTTemplateService.java b/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/GenericRESTTemplateService.java
deleted file mode 100644
index 69a3b96..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/GenericRESTTemplateService.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package net.sf.taverna.t2.activities.rest.ui.servicedescription;
-
-import java.net.URI;
-
-import javax.swing.Icon;
-
-import net.sf.taverna.t2.activities.rest.RESTActivity;
-import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-
-import com.fasterxml.jackson.databind.node.ArrayNode;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
-/**
- * @author Sergejs Aleksejevs
- * @author David Withers
- */
-public class GenericRESTTemplateService extends AbstractTemplateService {
-
-	public static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/rest");
-
-	private static final String REST = "REST";
-
-	@Override
-	public URI getActivityType() {
-		return ACTIVITY_TYPE;
-	}
-
-	@Override
-	public Configuration getActivityConfiguration() {
-		Configuration configuration = new Configuration();
-		configuration.setType(ACTIVITY_TYPE.resolve("#Config"));
-		ObjectNode json = (ObjectNode) configuration.getJson();
-		ObjectNode requestNode = json.objectNode();
-
-		requestNode.put("httpMethod", RESTActivity.HTTP_METHOD.GET.name());
-		requestNode.put("absoluteURITemplate", "http://www.uniprot.org/uniprot/{id}.xml");
-
-		ArrayNode headersNode = requestNode.arrayNode();
-		headersNode.addObject().put("header", "Accept").put("value", "application/xml");
-		headersNode.addObject().put("header", "Content-Type").put("value", "application/xml");
-
-		requestNode.set("headers", headersNode);
-		json.set("request", requestNode);
-		json.put("outgoingDataFormat", RESTActivity.DATA_FORMAT.String.name());
-		json.put("showRedirectionOutputPort", false);
-		json.put("showActualURLPort", false);
-		json.put("showResponseHeadersPort", false);
-		json.put("escapeParameters", true);
-		return configuration;
-	}
-
-	@Override
-	public Icon getIcon() {
-		return RESTActivityIcon.getRESTActivityIcon();
-	}
-
-	public String getName() {
-		return REST;
-	}
-
-	public String getDescription() {
-		return "A generic REST service that can handle all HTTP methods";
-	}
-
-	public static ServiceDescription getServiceDescription() {
-		GenericRESTTemplateService gts = new GenericRESTTemplateService();
-		return gts.templateService;
-	}
-
-	public String getId() {
-		return "http://www.taverna.org.uk/2010/services/rest";
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/RESTActivityIcon.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/RESTActivityIcon.java b/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/RESTActivityIcon.java
deleted file mode 100644
index c2309a9..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/RESTActivityIcon.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package net.sf.taverna.t2.activities.rest.ui.servicedescription;
-
-import java.awt.Color;
-import java.net.URI;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-
-/**
- *
- * @author Sergejs Aleksejevs
- * @author David Withers
- */
-public class RESTActivityIcon implements ActivityIconSPI {
-	private static final Color PROCESSOR_COLOUR = Color.decode("#7AAFFF");
-
-	private static ImageIcon icon;
-
-	public int canProvideIconScore(URI activityType) {
-		if (GenericRESTTemplateService.ACTIVITY_TYPE.equals(activityType))
-			return DEFAULT_ICON + 1;
-		else
-			return NO_ICON;
-	}
-
-	public Icon getIcon(URI activityType) {
-		return getRESTActivityIcon();
-	}
-
-	public static Icon getRESTActivityIcon() {
-		if (icon == null) {
-			synchronized (RESTActivityIcon.class) {
-				if (icon == null) {
-					try {
-						icon = new ImageIcon(
-								RESTActivityIcon.class.getResource("service_type_rest.png"));
-					} catch (NullPointerException e) {
-						/* icon wasn't found - do nothing, but no icon will be available */
-					}
-				}
-			}
-		}
-		return (icon);
-	}
-
-	public void setColourManager(ColourManager colourManager) {
-		// set colour for REST processors in the workflow diagram
-		colourManager.setPreferredColour(GenericRESTTemplateService.ACTIVITY_TYPE.toString(), PROCESSOR_COLOUR);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceDesc.java.bak
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceDesc.java.bak b/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceDesc.java.bak
deleted file mode 100644
index 5d9848d..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceDesc.java.bak
+++ /dev/null
@@ -1,99 +0,0 @@
-package net.sf.taverna.t2.activities.rest.ui.serviceprovider;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-
-import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
-import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
-
-import net.sf.taverna.t2.activities.rest.RESTActivity;
-import net.sf.taverna.t2.activities.rest.RESTActivityConfigurationBean;
-
-public class ExampleServiceDesc extends ServiceDescription<RESTActivityConfigurationBean>
-{
-	/**
-	 * The subclass of Activity which should be instantiated when adding a service
-	 * for this description 
-	 */
-	@Override
-	public Class<? extends Activity<RESTActivityConfigurationBean>> getActivityClass() {
-		return RESTActivity.class;
-	}
-
-	/**
-	 * The configuration bean which is to be used for configuring the instantiated activity.
-	 * Making this bean will typically require some of the fields set on this service
-	 * description, like an endpoint URL or method name. 
-	 * 
-	 */
-	@Override
-	public RESTActivityConfigurationBean getActivityConfiguration() {
-		RESTActivityConfigurationBean bean = new RESTActivityConfigurationBean();
-		bean.setExampleString(exampleString);
-		bean.setExampleUri(exampleUri);
-		return bean;
-	}
-
-	/**
-	 * An icon to represent this service description in the service palette.
-	 */
-	@Override
-	public Icon getIcon() {
-	  return null;
-	}
-
-	/**
-	 * The display name that will be shown in service palette and will
-	 * be used as a template for processor name when added to workflow.
-	 */
-	@Override
-	public String getName() {
-		return exampleString;
-	}
-
-	/**
-	 * The path to this service description in the service palette. Folders
-	 * will be created for each element of the returned path.
-	 */
-	@Override
-	public List<String> getPath() {
-		// For deeper paths you may return several strings
-		return Arrays.asList("Service templates", "Examples " + exampleUri);
-	}
-
-	/**
-	 * Return a list of data values uniquely identifying this service
-	 * description (to avoid duplicates). Include only primary key like fields,
-	 * ie. ignore descriptions, icons, etc.
-	 */
-	@Override
-	protected List<? extends Object> getIdentifyingData() {
-		// FIXME: Use your fields instead of example fields
-		return Arrays.<Object>asList(exampleString, exampleUri);
-	}
-
-	
-	// FIXME: Replace example fields and getters/setters with any required
-	// and optional fields. (All fields are searchable in the Service palette,
-	// for instance try a search for exampleString:3)
-	private String exampleString;
-	private URI exampleUri;
-	public String getExampleString() {
-		return exampleString;
-	}
-	public URI getExampleUri() {
-		return exampleUri;
-	}
-	public void setExampleString(String exampleString) {
-		this.exampleString = exampleString;
-	}
-	public void setExampleUri(URI exampleUri) {
-		this.exampleUri = exampleUri;
-	}
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProvider.java.bak
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProvider.java.bak b/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProvider.java.bak
deleted file mode 100644
index ff11dbe..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProvider.java.bak
+++ /dev/null
@@ -1,106 +0,0 @@
-package net.sf.taverna.t2.activities.rest.ui.serviceprovider;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-import javax.swing.JOptionPane;
-
-import net.sf.taverna.t2.servicedescriptions.AbstractConfigurableServiceProvider;
-import net.sf.taverna.t2.servicedescriptions.ConfigurableServiceProvider;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider;
-import net.sf.taverna.t2.workflowmodel.ConfigurationException;
-
-public class ExampleServiceProvider extends AbstractConfigurableServiceProvider<ExampleServiceProviderConfig>
-                                    implements ConfigurableServiceProvider<ExampleServiceProviderConfig>
-{
-	public ExampleServiceProvider()
-	{
-    super(new ExampleServiceProviderConfig());
-  }
-
-  /**
-	 * Do the actual search for services. Return using the callBack parameter.
-	 */
-	@SuppressWarnings("unchecked")
-	public void findServiceDescriptionsAsync(
-			FindServiceDescriptionsCallBack callBack) {
-		// Use callback.status() for long-running searches
-		// callBack.status("Resolving example services");
-
-		List<ServiceDescription> results = new ArrayList<ServiceDescription>();
-
-		// FIXME: Implement the actual service search/lookup instead
-		// of dummy for-loop
-		for (int i = 1; i <= getConfiguration().getNumberOfServices(); i++) {
-			ExampleServiceDesc service = new ExampleServiceDesc();
-			// Populate the service description bean
-			service.setExampleString("Example " + i);
-			service.setExampleUri(getConfiguration().getUri());
-
-			// Optional: set description
-			service.setDescription("Service example number " + i);
-			results.add(service);
-		}
-		
-		// partialResults() can also be called several times from inside
-		// for-loop if the full search takes a long time
-		callBack.partialResults(results);
-
-		// No more results will be coming
-		callBack.finished();
-	}
-	
-	
-//	@Override
-//	/**
-//	 * This allows to have a few configured service providers in the Service Panel at startup;
-//	 * useful if there are some prototypical ones that are useful + need to allow users to add their own
-//	 * through manual config.
-//	 */
-//	public List<ExampleServiceProviderConfig> getDefaultConfigurations() {
-//	  ExampleServiceProviderConfig a = new ExampleServiceProviderConfig();
-//	  a.setUri(URI.create("http://localhost:8181/serviceA"));
-//	  ExampleServiceProviderConfig b = new ExampleServiceProviderConfig();
-//	  b.setUri(URI.create("http://fish.com/serviceB"));
-//	  b.setNumberOfServices(2);
-//	  return Arrays.asList(a, b);
-//	}
-
-	
-
-	/**
-	 * Icon for service provider
-	 */
-	public Icon getIcon() {
-		return null;
-	}
-
-	
-	/**
-	 * Appears in "Import new services..." in Service Panel
-	 */
-	public String getName() {
-		return "My example service";
-	}
-	
-	@Override
-	/**
-   * Name of service provider, appears in right click for 'Remove service
-   * provider'
-   */
-	public String toString() {
-		return getName() + " " + getConfiguration().getUri();
-	}
-
-  @Override
-  protected List<? extends Object> getIdentifyingData() {
-    return Arrays.asList(getConfiguration().getUri());
-  }
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProviderConfig.java.bak
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProviderConfig.java.bak b/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProviderConfig.java.bak
deleted file mode 100644
index 22d8546..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProviderConfig.java.bak
+++ /dev/null
@@ -1,31 +0,0 @@
-package net.sf.taverna.t2.activities.rest.ui.serviceprovider;
-
-import java.net.URI;
-
-import net.sf.taverna.t2.lang.beans.PropertyAnnotated;
-import net.sf.taverna.t2.lang.beans.PropertyAnnotation;
-
-public class ExampleServiceProviderConfig extends PropertyAnnotated
-{
-  private URI uri = URI.create("http://www.example.com");
-  private int numberOfServices = 5;
-  
-  @PropertyAnnotation(displayName="Provider URI", preferred=true)
-  public URI getUri() {
-    return uri;
-  }
-  
-  public void setUri(URI uri) {
-    this.uri = uri;
-  }
-  
-  @PropertyAnnotation(displayName="Number of services")
-  public int getNumberOfServices() {
-    return numberOfServices;
-  }
-  
-  public void setNumberOfServices(int numberOfServices) {
-    this.numberOfServices = numberOfServices;
-  }
-  
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/ConfigureRESTActivityMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/ConfigureRESTActivityMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/ConfigureRESTActivityMenuAction.java
deleted file mode 100644
index 91e198f..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/ConfigureRESTActivityMenuAction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package net.sf.taverna.t2.activities.rest.ui.view;
-
-import javax.swing.Action;
-
-import uk.org.taverna.commons.services.ServiceRegistry;
-
-import net.sf.taverna.t2.activities.rest.ui.config.RESTActivityConfigureAction;
-import net.sf.taverna.t2.activities.rest.ui.servicedescription.GenericRESTTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-
-/**
- * This action is responsible for enabling the contextual menu entry on processors that perform
- * RESTActivity'ies.
- * NB! As a side-effect this also enables the pop-up with for configuration of the processor when it
- * is added to the workflow from the Service Panel.
- *
- * @author Sergejs Aleksejevs
- * @author David Withers
- */
-public class ConfigureRESTActivityMenuAction extends AbstractConfigureActivityMenuAction {
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ServiceRegistry serviceRegistry;
-
-	public ConfigureRESTActivityMenuAction() {
-		super(GenericRESTTemplateService.ACTIVITY_TYPE);
-	}
-
-	@Override
-	protected Action createAction() {
-		RESTActivityConfigureAction configAction = new RESTActivityConfigureAction(findActivity(),
-				getParentFrame(), editManager, fileManager, activityIconManager,
-				serviceDescriptionRegistry, serviceRegistry);
-		configAction.putValue(Action.NAME, "Configure REST service");
-		addMenuDots(configAction);
-		return configAction;
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextViewFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextViewFactory.java b/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextViewFactory.java
deleted file mode 100644
index 5bea949..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextViewFactory.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package net.sf.taverna.t2.activities.rest.ui.view;
-
-import java.util.Arrays;
-import java.util.List;
-
-import net.sf.taverna.t2.activities.rest.ui.servicedescription.GenericRESTTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-public class RESTActivityMainContextViewFactory implements ContextualViewFactory<Activity> {
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private ActivityIconManager activityIconManager;
-	private ColourManager colourManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ServiceRegistry serviceRegistry;
-
-	public boolean canHandle(Object selection) {
-		return selection instanceof Activity
-				&& ((Activity) selection).getType()
-						.equals(GenericRESTTemplateService.ACTIVITY_TYPE);
-	}
-
-	public List<ContextualView> getViews(Activity selection) {
-		return Arrays.<ContextualView> asList(new RESTActivityMainContextualView(selection,
-				editManager, fileManager, activityIconManager, colourManager,
-				serviceDescriptionRegistry, serviceRegistry));
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setColourManager(ColourManager colourManager) {
-		this.colourManager = colourManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextualView.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextualView.java b/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextualView.java
deleted file mode 100644
index f4ffe0f..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextualView.java
+++ /dev/null
@@ -1,220 +0,0 @@
-package net.sf.taverna.t2.activities.rest.ui.view;
-
-import java.awt.Font;
-import java.awt.Frame;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-
-import javax.swing.Action;
-import javax.swing.BorderFactory;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import javax.swing.JTextField;
-
-import net.sf.taverna.t2.activities.rest.RESTActivity;
-import net.sf.taverna.t2.activities.rest.RESTActivity.HTTP_METHOD;
-import net.sf.taverna.t2.activities.rest.RESTActivityConfigurationBean;
-import net.sf.taverna.t2.activities.rest.ui.config.RESTActivityConfigureAction;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.common.Scufl2Tools;
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-
-@SuppressWarnings("serial")
-public class RESTActivityMainContextualView extends ContextualView {
-
-	private final Scufl2Tools scufl2Tools = new Scufl2Tools();
-
-	private final Activity activity;
-
-	private JPanel jpMainPanel;
-	private JTextField tfHTTPMethod;
-	private JTextArea taURLSignature;
-	private JTextField tfAcceptHeader;
-	private JLabel jlContentType;
-	private JTextField tfContentTypeHeader;
-	private JLabel jlSendDataAs;
-	private JTextField tfSendDataAs;
-	private JLabel jlSendHTTPExpectRequestHeader;
-	private JTextField tfSendHTTPExpectRequestHeader;
-
-	private final EditManager editManager;
-	private final FileManager fileManager;
-	private final ActivityIconManager activityIconManager;
-	private final ColourManager colourManager;
-	private final ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private final ServiceRegistry serviceRegistry;
-
-	public RESTActivityMainContextualView(Activity activity, EditManager editManager,
-			FileManager fileManager, ActivityIconManager activityIconManager,
-			ColourManager colourManager, ServiceDescriptionRegistry serviceDescriptionRegistry,
-			ServiceRegistry serviceRegistry) {
-		this.activity = activity;
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		this.activityIconManager = activityIconManager;
-		this.colourManager = colourManager;
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-		this.serviceRegistry = serviceRegistry;
-		initView();
-	}
-
-	@Override
-	public JComponent getMainFrame() {
-		jpMainPanel = new JPanel(new GridBagLayout());
-		jpMainPanel
-				.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(4, 2,
-						4, 2), BorderFactory.createLineBorder(
-						colourManager.getPreferredColour(RESTActivity.class.getCanonicalName()), 2)));
-
-		GridBagConstraints c = new GridBagConstraints();
-		c.fill = GridBagConstraints.HORIZONTAL;
-		c.anchor = GridBagConstraints.WEST;
-		c.weighty = 0;
-
-		c.gridx = 0;
-		c.gridy = 0;
-		c.insets = new Insets(5, 5, 5, 5);
-		JLabel jlHTTPMethod = new JLabel("HTTP Method:");
-		jlHTTPMethod.setFont(jlHTTPMethod.getFont().deriveFont(Font.BOLD));
-		jpMainPanel.add(jlHTTPMethod, c);
-
-		c.gridx++;
-		c.weightx = 1.0;
-		tfHTTPMethod = new JTextField();
-		tfHTTPMethod.setEditable(false);
-		jpMainPanel.add(tfHTTPMethod, c);
-		c.weightx = 0;
-
-		c.gridx = 0;
-		c.gridy++;
-		JLabel jlURLSignature = new JLabel("URL Template:");
-		jlURLSignature.setFont(jlURLSignature.getFont().deriveFont(Font.BOLD));
-		jpMainPanel.add(jlURLSignature, c);
-
-		c.gridx++;
-		taURLSignature = new JTextArea(3, 30);
-		taURLSignature.setEditable(false);
-		taURLSignature.setLineWrap(true);
-		JScrollPane spURLSignature = new JScrollPane(taURLSignature);
-		jpMainPanel.add(spURLSignature, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		JLabel jlAcceptHeader = new JLabel("'Accept' header:");
-		jlAcceptHeader.setFont(jlAcceptHeader.getFont().deriveFont(Font.BOLD));
-		jpMainPanel.add(jlAcceptHeader, c);
-
-		c.gridx++;
-		tfAcceptHeader = new JTextField();
-		tfAcceptHeader.setEditable(false);
-		jpMainPanel.add(tfAcceptHeader, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		jlContentType = new JLabel("'Content-Type' header:");
-		jlContentType.setFont(jlContentType.getFont().deriveFont(Font.BOLD));
-		jlContentType.setVisible(false);
-		jpMainPanel.add(jlContentType, c);
-
-		c.gridx++;
-		tfContentTypeHeader = new JTextField();
-		tfContentTypeHeader.setEditable(false);
-		tfContentTypeHeader.setVisible(false);
-		jpMainPanel.add(tfContentTypeHeader, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		jlSendDataAs = new JLabel("Send data as:");
-		jlSendDataAs.setFont(jlSendDataAs.getFont().deriveFont(Font.BOLD));
-		jlSendDataAs.setVisible(false);
-		jpMainPanel.add(jlSendDataAs, c);
-
-		c.gridx++;
-		tfSendDataAs = new JTextField();
-		tfSendDataAs.setEditable(false);
-		tfSendDataAs.setVisible(false);
-		jpMainPanel.add(tfSendDataAs, c);
-
-		c.gridx = 0;
-		c.gridy++;
-		jlSendHTTPExpectRequestHeader = new JLabel("Send HTTP 'Expect' header:");
-		jlSendHTTPExpectRequestHeader.setFont(jlSendHTTPExpectRequestHeader.getFont().deriveFont(
-				Font.BOLD));
-		jlSendHTTPExpectRequestHeader.setVisible(false);
-		jpMainPanel.add(jlSendHTTPExpectRequestHeader, c);
-
-		c.gridx++;
-		tfSendHTTPExpectRequestHeader = new JTextField();
-		tfSendHTTPExpectRequestHeader.setEditable(false);
-		tfSendHTTPExpectRequestHeader.setVisible(false);
-		jpMainPanel.add(tfSendHTTPExpectRequestHeader, c);
-
-		// populate the view with values
-		refreshView();
-
-		return jpMainPanel;
-	}
-
-	@Override
-	/**
-	 * This is the title of the contextual view - shown in the list of other available
-	 * views (even when this contextual view is collapsed).
-	 */
-	public String getViewTitle() {
-		return "REST Service Details";
-	}
-
-	/**
-	 * Typically called when the activity configuration has changed.
-	 */
-	@Override
-	public void refreshView() {
-		Configuration configuration = scufl2Tools.configurationFor(activity, activity.getParent());
-		RESTActivityConfigurationBean configurationBean = new RESTActivityConfigurationBean(configuration.getJson());
-
-		// toggle visibility of the elements that do not always appear
-		HTTP_METHOD httpMethod = configurationBean.getHttpMethod();
-		jlContentType.setVisible(httpMethod == HTTP_METHOD.POST || httpMethod == HTTP_METHOD.PUT);
-		tfContentTypeHeader.setVisible(httpMethod == HTTP_METHOD.POST || httpMethod == HTTP_METHOD.PUT);
-		jlSendDataAs.setVisible(httpMethod == HTTP_METHOD.POST || httpMethod == HTTP_METHOD.PUT);
-		tfSendDataAs.setVisible(httpMethod == HTTP_METHOD.POST || httpMethod == HTTP_METHOD.PUT);
-		jlSendHTTPExpectRequestHeader.setVisible(httpMethod == HTTP_METHOD.POST || httpMethod == HTTP_METHOD.PUT);
-		tfSendHTTPExpectRequestHeader.setVisible(httpMethod == HTTP_METHOD.POST || httpMethod == HTTP_METHOD.PUT);
-		jpMainPanel.revalidate();
-
-		tfHTTPMethod.setText("" + configurationBean.getHttpMethod());
-		taURLSignature.setText(configurationBean.getUrlSignature());
-		tfAcceptHeader.setText(configurationBean.getAcceptsHeaderValue());
-		tfContentTypeHeader.setText(configurationBean.getContentTypeForUpdates());
-		tfSendDataAs.setText("" + configurationBean.getOutgoingDataFormat());
-		tfSendHTTPExpectRequestHeader.setText("" + configurationBean.getSendHTTPExpectRequestHeader());
-	}
-
-	/**
-	 * View position hint
-	 */
-	@Override
-	public int getPreferredPosition() {
-		// want to be on top, as it's the main contextual view for this activity
-		return 100;
-	}
-
-	@Override
-	public Action getConfigureAction(final Frame owner) {
-		// "Configure" button appears because of this action being returned
-		return new RESTActivityConfigureAction(activity, owner, editManager, fileManager,
-				activityIconManager, serviceDescriptionRegistry, serviceRegistry);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
deleted file mode 100644
index a7222c4..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.rest.ui.servicedescription.GenericRESTTemplateService
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
deleted file mode 100644
index a1e5390..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
+++ /dev/null
@@ -1,3 +0,0 @@
-net.sf.taverna.t2.activities.rest.ui.view.ConfigureRESTActivityMenuAction
-net.sf.taverna.t2.activities.rest.ui.menu.AddRESTTemplateAction
-net.sf.taverna.t2.activities.rest.ui.menu.AddRESTTemplateMenuAction
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
deleted file mode 100644
index 9440d43..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.rest.ui.servicedescription.RESTActivityIcon
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
deleted file mode 100644
index 5325bf1..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
+++ /dev/null
@@ -1 +0,0 @@
- net.sf.taverna.t2.activities.rest.ui.view.RESTActivityMainContextViewFactory

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/resources/META-INF/spring/rest-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/rest-activity-ui-context-osgi.xml b/src/main/resources/META-INF/spring/rest-activity-ui-context-osgi.xml
deleted file mode 100644
index 643d5be..0000000
--- a/src/main/resources/META-INF/spring/rest-activity-ui-context-osgi.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:beans="http://www.springframework.org/schema/beans"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd
-                      http://www.springframework.org/schema/osgi
-                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
-
-	<service ref="RESTActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
-
-	<service ref="GenericRESTTemplateService" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
-
-	<service ref="ConfigureRESTActivityMenuAction" auto-export="interfaces" />
-	<service ref="AddRESTTemplateAction" auto-export="interfaces" />
-	<service ref="AddRESTTemplateMenuAction" auto-export="interfaces" />
-
-	<service ref="RESTActivityMainContextViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
-
-	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
-	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
-	<reference id="menuManager" interface="net.sf.taverna.t2.ui.menu.MenuManager" />
-	<reference id="selectionManager" interface="net.sf.taverna.t2.workbench.selection.SelectionManager" />
-	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
-	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
-	<reference id="serviceDescriptionRegistry" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry" />
-	<reference id="serviceRegistry" interface="uk.org.taverna.commons.services.ServiceRegistry" />
-
-</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/resources/META-INF/spring/rest-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/rest-activity-ui-context.xml b/src/main/resources/META-INF/spring/rest-activity-ui-context.xml
deleted file mode 100644
index 2b699e7..0000000
--- a/src/main/resources/META-INF/spring/rest-activity-ui-context.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-	<bean id="RESTActivityIcon"
-		class="net.sf.taverna.t2.activities.rest.ui.servicedescription.RESTActivityIcon">
-		<property name="colourManager" ref="colourManager" />
-	</bean>
-
-	<bean id="GenericRESTTemplateService"
-		class="net.sf.taverna.t2.activities.rest.ui.servicedescription.GenericRESTTemplateService" />
-
-	<bean id="ConfigureRESTActivityMenuAction"
-		class="net.sf.taverna.t2.activities.rest.ui.view.ConfigureRESTActivityMenuAction">
-		<property name="editManager" ref="editManager" />
-		<property name="fileManager" ref="fileManager" />
-		<property name="activityIconManager" ref="activityIconManager" />
-		<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-		<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-	<bean id="AddRESTTemplateAction"
-		class="net.sf.taverna.t2.activities.rest.ui.menu.AddRESTTemplateAction">
-		<property name="editManager" ref="editManager" />
-		<property name="menuManager" ref="menuManager" />
-		<property name="selectionManager" ref="selectionManager" />
-		<property name="activityIconManager" ref="activityIconManager" />
-		<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-	<bean id="AddRESTTemplateMenuAction"
-		class="net.sf.taverna.t2.activities.rest.ui.menu.AddRESTTemplateMenuAction">
-		<property name="editManager" ref="editManager" />
-		<property name="menuManager" ref="menuManager" />
-		<property name="selectionManager" ref="selectionManager" />
-		<property name="activityIconManager" ref="activityIconManager" />
-		<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-
-	<bean id="RESTActivityMainContextViewFactory"
-		class="net.sf.taverna.t2.activities.rest.ui.view.RESTActivityMainContextViewFactory">
-		<property name="editManager" ref="editManager" />
-		<property name="fileManager" ref="fileManager" />
-		<property name="activityIconManager" ref="activityIconManager" />
-		<property name="colourManager" ref="colourManager" />
-		<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-		<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/information.png
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/information.png b/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/information.png
deleted file mode 100644
index 12cd1ae..0000000
Binary files a/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/information.png and /dev/null differ


[09/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-beanshell-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellActivityViewFactory.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellActivityViewFactory.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellActivityViewFactory.java
new file mode 100644
index 0000000..5c83730
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellActivityViewFactory.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.beanshell.views;
+
+import java.net.URI;
+import java.util.Arrays;
+import java.util.List;
+
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
+import uk.org.taverna.configuration.app.ApplicationConfiguration;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+public class BeanshellActivityViewFactory implements ContextualViewFactory<Activity> {
+
+	private static final URI ACTIVITY_TYPE = URI
+			.create("http://ns.taverna.org.uk/2010/activity/beanshell");
+
+	private EditManager editManager;
+	private FileManager fileManager;
+	private ActivityIconManager activityIconManager;
+	private ColourManager colourManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+
+	private ApplicationConfiguration applicationConfiguration;
+
+	public boolean canHandle(Object object) {
+		return object instanceof Activity && ((Activity) object).getType().equals(ACTIVITY_TYPE);
+	}
+
+	public List<ContextualView> getViews(Activity activity) {
+		return Arrays.asList(new ContextualView[] { new BeanshellContextualView(activity,
+				editManager, fileManager, activityIconManager, colourManager,
+				serviceDescriptionRegistry, applicationConfiguration) });
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setColourManager(ColourManager colourManager) {
+		this.colourManager = colourManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setApplicationConfiguration(ApplicationConfiguration applicationConfiguration) {
+		this.applicationConfiguration = applicationConfiguration;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellConfigurationPanel.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellConfigurationPanel.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellConfigurationPanel.java
new file mode 100644
index 0000000..8489d7a
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellConfigurationPanel.java
@@ -0,0 +1,231 @@
+/*******************************************************************************
+ * Copyright (C) 2012 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.beanshell.views;
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JSpinner;
+import javax.swing.SpinnerNumberModel;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+
+import net.sf.taverna.t2.lang.ui.EditorKeySetUtil;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityPortConfiguration;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.DependencyConfigurationPanel;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ListConfigurationComponent;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.MultiPageActivityConfigurationPanel;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ScriptConfigurationComponent;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ValidatingTextField;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ValidatingTextGroup;
+import uk.org.taverna.configuration.app.ApplicationConfiguration;
+import uk.org.taverna.scufl2.api.activity.Activity;
+import uk.org.taverna.scufl2.api.port.InputActivityPort;
+import uk.org.taverna.scufl2.api.port.OutputActivityPort;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+
+/**
+ * Component for configuring a Beanshell activity.
+ *
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class BeanshellConfigurationPanel extends MultiPageActivityConfigurationPanel {
+
+	private ScriptConfigurationComponent scriptConfigurationComponent;
+	private ValidatingTextGroup inputTextGroup, outputTextGroup;
+	private DependencyConfigurationPanel dependencyConfigurationPanel;
+	private File libDir;
+
+	public BeanshellConfigurationPanel(Activity activity,
+			ApplicationConfiguration applicationConfiguration) {
+		super(activity);
+		libDir = new File(applicationConfiguration.getApplicationHomeDir(), "lib");
+		if (!libDir.exists()) {
+			libDir.mkdir();
+		}
+		initialise();
+	}
+
+	@Override
+	protected void initialise() {
+		super.initialise();
+		removeAllPages();
+		addPage("Script", createScriptEditPanel());
+		addPage("Input ports", createInputPanel());
+		addPage("Output ports", createOutputPanel());
+		addPage("Dependencies", createDependenciesPanel());
+		setPreferredSize(new Dimension(600, 500));
+	}
+
+	@Override
+	public void noteConfiguration() {
+		setProperty("script", scriptConfigurationComponent.getScript());
+		setProperty("classLoaderSharing", dependencyConfigurationPanel.getClassLoaderSharing());
+		List<String> localDependencies = dependencyConfigurationPanel.getLocalDependencies();
+		if (localDependencies == null || localDependencies.isEmpty()) {
+			getJson().remove("localDependency");
+		} else {
+			ArrayNode localDependenciesArray = getJson().arrayNode();
+			for (String localDependency : localDependencies) {
+				localDependenciesArray.add(localDependency);
+			}
+			getJson().put("localDependency", localDependenciesArray);
+		}
+	}
+
+	@Override
+	public boolean checkValues() {
+		return true;
+	}
+
+	private Component createScriptEditPanel() {
+		Set<String> keywords = EditorKeySetUtil.loadKeySet(getClass().getResourceAsStream(
+				"keys.txt"));
+		Set<String> ports = new HashSet<>();
+		for (InputActivityPort ip : getActivity().getInputPorts()) {
+			ports.add(ip.getName());
+		}
+		for (OutputActivityPort op : getActivity().getOutputPorts()) {
+			ports.add(op.getName());
+		}
+		scriptConfigurationComponent = new ScriptConfigurationComponent(getProperty("script"),
+				keywords, ports, "Beanshell", ".bsh");
+		return scriptConfigurationComponent;
+	}
+
+	private Component createInputPanel() {
+		inputTextGroup = new ValidatingTextGroup();
+		ListConfigurationComponent<ActivityPortConfiguration> inputPanel = new ListConfigurationComponent<ActivityPortConfiguration>(
+				"Input Port", getInputPorts()) {
+			@Override
+			protected Component createItemComponent(ActivityPortConfiguration port) {
+				return new PortComponent(port, inputTextGroup);
+			}
+
+			@Override
+			protected ActivityPortConfiguration createDefaultItem() {
+				return new ActivityPortConfiguration("in", 0);
+			}
+		};
+		return inputPanel;
+	}
+
+	private Component createOutputPanel() {
+		outputTextGroup = new ValidatingTextGroup();
+		ListConfigurationComponent<ActivityPortConfiguration> inputPanel = new ListConfigurationComponent<ActivityPortConfiguration>(
+				"Output Port", getOutputPorts()) {
+			@Override
+			protected Component createItemComponent(ActivityPortConfiguration port) {
+				return new PortComponent(port, outputTextGroup);
+			}
+
+			@Override
+			protected ActivityPortConfiguration createDefaultItem() {
+				return new ActivityPortConfiguration("out", 0);
+			}
+		};
+		return inputPanel;
+	}
+
+	private Component createDependenciesPanel() {
+		String classLoaderSharing = getProperty("classLoaderSharing");
+		List<String> localDependencies = new ArrayList<>();
+		if (getJson().has("localDependency")) {
+			for (JsonNode localDependency : getJson().get("localDependency")) {
+				localDependencies.add(localDependency.textValue());
+			}
+		}
+		dependencyConfigurationPanel = new DependencyConfigurationPanel(classLoaderSharing,
+				localDependencies, libDir);
+		return dependencyConfigurationPanel;
+	}
+
+	class PortComponent extends JPanel {
+
+		private ValidatingTextField nameField;
+		private SpinnerNumberModel depthModel;
+		private final ValidatingTextGroup validatingTextGroup;
+
+		public PortComponent(final ActivityPortConfiguration portConfiguration,
+				ValidatingTextGroup validatingTextGroup) {
+			this.validatingTextGroup = validatingTextGroup;
+
+			nameField = new ValidatingTextField(portConfiguration.getName());
+			nameField.getDocument().addDocumentListener(new DocumentListener() {
+				@Override
+				public void removeUpdate(DocumentEvent e) {
+					portConfiguration.setName(nameField.getText());
+				}
+
+				@Override
+				public void insertUpdate(DocumentEvent e) {
+					portConfiguration.setName(nameField.getText());
+				}
+
+				@Override
+				public void changedUpdate(DocumentEvent e) {
+					portConfiguration.setName(nameField.getText());
+				}
+			});
+			validatingTextGroup.addValidTextComponent(nameField);
+			depthModel = new SpinnerNumberModel(portConfiguration.getDepth(), 0, 100, 1);
+			depthModel.addChangeListener(new ChangeListener() {
+				@Override
+				public void stateChanged(ChangeEvent e) {
+					portConfiguration.setDepth(depthModel.getNumber().intValue());
+				}
+			});
+
+			setLayout(new GridBagLayout());
+			GridBagConstraints c = new GridBagConstraints();
+			c.anchor = GridBagConstraints.WEST;
+			add(new JLabel("Name"), c);
+			c.fill = GridBagConstraints.HORIZONTAL;
+			c.weightx = 1;
+			add(nameField, c);
+			c.fill = GridBagConstraints.NONE;
+			c.weightx = 0;
+			add(new JLabel("Depth"), c);
+			add(new JSpinner(depthModel), c);
+
+		}
+
+		public void removeNotify() {
+			validatingTextGroup.removeTextComponent(nameField);
+		}
+
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellContextualView.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellContextualView.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellContextualView.java
new file mode 100644
index 0000000..e738e38
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellContextualView.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.beanshell.views;
+
+import java.awt.Frame;
+
+import javax.swing.Action;
+
+import net.sf.taverna.t2.activities.beanshell.actions.BeanshellActivityConfigurationAction;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
+import uk.org.taverna.configuration.app.ApplicationConfiguration;
+import uk.org.taverna.scufl2.api.activity.Activity;
+import uk.org.taverna.scufl2.api.port.InputActivityPort;
+import uk.org.taverna.scufl2.api.port.OutputActivityPort;
+
+/**
+ * A simple non editable HTML table view over a {@link BeanshellActivity}.
+ * Clicking on the configure button shows the editable {@link BeanshellConfigView}
+ *
+ * @author Ian Dunlop
+ * @author Stuart Owen
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class BeanshellContextualView extends HTMLBasedActivityContextualView {
+
+	private EditManager editManager;
+	private FileManager fileManager;
+	private final ActivityIconManager activityIconManager;
+	private final ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private final ApplicationConfiguration applicationConfiguration;
+
+	public BeanshellContextualView(Activity activity, EditManager editManager,
+			FileManager fileManager, ActivityIconManager activityIconManager,
+			ColourManager colourManager, ServiceDescriptionRegistry serviceDescriptionRegistry,
+			ApplicationConfiguration applicationConfiguration) {
+		super(activity, colourManager);
+		this.editManager = editManager;
+		this.fileManager = fileManager;
+		this.activityIconManager = activityIconManager;
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+		this.applicationConfiguration = applicationConfiguration;
+		init();
+	}
+
+	private void init() {
+	}
+
+	@Override
+	protected String getRawTableRowsHtml() {
+		StringBuilder html = new StringBuilder();
+		html.append("<tr><th>Input Port Name</th><th>Depth</th></tr>");
+		for (InputActivityPort inputActivityPort : getActivity().getInputPorts()) {
+			html.append("<tr><td>" + inputActivityPort.getName() + "</td><td>");
+			html.append(inputActivityPort.getDepth() + "</td></tr>");
+		}
+		html.append("<tr><th>Output Port Name</th><th>Depth</th></tr>");
+		for (OutputActivityPort outputActivityPort : getActivity().getOutputPorts()) {
+			html.append("<tr><td>" + outputActivityPort.getName() + "</td><td>");
+			html.append(outputActivityPort.getDepth() + "</td></tr>");
+		}
+		return html.toString();
+	}
+
+	@Override
+	public String getViewTitle() {
+		return "Beanshell service";
+	}
+
+	@Override
+	public Action getConfigureAction(Frame owner) {
+		return new BeanshellActivityConfigurationAction(getActivity(), owner, editManager,
+				fileManager, activityIconManager, serviceDescriptionRegistry, applicationConfiguration);
+	}
+
+	@Override
+	public int getPreferredPosition() {
+		return 100;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
new file mode 100644
index 0000000..a77db8d
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
new file mode 100644
index 0000000..a3c71cd
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
@@ -0,0 +1,3 @@
+net.sf.taverna.t2.activities.beanshell.menu.AddBeanshellTemplateAction
+net.sf.taverna.t2.activities.beanshell.menu.AddBeanshellTemplateMenuAction
+net.sf.taverna.t2.activities.beanshell.menu.ConfigureBeanshellMenuAction

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
new file mode 100644
index 0000000..a268bf1
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellActivityIcon
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
new file mode 100644
index 0000000..dcdf598
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.beanshell.views.BeanshellActivityViewFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/resources/META-INF/spring/beanshell-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/resources/META-INF/spring/beanshell-activity-ui-context-osgi.xml b/taverna-beanshell-activity-ui/src/main/resources/META-INF/spring/beanshell-activity-ui-context-osgi.xml
new file mode 100644
index 0000000..58a3e18
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/resources/META-INF/spring/beanshell-activity-ui-context-osgi.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:beans="http://www.springframework.org/schema/beans"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd
+                      http://www.springframework.org/schema/osgi
+                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+	<service ref="BeanshellActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
+
+	<service ref="BeanshellTemplateService" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
+
+	<service ref="AddBeanshellTemplateAction" auto-export="interfaces" />
+	<service ref="AddBeanshellTemplateMenuAction" auto-export="interfaces" />
+	<service ref="ConfigureBeanshellMenuAction" auto-export="interfaces" />
+
+	<service ref="BeanshellActivityViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
+
+	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
+	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
+	<reference id="menuManager" interface="net.sf.taverna.t2.ui.menu.MenuManager" />
+	<reference id="selectionManager" interface="net.sf.taverna.t2.workbench.selection.SelectionManager" />
+	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
+	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
+	<reference id="serviceDescriptionRegistry" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry" />
+	<reference id="serviceRegistry" interface="uk.org.taverna.commons.services.ServiceRegistry" />
+	<reference id="applicationConfiguration" interface="uk.org.taverna.configuration.app.ApplicationConfiguration" />
+
+</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/resources/META-INF/spring/beanshell-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/resources/META-INF/spring/beanshell-activity-ui-context.xml b/taverna-beanshell-activity-ui/src/main/resources/META-INF/spring/beanshell-activity-ui-context.xml
new file mode 100644
index 0000000..fc6d5d4
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/resources/META-INF/spring/beanshell-activity-ui-context.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+	<bean id="BeanshellActivityIcon" class="net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellActivityIcon" />
+
+	<bean id="BeanshellTemplateService" class="net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService" />
+
+	<bean id="AddBeanshellTemplateAction" class="net.sf.taverna.t2.activities.beanshell.menu.AddBeanshellTemplateAction">
+			<property name="editManager" ref="editManager" />
+			<property name="menuManager" ref="menuManager" />
+			<property name="selectionManager" ref="selectionManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+			<property name="serviceRegistry" ref="serviceRegistry" />
+	</bean>
+	<bean id="AddBeanshellTemplateMenuAction" class="net.sf.taverna.t2.activities.beanshell.menu.AddBeanshellTemplateMenuAction">
+			<property name="editManager" ref="editManager" />
+			<property name="menuManager" ref="menuManager" />
+			<property name="selectionManager" ref="selectionManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+			<property name="serviceRegistry" ref="serviceRegistry" />
+	</bean>
+	<bean id="ConfigureBeanshellMenuAction" class="net.sf.taverna.t2.activities.beanshell.menu.ConfigureBeanshellMenuAction">
+			<property name="editManager" ref="editManager" />
+			<property name="fileManager" ref="fileManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+			<property name="applicationConfiguration" ref="applicationConfiguration" />
+	</bean>
+
+	<bean id="BeanshellActivityViewFactory" class="net.sf.taverna.t2.activities.beanshell.views.BeanshellActivityViewFactory">
+			<property name="editManager" ref="editManager" />
+			<property name="fileManager" ref="fileManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+			<property name="colourManager" ref="colourManager" />
+			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+			<property name="applicationConfiguration" ref="applicationConfiguration" />
+	</bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/resources/beanshell.png
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/resources/beanshell.png b/taverna-beanshell-activity-ui/src/main/resources/beanshell.png
new file mode 100644
index 0000000..8f6edfb
Binary files /dev/null and b/taverna-beanshell-activity-ui/src/main/resources/beanshell.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/resources/net/sf/taverna/t2/activities/beanshell/views/keys.txt
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/resources/net/sf/taverna/t2/activities/beanshell/views/keys.txt b/taverna-beanshell-activity-ui/src/main/resources/net/sf/taverna/t2/activities/beanshell/views/keys.txt
new file mode 100644
index 0000000..15cb51b
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/resources/net/sf/taverna/t2/activities/beanshell/views/keys.txt
@@ -0,0 +1,90 @@
+++
+--
++
+-
+~
+!
+*
+/
+%
+<<
+>>
+>>>
+<
+>
+<=
+>=
+==
+!=
+&
+^
+|
+&&
+||
+:
+=
++=
+-=
+*=
+/=
+%=
+&=
+^=
+|=
+<<=
+>>=
+>>>=
+=
+abstract
+assert
+boolean
+break
+byte
+case
+catch
+char
+class
+const
+continue
+default
+do
+double
+else
+enum
+extends
+false
+final
+finally
+float
+for
+goto
+if
+implements
+import
+instanceof
+int
+interface
+long
+native
+new
+null
+package
+private
+protected
+public
+return
+short
+static
+strictfp
+super
+switch
+synchronized
+this
+throw
+throws
+transient
+true
+try
+void
+volatile
+while 
\ No newline at end of file


[30/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-rest-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/mediatypes.txt
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/mediatypes.txt b/taverna-rest-activity-ui/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/mediatypes.txt
new file mode 100644
index 0000000..4f0f0f4
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/mediatypes.txt
@@ -0,0 +1,65 @@
+application/atom+xml
+application/http
+application/javascript
+application/json
+application/octet-stream
+application/ogg
+application/pdf
+application/postscript
+application/rdf+xml
+application/sparql-query
+application/sparql-results+xml
+application/vnd.taverna.scufl+xml
+application/vnd.taverna.t2flow+xml
+application/x-gzip
+application/x-rar-compressed
+application/x-shockwave-flash
+application/x-tar
+application/x-www-form-urlencoded
+application/xhtml+xml
+application/xml
+application/zip
+audio/mp4
+audio/mpeg
+audio/mpeg4-generic
+audio/ogg
+audio/vnd.wave
+audio/vorbis
+audio/webm
+audio/x-ms-wma
+image/gif
+image/jpeg
+image/png
+image/svg+xml
+image/tiff
+image/vnd.microsoft.icon
+message/http
+message/rfc822
+multipart/alternative
+multipart/byteranges
+multipart/digest
+multipart/encrypted
+multipart/form-data
+multipart/mixed
+multipart/related
+multipart/signed
+text/css
+text/csv
+text/html
+text/javascript
+text/n3
+text/plain
+text/tab-separated-values
+text/turtle
+text/uri-list
+text/vcard
+text/xml
+video/H264
+video/MPV
+video/mp4
+video/mpeg
+video/mpeg4-generic
+video/ogg
+video/quicktime
+video/webm
+video/x-ms-wmv

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/resources/net/sf/taverna/t2/activities/rest/ui/servicedescription/service_type_rest.png
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/resources/net/sf/taverna/t2/activities/rest/ui/servicedescription/service_type_rest.png b/taverna-rest-activity-ui/src/main/resources/net/sf/taverna/t2/activities/rest/ui/servicedescription/service_type_rest.png
new file mode 100644
index 0000000..a4276c2
Binary files /dev/null and b/taverna-rest-activity-ui/src/main/resources/net/sf/taverna/t2/activities/rest/ui/servicedescription/service_type_rest.png differ


[45/50] [abbrv] incubator-taverna-workbench-common-activities git commit: Merge from https://github.com/taverna/taverna-localworker-activity-ui master

Posted by st...@apache.org.
Merge from https://github.com/taverna/taverna-localworker-activity-ui master


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/294e2031
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/294e2031
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/294e2031

Branch: refs/heads/master
Commit: 294e2031130c30543675952858507607d0dd0cc8
Parents: a7b8506 d157489
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:34:40 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:34:40 2015 +0000

----------------------------------------------------------------------
 taverna-localworker-activity-ui/pom.xml         | 142 +++++++++
 .../LocalworkerActivityConfigurationAction.java | 117 +++++++
 .../menu/ConfigureLocalworkerMenuAction.java    |  62 ++++
 .../LocalworkerActivityIcon.java                |  58 ++++
 .../LocalworkerServiceDescription.java          | 105 +++++++
 .../LocalworkerServiceProvider.java             | 297 ++++++++++++++++++
 .../views/LocalworkerActivityConfigView.java    |  42 +++
 .../LocalworkerActivityContextualView.java      | 115 +++++++
 .../views/LocalworkerActivityViewFactory.java   |  82 +++++
 ...rvicedescriptions.ServiceDescriptionProvider |   1 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |   1 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |   1 +
 ...ntextualviews.activity.ContextualViewFactory |   1 +
 .../localworker-activity-ui-context-osgi.xml    |  24 ++
 .../spring/localworker-activity-ui-context.xml  |  27 ++
 .../src/main/resources/localworker.png          | Bin 0 -> 706 bytes
 .../src/main/resources/localworker_names        |  67 ++++
 ...rna.scuflworkers.biojava.GenBankParserWorker |  74 +++++
 ...cuflworkers.biojava.GenBankParserWorker.json |  16 +
 ...verna.scuflworkers.biojava.ReverseCompWorker |  43 +++
 ....scuflworkers.biojava.ReverseCompWorker.json |  16 +
 ...a.scuflworkers.biojava.SwissProtParserWorker |  72 +++++
 ...flworkers.biojava.SwissProtParserWorker.json |  16 +
 ...averna.scuflworkers.biojava.TranscribeWorker |  48 +++
 ...a.scuflworkers.biojava.TranscribeWorker.json |  16 +
 ...na.scuflworkers.io.ConcatenateFileListWorker | 101 ++++++
 ...uflworkers.io.ConcatenateFileListWorker.json |  24 ++
 ...ge.taverna.scuflworkers.io.EnvVariableWorker |  33 ++
 ...verna.scuflworkers.io.EnvVariableWorker.json |  11 +
 ...ge.taverna.scuflworkers.io.FileListByExtTask |  73 +++++
 ...verna.scuflworkers.io.FileListByExtTask.json |  20 ++
 ....taverna.scuflworkers.io.FileListByRegexTask |  71 +++++
 ...rna.scuflworkers.io.FileListByRegexTask.json |  20 ++
 ...ceforge.taverna.scuflworkers.io.LocalCommand |  80 +++++
 ...ge.taverna.scuflworkers.io.LocalCommand.json |  20 ++
 ...forge.taverna.scuflworkers.io.TextFileReader |  76 +++++
 ....taverna.scuflworkers.io.TextFileReader.json |  20 ++
 ...forge.taverna.scuflworkers.io.TextFileWriter |  57 ++++
 ....taverna.scuflworkers.io.TextFileWriter.json |  24 ++
 ...rge.taverna.scuflworkers.jdbc.SQLQueryWorker | 309 +++++++++++++++++++
 ...averna.scuflworkers.jdbc.SQLQueryWorker.json |  44 +++
 ...ge.taverna.scuflworkers.jdbc.SQLUpdateWorker | 229 ++++++++++++++
 ...verna.scuflworkers.jdbc.SQLUpdateWorker.json |  36 +++
 ...erna.scuflworkers.ncbi.NucleotideFastaWorker |  45 +++
 ...scuflworkers.ncbi.NucleotideFastaWorker.json |  16 +
 ...erna.scuflworkers.ncbi.NucleotideGBSeqWorker |  45 +++
 ...scuflworkers.ncbi.NucleotideGBSeqWorker.json |  16 +
 ...scuflworkers.ncbi.NucleotideINSDSeqXMLWorker |  45 +++
 ...workers.ncbi.NucleotideINSDSeqXMLWorker.json |  16 +
 ...scuflworkers.ncbi.NucleotideTinySeqXMLWorker |  45 +++
 ...workers.ncbi.NucleotideTinySeqXMLWorker.json |  16 +
 ...taverna.scuflworkers.ncbi.ProteinFastaWorker |  45 +++
 ...na.scuflworkers.ncbi.ProteinFastaWorker.json |  16 +
 ...taverna.scuflworkers.ncbi.ProteinGBSeqWorker |  45 +++
 ...na.scuflworkers.ncbi.ProteinGBSeqWorker.json |  16 +
 ...na.scuflworkers.ncbi.ProteinINSDSeqXMLWorker |  45 +++
 ...uflworkers.ncbi.ProteinINSDSeqXMLWorker.json |  16 +
 ...na.scuflworkers.ncbi.ProteinTinySeqXMLWorker |  45 +++
 ...uflworkers.ncbi.ProteinTinySeqXMLWorker.json |  16 +
 ...taverna.scuflworkers.ncbi.PubMedEFetchWorker |  68 ++++
 ...na.scuflworkers.ncbi.PubMedEFetchWorker.json |  24 ++
 ...averna.scuflworkers.ncbi.PubMedESearchWorker | 124 ++++++++
 ...a.scuflworkers.ncbi.PubMedESearchWorker.json |  44 +++
 ...urceforge.taverna.scuflworkers.net.BrowseUrl |  31 ++
 ...orge.taverna.scuflworkers.net.BrowseUrl.json |  11 +
 ...forge.taverna.scuflworkers.net.ExtractHeader |  55 ++++
 ....taverna.scuflworkers.net.ExtractHeader.json |  20 ++
 ...ourceforge.taverna.scuflworkers.ui.AskWorker |  41 +++
 ...forge.taverna.scuflworkers.ui.AskWorker.json |  20 ++
 ...ceforge.taverna.scuflworkers.ui.ChooseWorker |  80 +++++
 ...ge.taverna.scuflworkers.ui.ChooseWorker.json |  24 ++
 ...rge.taverna.scuflworkers.ui.SelectFileWorker | 116 +++++++
 ...averna.scuflworkers.ui.SelectFileWorker.json |  24 ++
 ...ceforge.taverna.scuflworkers.ui.SelectWorker |  53 ++++
 ...ge.taverna.scuflworkers.ui.SelectWorker.json |  24 ++
 ...urceforge.taverna.scuflworkers.ui.TellWorker |  42 +++
 ...orge.taverna.scuflworkers.ui.TellWorker.json |  20 ++
 ...urceforge.taverna.scuflworkers.ui.WarnWorker |  42 +++
 ...orge.taverna.scuflworkers.ui.WarnWorker.json |  20 ++
 ...rge.taverna.scuflworkers.xml.XPathTextWorker |  75 +++++
 ...averna.scuflworkers.xml.XPathTextWorker.json |  24 ++
 ...rceforge.taverna.scuflworkers.xml.XSLTWorker | 152 +++++++++
 ...rge.taverna.scuflworkers.xml.XSLTWorker.json |  28 ++
 ...na.scuflworkers.xml.XSLTWorkerWithParameters | 100 ++++++
 ...uflworkers.xml.XSLTWorkerWithParameters.json |  24 ++
 ...escience.scuflworkers.java.ByteArrayToString |  44 +++
 ...nce.scuflworkers.java.ByteArrayToString.json |  20 ++
 ....ebi.escience.scuflworkers.java.DecodeBase64 |  31 ++
 ...escience.scuflworkers.java.DecodeBase64.json |  16 +
 ...embl.ebi.escience.scuflworkers.java.EchoList |  26 ++
 ...ebi.escience.scuflworkers.java.EchoList.json |  16 +
 ...escience.scuflworkers.java.EmitLotsOfStrings |  19 ++
 ...nce.scuflworkers.java.EmitLotsOfStrings.json |  11 +
 ....ebi.escience.scuflworkers.java.EncodeBase64 |  30 ++
 ...escience.scuflworkers.java.EncodeBase64.json |  16 +
 ...escience.scuflworkers.java.ExtractImageLinks |  41 +++
 ...nce.scuflworkers.java.ExtractImageLinks.json |  16 +
 ....escience.scuflworkers.java.FilterStringList |  43 +++
 ...ence.scuflworkers.java.FilterStringList.json |  20 ++
 ...l.ebi.escience.scuflworkers.java.FlattenList |  39 +++
 ....escience.scuflworkers.java.FlattenList.json |  16 +
 ...mbl.ebi.escience.scuflworkers.java.PadNumber |  44 +++
 ...bi.escience.scuflworkers.java.PadNumber.json |  20 ++
 ...cuflworkers.java.RegularExpressionStringList |  60 ++++
 ...orkers.java.RegularExpressionStringList.json |  24 ++
 ...mbl.ebi.escience.scuflworkers.java.SendEmail |  85 +++++
 ...bi.escience.scuflworkers.java.SendEmail.json |  27 ++
 ....ebi.escience.scuflworkers.java.SplitByRegex |  47 +++
 ...escience.scuflworkers.java.SplitByRegex.json |  20 ++
 ....ebi.escience.scuflworkers.java.StringConcat |  36 +++
 ...escience.scuflworkers.java.StringConcat.json |  20 ++
 ...i.escience.scuflworkers.java.StringListMerge |  49 +++
 ...ience.scuflworkers.java.StringListMerge.json |  20 ++
 ...cience.scuflworkers.java.StringSetDifference |  49 +++
 ...e.scuflworkers.java.StringSetDifference.json |  20 ++
 ...ence.scuflworkers.java.StringSetIntersection |  43 +++
 ...scuflworkers.java.StringSetIntersection.json |  20 ++
 ...bi.escience.scuflworkers.java.StringSetUnion |  43 +++
 ...cience.scuflworkers.java.StringSetUnion.json |  20 ++
 ...ence.scuflworkers.java.StringStripDuplicates |  33 ++
 ...scuflworkers.java.StringStripDuplicates.json |  16 +
 ...scuflworkers.java.TestAlwaysFailingProcessor |  36 +++
 ...workers.java.TestAlwaysFailingProcessor.json |  20 ++
 ...science.scuflworkers.java.TestSometimesFails |  34 ++
 ...ce.scuflworkers.java.TestSometimesFails.json |  16 +
 ...i.escience.scuflworkers.java.WebImageFetcher |  64 ++++
 ...ience.scuflworkers.java.WebImageFetcher.json |  20 ++
 ...bi.escience.scuflworkers.java.WebPageFetcher |  68 ++++
 ...cience.scuflworkers.java.WebPageFetcher.json |  20 ++
 129 files changed, 5843 insertions(+)
----------------------------------------------------------------------



[40/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-wsdl-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
deleted file mode 100644
index 04d48eb..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
+++ /dev/null
@@ -1,2 +0,0 @@
-net.sf.taverna.t2.activities.wsdl.views.WSDLActivityViewFactory
-net.sf.taverna.t2.activities.wsdl.views.XMLSplitterViewFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/resources/META-INF/spring/wsdl-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/wsdl-activity-ui-context-osgi.xml b/src/main/resources/META-INF/spring/wsdl-activity-ui-context-osgi.xml
deleted file mode 100644
index ac79064..0000000
--- a/src/main/resources/META-INF/spring/wsdl-activity-ui-context-osgi.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:beans="http://www.springframework.org/schema/beans"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd
-                      http://www.springframework.org/schema/osgi
-                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
-
-	<service ref="WSDLActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
-	<service ref="XMLInputSplitterActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
-	<service ref="XMLOutputSplitterActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
-
-	<service ref="WSDLServiceProvider">
-		<interfaces>
-			<beans:value>net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider</beans:value>
-			<beans:value>net.sf.taverna.t2.servicedescriptions.ConfigurableServiceProvider</beans:value>
-		</interfaces>
-	</service>
-
-	<service ref="AddXMLInputSplitterForWSDLActivityMenuAction" auto-export="interfaces" />
-	<service ref="AddXMLInputSplitterForXMLInputSplitterMenuAction" auto-export="interfaces" />
-	<service ref="AddXMLOutputSplitterForWSDLActivityMenuAction" auto-export="interfaces" />
-	<service ref="AddXMLOutputSplitterForXMLOutputSplitterMenuAction" auto-export="interfaces" />
-	<service ref="ConfigureWSDLMenuAction" auto-export="interfaces" />
-
-	<service ref="WSDLActivityViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
-	<service ref="XMLSplitterViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
-
-	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
-	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
-	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
-	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
-	<reference id="serviceDescriptionRegistry" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry" />
-	<reference id="credentialManager" interface="net.sf.taverna.t2.security.credentialmanager.CredentialManager" />
-	<reference id="selectionManager" interface="net.sf.taverna.t2.workbench.selection.SelectionManager" />
-
-</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/resources/META-INF/spring/wsdl-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/wsdl-activity-ui-context.xml b/src/main/resources/META-INF/spring/wsdl-activity-ui-context.xml
deleted file mode 100644
index fede275..0000000
--- a/src/main/resources/META-INF/spring/wsdl-activity-ui-context.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-	<bean id="WSDLActivityIcon" class="net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLActivityIcon" />
-	<bean id="XMLInputSplitterActivityIcon" class="net.sf.taverna.t2.activities.wsdl.servicedescriptions.XMLInputSplitterActivityIcon" />
-	<bean id="XMLOutputSplitterActivityIcon" class="net.sf.taverna.t2.activities.wsdl.servicedescriptions.XMLOutputSplitterActivityIcon" />
-
-	<bean id="WSDLServiceProvider" class="net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceProvider">
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="credentialManager" ref="credentialManager" />
-	</bean>
-
-	<bean id="AddXMLInputSplitterForWSDLActivityMenuAction" class="net.sf.taverna.t2.activities.wsdl.menu.AddXMLInputSplitterForWSDLActivityMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="selectionManager" ref="selectionManager" />
-	</bean>
-	<bean id="AddXMLInputSplitterForXMLInputSplitterMenuAction" class="net.sf.taverna.t2.activities.wsdl.menu.AddXMLInputSplitterForXMLInputSplitterMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="selectionManager" ref="selectionManager" />
-	</bean>
-	<bean id="AddXMLOutputSplitterForWSDLActivityMenuAction" class="net.sf.taverna.t2.activities.wsdl.menu.AddXMLOutputSplitterForWSDLActivityMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="selectionManager" ref="selectionManager" />
-	</bean>
-	<bean id="AddXMLOutputSplitterForXMLOutputSplitterMenuAction" class="net.sf.taverna.t2.activities.wsdl.menu.AddXMLOutputSplitterForXMLOutputSplitterMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="selectionManager" ref="selectionManager" />
-	</bean>
-	<bean id="ConfigureWSDLMenuAction" class="net.sf.taverna.t2.activities.wsdl.menu.ConfigureWSDLMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="fileManager" ref="fileManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="credentialManager" ref="credentialManager" />
-	</bean>
-
-	<bean id="WSDLActivityViewFactory" class="net.sf.taverna.t2.activities.wsdl.views.WSDLActivityViewFactory">
-			<property name="editManager" ref="editManager" />
-			<property name="fileManager" ref="fileManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="colourManager" ref="colourManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="credentialManager" ref="credentialManager" />
-	</bean>
-	<bean id="XMLSplitterViewFactory" class="net.sf.taverna.t2.activities.wsdl.views.XMLSplitterViewFactory">
-			<property name="editManager" ref="editManager" />
-			<property name="selectionManager" ref="selectionManager" />
-			<property name="colourManager" ref="colourManager" />
-	</bean>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/resources/wsdl.png
----------------------------------------------------------------------
diff --git a/src/main/resources/wsdl.png b/src/main/resources/wsdl.png
deleted file mode 100644
index f9fdae8..0000000
Binary files a/src/main/resources/wsdl.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/resources/xml-input-splitter.png
----------------------------------------------------------------------
diff --git a/src/main/resources/xml-input-splitter.png b/src/main/resources/xml-input-splitter.png
deleted file mode 100644
index 1ebe0b6..0000000
Binary files a/src/main/resources/xml-input-splitter.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/resources/xml-output-splitter.png
----------------------------------------------------------------------
diff --git a/src/main/resources/xml-output-splitter.png b/src/main/resources/xml-output-splitter.png
deleted file mode 100644
index f174f81..0000000
Binary files a/src/main/resources/xml-output-splitter.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/resources/xml-splitter.png
----------------------------------------------------------------------
diff --git a/src/main/resources/xml-splitter.png b/src/main/resources/xml-splitter.png
deleted file mode 100644
index 15875e5..0000000
Binary files a/src/main/resources/xml-splitter.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/test/java/net/sf/taverna/t2/activities/wsdl/views/TestWSDLActivityContextualView.java
----------------------------------------------------------------------
diff --git a/src/test/java/net/sf/taverna/t2/activities/wsdl/views/TestWSDLActivityContextualView.java b/src/test/java/net/sf/taverna/t2/activities/wsdl/views/TestWSDLActivityContextualView.java
deleted file mode 100644
index 0fa054b..0000000
--- a/src/test/java/net/sf/taverna/t2/activities/wsdl/views/TestWSDLActivityContextualView.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.views;
-
-import static org.junit.Assert.assertNull;
-
-import org.junit.Before;
-
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
-public class TestWSDLActivityContextualView {
-
-	Activity a;
-
-	@Before
-	public void setUp() throws Exception {
-		a=new Activity();
-		Configuration configuration = new Configuration();
-		ObjectNode json = (ObjectNode) configuration.getJson();
-		ObjectNode operation = json.objectNode();
-		operation.put("name", "getReport");
-		json.set("operation", operation);
-		String wsdlUrl=TestWSDLActivityContextualView.class.getResource("/GMService.wsdl").toExternalForm();
-		operation.put("wsdl", wsdlUrl);
-		configuration.setConfigures(a);
-	}
-
-	public void testConfigurationAction() {
-		WSDLActivityContextualView view = new WSDLActivityContextualView(a, null, null, null, null, null, null, null);
-		assertNull("WSDL has no configure action, so should be null",view.getConfigureAction(null));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/test/resources/GMService.wsdl
----------------------------------------------------------------------
diff --git a/src/test/resources/GMService.wsdl b/src/test/resources/GMService.wsdl
deleted file mode 100644
index cf128ba..0000000
--- a/src/test/resources/GMService.wsdl
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://webservice.gominer.lmp.nci.nih.gov" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://webservice.gominer.lmp.nci.nih.gov">
-  <wsdl:types>
-    <xsd:schema targetNamespace="http://webservice.gominer.lmp.nci.nih.gov" elementFormDefault="qualified" attributeFormDefault="qualified">
-      <xsd:complexType name="ArrayOfString">
-        <xsd:sequence>
-          <xsd:element name="string" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-        </xsd:sequence>
-      </xsd:complexType>
-      <xsd:element name="getReport">
-
-        <xsd:complexType>
-          <xsd:sequence>
-            <xsd:element name="in0" type="tns:ArrayOfString" minOccurs="1" maxOccurs="1"/>
-            <xsd:element name="in1" type="tns:ArrayOfString" minOccurs="1" maxOccurs="1"/>
-            <xsd:element name="in2" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-            <xsd:element name="in3" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-            <xsd:element name="in4" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-            <xsd:element name="in5" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
-            <xsd:element name="in6" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
-
-            <xsd:element name="in7" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
-          </xsd:sequence>
-        </xsd:complexType>
-      </xsd:element>
-      <xsd:element name="getReportResponse">
-        <xsd:complexType>
-          <xsd:sequence>
-            <xsd:element name="out" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-          </xsd:sequence>
-
-        </xsd:complexType>
-      </xsd:element>
-    </xsd:schema>
-  </wsdl:types>
-  <wsdl:message name="getReportResponse">
-    <wsdl:part element="tns:getReportResponse" name="parameters"/>
-  </wsdl:message>
-  <wsdl:message name="getReportRequest">
-    <wsdl:part element="tns:getReport" name="parameters"/>
-
-  </wsdl:message>
-  <wsdl:portType name="GOMinerWSPortType">
-    <wsdl:operation name="getReport">
-      <wsdl:input message="tns:getReportRequest" name="getReportRequest"/>
-      <wsdl:output message="tns:getReportResponse" name="getReportResponse"/>
-    </wsdl:operation>
-  </wsdl:portType>
-  <wsdl:binding name="GOMinerWSHttpBinding" type="tns:GOMinerWSPortType">
-    <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
-
-    <wsdl:operation name="getReport">
-      <wsdlsoap:operation soapAction=""/>
-      <wsdl:input name="getReportRequest">
-        <wsdlsoap:body use="literal"/>
-      </wsdl:input>
-      <wsdl:output name="getReportResponse">
-        <wsdlsoap:body use="literal"/>
-      </wsdl:output>
-    </wsdl:operation>
-
-  </wsdl:binding>
-  <wsdl:service name="GOMinerWS">
-    <wsdl:port binding="tns:GOMinerWSHttpBinding" name="GOMinerWSHttpPort">
-      <wsdlsoap:address location="http://discover.nci.nih.gov/gominer/xfire/GMService"/>
-    </wsdl:port>
-  </wsdl:service>
-</wsdl:definitions>
\ No newline at end of file


[27/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-xpath-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/pom.xml b/taverna-xpath-activity-ui/pom.xml
new file mode 100644
index 0000000..53b81ee
--- /dev/null
+++ b/taverna-xpath-activity-ui/pom.xml
@@ -0,0 +1,68 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>net.sf.taverna</groupId>
+		<artifactId>taverna-parent</artifactId>
+		<version>3.0.1-SNAPSHOT</version>
+	</parent>
+	<groupId>net.sf.taverna.t2.ui-activities</groupId>
+	<artifactId>xpath-activity-ui</artifactId>
+	<version>2.0-SNAPSHOT</version>
+	<packaging>bundle</packaging>
+	<name>XPath Activity - UI bindings</name>
+	<dependencies>
+		<dependency>
+			<groupId>net.sf.taverna.t2.activities</groupId>
+			<artifactId>xpath-activity</artifactId>
+			<version>${t2.activities.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-icons-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>contextual-views-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>menu-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>report-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-components</groupId>
+			<artifactId>workflow-view</artifactId>
+			<version>${t2.ui.components.version}</version>
+		</dependency>
+	</dependencies>
+
+	<repositories>
+		<repository>
+			<releases />
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+			<id>mygrid-repository</id>
+			<name>myGrid Repository</name>
+			<url>http://www.mygrid.org.uk/maven/repository
+			</url>
+		</repository>
+		<repository>
+			<releases>
+				<enabled>false</enabled>
+			</releases>
+			<snapshots />
+			<id>mygrid-snapshot-repository</id>
+			<name>myGrid Snapshot Repository</name>
+			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
+		</repository>
+	</repositories>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/TwoFieldQueryPanel.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/TwoFieldQueryPanel.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/TwoFieldQueryPanel.java
new file mode 100644
index 0000000..d0f131a
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/TwoFieldQueryPanel.java
@@ -0,0 +1,110 @@
+package net.sf.taverna.t2.activities.xpath.ui.config;
+
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+
+import javax.swing.BorderFactory;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+/**
+ * Auxiliary class that creates a JPanel with two labels and two text fields.
+ *
+ * It can be used to be placed into a dialog made by JOptionPane to get two
+ * input values, not just one.
+ *
+ * @author Sergejs Aleksejevs
+ */
+public class TwoFieldQueryPanel extends JPanel {
+	private JTextField tfFirstValue;
+	private JTextField tfSecondValue;
+
+	public TwoFieldQueryPanel(String firstFieldName, String secondFieldName) {
+		this(null, firstFieldName, null, secondFieldName, null);
+	}
+
+	public TwoFieldQueryPanel(String message, String firstFieldName,
+			String secondFieldName) {
+		this(message, firstFieldName, null, secondFieldName, null);
+	}
+
+	public TwoFieldQueryPanel(String firstFieldName,
+			String firstFieldDefaultValue, String secondFieldName,
+			String secondFieldDefaultValue) {
+		this(null, firstFieldName, firstFieldDefaultValue, secondFieldName,
+				secondFieldDefaultValue);
+	}
+
+	public TwoFieldQueryPanel(String message, String firstFieldName,
+			String firstFieldDefaultValue, String secondFieldName,
+			String secondFieldDefaultValue) {
+		super();
+		this.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+
+		this.setLayout(new GridBagLayout());
+		GridBagConstraints c = new GridBagConstraints();
+
+		c.gridx = 0;
+		c.gridy = 0;
+		c.weightx = 0;
+		c.fill = GridBagConstraints.HORIZONTAL;
+		c.anchor = GridBagConstraints.WEST;
+		c.insets = new Insets(3, 5, 3, 5);
+
+		if (message != null && message.length() > 0) {
+			c.gridwidth = 2;
+			c.insets = new Insets(5, 5, 15, 5);
+			this.add(new JLabel(message), c);
+
+			c.gridwidth = 1;
+			c.gridx = 0;
+			c.gridy++;
+			c.insets = new Insets(3, 5, 3, 5);
+		}
+
+		this.add(new JLabel(firstFieldName), c);
+
+		c.gridx++;
+		c.weightx = 1.0;
+		tfFirstValue = new JTextField(20);
+		if (firstFieldDefaultValue != null) {
+			tfFirstValue.setText(firstFieldDefaultValue);
+		}
+		tfFirstValue.selectAll();
+		tfFirstValue.requestFocusInWindow();
+		this.add(tfFirstValue, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		c.weightx = 0;
+		this.add(new JLabel(secondFieldName), c);
+
+		c.gridx++;
+		c.weightx = 1.0;
+		tfSecondValue = new JTextField(20);
+		if (secondFieldDefaultValue != null) {
+			tfSecondValue.setText(secondFieldDefaultValue);
+		}
+		tfSecondValue.selectAll();
+		this.add(tfSecondValue, c);
+	}
+
+	/**
+	 * @return Trimmed value from the first text field. Guaranteed to be
+	 *         non-null.
+	 */
+	public String getFirstValue() {
+		return (tfFirstValue.getText().trim());
+	}
+
+	/**
+	 * @return Trimmed value from the second text field. Guaranteed to be
+	 *         non-null.
+	 */
+	public String getSecondValue() {
+		return (tfSecondValue.getText().trim());
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanel.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanel.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanel.java
new file mode 100644
index 0000000..4342a4a
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanel.java
@@ -0,0 +1,1202 @@
+package net.sf.taverna.t2.activities.xpath.ui.config;
+
+import java.awt.AWTEvent;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Cursor;
+import java.awt.Dimension;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.GridLayout;
+import java.awt.Insets;
+import java.awt.Point;
+import java.awt.Toolkit;
+import java.awt.event.AWTEventListener;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.geom.Area;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.prefs.Preferences;
+
+import javax.swing.AbstractAction;
+import javax.swing.BorderFactory;
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JSeparator;
+import javax.swing.JTabbedPane;
+import javax.swing.JTable;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.JToggleButton;
+import javax.swing.ListSelectionModel;
+import javax.swing.Popup;
+import javax.swing.PopupFactory;
+import javax.swing.SwingUtilities;
+import javax.swing.Timer;
+import javax.swing.event.CaretEvent;
+import javax.swing.event.CaretListener;
+import javax.swing.filechooser.FileFilter;
+import javax.swing.table.DefaultTableModel;
+
+import net.sf.taverna.t2.activities.xpath.XPathActivityConfigurationBean;
+import net.sf.taverna.t2.activities.xpath.ui.config.xmltree.TableCellListener;
+import net.sf.taverna.t2.activities.xpath.ui.config.xmltree.XPathActivityXMLTree;
+import net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathActivityIcon;
+import net.sf.taverna.t2.workbench.icons.WorkbenchIcons;
+
+import org.apache.log4j.Logger;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.DocumentHelper;
+import org.dom4j.InvalidXPathException;
+import org.dom4j.Node;
+import org.dom4j.XPath;
+import org.dom4j.XPathException;
+
+/**
+ * @author Sergejs Aleksejevs
+ */
+@SuppressWarnings("serial")
+public class XPathActivityConfigurationPanel extends JPanel {
+
+	private Logger logger = Logger.getLogger(XPathActivityConfigurationPanel.class);
+
+	// --- CONSTANTS ---
+	public static final int MAX_NUMBER_OF_MATCHING_NODES_TO_HIGHLIGHT_IN_THE_TREE = 100;
+
+	private static final Color INACTIVE_PANEL_BACKGROUND_COLOR = new Color(215,
+			215, 215);
+
+	private static final String EXAMPLE_XML_PROMPT = "Paste example XML here...";
+
+	private static final String XPATH_XML_DOCUMENT_DIR_PROPERTY="XPathXMLDocumentDir";
+
+	private XPathActivityConfigurationPanel thisPanel;
+
+	// --- COMPONENTS FOR ACTIVITY CONFIGURATION PANEL ---
+	private JPanel jpActivityConfiguration;
+
+	private JPanel jpLeft;
+	private JPanel jpRight;
+
+	private JToggleButton bShowXMLTreeSettings;
+	private Popup xmlTreeSettingsMenu;
+	private long xmlTreeSettingsMenuLastShownAt;
+	private JButton bGenerateXPathExpression;
+	private JPanel jpXMLTreeSettingsMenuContents;
+	private JCheckBoxMenuItem miIncludeAttributes;
+	private JCheckBoxMenuItem miIncludeValues;
+	private JCheckBoxMenuItem miIncludeNamespaces;
+
+	private JTextArea taSourceXML;
+	private JButton bLoadXMLDocument;
+	private JButton bParseXML;
+	private XPathActivityXMLTree xmlTree;
+	private JScrollPane spXMLTreePlaceholder;
+
+	// --- COMPONENTS FOR XPATH EDITING PANEL ---
+	private JLabel jlXPathExpressionStatus;
+	private JLabel jlXPathExpression;
+	private JTextField tfXPathExpression;
+	private Map<String, String> xpathNamespaceMap;
+	private JButton bRunXPath;
+
+	private JLabel jlShowHideNamespaceMappings;
+	private JTable jtXPathNamespaceMappings;
+	private JButton bAddMapping;
+	private JButton bRemoveMapping;
+	private JPanel jpNamespaceMappingsWithButton;
+
+	// --- COMPONENTS FOR XPATH TESTING PANEL ---
+	private JPanel jpXPathTesting;
+
+	private JTextField tfExecutedXPathExpression;
+	private JTextField tfMatchingElementCount;
+
+	private JTabbedPane tpExecutedXPathExpressionResults;
+	private JTextArea taExecutedXPathExpressionResultsAsText;
+	private JScrollPane spExecutedXPathExpressionResultsAsText;
+	private JTextArea taExecutedXPathExpressionResultsAsXML;
+	private JScrollPane spExecutedXPathExpressionResultsAsXML;
+
+	public XPathActivityConfigurationPanel() {
+		this.thisPanel = this;
+
+		this.setLayout(new GridBagLayout());
+		GridBagConstraints c = new GridBagConstraints();
+
+		c.gridx = 0;
+		c.gridy = 0;
+		c.fill = GridBagConstraints.BOTH;
+		c.weightx = 1.0;
+		c.weighty = 0.50;
+		c.insets = new Insets(0, 10, 10, 10);
+		this.jpActivityConfiguration = createActivityConfigurationPanel();
+		this.add(this.jpActivityConfiguration, c);
+
+		c.gridy++;
+		c.fill = GridBagConstraints.HORIZONTAL;
+		c.weighty = 0;
+		c.insets = new Insets(0, 10, 0, 10);
+		this.add(new JSeparator(), c);
+
+		// XPath expression editing panel
+		c.gridy++;
+		c.fill = GridBagConstraints.BOTH;
+		c.weighty = 0.05;
+		c.insets = new Insets(5, 10, 5, 10);
+		this.add(createXPathExpressionEditingPanel(), c);
+
+		c.gridy++;
+		;
+		c.fill = GridBagConstraints.HORIZONTAL;
+		c.weighty = 0;
+		c.insets = new Insets(0, 10, 0, 10);
+		this.add(new JSeparator(), c);
+
+		// XPath expression testing panel
+		c.gridy++;
+		c.fill = GridBagConstraints.BOTH;
+		c.weighty = 0.35;
+		c.insets = new Insets(5, 10, 0, 10);
+		this.jpXPathTesting = createXPathExpressionTestingPanel();
+		this.add(this.jpXPathTesting, c);
+	}
+
+	private JPanel createActivityConfigurationPanel() {
+		JPanel jpConfig = new JPanel(new GridBagLayout());
+		GridBagConstraints c = new GridBagConstraints();
+
+		// text area for example XML document
+		c.gridx = 0;
+		c.gridy = 0;
+		c.fill = GridBagConstraints.BOTH;
+		c.weightx = 0.5;
+		c.weighty = 1.0;
+		c.insets = new Insets(5, 0, 0, 5);
+		taSourceXML = new JTextArea(10, 30);
+		taSourceXML
+				.setToolTipText("<html>Use this text area to paste or load an example XML document.<br>"
+						+ "This document can then be parsed by clicking the button<br>"
+						+ "with a green arrow in order to see its tree structure.</html>");
+		taSourceXML.setText(EXAMPLE_XML_PROMPT);
+		taSourceXML.addFocusListener(new FocusListener() {
+			public void focusGained(FocusEvent e) {
+				taSourceXML.selectAll();
+			}
+
+			public void focusLost(FocusEvent e) { /* do nothing */
+			}
+		});
+		taSourceXML.addCaretListener(new CaretListener() {
+			public void caretUpdate(CaretEvent e) {
+				// make sure that it is only allowed to "parse example XML"
+				// when something is actually present in the text area
+				bParseXML.setEnabled(taSourceXML.getText().trim().length() > 0
+						&& !taSourceXML.getText().trim().equals(
+								EXAMPLE_XML_PROMPT));
+			}
+		});
+		jpLeft = new JPanel(new GridLayout(1, 1));
+		jpLeft.add(new JScrollPane(taSourceXML));
+		jpConfig.add(jpLeft, c);
+
+		// button to parse example XML document
+
+		c.gridx++;
+		c.fill = GridBagConstraints.NONE;
+		c.weightx = 0;
+		c.weighty = 0;
+		c.insets = new Insets(0, 0, 0, 0);
+		bParseXML = new JButton(
+				XPathActivityIcon
+						.getIconById(XPathActivityIcon.XPATH_ACTIVITY_CONFIGURATION_PARSE_XML_ICON));
+		bParseXML
+				.setToolTipText("Parse example XML document and generate its tree structure");
+		bParseXML.setEnabled(false);
+		bParseXML.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				parseXML();
+			}
+		});
+		jpConfig.add(bParseXML, c);
+
+		// placeholder for XML tree (will be replaced by a real tree when the
+		// parsing is done)
+
+		c.gridx++;
+		c.fill = GridBagConstraints.BOTH;
+		c.weightx = 0.5;
+		c.weighty = 1.0;
+		c.insets = new Insets(5, 5, 0, 0);
+		JTextArea taXMLTreePlaceholder = new JTextArea(10, 30);
+		taXMLTreePlaceholder
+				.setToolTipText("<html>This area will show tree structure of the example XML after you<br>"
+						+ "paste it into the space on the left-hand side and press 'Parse'<br>"
+						+ "button with the green arrow.</html>");
+		taXMLTreePlaceholder.setEditable(false);
+		taXMLTreePlaceholder.setBackground(INACTIVE_PANEL_BACKGROUND_COLOR);
+		spXMLTreePlaceholder = new JScrollPane(taXMLTreePlaceholder);
+		jpRight = new JPanel(new GridLayout(1, 1));
+		jpRight.add(spXMLTreePlaceholder);
+		jpConfig.add(jpRight, c);
+
+		// Button to load XML document from a file
+		
+		bLoadXMLDocument = new JButton("Load XML from file", WorkbenchIcons.openIcon);	
+		bLoadXMLDocument.addActionListener(new ActionListener() {
+			
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				JFileChooser fileChooser = new JFileChooser();
+				Preferences prefs = Preferences.userNodeForPackage(getClass());
+				String curDir = prefs.get(XPATH_XML_DOCUMENT_DIR_PROPERTY, System.getProperty("user.home"));
+				fileChooser.setDialogTitle("Select file to load XML from");
+				fileChooser.setFileFilter(new FileFilter() {  
+					public boolean accept(File f) {
+				        return f.isDirectory() || f.getName().toLowerCase().endsWith(".xml");
+				    }
+				    
+				    public String getDescription() {
+				        return ".xml files";
+				    }
+				});
+				fileChooser.setCurrentDirectory(new File(curDir));		
+				int returnVal = fileChooser.showOpenDialog(((JButton) e
+						.getSource()).getParent());
+				if (returnVal == JFileChooser.APPROVE_OPTION) {
+					prefs.put(XPATH_XML_DOCUMENT_DIR_PROPERTY, fileChooser
+							.getCurrentDirectory().toString());
+					File file = fileChooser.getSelectedFile();
+					// Read the contents of a file into a string
+					// and set the value of the XML document text area to it
+					FileInputStream fis = null;
+					try{
+						byte[] fileBytes = new byte[(int)file.length()];
+						fis = new FileInputStream(file);
+						fis.read(fileBytes);
+						String xmlDocument = new String(fileBytes, "UTF-8");
+						setSourceXML(xmlDocument);
+					}
+					catch(Exception ex){
+						logger.error("An error occured while trying to read the XML document from file " + file.getAbsolutePath(), ex);
+						JOptionPane.showMessageDialog(
+								((JButton) e.getSource()).getParent(), 
+								"There was an error while trying to read the file", 
+								"XPath Activity", 
+								JOptionPane.ERROR_MESSAGE);
+					}
+					finally{
+						try {
+							fis.close();
+						} catch (IOException e1) {
+							// Ignore
+						}
+					}
+
+				}
+			}
+		});
+		c.gridx = 0;
+		c.gridy++;
+		c.gridwidth = 1;
+		c.fill = GridBagConstraints.NONE;
+		c.weightx = 0;
+		c.weighty = 0;
+		c.insets = new Insets(5, 0, 0, 5);
+		c.anchor = GridBagConstraints.EAST;
+		jpConfig.add(bLoadXMLDocument, c);
+		
+		// settings for the view of XML tree from example XML document
+
+		miIncludeAttributes = new JCheckBoxMenuItem("Show XML node attributes");
+		miIncludeAttributes.setSelected(true);
+		miIncludeAttributes.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				refreshXMLTreeUI();
+			}
+		});
+
+		miIncludeValues = new JCheckBoxMenuItem(
+				"Show values of XML elements and attributes");
+		miIncludeValues.setSelected(true);
+		miIncludeValues.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				refreshXMLTreeUI();
+			}
+		});
+
+		miIncludeNamespaces = new JCheckBoxMenuItem(
+				"Show namespaces of XML elements");
+		miIncludeNamespaces.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				refreshXMLTreeUI();
+			}
+		});
+
+		jpXMLTreeSettingsMenuContents = new JPanel();
+		jpXMLTreeSettingsMenuContents.setBorder(BorderFactory
+				.createRaisedBevelBorder());
+		jpXMLTreeSettingsMenuContents.setLayout(new BoxLayout(
+				jpXMLTreeSettingsMenuContents, BoxLayout.Y_AXIS));
+		jpXMLTreeSettingsMenuContents.add(miIncludeAttributes);
+		jpXMLTreeSettingsMenuContents.add(miIncludeValues);
+		jpXMLTreeSettingsMenuContents.add(miIncludeNamespaces);
+
+		bShowXMLTreeSettings = new JToggleButton("Show XML tree settings...",
+				XPathActivityIcon.getIconById(XPathActivityIcon.UNFOLD_ICON));
+		bShowXMLTreeSettings.setSelectedIcon(XPathActivityIcon
+				.getIconById(XPathActivityIcon.FOLD_ICON));
+		bShowXMLTreeSettings.setEnabled(false);
+		bShowXMLTreeSettings.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				if (xmlTreeSettingsMenu == null) {
+					xmlTreeSettingsMenuLastShownAt = System.currentTimeMillis();
+
+					Point parentPosition = bShowXMLTreeSettings
+							.getLocationOnScreen();
+					xmlTreeSettingsMenu = PopupFactory.getSharedInstance()
+							.getPopup(
+									bShowXMLTreeSettings,
+									jpXMLTreeSettingsMenuContents,
+									parentPosition.x,
+									parentPosition.y
+											+ bShowXMLTreeSettings.getHeight());
+					xmlTreeSettingsMenu.show();
+				} else {
+					bShowXMLTreeSettings.setSelected(false);
+				}
+			}
+		});
+		
+		bGenerateXPathExpression = new JButton("Generate XPath expression",
+				XPathActivityIcon
+						.getIconById(XPathActivityIcon.XML_TREE_NODE_ICON));
+		bGenerateXPathExpression.addActionListener(new ActionListener() {
+			@Override
+			public void actionPerformed(ActionEvent e) {
+			     updateXPathEditingPanelValues();	
+			}	
+		});
+		
+		JPanel xmlTreeButtonPanel = new JPanel();
+		xmlTreeButtonPanel.add(bGenerateXPathExpression);
+		xmlTreeButtonPanel.add(bShowXMLTreeSettings);
+		
+		c.gridx = 2;
+		c.gridwidth = 1;
+		c.fill = GridBagConstraints.NONE;
+		c.weightx = 0;
+		c.weighty = 0;
+		c.insets = new Insets(5, 0, 0, 0);
+		c.anchor = GridBagConstraints.EAST;
+		jpConfig.add(xmlTreeButtonPanel, c);
+
+		// register a new listener for all AWT mouse events - this will be used
+		// to identify clicks outside of the XML tree popup menu and the toggle
+		// button used to show/hide it
+		Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
+			public void eventDispatched(AWTEvent event) {
+				if (event instanceof MouseEvent && xmlTreeSettingsMenu != null) {
+					MouseEvent e = (MouseEvent) event;
+					if (e.getClickCount() > 0
+							&& (e.getWhen() - xmlTreeSettingsMenuLastShownAt) > 100) {
+						// convert a point where mouse click was made from
+						// relative coordinates of the source component
+						// to the coordinates of the panel that represents the
+						// contents of the popup menu
+						Point clickRelativeToOverlay = SwingUtilities
+								.convertPoint((Component) e.getSource(), e
+										.getPoint(),
+										jpXMLTreeSettingsMenuContents);
+
+						Area areaOfPopupPanelAndToggleButton = new Area(
+								jpXMLTreeSettingsMenuContents.getBounds());
+
+						// only hide the popup menu if a click was made outside
+						// of the calculated area --
+						// plus not on one of the associated toggle buttons
+						if (!areaOfPopupPanelAndToggleButton
+								.contains(clickRelativeToOverlay)) {
+							xmlTreeSettingsMenu.hide();
+							bShowXMLTreeSettings.setSelected(false);
+
+							// if the popup menu was dismissed by a click on the
+							// toggle button that
+							// has made it visible, this timer makes sure that
+							// this click doesn't
+							// re-show the popup menu
+							new Timer(100, new ActionListener() {
+								public void actionPerformed(ActionEvent e) {
+									((Timer) e.getSource()).stop();
+									xmlTreeSettingsMenu = null;
+								}
+							}).start();
+
+						}
+					}
+				}
+			}
+		}, AWTEvent.MOUSE_EVENT_MASK);
+
+		return (jpConfig);
+	}
+
+	private JPanel createXPathExpressionEditingPanel() {
+		this.jlXPathExpressionStatus = new JLabel();
+
+		this.jlXPathExpression = new JLabel("XPath expression");
+
+		this.bRunXPath = new JButton("Run XPath");
+		this.bRunXPath.setEnabled(false);
+		this.bRunXPath.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				runXPath(true);
+			}
+		});
+
+		this.tfXPathExpression = new JTextField(30);
+		this.tfXPathExpression.setPreferredSize(new Dimension(0, this.bRunXPath
+				.getPreferredSize().height));
+		this.tfXPathExpression.setMinimumSize(new Dimension(0, this.bRunXPath
+				.getPreferredSize().height));
+		this.tfXPathExpression.addCaretListener(new CaretListener() {
+			public void caretUpdate(CaretEvent e) {
+				validateXPathAndUpdateUI();
+			}
+		});
+		this.tfXPathExpression.addKeyListener(new KeyListener() {
+			public void keyPressed(KeyEvent e) {
+				if (e.getKeyCode() == KeyEvent.VK_ENTER) {
+					if (bRunXPath.isEnabled()) {
+						// it is safe to check that ENTER key may execute the
+						// XPath expression if the
+						// "Run XPath" button is enabled, as expression
+						// validation is responsible for
+						// enabling / disabling the button as the expression
+						// changes
+						runXPath(true);
+					}
+				}
+			}
+
+			public void keyReleased(KeyEvent e) { /* not in use */
+			}
+
+			public void keyTyped(KeyEvent e) { /* not in use */
+			}
+		});
+
+		JPanel jpXPath = new JPanel(new GridBagLayout());
+		GridBagConstraints c = new GridBagConstraints();
+		c.fill = GridBagConstraints.HORIZONTAL;
+		c.weighty = 0;
+
+		c.gridx = 0;
+		c.gridy = 0;
+		c.weightx = 0;
+		jpXPath.add(jlXPathExpressionStatus);
+
+		c.gridx++;
+		c.weightx = 0.0;
+		c.insets = new Insets(0, 10, 0, 0);
+		jpXPath.add(jlXPathExpression, c);
+		
+		c.gridx++;
+		c.weightx = 1.0;
+		c.insets = new Insets(0, 10, 0, 10);
+		jpXPath.add(tfXPathExpression, c);
+
+		c.gridx++;
+		c.weightx = 0;
+		c.insets = new Insets(0, 0, 0, 0);
+		jpXPath.add(bRunXPath, c);
+
+		c.gridx = 2;
+		c.gridy++;
+		c.weightx = 1.0;
+		c.weighty = 0;
+		c.gridwidth = 2;
+		c.fill = GridBagConstraints.NONE;
+		c.anchor = GridBagConstraints.WEST;
+		c.insets = new Insets(0, 10, 0, 10);
+		jlShowHideNamespaceMappings = new JLabel("Show namespace mappings...");
+		jlShowHideNamespaceMappings.setForeground(Color.BLUE);
+		jlShowHideNamespaceMappings.setCursor(new Cursor(Cursor.HAND_CURSOR));
+		jlShowHideNamespaceMappings.addMouseListener(new MouseAdapter() {
+			public void mouseClicked(MouseEvent e) {
+				jpNamespaceMappingsWithButton
+						.setVisible(!jpNamespaceMappingsWithButton.isVisible());
+				jlShowHideNamespaceMappings
+						.setText((jpNamespaceMappingsWithButton.isVisible() ? "Hide"
+								: "Show")
+								+ " namespace mappings...");
+				thisPanel.validate();
+			}
+		});
+		jpXPath.add(jlShowHideNamespaceMappings, c);
+
+		// namespace mapping table
+		DefaultTableModel tableModel = new DefaultTableModel();
+		tableModel.addColumn("Namespace Prefix");
+		tableModel.addColumn("Namespace URI");
+
+		jtXPathNamespaceMappings = new JTable();
+		jtXPathNamespaceMappings.setModel(tableModel);
+		// ((DefaultCellEditor)jtXPathNamespaceMappings.getDefaultEditor(String.class)).setClickCountToStart(1);
+		// // TODO - enable if one-click-to-start-editing behaviour is required
+		// TODO - next line is to be enabled when Taverna is migrated to Java
+		// 1.6; for now it's fine to run without this
+		// jtXPathNamespaceMappings.setFillsViewportHeight(true); // makes sure
+		// that when the dedicated area is larger than the table, the latter is
+		// stretched vertically to fill the empty space
+		jtXPathNamespaceMappings
+				.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); // only one row can be selected at a time
+		jtXPathNamespaceMappings
+				.setPreferredScrollableViewportSize(new Dimension(200, 50)); // NB! this prevents the table from occupying most of the space in the panel when screen is maximized
+		jtXPathNamespaceMappings.addKeyListener(new KeyAdapter() {
+			public void keyReleased(KeyEvent e) {
+				if (e.getKeyCode() == KeyEvent.VK_DELETE) {
+					removeNamespaceMapping();
+				}
+			}
+		});
+
+		TableCellListener cellListener = new TableCellListener(
+				jtXPathNamespaceMappings, new AbstractAction() {
+					public void actionPerformed(ActionEvent e) {
+						TableCellListener tcl = (TableCellListener) e
+								.getSource();
+
+						if (tcl.getColumn() == 0) {
+							// prefix was modified
+							String newPrefix = (String) tcl.getNewValue();
+							if (xpathNamespaceMap.containsKey(newPrefix)) {
+								// such prefix already exists - change won't be
+								// saved
+								JOptionPane
+										.showMessageDialog(
+												thisPanel,
+												"Cannot update namespace prefix: "
+														+ "updated value already exists",
+												"XPath Activity",
+												JOptionPane.WARNING_MESSAGE);
+							} else {
+								// update the map with the new prefix for the
+								// same URI value
+								String oldPrefix = (String) tcl.getOldValue();
+								xpathNamespaceMap.put(newPrefix,
+										xpathNamespaceMap.remove(oldPrefix));
+							}
+						} else {
+							// simple case - just the URI value has changed:
+							// just overwrite the value in the namespace map
+							String prefixOfUpdatedURI = (String) jtXPathNamespaceMappings
+									.getModel().getValueAt(tcl.getRow(), 0);
+							xpathNamespaceMap.put(prefixOfUpdatedURI,
+									(String) tcl.getNewValue());
+						}
+
+						// either way - reload from the local map (map could be
+						// not updated if the validation didn't succeed)
+						reloadNamespaceMappingTableFromLocalMap();
+					}
+				});
+
+		jtXPathNamespaceMappings.getColumnModel().getColumn(0)
+				.setPreferredWidth(20); // set relative sizes of columns
+		jtXPathNamespaceMappings.getColumnModel().getColumn(1)
+				.setPreferredWidth(300);
+
+		JScrollPane spXPathNamespaceMappings = new JScrollPane(
+				jtXPathNamespaceMappings);
+		spXPathNamespaceMappings.setAlignmentY(TOP_ALIGNMENT);
+		spXPathNamespaceMappings.setMinimumSize(new Dimension(200, 50)); // makes the table to have at least two rows visible in all cases - no matter how small the parent panel is
+
+		bAddMapping = new JButton("Add Mapping");
+		bAddMapping.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				addNamespaceMapping();
+			}
+		});
+
+		bRemoveMapping = new JButton("Remove Mapping");
+		bRemoveMapping.setEnabled(false);
+		bRemoveMapping.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				removeNamespaceMapping();
+			}
+		});
+
+		bAddMapping.setMinimumSize(bRemoveMapping.getPreferredSize()); // make sure that the 'Add Mapping' button is of the same size as 'Remove Mapping'
+															
+		bAddMapping.setPreferredSize(bRemoveMapping.getPreferredSize()); // -- both are required to achieve desired behaviour when window is resized / namespace mapping table is enabled/disabled 												
+
+		bRunXPath.setMinimumSize(bRemoveMapping.getPreferredSize()); // do the same for 'Run XPath' button
+		
+		bRunXPath.setPreferredSize(bRemoveMapping.getPreferredSize());
+
+		JPanel jpAddRemoveButtons = new JPanel();
+		jpAddRemoveButtons.setLayout(new GridBagLayout());
+		GridBagConstraints cAddRemove = new GridBagConstraints();
+		cAddRemove.gridx = 0;
+		cAddRemove.gridy = 0;
+		cAddRemove.weightx = 1.0;
+		cAddRemove.anchor = GridBagConstraints.NORTH;
+		cAddRemove.fill = GridBagConstraints.HORIZONTAL;
+		jpAddRemoveButtons.add(bAddMapping, cAddRemove);
+		cAddRemove.gridy++;
+		cAddRemove.weighty = 1.0;
+		cAddRemove.insets = new Insets(2, 0, 0, 0);
+		jpAddRemoveButtons.add(bRemoveMapping, cAddRemove);
+
+		jpNamespaceMappingsWithButton = new JPanel();
+		jpNamespaceMappingsWithButton.setVisible(false);
+		jpNamespaceMappingsWithButton.setLayout(new BorderLayout(10, 0));
+		jpNamespaceMappingsWithButton.add(spXPathNamespaceMappings,
+				BorderLayout.CENTER);
+		jpNamespaceMappingsWithButton
+				.add(jpAddRemoveButtons, BorderLayout.EAST);
+
+		c.gridx = 0;
+		c.gridy++;
+		c.gridwidth = 4;
+		c.fill = GridBagConstraints.BOTH;
+		c.weightx = 1.0;
+		c.weighty = 1.0;
+		c.insets = new Insets(5, 0, 0, 0);
+		jpXPath.add(jpNamespaceMappingsWithButton, c);
+
+		// initialise some values / tooltips
+		resetXPathEditingPanel();
+
+		return (jpXPath);
+	}
+
+	protected void addNamespaceMapping() {
+		TwoFieldQueryPanel queryPanel = new TwoFieldQueryPanel(
+				"Namespace prefix:", "Namespace URI:");
+		int result = JOptionPane.showConfirmDialog(this, queryPanel,
+				"XPath Activity - Create new namespace mapping",
+				JOptionPane.OK_CANCEL_OPTION);
+
+		if (result == JOptionPane.OK_OPTION) {
+			boolean bInvalidMapping = true;
+			do {
+				bInvalidMapping = queryPanel.getFirstValue().length() == 0
+						|| queryPanel.getSecondValue().length() == 0
+						|| xpathNamespaceMap.containsKey(queryPanel
+								.getFirstValue());
+
+				if (bInvalidMapping) {
+					queryPanel = new TwoFieldQueryPanel(
+							"<html><center><font color=\"red\">ERROR: you must "
+									+ "enter values for both namespace prefix and URI. Prefix must be<br>"
+									+ "unique in the mapping table - duplicates are not allowed!</font></center></html>",
+							"Namespace prefix:", queryPanel.getFirstValue(),
+							"Namespace URI:", queryPanel.getSecondValue());
+					result = JOptionPane.showConfirmDialog(this, queryPanel,
+							"XPath Activity - Create new namespace mapping",
+							JOptionPane.OK_CANCEL_OPTION);
+				}
+			} while (bInvalidMapping && result == JOptionPane.OK_OPTION);
+
+			if (result == JOptionPane.OK_OPTION && !bInvalidMapping) {
+				// the value appears to be valid and OK was pressed - create new
+				// mapping
+				this.xpathNamespaceMap.put(queryPanel.getFirstValue(),
+						queryPanel.getSecondValue());
+				reloadNamespaceMappingTableFromLocalMap();
+			}
+		}
+	}
+
+	protected void removeNamespaceMapping() {
+		int selectedRow = jtXPathNamespaceMappings.getSelectedRow();
+		if (selectedRow != -1) {
+			// some row is selected - need to delete it and refresh table's UI
+			// (but first stop editing to avoid
+			// problems with cell editor trying to store an edited value after
+			// edited row has been deleted)
+			if (jtXPathNamespaceMappings.getCellEditor() != null) {
+				jtXPathNamespaceMappings.getCellEditor().stopCellEditing();
+			}
+			xpathNamespaceMap.remove(jtXPathNamespaceMappings.getValueAt(
+					selectedRow, 0));
+			reloadNamespaceMappingTableFromLocalMap();
+
+			// select another row in the table
+			int rowCount = jtXPathNamespaceMappings.getRowCount();
+			if (rowCount > 0) {
+				if (selectedRow < jtXPathNamespaceMappings.getRowCount()) {
+					// select the row that followed the one that was deleted
+					jtXPathNamespaceMappings.getSelectionModel()
+							.setSelectionInterval(selectedRow, selectedRow);
+				} else {
+					// last row in the table was deleted - select the one that
+					// is the new last row
+					jtXPathNamespaceMappings.getSelectionModel()
+							.setSelectionInterval(rowCount - 1, rowCount - 1);
+				}
+			}
+		} else {
+			JOptionPane.showMessageDialog(thisPanel,
+					"Please select a mapping to delete in the table first!",
+					"XPath Activity", JOptionPane.WARNING_MESSAGE);
+		}
+	}
+
+	private JPanel createXPathExpressionTestingPanel() {
+		JPanel jpTesting = new JPanel(new GridBagLayout());
+		GridBagConstraints c = new GridBagConstraints();
+
+		c.gridx = 0;
+		c.gridy = 0;
+		c.gridwidth = 1;
+		c.anchor = GridBagConstraints.WEST;
+		c.fill = GridBagConstraints.NONE;
+		c.weightx = 0;
+		c.weighty = 0;
+		c.insets = new Insets(0, 0, 10, 10);
+		jpTesting.add(new JLabel("Executed XPath expression:"), c);
+
+		c.gridx++;
+		c.fill = GridBagConstraints.HORIZONTAL;
+		c.weightx = 1.0;
+		c.weighty = 0;
+		c.insets = new Insets(0, 0, 10, 10);
+		tfExecutedXPathExpression = new JTextField();
+		tfExecutedXPathExpression.setEditable(false);
+		tfExecutedXPathExpression.setBorder(null);
+		jpTesting.add(tfExecutedXPathExpression, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		c.fill = GridBagConstraints.NONE;
+		c.weightx = 0;
+		c.weighty = 0;
+		c.insets = new Insets(0, 0, 5, 10);
+		jpTesting.add(new JLabel("Number of matching nodes:"), c);
+
+		c.gridx++;
+		c.fill = GridBagConstraints.HORIZONTAL;
+		c.weightx = 1.0;
+		c.weighty = 0;
+		c.insets = new Insets(0, 0, 5, 10);
+		tfMatchingElementCount = new JTextField();
+		tfMatchingElementCount.setEditable(false);
+		tfMatchingElementCount.setBorder(null);
+		jpTesting.add(tfMatchingElementCount, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		c.gridwidth = 2;
+		c.fill = GridBagConstraints.BOTH;
+		c.weightx = 1.0;
+		c.weighty = 1.0;
+		tpExecutedXPathExpressionResults = new JTabbedPane();
+		jpTesting.add(tpExecutedXPathExpressionResults, c);
+
+		taExecutedXPathExpressionResultsAsText = new JTextArea();
+		taExecutedXPathExpressionResultsAsText.setEditable(false);
+		spExecutedXPathExpressionResultsAsText = new JScrollPane(
+				taExecutedXPathExpressionResultsAsText);
+		spExecutedXPathExpressionResultsAsText.setPreferredSize(new Dimension(
+				200, 60));
+		spExecutedXPathExpressionResultsAsText.setBorder(BorderFactory
+				.createLineBorder(INACTIVE_PANEL_BACKGROUND_COLOR, 3));
+		tpExecutedXPathExpressionResults.add("Results as text",
+				spExecutedXPathExpressionResultsAsText);
+
+		taExecutedXPathExpressionResultsAsXML = new JTextArea();
+		taExecutedXPathExpressionResultsAsXML.setEditable(false);
+		spExecutedXPathExpressionResultsAsXML = new JScrollPane(
+				taExecutedXPathExpressionResultsAsXML);
+		spExecutedXPathExpressionResultsAsXML.setPreferredSize(new Dimension(
+				200, 60));
+		spExecutedXPathExpressionResultsAsXML.setBorder(BorderFactory
+				.createLineBorder(INACTIVE_PANEL_BACKGROUND_COLOR, 3));
+		tpExecutedXPathExpressionResults.add("Results as XML",
+				spExecutedXPathExpressionResultsAsXML);
+
+		// initialise some values / tooltips
+		resetXPathTestingPanel();
+
+		return (jpTesting);
+	}
+
+	protected void parseXML() {
+		String xmlData = taSourceXML.getText();
+
+		try {
+			xmlTree = XPathActivityXMLTree.createFromXMLData(xmlData,
+					miIncludeAttributes.isSelected(), miIncludeValues
+							.isSelected(), miIncludeNamespaces.isSelected(),
+					this);
+			xmlTree
+					.setToolTipText("<html>This is a tree structure of the XML document that you have pasted.<br><br>"
+							+ "Clicking on the nodes in this tree will automatically generate a<br>"
+							+ "corresponding XPath expression. Multiple <b>identical</b> nodes can<br>"
+							+ "be selected at once - in this case <b>wildcards</b> will be used in the<br>"
+							+ "generated XPath expression to if selected nodes have different<br>"
+							+ "ancestors. Other nodes that match the generated XPath expression<br>"
+							+ "will also be selected in the tree.<br><br>"
+							+ "Contextual menu provides convenience methods for expanding or<br>"
+							+ "collapsing the tree." + "</html>");
+			xmlTree.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+			JScrollPane spXMLTree = new JScrollPane(xmlTree);
+			spXMLTree.setPreferredSize(spXMLTreePlaceholder.getPreferredSize());
+			jpRight.removeAll();
+			jpRight.add(spXMLTree);
+
+			// all successful - enable options to modify the tree
+			this.bShowXMLTreeSettings.setEnabled(true);
+
+			// data structures inside the XML tree were reset (as the tree was
+			// re-created) -
+			// now reset the UI to the initial state as well
+			resetXPathEditingPanel();
+			resetXPathTestingPanel();
+
+			// XML tree has pre-populated the namespace map with the namespaces
+			// specified in the
+			// root element of the tree - load these values
+			updateXPathEditingPanelValues();
+
+			this.validate();
+			this.repaint();
+		} catch (DocumentException e) {
+			JOptionPane.showMessageDialog(this, e.getMessage(),
+					"XPath Activity", JOptionPane.ERROR_MESSAGE);
+			this.taSourceXML.requestFocusInWindow();
+			return;
+		}
+	}
+
+	/**
+	 * Makes the {@link XPathActivityXMLTree} to refresh its UI from the
+	 * original XML document that was used to create it in first place.
+	 * 
+	 * The reason for using this method is to apply new options to the way the
+	 * tree is rendered - e.g. attributes shown/hidden in the tree, values and
+	 * namespaces shown/hidden, etc.
+	 */
+	protected void refreshXMLTreeUI() {
+		this.xmlTree.refreshFromExistingDocument(this.miIncludeAttributes
+				.isSelected(), this.miIncludeValues.isSelected(),
+				this.miIncludeNamespaces.isSelected());
+	}
+
+	/**
+	 * Initialises XPath Editing panel: -- resets XPath expression that is being
+	 * shown; -- resets local copy of namespace map; -- resets UI of namespace
+	 * mapping table;
+	 */
+	private void resetXPathEditingPanel() {
+		tfXPathExpression.setText("");
+		validateXPathAndUpdateUI();
+
+		// clear the local copy of namespace map
+		xpathNamespaceMap = new HashMap<String, String>();
+
+		// clear the namespace mapping table and reload the data from the map
+		DefaultTableModel tableModel = (DefaultTableModel) jtXPathNamespaceMappings
+				.getModel();
+		tableModel.getDataVector().removeAllElements();
+	}
+
+	/**
+	 * Initialises XPath testing panel which shows results of executing current
+	 * XPath expression against the example XML - the panel is returned to the
+	 * way it looks when it is first loaded.
+	 */
+	private void resetXPathTestingPanel() {
+		this.tfExecutedXPathExpression.setText("--");
+		this.tfMatchingElementCount.setText("--");
+
+		this.taExecutedXPathExpressionResultsAsText.setText("");
+		this.taExecutedXPathExpressionResultsAsText
+				.setBackground(INACTIVE_PANEL_BACKGROUND_COLOR);
+
+		this.taExecutedXPathExpressionResultsAsXML.setText("");
+		this.taExecutedXPathExpressionResultsAsXML
+				.setBackground(INACTIVE_PANEL_BACKGROUND_COLOR);
+	}
+
+	public void updateXPathEditingPanelValues() {
+		if (xmlTree.getCurrentXPathExpression() != null) {
+			tfXPathExpression.setText(xmlTree.getCurrentXPathExpression()
+					.getText());
+		}
+
+		// clear the local copy of namespace map and update it with all values
+		// from
+		// the map in XML tree instance (which was apparently just re-generated
+		// on user request)
+		xpathNamespaceMap.clear();
+		xpathNamespaceMap.putAll(xmlTree.getCurrentXPathNamespaces());
+
+		// clear the namespace mapping table and reload the data from the map
+		reloadNamespaceMappingTableFromLocalMap();
+	}
+
+	protected void reloadNamespaceMappingTableFromLocalMap() {
+		// clear the namespace mapping table and reload the data from the map
+		DefaultTableModel tableModel = (DefaultTableModel) jtXPathNamespaceMappings
+				.getModel();
+		tableModel.getDataVector().removeAllElements();
+		for (Map.Entry<String, String> mapping : this.xpathNamespaceMap
+				.entrySet()) {
+			tableModel.addRow(new Object[] { mapping.getKey(),
+					mapping.getValue() });
+		}
+
+		bRemoveMapping.setEnabled(this.xpathNamespaceMap.entrySet().size() > 0);
+
+		repaint();
+	}
+
+	private String getXPathValidationErrorMessage() {
+		try {
+			// try to parse the XPath expression...
+			DocumentHelper.createXPath(tfXPathExpression.getText().trim());
+			// ...success
+			return ("");
+		} catch (InvalidXPathException e) {
+			// ...failed to parse the XPath expression: notify of the error
+			return (e.getMessage());
+		}
+	}
+
+	/**
+	 * Validates the current XPath expression and updates UI accordingly: --
+	 * XPath status icon is updated; -- tooltip for the icon explains the
+	 * status; -- 'Run XPath' button is enabled/disabled depending on validity
+	 * of XPath expression and existence of example data in the XML tree
+	 */
+	protected void validateXPathAndUpdateUI() {
+		String candidatePath = tfXPathExpression.getText();
+		int xpathStatus = XPathActivityConfigurationBean
+				.validateXPath(candidatePath);
+
+		switch (xpathStatus) {
+		case XPathActivityConfigurationBean.XPATH_VALID:
+			// success: expression is correct
+			jlXPathExpressionStatus.setIcon(XPathActivityIcon
+					.getIconById(XPathActivityIcon.XPATH_STATUS_OK_ICON));
+			jlXPathExpressionStatus
+					.setToolTipText("Current XPath expression is well-formed and valid");
+
+			// could allow to execute against example XML, with only condition:
+			// XML tree must be populated
+			// (that is, there should be something to run the expression
+			// against)
+			if (xmlTree != null) {
+				this.bRunXPath.setEnabled(true);
+				this.bRunXPath
+						.setToolTipText("<html>Evaluate current XPath expression against the XML document<br>"
+								+ "whose structure is shown in the tree view above.</html>");
+			} else {
+				this.bRunXPath.setEnabled(false);
+				this.bRunXPath
+						.setToolTipText("<html>No XML document to evaluate the current XPath expression against.<br><br>"
+								+ "Paste some example XML into the area in the top-left section of the<br>"
+								+ "window, then parse it by clicking on the button with the green arrow<br>"
+								+ "in order to test your XPath expression.</html>");
+			}
+			break;
+
+		case XPathActivityConfigurationBean.XPATH_EMPTY:
+			// no XPath expression - can't tell if it is correct + nothing to
+			// execute
+			jlXPathExpressionStatus.setIcon(XPathActivityIcon
+					.getIconById(XPathActivityIcon.XPATH_STATUS_UNKNOWN_ICON));
+			jlXPathExpressionStatus
+					.setToolTipText("<html>There is no XPath expression to validate.<br><br>"
+							+ "<b>Hint:</b> select something in the tree view showing the structure<br>"
+							+ "of the XML document that you have pasted (or type the XPath<br>"
+							+ "expression manually).</html>");
+			this.bRunXPath.setEnabled(false);
+			this.bRunXPath.setToolTipText("No XPath expression to execute");
+			break;
+
+		case XPathActivityConfigurationBean.XPATH_INVALID:
+			// failed to parse the XPath expression: notify of the error
+			jlXPathExpressionStatus.setIcon(XPathActivityIcon
+					.getIconById(XPathActivityIcon.XPATH_STATUS_ERROR_ICON));
+			jlXPathExpressionStatus
+					.setToolTipText(getXPathValidationErrorMessage());
+
+			this.bRunXPath.setEnabled(false);
+			this.bRunXPath
+					.setToolTipText("Cannot execute invalid XPath expression");
+			break;
+		}
+
+	}
+
+	/**
+	 * Executes the current XPath expression against the current XML tree.
+	 * 
+	 * @param displayResults
+	 *            <code>true</code> to execute and display results in the XPath
+	 *            activity configuration panel (this happens when the 'Run
+	 *            XPath' button is clicked);<br/>
+	 *            <false> to run the expression quietly and simply return the
+	 *            number of matching nodes.
+	 * @return Number of nodes in the XML tree that match the current XPath
+	 *         expression. (Or <code>-1</code> if an error has occurred during
+	 *         the execution -- error messages will only be shown if
+	 *         <code>displayResults == true</code>).
+	 */
+	public int runXPath(boolean displayResults) {
+		// ----- RUNNING THE XPath EXPRESSION -----
+		XPath expr = null;
+		try {
+			expr = DocumentHelper.createXPath(this.tfXPathExpression.getText());
+			expr.setNamespaceURIs(this.xpathNamespaceMap);
+		} catch (InvalidXPathException e) {
+			if (displayResults) {
+				JOptionPane
+						.showMessageDialog(
+								thisPanel,
+								"Incorrect XPath Expression\n\n"
+										+ "Please check the expression if you have manually modified it;\n"
+										+ "Alternatively, try to select another node from the XML tree.\n\n"
+										+ "------------------------------------------------------------------------------------\n\n"
+										+ "XPath processing library reported the following error:\n"
+										+ e.getMessage(), "XPath Activity",
+								JOptionPane.ERROR_MESSAGE);
+			}
+			return (-1);
+		}
+
+		Document doc = xmlTree.getDocumentUsedToPopulateTree();
+		List<Node> matchingNodes = null;
+		int matchingNodeCount = -1;
+		try {
+			matchingNodes = expr.selectNodes(doc);
+			matchingNodeCount = matchingNodes.size();
+		} catch (XPathException e) {
+			if (displayResults) {
+				JOptionPane
+						.showMessageDialog(
+								thisPanel,
+								"Unexpected error has occurred while executing the XPath expression.\n\n"
+										+ "If you have manually modified the XPath expression and/or namespace mappings,\n"
+										+ "please check you changes. Alternatively, make your selection in the XML tree and\n"
+										+ "a correct XPath expression with corresponding namespace mapping will be generated.\n\n"
+										+ "-------------------------------------------------------------------------------------------------------------\n\n"
+										+ "XPath processing library reported the following error:\n"
+										+ e.getMessage(), "XPath Activity",
+								JOptionPane.ERROR_MESSAGE);
+			}
+			return (-1);
+		}
+
+		// ----- DISPLAYING THE RESULTS -----
+		if (displayResults) {
+			tfExecutedXPathExpression.setText(expr.getText());
+			tfMatchingElementCount.setText("" + matchingNodeCount);
+
+			StringBuffer outNodesText = new StringBuffer();
+			StringBuffer outNodesXML = new StringBuffer();
+			for (Node n : matchingNodes) {
+				if (n.getStringValue() != null
+						&& n.getStringValue().length() > 0) {
+					outNodesText.append(n.getStringValue() + "\n");
+				}
+				outNodesXML.append(n.asXML() + "\n");
+			}
+
+			// tpExecutedXPathExpressionResults.setSelectedIndex(0); // open the
+			// first tab (should be the one with textual results) // TODO -
+			// enable if needed
+
+			taExecutedXPathExpressionResultsAsText.setText(outNodesText
+					.toString());
+			taExecutedXPathExpressionResultsAsText.setBackground(Color.WHITE);
+			taExecutedXPathExpressionResultsAsText.setCaretPosition(0);
+			spExecutedXPathExpressionResultsAsText.setBorder(BorderFactory
+					.createLineBorder(Color.WHITE, 3));
+
+			taExecutedXPathExpressionResultsAsXML.setText(outNodesXML
+					.toString());
+			taExecutedXPathExpressionResultsAsXML.setBackground(Color.WHITE);
+			taExecutedXPathExpressionResultsAsXML.setCaretPosition(0);
+			spExecutedXPathExpressionResultsAsXML.setBorder(BorderFactory
+					.createLineBorder(Color.WHITE, 3));
+		}
+
+		return (matchingNodeCount);
+	}
+
+	protected void setSourceXML(String xmlData) {
+		this.taSourceXML.setText(xmlData);
+	}
+
+	protected String getCurrentXPathExpression() {
+		return (this.tfXPathExpression.getText().trim());
+	}
+
+	protected void setCurrentXPathExpression(String xpathExpression) {
+		this.tfXPathExpression.setText(xpathExpression);
+	}
+
+	protected Map<String, String> getCurrentXPathNamespaceMap() {
+		return (this.xpathNamespaceMap);
+	}
+
+	/**
+	 * This method doesn't simply set a reference to the passed map, but rather
+	 * performs a shallow copy of values.
+	 * 
+	 * This is because the method is used during configuration panel's
+	 * initialisation from the values that are held in the configuration bean.
+	 * In case of simple reference assignment, any changes made to map in the
+	 * configuration panel are also taking effect on the same map - referenced
+	 * from the configuration bean, which leads to undesired behaviour.
+	 */
+	protected void setCurrentXPathNamespaceMapValues(
+			Map<String, String> xpathNamespaceMap) {
+		this.xpathNamespaceMap.clear();
+		this.xpathNamespaceMap.putAll(xpathNamespaceMap);
+	}
+
+	protected XPathActivityXMLTree getCurrentXMLTree() {
+		return (this.xmlTree);
+	}
+
+	/**
+	 * For testing
+	 */
+	public static void main(String[] args) {
+		JFrame frame = new JFrame();
+		frame.getContentPane().add(new XPathActivityConfigurationPanel());
+		frame.pack();
+		frame.setSize(new Dimension(900, 600));
+		frame.setLocationRelativeTo(null);
+		frame.setVisible(true);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanelProvider.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanelProvider.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanelProvider.java
new file mode 100644
index 0000000..5954986
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigurationPanelProvider.java
@@ -0,0 +1,158 @@
+package net.sf.taverna.t2.activities.xpath.ui.config;
+
+import java.awt.BorderLayout;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.swing.BorderFactory;
+import javax.swing.JOptionPane;
+
+import net.sf.taverna.t2.activities.xpath.XPathActivityConfigurationBean;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationPanel;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+
+/**
+ *
+ * @author Sergejs Aleksejevs
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class XPathActivityConfigurationPanelProvider extends ActivityConfigurationPanel {
+
+	private XPathActivityConfigurationPanel configPanel;
+	private final ServiceRegistry serviceRegistry;
+
+	public XPathActivityConfigurationPanelProvider(Activity activity, ServiceRegistry serviceRegistry) {
+		super(activity);
+		this.serviceRegistry = serviceRegistry;
+		initialise();
+	}
+
+	@Override
+	protected void initialise() {
+		super.initialise();
+		removeAll();
+		setLayout(new BorderLayout());
+
+		// create actual contents of the config panel
+		this.configPanel = new XPathActivityConfigurationPanel();
+		add(configPanel, BorderLayout.CENTER);
+
+		// place the whole configuration panel into a raised area, so that
+		// automatically added 'Apply' / 'Close' buttons visually apply to
+		// the whole of the panel, not just part of it
+		this.setBorder(BorderFactory.createCompoundBorder(
+				BorderFactory.createEmptyBorder(12, 12, 2, 12),
+				BorderFactory.createRaisedBevelBorder()));
+
+		// Populate fields from activity configuration bean
+		refreshConfiguration();
+	}
+
+	/**
+	 * Prepare a new configuration bean from the UI, to be returned with
+	 * getConfiguration()
+	 */
+	@Override
+	public void noteConfiguration() {
+		if (configPanel.getCurrentXMLTree() != null) {
+			setProperty("exampleXmlDocument", configPanel.getCurrentXMLTree()
+					.getDocumentUsedToPopulateTree().asXML());
+		}
+		setProperty("xpathExpression", configPanel.getCurrentXPathExpression());
+
+		Map<String, String> xPathNamespaceMap = configPanel.getCurrentXPathNamespaceMap();
+		if (xPathNamespaceMap.isEmpty()) {
+			json.remove("xpathNamespaceMap");
+		} else {
+			ArrayNode namespaceMapNode = json.arrayNode();
+			for (Entry<String, String> namespaceMapping : xPathNamespaceMap.entrySet()) {
+				namespaceMapNode.addObject().put("prefix", namespaceMapping.getKey()).put("uri", namespaceMapping.getValue());
+			}
+			json.set("xpathNamespaceMap", namespaceMapNode);
+		}
+
+		configureInputPorts(serviceRegistry);
+		configureOutputPorts(serviceRegistry);
+}
+
+	/**
+	 * Check that user values in the UI are valid.
+	 */
+	@Override
+	public boolean checkValues() {
+		// the only validity condition is the correctness of the XPath
+		// expression -- so checking that
+		int xpathExpressionStatus = XPathActivityConfigurationBean.validateXPath(this.configPanel
+				.getCurrentXPathExpression());
+
+		// show an explicit warning message to explain the problem
+		if (xpathExpressionStatus == XPathActivityConfigurationBean.XPATH_EMPTY) {
+			JOptionPane.showMessageDialog(this, "XPath expression should not be empty",
+					"XPath Activity", JOptionPane.WARNING_MESSAGE);
+		} else if (xpathExpressionStatus == XPathActivityConfigurationBean.XPATH_INVALID) {
+			JOptionPane.showMessageDialog(this,
+					"<html><center>XPath expression is invalid - hover the mouse over the XPath status<br>"
+							+ "icon to get more information</center></html>", "XPath Activity",
+					JOptionPane.WARNING_MESSAGE);
+		}
+
+		return (xpathExpressionStatus == XPathActivityConfigurationBean.XPATH_VALID);
+	}
+
+	/**
+	 * Update GUI from a changed configuration bean (perhaps by undo / redo).
+	 */
+	@Override
+	public void refreshConfiguration() {
+		if (json.has("exampleXmlDocument")) {
+			configPanel.setSourceXML(getProperty("exampleXmlDocument"));
+			configPanel.parseXML();
+		}
+
+		configPanel.setCurrentXPathExpression(getProperty("xpathExpression"));
+
+		Map<String, String> xpathNamespaceMap = new HashMap<>();
+		if (json.has("xpathNamespaceMap")) {
+			for (JsonNode namespaceMapping : json.get("xpathNamespaceMap")) {
+				xpathNamespaceMap.put(namespaceMapping.get("prefix").asText(), namespaceMapping.get("uri").asText());
+			}
+		}
+		configPanel.setCurrentXPathNamespaceMapValues(xpathNamespaceMap);
+		configPanel.reloadNamespaceMappingTableFromLocalMap();
+
+		// if the XML tree was populated, (re-)run the XPath expression
+		// and restore selection of nodes in the tree, if possible
+		if (configPanel.getCurrentXMLTree() != null) {
+			configPanel.runXPath(true);
+
+			// convert the XPath expression into the required list form;
+			// discard the first 'leg', as it's a side effect of
+			// "String.split()" -
+			// non-existent string to the left of the first "/"
+			String[] xpathLegs = getProperty("xpathExpression").split("/");
+			List<String> xpathLegList = new ArrayList<String>();
+			for (int i = 1; i < xpathLegs.length; i++) {
+				xpathLegList.add("/" + xpathLegs[i]);
+			}
+
+			// if nothing was obtained, we should be looking at the root node -
+			// but add the actual expression as it was, just in case
+			if (xpathLegList.size() == 0) {
+				xpathLegList.add(configPanel.getCurrentXPathExpression());
+			}
+
+			// invoke selection handler of the XML tree to do the job
+			configPanel.getCurrentXMLTree().getXMLTreeSelectionHandler()
+					.selectAllNodesThatMatchTheCurrentXPath(xpathLegList, null);
+		}
+
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigureAction.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigureAction.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigureAction.java
new file mode 100644
index 0000000..4e68948
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/XPathActivityConfigureAction.java
@@ -0,0 +1,52 @@
+package net.sf.taverna.t2.activities.xpath.ui.config;
+
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+/**
+ * @author Sergejs Aleksejevs
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class XPathActivityConfigureAction extends ActivityConfigurationAction {
+
+	private final EditManager editManager;
+	private final FileManager fileManager;
+	private final ServiceRegistry serviceRegistry;
+
+	public XPathActivityConfigureAction(Activity activity, Frame owner,
+			EditManager editManager, FileManager fileManager,
+			ActivityIconManager activityIconManager,
+			ServiceDescriptionRegistry serviceDescriptionRegistry, ServiceRegistry serviceRegistry) {
+		super(activity, activityIconManager, serviceDescriptionRegistry);
+		this.editManager = editManager;
+		this.fileManager = fileManager;
+		this.serviceRegistry = serviceRegistry;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		ActivityConfigurationDialog currentDialog = ActivityConfigurationAction.getDialog(getActivity());
+
+		if (currentDialog != null) {
+			currentDialog.toFront();
+			return;
+		}
+
+		XPathActivityConfigurationPanelProvider panel = new XPathActivityConfigurationPanelProvider(
+				getActivity(), serviceRegistry);
+		ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(
+				getActivity(), panel, editManager);
+
+		ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/TableCellListener.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/TableCellListener.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/TableCellListener.java
new file mode 100644
index 0000000..872fd70
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/TableCellListener.java
@@ -0,0 +1,186 @@
+package net.sf.taverna.t2.activities.xpath.ui.config.xmltree;
+
+import java.awt.event.*;
+import javax.swing.*;
+import java.beans.*;
+
+/**
+ *  This class listens for changes made to the data in the table via the
+ *  TableCellEditor. When editing is started, the value of the cell is saved
+ *  When editing is stopped the new value is saved. When the oold and new
+ *  values are different, then the provided Action is invoked.
+ *
+ *  The source of the Action is a TableCellListener instance.
+ *  
+ *  TODO: update to work with Java 1.6, when Taverna is migrated to that version
+ *        (see the next TODO tag - this is where the change needs to be made) 
+ *  
+ *  @author Robert Camick
+ *  
+ *  @see <a href="http://tips4java.wordpress.com/2009/06/07/table-cell-listener/">http://tips4java.wordpress.com/2009/06/07/table-cell-listener/</a>
+ *  @see <a href="http://www.camick.com/java/source/TableCellListener.java">http://www.camick.com/java/source/TableCellListener.java</a>
+ */
+public class TableCellListener implements PropertyChangeListener, Runnable
+{
+  private JTable table;
+  private Action action;
+
+  private int row;
+  private int column;
+  private Object oldValue;
+  private Object newValue;
+
+  /**
+   *  Create a TableCellListener.
+   *
+   *  @param table   the table to be monitored for data changes
+   *  @param action  the Action to invoke when cell data is changed
+   */
+  public TableCellListener(JTable table, Action action)
+  {
+    this.table = table;
+    this.action = action;
+    this.table.addPropertyChangeListener( this );
+  }
+
+  /**
+   *  Create a TableCellListener with a copy of all the data relevant to
+   *  the change of data for a given cell.
+   *
+   *  @param row  the row of the changed cell
+   *  @param column  the column of the changed cell
+   *  @param oldValue  the old data of the changed cell
+   *  @param newValue  the new data of the changed cell
+   */
+  private TableCellListener(JTable table, int row, int column, Object oldValue, Object newValue)
+  {
+    this.table = table;
+    this.row = row;
+    this.column = column;
+    this.oldValue = oldValue;
+    this.newValue = newValue;
+  }
+
+  /**
+   *  Get the column that was last edited - value as in table model, not in the UI
+   *
+   *  @return the column that was edited
+   */
+  public int getColumn()
+  {
+    return column;
+  }
+
+  /**
+   *  Get the new value in the cell
+   *
+   *  @return the new value in the cell
+   */
+  public Object getNewValue()
+  {
+    return newValue;
+  }
+
+  /**
+   *  Get the old value of the cell
+   *
+   *  @return the old value of the cell
+   */
+  public Object getOldValue()
+  {
+    return oldValue;
+  }
+
+  /**
+   *  Get the row that was last edited - value as in table model, not in the UI
+   *
+   *  @return the row that was edited
+   */
+  public int getRow()
+  {
+    return row;
+  }
+
+  /**
+   *  Get the table of the cell that was changed
+   *
+   *  @return the table of the cell that was changed
+   */
+  public JTable getTable()
+  {
+    return table;
+  }
+  
+  //
+  //  Implement the PropertyChangeListener interface
+  //
+  public void propertyChange(PropertyChangeEvent e)
+  {
+    //  A cell has started/stopped editing
+
+    if ("tableCellEditor".equals(e.getPropertyName()))
+    {
+      if (table.isEditing())
+        processEditingStarted();
+      else
+        processEditingStopped();
+    }
+  }
+
+  /*
+   *  Save information of the cell about to be edited
+   */
+  private void processEditingStarted()
+  {
+    //  The invokeLater is necessary because the editing row and editing
+    //  column of the table have not been set when the "tableCellEditor"
+    //  PropertyChangeEvent is fired.
+    //  This results in the "run" method being invoked
+
+    SwingUtilities.invokeLater( this );
+  }
+  
+  /*
+   *  See above.
+   */
+  public void run()
+  {
+//    TODO - the next line is a correct implementation for Java 1.6    
+//    row = table.convertRowIndexToModel( table.getEditingRow() );
+    
+//    in Java 1.5 which is currently used, tables are not easily sortable
+//    (and that is the case for the XPath Activity, where this class is used) --
+//    hence, row numbers in the view and in the model will always be identical
+//    --> HACK: just use the row number from the view...
+    row = table.getEditingRow();
+    
+    column = table.convertColumnIndexToModel( table.getEditingColumn() );
+    oldValue = table.getModel().getValueAt(row, column);
+    newValue = null;
+  }
+
+  /*
+   *  Update the Cell history when necessary
+   */
+  private void processEditingStopped()
+  {
+    newValue = table.getModel().getValueAt(row, column);
+
+    //  The data has changed, invoke the supplied Action
+
+    if (! newValue.equals(oldValue))
+    {
+      //  Make a copy of the data in case another cell starts editing
+      //  while processing this change
+
+      TableCellListener tcl = new TableCellListener(
+        getTable(), getRow(), getColumn(), getOldValue(), getNewValue());
+
+      ActionEvent event = new ActionEvent(
+        tcl,
+        ActionEvent.ACTION_PERFORMED,
+        "");
+      action.actionPerformed(event);
+    }
+  }
+}


[49/50] [abbrv] incubator-taverna-workbench-common-activities git commit: Merge from https://github.com/taverna/taverna-rest-activity-ui master

Posted by st...@apache.org.
Merge from https://github.com/taverna/taverna-rest-activity-ui master


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/61611754
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/61611754
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/61611754

Branch: refs/heads/master
Commit: 61611754284341a675637d29cc87ddfb1c7c4f22
Parents: 294e203 11c47f2
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:34:40 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:34:40 2015 +0000

----------------------------------------------------------------------
 taverna-rest-activity-ui/pom.xml                |  74 ++
 .../rest/ui/config/HTTPHeadersTableModel.java   | 119 ++++
 .../config/RESTActivityConfigurationPanel.java  | 670 +++++++++++++++++++
 .../ui/config/RESTActivityConfigureAction.java  |  51 ++
 .../rest/ui/menu/AddRESTTemplateAction.java     | 107 +++
 .../rest/ui/menu/AddRESTTemplateMenuAction.java | 114 ++++
 .../GenericRESTTemplateService.java             |  76 +++
 .../ui/servicedescription/RESTActivityIcon.java |  54 ++
 .../serviceprovider/ExampleServiceDesc.java.bak |  99 +++
 .../ExampleServiceProvider.java.bak             | 106 +++
 .../ExampleServiceProviderConfig.java.bak       |  31 +
 .../view/ConfigureRESTActivityMenuAction.java   |  66 ++
 .../RESTActivityMainContextViewFactory.java     |  62 ++
 .../ui/view/RESTActivityMainContextualView.java | 220 ++++++
 ...rvicedescriptions.ServiceDescriptionProvider |   1 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |   3 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |   1 +
 ...ntextualviews.activity.ContextualViewFactory |   1 +
 .../spring/rest-activity-ui-context-osgi.xml    |  28 +
 .../spring/rest-activity-ui-context.xml         |  50 ++
 .../activities/rest/ui/config/information.png   | Bin 0 -> 778 bytes
 .../t2/activities/rest/ui/config/mediatypes.txt |  65 ++
 .../ui/servicedescription/service_type_rest.png | Bin 0 -> 1137 bytes
 23 files changed, 1998 insertions(+)
----------------------------------------------------------------------



[26/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-xpath-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTree.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTree.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTree.java
new file mode 100644
index 0000000..4f98851
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTree.java
@@ -0,0 +1,572 @@
+package net.sf.taverna.t2.activities.xpath.ui.config.xmltree;
+
+import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import javax.swing.JLabel;
+import javax.swing.JMenuItem;
+import javax.swing.JPopupMenu;
+import javax.swing.JTree;
+import javax.swing.event.TreeSelectionListener;
+import javax.swing.text.Position;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import net.sf.taverna.t2.activities.xpath.ui.config.XPathActivityConfigurationPanel;
+import net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathActivityIcon;
+
+import org.dom4j.Attribute;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+import org.dom4j.Namespace;
+import org.dom4j.QName;
+import org.dom4j.XPath;
+
+
+/**
+ * 
+ * @author Sergejs Aleksejevs
+ */
+public class XPathActivityXMLTree extends JTree
+{
+  private XPathActivityXMLTree instanceOfSelf;
+  private XPathActivityXMLTreeRenderer treeRenderer;
+  
+  private JPopupMenu contextualMenu;
+  
+  private TreeSelectionListener[] allSelectionListeners;
+  private XPathActivityXMLTreeSelectionHandler xmlTreeSelectionHandler;
+  
+  /**
+   * 
+   */
+  private XPathActivityConfigurationPanel parentConfigPanel;
+
+  private Document documentUsedToPopulateTree;
+  
+  /**
+   *  holds value of the current XPath expression obtained from 
+   *  the combination of nodes selected in the XML tree 
+   */
+  private XPath currentXPathExpression;
+  
+  private Map<String,String> currentXPathNamespaces;
+  
+  
+  
+  private XPathActivityXMLTree(XPathActivityXMLTreeNode root, Document documentUsedToPopulateTree, 
+      boolean bIncludeElementValues, boolean bIncludeElementNamespaces, XPathActivityConfigurationPanel parentConfigPanel)
+  {
+    super(root);
+    
+    this.instanceOfSelf = this;
+    this.allSelectionListeners = new TreeSelectionListener[0];
+    
+    this.parentConfigPanel = parentConfigPanel;
+    
+    this.documentUsedToPopulateTree = documentUsedToPopulateTree;
+    this.currentXPathExpression = null;
+    this.currentXPathNamespaces = new HashMap<String,String>();
+    this.prepopulateNamespaceMap();
+    
+    
+    // custom renderer of the nodes in the XML tree
+    this.treeRenderer = new XPathActivityXMLTreeRenderer(bIncludeElementValues, bIncludeElementNamespaces);
+    this.setCellRenderer(treeRenderer);
+    
+    
+    // add listener to handle various selections of nodes in the tree 
+    this.xmlTreeSelectionHandler = new XPathActivityXMLTreeSelectionHandler(parentConfigPanel, this);
+    this.addTreeSelectionListener(xmlTreeSelectionHandler);
+    
+    
+    // --- CONTEXTUAL MENU FOR EXPANDING / COLLAPSING THE TREE ---
+    
+    // create popup menu for expanding / collapsing all nodes in the tree
+    JMenuItem miExpandAll = new JMenuItem("Expand all", XPathActivityIcon.getIconById(XPathActivityIcon.XML_TREE_EXPAND_ALL_ICON));
+    miExpandAll.setToolTipText("Expand all nodes in the filtering tree");
+    miExpandAll.addActionListener(new ActionListener() {
+      public void actionPerformed(ActionEvent e) {
+        for (int i = 0; i < getRowCount(); i++) {
+          instanceOfSelf.expandRow(i);
+        }
+      }
+    });
+    JMenuItem miCollapseAll = new JMenuItem("Collapse all", XPathActivityIcon.getIconById(XPathActivityIcon.XML_TREE_COLLAPSE_ALL_ICON));
+    miCollapseAll.setToolTipText("Collapse all expanded nodes in the filtering tree");
+    miCollapseAll.addActionListener(new ActionListener() {
+      public void actionPerformed(ActionEvent e) {
+        for (int i = getRowCount() - 1; i >= 0; i--) {
+          instanceOfSelf.collapseRow(i);
+        }
+      }
+    });
+    
+    // populate the popup menu with created menu items
+    contextualMenu = new JPopupMenu();
+    contextualMenu.add(miExpandAll);
+    contextualMenu.add(miCollapseAll);
+    
+    // mouse events may cause the contextual menu to be shown - adding a listener
+    this.addMouseListener(new MouseAdapter()
+    {
+      public void mousePressed(MouseEvent e) {
+        if (e.isPopupTrigger()) {
+          contextualMenu.show(instanceOfSelf, e.getX(), e.getY());
+        }
+      }
+      public void mouseReleased(MouseEvent e) {
+        if (e.isPopupTrigger()) {
+          // another way a popup menu may be called on different systems
+          contextualMenu.show(instanceOfSelf, e.getX(), e.getY());
+        }
+      }
+    });
+    
+  }
+  
+  
+  /**
+   * Pre-populates namespace map with the namespaced declared in the root
+   * node of the XML document, which was used to populate the tree.
+   */
+  private void prepopulateNamespaceMap()
+  {
+    Document doc = this.getDocumentUsedToPopulateTree();
+    Element root = doc.getRootElement();
+    
+    // get opening tag of the root node
+    String rootAsXML = root.asXML().substring(0, root.asXML().indexOf(">"));
+    
+    // split the opening tag into tokens (all attributes are separated by a space)
+    String[] rootTokens = rootAsXML.split(" ");
+    
+    // for each attribute check if that's a namespace declaration
+    for (String token : rootTokens) {
+      if (token.startsWith("xmlns"))
+      {
+        String[] namespacePrefixAndURI = token.split("=");
+        
+        // a prefix is either given explicitly, or an empty one will be used
+        String prefix = namespacePrefixAndURI[0].indexOf(":") == -1 ?
+                        "" :
+                        namespacePrefixAndURI[0].split(":")[1];
+        
+        // URI is the value of the XML attribute, so need to strip out surrounding quotes
+        String URI = namespacePrefixAndURI[1].replaceAll("\"", "");
+        
+        // now add the details of the current namespace to the map
+        this.addNamespaceToXPathMap(new Namespace(prefix, URI));
+      }
+    }
+  }
+
+
+  protected XPathActivityConfigurationPanel getParentConfigPanel() {
+    return parentConfigPanel;
+  }
+  
+  public XPathActivityXMLTreeSelectionHandler getXMLTreeSelectionHandler() {
+    return xmlTreeSelectionHandler;
+  }
+  
+  public Document getDocumentUsedToPopulateTree() {
+    return documentUsedToPopulateTree;
+  }
+  
+  public XPath getCurrentXPathExpression() {
+    return currentXPathExpression;
+  }
+  protected void setCurrentXPathExpression(XPath xpathExpression) {
+    this.currentXPathExpression = xpathExpression;
+  }
+  
+  
+  public Map<String,String> getCurrentXPathNamespaces() {
+    return currentXPathNamespaces;
+  }
+  
+  
+  
+  protected void removeAllSelectionListeners()
+  {
+    this.allSelectionListeners = this.getTreeSelectionListeners();
+    for (TreeSelectionListener listener : this.allSelectionListeners) {
+      this.removeTreeSelectionListener(listener);
+    }
+  }
+  
+  protected void restoreAllSelectionListeners()
+  {
+    for (TreeSelectionListener listener : this.allSelectionListeners) {
+      this.addTreeSelectionListener(listener);
+    }
+  }
+  
+  
+  
+  /**
+   * Creates an instance of the XML tree from provided XML data.
+   * 
+   * @param xmlData XML document in the form of a <code>String</code> to
+   *        derive the tree from.
+   * @param bIncludeAttributesIntoTree
+   * @param bIncludeValuesIntoTree
+   * @param bIncludeElementNamespacesIntoTree
+   * @param parentConfigPanel
+   * @return
+   * @throws DocumentException if <code>xmlData</code> does not
+   *                           contain a valid XML document. 
+   * 
+   */
+  public static XPathActivityXMLTree createFromXMLData(String xmlData, boolean bIncludeAttributesIntoTree,
+                   boolean bIncludeValuesIntoTree, boolean bIncludeElementNamespacesIntoTree,
+                   XPathActivityConfigurationPanel parentConfigPanel) throws DocumentException
+  {
+    // ----- XML DOCUMENT PARSING -----
+    // try to parse the XML document - the next line will throw an exception if
+    // the document is not well-formed; proceed otherwise
+    Document doc = DocumentHelper.parseText(xmlData);
+    Element rootElement = doc.getRootElement();
+    
+    
+    // ----- POPULATE XML TREE -----
+    XPathActivityXMLTreeElementNode rootNode = new XPathActivityXMLTreeElementNode(rootElement);
+    populate(rootNode, rootElement, bIncludeAttributesIntoTree);
+    
+    return (new XPathActivityXMLTree(rootNode, doc, bIncludeValuesIntoTree, bIncludeElementNamespacesIntoTree, parentConfigPanel));
+  }
+  
+  
+  /**
+   * Worker method for populating the tree recursively from a list of Elements.
+   * 
+   * @param node
+   * @param element
+   */
+  private static void populate(DefaultMutableTreeNode node, Element element,
+                               boolean bIncludeAttributesIntoTree)
+  {
+    Iterator<Element> elementIterator = element.elements().iterator();
+    while (elementIterator.hasNext()) {
+      Element childElement = elementIterator.next();
+      XPathActivityXMLTreeElementNode childNode = new XPathActivityXMLTreeElementNode(childElement);
+      node.add(childNode);
+      
+      // recursively repeat for all children of the current child element
+      populate(childNode, childElement, bIncludeAttributesIntoTree);
+    }
+    
+    
+    // add attributes of the element as its children, if necessary
+    if (bIncludeAttributesIntoTree) {
+      List<Attribute> attributes = element.attributes();
+      for (Attribute attribute : attributes) {
+        node.add(new XPathActivityXMLTreeAttributeNode(attribute));
+      }
+    }
+  }
+  
+  
+  // ---------------- RESPONDING TO REQUESTS TO CHANGE APPEARANCE OF EXISTING TREE -----------------
+  
+  /**
+   * NB! May be inefficient, as this solution re-generates the whole tree from
+   *     stored XML document and replaces the root node of itself with a newly
+   *     generated root node (that will be populated with updated children,
+   *     according to the new values of options).
+   *  
+   *     However, this is a simple solution that will work for now.
+   * 
+   * @param bIncludeAttributes
+   * @param bIncludeValues
+   * @param bIncludeNamespaces
+   */
+  public void refreshFromExistingDocument(boolean bIncludeAttributes, boolean bIncludeValues, boolean bIncludeNamespaces)
+  {
+    this.setEnabled(false);
+    removeAllSelectionListeners();
+    
+    // store expansion and selection state of the XML tree
+    // see documentation for restoreExpandedPaths() for more details
+    //
+    // stored paths to expanded nodes are quite reliable, as paths are recorded;
+    // stored selected rows are less reliable, as only indices are kept -- however,
+    // the tree is re-created from the same document, so ordering/number of nodes
+    // cannot change (apart from attributes that may be added / removed - the attributes
+    // appear after other child nodes of some node in the tree, therefore only their
+    // selection could be affected)
+    HashMap<String,ArrayList<String>> toExpand = new HashMap<String,ArrayList<String>>();
+    ArrayList<Integer> toSelect = new ArrayList<Integer>();
+    for( int i = 1; i < this.getRowCount(); i++) {
+      if( this.isExpanded(i) ) {
+        TreePath path = this.getPathForRow(i);
+        String parentPath = path.getParentPath().toString();
+        ArrayList<String> values = toExpand.get(parentPath);
+        if(values == null) {
+          values = new ArrayList<String>();
+        }
+        values.add(path.getLastPathComponent().toString());
+        toExpand.put(parentPath, values);
+      }
+      if (this.isRowSelected(i)) {
+        toSelect.add(i);
+      }
+    }
+    
+    
+    // update presentation options
+    this.treeRenderer.setIncludeElementValues(bIncludeValues);
+    this.treeRenderer.setIncludeElementNamespaces(bIncludeNamespaces);
+    
+    // re-create the root node of the tree and replace the old one with it
+    Element rootElement = this.documentUsedToPopulateTree.getRootElement();
+    XPathActivityXMLTreeNode newRootNode = new XPathActivityXMLTreeElementNode(rootElement);
+    populate(newRootNode, rootElement, bIncludeAttributes);
+    ((DefaultTreeModel)this.getModel()).setRoot(newRootNode);
+    
+    
+    // restore previous state of the tree from saved values
+    restoreExpandedPaths(toExpand, this.getPathForRow(0));
+    restoreSelectedPaths(toSelect);
+    
+    this.restoreAllSelectionListeners();
+    this.setEnabled(true);
+  }
+  
+  
+  /**
+   * This method can only reliably work when the tree is re-generated from the same
+   * XML document, so that number / order of nodes would not change.
+   * 
+   * @param toSelect List of indices of rows to re-select after tree was re-generated.
+   */
+  private void restoreSelectedPaths(ArrayList<Integer> toSelect)
+  {
+    if (toSelect == null || toSelect.isEmpty()) return;
+    
+    // something definitely needs to be selected, so include root element into selection
+    this.addSelectionRow(0);
+    
+    // select all stored rows
+    for (Integer value : toSelect) {
+      this.addSelectionRow(value);
+    }
+  }
+
+
+
+  /**
+   * Taken from: <a href="http://java.itags.org/java-core-gui-apis/58504/">http://java.itags.org/java-core-gui-apis/58504/</a>
+   * 
+   * This method recursively expands all previously stored paths.
+   * Works under assumption that the name of the root node did not change.
+   * Otherwise, it can handle changed structure of the tree.
+   * 
+   * To achieve its goal, it cannot simply use stored TreePath from your the original tree,
+   * since the paths are invalid after the tree is refreshed. Instead, a HashMap which links
+   * a String representation of the parent tree path to all expanded child node names is used.
+   * 
+   * @param toExpand Map which links a String representation of the parent tree path to all
+   *                 expanded child node names is used.
+   * @param rootPath Path to root node.
+   */
+  void restoreExpandedPaths(HashMap<String,ArrayList<String>> toExpand, TreePath rootPath)
+  {
+    ArrayList<String> values = toExpand.remove(rootPath.toString());
+    if (values == null) return;
+    
+    int row = this.getRowForPath(rootPath);
+    for (String value : values)
+    {
+      TreePath nextMatch = this.getNextMatch(value, row, Position.Bias.Forward);
+      this.expandPath(nextMatch);
+      if (toExpand.containsKey(nextMatch.toString())) {
+        restoreExpandedPaths(toExpand, nextMatch);
+      }
+    }
+  }
+  
+  
+  
+  // ---------------- TREE SELECTION MODEL + XPath GENERATION -----------------
+  
+  
+  protected String generateXPathFromTreePath(TreePath path)
+  {
+    StringBuilder xpath = new StringBuilder();
+    
+    for (String leg : generateXPathFromTreePathAsLegList(path)) {
+      xpath.append(leg);
+    }
+    
+    return (xpath.toString());
+  }
+  
+  
+  protected List<String> generateXPathFromTreePathAsLegList(TreePath path)
+  {
+    List<String> pathLegs = new LinkedList<String>();
+    
+    TreePath parentPath = path;
+    for (int i = 0; i < path.getPathCount(); i++)
+    {
+      XPathActivityXMLTreeNode lastXMLTreeNodeInThisPath = (XPathActivityXMLTreeNode)parentPath.getLastPathComponent();
+      pathLegs.add(0, this.getXMLTreeNodeEffectiveQualifiedNameAsXPathLeg(lastXMLTreeNodeInThisPath));
+      
+      parentPath = parentPath.getParentPath();
+    }
+    
+    return (pathLegs);
+  }
+  
+  
+  protected String getXMLTreeNodeEffectiveQualifiedNameAsXPathLeg(XPathActivityXMLTreeNode node)
+  {
+    QName qname = node.getNodeQName();
+    String effectiveNamespacePrefix = addNamespaceToXPathMap(qname.getNamespace());
+    
+    return("/" +
+           (node.isAttribute() ? "@" : "") +
+           (effectiveNamespacePrefix.length() > 0 ? (effectiveNamespacePrefix + ":") : "") +
+           qname.getName());
+  }
+  
+  
+  
+  private String addNamespaceToXPathMap(Namespace namespace) 
+  {
+    // EMTPY PREFIX
+    if (namespace.getPrefix().length() == 0) {
+      if (namespace.getURI().length() == 0) {
+        // DEFAULT NAMESPACE with no URI - nothing to worry about
+        return "";
+      }
+      else {
+        // DEFAULT NAMESPACE WITH NO PREFIX, BUT URI IS KNOWN
+        return (addNamespaceToXPathMap(new Namespace("default", namespace.getURI())));
+      }
+    }
+    
+    // NEW NON-EMPTY PREFIX
+    if (!this.currentXPathNamespaces.containsKey(namespace.getPrefix())) {
+      this.currentXPathNamespaces.put(namespace.getPrefix(), namespace.getURI());
+      return (namespace.getPrefix());
+    }
+    
+    // EXISTING NON-EMPTY PREFIX AND THE SAME URI - NO NEED TO ADD AGAIN
+    else if (this.currentXPathNamespaces.get(namespace.getPrefix()).equals(namespace.getURI())) {
+      return (namespace.getPrefix());
+    }
+    
+    // EXISTING NON-EMPTY PREFIX, BUT DIFFERENT URI
+    else {
+      String repeatedPrefix = namespace.getPrefix();
+      
+      int i = 0;
+      while (this.currentXPathNamespaces.containsKey(repeatedPrefix + i)) {
+        // check if current alternative prefix wasn't yet applied to current URI
+        if (this.currentXPathNamespaces.get(repeatedPrefix + i).equals(namespace.getURI())) {
+          return (repeatedPrefix + i);
+        }
+        else {
+          // still another URI for the same prefix, keep trying to increase the ID in the prefix
+          i++;
+        }
+      }
+      
+      String modifiedPrefix = repeatedPrefix + i;
+      this.currentXPathNamespaces.put(modifiedPrefix, namespace.getURI());
+      return (modifiedPrefix);
+    }
+  }
+  
+  
+  // ----------------------- Tree Cell Renderer --------------------------
+  
+  /**
+   * 
+   * @author Sergejs Aleksejevs
+   */
+  private class XPathActivityXMLTreeRenderer extends DefaultTreeCellRenderer
+  {
+    private boolean bIncludeElementValues;
+    private boolean bIncludeElementNamespaces;
+    
+    public XPathActivityXMLTreeRenderer(boolean bIncludeElementValues, boolean bIncludeElementNamespaces) {
+      super();
+      this.bIncludeElementValues = bIncludeElementValues;
+      this.bIncludeElementNamespaces = bIncludeElementNamespaces;
+    }
+    
+    
+    public boolean getIncludeElementValues() {
+      return bIncludeElementValues;
+    }
+    public void setIncludeElementValues(boolean bIncludeElementValues) {
+      this.bIncludeElementValues = bIncludeElementValues;
+    }
+    
+    public boolean getIncludeElementNamespaces() {
+      return bIncludeElementNamespaces;
+    }
+    public void setIncludeElementNamespaces(boolean bIncludeElementNamespaces) {
+      this.bIncludeElementNamespaces = bIncludeElementNamespaces;
+    }
+    
+    
+    public Component getTreeCellRendererComponent(JTree tree, Object value,
+        boolean selected, boolean expanded, boolean leaf, int row,
+        boolean hasFocus)
+    {
+      // obtain the default rendering, we'll then customize it
+      Component defaultRendering = super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
+      
+      // it is most likely that the default rendering will be a JLabel, check just to be safe
+      if (defaultRendering instanceof JLabel)
+      {
+        JLabel defaultRenderedLabel = ((JLabel)defaultRendering);
+        
+        // ---------- CHOOSE APPROPRIATE ICON FOR THE NODE ------------
+        if (row == 0) {
+          // set the icon for the XML tree root node
+          defaultRenderedLabel.setIcon(XPathActivityIcon.getIconById(XPathActivityIcon.XML_TREE_ROOT_ICON));
+        }
+        else {
+          // set the icon for the XML tree node
+          if (value instanceof XPathActivityXMLTreeNode && 
+              ((XPathActivityXMLTreeNode)value).isAttribute())
+          {
+            defaultRenderedLabel.setIcon(XPathActivityIcon.getIconById(XPathActivityIcon.XML_TREE_ATTRIBUTE_ICON));
+          }
+          else {
+            defaultRenderedLabel.setIcon(XPathActivityIcon.getIconById(XPathActivityIcon.XML_TREE_NODE_ICON));
+          }
+        }
+        
+        
+        // ----------- CHOOSE THE DISPLAY TITLE FOR THE NODE ------------
+        if (value instanceof XPathActivityXMLTreeNode) {
+          defaultRenderedLabel.setText(((XPathActivityXMLTreeNode)value).getTreeNodeDisplayLabel(
+              this.bIncludeElementValues, this.bIncludeElementNamespaces, true));
+        }
+      }
+      
+      return (defaultRendering);
+    }
+    
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeAttributeNode.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeAttributeNode.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeAttributeNode.java
new file mode 100644
index 0000000..d22623f
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeAttributeNode.java
@@ -0,0 +1,50 @@
+package net.sf.taverna.t2.activities.xpath.ui.config.xmltree;
+
+import org.dom4j.Attribute;
+
+/**
+ * 
+ * @author Sergejs Aleksejevs
+ */
+public class XPathActivityXMLTreeAttributeNode extends XPathActivityXMLTreeNode
+{
+  private Attribute associatedAttribute;
+  
+  public XPathActivityXMLTreeAttributeNode(Attribute associatedAttribute) {
+    super(associatedAttribute, true);
+    this.associatedAttribute = associatedAttribute;
+  }
+  
+  public Attribute getAssociatedAttribute() {
+    return associatedAttribute;
+  }
+  
+  public String getTreeNodeDisplayLabel(boolean bIncludeValue, boolean bUseStyling)
+  {
+    StringBuilder label = new StringBuilder();
+    
+    // add qualified attribute name (possibly) with styling
+    label.append((bUseStyling ? "<font color=\"purple\">" : "") +
+                 this.associatedAttribute.getQualifiedName() +
+                 (bUseStyling ? "</font>" : ""));
+    
+    // add attribute value
+    if (bIncludeValue)
+    {
+      String attributeTextValue = this.associatedAttribute.getText();
+      
+      if (attributeTextValue != null && attributeTextValue.length() > 0) {
+        label.append((bUseStyling ? "<font color=\"gray\"> - </font><font color=\"green\">" : "") +
+                     truncateElementTextValue(stripAllHTML(attributeTextValue)) +
+                     (bUseStyling ? "</font>" : ""));
+      }
+    }
+    
+    if (bUseStyling) {
+      label.insert(0, "<html>");
+      label.append("</html>");
+    }
+    
+    return (label.toString());
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeElementNode.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeElementNode.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeElementNode.java
new file mode 100644
index 0000000..a151753
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeElementNode.java
@@ -0,0 +1,62 @@
+package net.sf.taverna.t2.activities.xpath.ui.config.xmltree;
+
+import org.dom4j.Element;
+import org.dom4j.Namespace;
+
+
+/**
+ * 
+ * @author Sergejs Aleksejevs
+ */
+public class XPathActivityXMLTreeElementNode extends XPathActivityXMLTreeNode
+{
+  private Element associatedElement;
+  
+  public XPathActivityXMLTreeElementNode(Element associatedElement) {
+    super(associatedElement, false);
+    this.associatedElement = associatedElement;
+  }
+  
+  public Element getAssociatedElement() {
+    return associatedElement;
+  }
+  
+  public String getTreeNodeDisplayLabel(boolean bIncludeValue, boolean bIncludeNamespace, boolean bUseStyling)
+  {
+    StringBuilder label = new StringBuilder();
+    
+    // add qualified element name
+    label.append(this.associatedElement.getQualifiedName());
+    
+    // add element namespace
+    if (bIncludeNamespace)
+    {
+      Namespace ns = this.associatedElement.getNamespace();
+      
+      label.append((bUseStyling ? "<font color=\"gray\">" : "") +
+          " - xmlns" + (ns.getPrefix().length() > 0 ? (":" + ns.getPrefix()) : "") + "=\"" + 
+          this.associatedElement.getNamespaceURI() +
+          (bUseStyling ? "\"</font>" : ""));
+    }
+    
+    // add element value
+    if (bIncludeValue)
+    {
+      String elementTextValue = this.associatedElement.getTextTrim();
+      
+      if (elementTextValue != null && elementTextValue.length() > 0) {
+        label.append((bUseStyling ? "<font color=\"gray\"> - </font><font color=\"blue\">" : "") +
+                     truncateElementTextValue(stripAllHTML(elementTextValue)) +
+                     (bUseStyling ? "</font>" : ""));
+      }
+    }
+    
+    if (bUseStyling) {
+      label.insert(0, "<html>");
+      label.append("</html>");
+    }
+    
+    return (label.toString());
+  }
+  
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeNode.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeNode.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeNode.java
new file mode 100644
index 0000000..d1e98f7
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeNode.java
@@ -0,0 +1,81 @@
+package net.sf.taverna.t2.activities.xpath.ui.config.xmltree;
+
+import javax.swing.tree.DefaultMutableTreeNode;
+
+import org.dom4j.QName;
+
+
+/**
+ * 
+ * @author Sergejs Aleksejevs
+ */
+public abstract class XPathActivityXMLTreeNode extends DefaultMutableTreeNode
+{
+  protected static final int DISPLAY_LABEL_MAX_LENGTH = 200;
+  
+  private final boolean isAttribute;
+
+  public XPathActivityXMLTreeNode(Object userObject, boolean isAttribute)
+  {
+    super(userObject);
+    this.isAttribute = isAttribute;
+  }
+  
+  public boolean isAttribute() {
+    return (isAttribute);
+  }
+  
+  
+  public QName getNodeQName() {
+    if (this.isAttribute()) {
+      return (((XPathActivityXMLTreeAttributeNode)this).getAssociatedAttribute().getQName());
+    }
+    else {
+      return (((XPathActivityXMLTreeElementNode)this).getAssociatedElement().getQName());
+    }
+  }
+  
+  
+  public String getTreeNodeDisplayLabel(boolean bIncludeValue, boolean bIncludeElementNamespace, boolean bUseStyling)
+  {
+    if (this.isAttribute()) {
+      return (((XPathActivityXMLTreeAttributeNode)this).getTreeNodeDisplayLabel(bIncludeValue, bUseStyling));
+    }
+    else {
+      return (((XPathActivityXMLTreeElementNode)this).getTreeNodeDisplayLabel(bIncludeValue, bIncludeElementNamespace, bUseStyling));
+    }
+  }
+  
+  
+  protected String truncateElementTextValue(String textValue)
+  {
+    if (textValue != null && textValue.length() > DISPLAY_LABEL_MAX_LENGTH) {
+      textValue = textValue.substring(0, DISPLAY_LABEL_MAX_LENGTH) + "(...)";
+    }
+    return (textValue);
+  }
+  
+  
+  /**
+   * Tiny helper to strip out all HTML tags. This will not leave any HTML tags
+   * at all (so that the content can be displayed in DialogTextArea - and the
+   * like - components. This helps to present HTML content inside JAVA easier.
+   */
+  public static String stripAllHTML(String source) {
+        // don't do anything if not string is provided
+        if (source == null)
+          return ("");
+
+        // need to preserve at least all line breaks
+        // (ending and starting paragraph also make a line break)
+        source = source.replaceAll("</p>[\r\n]*<p>", "<br>");
+        source = source.replaceAll("\\<br/?\\>", "\n\n");
+
+        // strip all HTML
+        source = source.replaceAll("\\<.*?\\>", ""); // any HTML tags
+        source = source.replaceAll("&\\w{1,4};", ""); // this is for things like "&nbsp;", "&gt;", etc
+
+        return (source);
+  }
+  
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeSelectionHandler.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeSelectionHandler.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeSelectionHandler.java
new file mode 100644
index 0000000..389bf1a
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeSelectionHandler.java
@@ -0,0 +1,251 @@
+package net.sf.taverna.t2.activities.xpath.ui.config.xmltree;
+
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+
+import javax.swing.JOptionPane;
+import javax.swing.event.TreeSelectionEvent;
+import javax.swing.event.TreeSelectionListener;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreeNode;
+import javax.swing.tree.TreePath;
+
+import net.sf.taverna.t2.activities.xpath.ui.config.XPathActivityConfigurationPanel;
+
+import org.dom4j.DocumentHelper;
+
+
+/**
+ * 
+ * @author Sergejs Aleksejevs
+ */
+public class XPathActivityXMLTreeSelectionHandler implements TreeSelectionListener
+{
+  private final XPathActivityXMLTree theTree;
+  private final XPathActivityConfigurationPanel parentConfigPanel;
+
+
+  public XPathActivityXMLTreeSelectionHandler(XPathActivityConfigurationPanel parentConfigPanel,
+                  XPathActivityXMLTree tree)
+  {
+    this.parentConfigPanel = parentConfigPanel;
+    this.theTree = tree;
+  }
+  
+  
+  public void valueChanged(TreeSelectionEvent e)
+  {
+    // get the newly made selection
+    TreePath newSelectedPath = e.getNewLeadSelectionPath();
+    
+    // NB! Safety check - sometimes the container of the XML tree will remove all selections,
+    //     in such case this listener is not supposed to perform any action -> terminate 
+    if (newSelectedPath == null) return;
+    
+    
+    // --- XPath GENERATION ---
+    
+    // get the XPath expression for the new selection + taking into consideration all previous ones
+    List<String> wildcardedXPath = generateWildcardedXPathExpression(newSelectedPath);
+    
+    // assemble the xpath expression as one string
+    StringBuilder xpath = new StringBuilder();
+    for (String leg : wildcardedXPath) {
+      xpath.append(leg);
+    }
+    theTree.setCurrentXPathExpression(DocumentHelper.createXPath(xpath.toString()));
+    theTree.getCurrentXPathExpression().setNamespaceURIs(theTree.getCurrentXPathNamespaces());
+    
+    
+    // --- UPDATE CONFIG PANEL ---
+    // (with new values for XPath expression and namespace mappings)
+    
+    // inform the parent activity configuration panel to update the XPath expression in the UI
+    /* We do not update the XPath expression after changes in selection in the XML tree - we
+     * now have a button to explicitly do that.
+     * theTree.getParentConfigPanel().updateXPathEditingPanelValues();
+     */
+    
+    // --- SELECTION ---
+    selectAllNodesThatMatchTheCurrentXPath(wildcardedXPath, newSelectedPath);
+  }
+  
+  
+  /**
+   * Selects all nodes that match the <code>wildcardedXPath</code> expression.
+   * 
+   * Keyboard focus is set to remain on the "deepest" (e.g. furthest from root)
+   * element of the <code>lastSelectedPath</code>. 
+   * 
+   * @param wildcardedXPath List of strings, where each string contains one "leg" of the XPath expression
+   *                        (e.g. a string starting with a "/" and containing the name of one node of the tree).
+   * 
+   * @param lastSelectedPath The path that was last selected in the tree (normally,
+   *                         because of this selection {@link XPathActivityXMLTreeSelectionHandler#valueChanged(TreeSelectionEvent)}
+   *                         was executed and this method was started as a part of that.
+   */
+  public void selectAllNodesThatMatchTheCurrentXPath(List<String> wildcardedXPath, TreePath lastSelectedPath)
+  {
+    // first of all - calculate the number of nodes that match this XPath
+    // expression in the XML tree
+    int numberOfMatchingNodes = parentConfigPanel.runXPath(false);
+    
+    
+    // store all tree selection listeners in order to temporarily remove them;
+    // this is necessary as selection modifications will be made here -- don't
+    // want any listeners to respond to these new events
+    theTree.removeAllSelectionListeners();
+    
+    
+    // remove all previous selections - safest way to get the new ones correctly
+    theTree.clearSelection();
+    
+    
+    if (numberOfMatchingNodes <= XPathActivityConfigurationPanel.MAX_NUMBER_OF_MATCHING_NODES_TO_HIGHLIGHT_IN_THE_TREE)
+    {
+      // find all nodes that match the XPath expression
+      List<XPathActivityXMLTreeNode> matchingNodes = new ArrayList<XPathActivityXMLTreeNode>();
+      findAllNodesThatMatchWildcardedXPath(
+          (XPathActivityXMLTreeNode)theTree.getModel().getRoot(),
+          wildcardedXPath.subList(1, wildcardedXPath.size()),
+          matchingNodes);
+      
+      // obtain and select TreePaths for each of the matching nodes
+      for (XPathActivityXMLTreeNode matchingNode : matchingNodes) {
+        TreeNode[] pathAsObjects = ((DefaultTreeModel)theTree.getModel()).getPathToRoot(matchingNode);
+        TreePath path = new TreePath(pathAsObjects);
+        selectTreePathAndAllItsAncestors(path);
+      }
+    }
+    else {
+      JOptionPane.showMessageDialog(parentConfigPanel,
+          "Current XPath expression matches " + numberOfMatchingNodes + " nodes in the XML tree.\n" +
+          "The XPath Activity is unable to highlight all these nodes in the tree due to\n" +
+          "performance reasons.\n\n" +
+          "The XPath Activity will still work correctly - both during the workflow execution\n" +
+          "and if 'Run XPath' button is clicked to run this expression against the example XML.",
+          "XPath Activity", JOptionPane.INFORMATION_MESSAGE);
+    }
+    
+    
+    // make sure the keyboard focus stays on the actual node that was clicked on -
+    // no direct way to do this, so simply de-select and re-select again
+    if (lastSelectedPath != null) {
+      theTree.removeSelectionPath(lastSelectedPath);
+      theTree.addSelectionPath(lastSelectedPath);
+    }
+    
+    // restore all previously stored selection listeners
+    theTree.restoreAllSelectionListeners();
+  }
+  
+  
+  
+  /**
+   * This cannot work for XPath expressions that were modified manually -
+   * only works for the type generated by the click in the XML tree. 
+   * 
+   * @param nodeToStartAt
+   * @param xpathLegs From <code>nodeToStartAt</code>.
+   * @param matchingNodes
+   */
+  private void findAllNodesThatMatchWildcardedXPath(XPathActivityXMLTreeNode nodeToStartAt, 
+                  List<String> xpathLegs, List<XPathActivityXMLTreeNode> matchingNodes)
+  {
+    // some of the input data is missing, just return...
+    if (nodeToStartAt == null || xpathLegs == null || matchingNodes == null) {
+      return;
+    }
+    
+    // no XPath expression to match against the 'nodeToStartAt', therefore
+    // we've "found" the macthing node: 'nodeToStartAt'
+    if (xpathLegs.size() == 0) {
+      matchingNodes.add(nodeToStartAt);
+      return;
+    }
+    
+    // standard case - there is something to match, proceed as normal
+    Enumeration<XPathActivityXMLTreeNode> startNodeChildren = nodeToStartAt.children();
+    while (startNodeChildren.hasMoreElements()) {
+      XPathActivityXMLTreeNode child = startNodeChildren.nextElement();
+      
+      if (xpathLegs.get(0).equals("/*") ||
+          xpathLegs.get(0).equals(this.theTree.getXMLTreeNodeEffectiveQualifiedNameAsXPathLeg(child)))
+      {
+        // this node matches current section of the XPath expression
+        if (xpathLegs.size() == 1) {
+          // no more sections in the XPath leg list to match, so this child
+          // node is the one we were looking for - add to the result
+          matchingNodes.add(child);
+        }
+        else {
+          // ...or process its children recursively
+          findAllNodesThatMatchWildcardedXPath(child, xpathLegs.subList(1, xpathLegs.size()), matchingNodes);
+        }
+      }
+    }
+  }
+
+
+  private List<String> generateWildcardedXPathExpression(TreePath newSelectedPath)
+  {
+    // look through previous selection to find paths of the same length, as the newly selected one
+    List<TreePath> pathsOfSameLength = new ArrayList<TreePath>();
+    TreePath[] previouslySelectedPaths = theTree.getSelectionPaths();
+    for (TreePath path : previouslySelectedPaths) {
+      if (path.getPathCount() == newSelectedPath.getPathCount()) {
+        pathsOfSameLength.add(path);
+      }
+    }
+    
+    // if there were found any paths of the same length, we have a "wildcard" situation
+    List<String> wildcardXPathLegs = theTree.generateXPathFromTreePathAsLegList(newSelectedPath);
+    
+    if (pathsOfSameLength.size() > 0)
+    {
+      // it's okay to use just the first path - TODO: explain that this is because of previous comparisons
+      List<String> firstMatchingLengthPathLegs = theTree.generateXPathFromTreePathAsLegList(pathsOfSameLength.get(0));
+      
+      int pathLength = wildcardXPathLegs.size();
+      
+      // only use wildcards if the last segments of both paths are identical
+      if (wildcardXPathLegs.get(pathLength - 1).equals(firstMatchingLengthPathLegs.get(pathLength - 1)))
+      {
+        // continue all the way to the last segment, but don't touch it
+        for (int i = 0; i < wildcardXPathLegs.size() - 1; i++)
+        {
+          if (!wildcardXPathLegs.get(i).equals(firstMatchingLengthPathLegs.get(i))) {
+            // set wildcard
+            // TODO - make wildcard a constant
+            // TODO - may need to make the wildcard to have a namespace? (e.g. "/default:*" instead of simply "/*")
+            wildcardXPathLegs.set(i, "/*"); // definitely an element, not an attribute (as not the last segment in the path)
+          }
+        }
+      }
+    }
+    
+    return (wildcardXPathLegs);
+  }
+  
+  
+  
+  private void selectTreePathAndAllItsAncestors(TreePath path)
+  {
+    // select all ancestors of that path
+    TreePath pathToSelect = path;
+    for (int i = 0; i < path.getPathCount(); i++)
+    {
+      pathToSelect = pathToSelect.getParentPath();
+      theTree.addSelectionPath(pathToSelect);
+    }
+    
+    // select the specified path itself
+    //
+    // NB! important to do this after the ancestors, so that the supplied
+    // path is the one that retains the keyboard focus after this method terminates
+    theTree.addSelectionPath(path);
+  }
+  
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/ConfigureXPathActivityMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/ConfigureXPathActivityMenuAction.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/ConfigureXPathActivityMenuAction.java
new file mode 100644
index 0000000..6695dc9
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/ConfigureXPathActivityMenuAction.java
@@ -0,0 +1,65 @@
+package net.sf.taverna.t2.activities.xpath.ui.contextualview;
+
+import javax.swing.Action;
+
+import net.sf.taverna.t2.activities.xpath.ui.config.XPathActivityConfigureAction;
+import net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import uk.org.taverna.commons.services.ServiceRegistry;
+
+/**
+ * This action is responsible for enabling the contextual menu entry on processors that perform
+ * XPathActivity'ies.
+ * NB! As a side-effect this also enables the pop-up with for configuration of the processor when it
+ * is added to the workflow from the Service Panel.
+ *
+ * @author Sergejs Aleksejevs
+ * @author David Withers
+ */
+public class ConfigureXPathActivityMenuAction extends AbstractConfigureActivityMenuAction {
+
+	private EditManager editManager;
+	private FileManager fileManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ServiceRegistry serviceRegistry;
+
+	public ConfigureXPathActivityMenuAction() {
+		super(XPathTemplateService.ACTIVITY_TYPE);
+	}
+
+	@Override
+	protected Action createAction() {
+		XPathActivityConfigureAction configAction = new XPathActivityConfigureAction(
+				findActivity(), getParentFrame(), editManager, fileManager, activityIconManager,
+				serviceDescriptionRegistry, serviceRegistry);
+		configAction.putValue(Action.NAME, "Configure XPath service");
+		addMenuDots(configAction);
+		return configAction;
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextViewFactory.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextViewFactory.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextViewFactory.java
new file mode 100644
index 0000000..355ab8d
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextViewFactory.java
@@ -0,0 +1,59 @@
+package net.sf.taverna.t2.activities.xpath.ui.contextualview;
+
+import java.util.Arrays;
+import java.util.List;
+
+import net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+/**
+ * @author Sergejs Aleksejevs
+ */
+public class XPathActivityMainContextViewFactory implements ContextualViewFactory<Activity> {
+
+	private EditManager editManager;
+	private FileManager fileManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ServiceRegistry serviceRegistry;
+
+	public boolean canHandle(Object selection) {
+		return selection instanceof Activity
+				&& ((Activity) selection).getType()
+						.equals(XPathTemplateService.ACTIVITY_TYPE);
+	}
+
+	public List<ContextualView> getViews(Activity selection) {
+		return Arrays.<ContextualView> asList(new XPathActivityMainContextualView(selection,
+				editManager, fileManager, activityIconManager, serviceDescriptionRegistry,
+				serviceRegistry));
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextualView.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextualView.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextualView.java
new file mode 100644
index 0000000..d872228
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextualView.java
@@ -0,0 +1,209 @@
+package net.sf.taverna.t2.activities.xpath.ui.contextualview;
+
+import java.awt.Color;
+import java.awt.Cursor;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.Frame;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+import javax.swing.Action;
+import javax.swing.BorderFactory;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.table.DefaultTableModel;
+
+import net.sf.taverna.t2.activities.xpath.ui.config.XPathActivityConfigureAction;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.activity.Activity;
+import uk.org.taverna.scufl2.api.common.Scufl2Tools;
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+/**
+ *
+ * @author Sergejs Aleksejevs
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class XPathActivityMainContextualView extends ContextualView {
+
+	private final Scufl2Tools scufl2Tools = new Scufl2Tools();
+
+	private XPathActivityMainContextualView thisContextualView;
+
+	private final Activity activity;
+
+	private JPanel jpMainPanel;
+	private JTextField tfXPathExpression;
+
+	private DefaultTableModel xpathNamespaceMappingsTableModel;
+	private JTable jtXPathNamespaceMappings;
+	private JScrollPane spXPathNamespaceMappings;
+	private final EditManager editManager;
+	private final FileManager fileManager;
+	private final ActivityIconManager activityIconManager;
+	private final ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private final ServiceRegistry serviceRegistry;
+
+	public XPathActivityMainContextualView(Activity activity, EditManager editManager,
+			FileManager fileManager, ActivityIconManager activityIconManager,
+			ServiceDescriptionRegistry serviceDescriptionRegistry, ServiceRegistry serviceRegistry) {
+		this.editManager = editManager;
+		this.fileManager = fileManager;
+		this.activityIconManager = activityIconManager;
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+		this.serviceRegistry = serviceRegistry;
+		this.thisContextualView = this;
+		this.activity = activity;
+		initView();
+	}
+
+	@Override
+	public JComponent getMainFrame() {
+		jpMainPanel = new JPanel(new GridBagLayout());
+		jpMainPanel.setBorder(BorderFactory.createCompoundBorder(
+				BorderFactory.createEmptyBorder(4, 2, 4, 2), BorderFactory.createEmptyBorder()));
+
+		GridBagConstraints c = new GridBagConstraints();
+		c.fill = GridBagConstraints.HORIZONTAL;
+		c.anchor = GridBagConstraints.WEST;
+		c.weighty = 0;
+
+		// --- XPath Expression ---
+
+		c.gridx = 0;
+		c.gridy = 0;
+		c.insets = new Insets(5, 5, 5, 5);
+		JLabel jlXPathExpression = new JLabel("XPath Expression:");
+		jlXPathExpression.setFont(jlXPathExpression.getFont().deriveFont(Font.BOLD));
+		jpMainPanel.add(jlXPathExpression, c);
+
+		c.gridx++;
+		c.weightx = 1.0;
+		tfXPathExpression = new JTextField();
+		tfXPathExpression.setEditable(false);
+		jpMainPanel.add(tfXPathExpression, c);
+
+		// --- Label to Show/Hide Mapping Table ---
+
+		final JLabel jlShowHideNamespaceMappings = new JLabel("Show namespace mappings...");
+		jlShowHideNamespaceMappings.setForeground(Color.BLUE);
+		jlShowHideNamespaceMappings.setCursor(new Cursor(Cursor.HAND_CURSOR));
+		jlShowHideNamespaceMappings.addMouseListener(new MouseAdapter() {
+			public void mouseClicked(MouseEvent e) {
+				spXPathNamespaceMappings.setVisible(!spXPathNamespaceMappings.isVisible());
+				jlShowHideNamespaceMappings.setText((spXPathNamespaceMappings.isVisible() ? "Hide"
+						: "Show") + " namespace mappings...");
+				thisContextualView.revalidate();
+			}
+		});
+
+		c.gridx = 0;
+		c.gridy++;
+		c.gridwidth = 2;
+		c.weightx = 1.0;
+		c.weighty = 0;
+		c.fill = GridBagConstraints.HORIZONTAL;
+		jpMainPanel.add(jlShowHideNamespaceMappings, c);
+
+		// --- Namespace Mapping Table ---
+
+		xpathNamespaceMappingsTableModel = new DefaultTableModel() {
+			/**
+			 * No cells should be editable
+			 */
+			public boolean isCellEditable(int rowIndex, int columnIndex) {
+				return (false);
+			}
+		};
+		xpathNamespaceMappingsTableModel.addColumn("Namespace Prefix");
+		xpathNamespaceMappingsTableModel.addColumn("Namespace URI");
+
+		jtXPathNamespaceMappings = new JTable();
+		jtXPathNamespaceMappings.setModel(xpathNamespaceMappingsTableModel);
+		jtXPathNamespaceMappings.setPreferredScrollableViewportSize(new Dimension(200, 90));
+		// TODO - next line is to be enabled when Taverna is migrated to Java
+		// 1.6; for now it's fine to run without this
+		// jtXPathNamespaceMappings.setFillsViewportHeight(true); // makes sure
+		// that when the dedicated area is larger than the table, the latter is
+		// stretched vertically to fill the empty space
+
+		jtXPathNamespaceMappings.getColumnModel().getColumn(0).setPreferredWidth(20); // set
+																						// relative
+																						// sizes of
+																						// columns
+		jtXPathNamespaceMappings.getColumnModel().getColumn(1).setPreferredWidth(300);
+
+		c.gridy++;
+		spXPathNamespaceMappings = new JScrollPane(jtXPathNamespaceMappings);
+		spXPathNamespaceMappings.setVisible(false);
+		jpMainPanel.add(spXPathNamespaceMappings, c);
+
+		// populate the view with values
+		refreshView();
+
+		return jpMainPanel;
+	}
+
+	@Override
+	/**
+	 * This is the title of the contextual view - shown in the list of other available
+	 * views (even when this contextual view is collapsed).
+	 */
+	public String getViewTitle() {
+		return "XPath Service Details";
+	}
+
+	/**
+	 * Typically called when the activity configuration has changed.
+	 */
+	@Override
+	public void refreshView() {
+		Configuration configuration = scufl2Tools.configurationFor(activity, activity.getParent());
+		JsonNode json = configuration.getJson();
+
+		// Set XPath Expression
+		tfXPathExpression.setText(json.get("xpathExpression").asText());
+
+		// Populate Namespace Mappings
+		xpathNamespaceMappingsTableModel.getDataVector().removeAllElements();
+		if (json.has("xpathNamespaceMap")) {
+			for (JsonNode mapping : json.get("xpathNamespaceMap")) {
+				xpathNamespaceMappingsTableModel.addRow(new Object[] {
+						mapping.get("prefix").asText(), mapping.get("uri").asText() });
+			}
+		}
+	}
+
+	/**
+	 * View position hint
+	 */
+	@Override
+	public int getPreferredPosition() {
+		// want to be on top, as it's the main contextual view for this activity
+		return 100;
+	}
+
+	@Override
+	public Action getConfigureAction(final Frame owner) {
+		// "Configure" button appears because of this action being returned
+		return new XPathActivityConfigureAction(activity, owner, editManager, fileManager,
+				activityIconManager, serviceDescriptionRegistry, serviceRegistry);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateAction.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateAction.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateAction.java
new file mode 100644
index 0000000..a80696d
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateAction.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.xpath.ui.menu;
+
+import java.awt.event.ActionEvent;
+import java.net.URI;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+
+import net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathTemplateService;
+import net.sf.taverna.t2.ui.menu.AbstractContextualMenuAction;
+import net.sf.taverna.t2.ui.menu.MenuManager;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.core.Workflow;
+
+/**
+ * An action to add a REST activity + a wrapping processor to the workflow.
+ *
+ * @author Alex Nenadic
+ */
+@SuppressWarnings("serial")
+public class AddXPathTemplateAction extends AbstractContextualMenuAction {
+
+	private static final String ADD_XPATH = "XPath";
+
+	private static final URI insertSection = URI
+			.create("http://taverna.sf.net/2009/contextMenu/insert");
+
+	private EditManager editManager;
+
+	private MenuManager menuManager;
+
+	private SelectionManager selectionManager;
+
+	private ActivityIconManager activityIconManager;
+
+	private ServiceRegistry serviceRegistry;
+
+	public AddXPathTemplateAction() {
+		super(insertSection, 1000);
+	}
+
+	@Override
+	public boolean isEnabled() {
+		return super.isEnabled() && getContextualSelection().getSelection() instanceof Workflow;
+	}
+
+	@Override
+	protected Action createAction() {
+
+		return new AddXPathAction();
+	}
+
+	protected class AddXPathAction extends AbstractAction {
+		AddXPathAction() {
+			super(ADD_XPATH, activityIconManager
+					.iconForActivity(XPathTemplateService.ACTIVITY_TYPE));
+		}
+
+		public void actionPerformed(ActionEvent e) {
+
+			WorkflowView.importServiceDescription(XPathTemplateService.getServiceDescription(),
+					false, editManager, menuManager, selectionManager, serviceRegistry);
+		}
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setMenuManager(MenuManager menuManager) {
+		this.menuManager = menuManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateMenuAction.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateMenuAction.java
new file mode 100644
index 0000000..9132110
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateMenuAction.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.xpath.ui.menu;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.net.URI;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.KeyStroke;
+
+import net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathTemplateService;
+import net.sf.taverna.t2.ui.menu.AbstractMenuAction;
+import net.sf.taverna.t2.ui.menu.DesignOnlyAction;
+import net.sf.taverna.t2.ui.menu.MenuManager;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
+import uk.org.taverna.commons.services.ServiceRegistry;
+
+/**
+ * An action to add a REST activity + a wrapping processor to the workflow.
+ *
+ * @author Alex Nenadic
+ * @author alanrw
+ */
+@SuppressWarnings("serial")
+public class AddXPathTemplateMenuAction extends AbstractMenuAction {
+
+	private static final String ADD_XPATH = "XPath";
+
+	private static final URI INSERT = URI
+			.create("http://taverna.sf.net/2008/t2workbench/menu#insert");
+
+	private static final URI ADD_XPATH_URI = URI
+			.create("http://taverna.sf.net/2008/t2workbench/menu#graphMenuAddXPath");
+
+	private EditManager editManager;
+
+	private MenuManager menuManager;
+
+	private SelectionManager selectionManager;
+
+	private ActivityIconManager activityIconManager;
+
+	private ServiceRegistry serviceRegistry;
+
+	public AddXPathTemplateMenuAction() {
+		super(INSERT, 1000, ADD_XPATH_URI);
+	}
+
+	@Override
+	protected Action createAction() {
+		return new AddXPathMenuAction();
+	}
+
+	protected class AddXPathMenuAction extends AbstractAction implements DesignOnlyAction {
+		AddXPathMenuAction() {
+			super();
+			putValue(SMALL_ICON,
+					activityIconManager.iconForActivity(XPathTemplateService.ACTIVITY_TYPE));
+			putValue(NAME, ADD_XPATH);
+			putValue(SHORT_DESCRIPTION, "XPath service");
+			putValue(
+					Action.ACCELERATOR_KEY,
+					KeyStroke.getKeyStroke(KeyEvent.VK_P, InputEvent.SHIFT_DOWN_MASK
+							| InputEvent.ALT_DOWN_MASK));
+		}
+
+		public void actionPerformed(ActionEvent e) {
+			WorkflowView.importServiceDescription(XPathTemplateService.getServiceDescription(),
+					false, editManager, menuManager, selectionManager, serviceRegistry);
+		}
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setMenuManager(MenuManager menuManager) {
+		this.menuManager = menuManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathActivityIcon.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathActivityIcon.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathActivityIcon.java
new file mode 100644
index 0000000..2251efb
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathActivityIcon.java
@@ -0,0 +1,86 @@
+package net.sf.taverna.t2.activities.xpath.ui.servicedescription;
+
+import java.awt.Color;
+import java.net.URI;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+
+/**
+ * @author Sergejs Aleksejevs
+ */
+public class XPathActivityIcon implements ActivityIconSPI {
+	private static final Color PROCESSOR_COLOUR = Color.decode("#E6FF5E");
+
+	// --- LOCATIONS OF ICONS USED IN THE XPath ACTIVITY ---
+
+	private static final String FAMFAMFAM_SILK_PATH = "famfamfam_silk/";
+	private static final String FOLDS_PATH = "folds/";
+
+	public static final String XPATH_ACTIVITY_ICON = FAMFAMFAM_SILK_PATH + "page_white_code.png";
+	public static final String XPATH_ACTIVITY_CONFIGURATION_PARSE_XML_ICON = "arrow_right.png";
+
+	public static final String XML_TREE_ROOT_ICON = FAMFAMFAM_SILK_PATH + "page_white_code.png";
+	public static final String XML_TREE_NODE_ICON = FAMFAMFAM_SILK_PATH + "tag.png";
+	public static final String XML_TREE_ATTRIBUTE_ICON = "xpath_attribute.png";
+
+	public static final String XML_TREE_EXPAND_ALL_ICON = FAMFAMFAM_SILK_PATH
+			+ "text_linespacing.png";
+	public static final String XML_TREE_COLLAPSE_ALL_ICON = FAMFAMFAM_SILK_PATH
+			+ "text_linespacing (collapse).png";
+
+	public static final String XPATH_STATUS_OK_ICON = FAMFAMFAM_SILK_PATH + "accept.png";
+	public static final String XPATH_STATUS_ERROR_ICON = FAMFAMFAM_SILK_PATH + "exclamation.png";
+	public static final String XPATH_STATUS_UNKNOWN_ICON = FAMFAMFAM_SILK_PATH + "help.png";
+
+	public static final String FOLD_ICON = FOLDS_PATH + "fold.png";
+	public static final String UNFOLD_ICON = FOLDS_PATH + "unfold.png";
+
+	// ------
+
+	private static ImageIcon icon;
+
+	public int canProvideIconScore(URI activityType) {
+		if (XPathTemplateService.ACTIVITY_TYPE.equals(activityType))
+			return DEFAULT_ICON + 1;
+		else
+			return NO_ICON;
+	}
+
+	public Icon getIcon(URI activityType) {
+		return getXPathActivityIcon();
+	}
+
+	public static Icon getXPathActivityIcon() {
+		if (icon == null) {
+			synchronized (XPathActivityIcon.class) {
+				if (icon == null) {
+					try {
+						icon = new ImageIcon(
+								XPathActivityIcon.class.getResource(XPATH_ACTIVITY_ICON));
+					} catch (NullPointerException e) {
+						/* icon wasn't found - do nothing, but no icon will be available */
+					}
+				}
+			}
+		}
+		return (icon);
+	}
+
+	public static Icon getIconById(String iconID) {
+		try {
+			return (new ImageIcon(XPathActivityIcon.class.getResource(iconID)));
+		} catch (NullPointerException e) {
+			// requested icon wasn't found - just return null
+			return (null);
+		}
+	}
+
+	public void setColourManager(ColourManager colourManager) {
+		colourManager.setPreferredColour(XPathTemplateService.ACTIVITY_TYPE.toString(), PROCESSOR_COLOUR);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathTemplateService.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathTemplateService.java b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathTemplateService.java
new file mode 100644
index 0000000..d55235d
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathTemplateService.java
@@ -0,0 +1,57 @@
+package net.sf.taverna.t2.activities.xpath.ui.servicedescription;
+
+import java.net.URI;
+
+import javax.swing.Icon;
+
+import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+/**
+ * @author Sergejs Aleksejevs
+ * @author David Withers
+ */
+public class XPathTemplateService extends AbstractTemplateService {
+
+	public static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/xpath");
+
+	@Override
+	public URI getActivityType() {
+		return ACTIVITY_TYPE;
+	}
+
+	@Override
+	public Configuration getActivityConfiguration() {
+		Configuration configuration = new Configuration();
+		configuration.setType(ACTIVITY_TYPE.resolve("#Config"));
+		ObjectNode json = (ObjectNode) configuration.getJson();
+		json.put("xpathExpression", "/");
+		return configuration;
+	}
+
+	@Override
+	public Icon getIcon() {
+		return XPathActivityIcon.getXPathActivityIcon();
+	}
+
+	public String getName() {
+		return "XPath";
+	}
+
+	public String getDescription() {
+		return "Service for point-and-click creation of XPath expressions for XML data";
+	}
+
+	public static ServiceDescription getServiceDescription() {
+		XPathTemplateService gts = new XPathTemplateService();
+		return gts.templateService;
+	}
+
+	public String getId() {
+		return "http://www.taverna.org.uk/2010/services/xpath";
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
new file mode 100644
index 0000000..be7da5f
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathTemplateService
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
new file mode 100644
index 0000000..7700abb
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
@@ -0,0 +1,3 @@
+net.sf.taverna.t2.activities.xpath.ui.contextualview.ConfigureXPathActivityMenuAction
+net.sf.taverna.t2.activities.xpath.ui.menu.AddXPathTemplateAction
+net.sf.taverna.t2.activities.xpath.ui.menu.AddXPathTemplateMenuAction
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
new file mode 100644
index 0000000..b759c2e
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathActivityIcon
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
new file mode 100644
index 0000000..e248981
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
@@ -0,0 +1 @@
+ net.sf.taverna.t2.activities.xpath.ui.contextualview.XPathActivityMainContextViewFactory

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/META-INF/spring/xpath-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/META-INF/spring/xpath-activity-ui-context-osgi.xml b/taverna-xpath-activity-ui/src/main/resources/META-INF/spring/xpath-activity-ui-context-osgi.xml
new file mode 100644
index 0000000..1e53ea6
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/resources/META-INF/spring/xpath-activity-ui-context-osgi.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:beans="http://www.springframework.org/schema/beans"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd
+                      http://www.springframework.org/schema/osgi
+                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+	<service ref="XPathActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
+
+	<service ref="XPathTemplateService" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
+
+	<service ref="ConfigureXPathActivityMenuAction" auto-export="interfaces" />
+	<service ref="AddXPathTemplateAction" auto-export="interfaces" />
+	<service ref="AddXPathTemplateMenuAction" auto-export="interfaces" />
+
+	<service ref="XPathActivityMainContextViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
+
+	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
+	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
+	<reference id="menuManager" interface="net.sf.taverna.t2.ui.menu.MenuManager" />
+	<reference id="selectionManager" interface="net.sf.taverna.t2.workbench.selection.SelectionManager" />
+	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
+	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
+	<reference id="serviceDescriptionRegistry" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry" />
+	<reference id="serviceRegistry" interface="uk.org.taverna.commons.services.ServiceRegistry" />
+
+</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/META-INF/spring/xpath-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/META-INF/spring/xpath-activity-ui-context.xml b/taverna-xpath-activity-ui/src/main/resources/META-INF/spring/xpath-activity-ui-context.xml
new file mode 100644
index 0000000..0116b2e
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/main/resources/META-INF/spring/xpath-activity-ui-context.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+	<bean id="XPathActivityIcon"
+		class="net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathActivityIcon">
+		<property name="colourManager" ref="colourManager" />
+	</bean>
+
+	<bean id="XPathTemplateService"
+		class="net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathTemplateService" />
+
+	<bean id="ConfigureXPathActivityMenuAction"
+		class="net.sf.taverna.t2.activities.xpath.ui.contextualview.ConfigureXPathActivityMenuAction">
+		<property name="editManager" ref="editManager" />
+		<property name="fileManager" ref="fileManager" />
+		<property name="activityIconManager" ref="activityIconManager" />
+		<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+		<property name="serviceRegistry" ref="serviceRegistry" />
+	</bean>
+	<bean id="AddXPathTemplateAction"
+		class="net.sf.taverna.t2.activities.xpath.ui.menu.AddXPathTemplateAction">
+		<property name="editManager" ref="editManager" />
+		<property name="menuManager" ref="menuManager" />
+		<property name="selectionManager" ref="selectionManager" />
+		<property name="activityIconManager" ref="activityIconManager" />
+		<property name="serviceRegistry" ref="serviceRegistry" />
+	</bean>
+	<bean id="AddXPathTemplateMenuAction"
+		class="net.sf.taverna.t2.activities.xpath.ui.menu.AddXPathTemplateMenuAction">
+		<property name="editManager" ref="editManager" />
+		<property name="menuManager" ref="menuManager" />
+		<property name="selectionManager" ref="selectionManager" />
+		<property name="activityIconManager" ref="activityIconManager" />
+		<property name="serviceRegistry" ref="serviceRegistry" />
+	</bean>
+
+	<bean id="XPathActivityMainContextViewFactory"
+		class="net.sf.taverna.t2.activities.xpath.ui.contextualview.XPathActivityMainContextViewFactory">
+		<property name="editManager" ref="editManager" />
+		<property name="fileManager" ref="fileManager" />
+		<property name="activityIconManager" ref="activityIconManager" />
+		<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+		<property name="serviceRegistry" ref="serviceRegistry" />
+	</bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/arrow_right.png
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/arrow_right.png b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/arrow_right.png
new file mode 100644
index 0000000..2cf15f1
Binary files /dev/null and b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/arrow_right.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/accept.png
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/accept.png b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/accept.png
new file mode 100644
index 0000000..89c8129
Binary files /dev/null and b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/accept.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/exclamation.png
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/exclamation.png b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/exclamation.png
new file mode 100644
index 0000000..c37bd06
Binary files /dev/null and b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/exclamation.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/help.png
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/help.png b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/help.png
new file mode 100644
index 0000000..5c87017
Binary files /dev/null and b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/help.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/page_white_code.png
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/page_white_code.png b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/page_white_code.png
new file mode 100644
index 0000000..0c76bd1
Binary files /dev/null and b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/page_white_code.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/tag.png
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/tag.png b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/tag.png
new file mode 100644
index 0000000..e093032
Binary files /dev/null and b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/tag.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing (collapse).png
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing (collapse).png b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing (collapse).png
new file mode 100644
index 0000000..ff09e31
Binary files /dev/null and b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing (collapse).png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing.png
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing.png b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing.png
new file mode 100644
index 0000000..1a91cbd
Binary files /dev/null and b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/fold.png
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/fold.png b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/fold.png
new file mode 100644
index 0000000..a13d280
Binary files /dev/null and b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/fold.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/unfold.png
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/unfold.png b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/unfold.png
new file mode 100644
index 0000000..589e2c9
Binary files /dev/null and b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/unfold.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/xpath_attribute.png
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/xpath_attribute.png b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/xpath_attribute.png
new file mode 100644
index 0000000..3fa7811
Binary files /dev/null and b/taverna-xpath-activity-ui/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/xpath_attribute.png differ


[21/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-localworker-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64 b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64
deleted file mode 100644
index 62c01bd..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64
+++ /dev/null
@@ -1,31 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import org.apache.commons.codec.binary.Base64;
-
-bytes = Base64.decodeBase64(base64.getBytes());
-</script>
-  <dependencies class="java.util.Collections$SingletonList">
-    <element class="string">commons-codec:commons-codec:1.3</element>
-  </dependencies>
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>base64</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>bytes</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'application/octet-stream'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64.json
deleted file mode 100644
index 1cb0f62..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import org.apache.commons.codec.binary.Base64;\n\nbytes = Base64.decodeBase64(base64.getBytes());\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.DecodeBase64",
-  "inputPorts" : [ {
-    "name" : "base64",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "bytes",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList
deleted file mode 100644
index 615c762..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList
+++ /dev/null
@@ -1,26 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>outputlist = inputlist;</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>[B</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>inputlist</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>outputlist</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList.json
deleted file mode 100644
index aa0d198..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "outputlist = inputlist;",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.EchoList",
-  "inputPorts" : [ {
-    "name" : "inputlist",
-    "depth" : 1,
-    "type" : "byte[]"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputlist",
-    "depth" : 1,
-    "granularDepth" : 1
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings
deleted file mode 100644
index 6045d0a..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings
+++ /dev/null
@@ -1,19 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>List strings = new ArrayList();
-for (int i = 0; i &lt; 40; i++) {
-	strings.add("String" + i);
-}
-</script>
-  <dependencies />
-  <inputs />
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>strings</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings.json
deleted file mode 100644
index 4afc1f8..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "List strings = new ArrayList();\nfor (int i = 0; i < 40; i++) {\n\tstrings.add(\"String\" + i);\n}\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings",
-  "outputPorts" : [ {
-    "name" : "strings",
-    "depth" : 1,
-    "granularDepth" : 1
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64 b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64
deleted file mode 100644
index 8f6bcd0..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64
+++ /dev/null
@@ -1,30 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import org.apache.commons.codec.binary.Base64;
-
-base64 = new String(Base64.encodeBase64(bytes));</script>
-  <dependencies class="java.util.Collections$SingletonList">
-    <element class="string">commons-codec:commons-codec:1.3</element>
-  </dependencies>
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>[B</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>bytes</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'application/octet-stream'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>base64</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64.json
deleted file mode 100644
index 5cbd786..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import org.apache.commons.codec.binary.Base64;\n\nbase64 = new String(Base64.encodeBase64(bytes));",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.EncodeBase64",
-  "inputPorts" : [ {
-    "name" : "bytes",
-    "depth" : 0,
-    "type" : "byte[]"
-  } ],
-  "outputPorts" : [ {
-    "name" : "base64",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks
deleted file mode 100644
index 05946b1..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks
+++ /dev/null
@@ -1,41 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>String lowerCaseContent = document.toLowerCase();
-int index = 0;
-List imagelinks = new ArrayList();
-while ((index = lowerCaseContent.indexOf("&lt;img", index)) != -1) {
-	if ((index = lowerCaseContent.indexOf("src", index)) == -1)
-		break;
-	if ((index = lowerCaseContent.indexOf("=", index)) == -1)
-		break;
-	index++;
-	String remaining = document.substring(index);
-	StringTokenizer st = new StringTokenizer(remaining, "\t\n\r\"&gt;#");
-	String strLink = st.nextToken();
-	imagelinks.add(strLink);
-}
-
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>document</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/html'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>imagelinks</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/x-taverna-web-url')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks.json
deleted file mode 100644
index 2a23a47..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "String lowerCaseContent = document.toLowerCase();\nint index = 0;\nList imagelinks = new ArrayList();\nwhile ((index = lowerCaseContent.indexOf(\"<img\", index)) != -1) {\n\tif ((index = lowerCaseContent.indexOf(\"src\", index)) == -1)\n\t\tbreak;\n\tif ((index = lowerCaseContent.indexOf(\"=\", index)) == -1)\n\t\tbreak;\n\tindex++;\n\tString remaining = document.substring(index);\n\tStringTokenizer st = new StringTokenizer(remaining, \"\\t\\n\\r\\\">#\");\n\tString strLink = st.nextToken();\n\timagelinks.add(strLink);\n}\n\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks",
-  "inputPorts" : [ {
-    "name" : "document",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "imagelinks",
-    "depth" : 1,
-    "granularDepth" : 1
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList
deleted file mode 100644
index 7b107e6..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList
+++ /dev/null
@@ -1,43 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>filteredlist = new ArrayList();
-for (Iterator i = stringlist.iterator(); i.hasNext();) {
-	String item = (String) i.next();
-	if (item.matches(regex)) {
-		filteredlist.add(item);
-	}
-}
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>stringlist</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>regex</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>filteredlist</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList.json
deleted file mode 100644
index 0f26e3e..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "filteredlist = new ArrayList();\nfor (Iterator i = stringlist.iterator(); i.hasNext();) {\n\tString item = (String) i.next();\n\tif (item.matches(regex)) {\n\t\tfilteredlist.add(item);\n\t}\n}\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.FilterStringList",
-  "inputPorts" : [ {
-    "name" : "stringlist",
-    "depth" : 1,
-    "type" : "String"
-  }, {
-    "name" : "regex",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "filteredlist",
-    "depth" : 1,
-    "granularDepth" : 1
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList
deleted file mode 100644
index 558cc99..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList
+++ /dev/null
@@ -1,39 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>flatten(inputs, outputs, depth) {
-	for (i = inputs.iterator(); i.hasNext();) {
-	    element = i.next();
-		if (element instanceof Collection &amp;&amp; depth &gt; 0) {
-			flatten(element, outputs, depth - 1);
-		} else {
-			outputs.add(element);
-		}
-	}
-}
-
-outputlist = new ArrayList();
-
-flatten(inputlist, outputlist, 1);</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>[B</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>inputlist</name>
-      <depth>2</depth>
-      <mimeTypes>
-        <string>l(l(''))</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>outputlist</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList.json
deleted file mode 100644
index 4992e0b..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "flatten(inputs, outputs, depth) {\n\tfor (i = inputs.iterator(); i.hasNext();) {\n\t    element = i.next();\n\t\tif (element instanceof Collection && depth > 0) {\n\t\t\tflatten(element, outputs, depth - 1);\n\t\t} else {\n\t\t\toutputs.add(element);\n\t\t}\n\t}\n}\n\noutputlist = new ArrayList();\n\nflatten(inputlist, outputlist, 1);",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.FlattenList",
-  "inputPorts" : [ {
-    "name" : "inputlist",
-    "depth" : 2,
-    "type" : "byte[]"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputlist",
-    "depth" : 1,
-    "granularDepth" : 1
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber
deleted file mode 100644
index 3edd0cf..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber
+++ /dev/null
@@ -1,44 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>int targetLengthInt = 7;
-if (targetlength != void) {
-	targetLengthInt = Integer.parseInt(targetlength);
-}
-int currentLength = input.length();
-while (input.length() &lt; targetLengthInt) {
-	input = "0" + input;
-}
-padded = input;</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>input</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>targetlength</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>padded</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber.json
deleted file mode 100644
index 37828ea..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "int targetLengthInt = 7;\nif (targetlength != void) {\n\ttargetLengthInt = Integer.parseInt(targetlength);\n}\nint currentLength = input.length();\nwhile (input.length() < targetLengthInt) {\n\tinput = \"0\" + input;\n}\npadded = input;",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.PadNumber",
-  "inputPorts" : [ {
-    "name" : "input",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "targetlength",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "padded",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList
deleted file mode 100644
index 7a4165a..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList
+++ /dev/null
@@ -1,60 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import java.util.regex.*;
-
-filteredlist = new ArrayList();
-Pattern thePat = Pattern.compile(regex);
-int theGroup = Integer.parseInt(group);
-
-for (Iterator i = stringlist.iterator(); i.hasNext();) {
-	String item = (String) i.next();
-	Matcher matcher = thePat.matcher(item);
-
-	if (matcher.find()) {
-		filteredlist.add(matcher.group(theGroup));
-	}
-}
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>stringlist</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>regex</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>group</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>filteredlist</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList.json
deleted file mode 100644
index 86378fb..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import java.util.regex.*;\n\nfilteredlist = new ArrayList();\nPattern thePat = Pattern.compile(regex);\nint theGroup = Integer.parseInt(group);\n\nfor (Iterator i = stringlist.iterator(); i.hasNext();) {\n\tString item = (String) i.next();\n\tMatcher matcher = thePat.matcher(item);\n\n\tif (matcher.find()) {\n\t\tfilteredlist.add(matcher.group(theGroup));\n\t}\n}\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList",
-  "inputPorts" : [ {
-    "name" : "stringlist",
-    "depth" : 1,
-    "type" : "String"
-  }, {
-    "name" : "regex",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "group",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "filteredlist",
-    "depth" : 1,
-    "granularDepth" : 1
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail
deleted file mode 100644
index f847773..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail
+++ /dev/null
@@ -1,85 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import javax.mail.Message;
-import javax.mail.Session;
-import javax.mail.Transport;
-import javax.mail.internet.MimeMessage;
-import javax.mail.internet.InternetAddress;
-
-if (subject == void) {
-	subject = "No subject";
-}
-if (body == void) {
-	throw new Exception("No body specified for message");
-}
-
-Properties mailProps = System.getProperties();
-if (smtpserver != void) {
-	mailProps.put("mail.smtp.host", smtpserver);
-}
-
-Session session = Session.getDefaultInstance(mailProps, null);
-MimeMessage message = new MimeMessage(session);
-message.setFrom(new InternetAddress(from));
-message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
-message.setSubject(subject);
-message.setText(body);
-Transport.send(message);
-</script>
-  <dependencies>
-    <string>javax.mail:mail:1.4</string>
-    <string>javax.activation:activation:1.1</string>
-  </dependencies>
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>to</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>from</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>subject</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>body</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>smtpserver</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs />
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail.json
deleted file mode 100644
index 9a7365d..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import javax.mail.Message;\nimport javax.mail.Session;\nimport javax.mail.Transport;\nimport javax.mail.internet.MimeMessage;\nimport javax.mail.internet.InternetAddress;\n\nif (subject == void) {\n\tsubject = \"No subject\";\n}\nif (body == void) {\n\tthrow new Exception(\"No body specified for message\");\n}\n\nProperties mailProps = System.getProperties();\nif (smtpserver != void) {\n\tmailProps.put(\"mail.smtp.host\", smtpserver);\n}\n\nSession session = Session.getDefaultInstance(mailProps, null);\nMimeMessage message = new MimeMessage(session);\nmessage.setFrom(new InternetAddress(from));\nmessage.addRecipient(Message.RecipientType.TO, new InternetAddress(to));\nmessage.setSubject(subject);\nmessage.setText(body);\nTransport.send(message);\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.SendEmail",
-  "inputPorts" : [ {
-    "name" : "to",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "from",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "subject",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "body",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "smtpserver",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex
deleted file mode 100644
index 7c296f3..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex
+++ /dev/null
@@ -1,47 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>List split = new ArrayList();
-if (!string.equals("")) {
-	String regexString = ",";
-	if (regex != void) {
-		regexString = regex;
-	}
-	String[] result = string.split(regexString);
-	for (int i = 0; i &lt; result.length; i++) {
-		split.add(result[i]);
-	}
-}
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>string</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>regex</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>split</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex.json
deleted file mode 100644
index afbdc78..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "List split = new ArrayList();\nif (!string.equals(\"\")) {\n\tString regexString = \",\";\n\tif (regex != void) {\n\t\tregexString = regex;\n\t}\n\tString[] result = string.split(regexString);\n\tfor (int i = 0; i < result.length; i++) {\n\t\tsplit.add(result[i]);\n\t}\n}\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.SplitByRegex",
-  "inputPorts" : [ {
-    "name" : "string",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "regex",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "split",
-    "depth" : 1,
-    "granularDepth" : 1
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat
deleted file mode 100644
index 7993975..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat
+++ /dev/null
@@ -1,36 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>output = string1 + string2;</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>string1</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>string2</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>output</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat.json
deleted file mode 100644
index 24a3fa9..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "output = string1 + string2;",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.StringConcat",
-  "inputPorts" : [ {
-    "name" : "string1",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "string2",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "output",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge
deleted file mode 100644
index cdd408d..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge
+++ /dev/null
@@ -1,49 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>String seperatorString = "\n";
-if (seperator != void) {
-	seperatorString = seperator;
-}
-StringBuffer sb = new StringBuffer();
-for (Iterator i = stringlist.iterator(); i.hasNext();) {
-	String item = (String) i.next();
-	sb.append(item);
-	if (i.hasNext()) {
-		sb.append(seperatorString);
-	}
-}
-concatenated = sb.toString();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>stringlist</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>seperator</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>concatenated</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge.json
deleted file mode 100644
index a0b860f..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "String seperatorString = \"\\n\";\nif (seperator != void) {\n\tseperatorString = seperator;\n}\nStringBuffer sb = new StringBuffer();\nfor (Iterator i = stringlist.iterator(); i.hasNext();) {\n\tString item = (String) i.next();\n\tsb.append(item);\n\tif (i.hasNext()) {\n\t\tsb.append(seperatorString);\n\t}\n}\nconcatenated = sb.toString();\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.StringListMerge",
-  "inputPorts" : [ {
-    "name" : "stringlist",
-    "depth" : 1,
-    "type" : "String"
-  }, {
-    "name" : "seperator",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "concatenated",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference
deleted file mode 100644
index c7bb289..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference
+++ /dev/null
@@ -1,49 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>List difference = new ArrayList();
-for (Iterator i = list1.iterator(); i.hasNext();) {
-	Object o = i.next();
-	if (!list2.contains(o)) {
-		difference.add(o);
-	}
-}
-for (Iterator i = list2.iterator(); i.hasNext();) {
-	Object o = i.next();
-	if (!list1.contains(o)) {
-		difference.add(o);
-	}
-}
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>list1</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>list2</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>difference</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference.json
deleted file mode 100644
index c844322..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "List difference = new ArrayList();\nfor (Iterator i = list1.iterator(); i.hasNext();) {\n\tObject o = i.next();\n\tif (!list2.contains(o)) {\n\t\tdifference.add(o);\n\t}\n}\nfor (Iterator i = list2.iterator(); i.hasNext();) {\n\tObject o = i.next();\n\tif (!list1.contains(o)) {\n\t\tdifference.add(o);\n\t}\n}\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.StringSetDifference",
-  "inputPorts" : [ {
-    "name" : "list1",
-    "depth" : 1,
-    "type" : "String"
-  }, {
-    "name" : "list2",
-    "depth" : 1,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "difference",
-    "depth" : 1,
-    "granularDepth" : 1
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection
deleted file mode 100644
index a4c2f5a..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection
+++ /dev/null
@@ -1,43 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>List intersection = new ArrayList();
-for (Iterator i = list1.iterator(); i.hasNext();) {
-	Object o = i.next();
-	if (list2.contains(o)) {
-		intersection.add(o);
-	}
-}
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>list1</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>list2</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>intersection</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection.json
deleted file mode 100644
index 0404922..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "List intersection = new ArrayList();\nfor (Iterator i = list1.iterator(); i.hasNext();) {\n\tObject o = i.next();\n\tif (list2.contains(o)) {\n\t\tintersection.add(o);\n\t}\n}\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.StringSetIntersection",
-  "inputPorts" : [ {
-    "name" : "list1",
-    "depth" : 1,
-    "type" : "String"
-  }, {
-    "name" : "list2",
-    "depth" : 1,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "intersection",
-    "depth" : 1,
-    "granularDepth" : 1
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion
deleted file mode 100644
index 1ef0958..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion
+++ /dev/null
@@ -1,43 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow">
-
-<class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>Set results = new HashSet();
-results.addAll(list1);
-results.addAll(list2);
-List union = new ArrayList();
-union.addAll(results);
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>list1</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>list2</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>union</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion.json
deleted file mode 100644
index 25960be..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "Set results = new HashSet();\nresults.addAll(list1);\nresults.addAll(list2);\nList union = new ArrayList();\nunion.addAll(results);\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.StringSetUnion",
-  "inputPorts" : [ {
-    "name" : "list1",
-    "depth" : 1,
-    "type" : "String"
-  }, {
-    "name" : "list2",
-    "depth" : 1,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "union",
-    "depth" : 1,
-    "granularDepth" : 1
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates
deleted file mode 100644
index 310dccc..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates
+++ /dev/null
@@ -1,33 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>List strippedlist = new ArrayList();
-for (Iterator i = stringlist.iterator(); i.hasNext();) {
-	String item = (String) i.next();
-	if (strippedlist.contains(item) == false) {
-		strippedlist.add(item);
-	}
-}
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>stringlist</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>strippedlist</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates.json
deleted file mode 100644
index c5fecee..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "List strippedlist = new ArrayList();\nfor (Iterator i = stringlist.iterator(); i.hasNext();) {\n\tString item = (String) i.next();\n\tif (strippedlist.contains(item) == false) {\n\t\tstrippedlist.add(item);\n\t}\n}\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates",
-  "inputPorts" : [ {
-    "name" : "stringlist",
-    "depth" : 1,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "strippedlist",
-    "depth" : 1,
-    "granularDepth" : 1
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor
deleted file mode 100644
index 790073a..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor
+++ /dev/null
@@ -1,36 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>throw new Exception("This script fails");</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>foo</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>bar</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>urgle</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor.json
deleted file mode 100644
index 4a5b7d8..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "throw new Exception(\"This script fails\");",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor",
-  "inputPorts" : [ {
-    "name" : "foo",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "bar",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "urgle",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails
deleted file mode 100644
index 90e8ba8..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails
+++ /dev/null
@@ -1,34 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import java.util.Random;
-
-Random r = new Random();
-
-if ((r.nextInt() % 4) == 0) {
-	throw new RuntimeException("Fails every four runs!");
-}
-
-out = in;</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>in</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>out</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails.json
deleted file mode 100644
index 9ecf11d..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import java.util.Random;\n\nRandom r = new Random();\n\nif ((r.nextInt() % 4) == 0) {\n\tthrow new RuntimeException(\"Fails every four runs!\");\n}\n\nout = in;",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.TestSometimesFails",
-  "inputPorts" : [ {
-    "name" : "in",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "out",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher
deleted file mode 100644
index db3a73a..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher
+++ /dev/null
@@ -1,64 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>if ((url == void) || (url == null)) {
-	throw new RuntimeException("The url must be specified");
-}
-
-URL inputURL = null;
-if (base != void) {
-	inputURL = new URL(new URL(base), url);
-} else {
-	inputURL = new URL(url);
-}
-
-int bytesRead = 0;
-int totalBytesRead = 0;
-InputStream is = inputURL.openStream();
-ByteArrayOutputStream os = new ByteArrayOutputStream();
-byte[] buffer = new byte[2048];
-while (true) {
-	bytesRead = is.read(buffer);
-	if (bytesRead == -1) {
-		break;	
-	}
-
-	os.write(buffer, 0, bytesRead);
-}
-
-image = os.toByteArray();
-is.close();
-os.close();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>url</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/x-taverna-web-url'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>base</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/x-taverna-web-url'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>image</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'image/*'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher.json
deleted file mode 100644
index a65b448..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if ((url == void) || (url == null)) {\n\tthrow new RuntimeException(\"The url must be specified\");\n}\n\nURL inputURL = null;\nif (base != void) {\n\tinputURL = new URL(new URL(base), url);\n} else {\n\tinputURL = new URL(url);\n}\n\nint bytesRead = 0;\nint totalBytesRead = 0;\nInputStream is = inputURL.openStream();\nByteArrayOutputStream os = new ByteArrayOutputStream();\nbyte[] buffer = new byte[2048];\nwhile (true) {\n\tbytesRead = is.read(buffer);\n\tif (bytesRead == -1) {\n\t\tbreak;\t\n\t}\n\n\tos.write(buffer, 0, bytesRead);\n}\n\nimage = os.toByteArray();\nis.close();\nos.close();\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.WebImageFetcher",
-  "inputPorts" : [ {
-    "name" : "url",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "base",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "image",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher
deleted file mode 100644
index dcd76a6..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher
+++ /dev/null
@@ -1,68 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>if ((url == void) || (url == null)) {
-	throw new RuntimeException("The url must be specified");
-}
-
-URL inputURL = null;
-if (base != void) {
-  inputURL = new URL(new URL(base), url);
-}
-else {
-  inputURL = new URL(url);
-}
-URLConnection con = inputURL.openConnection();
-InputStream in = con.getInputStream();
-
-StringBuffer result = new StringBuffer();
-BufferedReader reader;
-
-String encoding = con.getContentEncoding();
-if (encoding == null) {
-  reader = new BufferedReader(new InputStreamReader(in));
-} else {
-  reader = new BufferedReader(new InputStreamReader(in, encoding));
-}
-String line = null;
-String NEWLINE = System.getProperty("line.separator");
-while ((line = reader.readLine()) != null) {
-	result.append(line);
-	result.append(NEWLINE);
-}
-
-reader.close();
-contents = result.toString();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>url</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/x-taverna-web-url'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>base</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/x-taverna-web-url'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>contents</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain,text/html'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher.json
----------------------------------------------------------------------
diff --git a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher.json b/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher.json
deleted file mode 100644
index ad7a5b6..0000000
--- a/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if ((url == void) || (url == null)) {\n\tthrow new RuntimeException(\"The url must be specified\");\n}\n\nURL inputURL = null;\nif (base != void) {\n  inputURL = new URL(new URL(base), url);\n}\nelse {\n  inputURL = new URL(url);\n}\nURLConnection con = inputURL.openConnection();\nInputStream in = con.getInputStream();\n\nStringBuffer result = new StringBuffer();\nBufferedReader reader;\n\nString encoding = con.getContentEncoding();\nif (encoding == null) {\n  reader = new BufferedReader(new InputStreamReader(in));\n} else {\n  reader = new BufferedReader(new InputStreamReader(in, encoding));\n}\nString line = null;\nString NEWLINE = System.getProperty(\"line.separator\");\nwhile ((line = reader.readLine()) != null) {\n\tresult.append(line);\n\tresult.append(NEWLINE);\n}\n\nreader.close();\ncontents = result.toString();\n",
-  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.WebPageFetcher",
-  "inputPorts" : [ {
-    "name" : "url",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "base",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "contents",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/pom.xml b/taverna-localworker-activity-ui/pom.xml
new file mode 100644
index 0000000..556de86
--- /dev/null
+++ b/taverna-localworker-activity-ui/pom.xml
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+                <groupId>net.sf.taverna</groupId>
+                <artifactId>taverna-parent</artifactId>
+                <version>3.0.1-SNAPSHOT</version>
+	</parent>
+	<groupId>net.sf.taverna.t2.ui-activities</groupId>
+	<artifactId>localworker-activity-ui</artifactId>
+        <version>2.0-SNAPSHOT</version>
+	<packaging>bundle</packaging>
+	<name>Taverna 2 Localworker Activity UI</name>
+	<dependencies>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-activities</groupId>
+			<artifactId>beanshell-activity-ui</artifactId>
+			<version>${t2.activities.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-icons-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-palette-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>edits-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>file-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>menu-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>uk.org.taverna.configuration</groupId>
+			<artifactId>taverna-app-configuration-api</artifactId>
+			<version>${taverna.configuration.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>uk.org.taverna.scufl2</groupId>
+			<artifactId>scufl2-api</artifactId>
+			<version>${scufl2.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-databind</artifactId>
+			<version>2.2.2</version>
+		</dependency>
+
+		<!-- category:biojava -->
+		<!-- net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker -->
+		<!-- net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker -->
+		<!-- net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker -->
+		<!-- net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker -->
+		<dependency>
+			<groupId>uk.org.mygrid.resources</groupId>
+			<artifactId>biojava</artifactId>
+			<version>1.4pre1</version>
+		</dependency>
+		<!-- category:xml -->
+		<!-- net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker -->
+		<dependency>
+			<groupId>org.dom4j</groupId>
+			<artifactId>com.springsource.org.dom4j</artifactId>
+			<version>${dom4j.version}</version>
+		</dependency>
+		<!-- <dependency>
+			<groupId>dom4j</groupId>
+			<artifactId>dom4j</artifactId>
+			<version>1.6</version>
+		</dependency> -->
+		<!-- category:net -->
+		<!-- org.embl.ebi.escience.scuflworkers.java.SendEmail -->
+		<dependency>
+			<groupId>javax.mail</groupId>
+			<artifactId>com.springsource.javax.mail</artifactId>
+			<version>${mail.version}</version>
+		</dependency>
+		<!-- <dependency>
+			<groupId>javax.mail</groupId>
+			<artifactId>mail</artifactId>
+			<version>1.4</version>
+		</dependency> -->
+		<dependency>
+			<groupId>javax.activation</groupId>
+			<artifactId>com.springsource.javax.activation</artifactId>
+			<version>1.1.1</version>
+		</dependency>
+		<!-- <dependency>
+			<groupId>javax.activation</groupId>
+			<artifactId>activation</artifactId>
+			<version>1.1</version>
+		</dependency> -->
+		<!-- category:base64 -->
+		<!-- org.embl.ebi.escience.scuflworkers.java.EncodeBase64 -->
+		<!-- org.embl.ebi.escience.scuflworkers.java.DecodeBase64 -->
+		<dependency>
+			<groupId>commons-codec</groupId>
+			<artifactId>commons-codec</artifactId>
+			<version>${commons.codec.version}</version>
+		</dependency>
+		<!-- <dependency>
+			<groupId>commons-codec</groupId>
+			<artifactId>commons-codec</artifactId>
+			<version>1.3</version>
+		</dependency> -->
+	</dependencies>
+	<repositories>
+		<repository>
+			<releases />
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+			<id>mygrid-repository</id>
+			<name>myGrid Repository</name>
+			<url>http://www.mygrid.org.uk/maven/repository
+			</url>
+		</repository>
+		<repository>
+			<releases>
+				<enabled>false</enabled>
+			</releases>
+			<snapshots />
+			<id>mygrid-snapshot-repository</id>
+			<name>myGrid Snapshot Repository</name>
+			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
+		</repository>
+	</repositories>
+</project>
+


[08/50] [abbrv] incubator-taverna-workbench-common-activities git commit: org.apache.taverna.workbench.commonactivities

Posted by st...@apache.org.
org.apache.taverna.workbench.commonactivities


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/e91cf396
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/e91cf396
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/e91cf396

Branch: refs/heads/master
Commit: e91cf3965ceed5bb0780674687c6adafeef26af9
Parents: 
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:15:06 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:15:06 2015 +0000

----------------------------------------------------------------------
 pom.xml | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e91cf396/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..e07803d
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,35 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.apache.taverna</groupId>
+		<artifactId>taverna-parent</artifactId>
+		<version>1-incubating-SNAPSHOT</version>
+	</parent>
+	<groupId>org.apache.taverna.workbench.commonactivities</groupId>
+	<artifactId>taverna-workbench-commonactivities</artifactId>
+	<version>3.1.0-incubating-SNAPSHOT</version>
+	<packaging>pom</packaging>
+	<name>Apache Taverna Workbench Common Activities</name>
+  <description>User interface and Workbench integration for common activities</description>
+  <properties>
+    <taverna.language.version>0.15.0-incubating-SNAPSHOT</taverna.language.version>
+    <taverna.osgi.version>0.2.0-incubating-SNAPSHOT</taverna.osgi.version>
+    <taverna.engine.version>3.1.0-incubating-SNAPSHOT</taverna.engine.version>
+    <taverna.commonactivities.version>2.1.0-incubating-SNAPSHOT</taverna.commonactivities.version>
+    <taverna.workbench.version>3.1.0-incubating-SNAPSHOT</taverna.workbench.version>
+  </properties>
+	<modules>
+  </modules>
+  <repositories>
+    <repository>
+      <id>taverna-incubating</id>
+      <name>Apache Taverna incubating Repository</name>
+        <url>http://repository.mygrid.org.uk/artifactory/incubator-snapshot-local/</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots />
+    </repository>
+  </repositories>
+</project>


[41/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-wsdl-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/ConfirmTrustedCertificateDialog.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/ConfirmTrustedCertificateDialog.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/ConfirmTrustedCertificateDialog.java
deleted file mode 100644
index bc58aad..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/ConfirmTrustedCertificateDialog.java
+++ /dev/null
@@ -1,586 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
-
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Dialog;
-import java.awt.FlowLayout;
-import java.awt.Frame;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.Font;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.math.BigInteger;
-import java.util.HashMap;
-
-import javax.swing.JButton;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import javax.swing.border.CompoundBorder;
-import javax.swing.border.EmptyBorder;
-import javax.swing.border.EtchedBorder;
-import javax.swing.JSeparator;
-
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.cert.CertificateEncodingException;
-import java.security.cert.X509Certificate;
-import javax.security.auth.x500.X500Principal;
-
-import net.sf.taverna.t2.lang.ui.DialogTextArea;
-import net.sf.taverna.t2.security.credentialmanager.CMException;
-import net.sf.taverna.t2.security.credentialmanager.CMUtils;
-import net.sf.taverna.t2.workbench.helper.HelpEnabledDialog;
-
-import org.apache.log4j.Logger;
-import org.bouncycastle.asn1.ASN1OctetString;
-import org.bouncycastle.asn1.DERBitString;
-import org.bouncycastle.asn1.DEROctetString;
-import org.bouncycastle.asn1.misc.NetscapeCertType;
-
-/**
- * Displays the details of a X.509 certificate and asks user if they want to
- * trust it.
- * 
- * @author Alex Nenadic
- */
-@SuppressWarnings("serial")
-public class ConfirmTrustedCertificateDialog extends HelpEnabledDialog {
-	
-	private static Logger logger = Logger.getLogger(ConfirmTrustedCertificateDialog.class);
-
-	// Stores certificate to display
-	private X509Certificate cert;
-
-	// Stores user's decision as whether to trust this service's certificaet or not.
-	private boolean shouldTrust;
-
-	/**
-	 * Creates new ConfirmTrustedCertificateDialog where parent is a Frame.
-	 */
-	public ConfirmTrustedCertificateDialog(Frame parent, String title,
-			boolean modal, X509Certificate crt)
-			throws CMException {
-		super(parent, title, modal, null);
-		this.cert = crt;
-		initComponents();
-	}
-	
-	/**
-	 * Creates new ConfirmTrustedCertificateDialog where parent is a Dialog.
-	 */
-	public ConfirmTrustedCertificateDialog(Dialog parent, String title,
-			boolean modal, X509Certificate crt)
-			throws CMException {
-		super(parent, title, modal, null);
-		this.cert = crt;
-		initComponents();
-	}
-
-	/**
-	 * Initialise the dialog's GUI components.
-	 */
-	private void initComponents(){
-		
-		// title panel
-		JPanel titlePanel = new JPanel(new BorderLayout());
-		titlePanel.setBackground(Color.WHITE);
-		JLabel titleLabel = new JLabel("View service's certificate");
-		titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 13.5f));
-		titleLabel.setBorder(new EmptyBorder(10, 10, 0, 10));
-		DialogTextArea titleMessage = new DialogTextArea("This service requires HTTPS connection and has identified itself with the certificate below.\n" +
-				"Do you want to trust this service? (Refusing to trust means you will not be able to invoke it from a workflow.)");
-		titleMessage.setMargin(new Insets(5, 20, 10, 10));
-		titleMessage.setFont(titleMessage.getFont().deriveFont(11f));
-		titleMessage.setEditable(false);
-		titleMessage.setFocusable(false);
-		titlePanel.setBorder( new EmptyBorder(10, 10, 0, 10));
-		titlePanel.add(titleLabel, BorderLayout.NORTH);
-		titlePanel.add(titleMessage, BorderLayout.CENTER);
-		
-		// Certificate details:
-
-		// Grid Bag Constraints templates for labels (column 1) and
-		// values (column 2) of certificate details
-		GridBagConstraints gbcLabel = new GridBagConstraints();
-		gbcLabel.gridx = 0;
-		gbcLabel.ipadx = 20;
-		gbcLabel.gridwidth = 1;
-		gbcLabel.gridheight = 1;
-		gbcLabel.insets = new Insets(2, 15, 2, 2);
-		gbcLabel.anchor = GridBagConstraints.LINE_START;
-
-		GridBagConstraints gbcValue = new GridBagConstraints();
-		gbcValue.gridx = 1;
-		gbcValue.gridwidth = 1;
-		gbcValue.gridheight = 1;
-		gbcValue.insets = new Insets(2, 5, 2, 2);
-		gbcValue.anchor = GridBagConstraints.LINE_START;
-
-		// Netscape Certificate Type non-critical extension (if any)
-		// defines the intended uses of the certificate - to make it look like
-		// firefox's view certificate dialog
-		byte[] intendedUses = cert.getExtensionValue("2.16.840.1.113730.1.1"); // Netscape Certificate Type OID
-		JLabel jlIntendedUses = null;
-		JTextField jtfIntendedUsesValue = null;
-		JPanel jpUses = null;
-		GridBagConstraints gbc_jpUses = null;
-		if (intendedUses != null) {
-			jlIntendedUses = new JLabel(
-					"This certificate has been approved for the following uses:");
-			jlIntendedUses.setFont(new Font(null, Font.BOLD, 11));
-			jlIntendedUses.setBorder(new EmptyBorder(5, 5, 5, 5));
-
-			jtfIntendedUsesValue = new JTextField(45);
-			jtfIntendedUsesValue.setText(getIntendedUses(intendedUses));
-			jtfIntendedUsesValue.setEditable(false);
-			jtfIntendedUsesValue.setFont(new Font(null, Font.PLAIN, 11));
-
-			jpUses = new JPanel(new BorderLayout());
-			jpUses.add(jlIntendedUses, BorderLayout.NORTH);
-			jpUses.add(jtfIntendedUsesValue, BorderLayout.CENTER);
-			JSeparator jsp = new JSeparator(JSeparator.HORIZONTAL);
-			jpUses.add(jsp, BorderLayout.SOUTH);
-
-			gbc_jpUses = (GridBagConstraints) gbcLabel.clone();
-			gbc_jpUses.gridy = 0;
-			gbc_jpUses.gridwidth = 2; // takes two columns
-			gbc_jpUses.insets = new Insets(5, 5, 5, 5);// has slightly bigger insets
-		}
-
-		// Issued To
-		JLabel jlIssuedTo = new JLabel("Issued To");
-		jlIssuedTo.setFont(new Font(null, Font.BOLD, 11));
-		GridBagConstraints gbc_jlIssuedTo = (GridBagConstraints) gbcLabel
-				.clone();
-		gbc_jlIssuedTo.gridy = 1;
-		gbc_jlIssuedTo.gridwidth = 2; // takes two columns
-		gbc_jlIssuedTo.insets = new Insets(5, 5, 5, 5);// has slightly bigger insets
-		// Distinguished Name (DN)
-		String sDN = cert.getSubjectX500Principal().getName(
-				X500Principal.RFC2253);
-		CMUtils util = new CMUtils();
-		util.parseDN(sDN);
-		// Extract the CN, O, OU and EMAILADDRESS fields
-		String sCN = util.getCN();
-		String sOrg = util.getO();
-		String sOU = util.getOU();
-		// String sEMAILADDRESS = CMX509Util.getEmilAddress();
-		// Common Name (CN)
-		JLabel jlCN = new JLabel("Common Name (CN)");
-		jlCN.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlCN = (GridBagConstraints) gbcLabel.clone();
-		gbc_jlCN.gridy = 2;
-		JLabel jlCNValue = new JLabel(sCN);
-		jlCNValue.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlCNValue = (GridBagConstraints) gbcValue
-				.clone();
-		gbc_jlCNValue.gridy = 2;
-		// Organisation (O)
-		JLabel jlOrg = new JLabel("Organisation (O)");
-		jlOrg.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlOrg = (GridBagConstraints) gbcLabel.clone();
-		gbc_jlOrg.gridy = 3;
-		JLabel jlOrgValue = new JLabel(sOrg);
-		jlOrgValue.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlOrgValue = (GridBagConstraints) gbcValue
-				.clone();
-		gbc_jlOrgValue.gridy = 3;
-		// Organisation Unit (OU)
-		JLabel jlOU = new JLabel("Organisation Unit (OU)");
-		jlOU.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlOU = (GridBagConstraints) gbcLabel.clone();
-		gbc_jlOU.gridy = 4;
-		JLabel jlOUValue = new JLabel(sOU);
-		jlOUValue.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlOUValue = (GridBagConstraints) gbcValue
-				.clone();
-		gbc_jlOUValue.gridy = 4;
-		// E-mail Address
-		// JLabel jlEmail = new JLabel("E-mail Address");
-		// jlEmail.setFont(new Font(null, Font.PLAIN, 11));
-		// GridBagConstraints gbc_jlEmail = (GridBagConstraints)
-		// gbcLabel.clone();
-		// gbc_jlEmail.gridy = 5;
-		// JLabel jlEmailValue = new JLabel(sEMAILADDRESS);
-		// jlEmailValue.setFont(new Font(null, Font.PLAIN, 11));
-		// GridBagConstraints gbc_jlEmailValue = (GridBagConstraints)
-		// gbcValue.clone();
-		// gbc_jlEmailValue.gridy = 5;
-		// Serial Number
-		JLabel jlSN = new JLabel("Serial Number");
-		jlSN.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlSN = (GridBagConstraints) gbcLabel.clone();
-		gbc_jlSN.gridy = 6;
-		JLabel jlSNValue = new JLabel();
-		// Get the hexadecimal serial number
-		StringBuffer strBuff = new StringBuffer(new BigInteger(1, cert
-				.getSerialNumber().toByteArray()).toString(16).toUpperCase());
-		// Place colons at every two hexadecimal characters
-		if (strBuff.length() > 2) {
-			for (int iCnt = 2; iCnt < strBuff.length(); iCnt += 3) {
-				strBuff.insert(iCnt, ':');
-			}
-		}
-		jlSNValue.setText(strBuff.toString());
-		jlSNValue.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlSNValue = (GridBagConstraints) gbcValue
-				.clone();
-		gbc_jlSNValue.gridy = 6;
-		// Version
-		JLabel jlVersion = new JLabel("Version");
-		jlVersion.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlVersion = (GridBagConstraints) gbcLabel
-				.clone();
-		gbc_jlVersion.gridy = 7;
-		JLabel jlVersionValue = new JLabel(Integer.toString(cert.getVersion()));
-		jlVersionValue.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlVersionValue = (GridBagConstraints) gbcValue
-				.clone();
-		gbc_jlVersionValue.gridy = 7;
-
-		// Issued By
-		JLabel jlIssuedBy = new JLabel("Issued By");
-		jlIssuedBy.setFont(new Font(null, Font.BOLD, 11));
-		GridBagConstraints gbc_jlIssuedBy = (GridBagConstraints) gbcLabel
-				.clone();
-		gbc_jlIssuedBy.gridy = 8;
-		gbc_jlIssuedBy.gridwidth = 2; // takes two columns
-		gbc_jlIssuedBy.insets = new Insets(5, 5, 5, 5);// has slightly bigger
-														// insets
-		// Distinguished Name (DN)
-		String iDN = cert.getIssuerX500Principal().getName(
-				X500Principal.RFC2253);
-		util.parseDN(iDN);
-		// Extract the CN, O and OU fields
-		String iCN = util.getCN();
-		String iOrg = util.getO();
-		String iOU = util.getOU();
-		// Common Name (CN)
-		JLabel jlICN = new JLabel("Common Name (CN)");
-		jlICN.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlICN = (GridBagConstraints) gbcLabel.clone();
-		gbc_jlICN.gridy = 9;
-		JLabel jlICNValue = new JLabel(iCN);
-		jlICNValue.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlICNValue = (GridBagConstraints) gbcValue
-				.clone();
-		gbc_jlICNValue.gridy = 9;
-		// Organisation (O)
-		JLabel jlIOrg = new JLabel("Organisation (O)");
-		jlIOrg.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlIOrg = (GridBagConstraints) gbcLabel.clone();
-		gbc_jlIOrg.gridy = 10;
-		JLabel jlIOrgValue = new JLabel(iOrg);
-		jlIOrgValue.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlIOrgValue = (GridBagConstraints) gbcValue
-				.clone();
-		gbc_jlIOrgValue.gridy = 10;
-		// Organisation Unit (OU)
-		JLabel jlIOU = new JLabel("Organisation Unit (OU)");
-		jlIOU.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlIOU = (GridBagConstraints) gbcLabel.clone();
-		gbc_jlIOU.gridy = 11;
-		JLabel jlIOUValue = new JLabel(iOU);
-		jlIOUValue.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlIOUValue = (GridBagConstraints) gbcValue
-				.clone();
-		gbc_jlIOUValue.gridy = 11;
-		// Validity
-		JLabel jlValidity = new JLabel("Validity");
-		jlValidity.setFont(new Font(null, Font.BOLD, 11));
-		GridBagConstraints gbc_jlValidity = (GridBagConstraints) gbcLabel
-				.clone();
-		gbc_jlValidity.gridy = 12;
-		gbc_jlValidity.gridwidth = 2; // takes two columns
-		gbc_jlValidity.insets = new Insets(5, 5, 5, 5);// has slightly bigger
-														// insets
-		// Issued On
-		JLabel jlIssuedOn = new JLabel("Issued On");
-		jlIssuedOn.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlIssuedOn = (GridBagConstraints) gbcLabel
-				.clone();
-		gbc_jlIssuedOn.gridy = 13;
-		JLabel jlIssuedOnValue = new JLabel(cert.getNotBefore().toString());
-		jlIssuedOnValue.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlIssuedOnValue = (GridBagConstraints) gbcValue
-				.clone();
-		gbc_jlIssuedOnValue.gridy = 13;
-		// Expires On
-		JLabel jlExpiresOn = new JLabel("Expires On");
-		jlExpiresOn.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlExpiresOn = (GridBagConstraints) gbcLabel
-				.clone();
-		gbc_jlExpiresOn.gridy = 14;
-		JLabel jlExpiresOnValue = new JLabel(cert.getNotAfter().toString());
-		jlExpiresOnValue.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlExpiresOnValue = (GridBagConstraints) gbcValue
-				.clone();
-		gbc_jlExpiresOnValue.gridy = 14;
-
-		// Fingerprints
-		byte[] bCert = new byte[0];
-		try {
-			bCert = cert.getEncoded();
-		} catch (CertificateEncodingException ex) {
-			logger.error("Could not get the encoded form of the certificate.", ex);
-		}
-		JLabel jlFingerprints = new JLabel("Fingerprints");
-		jlFingerprints.setFont(new Font(null, Font.BOLD, 11));
-		GridBagConstraints gbc_jlFingerprints = (GridBagConstraints) gbcLabel
-				.clone();
-		gbc_jlFingerprints.gridy = 15;
-		gbc_jlFingerprints.gridwidth = 2; // takes two columns
-		gbc_jlFingerprints.insets = new Insets(5, 5, 5, 5);// has slightly
-															// bigger insets
-		// SHA-1 Fingerprint
-		JLabel jlSHA1Fingerprint = new JLabel("SHA1 Fingerprint");
-		jlSHA1Fingerprint.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlSHA1Fingerprint = (GridBagConstraints) gbcLabel
-				.clone();
-		gbc_jlSHA1Fingerprint.gridy = 16;
-		JLabel jlSHA1FingerprintValue = new JLabel(getMessageDigest(bCert,
-				"SHA1"));
-		jlSHA1FingerprintValue.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlSHA1FingerprintValue = (GridBagConstraints) gbcValue
-				.clone();
-		gbc_jlSHA1FingerprintValue.gridy = 16;
-		// MD5 Fingerprint
-		JLabel jlMD5Fingerprint = new JLabel("MD5 Fingerprint");
-		jlMD5Fingerprint.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlMD5Fingerprint = (GridBagConstraints) gbcLabel
-				.clone();
-		gbc_jlMD5Fingerprint.gridy = 17;
-		JLabel jlMD5FingerprintValue = new JLabel(
-				getMessageDigest(bCert, "MD5"));
-		jlMD5FingerprintValue.setFont(new Font(null, Font.PLAIN, 11));
-		GridBagConstraints gbc_jlMD5FingerprintValue = (GridBagConstraints) gbcValue
-				.clone();
-		gbc_jlMD5FingerprintValue.gridy = 17;
-
-		// Empty label to add a bit space at the bottom of the panel
-		// to make it look like firefox's view certificate dialog
-		JLabel jlEmpty = new JLabel("");
-		GridBagConstraints gbc_jlEmpty = (GridBagConstraints) gbcLabel.clone();
-		gbc_jlEmpty.gridy = 18;
-		gbc_jlEmpty.gridwidth = 2; // takes two columns
-		gbc_jlEmpty.ipady = 40;
-
-		JPanel jpCertificate = new JPanel(new GridBagLayout());
-		jpCertificate.setBorder(new CompoundBorder(new EmptyBorder(15, 15, 15,
-				15), new EtchedBorder()));
-
-		if (intendedUses != null) {
-			jpCertificate.add(jpUses, gbc_jpUses);
-		}
-		jpCertificate.add(jlIssuedTo, gbc_jlIssuedTo); // Issued To
-		jpCertificate.add(jlCN, gbc_jlCN);
-		jpCertificate.add(jlCNValue, gbc_jlCNValue);
-		jpCertificate.add(jlOrg, gbc_jlOrg);
-		jpCertificate.add(jlOrgValue, gbc_jlOrgValue);
-		jpCertificate.add(jlOU, gbc_jlOU);
-		jpCertificate.add(jlOUValue, gbc_jlOUValue);
-		// jpCertificate.add(jlEmail, gbc_jlEmail);
-		// jpCertificate.add(jlEmailValue, gbc_jlEmailValue);
-		jpCertificate.add(jlSN, gbc_jlSN);
-		jpCertificate.add(jlSNValue, gbc_jlSNValue);
-		jpCertificate.add(jlVersion, gbc_jlVersion);
-		jpCertificate.add(jlVersionValue, gbc_jlVersionValue);
-		jpCertificate.add(jlIssuedBy, gbc_jlIssuedBy); // Issued By
-		jpCertificate.add(jlICN, gbc_jlICN);
-		jpCertificate.add(jlICNValue, gbc_jlICNValue);
-		jpCertificate.add(jlIOrg, gbc_jlIOrg);
-		jpCertificate.add(jlIOrgValue, gbc_jlIOrgValue);
-		jpCertificate.add(jlIOU, gbc_jlIOU);
-		jpCertificate.add(jlIOUValue, gbc_jlIOUValue);
-		jpCertificate.add(jlValidity, gbc_jlValidity); // Validity
-		jpCertificate.add(jlIssuedOn, gbc_jlIssuedOn);
-		jpCertificate.add(jlIssuedOnValue, gbc_jlIssuedOnValue);
-		jpCertificate.add(jlExpiresOn, gbc_jlExpiresOn);
-		jpCertificate.add(jlExpiresOnValue, gbc_jlExpiresOnValue);
-		jpCertificate.add(jlFingerprints, gbc_jlFingerprints); // Fingerprints
-		jpCertificate.add(jlSHA1Fingerprint, gbc_jlSHA1Fingerprint);
-		jpCertificate.add(jlSHA1FingerprintValue, gbc_jlSHA1FingerprintValue);
-		jpCertificate.add(jlMD5Fingerprint, gbc_jlMD5Fingerprint);
-		jpCertificate.add(jlMD5FingerprintValue, gbc_jlMD5FingerprintValue);
-		jpCertificate.add(jlEmpty, gbc_jlEmpty); // Empty label to get some vertical space on the frame
-
-		// OK button
-		JPanel jpButtons = new JPanel(new FlowLayout(FlowLayout.CENTER));
-
-		final JButton jbTrust = new JButton("Trust");
-		jbTrust.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent evt) {
-				trustPressed();
-			}
-		});
-		final JButton jbDontTrust = new JButton("Do not trust");
-		jbDontTrust.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent evt) {
-				dontTrustPressed();
-			}
-		});
-
-		jpButtons.add(jbTrust);
-		jpButtons.add(jbDontTrust);
-
-		// Put it all together
-		getContentPane().add(titlePanel, BorderLayout.NORTH);
-		getContentPane().add(jpCertificate, BorderLayout.CENTER);
-		getContentPane().add(jpButtons, BorderLayout.SOUTH);
-
-		// Resizing wreaks havoc
-		setResizable(false);
-
-		addWindowListener(new WindowAdapter() {
-			public void windowClosing(WindowEvent evt) {
-				closeDialog();
-			}
-		});
-
-		getRootPane().setDefaultButton(jbTrust);
-
-		pack();
-	}
-
-	/**
-	 * Get the digest of a message as a formatted String.
-	 * 
-	 * @param bMessage
-	 *            The message to digest
-	 * @param digestType
-	 *            The message digest algorithm
-	 * @return The message digest
-	 */
-	public static String getMessageDigest(byte[] bMessage, String digestType) {
-		// Create message digest object using the supplied algorithm
-		MessageDigest messageDigest;
-		try {
-			messageDigest = MessageDigest.getInstance(digestType);
-		} catch (NoSuchAlgorithmException ex) {
-			logger.error("Failed to create message digest.", ex);
-			return "";
-		}
-
-		// Create raw message digest
-		byte[] bFingerPrint = messageDigest.digest(bMessage);
-
-		// Place the raw message digest into a StringBuffer as a Hex number
-		StringBuffer strBuff = new StringBuffer(new BigInteger(1, bFingerPrint)
-				.toString(16).toUpperCase());
-
-		// Odd number of characters so add in a padding "0"
-		if ((strBuff.length() % 2) != 0) {
-			strBuff.insert(0, '0');
-		}
-
-		// Place colons at every two hex characters
-		if (strBuff.length() > 2) {
-			for (int iCnt = 2; iCnt < strBuff.length(); iCnt += 3) {
-				strBuff.insert(iCnt, ':');
-			}
-		}
-
-		// Return the formatted message digest
-		return strBuff.toString();
-	}
-
-	/**
-	 * Gets the intended certificate uses, i.e. Netscape Certificate Type
-	 * extension (2.16.840.1.113730.1.1) value as a string
-	 * 
-	 * @param value
-	 *            Extension value as a DER-encoded OCTET string
-	 * @return Extension value as a string
-	 */
-	private String getIntendedUses(byte[] value) {
-
-		// Netscape Certificate Types (2.16.840.1.113730.1.1)
-		int[] INTENDED_USES = new int[] { NetscapeCertType.sslClient,
-				NetscapeCertType.sslServer, NetscapeCertType.smime,
-				NetscapeCertType.objectSigning, NetscapeCertType.reserved,
-				NetscapeCertType.sslCA, NetscapeCertType.smimeCA,
-				NetscapeCertType.objectSigningCA, };
-
-		// Netscape Certificate Type strings (2.16.840.1.113730.1.1)
-		HashMap<String, String> INTENDED_USES_STRINGS = new HashMap<String, String>();
-		INTENDED_USES_STRINGS.put("128", "SSL Client");
-		INTENDED_USES_STRINGS.put("64", "SSL Server");
-		INTENDED_USES_STRINGS.put("32", "S/MIME");
-		INTENDED_USES_STRINGS.put("16", "Object Signing");
-		INTENDED_USES_STRINGS.put("8", "Reserved");
-		INTENDED_USES_STRINGS.put("4", "SSL CA");
-		INTENDED_USES_STRINGS.put("2", "S/MIME CA");
-		INTENDED_USES_STRINGS.put("1", "Object Signing CA");
-
-		// Get octet string from extension value
-		ASN1OctetString fromByteArray = new DEROctetString(value);
-		byte[] octets = fromByteArray.getOctets();
-		DERBitString fromByteArray2 = new DERBitString(octets);
-		int val = new NetscapeCertType(fromByteArray2).intValue();
-		StringBuffer strBuff = new StringBuffer();
-		for (int i = 0, len = INTENDED_USES.length; i < len; i++) {
-			int use = INTENDED_USES[i];
-			if ((val & use) == use) {
-				strBuff.append(INTENDED_USES_STRINGS.get(String.valueOf(use))
-						+ ", \n");
-			}
-		}
-		// remove the last ", \n" from the end of the buffer
-		String str = strBuff.toString();
-		str = str.substring(0, str.length() - 3);
-		return str;
-	}
-
-	/**
-	 * 'Trust' button pressed.
-	 */
-	private void trustPressed() {
-		shouldTrust = true;
-		closeDialog();
-	}
-
-	/**
-	 * 'Do not trust' button pressed.
-	 */
-	private void dontTrustPressed() {
-		shouldTrust = false;
-		closeDialog();
-	}	
-	
-	/**
-	 * Closes the dialog.
-	 */
-	public void closeDialog() {
-		setVisible(false);
-		dispose();
-	}
-
-	public boolean shouldTrust() {
-		return shouldTrust;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLActivityIcon.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLActivityIcon.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLActivityIcon.java
deleted file mode 100644
index 79f8ccd..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLActivityIcon.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
-
-import java.net.URI;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
-
-/**
- *
- * @author Alex Nenadic
- * @author alanrw
- *
- */
-public class WSDLActivityIcon implements ActivityIconSPI {
-
-	private static Icon icon;
-
-	public int canProvideIconScore(URI activityType) {
-		if (activityType.equals(WSDLServiceDescription.ACTIVITY_TYPE))
-			return DEFAULT_ICON + 1;
-		else
-			return NO_ICON;
-	}
-
-	public Icon getIcon(URI activityType) {
-		return getWSDLIcon();
-	}
-
-	public static Icon getWSDLIcon() {
-		if (icon == null) {
-			icon = new ImageIcon(WSDLActivityIcon.class.getResource("/wsdl.png"));
-		}
-		return icon;
-	}
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceDescription.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceDescription.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceDescription.java
deleted file mode 100644
index faa3f8c..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceDescription.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*********************************************************************
- * Copyright (C) 2007-2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- **********************************************************************/
-package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import javax.swing.Icon;
-
-import net.sf.taverna.t2.security.credentialmanager.CMException;
-import net.sf.taverna.t2.security.credentialmanager.CredentialManager;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
-
-import org.apache.log4j.Logger;
-
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
-public class WSDLServiceDescription extends ServiceDescription {
-
-	public static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/wsdl");
-	public static final URI INPUT_SPLITTER_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/xml-splitter/in");
-	public static final URI OUTPUT_SPLITTER_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/xml-splitter/out");
-
-	private static final String WSDL = "WSDL @ ";
-
-	private String use;
-	private URI uri;
-	private String style;
-	private String operation;
-	private final CredentialManager credentialManager;
-
-	private static Logger logger = Logger.getLogger(WSDLServiceDescription.class);
-
-	public WSDLServiceDescription(CredentialManager credentialManager) {
-		this.credentialManager = credentialManager;
-	}
-
-	public String getUse() {
-		return use;
-	}
-
-	public void setUse(String use) {
-		this.use = use;
-	}
-
-	public URI getURI() {
-		return uri;
-	}
-
-	public void setURI(URI url) {
-		this.uri = url;
-	}
-
-	public String getStyle() {
-		return style;
-	}
-
-	public void setStyle(String style) {
-		this.style = style;
-	}
-
-	public String getType() {
-		return "WSDL";
-	}
-
-	@Override
-	public String toString() {
-		return operation;
-	}
-
-	public String getOperation() {
-		return operation;
-	}
-
-	public void setOperation(String operation) {
-		this.operation = operation;
-	}
-
-	public Icon getIcon() {
-		return WSDLActivityIcon.getWSDLIcon();
-	}
-
-	@Override
-	public URI getActivityType() {
-		return ACTIVITY_TYPE;
-	}
-
-	@Override
-	public Configuration getActivityConfiguration() {
-		Configuration configuration = new Configuration();
-		configuration.setType(ACTIVITY_TYPE.resolve("#Config"));
-		ObjectNode json = (ObjectNode) configuration.getJson();
-		ObjectNode operation = json.objectNode();
-		json.put("operation", operation);
-		operation.put("wsdl", getURI().toString());
-		operation.put("name", getOperation());
-		return configuration;
-	}
-
-	public String getName() {
-		return getOperation();
-	}
-
-	public List<? extends Comparable<?>> getPath() {
-		return Collections.singletonList(WSDL + getURI());
-	}
-
-	protected List<Object> getIdentifyingData() {
-		return Arrays.<Object> asList(getURI(), getOperation());
-	}
-
-	@Override
-	public boolean isTemplateService() {
-		return needsSecurity();
-	}
-
-	protected boolean needsSecurity() {
-		if (credentialManager == null) {
-			// We don't know if it needs security or not
-			return false;
-		}
-		// A match is a good indicator that security configuration is needed
-		try {
-			return credentialManager.hasUsernamePasswordForService(getURI());
-		} catch (CMException e) {
-			logger.warn("Could not check if credential manager has username/password for " + getURI(), e);
-			return false;
-		}
-	}
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProvider.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProvider.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProvider.java
deleted file mode 100644
index daf0cad..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProvider.java
+++ /dev/null
@@ -1,206 +0,0 @@
-package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.swing.Icon;
-import javax.wsdl.Operation;
-import javax.wsdl.WSDLException;
-import javax.xml.parsers.ParserConfigurationException;
-
-import net.sf.taverna.t2.activities.wsdl.WSDLActivityHealthChecker;
-import net.sf.taverna.t2.lang.observer.Observable;
-import net.sf.taverna.t2.lang.observer.Observer;
-import net.sf.taverna.t2.security.credentialmanager.CredentialManager;
-import net.sf.taverna.t2.servicedescriptions.AbstractConfigurableServiceProvider;
-import net.sf.taverna.t2.servicedescriptions.CustomizedConfigurePanelProvider;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.servicedescriptions.events.RemovedProviderEvent;
-import net.sf.taverna.t2.servicedescriptions.events.ServiceDescriptionRegistryEvent;
-import net.sf.taverna.wsdl.parser.UnknownOperationException;
-import net.sf.taverna.wsdl.parser.WSDLParser;
-
-import org.apache.log4j.Logger;
-import org.xml.sax.SAXException;
-
-public class WSDLServiceProvider extends
-		AbstractConfigurableServiceProvider<WSDLServiceProviderConfig> implements
-		CustomizedConfigurePanelProvider<WSDLServiceProviderConfig> {
-
-	private static Logger logger = Logger.getLogger(WSDLServiceProvider.class);
-
-	private static final URI providerId = URI
-	.create("http://taverna.sf.net/2010/service-provider/wsdl");
-
-	private CredentialManager credentialManager;
-
-	public static class FlushWSDLCacheOnRemovalObserver implements
-			Observer<ServiceDescriptionRegistryEvent> {
-		public void notify(
-				Observable<ServiceDescriptionRegistryEvent> registry,
-				ServiceDescriptionRegistryEvent event) throws Exception {
-			if (!(event instanceof RemovedProviderEvent)) {
-				return;
-			}
-			RemovedProviderEvent removedProviderEvent = (RemovedProviderEvent) event;
-			if (!(removedProviderEvent.getProvider() instanceof WSDLServiceProvider)) {
-				return;
-			}
-			WSDLServiceProvider serviceProvider = (WSDLServiceProvider) removedProviderEvent
-					.getProvider();
-			URI wsdlLocation = serviceProvider.getConfiguration().getURI();
-			WSDLParser.flushCache(wsdlLocation.toASCIIString());
-			logger.info("Flushed cache for WSDL " + wsdlLocation);
-		}
-	}
-
-	private static final String WSDL_SERVICE = "WSDL service";
-
-	private static FlushWSDLCacheOnRemovalObserver flushObserver = new FlushWSDLCacheOnRemovalObserver();
-
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-
-	public WSDLServiceProvider() {
-		super(new WSDLServiceProviderConfig("http://somehost/service?wsdl"));
-	}
-
-	public String getName() {
-		return WSDL_SERVICE;
-	}
-
-	public List<WSDLServiceProviderConfig> getDefaultConfigurations() {
-
-		List<WSDLServiceProviderConfig> defaults = new ArrayList<WSDLServiceProviderConfig>();
-
-		// If defaults have failed to load from a configuration file then load them here.
-		if (!serviceDescriptionRegistry.isDefaultSystemConfigurableProvidersLoaded()){
-			// 2009-12-16: 503 server error
-			defaults.add(new WSDLServiceProviderConfig(
-							"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/eutils.wsdl"));
-			defaults.add(new WSDLServiceProviderConfig(
-					"http://soap.bind.ca/wsdl/bind.wsdl"));
-			defaults.add(new WSDLServiceProviderConfig(
-					"http://www.ebi.ac.uk/ws/services/urn:Dbfetch?wsdl"));
-		} // else return an empty list
-
-		return defaults;
-	}
-
-	public void findServiceDescriptionsAsync(
-			FindServiceDescriptionsCallBack callBack) {
-
-		URI wsdl = serviceProviderConfig.getURI();
-
-		callBack.status("Parsing wsdl:" + wsdl);
-		WSDLParser parser = null;
-		try {
-			parser = new WSDLParser(wsdl.toASCIIString());
-			List<Operation> operations = parser.getOperations();
-			callBack.status("Found " + operations.size() + " WSDL operations:"
-					+ wsdl);
-			List<WSDLServiceDescription> items = new ArrayList<WSDLServiceDescription>();
-			for (Operation op : operations) {
-				WSDLServiceDescription item = new WSDLServiceDescription(credentialManager);
-				try {
-					String name = op.getName();
-					item.setOperation(name);
-					String use = parser.getUse(name);
-					String style = parser.getStyle();
-					if (!WSDLActivityHealthChecker.checkStyleAndUse(style, use)) {
-						logger.warn("Unsupported style and use combination " + style + "/" + use + " for operation " + name + " from " + wsdl);
-						continue;
-					}
-					item.setUse(use);
-					item.setStyle(style);
-					item.setURI(wsdl);
-					item.setDescription(parser.getOperationDocumentation(name));
-					items.add(item);
-				} catch (UnknownOperationException e) {
-					String message = "Encountered an unexpected operation name:"
-							+ item.getOperation();
-					callBack.fail(message, e);
-				}
-			}
-			callBack.partialResults(items);
-			callBack.finished();
-		} catch (ParserConfigurationException e) {
-			String message = "Error configuring the WSDL parser";
-			callBack.fail(message, e);
-		} catch (WSDLException e) {
-			String message = "There was an error with the wsdl: " + wsdl;
-			callBack.fail(message, e);
-		} catch (IOException e) {
-			String message = "There was an IO error parsing the wsdl: " + wsdl
-					+ " Possible reason: the wsdl location was incorrect.";
-			callBack.fail(message, e);
-		} catch (SAXException e) {
-			String message = "There was an error with the XML in the wsdl: "
-					+ wsdl;
-			callBack.fail(message, e);
-		} catch (IllegalArgumentException e) { // a problem with the wsdl url
-			String message = "There was an error with the wsdl: " + wsdl + " "
-					+ "Possible reason: the wsdl location was incorrect.";
-			callBack.fail(message, e);
-		} catch (Exception e) { // anything else we did not expect
-			String message = "There was an error with the wsdl: " + wsdl;
-			callBack.fail(message, e);
-		}
-	}
-
-	@Override
-	public String toString() {
-		return getName() + " " + getConfiguration().getURI();
-	}
-
-	public Icon getIcon() {
-		return WSDLActivityIcon.getWSDLIcon();
-	}
-
-	@Override
-	protected List<? extends Object> getIdentifyingData() {
-		List<String> result;
-		result = Arrays.asList(getConfiguration().getURI().toString());
-		return result;
-	}
-
-	/**
-	 * Will be set by ServiceDescriptionRegistryImpl
-	 *
-	 * @param registry Registry this provider has been added to
-	 */
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-		synchronized (flushObserver) {
-			// Add the (static common) observer if the registry does not have it
-			if (!serviceDescriptionRegistry.getObservers().contains(flushObserver)) {
-				serviceDescriptionRegistry.addObserver(flushObserver);
-			}
-		}
-	}
-
-	@SuppressWarnings("serial")
-	public void createCustomizedConfigurePanel(final CustomizedConfigureCallBack<WSDLServiceProviderConfig> callBack) {
-
-		AddWSDLServiceDialog addWSDLServiceDialog = new AddWSDLServiceDialog() {
-				@Override
-				protected void addRegistry(String wsdlURL) {
-
-					WSDLServiceProviderConfig providerConfig = new WSDLServiceProviderConfig(wsdlURL);
-					callBack.newProviderConfiguration(providerConfig);
-				}
-			};
-			addWSDLServiceDialog.setVisible(true);
-	}
-
-	public String getId() {
-		return providerId.toString();
-	}
-
-	public void setCredentialManager(CredentialManager credentialManager) {
-		this.credentialManager = credentialManager;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProviderConfig.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProviderConfig.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProviderConfig.java
deleted file mode 100644
index 9a63c03..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProviderConfig.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
-
-import java.net.URI;
-
-import net.sf.taverna.t2.lang.beans.PropertyAnnotated;
-import net.sf.taverna.t2.lang.beans.PropertyAnnotation;
-
-public class WSDLServiceProviderConfig extends PropertyAnnotated {
-	private URI uri;
-	
-	public WSDLServiceProviderConfig() {
-	}
-
-	public WSDLServiceProviderConfig(String uri) {
-		this.uri = URI.create(uri);
-	}
-
-	@PropertyAnnotation(displayName = "WSDL location", preferred = true)
-	public URI getURI() {
-		return uri;
-	}
-
-	public void setURI(URI uri) {
-		this.uri = uri;
-	}
-
-	@Override
-	public String toString() {
-		return getURI().toASCIIString();
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLInputSplitterActivityIcon.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLInputSplitterActivityIcon.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLInputSplitterActivityIcon.java
deleted file mode 100644
index cc92f3b..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLInputSplitterActivityIcon.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
-
-import java.net.URI;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
-
-/**
- *
- * @author Alex Nenadic
- *
- */
-public class XMLInputSplitterActivityIcon implements ActivityIconSPI{
-
-	private static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/xml-splitter/in");
-
-	private static Icon icon = null;
-
-	public int canProvideIconScore(URI activityType) {
-		if (activityType.equals(ACTIVITY_TYPE))
-			return DEFAULT_ICON + 1;
-		else
-			return NO_ICON;
-	}
-
-	public Icon getIcon(URI activityType) {
-		return getXMLOutputSplitterIcon();
-	}
-
-	public static Icon getXMLOutputSplitterIcon() {
-		if (icon == null) {
-			icon = new ImageIcon(XMLOutputSplitterActivityIcon.class.getResource("/xml-splitter.png"));
-		}
-		return icon;
-	}
-
-}
-
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLOutputSplitterActivityIcon.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLOutputSplitterActivityIcon.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLOutputSplitterActivityIcon.java
deleted file mode 100644
index 73c9bcb..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLOutputSplitterActivityIcon.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
-
-import java.net.URI;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
-
-/**
- *
- * @author Alex Nenadic
- *
- */
-public class XMLOutputSplitterActivityIcon implements ActivityIconSPI{
-
-	private static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/xml-splitter/out");
-
-	private static Icon icon = null;
-
-	public int canProvideIconScore(URI activityType) {
-		if (activityType.equals(ACTIVITY_TYPE))
-			return DEFAULT_ICON + 1;
-		else
-			return NO_ICON;
-	}
-
-	public Icon getIcon(URI activityType) {
-		return getXMLOutputSplitterIcon();
-	}
-
-	public static Icon getXMLOutputSplitterIcon() {
-		if (icon == null) {
-			icon = new ImageIcon(XMLOutputSplitterActivityIcon.class.getResource("/xml-splitter.png"));
-		}
-		return icon;
-	}
-
-}
-
-
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/views/AbstractXMLSplitterActionView.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/views/AbstractXMLSplitterActionView.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/views/AbstractXMLSplitterActionView.java
deleted file mode 100644
index 0ca95e5..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/views/AbstractXMLSplitterActionView.java
+++ /dev/null
@@ -1,159 +0,0 @@
-package net.sf.taverna.t2.activities.wsdl.views;
-
-import java.io.IOException;
-import java.util.Map;
-
-import javax.swing.JButton;
-import javax.swing.JComponent;
-import javax.swing.JPanel;
-import javax.wsdl.WSDLException;
-import javax.xml.parsers.ParserConfigurationException;
-
-import net.sf.taverna.t2.activities.wsdl.actions.AbstractAddXMLSplitterAction;
-import net.sf.taverna.t2.activities.wsdl.actions.AddXMLInputSplitterAction;
-import net.sf.taverna.t2.activities.wsdl.actions.AddXMLOutputSplitterAction;
-import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
-import net.sf.taverna.wsdl.parser.TypeDescriptor;
-import net.sf.taverna.wsdl.parser.UnknownOperationException;
-
-import org.apache.log4j.Logger;
-import org.jdom.JDOMException;
-import org.xml.sax.SAXException;
-
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.port.DepthPort;
-import uk.org.taverna.scufl2.api.port.InputActivityPort;
-import uk.org.taverna.scufl2.api.port.OutputActivityPort;
-
-@SuppressWarnings("serial")
-public abstract class AbstractXMLSplitterActionView extends HTMLBasedActivityContextualView {
-
-	private static Logger logger = Logger.getLogger(AbstractXMLSplitterActionView.class);
-	protected final EditManager editManager;
-	protected final SelectionManager selectionManager;
-	protected AbstractAddXMLSplitterAction splitterAction;
-
-	public AbstractXMLSplitterActionView(Activity activity, EditManager editManager,
-			SelectionManager selectionManager, ColourManager colourManager) {
-		super(activity, colourManager);
-		this.editManager = editManager;
-		this.selectionManager = selectionManager;
-		if (getActivity().getType().equals(WSDLServiceDescription.OUTPUT_SPLITTER_TYPE)) {
-			splitterAction = new AddXMLOutputSplitterAction(getActivity(),
-					null, editManager, selectionManager);
-		} else if (getActivity().getType().equals(WSDLServiceDescription.INPUT_SPLITTER_TYPE)) {
-			splitterAction = new AddXMLInputSplitterAction(getActivity(),
-					null, editManager, selectionManager);
-		}
-		super.initView();
-	}
-
-	@Override
-	public void initView() {
-	}
-
-	protected void addOutputSplitter(final JComponent mainFrame, JPanel flowPanel) {
-		if (getActivity().getType().equals(WSDLServiceDescription.OUTPUT_SPLITTER_TYPE)) {
-			try {
-				Map<String, TypeDescriptor> descriptors = splitterAction.getTypeDescriptors();
-				if (!AbstractAddXMLSplitterAction.filterDescriptors(descriptors).isEmpty()) {
-					flowPanel.add(new JButton(splitterAction));
-				}
-			} catch (UnknownOperationException | IOException | ParserConfigurationException
-					| WSDLException | SAXException | JDOMException e) {
-				logger.warn("Could not find type descriptors for " + getActivity(), e);
-			}
-		}
-	}
-
-	protected void addInputSplitter(final JComponent mainFrame, JPanel flowPanel) {
-		if (getActivity().getType().equals(WSDLServiceDescription.INPUT_SPLITTER_TYPE)) {
-			try {
-				Map<String, TypeDescriptor> descriptors = splitterAction.getTypeDescriptors();
-				if (!AbstractAddXMLSplitterAction.filterDescriptors(descriptors).isEmpty()) {
-					splitterAction.setOwner(mainFrame);
-					flowPanel.add(new JButton(splitterAction));
-				}
-			} catch (UnknownOperationException | IOException | ParserConfigurationException
-					| WSDLException | SAXException | JDOMException e) {
-				logger.warn("Could not find type descriptors for " + getActivity(), e);
-			}
-		}
-	}
-
-	protected String describePorts() {
-		StringBuilder html = new StringBuilder();
-
-		if (!getActivity().getInputPorts().isEmpty()) {
-			html.append("<tr><th colspan='2' align='left'>Inputs</th></tr>");
-			for (InputActivityPort port : getActivity().getInputPorts()) {
-				TypeDescriptor descriptor = null;
-				if (getActivity().getType().equals(WSDLServiceDescription.INPUT_SPLITTER_TYPE)) {
-					try {
-						descriptor = splitterAction.getTypeDescriptors().get(port.getName());
-					} catch (UnknownOperationException | IOException | ParserConfigurationException
-							| WSDLException | SAXException | JDOMException e) {
-						logger.warn("Could not find type descriptors for " + getActivity(), e);
-					}
-				}
-				if (descriptor == null) {
-					html.append(describePort(port));
-				} else {
-					html.append(describePort(port, descriptor));
-				}
-
-			}
-		}
-
-		if (!getActivity().getOutputPorts().isEmpty()) {
-			html.append("<tr><th colspan='2' align='left'>Outputs</th></tr>");
-			for (OutputActivityPort port : getActivity().getOutputPorts()) {
-				TypeDescriptor descriptor = null;
-				if (getActivity().getType().equals(WSDLServiceDescription.OUTPUT_SPLITTER_TYPE)) {
-					try {
-						descriptor = splitterAction.getTypeDescriptors().get(port.getName());
-					} catch (UnknownOperationException | IOException | ParserConfigurationException
-							| WSDLException | SAXException | JDOMException e) {
-						logger.warn("Could not find type descriptors for " + getActivity(), e);
-					}
-				}
-				if (descriptor == null) {
-					html.append(describePort(port));
-				} else {
-					html.append(describePort(port, descriptor));
-				}
-			}
-		}
-
-		return html.toString();
-	}
-
-	private String describePort(DepthPort port, TypeDescriptor descriptor) {
-		String html = "<tr><td>" + port.getName() + "</td><td>";
-		if (descriptor != null && descriptor.isOptional()) {
-			html += "<em>optional</em><br>";
-		}
-		html+="Depth:"+port.getDepth()+"<br>";
-		if (descriptor != null ) {
-            html+="<code>"+descriptor.getQname().toString()+"</code><br>";
-//            if (descriptor.getDocumentation() != null && !descriptor.getDocumentation().isEmpty()){
-//                html += "<p>"+descriptor.getDocumentation()+"</p>";
-//            }
-        }
-
-		html+="</td></tr>";
-		return html;
-	}
-
-	private String describePort(DepthPort port) {
-		String html = "<tr><td>" + port.getName() + "</td><td>";
-		html += "Depth:" + port.getDepth() + "<br>";
-		html += "</td></tr>";
-		return html;
-	}
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityConfigurationView.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityConfigurationView.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityConfigurationView.java
deleted file mode 100644
index 4f728d9..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityConfigurationView.java
+++ /dev/null
@@ -1,446 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2008 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.views;
-
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Graphics;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.ItemEvent;
-import java.awt.event.ItemListener;
-import java.net.URI;
-
-import javax.swing.ButtonGroup;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JComboBox;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.JList;
-import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-import javax.swing.SwingConstants;
-import javax.swing.border.Border;
-import javax.swing.border.EmptyBorder;
-import javax.swing.plaf.basic.BasicComboBoxRenderer;
-
-import net.sf.taverna.t2.activities.wsdl.security.SecurityProfiles;
-import net.sf.taverna.t2.lang.ui.DialogTextArea;
-import net.sf.taverna.t2.security.credentialmanager.CredentialManager;
-import net.sf.taverna.t2.workbench.ui.credentialmanager.CredentialManagerUI;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationPanel;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-/**
- * Configuration dialog for WSDL activity.
- *
- * @author Alex Nenadic
- */
-@SuppressWarnings("serial")
-public class WSDLActivityConfigurationView extends ActivityConfigurationPanel implements ItemListener {
-
-	private CredentialManager credentialManager;
-	private CredentialManagerUI credManagerUI;
-
-	private ButtonGroup buttonGroup;
-	private JRadioButton noSecurityRadioButton;
-	private JLabel noSecurityLabel;
-	private JRadioButton httpSecurityAuthNRadioButton;
-	private JLabel httpSecurityAuthNLabel;
-	private JRadioButton wsSecurityAuthNRadioButton;
-	private JLabel wsSecurityAuthNLabel;
-
-	// Password types
-	private final String PLAINTEXT_PASSWORD = "Plaintext password";
-	private final String DIGEST_PASSWORD = "Digest password";
-	private String[] passwordTypes = new String[] { PLAINTEXT_PASSWORD, DIGEST_PASSWORD };
-	private String[] tooltips = new String[] {
-			"Password will be sent in plaintext (which is OK if service is using HTTPS)",
-			"Password will be digested (cryptographically hashed) before sending" };
-	private JComboBox<String> passwordTypeComboBox;
-	private JCheckBox addTimestampCheckBox;
-	private JButton setHttpUsernamePasswordButton;
-	private JButton setWsdlUsernamePasswordButton;
-
-	// private Logger logger = Logger.getLogger(WSDLActivityConfigurationView.class);
-
-	public WSDLActivityConfigurationView(Activity activity, CredentialManager credentialManager) {
-		super(activity);
-		this.credentialManager = credentialManager;
-		initialise();
-	}
-
-	@Override
-	protected void initialise() {
-		super.initialise();
-
-		int gridy = 0;
-
-		// title panel
-		JPanel titlePanel = new JPanel(new BorderLayout());
-		titlePanel.setBackground(Color.WHITE);
-		JLabel titleLabel = new JLabel("Security configuration");
-		titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 13.5f));
-		titleLabel.setBorder(new EmptyBorder(10, 10, 0, 10));
-		DialogTextArea titleMessage = new DialogTextArea(
-				"Select a security profile for the service");
-		titleMessage.setMargin(new Insets(5, 20, 10, 10));
-		titleMessage.setFont(titleMessage.getFont().deriveFont(11f));
-		titleMessage.setEditable(false);
-		titleMessage.setFocusable(false);
-		titlePanel.setBorder(new EmptyBorder(10, 10, 0, 10));
-		titlePanel.add(titleLabel, BorderLayout.NORTH);
-		titlePanel.add(titleMessage, BorderLayout.CENTER);
-		addDivider(titlePanel, SwingConstants.BOTTOM, true);
-
-		// Main panel
-		JPanel mainPanel = new JPanel();
-		mainPanel.setLayout(new GridBagLayout());
-		mainPanel.setBorder(new EmptyBorder(10, 10, 10, 10));
-
-		// Create the radio buttons
-		noSecurityRadioButton = new JRadioButton("None");
-		noSecurityRadioButton.addItemListener(this);
-
-		wsSecurityAuthNRadioButton = new JRadioButton(
-				"WS-Security username and password authentication");
-		wsSecurityAuthNRadioButton.addItemListener(this);
-
-		httpSecurityAuthNRadioButton = new JRadioButton("HTTP username and password authentication");
-		httpSecurityAuthNRadioButton.addItemListener(this);
-
-		// Group the radio buttons
-		buttonGroup = new ButtonGroup();
-		buttonGroup.add(noSecurityRadioButton);
-		buttonGroup.add(wsSecurityAuthNRadioButton);
-		buttonGroup.add(httpSecurityAuthNRadioButton);
-
-		GridBagConstraints gbc = new GridBagConstraints();
-		gbc.weightx = 1.0;
-		gbc.weighty = 0.0;
-
-		gbc.gridx = 0;
-		gbc.gridy = gridy++;
-		gbc.fill = GridBagConstraints.NONE;
-		gbc.anchor = GridBagConstraints.WEST;
-		gbc.insets = new Insets(5, 10, 0, 0);
-		mainPanel.add(noSecurityRadioButton, gbc);
-
-		noSecurityLabel = new JLabel("Service requires no security");
-		noSecurityLabel.setFont(noSecurityLabel.getFont().deriveFont(11f));
-		// addDivider(noSecurityLabel, SwingConstants.BOTTOM, false);
-		gbc.gridx = 0;
-		gbc.gridy = gridy++;
-		gbc.fill = GridBagConstraints.HORIZONTAL;
-		gbc.anchor = GridBagConstraints.WEST;
-		gbc.insets = new Insets(0, 40, 10, 10);
-		mainPanel.add(noSecurityLabel, gbc);
-
-		gbc.gridx = 0;
-		gbc.gridy = gridy++;
-		gbc.fill = GridBagConstraints.NONE;
-		gbc.anchor = GridBagConstraints.WEST;
-		gbc.insets = new Insets(5, 10, 0, 0);
-		mainPanel.add(httpSecurityAuthNRadioButton, gbc);
-
-		ActionListener usernamePasswordListener = new ActionListener() {
-
-			public void actionPerformed(ActionEvent e) {
-				// Get Credential Manager UI to get the username and password for the service
-				if (credManagerUI == null) {
-					credManagerUI = new CredentialManagerUI(credentialManager);
-				}
-				credManagerUI.newPasswordForService(URI.create(getJson().get("operation")
-						.get("wsdl").textValue()));
-			}
-		};
-
-		httpSecurityAuthNLabel = new JLabel(
-				"Service requires HTTP username and password in order to authenticate the user");
-		httpSecurityAuthNLabel.setFont(httpSecurityAuthNLabel.getFont().deriveFont(11f));
-		gbc.gridx = 0;
-		gbc.gridy = gridy++;
-		gbc.fill = GridBagConstraints.HORIZONTAL;
-		gbc.anchor = GridBagConstraints.WEST;
-		gbc.insets = new Insets(0, 40, 10, 10);
-		mainPanel.add(httpSecurityAuthNLabel, gbc);
-
-		// Set username and password button;
-		setHttpUsernamePasswordButton = new JButton("Set username and password");
-		gbc.gridx = 0;
-		gbc.gridy = gridy++;
-		gbc.fill = GridBagConstraints.NONE;
-		gbc.anchor = GridBagConstraints.EAST;
-		gbc.insets = new Insets(0, 40, 10, 10);
-		gbc.weightx = 1.0;
-		gbc.weighty = 1.0; // add any vertical space to this component
-		mainPanel.add(setHttpUsernamePasswordButton, gbc);
-		setHttpUsernamePasswordButton.addActionListener(usernamePasswordListener);
-
-		gbc.gridx = 0;
-		gbc.gridy = gridy++;
-		gbc.fill = GridBagConstraints.NONE;
-		gbc.anchor = GridBagConstraints.WEST;
-		gbc.insets = new Insets(5, 10, 0, 0);
-		mainPanel.add(wsSecurityAuthNRadioButton, gbc);
-
-		wsSecurityAuthNLabel = new JLabel(
-				"Service requires WS-Security username and password in order to authenticate the user");
-		wsSecurityAuthNLabel.setFont(wsSecurityAuthNLabel.getFont().deriveFont(11f));
-		gbc.gridx = 0;
-		gbc.gridy = gridy++;
-		gbc.fill = GridBagConstraints.HORIZONTAL;
-		gbc.anchor = GridBagConstraints.WEST;
-		gbc.insets = new Insets(0, 40, 0, 0);
-		mainPanel.add(wsSecurityAuthNLabel, gbc);
-
-		// Password type list
-		passwordTypeComboBox = new JComboBox<>(passwordTypes);
-		passwordTypeComboBox.setRenderer(new ComboBoxTooltipRenderer());
-		gbc.gridx = 0;
-		gbc.gridy = gridy++;
-		gbc.fill = GridBagConstraints.NONE;
-		gbc.anchor = GridBagConstraints.WEST;
-		gbc.insets = new Insets(10, 40, 0, 0);
-		mainPanel.add(passwordTypeComboBox, gbc);
-
-		// 'Add timestamp' checkbox
-		addTimestampCheckBox = new JCheckBox("Add a timestamp to SOAP message");
-		gbc.gridx = 0;
-		gbc.gridy = gridy++;
-		gbc.fill = GridBagConstraints.NONE;
-		gbc.anchor = GridBagConstraints.WEST;
-		gbc.insets = new Insets(5, 40, 10, 10);
-		mainPanel.add(addTimestampCheckBox, gbc);
-
-		// Set username and password button;
-		setWsdlUsernamePasswordButton = new JButton("Set username and password");
-		gbc.gridx = 0;
-		gbc.gridy = gridy++;
-		gbc.fill = GridBagConstraints.NONE;
-		gbc.anchor = GridBagConstraints.EAST;
-		gbc.insets = new Insets(0, 40, 10, 10);
-		gbc.weightx = 1.0;
-		gbc.weighty = 1.0; // add any vertical space to this component
-		mainPanel.add(setWsdlUsernamePasswordButton, gbc);
-		setWsdlUsernamePasswordButton.addActionListener(usernamePasswordListener);
-
-		addDivider(mainPanel, SwingConstants.BOTTOM, true);
-
-		// Enable/disable controls based on what is the current security profiles
-		if (!getJson().has("securityProfile")) {
-			noSecurityRadioButton.setSelected(true);
-		} else {
-			URI securityProfile = URI.create(getJson().get("securityProfile").textValue());
-			if (securityProfile.equals(SecurityProfiles.WSSECURITY_USERNAMETOKEN_PLAINTEXTPASSWORD)
-					|| securityProfile
-							.equals(SecurityProfiles.WSSECURITY_USERNAMETOKEN_DIGESTPASSWORD)
-					|| securityProfile
-							.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_PLAINTEXTPASSWORD)
-					|| securityProfile
-							.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_DIGESTPASSWORD)) {
-				wsSecurityAuthNRadioButton.setSelected(true);
-			}
-			if (securityProfile.equals(SecurityProfiles.HTTP_BASIC_AUTHN)
-					|| securityProfile.equals(SecurityProfiles.HTTP_DIGEST_AUTHN)) {
-				httpSecurityAuthNRadioButton.setSelected(true);
-			}
-			if (securityProfile.equals(SecurityProfiles.WSSECURITY_USERNAMETOKEN_PLAINTEXTPASSWORD)
-					|| securityProfile
-							.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_PLAINTEXTPASSWORD)) {
-				passwordTypeComboBox.setSelectedItem(PLAINTEXT_PASSWORD);
-			} else if (securityProfile
-					.equals(SecurityProfiles.WSSECURITY_USERNAMETOKEN_DIGESTPASSWORD)
-					|| securityProfile
-							.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_DIGESTPASSWORD)) {
-				passwordTypeComboBox.setSelectedItem(DIGEST_PASSWORD);
-			}
-			if (securityProfile
-					.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_DIGESTPASSWORD)
-					|| securityProfile
-							.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_PLAINTEXTPASSWORD)) {
-				addTimestampCheckBox.setSelected(true);
-			} else {
-				addTimestampCheckBox.setSelected(false);
-			}
-		}
-
-		// Put everything together
-		JPanel layoutPanel = new JPanel(new BorderLayout());
-		layoutPanel.add(titlePanel, BorderLayout.NORTH);
-		layoutPanel.add(mainPanel, BorderLayout.CENTER);
-		layoutPanel.setPreferredSize(new Dimension(550, 400));
-
-		add(layoutPanel);
-	}
-
-	@Override
-	public boolean checkValues() {
-		return true;
-	}
-
-	@Override
-	public void noteConfiguration() {
-
-		if (noSecurityRadioButton.isSelected()) {
-			getJson().remove("securityProfile"); // no security required
-		} else if (httpSecurityAuthNRadioButton.isSelected()) {
-			getJson().put("securityProfile", SecurityProfiles.HTTP_BASIC_AUTHN.toString());
-		} else if (wsSecurityAuthNRadioButton.isSelected()) { // plaintext password
-			if (passwordTypeComboBox.getSelectedItem().equals(PLAINTEXT_PASSWORD)) {
-				if (addTimestampCheckBox.isSelected()) {
-					getJson().put(
-							"securityProfile",
-							SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_PLAINTEXTPASSWORD
-									.toString());
-				} else {
-					getJson().put("securityProfile",
-							SecurityProfiles.WSSECURITY_USERNAMETOKEN_PLAINTEXTPASSWORD.toString());
-				}
-			} else { // digest password
-				if (addTimestampCheckBox.isSelected()) {
-					getJson().put(
-							"securityProfile",
-							SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_DIGESTPASSWORD
-									.toString());
-				} else {
-					getJson().put("securityProfile",
-							SecurityProfiles.WSSECURITY_USERNAMETOKEN_DIGESTPASSWORD.toString());
-				}
-			}
-		}
-	}
-
-	/**
-	 * Disable/enable items on the panel based on this radio button
-	 * has been selected.
-	 */
-	public void itemStateChanged(ItemEvent e) {
-
-		Object source = e.getItemSelectable();
-		if (source == noSecurityRadioButton) {
-			httpSecurityAuthNLabel.setEnabled(false);
-			wsSecurityAuthNLabel.setEnabled(false);
-			passwordTypeComboBox.setEnabled(false);
-			setHttpUsernamePasswordButton.setEnabled(false);
-			setWsdlUsernamePasswordButton.setEnabled(false);
-			addTimestampCheckBox.setEnabled(false);
-
-			noSecurityLabel.setEnabled(true);
-		} else if (source == httpSecurityAuthNRadioButton) {
-			noSecurityLabel.setEnabled(false);
-			httpSecurityAuthNLabel.setEnabled(true);
-			wsSecurityAuthNLabel.setEnabled(false);
-			passwordTypeComboBox.setEnabled(false);
-			setHttpUsernamePasswordButton.setEnabled(true);
-			setWsdlUsernamePasswordButton.setEnabled(false);
-			addTimestampCheckBox.setEnabled(false);
-		} else if (source == wsSecurityAuthNRadioButton) {
-			noSecurityLabel.setEnabled(false);
-			httpSecurityAuthNLabel.setEnabled(false);
-			wsSecurityAuthNLabel.setEnabled(true);
-			passwordTypeComboBox.setEnabled(true);
-			setHttpUsernamePasswordButton.setEnabled(false);
-			setWsdlUsernamePasswordButton.setEnabled(true);
-			addTimestampCheckBox.setEnabled(true);
-		}
-	}
-
-	/**
-	 * A renderer for JComboBox that will display a tooltip for
-	 * the selected item.
-	 */
-	class ComboBoxTooltipRenderer extends BasicComboBoxRenderer {
-		public Component getListCellRendererComponent(JList list, Object value, int index,
-				boolean isSelected, boolean cellHasFocus) {
-			if (isSelected) {
-				setBackground(list.getSelectionBackground());
-				setForeground(list.getSelectionForeground());
-				if (-1 < index) {
-					list.setToolTipText(tooltips[index]);
-				}
-			} else {
-				setBackground(list.getBackground());
-				setForeground(list.getForeground());
-			}
-			setFont(list.getFont());
-			setText((value == null) ? "" : value.toString());
-			return this;
-		}
-	}
-
-	/**
-	 * Adds a light gray or etched border to the top or bottom of a JComponent.
-	 *
-	 * @author David Withers
-	 * @param component
-	 */
-	protected void addDivider(JComponent component, final int position, final boolean etched) {
-		component.setBorder(new Border() {
-			private final Color borderColor = new Color(.6f, .6f, .6f);
-
-			public Insets getBorderInsets(Component c) {
-				if (position == SwingConstants.TOP) {
-					return new Insets(5, 0, 0, 0);
-				} else {
-					return new Insets(0, 0, 5, 0);
-				}
-			}
-
-			public boolean isBorderOpaque() {
-				return false;
-			}
-
-			public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
-				if (position == SwingConstants.TOP) {
-					if (etched) {
-						g.setColor(borderColor);
-						g.drawLine(x, y, x + width, y);
-						g.setColor(Color.WHITE);
-						g.drawLine(x, y + 1, x + width, y + 1);
-					} else {
-						g.setColor(Color.LIGHT_GRAY);
-						g.drawLine(x, y, x + width, y);
-					}
-				} else {
-					if (etched) {
-						g.setColor(borderColor);
-						g.drawLine(x, y + height - 2, x + width, y + height - 2);
-						g.setColor(Color.WHITE);
-						g.drawLine(x, y + height - 1, x + width, y + height - 1);
-					} else {
-						g.setColor(Color.LIGHT_GRAY);
-						g.drawLine(x, y + height - 1, x + width, y + height - 1);
-					}
-				}
-			}
-
-		});
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityContextualView.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityContextualView.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityContextualView.java
deleted file mode 100644
index ac129ec..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityContextualView.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2008 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.views;
-
-import java.awt.BorderLayout;
-import java.awt.FlowLayout;
-import java.awt.Frame;
-
-import javax.swing.Action;
-import javax.swing.JComponent;
-import javax.swing.JPanel;
-
-import net.sf.taverna.t2.activities.wsdl.actions.WSDLActivityConfigureAction;
-import net.sf.taverna.t2.security.credentialmanager.CredentialManager;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-@SuppressWarnings("serial")
-public class WSDLActivityContextualView extends AbstractXMLSplitterActionView {
-
-	private final ActivityIconManager activityIconManager;
-	private final ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private final CredentialManager credentialManager;
-	private final FileManager fileManager;
-
-	public WSDLActivityContextualView(Activity activity, EditManager editManager, FileManager fileManager,
-			SelectionManager selectionManager, ActivityIconManager activityIconManager,
-			ColourManager colourManager, CredentialManager credentialManager,
-			ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		super(activity, editManager, selectionManager, colourManager);
-		this.fileManager = fileManager;
-		this.activityIconManager = activityIconManager;
-		this.credentialManager = credentialManager;
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	/**
-	 * Gets the component from the {@link HTMLBasedActivityContextualView} and adds buttons to it
-	 * allowing XML splitters to be added
-	 */
-	@Override
-	public JComponent getMainFrame() {
-		final JComponent mainFrame = super.getMainFrame();
-		JPanel flowPanel = new JPanel(new FlowLayout());
-
-		addInputSplitter(mainFrame, flowPanel);
-		addOutputSplitter(mainFrame, flowPanel);
-
-		mainFrame.add(flowPanel, BorderLayout.SOUTH);
-		return mainFrame;
-	}
-
-	@Override
-	public String getViewTitle() {
-		return "WSDL-based service";
-	}
-
-	@Override
-	protected String getRawTableRowsHtml() {
-		JsonNode operation = getConfigBean().getJson().get("operation");
-		String summary = "<tr><td>WSDL</td><td>" + operation.get("wsdl").textValue();
-		summary += "</td></tr><tr><td>Operation</td><td>" + operation.get("name").textValue()
-				+ "</td></tr>";
-		boolean securityConfigured = getConfigBean().getJson().has("securityProfile");
-		summary += "<tr><td>Secure</td><td>" + securityConfigured + "</td></tr>";
-		summary += "</tr>";
-		summary += describePorts();
-		return summary;
-	}
-
-	@Override
-	public Action getConfigureAction(Frame owner) {
-		return new WSDLActivityConfigureAction(getActivity(), owner, editManager, fileManager,
-				activityIconManager, serviceDescriptionRegistry, credentialManager);
-	}
-
-	@Override
-	public int getPreferredPosition() {
-		return 100;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityViewFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityViewFactory.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityViewFactory.java
deleted file mode 100644
index b3fb8ed..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityViewFactory.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2008 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.views;
-
-import java.util.Arrays;
-import java.util.List;
-
-import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
-import net.sf.taverna.t2.security.credentialmanager.CredentialManager;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-public class WSDLActivityViewFactory implements ContextualViewFactory<Activity> {
-
-	private EditManager editManager;
-	private ActivityIconManager activityIconManager;
-	private ColourManager colourManager;
-	private SelectionManager selectionManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private CredentialManager credentialManager;
-	private FileManager fileManager;
-
-	public boolean canHandle(Object object) {
-		return object instanceof Activity
-				&& ((Activity) object).getType().equals(WSDLServiceDescription.ACTIVITY_TYPE);
-	}
-
-	public List<ContextualView> getViews(Activity activity) {
-		return Arrays
-				.asList(new ContextualView[] { new WSDLActivityContextualView(activity,
-						editManager, fileManager, selectionManager, activityIconManager, colourManager,
-						credentialManager, serviceDescriptionRegistry) });
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setColourManager(ColourManager colourManager) {
-		this.colourManager = colourManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setCredentialManager(CredentialManager credentialManager) {
-		this.credentialManager = credentialManager;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterContextualView.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterContextualView.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterContextualView.java
deleted file mode 100644
index 228edd4..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterContextualView.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2008 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.views;
-
-import java.awt.BorderLayout;
-import java.awt.FlowLayout;
-
-import javax.swing.JComponent;
-import javax.swing.JPanel;
-
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
-
-import org.apache.log4j.Logger;
-
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-@SuppressWarnings("serial")
-public class XMLSplitterContextualView extends AbstractXMLSplitterActionView {
-
-	public XMLSplitterContextualView(Activity activity,
-			EditManager editManager, SelectionManager selectionManager, ColourManager colourManager) {
-		super(activity, editManager, selectionManager, colourManager);
-	}
-
-	static Logger logger = Logger.getLogger(XMLSplitterContextualView.class);
-
-	/**
-	 * Gets the component from the {@link HTMLBasedActivityContextualView} and adds buttons to it
-	 * allowing XML splitters to be added
-	 */
-	@Override
-	public JComponent getMainFrame() {
-		final JComponent mainFrame = super.getMainFrame();
-		JPanel flowPanel = new JPanel(new FlowLayout());
-
-		addInputSplitter(mainFrame, flowPanel);
-		addOutputSplitter(mainFrame, flowPanel);
-		mainFrame.add(flowPanel, BorderLayout.SOUTH);
-		return mainFrame;
-	}
-
-	@Override
-	public String getViewTitle() {
-		return "XML splitter";
-	}
-
-	@Override
-	protected String getRawTableRowsHtml() {
-		return describePorts();
-	}
-
-	@Override
-	public int getPreferredPosition() {
-		return 100;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterViewFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterViewFactory.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterViewFactory.java
deleted file mode 100644
index d0d5f8f..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterViewFactory.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2008 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.views;
-
-import java.util.Arrays;
-import java.util.List;
-
-import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
-import net.sf.taverna.t2.activities.wsdl.xmlsplitter.XMLInputSplitterActivity;
-import net.sf.taverna.t2.activities.wsdl.xmlsplitter.XMLOutputSplitterActivity;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-public class XMLSplitterViewFactory implements ContextualViewFactory<Activity> {
-
-	private EditManager editManager;
-	private SelectionManager selectionManager;
-	private ColourManager colourManager;
-
-	public boolean canHandle(Object object) {
-
-		return object instanceof Activity
-				&& (((Activity) object).getType().equals(WSDLServiceDescription.INPUT_SPLITTER_TYPE)
-				|| ((Activity) object).getType().equals(WSDLServiceDescription.OUTPUT_SPLITTER_TYPE));
-	}
-
-	public List<ContextualView> getViews(Activity activity) {
-		return Arrays.asList(new ContextualView[] { new XMLSplitterContextualView(activity,
-				editManager, selectionManager, colourManager) });
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-	public void setColourManager(ColourManager colourManager) {
-		this.colourManager = colourManager;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
deleted file mode 100644
index 3bf8341..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceProvider

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
deleted file mode 100644
index 7b0e040..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
+++ /dev/null
@@ -1,5 +0,0 @@
-net.sf.taverna.t2.activities.wsdl.menu.AddXMLInputSplitterForWSDLActivityMenuAction
-net.sf.taverna.t2.activities.wsdl.menu.AddXMLInputSplitterForXMLInputSplitterMenuAction
-net.sf.taverna.t2.activities.wsdl.menu.AddXMLOutputSplitterForWSDLActivityMenuAction
-net.sf.taverna.t2.activities.wsdl.menu.AddXMLOutputSplitterForXMLOutputSplitterMenuAction
-net.sf.taverna.t2.activities.wsdl.menu.ConfigureWSDLMenuAction

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
deleted file mode 100644
index 17d19e3..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
+++ /dev/null
@@ -1,3 +0,0 @@
-net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLActivityIcon
-net.sf.taverna.t2.activities.wsdl.servicedescriptions.XMLInputSplitterActivityIcon
-net.sf.taverna.t2.activities.wsdl.servicedescriptions.XMLOutputSplitterActivityIcon
\ No newline at end of file


[25/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-xpath-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/taverna-xpath-activity-ui/src/test/java/Dom4JTest.java
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity-ui/src/test/java/Dom4JTest.java b/taverna-xpath-activity-ui/src/test/java/Dom4JTest.java
new file mode 100644
index 0000000..6d6efd7
--- /dev/null
+++ b/taverna-xpath-activity-ui/src/test/java/Dom4JTest.java
@@ -0,0 +1,71 @@
+import java.util.List;
+
+import org.dom4j.Document;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Node;
+import org.dom4j.XPath;
+
+
+public class Dom4JTest
+{
+  private static void testDom4j() throws Exception
+  {
+    String strDoc = 
+      "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+      "<services>" +
+        "<parameters>" +
+          "<filters>" +
+          "</filters>" +
+          "<query urlKey=\"q\"></query>" +
+          "<sortBy urlKey=\"sort_by\" urlValue=\"created\">Created at date</sortBy>" +
+          "<sortOrder urlKey=\"sort_order\" urlValue=\"desc\">Descending</sortOrder>" +
+          "<page urlKey=\"page\">1</page>" +
+          "<pageSize urlKey=\"per_page\">10</pageSize>" +
+        "</parameters>" +
+        "<statistics>" +
+          "<pages>170</pages>" +
+          "<results>1695</results>" +
+          "<total>1695</total>" +
+        "</statistics>" +
+        "<results>" +
+          "<services>" +
+            "<service name=\"1\" />" +
+            "<service name=\"2\" />" +
+            "<service name=\"3\" />" +
+            "<service name=\"4\" />" +
+          "</services>" +
+        "</results>" +
+      "</services>";
+    
+    
+    Document doc = DocumentHelper.parseText(strDoc);
+    
+//    // Pretty print the document to System.out
+//    OutputFormat format = OutputFormat.createPrettyPrint();
+//    XMLWriter writer = new XMLWriter( System.out, format );
+//    writer.write( doc );
+
+    
+    XPath expr = DocumentHelper.createXPath("//pages");
+    
+    List<Node> matchingNodes = expr.selectNodes(doc);
+    
+//    List<Node> matchingNodes = doc.selectNodes("/services/parameters");
+    
+    
+//    System.out.println("\n\n");
+    System.out.println(matchingNodes.size());
+    for (Node n : matchingNodes) {
+      System.out.println(n.asXML());
+    }
+  }
+  
+  /**
+   * @param args
+   * @throws Exception 
+   */ 
+  public static void main(String[] args) throws Exception {
+    testDom4j();
+  }
+
+}


[46/50] [abbrv] incubator-taverna-workbench-common-activities git commit: Merge from https://github.com/taverna/taverna-spreadsheet-import-activity-ui master

Posted by st...@apache.org.
Merge from https://github.com/taverna/taverna-spreadsheet-import-activity-ui master


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/912db68b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/912db68b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/912db68b

Branch: refs/heads/master
Commit: 912db68b86fca1d460f458fc634ca65b96c14600
Parents: 6161175 fa8b5b3
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:34:40 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:34:40 2015 +0000

----------------------------------------------------------------------
 taverna-spreadsheet-import-activity-ui/pom.xml  |  107 ++
 ...dsheetImportActivityConfigurationAction.java |   72 ++
 .../il8n/SpreadsheetImportUIText.java           |   46 +
 .../SpreadsheetImportAddTemplateAction.java     |  110 ++
 .../SpreadsheetImportAddTemplateMenuAction.java |  124 ++
 .../SpreadsheetImportConfigureMenuAction.java   |   84 ++
 .../SpreadsheetImportActivityIcon.java          |   71 ++
 .../SpreadsheetImportTemplateService.java       |   95 ++
 .../SpreadsheetImportConfigTableModel.java      |  190 +++
 .../views/SpreadsheetImportConfigView.java      | 1082 ++++++++++++++++++
 .../views/SpreadsheetImportContextualView.java  |  121 ++
 .../SpreadsheetImportContextualViewFactory.java |   87 ++
 ...rvicedescriptions.ServiceDescriptionProvider |    1 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |    3 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |    1 +
 ...ntextualviews.activity.ContextualViewFactory |    1 +
 ...eadsheet-import-activity-ui-context-osgi.xml |   28 +
 .../spreadsheet-import-activity-ui-context.xml  |   45 +
 .../spreadsheet/iln8/ui-text.properties         |   43 +
 .../src/main/resources/spreadsheet-import.png   |  Bin 0 -> 4610 bytes
 20 files changed, 2311 insertions(+)
----------------------------------------------------------------------



[38/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-wsdl-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLInputSplitterAction.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLInputSplitterAction.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLInputSplitterAction.java
new file mode 100644
index 0000000..6faee9d
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLInputSplitterAction.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (C) 2008 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.actions;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.swing.JComponent;
+import javax.swing.JOptionPane;
+import javax.wsdl.WSDLException;
+import javax.xml.parsers.ParserConfigurationException;
+
+import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
+import net.sf.taverna.t2.activities.wsdl.xmlsplitter.AddXMLSplitterEdit;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.wsdl.parser.ArrayTypeDescriptor;
+import net.sf.taverna.wsdl.parser.ComplexTypeDescriptor;
+import net.sf.taverna.wsdl.parser.TypeDescriptor;
+import net.sf.taverna.wsdl.parser.UnknownOperationException;
+import net.sf.taverna.wsdl.parser.WSDLParser;
+import net.sf.taverna.wsdl.xmlsplitter.XMLSplitterSerialisationHelper;
+
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.SAXBuilder;
+import org.xml.sax.SAXException;
+
+import uk.org.taverna.scufl2.api.activity.Activity;
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+
+/**
+ * Pops up a {@link JOptionPane} with the names of all the wsdl ports. The one
+ * that is selected is added as an input splitter to the currently open dataflow
+ * using the {@link AddXMLSplitterEdit}
+ *
+ * @author Ian Dunlop
+ * @author Stian Soiland-Reyes
+ */
+@SuppressWarnings("serial")
+public class AddXMLInputSplitterAction extends AbstractAddXMLSplitterAction {
+
+	public AddXMLInputSplitterAction(Activity activity, JComponent owner, EditManager editManager,
+			SelectionManager selectionManager) {
+		super(activity, owner, editManager, selectionManager);
+		putValue(NAME, "Add input XML splitter");
+	}
+
+	@Override
+	public Map<String, TypeDescriptor> getTypeDescriptors() throws UnknownOperationException, IOException, ParserConfigurationException, WSDLException, SAXException, JDOMException {
+		Map<String, TypeDescriptor> descriptors = new HashMap<String, TypeDescriptor>();
+		Configuration configuration = scufl2Tools.configurationFor(activity, selectionManager.getSelectedProfile());
+		if (activity.getType().equals(WSDLServiceDescription.ACTIVITY_TYPE)) {
+			String wsdlLocation = configuration.getJson().get("operation").get("wsdl").textValue();
+			String operationName = configuration.getJson().get("operation").get("name").textValue();
+			List<TypeDescriptor> inputDescriptors = new WSDLParser(wsdlLocation)
+					.getOperationInputParameters(operationName);
+			for (TypeDescriptor descriptor : inputDescriptors) {
+				descriptors.put(descriptor.getName(), descriptor);
+			}
+		} else if (activity.getType().equals(WSDLServiceDescription.INPUT_SPLITTER_TYPE)) {
+			String wrappedType = configuration.getJson().get("wrappedType").textValue();
+			Element element = new SAXBuilder().build(new StringReader(wrappedType)).getRootElement();
+			TypeDescriptor typeDescriptor = XMLSplitterSerialisationHelper.extensionXMLToTypeDescriptor(element);
+			if (typeDescriptor instanceof ComplexTypeDescriptor) {
+				for (TypeDescriptor desc : ((ComplexTypeDescriptor)typeDescriptor).getElements()) {
+					descriptors.put(desc.getName(), desc);
+				}
+			}
+			else if (typeDescriptor instanceof ArrayTypeDescriptor) {
+				TypeDescriptor desc = ((ArrayTypeDescriptor)typeDescriptor).getElementType();
+				descriptors.put(typeDescriptor.getName(), desc);
+			}
+		}
+		return descriptors;
+	}
+
+	@Override
+	protected boolean isInput() {
+		return true;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLOutputSplitterAction.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLOutputSplitterAction.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLOutputSplitterAction.java
new file mode 100644
index 0000000..60cba69
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLOutputSplitterAction.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (C) 2008 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.actions;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.swing.JComponent;
+import javax.swing.JOptionPane;
+import javax.wsdl.WSDLException;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.SAXBuilder;
+import org.xml.sax.SAXException;
+
+import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
+import net.sf.taverna.t2.activities.wsdl.xmlsplitter.AddXMLSplitterEdit;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.wsdl.parser.ArrayTypeDescriptor;
+import net.sf.taverna.wsdl.parser.ComplexTypeDescriptor;
+import net.sf.taverna.wsdl.parser.TypeDescriptor;
+import net.sf.taverna.wsdl.parser.UnknownOperationException;
+import net.sf.taverna.wsdl.parser.WSDLParser;
+import net.sf.taverna.wsdl.xmlsplitter.XMLSplitterSerialisationHelper;
+import uk.org.taverna.scufl2.api.activity.Activity;
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+
+/**
+ * Pops up a {@link JOptionPane} with the names of all the wsdl ports. The one
+ * that is selected is added as an output splitter to the currently open
+ * dataflow using the {@link AddXMLSplitterEdit}
+ *
+ * @author Ian Dunlop
+ * @author Stian Soiland-Reyes
+ */
+@SuppressWarnings("serial")
+public class AddXMLOutputSplitterAction extends AbstractAddXMLSplitterAction {
+
+	public AddXMLOutputSplitterAction(Activity activity, JComponent owner, EditManager editManager,
+			SelectionManager selectionManager) {
+		super(activity, owner, editManager, selectionManager);
+		putValue(NAME, "Add output XML splitter");
+
+	}
+
+	@Override
+	public Map<String, TypeDescriptor> getTypeDescriptors() throws UnknownOperationException, IOException, ParserConfigurationException, WSDLException, SAXException, JDOMException {
+		Map<String, TypeDescriptor> descriptors = new HashMap<String, TypeDescriptor>();
+		Configuration configuration = scufl2Tools.configurationFor(activity, selectionManager.getSelectedProfile());
+		if (activity.getType().equals(WSDLServiceDescription.ACTIVITY_TYPE)) {
+			String wsdlLocation = configuration.getJson().get("operation").get("wsdl").textValue();
+			String operationName = configuration.getJson().get("operation").get("name").textValue();
+			List<TypeDescriptor> inputDescriptors = new WSDLParser(wsdlLocation)
+					.getOperationOutputParameters(operationName);
+			for (TypeDescriptor descriptor : inputDescriptors) {
+				descriptors.put(descriptor.getName(), descriptor);
+			}
+		} else if (activity.getType().equals(WSDLServiceDescription.OUTPUT_SPLITTER_TYPE)) {
+			String wrappedType = configuration.getJson().get("wrappedType").textValue();
+			Element element = new SAXBuilder().build(new StringReader(wrappedType)).getRootElement();
+			TypeDescriptor typeDescriptor = XMLSplitterSerialisationHelper.extensionXMLToTypeDescriptor(element);
+			if (typeDescriptor instanceof ComplexTypeDescriptor) {
+				for (TypeDescriptor desc : ((ComplexTypeDescriptor) typeDescriptor)
+						.getElements()) {
+					descriptors.put(desc.getName(), desc);
+				}
+			}
+			else if (typeDescriptor instanceof ArrayTypeDescriptor) {
+				TypeDescriptor desc = ((ArrayTypeDescriptor)typeDescriptor).getElementType();
+				descriptors.put(typeDescriptor.getName(), desc);
+			}
+		}
+		return descriptors;
+	}
+
+	@Override
+	protected boolean isInput() {
+		return false;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLSplitterEdit.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLSplitterEdit.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLSplitterEdit.java
new file mode 100644
index 0000000..484feac
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLSplitterEdit.java
@@ -0,0 +1,315 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.actions;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
+import net.sf.taverna.t2.activities.wsdl.xmlsplitter.XMLSplitterConfigurationBeanBuilder;
+import net.sf.taverna.t2.workbench.edits.CompoundEdit;
+import net.sf.taverna.t2.workbench.edits.Edit;
+import net.sf.taverna.t2.workbench.edits.EditException;
+import net.sf.taverna.t2.workflow.edits.AddChildEdit;
+import net.sf.taverna.t2.workflow.edits.AddDataLinkEdit;
+import net.sf.taverna.t2.workflow.edits.AddProcessorEdit;
+import net.sf.taverna.wsdl.parser.ArrayTypeDescriptor;
+import net.sf.taverna.wsdl.parser.TypeDescriptor;
+import net.sf.taverna.wsdl.xmlsplitter.XMLSplitterSerialisationHelper;
+
+import org.jdom.Element;
+
+import uk.org.taverna.scufl2.api.activity.Activity;
+import uk.org.taverna.scufl2.api.common.Scufl2Tools;
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+import uk.org.taverna.scufl2.api.core.DataLink;
+import uk.org.taverna.scufl2.api.core.Processor;
+import uk.org.taverna.scufl2.api.core.Workflow;
+import uk.org.taverna.scufl2.api.iterationstrategy.CrossProduct;
+import uk.org.taverna.scufl2.api.port.InputProcessorPort;
+import uk.org.taverna.scufl2.api.port.OutputProcessorPort;
+import uk.org.taverna.scufl2.api.profiles.ProcessorBinding;
+import uk.org.taverna.scufl2.api.profiles.Profile;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+public class AddXMLSplitterEdit implements Edit<Workflow> {
+
+	public static final URI INPUT_SPLITTER_TYPE = URI
+			.create("http://ns.taverna.org.uk/2010/activity/xml-splitter/in");
+	public static final URI OUTPUT_SPLITTER_TYPE = URI
+			.create("http://ns.taverna.org.uk/2010/activity/xml-splitter/out");
+	public static final URI SPLITTER_CONFIG_TYPE = URI
+			.create("http://ns.taverna.org.uk/2010/activity/xml-splitter#Config");
+
+	private Scufl2Tools scufl2Tools = new Scufl2Tools();
+
+	private final Workflow workflow;
+	private final Profile profile;
+	private final Activity activity;
+	private TypeDescriptor typeDescriptor;
+	private final String portName;
+	private final boolean isInput;
+
+	private CompoundEdit compoundEdit1 = null;
+	private Edit<?> linkUpEdit;
+	private boolean applied = false;
+
+	public AddXMLSplitterEdit(Workflow workflow, Profile profile, Activity activity,
+			TypeDescriptor typeDescriptor, String portName, boolean isInput) {
+		this.workflow = workflow;
+		this.profile = profile;
+		this.activity = activity;
+		this.typeDescriptor = typeDescriptor;
+		this.portName = portName;
+		this.isInput = isInput;
+	}
+
+	@Override
+	public Workflow doEdit() throws EditException {
+		if (applied) {
+			throw new EditException("Edit has already been applied!");
+		}
+
+		Activity splitter = null;
+		Configuration splitterConfiguration = null;
+		String sourcePortName = "";
+		Processor sourceProcessor = null;
+
+		String sinkPortName = "";
+		Processor sinkProcessor = null;
+
+		Processor activityProcessor = null;
+		List<ProcessorBinding> processorBindingsToActivity = scufl2Tools
+				.processorBindingsToActivity(activity);
+		for (ProcessorBinding processorBinding : processorBindingsToActivity) {
+			activityProcessor = processorBinding.getBoundProcessor();
+			break;
+		}
+		if (activityProcessor == null) {
+			throw new EditException("Cannot find the processor that the activity belongs to");
+		}
+
+		String displayName = portName;
+		if (portName.equals("parameters")) {
+			displayName = isInput ? "input" : "output";
+		}
+		String processorName = activityProcessor.getName();
+		String candidateName;
+		if (displayName.startsWith(processorName)) {
+			// No need to make GetRequest_GetRequestResponse
+			candidateName = displayName;
+		} else {
+			// Combine with processor name
+			String displayProcessorName;
+			if (activity.getType().equals(INPUT_SPLITTER_TYPE)
+					|| activity.getType().equals(OUTPUT_SPLITTER_TYPE)) {
+				// For splitters on splitters - avoid adding up blah_bluh_blih_more_stuff
+				String[] processorNameSplit = processorName.replace("_input", "")
+						.replace("_output", "").split("_");
+				displayProcessorName = processorNameSplit[processorNameSplit.length - 1];
+			} else {
+				displayProcessorName = activityProcessor.getName();
+			}
+			candidateName = displayProcessorName + "_" + displayName;
+		}
+
+		Processor splitterProcessor = new Processor();
+		splitterProcessor.setName(candidateName);
+
+		CrossProduct crossProduct = new CrossProduct();
+		crossProduct.setParent(splitterProcessor.getIterationStrategyStack());
+
+		ProcessorBinding processorBinding = new ProcessorBinding();
+		processorBinding.setBoundProcessor(splitterProcessor);
+
+		try {
+			if (activity.getType().equals(INPUT_SPLITTER_TYPE)) {
+				if (!isInput) {
+					throw new EditException(
+							"Can only add an input splitter to another input splitter");
+				}
+				if (typeDescriptor instanceof ArrayTypeDescriptor
+						&& !((ArrayTypeDescriptor) typeDescriptor).isWrapped()) {
+					typeDescriptor = ((ArrayTypeDescriptor) typeDescriptor).getElementType();
+				}
+
+				Element element = XMLSplitterSerialisationHelper
+						.typeDescriptorToExtensionXML(typeDescriptor);
+//				String wrappedType = new XMLOutputter().outputString(element);
+
+				splitter = new Activity();
+				splitter.setType(INPUT_SPLITTER_TYPE);
+				splitterConfiguration = new Configuration();
+				splitterConfiguration.setType(SPLITTER_CONFIG_TYPE);
+				splitterConfiguration.setConfigures(splitter);
+//				((ObjectNode) splitterConfiguration.getJson()).put("wrappedType", wrappedType);
+
+				JsonNode bean = XMLSplitterConfigurationBeanBuilder.buildBeanForInput(element);
+				splitterConfiguration.setJson(bean);
+
+				XMLSplitterPortBuilder.addPortsForInput(element, splitter, splitterProcessor,
+						processorBinding);
+
+			} else if (activity.getType().equals(OUTPUT_SPLITTER_TYPE)) {
+				if (isInput) {
+					throw new EditException(
+							"Can only add an output splitter to another output splitter");
+				}
+				if (typeDescriptor instanceof ArrayTypeDescriptor
+						&& !((ArrayTypeDescriptor) typeDescriptor).isWrapped()) {
+					typeDescriptor = ((ArrayTypeDescriptor) typeDescriptor).getElementType();
+				}
+
+				Element element = XMLSplitterSerialisationHelper
+						.typeDescriptorToExtensionXML(typeDescriptor);
+//				String wrappedType = new XMLOutputter().outputString(element);
+
+				splitter = new Activity();
+				splitter.setType(OUTPUT_SPLITTER_TYPE);
+				splitterConfiguration = new Configuration();
+				splitterConfiguration.setType(SPLITTER_CONFIG_TYPE);
+				splitterConfiguration.setConfigures(splitter);
+//				((ObjectNode) splitterConfiguration.getJson()).put("wrappedType", wrappedType);
+
+				JsonNode bean = XMLSplitterConfigurationBeanBuilder.buildBeanForOutput(element);
+				splitterConfiguration.setJson(bean);
+
+				XMLSplitterPortBuilder.addPortsForOutput(element, splitter, splitterProcessor,
+						processorBinding);
+
+			} else if (activity.getType().equals(WSDLServiceDescription.ACTIVITY_TYPE)) {
+				if (isInput) {
+					Element element = XMLSplitterSerialisationHelper
+							.typeDescriptorToExtensionXML(typeDescriptor);
+//					String wrappedType = new XMLOutputter().outputString(element);
+
+					splitter = new Activity();
+					splitter.setType(WSDLServiceDescription.INPUT_SPLITTER_TYPE);
+					splitterConfiguration = new Configuration();
+					splitterConfiguration.setType(SPLITTER_CONFIG_TYPE);
+					splitterConfiguration.setConfigures(splitter);
+//					((ObjectNode) splitterConfiguration.getJson()).put("wrappedType", wrappedType);
+
+					JsonNode bean = XMLSplitterConfigurationBeanBuilder.buildBeanForInput(element);
+					splitterConfiguration.setJson(bean);
+
+					XMLSplitterPortBuilder.addPortsForInput(element, splitter, splitterProcessor,
+							processorBinding);
+
+				} else {
+					Element element = XMLSplitterSerialisationHelper
+							.typeDescriptorToExtensionXML(typeDescriptor);
+//					String wrappedType = new XMLOutputter().outputString(element);
+
+					splitter = new Activity();
+					splitter.setType(WSDLServiceDescription.OUTPUT_SPLITTER_TYPE);
+					splitterConfiguration = new Configuration();
+					splitterConfiguration.setType(SPLITTER_CONFIG_TYPE);
+					splitterConfiguration.setConfigures(splitter);
+//					((ObjectNode) splitterConfiguration.getJson()).put("wrappedType", wrappedType);
+
+					JsonNode bean = XMLSplitterConfigurationBeanBuilder.buildBeanForOutput(element);
+					splitterConfiguration.setJson(bean);
+
+					XMLSplitterPortBuilder.addPortsForOutput(element, splitter, splitterProcessor,
+							processorBinding);
+				}
+			} else {
+				throw new EditException(
+						"The activity type is not suitable for adding xml processing processors");
+			}
+		} catch (Exception e) {
+			throw new EditException(
+					"An error occured whilst tyring to add an XMLSplitter to the activity:"
+							+ activity, e);
+		}
+
+		if (isInput) {
+			sourcePortName = "output";
+			sinkPortName = portName;
+			sinkProcessor = activityProcessor;
+			sourceProcessor = splitterProcessor;
+		} else {
+			sourcePortName = portName;
+			sinkPortName = "input";
+			sinkProcessor = splitterProcessor;
+			sourceProcessor = activityProcessor;
+		}
+
+		processorBinding.setBoundActivity(splitter);
+
+		List<Edit<?>> editList = new ArrayList<Edit<?>>();
+		editList.add(new AddChildEdit<Profile>(profile, splitter));
+		editList.add(new AddChildEdit<Profile>(profile, splitterConfiguration));
+		editList.add(new AddChildEdit<Profile>(profile, processorBinding));
+		editList.add(new AddProcessorEdit(workflow, splitterProcessor));
+
+		compoundEdit1 = new CompoundEdit(editList);
+		compoundEdit1.doEdit();
+
+		List<Edit<?>> linkUpEditList = new ArrayList<Edit<?>>();
+
+		OutputProcessorPort source = sourceProcessor.getOutputPorts().getByName(sourcePortName);
+		InputProcessorPort sink = sinkProcessor.getInputPorts().getByName(sinkPortName);
+
+		if (source == null)
+			throw new EditException("Unable to find the source port when linking up "
+					+ sourcePortName + " to " + sinkPortName);
+		if (sink == null)
+			throw new EditException("Unable to find the sink port when linking up "
+					+ sourcePortName + " to " + sinkPortName);
+
+		DataLink dataLink = new DataLink();
+		dataLink.setReceivesFrom(source);
+		dataLink.setSendsTo(sink);
+		linkUpEditList.add(new AddDataLinkEdit(workflow, dataLink));
+
+		linkUpEdit = new CompoundEdit(linkUpEditList);
+		linkUpEdit.doEdit();
+		applied = true;
+		return workflow;
+	}
+
+	@Override
+	public void undo() {
+		if (!applied) {
+			throw new RuntimeException("Attempt to undo edit that was never applied");
+		}
+		if (linkUpEdit.isApplied())
+			linkUpEdit.undo();
+		if (compoundEdit1.isApplied())
+			compoundEdit1.undo();
+		applied = false;
+	}
+
+	@Override
+	public boolean isApplied() {
+		return applied;
+	}
+
+	@Override
+	public Object getSubject() {
+		return workflow;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/WSDLActivityConfigureAction.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/WSDLActivityConfigureAction.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/WSDLActivityConfigureAction.java
new file mode 100644
index 0000000..92a8fb6
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/WSDLActivityConfigureAction.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2008 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.actions;
+
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+
+import javax.swing.Action;
+import javax.swing.JDialog;
+
+import net.sf.taverna.t2.activities.wsdl.views.WSDLActivityConfigurationView;
+import net.sf.taverna.t2.security.credentialmanager.CredentialManager;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationPanel;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+@SuppressWarnings("serial")
+public class WSDLActivityConfigureAction extends ActivityConfigurationAction {
+
+	private final EditManager editManager;
+	private final FileManager fileManager;
+	private final CredentialManager credentialManager;
+
+	public WSDLActivityConfigureAction(Activity activity, Frame owner, EditManager editManager,
+			FileManager fileManager, ActivityIconManager activityIconManager,
+			ServiceDescriptionRegistry serviceDescriptionRegistry, CredentialManager credentialManager) {
+		super(activity, activityIconManager, serviceDescriptionRegistry);
+		this.editManager = editManager;
+		this.fileManager = fileManager;
+		this.credentialManager = credentialManager;
+		putValue(Action.NAME, "Configure security");
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		JDialog currentDialog = ActivityConfigurationAction.getDialog(getActivity());
+		if (currentDialog != null) {
+			currentDialog.toFront();
+			return;
+		}
+		final ActivityConfigurationPanel rshellConfigView = new WSDLActivityConfigurationView(
+				getActivity(), credentialManager);
+		final ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(getActivity(),
+				rshellConfigView, editManager);
+
+		ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/XMLSplitterPortBuilder.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/XMLSplitterPortBuilder.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/XMLSplitterPortBuilder.java
new file mode 100644
index 0000000..f41f298
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/XMLSplitterPortBuilder.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.actions;
+
+import net.sf.taverna.wsdl.parser.ArrayTypeDescriptor;
+import net.sf.taverna.wsdl.parser.BaseTypeDescriptor;
+import net.sf.taverna.wsdl.parser.ComplexTypeDescriptor;
+import net.sf.taverna.wsdl.parser.TypeDescriptor;
+import net.sf.taverna.wsdl.xmlsplitter.XMLSplitterSerialisationHelper;
+
+import org.jdom.Element;
+
+import uk.org.taverna.scufl2.api.activity.Activity;
+import uk.org.taverna.scufl2.api.common.NamedSet;
+import uk.org.taverna.scufl2.api.core.Processor;
+import uk.org.taverna.scufl2.api.port.InputActivityPort;
+import uk.org.taverna.scufl2.api.port.InputProcessorPort;
+import uk.org.taverna.scufl2.api.port.OutputActivityPort;
+import uk.org.taverna.scufl2.api.port.OutputProcessorPort;
+import uk.org.taverna.scufl2.api.profiles.ProcessorBinding;
+import uk.org.taverna.scufl2.api.profiles.ProcessorInputPortBinding;
+import uk.org.taverna.scufl2.api.profiles.ProcessorOutputPortBinding;
+
+/**
+ * A helper class to facilitate in building XMLSplitter ports
+ * from the type descriptor XML.
+ *
+ * @author Stuart Owen
+ * @author David Withers
+ */
+public class XMLSplitterPortBuilder {
+
+	public static void addPortsForInput(Element element, Activity activity, Processor processor,
+			ProcessorBinding binding) {
+		TypeDescriptor descriptor = XMLSplitterSerialisationHelper.extensionXMLToTypeDescriptor(element);
+		addOutputPort("output", 0, activity, processor, binding);
+
+		if (descriptor instanceof ComplexTypeDescriptor) {
+			for (TypeDescriptor typeDescriptor : ((ComplexTypeDescriptor) descriptor).getElements()) {
+				addInputPort(typeDescriptor.getName(), depthForDescriptor(typeDescriptor), activity, processor,
+						binding);
+			}
+			NamedSet<InputActivityPort> inputPorts = activity.getInputPorts();
+			for (TypeDescriptor typeDescriptor : ((ComplexTypeDescriptor) descriptor).getAttributes()) {
+				String name = typeDescriptor.getName();
+				if (inputPorts.containsName(name)) {
+					name = "1" + name;
+				}
+				addInputPort(name, depthForDescriptor(typeDescriptor), activity, processor, binding);
+			}
+		} else if (descriptor instanceof ArrayTypeDescriptor) {
+			addInputPort(descriptor.getName(), 1, activity, processor, binding);
+		}
+	}
+
+	public static void addPortsForOutput(Element element, Activity activity, Processor processor,
+			ProcessorBinding binding) {
+		TypeDescriptor descriptor = XMLSplitterSerialisationHelper.extensionXMLToTypeDescriptor(element);
+		addInputPort("input", 0, activity, processor, binding);
+
+		if (descriptor instanceof ComplexTypeDescriptor) {
+			for (TypeDescriptor typeDescriptor : ((ComplexTypeDescriptor) descriptor).getElements()) {
+				addOutputPort(typeDescriptor.getName(), depthForDescriptor(typeDescriptor), activity, processor,
+						binding);
+			}
+			NamedSet<OutputActivityPort> outputPorts = activity.getOutputPorts();
+			for (TypeDescriptor typeDescriptor : ((ComplexTypeDescriptor) descriptor).getAttributes()) {
+				String name = typeDescriptor.getName();
+				if (outputPorts.containsName(name)) {
+					name = "1" + name;
+				}
+				addOutputPort(name, depthForDescriptor(typeDescriptor), activity, processor, binding);
+			}
+		} else if (descriptor instanceof ArrayTypeDescriptor) {
+			addOutputPort(descriptor.getName(), 1, activity, processor, binding);
+		}
+	}
+
+	private static int depthForDescriptor(TypeDescriptor desc) {
+		if (desc instanceof ArrayTypeDescriptor
+				&& (!((ArrayTypeDescriptor) desc).isWrapped() || ((ArrayTypeDescriptor) desc)
+						.getElementType() instanceof BaseTypeDescriptor)) {
+			return 1;
+		} else {
+			return 0;
+		}
+	}
+
+	private static void addOutputPort(String name, int depth, Activity activity,
+			Processor processor, ProcessorBinding binding) {
+		OutputActivityPort activityPort = new OutputActivityPort(activity, name);
+		activityPort.setDepth(depth);
+		activityPort.setGranularDepth(depth);
+		OutputProcessorPort processorPort = new OutputProcessorPort(processor, name);
+		processorPort.setDepth(depth);
+		processorPort.setGranularDepth(depth);
+		new ProcessorOutputPortBinding(binding, activityPort, processorPort);
+	}
+
+	private static void addInputPort(String name, int depth, Activity activity,
+			Processor processor, ProcessorBinding binding) {
+		InputActivityPort activityPort = new InputActivityPort(activity, name);
+		activityPort.setDepth(depth);
+		InputProcessorPort processorPort = new InputProcessorPort(processor, name);
+		processorPort.setDepth(depth);
+		new ProcessorInputPortBinding(binding, processorPort, activityPort);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForWSDLActivityMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForWSDLActivityMenuAction.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForWSDLActivityMenuAction.java
new file mode 100644
index 0000000..a2935e6
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForWSDLActivityMenuAction.java
@@ -0,0 +1,11 @@
+package net.sf.taverna.t2.activities.wsdl.menu;
+
+import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
+
+public class AddXMLInputSplitterForWSDLActivityMenuAction extends AddXMLInputSplitterMenuAction {
+
+	public AddXMLInputSplitterForWSDLActivityMenuAction() {
+		super(WSDLServiceDescription.ACTIVITY_TYPE);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForXMLInputSplitterMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForXMLInputSplitterMenuAction.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForXMLInputSplitterMenuAction.java
new file mode 100644
index 0000000..070c006
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForXMLInputSplitterMenuAction.java
@@ -0,0 +1,11 @@
+package net.sf.taverna.t2.activities.wsdl.menu;
+
+import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
+
+public class AddXMLInputSplitterForXMLInputSplitterMenuAction extends AddXMLInputSplitterMenuAction {
+
+	public AddXMLInputSplitterForXMLInputSplitterMenuAction() {
+		super(WSDLServiceDescription.INPUT_SPLITTER_TYPE);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterMenuAction.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterMenuAction.java
new file mode 100644
index 0000000..60ef904
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterMenuAction.java
@@ -0,0 +1,70 @@
+/**
+ *
+ */
+package net.sf.taverna.t2.activities.wsdl.menu;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.Map;
+
+import javax.swing.Action;
+import javax.wsdl.WSDLException;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.jdom.JDOMException;
+import org.xml.sax.SAXException;
+
+import net.sf.taverna.t2.activities.wsdl.InputPortTypeDescriptorActivity;
+import net.sf.taverna.t2.activities.wsdl.actions.AbstractAddXMLSplitterAction;
+import net.sf.taverna.t2.activities.wsdl.actions.AddXMLInputSplitterAction;
+import net.sf.taverna.t2.ui.menu.ContextualMenuComponent;
+import net.sf.taverna.t2.ui.menu.MenuComponent;
+import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.wsdl.parser.TypeDescriptor;
+import net.sf.taverna.wsdl.parser.UnknownOperationException;
+
+/**
+ * @author alanrw
+ */
+public abstract class AddXMLInputSplitterMenuAction extends AbstractConfigureActivityMenuAction
+		implements MenuComponent, ContextualMenuComponent {
+
+	private static final String ADD_XML_INPUT_SPLITTER = "Add XML Input Splitter";
+	private EditManager editManager;
+	private SelectionManager selectionManager;
+
+	public AddXMLInputSplitterMenuAction(URI activityType) {
+		super(activityType);
+	}
+
+	@Override
+	protected Action createAction() {
+		AddXMLInputSplitterAction configAction = new AddXMLInputSplitterAction(findActivity(),
+				null, editManager, selectionManager);
+		Map<String, TypeDescriptor> descriptors;
+		try {
+			descriptors = configAction.getTypeDescriptors();
+		} catch (UnknownOperationException | IOException | ParserConfigurationException
+				| WSDLException | SAXException | JDOMException e) {
+			return null;
+		}
+		if (!AbstractAddXMLSplitterAction.filterDescriptors(descriptors).isEmpty()) {
+			configAction.putValue(Action.NAME, ADD_XML_INPUT_SPLITTER);
+			addMenuDots(configAction);
+			return configAction;
+		} else {
+			return null;
+		}
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForWSDLActivityMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForWSDLActivityMenuAction.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForWSDLActivityMenuAction.java
new file mode 100644
index 0000000..58b3724
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForWSDLActivityMenuAction.java
@@ -0,0 +1,11 @@
+package net.sf.taverna.t2.activities.wsdl.menu;
+
+import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
+
+public class AddXMLOutputSplitterForWSDLActivityMenuAction extends AddXMLOutputSplitterMenuAction {
+
+	public AddXMLOutputSplitterForWSDLActivityMenuAction() {
+		super(WSDLServiceDescription.ACTIVITY_TYPE);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForXMLOutputSplitterMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForXMLOutputSplitterMenuAction.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForXMLOutputSplitterMenuAction.java
new file mode 100644
index 0000000..129c996
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForXMLOutputSplitterMenuAction.java
@@ -0,0 +1,11 @@
+package net.sf.taverna.t2.activities.wsdl.menu;
+
+import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
+
+public class AddXMLOutputSplitterForXMLOutputSplitterMenuAction extends AddXMLOutputSplitterMenuAction {
+
+	public AddXMLOutputSplitterForXMLOutputSplitterMenuAction() {
+		super(WSDLServiceDescription.OUTPUT_SPLITTER_TYPE);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterMenuAction.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterMenuAction.java
new file mode 100644
index 0000000..33541e6
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterMenuAction.java
@@ -0,0 +1,66 @@
+/**
+ *
+ */
+package net.sf.taverna.t2.activities.wsdl.menu;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.Map;
+
+import javax.swing.Action;
+import javax.wsdl.WSDLException;
+import javax.xml.parsers.ParserConfigurationException;
+
+import net.sf.taverna.t2.activities.wsdl.actions.AbstractAddXMLSplitterAction;
+import net.sf.taverna.t2.activities.wsdl.actions.AddXMLOutputSplitterAction;
+import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.wsdl.parser.TypeDescriptor;
+import net.sf.taverna.wsdl.parser.UnknownOperationException;
+
+import org.jdom.JDOMException;
+import org.xml.sax.SAXException;
+
+/**
+ * @author alanrw
+ */
+public abstract class AddXMLOutputSplitterMenuAction extends AbstractConfigureActivityMenuAction {
+
+	private static final String ADD_XML_OUTPUT_SPLITTER = "Add XML Output Splitter";
+	private EditManager editManager;
+	private SelectionManager selectionManager;
+
+	public AddXMLOutputSplitterMenuAction(URI activityType) {
+		super(activityType);
+	}
+
+	@Override
+	protected Action createAction() {
+		AddXMLOutputSplitterAction configAction = new AddXMLOutputSplitterAction(
+				findActivity(), null, editManager, selectionManager);
+		Map<String, TypeDescriptor> descriptors;
+		try {
+			descriptors = configAction.getTypeDescriptors();
+		} catch (UnknownOperationException | IOException | ParserConfigurationException
+				| WSDLException | SAXException | JDOMException e) {
+			return null;
+		}
+		if (!AbstractAddXMLSplitterAction.filterDescriptors(descriptors).isEmpty()) {
+			configAction.putValue(Action.NAME, ADD_XML_OUTPUT_SPLITTER);
+			addMenuDots(configAction);
+			return configAction;
+		} else {
+			return null;
+		}
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/ConfigureWSDLMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/ConfigureWSDLMenuAction.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/ConfigureWSDLMenuAction.java
new file mode 100644
index 0000000..87e7d0f
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/ConfigureWSDLMenuAction.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.menu;
+
+import javax.swing.Action;
+
+import net.sf.taverna.t2.activities.wsdl.actions.WSDLActivityConfigureAction;
+import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
+import net.sf.taverna.t2.security.credentialmanager.CredentialManager;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.ui.menu.ContextualMenuComponent;
+import net.sf.taverna.t2.ui.menu.MenuComponent;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+
+public class ConfigureWSDLMenuAction extends AbstractConfigureActivityMenuAction implements
+		MenuComponent, ContextualMenuComponent {
+
+	private EditManager editManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private CredentialManager credentialManager;
+	private FileManager fileManager;
+
+	public ConfigureWSDLMenuAction() {
+		super(WSDLServiceDescription.ACTIVITY_TYPE);
+	}
+
+	@Override
+	protected Action createAction() {
+		WSDLActivityConfigureAction configAction = new WSDLActivityConfigureAction(findActivity(),
+				getParentFrame(), editManager, fileManager, activityIconManager,
+				serviceDescriptionRegistry, credentialManager);
+		addMenuDots(configAction);
+		return configAction;
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setCredentialManager(CredentialManager credentialManager) {
+		this.credentialManager = credentialManager;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/AddWSDLServiceDialog.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/AddWSDLServiceDialog.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/AddWSDLServiceDialog.java
new file mode 100644
index 0000000..b2b31ae
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/AddWSDLServiceDialog.java
@@ -0,0 +1,303 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import javax.swing.border.EmptyBorder;
+
+import net.sf.taverna.t2.workbench.MainWindow;
+import net.sf.taverna.t2.workbench.helper.HelpEnabledDialog;
+
+import org.apache.log4j.Logger;
+
+/**
+ * Dialog that lets user specify a URL of a WSDL service they want
+ * to add to the Service Panel. In the case the WSDL URL is behind
+ * HTTPS or service's endpoints require HTTPS it will ask user to confirm
+ * if they want to trust it.
+ *
+ * @author Alex Nenadic
+ *
+ */
+@SuppressWarnings("serial")
+public abstract class AddWSDLServiceDialog extends HelpEnabledDialog {
+
+	private JTextField wsdlLocationField;
+	private Logger logger = Logger.getLogger(AddWSDLServiceDialog.class);
+
+	public AddWSDLServiceDialog()  {
+		super(MainWindow.getMainWindow(), "Add WSDL service", true, null); // create a non-modal dialog
+		initComponents();
+		setLocationRelativeTo(getParent());
+	}
+
+	private void initComponents() {
+		JPanel mainPanel = new JPanel(new GridBagLayout());
+		mainPanel.setBorder(new EmptyBorder(10,10,10,10));
+
+		JLabel wsdlLocatitionLabel = new JLabel("WSDL location",WSDLActivityIcon.getWSDLIcon(), JLabel.LEFT);
+		GridBagConstraints gbc = new GridBagConstraints();
+		gbc.weighty = 0.0;
+
+		gbc.weightx = 0.0;
+		gbc.gridx = 0;
+		gbc.gridy = 0;
+		gbc.fill = GridBagConstraints.NONE;
+		gbc.anchor = GridBagConstraints.WEST;
+		gbc.insets = new Insets(5, 10, 0, 0);
+		mainPanel.add(wsdlLocatitionLabel, gbc);
+
+		wsdlLocationField = new JTextField("http://somehost/service?wsdl");
+		gbc.weightx = 1.0;
+		gbc.gridx = 1;
+		gbc.gridy = 0;
+		gbc.fill = GridBagConstraints.HORIZONTAL;
+		gbc.anchor = GridBagConstraints.WEST;
+		gbc.insets = new Insets(5, 10, 0, 5);
+		mainPanel.add(wsdlLocationField, gbc);
+
+	    final JButton addServiceButton = new JButton("Add");
+	    addServiceButton.addActionListener(new ActionListener()
+	        {
+	            public void actionPerformed(ActionEvent evt)
+	            {
+	                addPressed();
+	            }
+	        });
+
+	    // When user presses "Return" key fire the action on the "Add" button
+	    addServiceButton.addKeyListener(new java.awt.event.KeyAdapter() {
+			public void keyPressed(java.awt.event.KeyEvent evt) {
+				if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
+					addPressed();
+				}
+			}
+		});
+		getRootPane().setDefaultButton(addServiceButton);
+
+        JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
+        buttonsPanel.add(addServiceButton);
+
+        getContentPane().setLayout(new BorderLayout());
+        getContentPane().add(mainPanel, BorderLayout.CENTER);
+        getContentPane().add(buttonsPanel, BorderLayout.SOUTH);
+
+		setSize(getPreferredSize());
+        pack();
+	}
+
+    /**
+     * 'Add service' button pressed or otherwise activated.
+     */
+    private void addPressed()
+    {
+		final String wsdlURLString = wsdlLocationField.getText().trim();
+		new Thread("Adding WSDL " + wsdlURLString) {
+			public void run() {
+				// Only add the service provider for this service if service URL
+				// starts with 'http'
+				// or if it starts with 'https' and user explicitly said they
+				// wanted to trust this service.
+				/*
+				 * if (shouldTrust(wsdlURLString)){ addRegistry(wsdlURLString);
+				 * }
+				 */
+				try {
+					URL url = new URL(wsdlURLString);
+					URLConnection connection = url.openConnection();
+					try {
+						// If the url starts with 'https' - security hook for
+						// https connection's trust manager
+						// will be engaged and user will be asked automatically
+						// if they want
+						// to trust the connection (if it is not already
+						// trusted). If the urls starts with 'http' -
+						// this will not have any effect apart from checking if
+						// we can open a connection.
+						connection.connect(); // if this does not fail - add the
+						// WSDL
+						// service provider for this service to
+						// the registry
+					} finally {
+						try {
+							connection.getInputStream().close();
+						} catch (IOException ex) {
+						}
+					}
+					addRegistry(wsdlURLString);
+				} catch (Exception ex) { // anything failed
+					JOptionPane.showMessageDialog(null,
+							"Could not read the WSDL definition from "
+									+ wsdlURLString + ":\n" + ex,
+							"Could not add WSDL service",
+							JOptionPane.ERROR_MESSAGE);
+
+					logger.error(
+							"Failed to add WSDL service provider for service: "
+									+ wsdlURLString, ex);
+
+				}
+			};
+		}.start();
+		closeDialog();
+    }
+
+    /**
+     * If WSDL service's URL starts with 'https' - asks user
+     * whether to trust it or not. If it starts with 'http' -
+     * does not ask anything as the service is implicitly trusted (weird but true).
+     */
+	protected abstract void addRegistry(String wsdl);
+
+	/**
+	 * Checks if a service is trusted and if not - asks user if they want to trust it.
+	 */
+//	public boolean shouldTrust(String wsdlURLString){
+//		try {
+//			URI wsdlURI = new URI(wsdlURLString);
+//			URL wsdlURL = wsdlURI.toURL();
+//			String protocol = wsdlURL.getProtocol();
+//			if (protocol.toLowerCase().startsWith("https")){
+//				logger.info("Checking if service " + wsdlURLString + " is already trusted.");
+//				// Check if opening an HTTPS connection will cause a SSLHandshakeException.
+//				// This is most probably due to the fact that we do not have this service's
+//				// certificate in Credential Manager's truststore
+//				try {
+//					HttpsURLConnection httpsConnection;
+//					httpsConnection = (HttpsURLConnection) wsdlURL.openConnection();
+//					httpsConnection.connect();
+//					logger.info("HTTPS works out of the box for service " + wsdlURLString);
+//					return true; // Opening HTTPS connection worked - so we trust this service already
+//				}
+//				catch (SSLException sslex) { // most probably due to the fact that service is not trusted, i.e. its certificate is not in Credential Manager's Truststore
+//					logger.info("Service " + wsdlURLString + " is not trusted out of the box. Trying to fetch its certificate.");
+//					logger.info("The SSLException was caused by: " + sslex.getCause());
+//						// Handshake most probably failed as we do not already trust this service -
+//						// fetch its certificate and ask user if they want to add this service as trusted
+//					try {
+//
+//						// This controls SSL socket creation for HTTPS connections
+//						// per thread so the damage of switching off certificates
+//						// verification is limited
+//						ThreadLocalSSLSocketFactory.install();
+//						// switch certificate checking off for a moment so we can fetch
+//						// service's certificate
+//						ThreadLocalSSLSocketFactory.startTrustingEverything();
+//
+//						HttpsURLConnection httpsConnection;
+//						httpsConnection = (HttpsURLConnection) wsdlURL
+//								.openConnection();
+//						httpsConnection.connect();
+//						// Stop being overly trusting
+//						ThreadLocalSSLSocketFactory.stopTrustingEverything();
+//						Certificate[] certificates = httpsConnection
+//								.getServerCertificates();
+//						logger.info("Need to ask user if they want to trust service " + wsdlURLString);
+//						// Ask user if they want to trust this service
+//						ConfirmTrustedCertificateDialog confirmCertTrustDialog = new ConfirmTrustedCertificateDialog(
+//								this, "Untrusted HTTPS connection", true,
+//								(X509Certificate) certificates[0]);
+//						confirmCertTrustDialog.setLocationRelativeTo(null);
+//						confirmCertTrustDialog.setVisible(true);
+//						boolean shouldTrust = confirmCertTrustDialog
+//								.shouldTrust();
+//						if (shouldTrust) {
+//							try {
+//								CredentialManager credManager = CredentialManager
+//										.getInstance();
+//								credManager
+//										.saveTrustedCertificate((X509Certificate) certificates[0]);
+//								return true;
+//							} catch (CMException cme) {
+//								logger
+//										.error(
+//												"Failed to add WSDL service provider for service: "
+//														+ wsdlURLString
+//														+ " . Credential Manager failed to "
+//														+ "save trusted certificate.",
+//												cme);
+//								return false;
+//							}
+//						} else {
+//							// Do not even add a WSDL service provider for this
+//							// service and tell user the service will not be
+//							// added to Service Panel
+//							JOptionPane
+//									.showMessageDialog(
+//											this,
+//											"As you refused to trust it, the service will not be added to Service Panel.",
+//											"Add WSDL service",
+//											JOptionPane.INFORMATION_MESSAGE);
+//							return false;
+//						}
+//					} catch (Exception e1) {
+//						logger
+//								.error(
+//										"Failed to add WSDL service provider for service: "
+//												+ wsdlURLString
+//												+ ". 'Trust everyone' HTTPS connection failed.",
+//										e1);
+//						return false;
+//					} finally {// switch it off here as well if some unexpected exception occurred
+//						ThreadLocalSSLSocketFactory.stopTrustingEverything();
+//					}
+//
+//				} catch (Exception e2) {
+//					logger.error("Failed to add WSDL service provider for service: "+ wsdlURLString+". Connecting to service failed.", e2);
+//					return false;
+//				}
+//			}
+//			else{ // protocol starts with 'http'
+//				return true;
+//			}
+//		} catch (MalformedURLException e3) {
+//			logger.error("Failed to add WSDL service provider: URL "+ wsdlURLString+" was malformed.", e3);
+//			return false;
+//		} catch (URISyntaxException e4) {
+//			logger.error("Failed to add WSDL service provider: URI "+ wsdlURLString+" could not be parsed.", e4);
+//			return false;
+//		}
+//	}
+
+	/**
+	 * Closes the dialog.
+	 */
+	private void closeDialog() {
+		setVisible(false);
+		dispose();
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/ConfirmTrustedCertificateDialog.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/ConfirmTrustedCertificateDialog.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/ConfirmTrustedCertificateDialog.java
new file mode 100644
index 0000000..bc58aad
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/ConfirmTrustedCertificateDialog.java
@@ -0,0 +1,586 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester   
+ * 
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ * 
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *    
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *    
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dialog;
+import java.awt.FlowLayout;
+import java.awt.Frame;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.Font;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.math.BigInteger;
+import java.util.HashMap;
+
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.EtchedBorder;
+import javax.swing.JSeparator;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.CertificateEncodingException;
+import java.security.cert.X509Certificate;
+import javax.security.auth.x500.X500Principal;
+
+import net.sf.taverna.t2.lang.ui.DialogTextArea;
+import net.sf.taverna.t2.security.credentialmanager.CMException;
+import net.sf.taverna.t2.security.credentialmanager.CMUtils;
+import net.sf.taverna.t2.workbench.helper.HelpEnabledDialog;
+
+import org.apache.log4j.Logger;
+import org.bouncycastle.asn1.ASN1OctetString;
+import org.bouncycastle.asn1.DERBitString;
+import org.bouncycastle.asn1.DEROctetString;
+import org.bouncycastle.asn1.misc.NetscapeCertType;
+
+/**
+ * Displays the details of a X.509 certificate and asks user if they want to
+ * trust it.
+ * 
+ * @author Alex Nenadic
+ */
+@SuppressWarnings("serial")
+public class ConfirmTrustedCertificateDialog extends HelpEnabledDialog {
+	
+	private static Logger logger = Logger.getLogger(ConfirmTrustedCertificateDialog.class);
+
+	// Stores certificate to display
+	private X509Certificate cert;
+
+	// Stores user's decision as whether to trust this service's certificaet or not.
+	private boolean shouldTrust;
+
+	/**
+	 * Creates new ConfirmTrustedCertificateDialog where parent is a Frame.
+	 */
+	public ConfirmTrustedCertificateDialog(Frame parent, String title,
+			boolean modal, X509Certificate crt)
+			throws CMException {
+		super(parent, title, modal, null);
+		this.cert = crt;
+		initComponents();
+	}
+	
+	/**
+	 * Creates new ConfirmTrustedCertificateDialog where parent is a Dialog.
+	 */
+	public ConfirmTrustedCertificateDialog(Dialog parent, String title,
+			boolean modal, X509Certificate crt)
+			throws CMException {
+		super(parent, title, modal, null);
+		this.cert = crt;
+		initComponents();
+	}
+
+	/**
+	 * Initialise the dialog's GUI components.
+	 */
+	private void initComponents(){
+		
+		// title panel
+		JPanel titlePanel = new JPanel(new BorderLayout());
+		titlePanel.setBackground(Color.WHITE);
+		JLabel titleLabel = new JLabel("View service's certificate");
+		titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 13.5f));
+		titleLabel.setBorder(new EmptyBorder(10, 10, 0, 10));
+		DialogTextArea titleMessage = new DialogTextArea("This service requires HTTPS connection and has identified itself with the certificate below.\n" +
+				"Do you want to trust this service? (Refusing to trust means you will not be able to invoke it from a workflow.)");
+		titleMessage.setMargin(new Insets(5, 20, 10, 10));
+		titleMessage.setFont(titleMessage.getFont().deriveFont(11f));
+		titleMessage.setEditable(false);
+		titleMessage.setFocusable(false);
+		titlePanel.setBorder( new EmptyBorder(10, 10, 0, 10));
+		titlePanel.add(titleLabel, BorderLayout.NORTH);
+		titlePanel.add(titleMessage, BorderLayout.CENTER);
+		
+		// Certificate details:
+
+		// Grid Bag Constraints templates for labels (column 1) and
+		// values (column 2) of certificate details
+		GridBagConstraints gbcLabel = new GridBagConstraints();
+		gbcLabel.gridx = 0;
+		gbcLabel.ipadx = 20;
+		gbcLabel.gridwidth = 1;
+		gbcLabel.gridheight = 1;
+		gbcLabel.insets = new Insets(2, 15, 2, 2);
+		gbcLabel.anchor = GridBagConstraints.LINE_START;
+
+		GridBagConstraints gbcValue = new GridBagConstraints();
+		gbcValue.gridx = 1;
+		gbcValue.gridwidth = 1;
+		gbcValue.gridheight = 1;
+		gbcValue.insets = new Insets(2, 5, 2, 2);
+		gbcValue.anchor = GridBagConstraints.LINE_START;
+
+		// Netscape Certificate Type non-critical extension (if any)
+		// defines the intended uses of the certificate - to make it look like
+		// firefox's view certificate dialog
+		byte[] intendedUses = cert.getExtensionValue("2.16.840.1.113730.1.1"); // Netscape Certificate Type OID
+		JLabel jlIntendedUses = null;
+		JTextField jtfIntendedUsesValue = null;
+		JPanel jpUses = null;
+		GridBagConstraints gbc_jpUses = null;
+		if (intendedUses != null) {
+			jlIntendedUses = new JLabel(
+					"This certificate has been approved for the following uses:");
+			jlIntendedUses.setFont(new Font(null, Font.BOLD, 11));
+			jlIntendedUses.setBorder(new EmptyBorder(5, 5, 5, 5));
+
+			jtfIntendedUsesValue = new JTextField(45);
+			jtfIntendedUsesValue.setText(getIntendedUses(intendedUses));
+			jtfIntendedUsesValue.setEditable(false);
+			jtfIntendedUsesValue.setFont(new Font(null, Font.PLAIN, 11));
+
+			jpUses = new JPanel(new BorderLayout());
+			jpUses.add(jlIntendedUses, BorderLayout.NORTH);
+			jpUses.add(jtfIntendedUsesValue, BorderLayout.CENTER);
+			JSeparator jsp = new JSeparator(JSeparator.HORIZONTAL);
+			jpUses.add(jsp, BorderLayout.SOUTH);
+
+			gbc_jpUses = (GridBagConstraints) gbcLabel.clone();
+			gbc_jpUses.gridy = 0;
+			gbc_jpUses.gridwidth = 2; // takes two columns
+			gbc_jpUses.insets = new Insets(5, 5, 5, 5);// has slightly bigger insets
+		}
+
+		// Issued To
+		JLabel jlIssuedTo = new JLabel("Issued To");
+		jlIssuedTo.setFont(new Font(null, Font.BOLD, 11));
+		GridBagConstraints gbc_jlIssuedTo = (GridBagConstraints) gbcLabel
+				.clone();
+		gbc_jlIssuedTo.gridy = 1;
+		gbc_jlIssuedTo.gridwidth = 2; // takes two columns
+		gbc_jlIssuedTo.insets = new Insets(5, 5, 5, 5);// has slightly bigger insets
+		// Distinguished Name (DN)
+		String sDN = cert.getSubjectX500Principal().getName(
+				X500Principal.RFC2253);
+		CMUtils util = new CMUtils();
+		util.parseDN(sDN);
+		// Extract the CN, O, OU and EMAILADDRESS fields
+		String sCN = util.getCN();
+		String sOrg = util.getO();
+		String sOU = util.getOU();
+		// String sEMAILADDRESS = CMX509Util.getEmilAddress();
+		// Common Name (CN)
+		JLabel jlCN = new JLabel("Common Name (CN)");
+		jlCN.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlCN = (GridBagConstraints) gbcLabel.clone();
+		gbc_jlCN.gridy = 2;
+		JLabel jlCNValue = new JLabel(sCN);
+		jlCNValue.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlCNValue = (GridBagConstraints) gbcValue
+				.clone();
+		gbc_jlCNValue.gridy = 2;
+		// Organisation (O)
+		JLabel jlOrg = new JLabel("Organisation (O)");
+		jlOrg.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlOrg = (GridBagConstraints) gbcLabel.clone();
+		gbc_jlOrg.gridy = 3;
+		JLabel jlOrgValue = new JLabel(sOrg);
+		jlOrgValue.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlOrgValue = (GridBagConstraints) gbcValue
+				.clone();
+		gbc_jlOrgValue.gridy = 3;
+		// Organisation Unit (OU)
+		JLabel jlOU = new JLabel("Organisation Unit (OU)");
+		jlOU.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlOU = (GridBagConstraints) gbcLabel.clone();
+		gbc_jlOU.gridy = 4;
+		JLabel jlOUValue = new JLabel(sOU);
+		jlOUValue.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlOUValue = (GridBagConstraints) gbcValue
+				.clone();
+		gbc_jlOUValue.gridy = 4;
+		// E-mail Address
+		// JLabel jlEmail = new JLabel("E-mail Address");
+		// jlEmail.setFont(new Font(null, Font.PLAIN, 11));
+		// GridBagConstraints gbc_jlEmail = (GridBagConstraints)
+		// gbcLabel.clone();
+		// gbc_jlEmail.gridy = 5;
+		// JLabel jlEmailValue = new JLabel(sEMAILADDRESS);
+		// jlEmailValue.setFont(new Font(null, Font.PLAIN, 11));
+		// GridBagConstraints gbc_jlEmailValue = (GridBagConstraints)
+		// gbcValue.clone();
+		// gbc_jlEmailValue.gridy = 5;
+		// Serial Number
+		JLabel jlSN = new JLabel("Serial Number");
+		jlSN.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlSN = (GridBagConstraints) gbcLabel.clone();
+		gbc_jlSN.gridy = 6;
+		JLabel jlSNValue = new JLabel();
+		// Get the hexadecimal serial number
+		StringBuffer strBuff = new StringBuffer(new BigInteger(1, cert
+				.getSerialNumber().toByteArray()).toString(16).toUpperCase());
+		// Place colons at every two hexadecimal characters
+		if (strBuff.length() > 2) {
+			for (int iCnt = 2; iCnt < strBuff.length(); iCnt += 3) {
+				strBuff.insert(iCnt, ':');
+			}
+		}
+		jlSNValue.setText(strBuff.toString());
+		jlSNValue.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlSNValue = (GridBagConstraints) gbcValue
+				.clone();
+		gbc_jlSNValue.gridy = 6;
+		// Version
+		JLabel jlVersion = new JLabel("Version");
+		jlVersion.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlVersion = (GridBagConstraints) gbcLabel
+				.clone();
+		gbc_jlVersion.gridy = 7;
+		JLabel jlVersionValue = new JLabel(Integer.toString(cert.getVersion()));
+		jlVersionValue.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlVersionValue = (GridBagConstraints) gbcValue
+				.clone();
+		gbc_jlVersionValue.gridy = 7;
+
+		// Issued By
+		JLabel jlIssuedBy = new JLabel("Issued By");
+		jlIssuedBy.setFont(new Font(null, Font.BOLD, 11));
+		GridBagConstraints gbc_jlIssuedBy = (GridBagConstraints) gbcLabel
+				.clone();
+		gbc_jlIssuedBy.gridy = 8;
+		gbc_jlIssuedBy.gridwidth = 2; // takes two columns
+		gbc_jlIssuedBy.insets = new Insets(5, 5, 5, 5);// has slightly bigger
+														// insets
+		// Distinguished Name (DN)
+		String iDN = cert.getIssuerX500Principal().getName(
+				X500Principal.RFC2253);
+		util.parseDN(iDN);
+		// Extract the CN, O and OU fields
+		String iCN = util.getCN();
+		String iOrg = util.getO();
+		String iOU = util.getOU();
+		// Common Name (CN)
+		JLabel jlICN = new JLabel("Common Name (CN)");
+		jlICN.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlICN = (GridBagConstraints) gbcLabel.clone();
+		gbc_jlICN.gridy = 9;
+		JLabel jlICNValue = new JLabel(iCN);
+		jlICNValue.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlICNValue = (GridBagConstraints) gbcValue
+				.clone();
+		gbc_jlICNValue.gridy = 9;
+		// Organisation (O)
+		JLabel jlIOrg = new JLabel("Organisation (O)");
+		jlIOrg.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlIOrg = (GridBagConstraints) gbcLabel.clone();
+		gbc_jlIOrg.gridy = 10;
+		JLabel jlIOrgValue = new JLabel(iOrg);
+		jlIOrgValue.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlIOrgValue = (GridBagConstraints) gbcValue
+				.clone();
+		gbc_jlIOrgValue.gridy = 10;
+		// Organisation Unit (OU)
+		JLabel jlIOU = new JLabel("Organisation Unit (OU)");
+		jlIOU.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlIOU = (GridBagConstraints) gbcLabel.clone();
+		gbc_jlIOU.gridy = 11;
+		JLabel jlIOUValue = new JLabel(iOU);
+		jlIOUValue.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlIOUValue = (GridBagConstraints) gbcValue
+				.clone();
+		gbc_jlIOUValue.gridy = 11;
+		// Validity
+		JLabel jlValidity = new JLabel("Validity");
+		jlValidity.setFont(new Font(null, Font.BOLD, 11));
+		GridBagConstraints gbc_jlValidity = (GridBagConstraints) gbcLabel
+				.clone();
+		gbc_jlValidity.gridy = 12;
+		gbc_jlValidity.gridwidth = 2; // takes two columns
+		gbc_jlValidity.insets = new Insets(5, 5, 5, 5);// has slightly bigger
+														// insets
+		// Issued On
+		JLabel jlIssuedOn = new JLabel("Issued On");
+		jlIssuedOn.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlIssuedOn = (GridBagConstraints) gbcLabel
+				.clone();
+		gbc_jlIssuedOn.gridy = 13;
+		JLabel jlIssuedOnValue = new JLabel(cert.getNotBefore().toString());
+		jlIssuedOnValue.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlIssuedOnValue = (GridBagConstraints) gbcValue
+				.clone();
+		gbc_jlIssuedOnValue.gridy = 13;
+		// Expires On
+		JLabel jlExpiresOn = new JLabel("Expires On");
+		jlExpiresOn.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlExpiresOn = (GridBagConstraints) gbcLabel
+				.clone();
+		gbc_jlExpiresOn.gridy = 14;
+		JLabel jlExpiresOnValue = new JLabel(cert.getNotAfter().toString());
+		jlExpiresOnValue.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlExpiresOnValue = (GridBagConstraints) gbcValue
+				.clone();
+		gbc_jlExpiresOnValue.gridy = 14;
+
+		// Fingerprints
+		byte[] bCert = new byte[0];
+		try {
+			bCert = cert.getEncoded();
+		} catch (CertificateEncodingException ex) {
+			logger.error("Could not get the encoded form of the certificate.", ex);
+		}
+		JLabel jlFingerprints = new JLabel("Fingerprints");
+		jlFingerprints.setFont(new Font(null, Font.BOLD, 11));
+		GridBagConstraints gbc_jlFingerprints = (GridBagConstraints) gbcLabel
+				.clone();
+		gbc_jlFingerprints.gridy = 15;
+		gbc_jlFingerprints.gridwidth = 2; // takes two columns
+		gbc_jlFingerprints.insets = new Insets(5, 5, 5, 5);// has slightly
+															// bigger insets
+		// SHA-1 Fingerprint
+		JLabel jlSHA1Fingerprint = new JLabel("SHA1 Fingerprint");
+		jlSHA1Fingerprint.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlSHA1Fingerprint = (GridBagConstraints) gbcLabel
+				.clone();
+		gbc_jlSHA1Fingerprint.gridy = 16;
+		JLabel jlSHA1FingerprintValue = new JLabel(getMessageDigest(bCert,
+				"SHA1"));
+		jlSHA1FingerprintValue.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlSHA1FingerprintValue = (GridBagConstraints) gbcValue
+				.clone();
+		gbc_jlSHA1FingerprintValue.gridy = 16;
+		// MD5 Fingerprint
+		JLabel jlMD5Fingerprint = new JLabel("MD5 Fingerprint");
+		jlMD5Fingerprint.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlMD5Fingerprint = (GridBagConstraints) gbcLabel
+				.clone();
+		gbc_jlMD5Fingerprint.gridy = 17;
+		JLabel jlMD5FingerprintValue = new JLabel(
+				getMessageDigest(bCert, "MD5"));
+		jlMD5FingerprintValue.setFont(new Font(null, Font.PLAIN, 11));
+		GridBagConstraints gbc_jlMD5FingerprintValue = (GridBagConstraints) gbcValue
+				.clone();
+		gbc_jlMD5FingerprintValue.gridy = 17;
+
+		// Empty label to add a bit space at the bottom of the panel
+		// to make it look like firefox's view certificate dialog
+		JLabel jlEmpty = new JLabel("");
+		GridBagConstraints gbc_jlEmpty = (GridBagConstraints) gbcLabel.clone();
+		gbc_jlEmpty.gridy = 18;
+		gbc_jlEmpty.gridwidth = 2; // takes two columns
+		gbc_jlEmpty.ipady = 40;
+
+		JPanel jpCertificate = new JPanel(new GridBagLayout());
+		jpCertificate.setBorder(new CompoundBorder(new EmptyBorder(15, 15, 15,
+				15), new EtchedBorder()));
+
+		if (intendedUses != null) {
+			jpCertificate.add(jpUses, gbc_jpUses);
+		}
+		jpCertificate.add(jlIssuedTo, gbc_jlIssuedTo); // Issued To
+		jpCertificate.add(jlCN, gbc_jlCN);
+		jpCertificate.add(jlCNValue, gbc_jlCNValue);
+		jpCertificate.add(jlOrg, gbc_jlOrg);
+		jpCertificate.add(jlOrgValue, gbc_jlOrgValue);
+		jpCertificate.add(jlOU, gbc_jlOU);
+		jpCertificate.add(jlOUValue, gbc_jlOUValue);
+		// jpCertificate.add(jlEmail, gbc_jlEmail);
+		// jpCertificate.add(jlEmailValue, gbc_jlEmailValue);
+		jpCertificate.add(jlSN, gbc_jlSN);
+		jpCertificate.add(jlSNValue, gbc_jlSNValue);
+		jpCertificate.add(jlVersion, gbc_jlVersion);
+		jpCertificate.add(jlVersionValue, gbc_jlVersionValue);
+		jpCertificate.add(jlIssuedBy, gbc_jlIssuedBy); // Issued By
+		jpCertificate.add(jlICN, gbc_jlICN);
+		jpCertificate.add(jlICNValue, gbc_jlICNValue);
+		jpCertificate.add(jlIOrg, gbc_jlIOrg);
+		jpCertificate.add(jlIOrgValue, gbc_jlIOrgValue);
+		jpCertificate.add(jlIOU, gbc_jlIOU);
+		jpCertificate.add(jlIOUValue, gbc_jlIOUValue);
+		jpCertificate.add(jlValidity, gbc_jlValidity); // Validity
+		jpCertificate.add(jlIssuedOn, gbc_jlIssuedOn);
+		jpCertificate.add(jlIssuedOnValue, gbc_jlIssuedOnValue);
+		jpCertificate.add(jlExpiresOn, gbc_jlExpiresOn);
+		jpCertificate.add(jlExpiresOnValue, gbc_jlExpiresOnValue);
+		jpCertificate.add(jlFingerprints, gbc_jlFingerprints); // Fingerprints
+		jpCertificate.add(jlSHA1Fingerprint, gbc_jlSHA1Fingerprint);
+		jpCertificate.add(jlSHA1FingerprintValue, gbc_jlSHA1FingerprintValue);
+		jpCertificate.add(jlMD5Fingerprint, gbc_jlMD5Fingerprint);
+		jpCertificate.add(jlMD5FingerprintValue, gbc_jlMD5FingerprintValue);
+		jpCertificate.add(jlEmpty, gbc_jlEmpty); // Empty label to get some vertical space on the frame
+
+		// OK button
+		JPanel jpButtons = new JPanel(new FlowLayout(FlowLayout.CENTER));
+
+		final JButton jbTrust = new JButton("Trust");
+		jbTrust.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent evt) {
+				trustPressed();
+			}
+		});
+		final JButton jbDontTrust = new JButton("Do not trust");
+		jbDontTrust.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent evt) {
+				dontTrustPressed();
+			}
+		});
+
+		jpButtons.add(jbTrust);
+		jpButtons.add(jbDontTrust);
+
+		// Put it all together
+		getContentPane().add(titlePanel, BorderLayout.NORTH);
+		getContentPane().add(jpCertificate, BorderLayout.CENTER);
+		getContentPane().add(jpButtons, BorderLayout.SOUTH);
+
+		// Resizing wreaks havoc
+		setResizable(false);
+
+		addWindowListener(new WindowAdapter() {
+			public void windowClosing(WindowEvent evt) {
+				closeDialog();
+			}
+		});
+
+		getRootPane().setDefaultButton(jbTrust);
+
+		pack();
+	}
+
+	/**
+	 * Get the digest of a message as a formatted String.
+	 * 
+	 * @param bMessage
+	 *            The message to digest
+	 * @param digestType
+	 *            The message digest algorithm
+	 * @return The message digest
+	 */
+	public static String getMessageDigest(byte[] bMessage, String digestType) {
+		// Create message digest object using the supplied algorithm
+		MessageDigest messageDigest;
+		try {
+			messageDigest = MessageDigest.getInstance(digestType);
+		} catch (NoSuchAlgorithmException ex) {
+			logger.error("Failed to create message digest.", ex);
+			return "";
+		}
+
+		// Create raw message digest
+		byte[] bFingerPrint = messageDigest.digest(bMessage);
+
+		// Place the raw message digest into a StringBuffer as a Hex number
+		StringBuffer strBuff = new StringBuffer(new BigInteger(1, bFingerPrint)
+				.toString(16).toUpperCase());
+
+		// Odd number of characters so add in a padding "0"
+		if ((strBuff.length() % 2) != 0) {
+			strBuff.insert(0, '0');
+		}
+
+		// Place colons at every two hex characters
+		if (strBuff.length() > 2) {
+			for (int iCnt = 2; iCnt < strBuff.length(); iCnt += 3) {
+				strBuff.insert(iCnt, ':');
+			}
+		}
+
+		// Return the formatted message digest
+		return strBuff.toString();
+	}
+
+	/**
+	 * Gets the intended certificate uses, i.e. Netscape Certificate Type
+	 * extension (2.16.840.1.113730.1.1) value as a string
+	 * 
+	 * @param value
+	 *            Extension value as a DER-encoded OCTET string
+	 * @return Extension value as a string
+	 */
+	private String getIntendedUses(byte[] value) {
+
+		// Netscape Certificate Types (2.16.840.1.113730.1.1)
+		int[] INTENDED_USES = new int[] { NetscapeCertType.sslClient,
+				NetscapeCertType.sslServer, NetscapeCertType.smime,
+				NetscapeCertType.objectSigning, NetscapeCertType.reserved,
+				NetscapeCertType.sslCA, NetscapeCertType.smimeCA,
+				NetscapeCertType.objectSigningCA, };
+
+		// Netscape Certificate Type strings (2.16.840.1.113730.1.1)
+		HashMap<String, String> INTENDED_USES_STRINGS = new HashMap<String, String>();
+		INTENDED_USES_STRINGS.put("128", "SSL Client");
+		INTENDED_USES_STRINGS.put("64", "SSL Server");
+		INTENDED_USES_STRINGS.put("32", "S/MIME");
+		INTENDED_USES_STRINGS.put("16", "Object Signing");
+		INTENDED_USES_STRINGS.put("8", "Reserved");
+		INTENDED_USES_STRINGS.put("4", "SSL CA");
+		INTENDED_USES_STRINGS.put("2", "S/MIME CA");
+		INTENDED_USES_STRINGS.put("1", "Object Signing CA");
+
+		// Get octet string from extension value
+		ASN1OctetString fromByteArray = new DEROctetString(value);
+		byte[] octets = fromByteArray.getOctets();
+		DERBitString fromByteArray2 = new DERBitString(octets);
+		int val = new NetscapeCertType(fromByteArray2).intValue();
+		StringBuffer strBuff = new StringBuffer();
+		for (int i = 0, len = INTENDED_USES.length; i < len; i++) {
+			int use = INTENDED_USES[i];
+			if ((val & use) == use) {
+				strBuff.append(INTENDED_USES_STRINGS.get(String.valueOf(use))
+						+ ", \n");
+			}
+		}
+		// remove the last ", \n" from the end of the buffer
+		String str = strBuff.toString();
+		str = str.substring(0, str.length() - 3);
+		return str;
+	}
+
+	/**
+	 * 'Trust' button pressed.
+	 */
+	private void trustPressed() {
+		shouldTrust = true;
+		closeDialog();
+	}
+
+	/**
+	 * 'Do not trust' button pressed.
+	 */
+	private void dontTrustPressed() {
+		shouldTrust = false;
+		closeDialog();
+	}	
+	
+	/**
+	 * Closes the dialog.
+	 */
+	public void closeDialog() {
+		setVisible(false);
+		dispose();
+	}
+
+	public boolean shouldTrust() {
+		return shouldTrust;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLActivityIcon.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLActivityIcon.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLActivityIcon.java
new file mode 100644
index 0000000..79f8ccd
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLActivityIcon.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
+
+import java.net.URI;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
+
+/**
+ *
+ * @author Alex Nenadic
+ * @author alanrw
+ *
+ */
+public class WSDLActivityIcon implements ActivityIconSPI {
+
+	private static Icon icon;
+
+	public int canProvideIconScore(URI activityType) {
+		if (activityType.equals(WSDLServiceDescription.ACTIVITY_TYPE))
+			return DEFAULT_ICON + 1;
+		else
+			return NO_ICON;
+	}
+
+	public Icon getIcon(URI activityType) {
+		return getWSDLIcon();
+	}
+
+	public static Icon getWSDLIcon() {
+		if (icon == null) {
+			icon = new ImageIcon(WSDLActivityIcon.class.getResource("/wsdl.png"));
+		}
+		return icon;
+	}
+}
+
+
+


[05/50] [abbrv] incubator-taverna-workbench-common-activities git commit: Travis

Posted by st...@apache.org.
Travis


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/f039ec3a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/f039ec3a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/f039ec3a

Branch: refs/heads/master
Commit: f039ec3af1e690727e111d0f948ed215d42c912c
Parents: b9eb67c
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Authored: Wed Oct 15 09:13:04 2014 +0100
Committer: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Committed: Wed Oct 15 09:13:04 2014 +0100

----------------------------------------------------------------------
 README.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/f039ec3a/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index c3a5ace..fa84f7e 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
 Taverna Workflow system Local Worker Activity: User Interface part for use in the Taverna Workbench.
 
+[![Build Status](https://travis-ci.org/taverna/taverna-localworker-activity-ui.svg?branch=master)](https://travis-ci.org/taverna/taverna-localworker-activity-ui)
+
 Extends https://github.com/taverna/taverna-localworker-activity
 
-This code was previously hosted at http://taverna.googlecode.com/svn/taverna/ui/net.sf.taverna.t2.ui-activities/
\ No newline at end of file
+This code was previously hosted at http://taverna.googlecode.com/svn/taverna/ui/net.sf.taverna.t2.ui-activities/


[02/50] [abbrv] incubator-taverna-workbench-common-activities git commit: ${jackson-databind.version}

Posted by st...@apache.org.
${jackson-databind.version}


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/4091a907
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/4091a907
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/4091a907

Branch: refs/heads/master
Commit: 4091a907f85f278d725287a5e8b172161e1c47b5
Parents: f8adc46
Author: Christian-B <br...@cs.man.ac.uk>
Authored: Tue Sep 23 17:11:28 2014 +0100
Committer: Christian-B <br...@cs.man.ac.uk>
Committed: Tue Sep 23 17:11:28 2014 +0100

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/4091a907/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3f713cc..1672ebf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,7 +69,7 @@
 		<dependency>
 			<groupId>com.fasterxml.jackson.core</groupId>
 			<artifactId>jackson-databind</artifactId>
-			<version>2.2.2</version>
+			<version>${jackson-databind.version}</version>
 		</dependency>
 
 		<dependency>


[28/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-xpath-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTree.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTree.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTree.java
deleted file mode 100644
index 4f98851..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTree.java
+++ /dev/null
@@ -1,572 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.config.xmltree;
-
-import java.awt.Component;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import javax.swing.JLabel;
-import javax.swing.JMenuItem;
-import javax.swing.JPopupMenu;
-import javax.swing.JTree;
-import javax.swing.event.TreeSelectionListener;
-import javax.swing.text.Position;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeCellRenderer;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreePath;
-
-import net.sf.taverna.t2.activities.xpath.ui.config.XPathActivityConfigurationPanel;
-import net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathActivityIcon;
-
-import org.dom4j.Attribute;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.DocumentHelper;
-import org.dom4j.Element;
-import org.dom4j.Namespace;
-import org.dom4j.QName;
-import org.dom4j.XPath;
-
-
-/**
- * 
- * @author Sergejs Aleksejevs
- */
-public class XPathActivityXMLTree extends JTree
-{
-  private XPathActivityXMLTree instanceOfSelf;
-  private XPathActivityXMLTreeRenderer treeRenderer;
-  
-  private JPopupMenu contextualMenu;
-  
-  private TreeSelectionListener[] allSelectionListeners;
-  private XPathActivityXMLTreeSelectionHandler xmlTreeSelectionHandler;
-  
-  /**
-   * 
-   */
-  private XPathActivityConfigurationPanel parentConfigPanel;
-
-  private Document documentUsedToPopulateTree;
-  
-  /**
-   *  holds value of the current XPath expression obtained from 
-   *  the combination of nodes selected in the XML tree 
-   */
-  private XPath currentXPathExpression;
-  
-  private Map<String,String> currentXPathNamespaces;
-  
-  
-  
-  private XPathActivityXMLTree(XPathActivityXMLTreeNode root, Document documentUsedToPopulateTree, 
-      boolean bIncludeElementValues, boolean bIncludeElementNamespaces, XPathActivityConfigurationPanel parentConfigPanel)
-  {
-    super(root);
-    
-    this.instanceOfSelf = this;
-    this.allSelectionListeners = new TreeSelectionListener[0];
-    
-    this.parentConfigPanel = parentConfigPanel;
-    
-    this.documentUsedToPopulateTree = documentUsedToPopulateTree;
-    this.currentXPathExpression = null;
-    this.currentXPathNamespaces = new HashMap<String,String>();
-    this.prepopulateNamespaceMap();
-    
-    
-    // custom renderer of the nodes in the XML tree
-    this.treeRenderer = new XPathActivityXMLTreeRenderer(bIncludeElementValues, bIncludeElementNamespaces);
-    this.setCellRenderer(treeRenderer);
-    
-    
-    // add listener to handle various selections of nodes in the tree 
-    this.xmlTreeSelectionHandler = new XPathActivityXMLTreeSelectionHandler(parentConfigPanel, this);
-    this.addTreeSelectionListener(xmlTreeSelectionHandler);
-    
-    
-    // --- CONTEXTUAL MENU FOR EXPANDING / COLLAPSING THE TREE ---
-    
-    // create popup menu for expanding / collapsing all nodes in the tree
-    JMenuItem miExpandAll = new JMenuItem("Expand all", XPathActivityIcon.getIconById(XPathActivityIcon.XML_TREE_EXPAND_ALL_ICON));
-    miExpandAll.setToolTipText("Expand all nodes in the filtering tree");
-    miExpandAll.addActionListener(new ActionListener() {
-      public void actionPerformed(ActionEvent e) {
-        for (int i = 0; i < getRowCount(); i++) {
-          instanceOfSelf.expandRow(i);
-        }
-      }
-    });
-    JMenuItem miCollapseAll = new JMenuItem("Collapse all", XPathActivityIcon.getIconById(XPathActivityIcon.XML_TREE_COLLAPSE_ALL_ICON));
-    miCollapseAll.setToolTipText("Collapse all expanded nodes in the filtering tree");
-    miCollapseAll.addActionListener(new ActionListener() {
-      public void actionPerformed(ActionEvent e) {
-        for (int i = getRowCount() - 1; i >= 0; i--) {
-          instanceOfSelf.collapseRow(i);
-        }
-      }
-    });
-    
-    // populate the popup menu with created menu items
-    contextualMenu = new JPopupMenu();
-    contextualMenu.add(miExpandAll);
-    contextualMenu.add(miCollapseAll);
-    
-    // mouse events may cause the contextual menu to be shown - adding a listener
-    this.addMouseListener(new MouseAdapter()
-    {
-      public void mousePressed(MouseEvent e) {
-        if (e.isPopupTrigger()) {
-          contextualMenu.show(instanceOfSelf, e.getX(), e.getY());
-        }
-      }
-      public void mouseReleased(MouseEvent e) {
-        if (e.isPopupTrigger()) {
-          // another way a popup menu may be called on different systems
-          contextualMenu.show(instanceOfSelf, e.getX(), e.getY());
-        }
-      }
-    });
-    
-  }
-  
-  
-  /**
-   * Pre-populates namespace map with the namespaced declared in the root
-   * node of the XML document, which was used to populate the tree.
-   */
-  private void prepopulateNamespaceMap()
-  {
-    Document doc = this.getDocumentUsedToPopulateTree();
-    Element root = doc.getRootElement();
-    
-    // get opening tag of the root node
-    String rootAsXML = root.asXML().substring(0, root.asXML().indexOf(">"));
-    
-    // split the opening tag into tokens (all attributes are separated by a space)
-    String[] rootTokens = rootAsXML.split(" ");
-    
-    // for each attribute check if that's a namespace declaration
-    for (String token : rootTokens) {
-      if (token.startsWith("xmlns"))
-      {
-        String[] namespacePrefixAndURI = token.split("=");
-        
-        // a prefix is either given explicitly, or an empty one will be used
-        String prefix = namespacePrefixAndURI[0].indexOf(":") == -1 ?
-                        "" :
-                        namespacePrefixAndURI[0].split(":")[1];
-        
-        // URI is the value of the XML attribute, so need to strip out surrounding quotes
-        String URI = namespacePrefixAndURI[1].replaceAll("\"", "");
-        
-        // now add the details of the current namespace to the map
-        this.addNamespaceToXPathMap(new Namespace(prefix, URI));
-      }
-    }
-  }
-
-
-  protected XPathActivityConfigurationPanel getParentConfigPanel() {
-    return parentConfigPanel;
-  }
-  
-  public XPathActivityXMLTreeSelectionHandler getXMLTreeSelectionHandler() {
-    return xmlTreeSelectionHandler;
-  }
-  
-  public Document getDocumentUsedToPopulateTree() {
-    return documentUsedToPopulateTree;
-  }
-  
-  public XPath getCurrentXPathExpression() {
-    return currentXPathExpression;
-  }
-  protected void setCurrentXPathExpression(XPath xpathExpression) {
-    this.currentXPathExpression = xpathExpression;
-  }
-  
-  
-  public Map<String,String> getCurrentXPathNamespaces() {
-    return currentXPathNamespaces;
-  }
-  
-  
-  
-  protected void removeAllSelectionListeners()
-  {
-    this.allSelectionListeners = this.getTreeSelectionListeners();
-    for (TreeSelectionListener listener : this.allSelectionListeners) {
-      this.removeTreeSelectionListener(listener);
-    }
-  }
-  
-  protected void restoreAllSelectionListeners()
-  {
-    for (TreeSelectionListener listener : this.allSelectionListeners) {
-      this.addTreeSelectionListener(listener);
-    }
-  }
-  
-  
-  
-  /**
-   * Creates an instance of the XML tree from provided XML data.
-   * 
-   * @param xmlData XML document in the form of a <code>String</code> to
-   *        derive the tree from.
-   * @param bIncludeAttributesIntoTree
-   * @param bIncludeValuesIntoTree
-   * @param bIncludeElementNamespacesIntoTree
-   * @param parentConfigPanel
-   * @return
-   * @throws DocumentException if <code>xmlData</code> does not
-   *                           contain a valid XML document. 
-   * 
-   */
-  public static XPathActivityXMLTree createFromXMLData(String xmlData, boolean bIncludeAttributesIntoTree,
-                   boolean bIncludeValuesIntoTree, boolean bIncludeElementNamespacesIntoTree,
-                   XPathActivityConfigurationPanel parentConfigPanel) throws DocumentException
-  {
-    // ----- XML DOCUMENT PARSING -----
-    // try to parse the XML document - the next line will throw an exception if
-    // the document is not well-formed; proceed otherwise
-    Document doc = DocumentHelper.parseText(xmlData);
-    Element rootElement = doc.getRootElement();
-    
-    
-    // ----- POPULATE XML TREE -----
-    XPathActivityXMLTreeElementNode rootNode = new XPathActivityXMLTreeElementNode(rootElement);
-    populate(rootNode, rootElement, bIncludeAttributesIntoTree);
-    
-    return (new XPathActivityXMLTree(rootNode, doc, bIncludeValuesIntoTree, bIncludeElementNamespacesIntoTree, parentConfigPanel));
-  }
-  
-  
-  /**
-   * Worker method for populating the tree recursively from a list of Elements.
-   * 
-   * @param node
-   * @param element
-   */
-  private static void populate(DefaultMutableTreeNode node, Element element,
-                               boolean bIncludeAttributesIntoTree)
-  {
-    Iterator<Element> elementIterator = element.elements().iterator();
-    while (elementIterator.hasNext()) {
-      Element childElement = elementIterator.next();
-      XPathActivityXMLTreeElementNode childNode = new XPathActivityXMLTreeElementNode(childElement);
-      node.add(childNode);
-      
-      // recursively repeat for all children of the current child element
-      populate(childNode, childElement, bIncludeAttributesIntoTree);
-    }
-    
-    
-    // add attributes of the element as its children, if necessary
-    if (bIncludeAttributesIntoTree) {
-      List<Attribute> attributes = element.attributes();
-      for (Attribute attribute : attributes) {
-        node.add(new XPathActivityXMLTreeAttributeNode(attribute));
-      }
-    }
-  }
-  
-  
-  // ---------------- RESPONDING TO REQUESTS TO CHANGE APPEARANCE OF EXISTING TREE -----------------
-  
-  /**
-   * NB! May be inefficient, as this solution re-generates the whole tree from
-   *     stored XML document and replaces the root node of itself with a newly
-   *     generated root node (that will be populated with updated children,
-   *     according to the new values of options).
-   *  
-   *     However, this is a simple solution that will work for now.
-   * 
-   * @param bIncludeAttributes
-   * @param bIncludeValues
-   * @param bIncludeNamespaces
-   */
-  public void refreshFromExistingDocument(boolean bIncludeAttributes, boolean bIncludeValues, boolean bIncludeNamespaces)
-  {
-    this.setEnabled(false);
-    removeAllSelectionListeners();
-    
-    // store expansion and selection state of the XML tree
-    // see documentation for restoreExpandedPaths() for more details
-    //
-    // stored paths to expanded nodes are quite reliable, as paths are recorded;
-    // stored selected rows are less reliable, as only indices are kept -- however,
-    // the tree is re-created from the same document, so ordering/number of nodes
-    // cannot change (apart from attributes that may be added / removed - the attributes
-    // appear after other child nodes of some node in the tree, therefore only their
-    // selection could be affected)
-    HashMap<String,ArrayList<String>> toExpand = new HashMap<String,ArrayList<String>>();
-    ArrayList<Integer> toSelect = new ArrayList<Integer>();
-    for( int i = 1; i < this.getRowCount(); i++) {
-      if( this.isExpanded(i) ) {
-        TreePath path = this.getPathForRow(i);
-        String parentPath = path.getParentPath().toString();
-        ArrayList<String> values = toExpand.get(parentPath);
-        if(values == null) {
-          values = new ArrayList<String>();
-        }
-        values.add(path.getLastPathComponent().toString());
-        toExpand.put(parentPath, values);
-      }
-      if (this.isRowSelected(i)) {
-        toSelect.add(i);
-      }
-    }
-    
-    
-    // update presentation options
-    this.treeRenderer.setIncludeElementValues(bIncludeValues);
-    this.treeRenderer.setIncludeElementNamespaces(bIncludeNamespaces);
-    
-    // re-create the root node of the tree and replace the old one with it
-    Element rootElement = this.documentUsedToPopulateTree.getRootElement();
-    XPathActivityXMLTreeNode newRootNode = new XPathActivityXMLTreeElementNode(rootElement);
-    populate(newRootNode, rootElement, bIncludeAttributes);
-    ((DefaultTreeModel)this.getModel()).setRoot(newRootNode);
-    
-    
-    // restore previous state of the tree from saved values
-    restoreExpandedPaths(toExpand, this.getPathForRow(0));
-    restoreSelectedPaths(toSelect);
-    
-    this.restoreAllSelectionListeners();
-    this.setEnabled(true);
-  }
-  
-  
-  /**
-   * This method can only reliably work when the tree is re-generated from the same
-   * XML document, so that number / order of nodes would not change.
-   * 
-   * @param toSelect List of indices of rows to re-select after tree was re-generated.
-   */
-  private void restoreSelectedPaths(ArrayList<Integer> toSelect)
-  {
-    if (toSelect == null || toSelect.isEmpty()) return;
-    
-    // something definitely needs to be selected, so include root element into selection
-    this.addSelectionRow(0);
-    
-    // select all stored rows
-    for (Integer value : toSelect) {
-      this.addSelectionRow(value);
-    }
-  }
-
-
-
-  /**
-   * Taken from: <a href="http://java.itags.org/java-core-gui-apis/58504/">http://java.itags.org/java-core-gui-apis/58504/</a>
-   * 
-   * This method recursively expands all previously stored paths.
-   * Works under assumption that the name of the root node did not change.
-   * Otherwise, it can handle changed structure of the tree.
-   * 
-   * To achieve its goal, it cannot simply use stored TreePath from your the original tree,
-   * since the paths are invalid after the tree is refreshed. Instead, a HashMap which links
-   * a String representation of the parent tree path to all expanded child node names is used.
-   * 
-   * @param toExpand Map which links a String representation of the parent tree path to all
-   *                 expanded child node names is used.
-   * @param rootPath Path to root node.
-   */
-  void restoreExpandedPaths(HashMap<String,ArrayList<String>> toExpand, TreePath rootPath)
-  {
-    ArrayList<String> values = toExpand.remove(rootPath.toString());
-    if (values == null) return;
-    
-    int row = this.getRowForPath(rootPath);
-    for (String value : values)
-    {
-      TreePath nextMatch = this.getNextMatch(value, row, Position.Bias.Forward);
-      this.expandPath(nextMatch);
-      if (toExpand.containsKey(nextMatch.toString())) {
-        restoreExpandedPaths(toExpand, nextMatch);
-      }
-    }
-  }
-  
-  
-  
-  // ---------------- TREE SELECTION MODEL + XPath GENERATION -----------------
-  
-  
-  protected String generateXPathFromTreePath(TreePath path)
-  {
-    StringBuilder xpath = new StringBuilder();
-    
-    for (String leg : generateXPathFromTreePathAsLegList(path)) {
-      xpath.append(leg);
-    }
-    
-    return (xpath.toString());
-  }
-  
-  
-  protected List<String> generateXPathFromTreePathAsLegList(TreePath path)
-  {
-    List<String> pathLegs = new LinkedList<String>();
-    
-    TreePath parentPath = path;
-    for (int i = 0; i < path.getPathCount(); i++)
-    {
-      XPathActivityXMLTreeNode lastXMLTreeNodeInThisPath = (XPathActivityXMLTreeNode)parentPath.getLastPathComponent();
-      pathLegs.add(0, this.getXMLTreeNodeEffectiveQualifiedNameAsXPathLeg(lastXMLTreeNodeInThisPath));
-      
-      parentPath = parentPath.getParentPath();
-    }
-    
-    return (pathLegs);
-  }
-  
-  
-  protected String getXMLTreeNodeEffectiveQualifiedNameAsXPathLeg(XPathActivityXMLTreeNode node)
-  {
-    QName qname = node.getNodeQName();
-    String effectiveNamespacePrefix = addNamespaceToXPathMap(qname.getNamespace());
-    
-    return("/" +
-           (node.isAttribute() ? "@" : "") +
-           (effectiveNamespacePrefix.length() > 0 ? (effectiveNamespacePrefix + ":") : "") +
-           qname.getName());
-  }
-  
-  
-  
-  private String addNamespaceToXPathMap(Namespace namespace) 
-  {
-    // EMTPY PREFIX
-    if (namespace.getPrefix().length() == 0) {
-      if (namespace.getURI().length() == 0) {
-        // DEFAULT NAMESPACE with no URI - nothing to worry about
-        return "";
-      }
-      else {
-        // DEFAULT NAMESPACE WITH NO PREFIX, BUT URI IS KNOWN
-        return (addNamespaceToXPathMap(new Namespace("default", namespace.getURI())));
-      }
-    }
-    
-    // NEW NON-EMPTY PREFIX
-    if (!this.currentXPathNamespaces.containsKey(namespace.getPrefix())) {
-      this.currentXPathNamespaces.put(namespace.getPrefix(), namespace.getURI());
-      return (namespace.getPrefix());
-    }
-    
-    // EXISTING NON-EMPTY PREFIX AND THE SAME URI - NO NEED TO ADD AGAIN
-    else if (this.currentXPathNamespaces.get(namespace.getPrefix()).equals(namespace.getURI())) {
-      return (namespace.getPrefix());
-    }
-    
-    // EXISTING NON-EMPTY PREFIX, BUT DIFFERENT URI
-    else {
-      String repeatedPrefix = namespace.getPrefix();
-      
-      int i = 0;
-      while (this.currentXPathNamespaces.containsKey(repeatedPrefix + i)) {
-        // check if current alternative prefix wasn't yet applied to current URI
-        if (this.currentXPathNamespaces.get(repeatedPrefix + i).equals(namespace.getURI())) {
-          return (repeatedPrefix + i);
-        }
-        else {
-          // still another URI for the same prefix, keep trying to increase the ID in the prefix
-          i++;
-        }
-      }
-      
-      String modifiedPrefix = repeatedPrefix + i;
-      this.currentXPathNamespaces.put(modifiedPrefix, namespace.getURI());
-      return (modifiedPrefix);
-    }
-  }
-  
-  
-  // ----------------------- Tree Cell Renderer --------------------------
-  
-  /**
-   * 
-   * @author Sergejs Aleksejevs
-   */
-  private class XPathActivityXMLTreeRenderer extends DefaultTreeCellRenderer
-  {
-    private boolean bIncludeElementValues;
-    private boolean bIncludeElementNamespaces;
-    
-    public XPathActivityXMLTreeRenderer(boolean bIncludeElementValues, boolean bIncludeElementNamespaces) {
-      super();
-      this.bIncludeElementValues = bIncludeElementValues;
-      this.bIncludeElementNamespaces = bIncludeElementNamespaces;
-    }
-    
-    
-    public boolean getIncludeElementValues() {
-      return bIncludeElementValues;
-    }
-    public void setIncludeElementValues(boolean bIncludeElementValues) {
-      this.bIncludeElementValues = bIncludeElementValues;
-    }
-    
-    public boolean getIncludeElementNamespaces() {
-      return bIncludeElementNamespaces;
-    }
-    public void setIncludeElementNamespaces(boolean bIncludeElementNamespaces) {
-      this.bIncludeElementNamespaces = bIncludeElementNamespaces;
-    }
-    
-    
-    public Component getTreeCellRendererComponent(JTree tree, Object value,
-        boolean selected, boolean expanded, boolean leaf, int row,
-        boolean hasFocus)
-    {
-      // obtain the default rendering, we'll then customize it
-      Component defaultRendering = super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
-      
-      // it is most likely that the default rendering will be a JLabel, check just to be safe
-      if (defaultRendering instanceof JLabel)
-      {
-        JLabel defaultRenderedLabel = ((JLabel)defaultRendering);
-        
-        // ---------- CHOOSE APPROPRIATE ICON FOR THE NODE ------------
-        if (row == 0) {
-          // set the icon for the XML tree root node
-          defaultRenderedLabel.setIcon(XPathActivityIcon.getIconById(XPathActivityIcon.XML_TREE_ROOT_ICON));
-        }
-        else {
-          // set the icon for the XML tree node
-          if (value instanceof XPathActivityXMLTreeNode && 
-              ((XPathActivityXMLTreeNode)value).isAttribute())
-          {
-            defaultRenderedLabel.setIcon(XPathActivityIcon.getIconById(XPathActivityIcon.XML_TREE_ATTRIBUTE_ICON));
-          }
-          else {
-            defaultRenderedLabel.setIcon(XPathActivityIcon.getIconById(XPathActivityIcon.XML_TREE_NODE_ICON));
-          }
-        }
-        
-        
-        // ----------- CHOOSE THE DISPLAY TITLE FOR THE NODE ------------
-        if (value instanceof XPathActivityXMLTreeNode) {
-          defaultRenderedLabel.setText(((XPathActivityXMLTreeNode)value).getTreeNodeDisplayLabel(
-              this.bIncludeElementValues, this.bIncludeElementNamespaces, true));
-        }
-      }
-      
-      return (defaultRendering);
-    }
-    
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeAttributeNode.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeAttributeNode.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeAttributeNode.java
deleted file mode 100644
index d22623f..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeAttributeNode.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.config.xmltree;
-
-import org.dom4j.Attribute;
-
-/**
- * 
- * @author Sergejs Aleksejevs
- */
-public class XPathActivityXMLTreeAttributeNode extends XPathActivityXMLTreeNode
-{
-  private Attribute associatedAttribute;
-  
-  public XPathActivityXMLTreeAttributeNode(Attribute associatedAttribute) {
-    super(associatedAttribute, true);
-    this.associatedAttribute = associatedAttribute;
-  }
-  
-  public Attribute getAssociatedAttribute() {
-    return associatedAttribute;
-  }
-  
-  public String getTreeNodeDisplayLabel(boolean bIncludeValue, boolean bUseStyling)
-  {
-    StringBuilder label = new StringBuilder();
-    
-    // add qualified attribute name (possibly) with styling
-    label.append((bUseStyling ? "<font color=\"purple\">" : "") +
-                 this.associatedAttribute.getQualifiedName() +
-                 (bUseStyling ? "</font>" : ""));
-    
-    // add attribute value
-    if (bIncludeValue)
-    {
-      String attributeTextValue = this.associatedAttribute.getText();
-      
-      if (attributeTextValue != null && attributeTextValue.length() > 0) {
-        label.append((bUseStyling ? "<font color=\"gray\"> - </font><font color=\"green\">" : "") +
-                     truncateElementTextValue(stripAllHTML(attributeTextValue)) +
-                     (bUseStyling ? "</font>" : ""));
-      }
-    }
-    
-    if (bUseStyling) {
-      label.insert(0, "<html>");
-      label.append("</html>");
-    }
-    
-    return (label.toString());
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeElementNode.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeElementNode.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeElementNode.java
deleted file mode 100644
index a151753..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeElementNode.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.config.xmltree;
-
-import org.dom4j.Element;
-import org.dom4j.Namespace;
-
-
-/**
- * 
- * @author Sergejs Aleksejevs
- */
-public class XPathActivityXMLTreeElementNode extends XPathActivityXMLTreeNode
-{
-  private Element associatedElement;
-  
-  public XPathActivityXMLTreeElementNode(Element associatedElement) {
-    super(associatedElement, false);
-    this.associatedElement = associatedElement;
-  }
-  
-  public Element getAssociatedElement() {
-    return associatedElement;
-  }
-  
-  public String getTreeNodeDisplayLabel(boolean bIncludeValue, boolean bIncludeNamespace, boolean bUseStyling)
-  {
-    StringBuilder label = new StringBuilder();
-    
-    // add qualified element name
-    label.append(this.associatedElement.getQualifiedName());
-    
-    // add element namespace
-    if (bIncludeNamespace)
-    {
-      Namespace ns = this.associatedElement.getNamespace();
-      
-      label.append((bUseStyling ? "<font color=\"gray\">" : "") +
-          " - xmlns" + (ns.getPrefix().length() > 0 ? (":" + ns.getPrefix()) : "") + "=\"" + 
-          this.associatedElement.getNamespaceURI() +
-          (bUseStyling ? "\"</font>" : ""));
-    }
-    
-    // add element value
-    if (bIncludeValue)
-    {
-      String elementTextValue = this.associatedElement.getTextTrim();
-      
-      if (elementTextValue != null && elementTextValue.length() > 0) {
-        label.append((bUseStyling ? "<font color=\"gray\"> - </font><font color=\"blue\">" : "") +
-                     truncateElementTextValue(stripAllHTML(elementTextValue)) +
-                     (bUseStyling ? "</font>" : ""));
-      }
-    }
-    
-    if (bUseStyling) {
-      label.insert(0, "<html>");
-      label.append("</html>");
-    }
-    
-    return (label.toString());
-  }
-  
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeNode.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeNode.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeNode.java
deleted file mode 100644
index d1e98f7..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeNode.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.config.xmltree;
-
-import javax.swing.tree.DefaultMutableTreeNode;
-
-import org.dom4j.QName;
-
-
-/**
- * 
- * @author Sergejs Aleksejevs
- */
-public abstract class XPathActivityXMLTreeNode extends DefaultMutableTreeNode
-{
-  protected static final int DISPLAY_LABEL_MAX_LENGTH = 200;
-  
-  private final boolean isAttribute;
-
-  public XPathActivityXMLTreeNode(Object userObject, boolean isAttribute)
-  {
-    super(userObject);
-    this.isAttribute = isAttribute;
-  }
-  
-  public boolean isAttribute() {
-    return (isAttribute);
-  }
-  
-  
-  public QName getNodeQName() {
-    if (this.isAttribute()) {
-      return (((XPathActivityXMLTreeAttributeNode)this).getAssociatedAttribute().getQName());
-    }
-    else {
-      return (((XPathActivityXMLTreeElementNode)this).getAssociatedElement().getQName());
-    }
-  }
-  
-  
-  public String getTreeNodeDisplayLabel(boolean bIncludeValue, boolean bIncludeElementNamespace, boolean bUseStyling)
-  {
-    if (this.isAttribute()) {
-      return (((XPathActivityXMLTreeAttributeNode)this).getTreeNodeDisplayLabel(bIncludeValue, bUseStyling));
-    }
-    else {
-      return (((XPathActivityXMLTreeElementNode)this).getTreeNodeDisplayLabel(bIncludeValue, bIncludeElementNamespace, bUseStyling));
-    }
-  }
-  
-  
-  protected String truncateElementTextValue(String textValue)
-  {
-    if (textValue != null && textValue.length() > DISPLAY_LABEL_MAX_LENGTH) {
-      textValue = textValue.substring(0, DISPLAY_LABEL_MAX_LENGTH) + "(...)";
-    }
-    return (textValue);
-  }
-  
-  
-  /**
-   * Tiny helper to strip out all HTML tags. This will not leave any HTML tags
-   * at all (so that the content can be displayed in DialogTextArea - and the
-   * like - components. This helps to present HTML content inside JAVA easier.
-   */
-  public static String stripAllHTML(String source) {
-        // don't do anything if not string is provided
-        if (source == null)
-          return ("");
-
-        // need to preserve at least all line breaks
-        // (ending and starting paragraph also make a line break)
-        source = source.replaceAll("</p>[\r\n]*<p>", "<br>");
-        source = source.replaceAll("\\<br/?\\>", "\n\n");
-
-        // strip all HTML
-        source = source.replaceAll("\\<.*?\\>", ""); // any HTML tags
-        source = source.replaceAll("&\\w{1,4};", ""); // this is for things like "&nbsp;", "&gt;", etc
-
-        return (source);
-  }
-  
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeSelectionHandler.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeSelectionHandler.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeSelectionHandler.java
deleted file mode 100644
index 389bf1a..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/config/xmltree/XPathActivityXMLTreeSelectionHandler.java
+++ /dev/null
@@ -1,251 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.config.xmltree;
-
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-
-import javax.swing.JOptionPane;
-import javax.swing.event.TreeSelectionEvent;
-import javax.swing.event.TreeSelectionListener;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeNode;
-import javax.swing.tree.TreePath;
-
-import net.sf.taverna.t2.activities.xpath.ui.config.XPathActivityConfigurationPanel;
-
-import org.dom4j.DocumentHelper;
-
-
-/**
- * 
- * @author Sergejs Aleksejevs
- */
-public class XPathActivityXMLTreeSelectionHandler implements TreeSelectionListener
-{
-  private final XPathActivityXMLTree theTree;
-  private final XPathActivityConfigurationPanel parentConfigPanel;
-
-
-  public XPathActivityXMLTreeSelectionHandler(XPathActivityConfigurationPanel parentConfigPanel,
-                  XPathActivityXMLTree tree)
-  {
-    this.parentConfigPanel = parentConfigPanel;
-    this.theTree = tree;
-  }
-  
-  
-  public void valueChanged(TreeSelectionEvent e)
-  {
-    // get the newly made selection
-    TreePath newSelectedPath = e.getNewLeadSelectionPath();
-    
-    // NB! Safety check - sometimes the container of the XML tree will remove all selections,
-    //     in such case this listener is not supposed to perform any action -> terminate 
-    if (newSelectedPath == null) return;
-    
-    
-    // --- XPath GENERATION ---
-    
-    // get the XPath expression for the new selection + taking into consideration all previous ones
-    List<String> wildcardedXPath = generateWildcardedXPathExpression(newSelectedPath);
-    
-    // assemble the xpath expression as one string
-    StringBuilder xpath = new StringBuilder();
-    for (String leg : wildcardedXPath) {
-      xpath.append(leg);
-    }
-    theTree.setCurrentXPathExpression(DocumentHelper.createXPath(xpath.toString()));
-    theTree.getCurrentXPathExpression().setNamespaceURIs(theTree.getCurrentXPathNamespaces());
-    
-    
-    // --- UPDATE CONFIG PANEL ---
-    // (with new values for XPath expression and namespace mappings)
-    
-    // inform the parent activity configuration panel to update the XPath expression in the UI
-    /* We do not update the XPath expression after changes in selection in the XML tree - we
-     * now have a button to explicitly do that.
-     * theTree.getParentConfigPanel().updateXPathEditingPanelValues();
-     */
-    
-    // --- SELECTION ---
-    selectAllNodesThatMatchTheCurrentXPath(wildcardedXPath, newSelectedPath);
-  }
-  
-  
-  /**
-   * Selects all nodes that match the <code>wildcardedXPath</code> expression.
-   * 
-   * Keyboard focus is set to remain on the "deepest" (e.g. furthest from root)
-   * element of the <code>lastSelectedPath</code>. 
-   * 
-   * @param wildcardedXPath List of strings, where each string contains one "leg" of the XPath expression
-   *                        (e.g. a string starting with a "/" and containing the name of one node of the tree).
-   * 
-   * @param lastSelectedPath The path that was last selected in the tree (normally,
-   *                         because of this selection {@link XPathActivityXMLTreeSelectionHandler#valueChanged(TreeSelectionEvent)}
-   *                         was executed and this method was started as a part of that.
-   */
-  public void selectAllNodesThatMatchTheCurrentXPath(List<String> wildcardedXPath, TreePath lastSelectedPath)
-  {
-    // first of all - calculate the number of nodes that match this XPath
-    // expression in the XML tree
-    int numberOfMatchingNodes = parentConfigPanel.runXPath(false);
-    
-    
-    // store all tree selection listeners in order to temporarily remove them;
-    // this is necessary as selection modifications will be made here -- don't
-    // want any listeners to respond to these new events
-    theTree.removeAllSelectionListeners();
-    
-    
-    // remove all previous selections - safest way to get the new ones correctly
-    theTree.clearSelection();
-    
-    
-    if (numberOfMatchingNodes <= XPathActivityConfigurationPanel.MAX_NUMBER_OF_MATCHING_NODES_TO_HIGHLIGHT_IN_THE_TREE)
-    {
-      // find all nodes that match the XPath expression
-      List<XPathActivityXMLTreeNode> matchingNodes = new ArrayList<XPathActivityXMLTreeNode>();
-      findAllNodesThatMatchWildcardedXPath(
-          (XPathActivityXMLTreeNode)theTree.getModel().getRoot(),
-          wildcardedXPath.subList(1, wildcardedXPath.size()),
-          matchingNodes);
-      
-      // obtain and select TreePaths for each of the matching nodes
-      for (XPathActivityXMLTreeNode matchingNode : matchingNodes) {
-        TreeNode[] pathAsObjects = ((DefaultTreeModel)theTree.getModel()).getPathToRoot(matchingNode);
-        TreePath path = new TreePath(pathAsObjects);
-        selectTreePathAndAllItsAncestors(path);
-      }
-    }
-    else {
-      JOptionPane.showMessageDialog(parentConfigPanel,
-          "Current XPath expression matches " + numberOfMatchingNodes + " nodes in the XML tree.\n" +
-          "The XPath Activity is unable to highlight all these nodes in the tree due to\n" +
-          "performance reasons.\n\n" +
-          "The XPath Activity will still work correctly - both during the workflow execution\n" +
-          "and if 'Run XPath' button is clicked to run this expression against the example XML.",
-          "XPath Activity", JOptionPane.INFORMATION_MESSAGE);
-    }
-    
-    
-    // make sure the keyboard focus stays on the actual node that was clicked on -
-    // no direct way to do this, so simply de-select and re-select again
-    if (lastSelectedPath != null) {
-      theTree.removeSelectionPath(lastSelectedPath);
-      theTree.addSelectionPath(lastSelectedPath);
-    }
-    
-    // restore all previously stored selection listeners
-    theTree.restoreAllSelectionListeners();
-  }
-  
-  
-  
-  /**
-   * This cannot work for XPath expressions that were modified manually -
-   * only works for the type generated by the click in the XML tree. 
-   * 
-   * @param nodeToStartAt
-   * @param xpathLegs From <code>nodeToStartAt</code>.
-   * @param matchingNodes
-   */
-  private void findAllNodesThatMatchWildcardedXPath(XPathActivityXMLTreeNode nodeToStartAt, 
-                  List<String> xpathLegs, List<XPathActivityXMLTreeNode> matchingNodes)
-  {
-    // some of the input data is missing, just return...
-    if (nodeToStartAt == null || xpathLegs == null || matchingNodes == null) {
-      return;
-    }
-    
-    // no XPath expression to match against the 'nodeToStartAt', therefore
-    // we've "found" the macthing node: 'nodeToStartAt'
-    if (xpathLegs.size() == 0) {
-      matchingNodes.add(nodeToStartAt);
-      return;
-    }
-    
-    // standard case - there is something to match, proceed as normal
-    Enumeration<XPathActivityXMLTreeNode> startNodeChildren = nodeToStartAt.children();
-    while (startNodeChildren.hasMoreElements()) {
-      XPathActivityXMLTreeNode child = startNodeChildren.nextElement();
-      
-      if (xpathLegs.get(0).equals("/*") ||
-          xpathLegs.get(0).equals(this.theTree.getXMLTreeNodeEffectiveQualifiedNameAsXPathLeg(child)))
-      {
-        // this node matches current section of the XPath expression
-        if (xpathLegs.size() == 1) {
-          // no more sections in the XPath leg list to match, so this child
-          // node is the one we were looking for - add to the result
-          matchingNodes.add(child);
-        }
-        else {
-          // ...or process its children recursively
-          findAllNodesThatMatchWildcardedXPath(child, xpathLegs.subList(1, xpathLegs.size()), matchingNodes);
-        }
-      }
-    }
-  }
-
-
-  private List<String> generateWildcardedXPathExpression(TreePath newSelectedPath)
-  {
-    // look through previous selection to find paths of the same length, as the newly selected one
-    List<TreePath> pathsOfSameLength = new ArrayList<TreePath>();
-    TreePath[] previouslySelectedPaths = theTree.getSelectionPaths();
-    for (TreePath path : previouslySelectedPaths) {
-      if (path.getPathCount() == newSelectedPath.getPathCount()) {
-        pathsOfSameLength.add(path);
-      }
-    }
-    
-    // if there were found any paths of the same length, we have a "wildcard" situation
-    List<String> wildcardXPathLegs = theTree.generateXPathFromTreePathAsLegList(newSelectedPath);
-    
-    if (pathsOfSameLength.size() > 0)
-    {
-      // it's okay to use just the first path - TODO: explain that this is because of previous comparisons
-      List<String> firstMatchingLengthPathLegs = theTree.generateXPathFromTreePathAsLegList(pathsOfSameLength.get(0));
-      
-      int pathLength = wildcardXPathLegs.size();
-      
-      // only use wildcards if the last segments of both paths are identical
-      if (wildcardXPathLegs.get(pathLength - 1).equals(firstMatchingLengthPathLegs.get(pathLength - 1)))
-      {
-        // continue all the way to the last segment, but don't touch it
-        for (int i = 0; i < wildcardXPathLegs.size() - 1; i++)
-        {
-          if (!wildcardXPathLegs.get(i).equals(firstMatchingLengthPathLegs.get(i))) {
-            // set wildcard
-            // TODO - make wildcard a constant
-            // TODO - may need to make the wildcard to have a namespace? (e.g. "/default:*" instead of simply "/*")
-            wildcardXPathLegs.set(i, "/*"); // definitely an element, not an attribute (as not the last segment in the path)
-          }
-        }
-      }
-    }
-    
-    return (wildcardXPathLegs);
-  }
-  
-  
-  
-  private void selectTreePathAndAllItsAncestors(TreePath path)
-  {
-    // select all ancestors of that path
-    TreePath pathToSelect = path;
-    for (int i = 0; i < path.getPathCount(); i++)
-    {
-      pathToSelect = pathToSelect.getParentPath();
-      theTree.addSelectionPath(pathToSelect);
-    }
-    
-    // select the specified path itself
-    //
-    // NB! important to do this after the ancestors, so that the supplied
-    // path is the one that retains the keyboard focus after this method terminates
-    theTree.addSelectionPath(path);
-  }
-  
-  
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/ConfigureXPathActivityMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/ConfigureXPathActivityMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/ConfigureXPathActivityMenuAction.java
deleted file mode 100644
index 6695dc9..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/ConfigureXPathActivityMenuAction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.contextualview;
-
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.xpath.ui.config.XPathActivityConfigureAction;
-import net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import uk.org.taverna.commons.services.ServiceRegistry;
-
-/**
- * This action is responsible for enabling the contextual menu entry on processors that perform
- * XPathActivity'ies.
- * NB! As a side-effect this also enables the pop-up with for configuration of the processor when it
- * is added to the workflow from the Service Panel.
- *
- * @author Sergejs Aleksejevs
- * @author David Withers
- */
-public class ConfigureXPathActivityMenuAction extends AbstractConfigureActivityMenuAction {
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ServiceRegistry serviceRegistry;
-
-	public ConfigureXPathActivityMenuAction() {
-		super(XPathTemplateService.ACTIVITY_TYPE);
-	}
-
-	@Override
-	protected Action createAction() {
-		XPathActivityConfigureAction configAction = new XPathActivityConfigureAction(
-				findActivity(), getParentFrame(), editManager, fileManager, activityIconManager,
-				serviceDescriptionRegistry, serviceRegistry);
-		configAction.putValue(Action.NAME, "Configure XPath service");
-		addMenuDots(configAction);
-		return configAction;
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextViewFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextViewFactory.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextViewFactory.java
deleted file mode 100644
index 355ab8d..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextViewFactory.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.contextualview;
-
-import java.util.Arrays;
-import java.util.List;
-
-import net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-/**
- * @author Sergejs Aleksejevs
- */
-public class XPathActivityMainContextViewFactory implements ContextualViewFactory<Activity> {
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ServiceRegistry serviceRegistry;
-
-	public boolean canHandle(Object selection) {
-		return selection instanceof Activity
-				&& ((Activity) selection).getType()
-						.equals(XPathTemplateService.ACTIVITY_TYPE);
-	}
-
-	public List<ContextualView> getViews(Activity selection) {
-		return Arrays.<ContextualView> asList(new XPathActivityMainContextualView(selection,
-				editManager, fileManager, activityIconManager, serviceDescriptionRegistry,
-				serviceRegistry));
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextualView.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextualView.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextualView.java
deleted file mode 100644
index d872228..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/contextualview/XPathActivityMainContextualView.java
+++ /dev/null
@@ -1,209 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.contextualview;
-
-import java.awt.Color;
-import java.awt.Cursor;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Frame;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-
-import javax.swing.Action;
-import javax.swing.BorderFactory;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTable;
-import javax.swing.JTextField;
-import javax.swing.table.DefaultTableModel;
-
-import net.sf.taverna.t2.activities.xpath.ui.config.XPathActivityConfigureAction;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.common.Scufl2Tools;
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-/**
- *
- * @author Sergejs Aleksejevs
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class XPathActivityMainContextualView extends ContextualView {
-
-	private final Scufl2Tools scufl2Tools = new Scufl2Tools();
-
-	private XPathActivityMainContextualView thisContextualView;
-
-	private final Activity activity;
-
-	private JPanel jpMainPanel;
-	private JTextField tfXPathExpression;
-
-	private DefaultTableModel xpathNamespaceMappingsTableModel;
-	private JTable jtXPathNamespaceMappings;
-	private JScrollPane spXPathNamespaceMappings;
-	private final EditManager editManager;
-	private final FileManager fileManager;
-	private final ActivityIconManager activityIconManager;
-	private final ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private final ServiceRegistry serviceRegistry;
-
-	public XPathActivityMainContextualView(Activity activity, EditManager editManager,
-			FileManager fileManager, ActivityIconManager activityIconManager,
-			ServiceDescriptionRegistry serviceDescriptionRegistry, ServiceRegistry serviceRegistry) {
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		this.activityIconManager = activityIconManager;
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-		this.serviceRegistry = serviceRegistry;
-		this.thisContextualView = this;
-		this.activity = activity;
-		initView();
-	}
-
-	@Override
-	public JComponent getMainFrame() {
-		jpMainPanel = new JPanel(new GridBagLayout());
-		jpMainPanel.setBorder(BorderFactory.createCompoundBorder(
-				BorderFactory.createEmptyBorder(4, 2, 4, 2), BorderFactory.createEmptyBorder()));
-
-		GridBagConstraints c = new GridBagConstraints();
-		c.fill = GridBagConstraints.HORIZONTAL;
-		c.anchor = GridBagConstraints.WEST;
-		c.weighty = 0;
-
-		// --- XPath Expression ---
-
-		c.gridx = 0;
-		c.gridy = 0;
-		c.insets = new Insets(5, 5, 5, 5);
-		JLabel jlXPathExpression = new JLabel("XPath Expression:");
-		jlXPathExpression.setFont(jlXPathExpression.getFont().deriveFont(Font.BOLD));
-		jpMainPanel.add(jlXPathExpression, c);
-
-		c.gridx++;
-		c.weightx = 1.0;
-		tfXPathExpression = new JTextField();
-		tfXPathExpression.setEditable(false);
-		jpMainPanel.add(tfXPathExpression, c);
-
-		// --- Label to Show/Hide Mapping Table ---
-
-		final JLabel jlShowHideNamespaceMappings = new JLabel("Show namespace mappings...");
-		jlShowHideNamespaceMappings.setForeground(Color.BLUE);
-		jlShowHideNamespaceMappings.setCursor(new Cursor(Cursor.HAND_CURSOR));
-		jlShowHideNamespaceMappings.addMouseListener(new MouseAdapter() {
-			public void mouseClicked(MouseEvent e) {
-				spXPathNamespaceMappings.setVisible(!spXPathNamespaceMappings.isVisible());
-				jlShowHideNamespaceMappings.setText((spXPathNamespaceMappings.isVisible() ? "Hide"
-						: "Show") + " namespace mappings...");
-				thisContextualView.revalidate();
-			}
-		});
-
-		c.gridx = 0;
-		c.gridy++;
-		c.gridwidth = 2;
-		c.weightx = 1.0;
-		c.weighty = 0;
-		c.fill = GridBagConstraints.HORIZONTAL;
-		jpMainPanel.add(jlShowHideNamespaceMappings, c);
-
-		// --- Namespace Mapping Table ---
-
-		xpathNamespaceMappingsTableModel = new DefaultTableModel() {
-			/**
-			 * No cells should be editable
-			 */
-			public boolean isCellEditable(int rowIndex, int columnIndex) {
-				return (false);
-			}
-		};
-		xpathNamespaceMappingsTableModel.addColumn("Namespace Prefix");
-		xpathNamespaceMappingsTableModel.addColumn("Namespace URI");
-
-		jtXPathNamespaceMappings = new JTable();
-		jtXPathNamespaceMappings.setModel(xpathNamespaceMappingsTableModel);
-		jtXPathNamespaceMappings.setPreferredScrollableViewportSize(new Dimension(200, 90));
-		// TODO - next line is to be enabled when Taverna is migrated to Java
-		// 1.6; for now it's fine to run without this
-		// jtXPathNamespaceMappings.setFillsViewportHeight(true); // makes sure
-		// that when the dedicated area is larger than the table, the latter is
-		// stretched vertically to fill the empty space
-
-		jtXPathNamespaceMappings.getColumnModel().getColumn(0).setPreferredWidth(20); // set
-																						// relative
-																						// sizes of
-																						// columns
-		jtXPathNamespaceMappings.getColumnModel().getColumn(1).setPreferredWidth(300);
-
-		c.gridy++;
-		spXPathNamespaceMappings = new JScrollPane(jtXPathNamespaceMappings);
-		spXPathNamespaceMappings.setVisible(false);
-		jpMainPanel.add(spXPathNamespaceMappings, c);
-
-		// populate the view with values
-		refreshView();
-
-		return jpMainPanel;
-	}
-
-	@Override
-	/**
-	 * This is the title of the contextual view - shown in the list of other available
-	 * views (even when this contextual view is collapsed).
-	 */
-	public String getViewTitle() {
-		return "XPath Service Details";
-	}
-
-	/**
-	 * Typically called when the activity configuration has changed.
-	 */
-	@Override
-	public void refreshView() {
-		Configuration configuration = scufl2Tools.configurationFor(activity, activity.getParent());
-		JsonNode json = configuration.getJson();
-
-		// Set XPath Expression
-		tfXPathExpression.setText(json.get("xpathExpression").asText());
-
-		// Populate Namespace Mappings
-		xpathNamespaceMappingsTableModel.getDataVector().removeAllElements();
-		if (json.has("xpathNamespaceMap")) {
-			for (JsonNode mapping : json.get("xpathNamespaceMap")) {
-				xpathNamespaceMappingsTableModel.addRow(new Object[] {
-						mapping.get("prefix").asText(), mapping.get("uri").asText() });
-			}
-		}
-	}
-
-	/**
-	 * View position hint
-	 */
-	@Override
-	public int getPreferredPosition() {
-		// want to be on top, as it's the main contextual view for this activity
-		return 100;
-	}
-
-	@Override
-	public Action getConfigureAction(final Frame owner) {
-		// "Configure" button appears because of this action being returned
-		return new XPathActivityConfigureAction(activity, owner, editManager, fileManager,
-				activityIconManager, serviceDescriptionRegistry, serviceRegistry);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateAction.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateAction.java
deleted file mode 100644
index a80696d..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateAction.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.xpath.ui.menu;
-
-import java.awt.event.ActionEvent;
-import java.net.URI;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathTemplateService;
-import net.sf.taverna.t2.ui.menu.AbstractContextualMenuAction;
-import net.sf.taverna.t2.ui.menu.MenuManager;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.core.Workflow;
-
-/**
- * An action to add a REST activity + a wrapping processor to the workflow.
- *
- * @author Alex Nenadic
- */
-@SuppressWarnings("serial")
-public class AddXPathTemplateAction extends AbstractContextualMenuAction {
-
-	private static final String ADD_XPATH = "XPath";
-
-	private static final URI insertSection = URI
-			.create("http://taverna.sf.net/2009/contextMenu/insert");
-
-	private EditManager editManager;
-
-	private MenuManager menuManager;
-
-	private SelectionManager selectionManager;
-
-	private ActivityIconManager activityIconManager;
-
-	private ServiceRegistry serviceRegistry;
-
-	public AddXPathTemplateAction() {
-		super(insertSection, 1000);
-	}
-
-	@Override
-	public boolean isEnabled() {
-		return super.isEnabled() && getContextualSelection().getSelection() instanceof Workflow;
-	}
-
-	@Override
-	protected Action createAction() {
-
-		return new AddXPathAction();
-	}
-
-	protected class AddXPathAction extends AbstractAction {
-		AddXPathAction() {
-			super(ADD_XPATH, activityIconManager
-					.iconForActivity(XPathTemplateService.ACTIVITY_TYPE));
-		}
-
-		public void actionPerformed(ActionEvent e) {
-
-			WorkflowView.importServiceDescription(XPathTemplateService.getServiceDescription(),
-					false, editManager, menuManager, selectionManager, serviceRegistry);
-		}
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setMenuManager(MenuManager menuManager) {
-		this.menuManager = menuManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateMenuAction.java
deleted file mode 100644
index 9132110..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/menu/AddXPathTemplateMenuAction.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.xpath.ui.menu;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-import java.net.URI;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.KeyStroke;
-
-import net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathTemplateService;
-import net.sf.taverna.t2.ui.menu.AbstractMenuAction;
-import net.sf.taverna.t2.ui.menu.DesignOnlyAction;
-import net.sf.taverna.t2.ui.menu.MenuManager;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
-import uk.org.taverna.commons.services.ServiceRegistry;
-
-/**
- * An action to add a REST activity + a wrapping processor to the workflow.
- *
- * @author Alex Nenadic
- * @author alanrw
- */
-@SuppressWarnings("serial")
-public class AddXPathTemplateMenuAction extends AbstractMenuAction {
-
-	private static final String ADD_XPATH = "XPath";
-
-	private static final URI INSERT = URI
-			.create("http://taverna.sf.net/2008/t2workbench/menu#insert");
-
-	private static final URI ADD_XPATH_URI = URI
-			.create("http://taverna.sf.net/2008/t2workbench/menu#graphMenuAddXPath");
-
-	private EditManager editManager;
-
-	private MenuManager menuManager;
-
-	private SelectionManager selectionManager;
-
-	private ActivityIconManager activityIconManager;
-
-	private ServiceRegistry serviceRegistry;
-
-	public AddXPathTemplateMenuAction() {
-		super(INSERT, 1000, ADD_XPATH_URI);
-	}
-
-	@Override
-	protected Action createAction() {
-		return new AddXPathMenuAction();
-	}
-
-	protected class AddXPathMenuAction extends AbstractAction implements DesignOnlyAction {
-		AddXPathMenuAction() {
-			super();
-			putValue(SMALL_ICON,
-					activityIconManager.iconForActivity(XPathTemplateService.ACTIVITY_TYPE));
-			putValue(NAME, ADD_XPATH);
-			putValue(SHORT_DESCRIPTION, "XPath service");
-			putValue(
-					Action.ACCELERATOR_KEY,
-					KeyStroke.getKeyStroke(KeyEvent.VK_P, InputEvent.SHIFT_DOWN_MASK
-							| InputEvent.ALT_DOWN_MASK));
-		}
-
-		public void actionPerformed(ActionEvent e) {
-			WorkflowView.importServiceDescription(XPathTemplateService.getServiceDescription(),
-					false, editManager, menuManager, selectionManager, serviceRegistry);
-		}
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setMenuManager(MenuManager menuManager) {
-		this.menuManager = menuManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathActivityIcon.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathActivityIcon.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathActivityIcon.java
deleted file mode 100644
index 2251efb..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathActivityIcon.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.servicedescription;
-
-import java.awt.Color;
-import java.net.URI;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-
-/**
- * @author Sergejs Aleksejevs
- */
-public class XPathActivityIcon implements ActivityIconSPI {
-	private static final Color PROCESSOR_COLOUR = Color.decode("#E6FF5E");
-
-	// --- LOCATIONS OF ICONS USED IN THE XPath ACTIVITY ---
-
-	private static final String FAMFAMFAM_SILK_PATH = "famfamfam_silk/";
-	private static final String FOLDS_PATH = "folds/";
-
-	public static final String XPATH_ACTIVITY_ICON = FAMFAMFAM_SILK_PATH + "page_white_code.png";
-	public static final String XPATH_ACTIVITY_CONFIGURATION_PARSE_XML_ICON = "arrow_right.png";
-
-	public static final String XML_TREE_ROOT_ICON = FAMFAMFAM_SILK_PATH + "page_white_code.png";
-	public static final String XML_TREE_NODE_ICON = FAMFAMFAM_SILK_PATH + "tag.png";
-	public static final String XML_TREE_ATTRIBUTE_ICON = "xpath_attribute.png";
-
-	public static final String XML_TREE_EXPAND_ALL_ICON = FAMFAMFAM_SILK_PATH
-			+ "text_linespacing.png";
-	public static final String XML_TREE_COLLAPSE_ALL_ICON = FAMFAMFAM_SILK_PATH
-			+ "text_linespacing (collapse).png";
-
-	public static final String XPATH_STATUS_OK_ICON = FAMFAMFAM_SILK_PATH + "accept.png";
-	public static final String XPATH_STATUS_ERROR_ICON = FAMFAMFAM_SILK_PATH + "exclamation.png";
-	public static final String XPATH_STATUS_UNKNOWN_ICON = FAMFAMFAM_SILK_PATH + "help.png";
-
-	public static final String FOLD_ICON = FOLDS_PATH + "fold.png";
-	public static final String UNFOLD_ICON = FOLDS_PATH + "unfold.png";
-
-	// ------
-
-	private static ImageIcon icon;
-
-	public int canProvideIconScore(URI activityType) {
-		if (XPathTemplateService.ACTIVITY_TYPE.equals(activityType))
-			return DEFAULT_ICON + 1;
-		else
-			return NO_ICON;
-	}
-
-	public Icon getIcon(URI activityType) {
-		return getXPathActivityIcon();
-	}
-
-	public static Icon getXPathActivityIcon() {
-		if (icon == null) {
-			synchronized (XPathActivityIcon.class) {
-				if (icon == null) {
-					try {
-						icon = new ImageIcon(
-								XPathActivityIcon.class.getResource(XPATH_ACTIVITY_ICON));
-					} catch (NullPointerException e) {
-						/* icon wasn't found - do nothing, but no icon will be available */
-					}
-				}
-			}
-		}
-		return (icon);
-	}
-
-	public static Icon getIconById(String iconID) {
-		try {
-			return (new ImageIcon(XPathActivityIcon.class.getResource(iconID)));
-		} catch (NullPointerException e) {
-			// requested icon wasn't found - just return null
-			return (null);
-		}
-	}
-
-	public void setColourManager(ColourManager colourManager) {
-		colourManager.setPreferredColour(XPathTemplateService.ACTIVITY_TYPE.toString(), PROCESSOR_COLOUR);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathTemplateService.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathTemplateService.java b/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathTemplateService.java
deleted file mode 100644
index d55235d..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/xpath/ui/servicedescription/XPathTemplateService.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package net.sf.taverna.t2.activities.xpath.ui.servicedescription;
-
-import java.net.URI;
-
-import javax.swing.Icon;
-
-import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
-/**
- * @author Sergejs Aleksejevs
- * @author David Withers
- */
-public class XPathTemplateService extends AbstractTemplateService {
-
-	public static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/xpath");
-
-	@Override
-	public URI getActivityType() {
-		return ACTIVITY_TYPE;
-	}
-
-	@Override
-	public Configuration getActivityConfiguration() {
-		Configuration configuration = new Configuration();
-		configuration.setType(ACTIVITY_TYPE.resolve("#Config"));
-		ObjectNode json = (ObjectNode) configuration.getJson();
-		json.put("xpathExpression", "/");
-		return configuration;
-	}
-
-	@Override
-	public Icon getIcon() {
-		return XPathActivityIcon.getXPathActivityIcon();
-	}
-
-	public String getName() {
-		return "XPath";
-	}
-
-	public String getDescription() {
-		return "Service for point-and-click creation of XPath expressions for XML data";
-	}
-
-	public static ServiceDescription getServiceDescription() {
-		XPathTemplateService gts = new XPathTemplateService();
-		return gts.templateService;
-	}
-
-	public String getId() {
-		return "http://www.taverna.org.uk/2010/services/xpath";
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
deleted file mode 100644
index be7da5f..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathTemplateService
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
deleted file mode 100644
index 7700abb..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
+++ /dev/null
@@ -1,3 +0,0 @@
-net.sf.taverna.t2.activities.xpath.ui.contextualview.ConfigureXPathActivityMenuAction
-net.sf.taverna.t2.activities.xpath.ui.menu.AddXPathTemplateAction
-net.sf.taverna.t2.activities.xpath.ui.menu.AddXPathTemplateMenuAction
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
deleted file mode 100644
index b759c2e..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathActivityIcon
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
deleted file mode 100644
index e248981..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
+++ /dev/null
@@ -1 +0,0 @@
- net.sf.taverna.t2.activities.xpath.ui.contextualview.XPathActivityMainContextViewFactory

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/META-INF/spring/xpath-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/xpath-activity-ui-context-osgi.xml b/src/main/resources/META-INF/spring/xpath-activity-ui-context-osgi.xml
deleted file mode 100644
index 1e53ea6..0000000
--- a/src/main/resources/META-INF/spring/xpath-activity-ui-context-osgi.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:beans="http://www.springframework.org/schema/beans"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd
-                      http://www.springframework.org/schema/osgi
-                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
-
-	<service ref="XPathActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
-
-	<service ref="XPathTemplateService" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
-
-	<service ref="ConfigureXPathActivityMenuAction" auto-export="interfaces" />
-	<service ref="AddXPathTemplateAction" auto-export="interfaces" />
-	<service ref="AddXPathTemplateMenuAction" auto-export="interfaces" />
-
-	<service ref="XPathActivityMainContextViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
-
-	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
-	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
-	<reference id="menuManager" interface="net.sf.taverna.t2.ui.menu.MenuManager" />
-	<reference id="selectionManager" interface="net.sf.taverna.t2.workbench.selection.SelectionManager" />
-	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
-	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
-	<reference id="serviceDescriptionRegistry" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry" />
-	<reference id="serviceRegistry" interface="uk.org.taverna.commons.services.ServiceRegistry" />
-
-</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/META-INF/spring/xpath-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/xpath-activity-ui-context.xml b/src/main/resources/META-INF/spring/xpath-activity-ui-context.xml
deleted file mode 100644
index 0116b2e..0000000
--- a/src/main/resources/META-INF/spring/xpath-activity-ui-context.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-	<bean id="XPathActivityIcon"
-		class="net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathActivityIcon">
-		<property name="colourManager" ref="colourManager" />
-	</bean>
-
-	<bean id="XPathTemplateService"
-		class="net.sf.taverna.t2.activities.xpath.ui.servicedescription.XPathTemplateService" />
-
-	<bean id="ConfigureXPathActivityMenuAction"
-		class="net.sf.taverna.t2.activities.xpath.ui.contextualview.ConfigureXPathActivityMenuAction">
-		<property name="editManager" ref="editManager" />
-		<property name="fileManager" ref="fileManager" />
-		<property name="activityIconManager" ref="activityIconManager" />
-		<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-		<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-	<bean id="AddXPathTemplateAction"
-		class="net.sf.taverna.t2.activities.xpath.ui.menu.AddXPathTemplateAction">
-		<property name="editManager" ref="editManager" />
-		<property name="menuManager" ref="menuManager" />
-		<property name="selectionManager" ref="selectionManager" />
-		<property name="activityIconManager" ref="activityIconManager" />
-		<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-	<bean id="AddXPathTemplateMenuAction"
-		class="net.sf.taverna.t2.activities.xpath.ui.menu.AddXPathTemplateMenuAction">
-		<property name="editManager" ref="editManager" />
-		<property name="menuManager" ref="menuManager" />
-		<property name="selectionManager" ref="selectionManager" />
-		<property name="activityIconManager" ref="activityIconManager" />
-		<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-
-	<bean id="XPathActivityMainContextViewFactory"
-		class="net.sf.taverna.t2.activities.xpath.ui.contextualview.XPathActivityMainContextViewFactory">
-		<property name="editManager" ref="editManager" />
-		<property name="fileManager" ref="fileManager" />
-		<property name="activityIconManager" ref="activityIconManager" />
-		<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-		<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/arrow_right.png
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/arrow_right.png b/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/arrow_right.png
deleted file mode 100644
index 2cf15f1..0000000
Binary files a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/arrow_right.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/accept.png
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/accept.png b/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/accept.png
deleted file mode 100644
index 89c8129..0000000
Binary files a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/accept.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/exclamation.png
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/exclamation.png b/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/exclamation.png
deleted file mode 100644
index c37bd06..0000000
Binary files a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/exclamation.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/help.png
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/help.png b/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/help.png
deleted file mode 100644
index 5c87017..0000000
Binary files a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/help.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/page_white_code.png
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/page_white_code.png b/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/page_white_code.png
deleted file mode 100644
index 0c76bd1..0000000
Binary files a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/page_white_code.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/tag.png
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/tag.png b/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/tag.png
deleted file mode 100644
index e093032..0000000
Binary files a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/tag.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing (collapse).png
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing (collapse).png b/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing (collapse).png
deleted file mode 100644
index ff09e31..0000000
Binary files a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing (collapse).png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing.png
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing.png b/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing.png
deleted file mode 100644
index 1a91cbd..0000000
Binary files a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/famfamfam_silk/text_linespacing.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/fold.png
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/fold.png b/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/fold.png
deleted file mode 100644
index a13d280..0000000
Binary files a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/fold.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/unfold.png
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/unfold.png b/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/unfold.png
deleted file mode 100644
index 589e2c9..0000000
Binary files a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/folds/unfold.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/xpath_attribute.png
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/xpath_attribute.png b/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/xpath_attribute.png
deleted file mode 100644
index 3fa7811..0000000
Binary files a/src/main/resources/net/sf/taverna/t2/activities/xpath/ui/servicedescription/xpath_attribute.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/90ee9c45/src/test/java/Dom4JTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/Dom4JTest.java b/src/test/java/Dom4JTest.java
deleted file mode 100644
index 6d6efd7..0000000
--- a/src/test/java/Dom4JTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-import java.util.List;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentHelper;
-import org.dom4j.Node;
-import org.dom4j.XPath;
-
-
-public class Dom4JTest
-{
-  private static void testDom4j() throws Exception
-  {
-    String strDoc = 
-      "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
-      "<services>" +
-        "<parameters>" +
-          "<filters>" +
-          "</filters>" +
-          "<query urlKey=\"q\"></query>" +
-          "<sortBy urlKey=\"sort_by\" urlValue=\"created\">Created at date</sortBy>" +
-          "<sortOrder urlKey=\"sort_order\" urlValue=\"desc\">Descending</sortOrder>" +
-          "<page urlKey=\"page\">1</page>" +
-          "<pageSize urlKey=\"per_page\">10</pageSize>" +
-        "</parameters>" +
-        "<statistics>" +
-          "<pages>170</pages>" +
-          "<results>1695</results>" +
-          "<total>1695</total>" +
-        "</statistics>" +
-        "<results>" +
-          "<services>" +
-            "<service name=\"1\" />" +
-            "<service name=\"2\" />" +
-            "<service name=\"3\" />" +
-            "<service name=\"4\" />" +
-          "</services>" +
-        "</results>" +
-      "</services>";
-    
-    
-    Document doc = DocumentHelper.parseText(strDoc);
-    
-//    // Pretty print the document to System.out
-//    OutputFormat format = OutputFormat.createPrettyPrint();
-//    XMLWriter writer = new XMLWriter( System.out, format );
-//    writer.write( doc );
-
-    
-    XPath expr = DocumentHelper.createXPath("//pages");
-    
-    List<Node> matchingNodes = expr.selectNodes(doc);
-    
-//    List<Node> matchingNodes = doc.selectNodes("/services/parameters");
-    
-    
-//    System.out.println("\n\n");
-    System.out.println(matchingNodes.size());
-    for (Node n : matchingNodes) {
-      System.out.println(n.asXML());
-    }
-  }
-  
-  /**
-   * @param args
-   * @throws Exception 
-   */ 
-  public static void main(String[] args) throws Exception {
-    testDom4j();
-  }
-
-}


[19/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-localworker-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask.json
new file mode 100644
index 0000000..656453e
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "class FileExtFilter implements FileFilter {\n\n\tpublic FileExtFilter(String ext) {\n\t\tthis.ext = ext;\n\t}\n\n\tpublic boolean accept(File file) {\n\t\treturn file.getName().endsWith(ext);\n\t}\n\n\tString ext = null;\n}\n\nif (extension == void || extension.equals(\"\")) {\n\tthrow new RuntimeException(\n\t\t\t\"The 'extension' parameter cannot be null.  Please enter a valid file extension.\");\n}\n\nif (directory == void || directory.equals(\"\")) {\n\tthrow new RuntimeException(\n\t\t\t\"The 'directory' parameter cannot be null.  Please enter a valid file directory.\");\n}\n\nFile dirObj = new File(directory);\n\nif (!dirObj.exists()) {\n\tthrow new RuntimeException(\"The 'directory' parameter specified:\" + directory\n\t\t\t+ \"does not exist.  Please enter a valid file directory.\");\n}\n\nFile[] fileObjList = dirObj.listFiles(new FileExtFilter(extension));\nList filelist = new ArrayList();\nfor (int i = 0; i < fileObjList.length; i++) {\n\tfilelist.add(fileObj
 List[i].getAbsolutePath());\n}\n\n\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.io.FileListByExtTask",
+  "inputPorts" : [ {
+    "name" : "directory",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "extension",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "filelist",
+    "depth" : 1,
+    "granularDepth" : 1
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask
new file mode 100644
index 0000000..06906b6
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask
@@ -0,0 +1,71 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>class FileRegexFilter implements FileFilter {
+
+	public FileRegexFilter(String regex) {
+		this.regex = regex;
+	}
+
+	public boolean accept(File file) {
+		return file.getName().matches(regex);
+	}
+
+	String regex = null;
+}
+
+if (regex == void || regex.equals("")) {
+	throw new RuntimeException(
+			"The 'regex' parameter cannot be null.  Please enter a valid file extension.");
+}
+
+if (directory == void || directory.equals("")) {
+	throw new RuntimeException(
+			"The 'directory' parameter cannot be null.  Please enter a valid file directory.");
+}
+
+File dirObj = new File(directory);
+
+if (!dirObj.exists()) {
+	throw new RuntimeException("The 'directory' parameter specified:" + directory
+			+ "does not exist.  Please enter a valid file directory.");
+}
+
+File[] fileObjList = dirObj.listFiles(new FileRegexFilter(regex));
+List filelist = new ArrayList();
+for (int i = 0; i &lt; fileObjList.length; i++) {
+	filelist.add(fileObjList[i].getAbsolutePath());
+}
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>directory</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>regex</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>filelist</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask.json
new file mode 100644
index 0000000..35cdb01
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "class FileRegexFilter implements FileFilter {\n\n\tpublic FileRegexFilter(String regex) {\n\t\tthis.regex = regex;\n\t}\n\n\tpublic boolean accept(File file) {\n\t\treturn file.getName().matches(regex);\n\t}\n\n\tString regex = null;\n}\n\nif (regex == void || regex.equals(\"\")) {\n\tthrow new RuntimeException(\n\t\t\t\"The 'regex' parameter cannot be null.  Please enter a valid file extension.\");\n}\n\nif (directory == void || directory.equals(\"\")) {\n\tthrow new RuntimeException(\n\t\t\t\"The 'directory' parameter cannot be null.  Please enter a valid file directory.\");\n}\n\nFile dirObj = new File(directory);\n\nif (!dirObj.exists()) {\n\tthrow new RuntimeException(\"The 'directory' parameter specified:\" + directory\n\t\t\t+ \"does not exist.  Please enter a valid file directory.\");\n}\n\nFile[] fileObjList = dirObj.listFiles(new FileRegexFilter(regex));\nList filelist = new ArrayList();\nfor (int i = 0; i < fileObjList.length; i++) {\n\tfilelist.add(fileObjL
 ist[i].getAbsolutePath());\n}\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask",
+  "inputPorts" : [ {
+    "name" : "directory",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "regex",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "filelist",
+    "depth" : 1,
+    "granularDepth" : 1
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand
new file mode 100644
index 0000000..c0adc09
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand
@@ -0,0 +1,80 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>if (command == void || command.equals("")) {
+	throw new RuntimeException("The 'command' port cannot be null.");
+}
+Process proc = null;
+Runtime rt = Runtime.getRuntime();
+
+String osName = System.getProperty("os.name");
+String[] cmdArray = null;
+if (osName.contains("Windows")) {
+	cmdArray = new String[] { "cmd.exe", "/c", command };
+} else {// TODO: investigate if this will work in Linux and OSX
+	cmdArray = new String[] { command };
+}
+
+// concatenate the arrays
+if ((args == void) || (args == null)) {
+	args = new ArrayList();
+}
+
+int argSize = cmdArray.length + args.size();
+ArrayList appArray = new ArrayList(argSize);
+for (int i = 0; i &lt; cmdArray.length; i++) {
+	appArray.add(cmdArray[i]);
+}
+
+for (int i = 0; i &lt; args.size(); i++) {
+	appArray.add(args.get(i));
+}
+
+String[] applist = new String[argSize];
+appArray.toArray(applist);
+proc = rt.exec(applist);
+
+// Get the input stream and read from it
+InputStream in = proc.getInputStream();
+
+int c;
+StringBuffer sb = new StringBuffer();
+while ((c = in.read()) != -1) {
+	sb.append((char) c);
+}
+in.close();
+result = sb.toString();
+  
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>command</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>args</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>result</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand.json
new file mode 100644
index 0000000..f6ddf4f
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if (command == void || command.equals(\"\")) {\n\tthrow new RuntimeException(\"The 'command' port cannot be null.\");\n}\nProcess proc = null;\nRuntime rt = Runtime.getRuntime();\n\nString osName = System.getProperty(\"os.name\");\nString[] cmdArray = null;\nif (osName.contains(\"Windows\")) {\n\tcmdArray = new String[] { \"cmd.exe\", \"/c\", command };\n} else {// TODO: investigate if this will work in Linux and OSX\n\tcmdArray = new String[] { command };\n}\n\n// concatenate the arrays\nif ((args == void) || (args == null)) {\n\targs = new ArrayList();\n}\n\nint argSize = cmdArray.length + args.size();\nArrayList appArray = new ArrayList(argSize);\nfor (int i = 0; i < cmdArray.length; i++) {\n\tappArray.add(cmdArray[i]);\n}\n\nfor (int i = 0; i < args.size(); i++) {\n\tappArray.add(args.get(i));\n}\n\nString[] applist = new String[argSize];\nappArray.toArray(applist);\nproc = rt.exec(applist);\n\n// Get the input stream and read from it\nInputStream in = proc.getInpu
 tStream();\n\nint c;\nStringBuffer sb = new StringBuffer();\nwhile ((c = in.read()) != -1) {\n\tsb.append((char) c);\n}\nin.close();\nresult = sb.toString();\n  \n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.io.LocalCommand",
+  "inputPorts" : [ {
+    "name" : "command",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "args",
+    "depth" : 1,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "result",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader
new file mode 100644
index 0000000..6e9adb4
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader
@@ -0,0 +1,76 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>BufferedReader getReader (String fileUrl, String encoding) throws IOException {
+		InputStreamReader reader;
+		try {
+			if (encoding == null) {
+				reader = new FileReader(fileUrl);
+			} else {
+				reader = new InputStreamReader(new FileInputStream(fileUrl),encoding); 
+			}
+		}
+		catch (FileNotFoundException e) {
+			// try a real URL instead
+			URL url = new URL(fileUrl);
+			if (encoding == null) {
+				reader = new InputStreamReader (url.openStream());
+			} else {
+				reader = new InputStreamReader (url.openStream(), encoding);
+			}
+		}
+		return new BufferedReader(reader);
+	}
+
+
+
+StringBuffer sb = new StringBuffer(4000);
+
+if (encoding == void) {
+	encoding = null;
+}
+
+BufferedReader in = getReader(fileurl, encoding);
+String str;
+String lineEnding = System.getProperty("line.separator");
+
+while ((str = in.readLine()) != null) {
+	sb.append(str);
+	sb.append(lineEnding);
+}
+in.close();
+filecontents = sb.toString();
+  
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>fileurl</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>encoding</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>filecontents</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader.json
new file mode 100644
index 0000000..1424433
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "BufferedReader getReader (String fileUrl, String encoding) throws IOException {\n\t\tInputStreamReader reader;\n\t\ttry {\n\t\t\tif (encoding == null) {\n\t\t\t\treader = new FileReader(fileUrl);\n\t\t\t} else {\n\t\t\t\treader = new InputStreamReader(new FileInputStream(fileUrl),encoding); \n\t\t\t}\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t// try a real URL instead\n\t\t\tURL url = new URL(fileUrl);\n\t\t\tif (encoding == null) {\n\t\t\t\treader = new InputStreamReader (url.openStream());\n\t\t\t} else {\n\t\t\t\treader = new InputStreamReader (url.openStream(), encoding);\n\t\t\t}\n\t\t}\n\t\treturn new BufferedReader(reader);\n\t}\n\n\n\nStringBuffer sb = new StringBuffer(4000);\n\nif (encoding == void) {\n\tencoding = null;\n}\n\nBufferedReader in = getReader(fileurl, encoding);\nString str;\nString lineEnding = System.getProperty(\"line.separator\");\n\nwhile ((str = in.readLine()) != null) {\n\tsb.append(str);\n\tsb.append(lineEnding);\n}\nin.close();
 \nfilecontents = sb.toString();\n  \n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.io.TextFileReader",
+  "inputPorts" : [ {
+    "name" : "fileurl",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "encoding",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "filecontents",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter
new file mode 100644
index 0000000..88ac962
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter
@@ -0,0 +1,57 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>
+  BufferedWriter out;
+  if (encoding == void) {
+  	out = new BufferedWriter(new FileWriter(outputFile));
+  }
+  else {
+  	out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), encoding)); 
+  }
+out.write(filecontents);
+out.flush();
+out.close();
+outputFile = filecontents;
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>outputFile</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>filecontents</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>encoding</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>outputFile</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter.json
new file mode 100644
index 0000000..5a9f368
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter.json
@@ -0,0 +1,24 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "\n  BufferedWriter out;\n  if (encoding == void) {\n  \tout = new BufferedWriter(new FileWriter(outputFile));\n  }\n  else {\n  \tout = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), encoding)); \n  }\nout.write(filecontents);\nout.flush();\nout.close();\noutputFile = filecontents;\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.io.TextFileWriter",
+  "inputPorts" : [ {
+    "name" : "outputFile",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "filecontents",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "encoding",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputFile",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker
new file mode 100644
index 0000000..b6263cf
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker
@@ -0,0 +1,309 @@
+<activity  xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap><map from="password" to="password" /><map from="userid" to="userid" /><map from="params" to="params" /><map from="url" to="url" /><map from="provideXml" to="provideXml" /><map from="driver" to="driver" /><map from="sql" to="sql" /></inputMap><outputMap><map from="resultList" to="resultList" /><map from="xmlresults" to="xmlresults" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+
+  <script>
+ import java.sql.Driver;
+import java.sql.DriverManager;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+
+import javax.sql.rowset.WebRowSet;
+
+import com.sun.rowset.WebRowSetImpl;
+
+
+
+if ((driver == void) || (driver == null) || driver.equals("")) {
+	throw new RuntimeException("The driver must be specified");
+}
+
+if ((url == void) || (url == null) || url.equals("")) {
+	throw new RuntimeException("The url must be specified");
+}
+
+boolean provideXmlBoolean = ((provideXml != void) &amp;&amp; (provideXml != null) &amp;&amp; Boolean.valueOf(provideXml));
+
+if ((params == void) || (params == null)) {
+   params = new ArrayList();
+}
+
+if ((sql == void) || (sql == null) || sql.equals("")) {
+	throw new RuntimeException("The sql must be specified");
+}
+
+Class c = Thread.currentThread().getContextClassLoader().loadClass(driver);
+
+if (c == null) {
+	throw new RuntimeException("Class " + driver + " not found");
+}
+
+Driver d = c.newInstance();
+if (d == null) {
+	throw new RuntimeException("Could not create instance of driver");
+}
+
+Properties p = new Properties();
+
+if ((userid == void) || (userid == null)) {
+	userid = "";
+}
+
+p.setProperty("user", userid);
+
+if ((password == void) || (password == null)) {
+	password = "";
+}
+
+p.setProperty("password", password);
+
+Connection con = null;
+PreparedStatement ps = null;
+ResultSet rs = null;
+try {
+
+	con = d.connect(url, p);
+	ps = con.prepareStatement(sql);
+
+	int paramSize = params.size();
+	for (int i = 0; i &lt; paramSize; i++) {
+		ps.setObject(i + 1, params.get(i));
+	}
+
+	rs = ps.executeQuery();
+
+	if (provideXmlBoolean) {
+		WebRowSet webrs = new WebRowSetImpl();
+		StringWriter sw = new StringWriter();
+		webrs.writeXml(rs, sw);
+		xmlresults = sw.toString();
+	} else {
+		xmlresults = "";
+	}
+
+	try {
+		rs.beforeFirst();
+	} catch (SQLException e) {
+		// redo the query
+		rs = ps.executeQuery();
+	}
+
+	ResultSetMetaData rsmd = rs.getMetaData();
+	int numCols = rsmd.getColumnCount();
+	resultList = new ArrayList();
+	
+	// put the results into the results list.
+	while (rs.next()) {
+		List row = new ArrayList(numCols);
+		for (int i = 0; i &lt; numCols; i++) {
+			String str = rs.getString(i + 1); 
+			row.add(str == null ? "null" : str); 
+		}
+		resultList.add(row);
+	}
+}
+finally {
+	if (rs != null) {
+		rs.close();
+	}
+	if (ps != null) {
+		ps.close();
+	}
+	if (con != null) {
+		con.close();
+	}
+}
+  
+
+ </script>
+
+  <dependencies />
+
+  <classLoaderSharing>system</classLoaderSharing>
+
+  <localDependencies />
+
+  <artifactDependencies />
+
+  <inputs>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+      <handledReferenceSchemes />
+
+      <translatedElementType>java.lang.String</translatedElementType>
+
+      <allowsLiteralValues>true</allowsLiteralValues>
+
+      <name>driver</name>
+
+      <depth>0</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+      <handledReferenceSchemes />
+
+      <translatedElementType>java.lang.String</translatedElementType>
+
+      <allowsLiteralValues>true</allowsLiteralValues>
+
+      <name>password</name>
+
+      <depth>0</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+      <handledReferenceSchemes />
+
+      <translatedElementType>java.lang.String</translatedElementType>
+
+      <allowsLiteralValues>true</allowsLiteralValues>
+
+      <name>userid</name>
+
+      <depth>0</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+      <handledReferenceSchemes />
+
+      <translatedElementType>java.lang.String</translatedElementType>
+
+      <allowsLiteralValues>true</allowsLiteralValues>
+
+      <name>url</name>
+
+      <depth>0</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+      <handledReferenceSchemes />
+
+      <translatedElementType>java.lang.String</translatedElementType>
+
+      <allowsLiteralValues>true</allowsLiteralValues>
+
+      <name>provideXml</name>
+
+      <depth>0</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+      <handledReferenceSchemes />
+
+      <translatedElementType>java.lang.String</translatedElementType>
+
+      <allowsLiteralValues>true</allowsLiteralValues>
+
+      <name>sql</name>
+
+      <depth>0</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+      <handledReferenceSchemes />
+
+      <translatedElementType>java.lang.String</translatedElementType>
+
+      <allowsLiteralValues>true</allowsLiteralValues>
+
+      <name>params</name>
+
+      <depth>1</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+  </inputs>
+
+  <outputs>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+
+      <granularDepth>2</granularDepth>
+
+      <name>resultList</name>
+
+      <depth>2</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+
+      <granularDepth>0</granularDepth>
+
+      <name>xmlresults</name>
+
+      <depth>0</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+
+  </outputs>
+
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean><annotations /></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker.json
new file mode 100644
index 0000000..da1f005
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker.json
@@ -0,0 +1,44 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "\n import java.sql.Driver;\nimport java.sql.DriverManager;\nimport java.sql.Connection;\nimport java.sql.PreparedStatement;\nimport java.sql.ResultSet;\nimport java.sql.ResultSetMetaData;\nimport java.sql.SQLException;\n\nimport javax.sql.rowset.WebRowSet;\n\nimport com.sun.rowset.WebRowSetImpl;\n\n\n\nif ((driver == void) || (driver == null) || driver.equals(\"\")) {\n\tthrow new RuntimeException(\"The driver must be specified\");\n}\n\nif ((url == void) || (url == null) || url.equals(\"\")) {\n\tthrow new RuntimeException(\"The url must be specified\");\n}\n\nboolean provideXmlBoolean = ((provideXml != void) && (provideXml != null) && Boolean.valueOf(provideXml));\n\nif ((params == void) || (params == null)) {\n   params = new ArrayList();\n}\n\nif ((sql == void) || (sql == null) || sql.equals(\"\")) {\n\tthrow new RuntimeException(\"The sql must be specified\");\n}\n\nClass c = Thread.currentThread().getContextClassLoader().loadClass(driver);\n\nif (c == null) {\n\t
 throw new RuntimeException(\"Class \" + driver + \" not found\");\n}\n\nDriver d = c.newInstance();\nif (d == null) {\n\tthrow new RuntimeException(\"Could not create instance of driver\");\n}\n\nProperties p = new Properties();\n\nif ((userid == void) || (userid == null)) {\n\tuserid = \"\";\n}\n\np.setProperty(\"user\", userid);\n\nif ((password == void) || (password == null)) {\n\tpassword = \"\";\n}\n\np.setProperty(\"password\", password);\n\nConnection con = null;\nPreparedStatement ps = null;\nResultSet rs = null;\ntry {\n\n\tcon = d.connect(url, p);\n\tps = con.prepareStatement(sql);\n\n\tint paramSize = params.size();\n\tfor (int i = 0; i < paramSize; i++) {\n\t\tps.setObject(i + 1, params.get(i));\n\t}\n\n\trs = ps.executeQuery();\n\n\tif (provideXmlBoolean) {\n\t\tWebRowSet webrs = new WebRowSetImpl();\n\t\tStringWriter sw = new StringWriter();\n\t\twebrs.writeXml(rs, sw);\n\t\txmlresults = sw.toString();\n\t} else {\n\t\txmlresults = \"\";\n\t}\n\n\ttry {\n\t\trs.beforeF
 irst();\n\t} catch (SQLException e) {\n\t\t// redo the query\n\t\trs = ps.executeQuery();\n\t}\n\n\tResultSetMetaData rsmd = rs.getMetaData();\n\tint numCols = rsmd.getColumnCount();\n\tresultList = new ArrayList();\n\t\n\t// put the results into the results list.\n\twhile (rs.next()) {\n\t\tList row = new ArrayList(numCols);\n\t\tfor (int i = 0; i < numCols; i++) {\n\t\t\tString str = rs.getString(i + 1); \n\t\t\trow.add(str == null ? \"null\" : str); \n\t\t}\n\t\tresultList.add(row);\n\t}\n}\nfinally {\n\tif (rs != null) {\n\t\trs.close();\n\t}\n\tif (ps != null) {\n\t\tps.close();\n\t}\n\tif (con != null) {\n\t\tcon.close();\n\t}\n}\n  \n\n ",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker",
+  "inputPorts" : [ {
+    "name" : "driver",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "password",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "userid",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "url",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "provideXml",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "sql",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "params",
+    "depth" : 1,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "resultList",
+    "depth" : 2,
+    "granularDepth" : 2
+  }, {
+    "name" : "xmlresults",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker
new file mode 100644
index 0000000..fa0748c
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker
@@ -0,0 +1,229 @@
+<activity  xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap><map from="password" to="password" /><map from="userid" to="userid" /><map from="params" to="params" /><map from="url" to="url" /><map from="provideXml" to="provideXml" /><map from="driver" to="driver" /><map from="sql" to="sql" /></inputMap><outputMap><map from="resultList" to="resultList" /><map from="xmlresults" to="xmlresults" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+
+  <script>import java.sql.Driver;
+import java.sql.DriverManager;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+
+if ((driver == void) || (driver == null) || driver.equals("")) {
+	throw new RuntimeException("The driver must be specified");
+}
+
+if ((url == void) || (url == null) || url.equals("")) {
+	throw new RuntimeException("The url must be specified");
+}
+
+if ((params == void) || (params == null)) {
+   params = new ArrayList();
+}
+
+if ((sql == void) || (sql == null) || sql.equals("")) {
+	throw new RuntimeException("The sql must be specified");
+}
+
+Class c = Thread.currentThread().getContextClassLoader().loadClass(driver);
+
+if (c == null) {
+	throw new RuntimeException("Class " + driver + " not found");
+}
+
+Driver d = c.newInstance();
+if (d == null) {
+	throw new RuntimeException("Could not create instance of driver");
+}
+
+Properties p = new Properties();
+
+if ((userid == void) || (userid == null)) {
+	userid = "";
+}
+
+p.setProperty("user", userid);
+
+if ((password == void) || (password == null)) {
+	password = "";
+}
+
+p.setProperty("password", password);
+
+Connection con = null;
+PreparedStatement ps = null;
+
+try {
+	con = d.connect(url, p);
+	ps = con.prepareStatement(sql);
+
+	int paramsSize = params.size();
+	for (int i = 0; i &lt; paramsSize; i++) {
+		ps.setObject(i + 1, params.get(i));
+	}
+
+	ps.executeUpdate();
+
+	resultList = "update successful";
+}
+finally {
+	if (ps != null) {
+		ps.close();
+	}
+	if (con != null) {
+		con.close();
+	}
+}
+
+</script>
+
+  <dependencies />
+
+  <classLoaderSharing>system</classLoaderSharing>
+    <localDependencies />
+
+  <artifactDependencies />
+
+  <inputs>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+      <handledReferenceSchemes />
+
+      <translatedElementType>java.lang.String</translatedElementType>
+
+      <allowsLiteralValues>true</allowsLiteralValues>
+
+      <name>driver</name>
+
+      <depth>0</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+      <handledReferenceSchemes />
+
+      <translatedElementType>java.lang.String</translatedElementType>
+
+      <allowsLiteralValues>true</allowsLiteralValues>
+
+      <name>password</name>
+
+      <depth>0</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+      <handledReferenceSchemes />
+
+      <translatedElementType>java.lang.String</translatedElementType>
+
+      <allowsLiteralValues>true</allowsLiteralValues>
+
+      <name>userid</name>
+
+      <depth>0</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+      <handledReferenceSchemes />
+
+      <translatedElementType>java.lang.String</translatedElementType>
+
+      <allowsLiteralValues>true</allowsLiteralValues>
+
+      <name>url</name>
+
+      <depth>0</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+      <handledReferenceSchemes />
+
+      <translatedElementType>java.lang.String</translatedElementType>
+
+      <allowsLiteralValues>true</allowsLiteralValues>
+
+      <name>sql</name>
+
+      <depth>0</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+      <handledReferenceSchemes />
+
+      <translatedElementType>java.lang.String</translatedElementType>
+
+      <allowsLiteralValues>true</allowsLiteralValues>
+
+      <name>params</name>
+
+      <depth>1</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+
+  </inputs>
+
+  <outputs>
+
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+
+      <granularDepth>0</granularDepth>
+
+      <name>resultList</name>
+
+      <depth>0</depth>
+
+      <mimeTypes>
+
+        <string>text/plain</string>
+
+      </mimeTypes>
+
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+
+  </outputs>
+
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean><annotations /></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker.json
new file mode 100644
index 0000000..3144afd
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker.json
@@ -0,0 +1,36 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import java.sql.Driver;\nimport java.sql.DriverManager;\nimport java.sql.Connection;\nimport java.sql.PreparedStatement;\n\nif ((driver == void) || (driver == null) || driver.equals(\"\")) {\n\tthrow new RuntimeException(\"The driver must be specified\");\n}\n\nif ((url == void) || (url == null) || url.equals(\"\")) {\n\tthrow new RuntimeException(\"The url must be specified\");\n}\n\nif ((params == void) || (params == null)) {\n   params = new ArrayList();\n}\n\nif ((sql == void) || (sql == null) || sql.equals(\"\")) {\n\tthrow new RuntimeException(\"The sql must be specified\");\n}\n\nClass c = Thread.currentThread().getContextClassLoader().loadClass(driver);\n\nif (c == null) {\n\tthrow new RuntimeException(\"Class \" + driver + \" not found\");\n}\n\nDriver d = c.newInstance();\nif (d == null) {\n\tthrow new RuntimeException(\"Could not create instance of driver\");\n}\n\nProperties p = new Properties();\n\nif ((userid == void) || (userid == null)) {\n\tuserid = \"
 \";\n}\n\np.setProperty(\"user\", userid);\n\nif ((password == void) || (password == null)) {\n\tpassword = \"\";\n}\n\np.setProperty(\"password\", password);\n\nConnection con = null;\nPreparedStatement ps = null;\n\ntry {\n\tcon = d.connect(url, p);\n\tps = con.prepareStatement(sql);\n\n\tint paramsSize = params.size();\n\tfor (int i = 0; i < paramsSize; i++) {\n\t\tps.setObject(i + 1, params.get(i));\n\t}\n\n\tps.executeUpdate();\n\n\tresultList = \"update successful\";\n}\nfinally {\n\tif (ps != null) {\n\t\tps.close();\n\t}\n\tif (con != null) {\n\t\tcon.close();\n\t}\n}\n\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker",
+  "inputPorts" : [ {
+    "name" : "driver",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "password",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "userid",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "url",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "sql",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "params",
+    "depth" : 1,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "resultList",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker
new file mode 100644
index 0000000..8b7a680
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker
@@ -0,0 +1,45 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>if ((id == void) || (id == null) || id.equals("")) {
+	throw new RunTimeException("port id must have a non-empty value");
+}
+
+URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&amp;db=nucleotide&amp;retmode=text&amp;id=" + id);
+
+BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
+StringWriter writer = new StringWriter();
+
+char[] buffer = new char[1024];
+    while (true) {
+        int r = reader.read(buffer);
+        if (r &lt;= 0) {
+            break;
+        }
+        writer.write(buffer, 0, r);
+    }
+reader.close();
+outputText = writer.toString();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>id</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>outputText</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker.json
new file mode 100644
index 0000000..feb26cc
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&db=nucleotide&retmode=text&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker",
+  "inputPorts" : [ {
+    "name" : "id",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputText",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker
new file mode 100644
index 0000000..80f791a
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker
@@ -0,0 +1,45 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>if ((id == void) || (id == null) || id.equals("")) {
+	throw new RunTimeException("port id must have a non-empty value");
+}
+
+URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gb&amp;db=nucleotide&amp;retmode=xml&amp;id=" + id);
+
+BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
+StringWriter writer = new StringWriter();
+
+char[] buffer = new char[1024];
+    while (true) {
+        int r = reader.read(buffer);
+        if (r &lt;= 0) {
+            break;
+        }
+        writer.write(buffer, 0, r);
+    }
+reader.close();
+outputText = writer.toString();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>id</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>outputText</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker.json
new file mode 100644
index 0000000..e616f51
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gb&db=nucleotide&retmode=xml&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker",
+  "inputPorts" : [ {
+    "name" : "id",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputText",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker
new file mode 100644
index 0000000..2ce601b
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker
@@ -0,0 +1,45 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>if ((id == void) || (id == null) || id.equals("")) {
+	throw new RunTimeException("port id must have a non-empty value");
+}
+
+URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gbc&amp;db=nucleotide&amp;retmode=xml&amp;id=" + id);
+
+BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
+StringWriter writer = new StringWriter();
+
+char[] buffer = new char[1024];
+    while (true) {
+        int r = reader.read(buffer);
+        if (r &lt;= 0) {
+            break;
+        }
+        writer.write(buffer, 0, r);
+    }
+reader.close();
+outputText = writer.toString();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>id</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>outputText</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker.json
new file mode 100644
index 0000000..8dfbdbe
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gbc&db=nucleotide&retmode=xml&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker",
+  "inputPorts" : [ {
+    "name" : "id",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputText",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker
new file mode 100644
index 0000000..aad694a
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker
@@ -0,0 +1,45 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>if ((id == void) || (id == null) || id.equals("")) {
+	throw new RunTimeException("port id must have a non-empty value");
+}
+
+URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&amp;db=nucleotide&amp;retmode=xml&amp;id=" + id);
+
+BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
+StringWriter writer = new StringWriter();
+
+char[] buffer = new char[1024];
+    while (true) {
+        int r = reader.read(buffer);
+        if (r &lt;= 0) {
+            break;
+        }
+        writer.write(buffer, 0, r);
+    }
+reader.close();
+outputText = writer.toString();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>id</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>outputText</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker.json
new file mode 100644
index 0000000..3867455
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&db=nucleotide&retmode=xml&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker",
+  "inputPorts" : [ {
+    "name" : "id",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputText",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker
new file mode 100644
index 0000000..c07b04e
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker
@@ -0,0 +1,45 @@
+<activity  xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>if ((id == void) || (id == null) || id.equals("")) {
+	throw new RunTimeException("port id must have a non-empty value");
+}
+
+URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&amp;db=protein&amp;retmode=text&amp;id=" + id);
+
+BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
+StringWriter writer = new StringWriter();
+
+char[] buffer = new char[1024];
+    while (true) {
+        int r = reader.read(buffer);
+        if (r &lt;= 0) {
+            break;
+        }
+        writer.write(buffer, 0, r);
+    }
+reader.close();
+outputText = writer.toString();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>id</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>outputText</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker.json
new file mode 100644
index 0000000..fc5b181
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&db=protein&retmode=text&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker",
+  "inputPorts" : [ {
+    "name" : "id",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputText",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker
new file mode 100644
index 0000000..bf85c2b
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker
@@ -0,0 +1,45 @@
+<activity  xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>if ((id == void) || (id == null) || id.equals("")) {
+	throw new RunTimeException("port id must have a non-empty value");
+}
+
+URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gb&amp;db=protein&amp;retmode=xml&amp;id=" + id);
+
+BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
+StringWriter writer = new StringWriter();
+
+char[] buffer = new char[1024];
+    while (true) {
+        int r = reader.read(buffer);
+        if (r &lt;= 0) {
+            break;
+        }
+        writer.write(buffer, 0, r);
+    }
+reader.close();
+outputText = writer.toString();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>id</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>outputText</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker.json
new file mode 100644
index 0000000..160ce92
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gb&db=protein&retmode=xml&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker",
+  "inputPorts" : [ {
+    "name" : "id",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputText",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker
new file mode 100644
index 0000000..c82209f
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker
@@ -0,0 +1,45 @@
+<activity  xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>if ((id == void) || (id == null) || id.equals("")) {
+	throw new RunTimeException("port id must have a non-empty value");
+}
+
+URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gbc&amp;db=protein&amp;retmode=xml&amp;id=" + id);
+
+BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
+StringWriter writer = new StringWriter();
+
+char[] buffer = new char[1024];
+    while (true) {
+        int r = reader.read(buffer);
+        if (r &lt;= 0) {
+            break;
+        }
+        writer.write(buffer, 0, r);
+    }
+reader.close();
+outputText = writer.toString();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>id</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>outputText</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker.json
new file mode 100644
index 0000000..6e36120
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gbc&db=protein&retmode=xml&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker",
+  "inputPorts" : [ {
+    "name" : "id",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputText",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker
new file mode 100644
index 0000000..b6f9337
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker
@@ -0,0 +1,45 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>if ((id == void) || (id == null) || id.equals("")) {
+	throw new RunTimeException("port id must have a non-empty value");
+}
+
+URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&amp;db=protein&amp;retmode=xml&amp;id=" + id);
+
+BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
+StringWriter writer = new StringWriter();
+
+char[] buffer = new char[1024];
+    while (true) {
+        int r = reader.read(buffer);
+        if (r &lt;= 0) {
+            break;
+        }
+        writer.write(buffer, 0, r);
+    }
+reader.close();
+outputText = writer.toString();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>id</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>outputText</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker.json
new file mode 100644
index 0000000..471e000
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&db=protein&retmode=xml&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker",
+  "inputPorts" : [ {
+    "name" : "id",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputText",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker
new file mode 100644
index 0000000..71fef3c
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker
@@ -0,0 +1,68 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>if ((id == void) || (id == null) || id.equals("")) {
+	throw new RunTimeException("port id must have a non-empty value");
+}
+
+URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed" +
+"&amp;rettype=" + (((rettype == void ) || (rettype == null)) ? "full" : rettype) +
+"&amp;retmode=" + (((retmode == void) || (retmode == null)) ? "xml" : retmode) +
+"&amp;id=" + id);
+
+BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
+StringWriter writer = new StringWriter();
+
+char[] buffer = new char[1024];
+    while (true) {
+        int r = reader.read(buffer);
+        if (r &lt;= 0) {
+            break;
+        }
+        writer.write(buffer, 0, r);
+    }
+reader.close();
+outputText = writer.toString();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>id</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>rettype</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>retmode</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>outputText</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file


[47/50] [abbrv] incubator-taverna-workbench-common-activities git commit: Merge from https://github.com/taverna/taverna-xpath-activity-ui master

Posted by st...@apache.org.
Merge from https://github.com/taverna/taverna-xpath-activity-ui master


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/0f3b08ea
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/0f3b08ea
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/0f3b08ea

Branch: refs/heads/master
Commit: 0f3b08ea6459518b59d3d54a571b2a53d1a37690
Parents: bf8df6b 90ee9c4
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:34:40 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:34:40 2015 +0000

----------------------------------------------------------------------
 taverna-xpath-activity-ui/pom.xml               |   68 +
 .../xpath/ui/config/TwoFieldQueryPanel.java     |  110 ++
 .../config/XPathActivityConfigurationPanel.java | 1202 ++++++++++++++++++
 ...XPathActivityConfigurationPanelProvider.java |  158 +++
 .../ui/config/XPathActivityConfigureAction.java |   52 +
 .../ui/config/xmltree/TableCellListener.java    |  186 +++
 .../ui/config/xmltree/XPathActivityXMLTree.java |  572 +++++++++
 .../XPathActivityXMLTreeAttributeNode.java      |   50 +
 .../XPathActivityXMLTreeElementNode.java        |   62 +
 .../xmltree/XPathActivityXMLTreeNode.java       |   81 ++
 .../XPathActivityXMLTreeSelectionHandler.java   |  251 ++++
 .../ConfigureXPathActivityMenuAction.java       |   65 +
 .../XPathActivityMainContextViewFactory.java    |   59 +
 .../XPathActivityMainContextualView.java        |  209 +++
 .../xpath/ui/menu/AddXPathTemplateAction.java   |  110 ++
 .../ui/menu/AddXPathTemplateMenuAction.java     |  117 ++
 .../servicedescription/XPathActivityIcon.java   |   86 ++
 .../XPathTemplateService.java                   |   57 +
 ...rvicedescriptions.ServiceDescriptionProvider |    1 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |    3 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |    1 +
 ...ntextualviews.activity.ContextualViewFactory |    1 +
 .../spring/xpath-activity-ui-context-osgi.xml   |   28 +
 .../spring/xpath-activity-ui-context.xml        |   49 +
 .../xpath/ui/servicedescription/arrow_right.png |  Bin 0 -> 596 bytes
 .../famfamfam_silk/accept.png                   |  Bin 0 -> 781 bytes
 .../famfamfam_silk/exclamation.png              |  Bin 0 -> 701 bytes
 .../servicedescription/famfamfam_silk/help.png  |  Bin 0 -> 786 bytes
 .../famfamfam_silk/page_white_code.png          |  Bin 0 -> 603 bytes
 .../servicedescription/famfamfam_silk/tag.png   |  Bin 0 -> 389 bytes
 .../text_linespacing (collapse).png             |  Bin 0 -> 371 bytes
 .../famfamfam_silk/text_linespacing.png         |  Bin 0 -> 363 bytes
 .../xpath/ui/servicedescription/folds/fold.png  |  Bin 0 -> 331 bytes
 .../ui/servicedescription/folds/unfold.png      |  Bin 0 -> 334 bytes
 .../ui/servicedescription/xpath_attribute.png   |  Bin 0 -> 1426 bytes
 .../src/test/java/Dom4JTest.java                |   71 ++
 36 files changed, 3649 insertions(+)
----------------------------------------------------------------------



[50/50] [abbrv] incubator-taverna-workbench-common-activities git commit: list modules

Posted by st...@apache.org.
list modules


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/c64d5ce6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/c64d5ce6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/c64d5ce6

Branch: refs/heads/master
Commit: c64d5ce68adbffa2d70f4812778b5bf7638b644e
Parents: 0f3b08e
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue Feb 10 10:41:20 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue Feb 10 10:41:20 2015 +0000

----------------------------------------------------------------------
 pom.xml | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/c64d5ce6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e07803d..0c60cf1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,6 +20,13 @@
     <taverna.workbench.version>3.1.0-incubating-SNAPSHOT</taverna.workbench.version>
   </properties>
 	<modules>
+    <module>taverna-beanshell-activity-ui</module>
+    <module>taverna-external-tool-activity-ui</module>
+    <module>taverna-localworker-activity-ui</module>
+    <module>taverna-rest-activity-ui</module>
+    <module>taverna-spreadsheet-import-activity-ui</module>
+    <module>taverna-wsdl-activity-ui</module>
+    <module>taverna-xpath-activity-ui</module>
   </modules>
   <repositories>
     <repository>


[24/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-localworker-activity-ui/

Posted by st...@apache.org.
taverna-localworker-activity-ui/


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/d157489f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/d157489f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/d157489f

Branch: refs/heads/master
Commit: d157489f1fff9c0d5533be199859b3d5f52a125b
Parents: b241be8
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:27:30 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:27:30 2015 +0000

----------------------------------------------------------------------
 .gitignore                                      |  24 --
 .travis.yml                                     |   1 -
 README.md                                       |   7 -
 pom.xml                                         | 142 ---------
 .../LocalworkerActivityConfigurationAction.java | 117 -------
 .../menu/ConfigureLocalworkerMenuAction.java    |  62 ----
 .../LocalworkerActivityIcon.java                |  58 ----
 .../LocalworkerServiceDescription.java          | 105 -------
 .../LocalworkerServiceProvider.java             | 297 ------------------
 .../views/LocalworkerActivityConfigView.java    |  42 ---
 .../LocalworkerActivityContextualView.java      | 115 -------
 .../views/LocalworkerActivityViewFactory.java   |  82 -----
 ...rvicedescriptions.ServiceDescriptionProvider |   1 -
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |   1 -
 ...a.t2.workbench.activityicons.ActivityIconSPI |   1 -
 ...ntextualviews.activity.ContextualViewFactory |   1 -
 .../localworker-activity-ui-context-osgi.xml    |  24 --
 .../spring/localworker-activity-ui-context.xml  |  27 --
 src/main/resources/localworker.png              | Bin 706 -> 0 bytes
 src/main/resources/localworker_names            |  67 ----
 ...rna.scuflworkers.biojava.GenBankParserWorker |  74 -----
 ...cuflworkers.biojava.GenBankParserWorker.json |  16 -
 ...verna.scuflworkers.biojava.ReverseCompWorker |  43 ---
 ....scuflworkers.biojava.ReverseCompWorker.json |  16 -
 ...a.scuflworkers.biojava.SwissProtParserWorker |  72 -----
 ...flworkers.biojava.SwissProtParserWorker.json |  16 -
 ...averna.scuflworkers.biojava.TranscribeWorker |  48 ---
 ...a.scuflworkers.biojava.TranscribeWorker.json |  16 -
 ...na.scuflworkers.io.ConcatenateFileListWorker | 101 ------
 ...uflworkers.io.ConcatenateFileListWorker.json |  24 --
 ...ge.taverna.scuflworkers.io.EnvVariableWorker |  33 --
 ...verna.scuflworkers.io.EnvVariableWorker.json |  11 -
 ...ge.taverna.scuflworkers.io.FileListByExtTask |  73 -----
 ...verna.scuflworkers.io.FileListByExtTask.json |  20 --
 ....taverna.scuflworkers.io.FileListByRegexTask |  71 -----
 ...rna.scuflworkers.io.FileListByRegexTask.json |  20 --
 ...ceforge.taverna.scuflworkers.io.LocalCommand |  80 -----
 ...ge.taverna.scuflworkers.io.LocalCommand.json |  20 --
 ...forge.taverna.scuflworkers.io.TextFileReader |  76 -----
 ....taverna.scuflworkers.io.TextFileReader.json |  20 --
 ...forge.taverna.scuflworkers.io.TextFileWriter |  57 ----
 ....taverna.scuflworkers.io.TextFileWriter.json |  24 --
 ...rge.taverna.scuflworkers.jdbc.SQLQueryWorker | 309 -------------------
 ...averna.scuflworkers.jdbc.SQLQueryWorker.json |  44 ---
 ...ge.taverna.scuflworkers.jdbc.SQLUpdateWorker | 229 --------------
 ...verna.scuflworkers.jdbc.SQLUpdateWorker.json |  36 ---
 ...erna.scuflworkers.ncbi.NucleotideFastaWorker |  45 ---
 ...scuflworkers.ncbi.NucleotideFastaWorker.json |  16 -
 ...erna.scuflworkers.ncbi.NucleotideGBSeqWorker |  45 ---
 ...scuflworkers.ncbi.NucleotideGBSeqWorker.json |  16 -
 ...scuflworkers.ncbi.NucleotideINSDSeqXMLWorker |  45 ---
 ...workers.ncbi.NucleotideINSDSeqXMLWorker.json |  16 -
 ...scuflworkers.ncbi.NucleotideTinySeqXMLWorker |  45 ---
 ...workers.ncbi.NucleotideTinySeqXMLWorker.json |  16 -
 ...taverna.scuflworkers.ncbi.ProteinFastaWorker |  45 ---
 ...na.scuflworkers.ncbi.ProteinFastaWorker.json |  16 -
 ...taverna.scuflworkers.ncbi.ProteinGBSeqWorker |  45 ---
 ...na.scuflworkers.ncbi.ProteinGBSeqWorker.json |  16 -
 ...na.scuflworkers.ncbi.ProteinINSDSeqXMLWorker |  45 ---
 ...uflworkers.ncbi.ProteinINSDSeqXMLWorker.json |  16 -
 ...na.scuflworkers.ncbi.ProteinTinySeqXMLWorker |  45 ---
 ...uflworkers.ncbi.ProteinTinySeqXMLWorker.json |  16 -
 ...taverna.scuflworkers.ncbi.PubMedEFetchWorker |  68 ----
 ...na.scuflworkers.ncbi.PubMedEFetchWorker.json |  24 --
 ...averna.scuflworkers.ncbi.PubMedESearchWorker | 124 --------
 ...a.scuflworkers.ncbi.PubMedESearchWorker.json |  44 ---
 ...urceforge.taverna.scuflworkers.net.BrowseUrl |  31 --
 ...orge.taverna.scuflworkers.net.BrowseUrl.json |  11 -
 ...forge.taverna.scuflworkers.net.ExtractHeader |  55 ----
 ....taverna.scuflworkers.net.ExtractHeader.json |  20 --
 ...ourceforge.taverna.scuflworkers.ui.AskWorker |  41 ---
 ...forge.taverna.scuflworkers.ui.AskWorker.json |  20 --
 ...ceforge.taverna.scuflworkers.ui.ChooseWorker |  80 -----
 ...ge.taverna.scuflworkers.ui.ChooseWorker.json |  24 --
 ...rge.taverna.scuflworkers.ui.SelectFileWorker | 116 -------
 ...averna.scuflworkers.ui.SelectFileWorker.json |  24 --
 ...ceforge.taverna.scuflworkers.ui.SelectWorker |  53 ----
 ...ge.taverna.scuflworkers.ui.SelectWorker.json |  24 --
 ...urceforge.taverna.scuflworkers.ui.TellWorker |  42 ---
 ...orge.taverna.scuflworkers.ui.TellWorker.json |  20 --
 ...urceforge.taverna.scuflworkers.ui.WarnWorker |  42 ---
 ...orge.taverna.scuflworkers.ui.WarnWorker.json |  20 --
 ...rge.taverna.scuflworkers.xml.XPathTextWorker |  75 -----
 ...averna.scuflworkers.xml.XPathTextWorker.json |  24 --
 ...rceforge.taverna.scuflworkers.xml.XSLTWorker | 152 ---------
 ...rge.taverna.scuflworkers.xml.XSLTWorker.json |  28 --
 ...na.scuflworkers.xml.XSLTWorkerWithParameters | 100 ------
 ...uflworkers.xml.XSLTWorkerWithParameters.json |  24 --
 ...escience.scuflworkers.java.ByteArrayToString |  44 ---
 ...nce.scuflworkers.java.ByteArrayToString.json |  20 --
 ....ebi.escience.scuflworkers.java.DecodeBase64 |  31 --
 ...escience.scuflworkers.java.DecodeBase64.json |  16 -
 ...embl.ebi.escience.scuflworkers.java.EchoList |  26 --
 ...ebi.escience.scuflworkers.java.EchoList.json |  16 -
 ...escience.scuflworkers.java.EmitLotsOfStrings |  19 --
 ...nce.scuflworkers.java.EmitLotsOfStrings.json |  11 -
 ....ebi.escience.scuflworkers.java.EncodeBase64 |  30 --
 ...escience.scuflworkers.java.EncodeBase64.json |  16 -
 ...escience.scuflworkers.java.ExtractImageLinks |  41 ---
 ...nce.scuflworkers.java.ExtractImageLinks.json |  16 -
 ....escience.scuflworkers.java.FilterStringList |  43 ---
 ...ence.scuflworkers.java.FilterStringList.json |  20 --
 ...l.ebi.escience.scuflworkers.java.FlattenList |  39 ---
 ....escience.scuflworkers.java.FlattenList.json |  16 -
 ...mbl.ebi.escience.scuflworkers.java.PadNumber |  44 ---
 ...bi.escience.scuflworkers.java.PadNumber.json |  20 --
 ...cuflworkers.java.RegularExpressionStringList |  60 ----
 ...orkers.java.RegularExpressionStringList.json |  24 --
 ...mbl.ebi.escience.scuflworkers.java.SendEmail |  85 -----
 ...bi.escience.scuflworkers.java.SendEmail.json |  27 --
 ....ebi.escience.scuflworkers.java.SplitByRegex |  47 ---
 ...escience.scuflworkers.java.SplitByRegex.json |  20 --
 ....ebi.escience.scuflworkers.java.StringConcat |  36 ---
 ...escience.scuflworkers.java.StringConcat.json |  20 --
 ...i.escience.scuflworkers.java.StringListMerge |  49 ---
 ...ience.scuflworkers.java.StringListMerge.json |  20 --
 ...cience.scuflworkers.java.StringSetDifference |  49 ---
 ...e.scuflworkers.java.StringSetDifference.json |  20 --
 ...ence.scuflworkers.java.StringSetIntersection |  43 ---
 ...scuflworkers.java.StringSetIntersection.json |  20 --
 ...bi.escience.scuflworkers.java.StringSetUnion |  43 ---
 ...cience.scuflworkers.java.StringSetUnion.json |  20 --
 ...ence.scuflworkers.java.StringStripDuplicates |  33 --
 ...scuflworkers.java.StringStripDuplicates.json |  16 -
 ...scuflworkers.java.TestAlwaysFailingProcessor |  36 ---
 ...workers.java.TestAlwaysFailingProcessor.json |  20 --
 ...science.scuflworkers.java.TestSometimesFails |  34 --
 ...ce.scuflworkers.java.TestSometimesFails.json |  16 -
 ...i.escience.scuflworkers.java.WebImageFetcher |  64 ----
 ...ience.scuflworkers.java.WebImageFetcher.json |  20 --
 ...bi.escience.scuflworkers.java.WebPageFetcher |  68 ----
 ...cience.scuflworkers.java.WebPageFetcher.json |  20 --
 taverna-localworker-activity-ui/pom.xml         | 142 +++++++++
 .../LocalworkerActivityConfigurationAction.java | 117 +++++++
 .../menu/ConfigureLocalworkerMenuAction.java    |  62 ++++
 .../LocalworkerActivityIcon.java                |  58 ++++
 .../LocalworkerServiceDescription.java          | 105 +++++++
 .../LocalworkerServiceProvider.java             | 297 ++++++++++++++++++
 .../views/LocalworkerActivityConfigView.java    |  42 +++
 .../LocalworkerActivityContextualView.java      | 115 +++++++
 .../views/LocalworkerActivityViewFactory.java   |  82 +++++
 ...rvicedescriptions.ServiceDescriptionProvider |   1 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |   1 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |   1 +
 ...ntextualviews.activity.ContextualViewFactory |   1 +
 .../localworker-activity-ui-context-osgi.xml    |  24 ++
 .../spring/localworker-activity-ui-context.xml  |  27 ++
 .../src/main/resources/localworker.png          | Bin 0 -> 706 bytes
 .../src/main/resources/localworker_names        |  67 ++++
 ...rna.scuflworkers.biojava.GenBankParserWorker |  74 +++++
 ...cuflworkers.biojava.GenBankParserWorker.json |  16 +
 ...verna.scuflworkers.biojava.ReverseCompWorker |  43 +++
 ....scuflworkers.biojava.ReverseCompWorker.json |  16 +
 ...a.scuflworkers.biojava.SwissProtParserWorker |  72 +++++
 ...flworkers.biojava.SwissProtParserWorker.json |  16 +
 ...averna.scuflworkers.biojava.TranscribeWorker |  48 +++
 ...a.scuflworkers.biojava.TranscribeWorker.json |  16 +
 ...na.scuflworkers.io.ConcatenateFileListWorker | 101 ++++++
 ...uflworkers.io.ConcatenateFileListWorker.json |  24 ++
 ...ge.taverna.scuflworkers.io.EnvVariableWorker |  33 ++
 ...verna.scuflworkers.io.EnvVariableWorker.json |  11 +
 ...ge.taverna.scuflworkers.io.FileListByExtTask |  73 +++++
 ...verna.scuflworkers.io.FileListByExtTask.json |  20 ++
 ....taverna.scuflworkers.io.FileListByRegexTask |  71 +++++
 ...rna.scuflworkers.io.FileListByRegexTask.json |  20 ++
 ...ceforge.taverna.scuflworkers.io.LocalCommand |  80 +++++
 ...ge.taverna.scuflworkers.io.LocalCommand.json |  20 ++
 ...forge.taverna.scuflworkers.io.TextFileReader |  76 +++++
 ....taverna.scuflworkers.io.TextFileReader.json |  20 ++
 ...forge.taverna.scuflworkers.io.TextFileWriter |  57 ++++
 ....taverna.scuflworkers.io.TextFileWriter.json |  24 ++
 ...rge.taverna.scuflworkers.jdbc.SQLQueryWorker | 309 +++++++++++++++++++
 ...averna.scuflworkers.jdbc.SQLQueryWorker.json |  44 +++
 ...ge.taverna.scuflworkers.jdbc.SQLUpdateWorker | 229 ++++++++++++++
 ...verna.scuflworkers.jdbc.SQLUpdateWorker.json |  36 +++
 ...erna.scuflworkers.ncbi.NucleotideFastaWorker |  45 +++
 ...scuflworkers.ncbi.NucleotideFastaWorker.json |  16 +
 ...erna.scuflworkers.ncbi.NucleotideGBSeqWorker |  45 +++
 ...scuflworkers.ncbi.NucleotideGBSeqWorker.json |  16 +
 ...scuflworkers.ncbi.NucleotideINSDSeqXMLWorker |  45 +++
 ...workers.ncbi.NucleotideINSDSeqXMLWorker.json |  16 +
 ...scuflworkers.ncbi.NucleotideTinySeqXMLWorker |  45 +++
 ...workers.ncbi.NucleotideTinySeqXMLWorker.json |  16 +
 ...taverna.scuflworkers.ncbi.ProteinFastaWorker |  45 +++
 ...na.scuflworkers.ncbi.ProteinFastaWorker.json |  16 +
 ...taverna.scuflworkers.ncbi.ProteinGBSeqWorker |  45 +++
 ...na.scuflworkers.ncbi.ProteinGBSeqWorker.json |  16 +
 ...na.scuflworkers.ncbi.ProteinINSDSeqXMLWorker |  45 +++
 ...uflworkers.ncbi.ProteinINSDSeqXMLWorker.json |  16 +
 ...na.scuflworkers.ncbi.ProteinTinySeqXMLWorker |  45 +++
 ...uflworkers.ncbi.ProteinTinySeqXMLWorker.json |  16 +
 ...taverna.scuflworkers.ncbi.PubMedEFetchWorker |  68 ++++
 ...na.scuflworkers.ncbi.PubMedEFetchWorker.json |  24 ++
 ...averna.scuflworkers.ncbi.PubMedESearchWorker | 124 ++++++++
 ...a.scuflworkers.ncbi.PubMedESearchWorker.json |  44 +++
 ...urceforge.taverna.scuflworkers.net.BrowseUrl |  31 ++
 ...orge.taverna.scuflworkers.net.BrowseUrl.json |  11 +
 ...forge.taverna.scuflworkers.net.ExtractHeader |  55 ++++
 ....taverna.scuflworkers.net.ExtractHeader.json |  20 ++
 ...ourceforge.taverna.scuflworkers.ui.AskWorker |  41 +++
 ...forge.taverna.scuflworkers.ui.AskWorker.json |  20 ++
 ...ceforge.taverna.scuflworkers.ui.ChooseWorker |  80 +++++
 ...ge.taverna.scuflworkers.ui.ChooseWorker.json |  24 ++
 ...rge.taverna.scuflworkers.ui.SelectFileWorker | 116 +++++++
 ...averna.scuflworkers.ui.SelectFileWorker.json |  24 ++
 ...ceforge.taverna.scuflworkers.ui.SelectWorker |  53 ++++
 ...ge.taverna.scuflworkers.ui.SelectWorker.json |  24 ++
 ...urceforge.taverna.scuflworkers.ui.TellWorker |  42 +++
 ...orge.taverna.scuflworkers.ui.TellWorker.json |  20 ++
 ...urceforge.taverna.scuflworkers.ui.WarnWorker |  42 +++
 ...orge.taverna.scuflworkers.ui.WarnWorker.json |  20 ++
 ...rge.taverna.scuflworkers.xml.XPathTextWorker |  75 +++++
 ...averna.scuflworkers.xml.XPathTextWorker.json |  24 ++
 ...rceforge.taverna.scuflworkers.xml.XSLTWorker | 152 +++++++++
 ...rge.taverna.scuflworkers.xml.XSLTWorker.json |  28 ++
 ...na.scuflworkers.xml.XSLTWorkerWithParameters | 100 ++++++
 ...uflworkers.xml.XSLTWorkerWithParameters.json |  24 ++
 ...escience.scuflworkers.java.ByteArrayToString |  44 +++
 ...nce.scuflworkers.java.ByteArrayToString.json |  20 ++
 ....ebi.escience.scuflworkers.java.DecodeBase64 |  31 ++
 ...escience.scuflworkers.java.DecodeBase64.json |  16 +
 ...embl.ebi.escience.scuflworkers.java.EchoList |  26 ++
 ...ebi.escience.scuflworkers.java.EchoList.json |  16 +
 ...escience.scuflworkers.java.EmitLotsOfStrings |  19 ++
 ...nce.scuflworkers.java.EmitLotsOfStrings.json |  11 +
 ....ebi.escience.scuflworkers.java.EncodeBase64 |  30 ++
 ...escience.scuflworkers.java.EncodeBase64.json |  16 +
 ...escience.scuflworkers.java.ExtractImageLinks |  41 +++
 ...nce.scuflworkers.java.ExtractImageLinks.json |  16 +
 ....escience.scuflworkers.java.FilterStringList |  43 +++
 ...ence.scuflworkers.java.FilterStringList.json |  20 ++
 ...l.ebi.escience.scuflworkers.java.FlattenList |  39 +++
 ....escience.scuflworkers.java.FlattenList.json |  16 +
 ...mbl.ebi.escience.scuflworkers.java.PadNumber |  44 +++
 ...bi.escience.scuflworkers.java.PadNumber.json |  20 ++
 ...cuflworkers.java.RegularExpressionStringList |  60 ++++
 ...orkers.java.RegularExpressionStringList.json |  24 ++
 ...mbl.ebi.escience.scuflworkers.java.SendEmail |  85 +++++
 ...bi.escience.scuflworkers.java.SendEmail.json |  27 ++
 ....ebi.escience.scuflworkers.java.SplitByRegex |  47 +++
 ...escience.scuflworkers.java.SplitByRegex.json |  20 ++
 ....ebi.escience.scuflworkers.java.StringConcat |  36 +++
 ...escience.scuflworkers.java.StringConcat.json |  20 ++
 ...i.escience.scuflworkers.java.StringListMerge |  49 +++
 ...ience.scuflworkers.java.StringListMerge.json |  20 ++
 ...cience.scuflworkers.java.StringSetDifference |  49 +++
 ...e.scuflworkers.java.StringSetDifference.json |  20 ++
 ...ence.scuflworkers.java.StringSetIntersection |  43 +++
 ...scuflworkers.java.StringSetIntersection.json |  20 ++
 ...bi.escience.scuflworkers.java.StringSetUnion |  43 +++
 ...cience.scuflworkers.java.StringSetUnion.json |  20 ++
 ...ence.scuflworkers.java.StringStripDuplicates |  33 ++
 ...scuflworkers.java.StringStripDuplicates.json |  16 +
 ...scuflworkers.java.TestAlwaysFailingProcessor |  36 +++
 ...workers.java.TestAlwaysFailingProcessor.json |  20 ++
 ...science.scuflworkers.java.TestSometimesFails |  34 ++
 ...ce.scuflworkers.java.TestSometimesFails.json |  16 +
 ...i.escience.scuflworkers.java.WebImageFetcher |  64 ++++
 ...ience.scuflworkers.java.WebImageFetcher.json |  20 ++
 ...bi.escience.scuflworkers.java.WebPageFetcher |  68 ++++
 ...cience.scuflworkers.java.WebPageFetcher.json |  20 ++
 261 files changed, 5843 insertions(+), 5875 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index ebe0e5b..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# ignore project files #
-.classpath
-.project
-.settings/
-catalog-v001.xml
-
-# ignore target files #
-target/
-bin/
-build/
-dist/
-apidoc/
-*.swp
-
-# ignore svn files if there
-.svn
-
-# ignore log files #
-*.log
-/logs/*
-*/logs/*
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index dff5f3a..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1 +0,0 @@
-language: java

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
deleted file mode 100644
index fa84f7e..0000000
--- a/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-Taverna Workflow system Local Worker Activity: User Interface part for use in the Taverna Workbench.
-
-[![Build Status](https://travis-ci.org/taverna/taverna-localworker-activity-ui.svg?branch=master)](https://travis-ci.org/taverna/taverna-localworker-activity-ui)
-
-Extends https://github.com/taverna/taverna-localworker-activity
-
-This code was previously hosted at http://taverna.googlecode.com/svn/taverna/ui/net.sf.taverna.t2.ui-activities/

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 556de86..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-                <groupId>net.sf.taverna</groupId>
-                <artifactId>taverna-parent</artifactId>
-                <version>3.0.1-SNAPSHOT</version>
-	</parent>
-	<groupId>net.sf.taverna.t2.ui-activities</groupId>
-	<artifactId>localworker-activity-ui</artifactId>
-        <version>2.0-SNAPSHOT</version>
-	<packaging>bundle</packaging>
-	<name>Taverna 2 Localworker Activity UI</name>
-	<dependencies>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-activities</groupId>
-			<artifactId>beanshell-activity-ui</artifactId>
-			<version>${t2.activities.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-icons-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-palette-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>edits-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>file-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>menu-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>uk.org.taverna.configuration</groupId>
-			<artifactId>taverna-app-configuration-api</artifactId>
-			<version>${taverna.configuration.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>uk.org.taverna.scufl2</groupId>
-			<artifactId>scufl2-api</artifactId>
-			<version>${scufl2.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.core</groupId>
-			<artifactId>jackson-databind</artifactId>
-			<version>2.2.2</version>
-		</dependency>
-
-		<!-- category:biojava -->
-		<!-- net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker -->
-		<!-- net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker -->
-		<!-- net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker -->
-		<!-- net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker -->
-		<dependency>
-			<groupId>uk.org.mygrid.resources</groupId>
-			<artifactId>biojava</artifactId>
-			<version>1.4pre1</version>
-		</dependency>
-		<!-- category:xml -->
-		<!-- net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker -->
-		<dependency>
-			<groupId>org.dom4j</groupId>
-			<artifactId>com.springsource.org.dom4j</artifactId>
-			<version>${dom4j.version}</version>
-		</dependency>
-		<!-- <dependency>
-			<groupId>dom4j</groupId>
-			<artifactId>dom4j</artifactId>
-			<version>1.6</version>
-		</dependency> -->
-		<!-- category:net -->
-		<!-- org.embl.ebi.escience.scuflworkers.java.SendEmail -->
-		<dependency>
-			<groupId>javax.mail</groupId>
-			<artifactId>com.springsource.javax.mail</artifactId>
-			<version>${mail.version}</version>
-		</dependency>
-		<!-- <dependency>
-			<groupId>javax.mail</groupId>
-			<artifactId>mail</artifactId>
-			<version>1.4</version>
-		</dependency> -->
-		<dependency>
-			<groupId>javax.activation</groupId>
-			<artifactId>com.springsource.javax.activation</artifactId>
-			<version>1.1.1</version>
-		</dependency>
-		<!-- <dependency>
-			<groupId>javax.activation</groupId>
-			<artifactId>activation</artifactId>
-			<version>1.1</version>
-		</dependency> -->
-		<!-- category:base64 -->
-		<!-- org.embl.ebi.escience.scuflworkers.java.EncodeBase64 -->
-		<!-- org.embl.ebi.escience.scuflworkers.java.DecodeBase64 -->
-		<dependency>
-			<groupId>commons-codec</groupId>
-			<artifactId>commons-codec</artifactId>
-			<version>${commons.codec.version}</version>
-		</dependency>
-		<!-- <dependency>
-			<groupId>commons-codec</groupId>
-			<artifactId>commons-codec</artifactId>
-			<version>1.3</version>
-		</dependency> -->
-	</dependencies>
-	<repositories>
-		<repository>
-			<releases />
-			<snapshots>
-				<enabled>false</enabled>
-			</snapshots>
-			<id>mygrid-repository</id>
-			<name>myGrid Repository</name>
-			<url>http://www.mygrid.org.uk/maven/repository
-			</url>
-		</repository>
-		<repository>
-			<releases>
-				<enabled>false</enabled>
-			</releases>
-			<snapshots />
-			<id>mygrid-snapshot-repository</id>
-			<name>myGrid Snapshot Repository</name>
-			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
-		</repository>
-	</repositories>
-</project>
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/java/net/sf/taverna/t2/activities/localworker/actions/LocalworkerActivityConfigurationAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/localworker/actions/LocalworkerActivityConfigurationAction.java b/src/main/java/net/sf/taverna/t2/activities/localworker/actions/LocalworkerActivityConfigurationAction.java
deleted file mode 100644
index 2016ad0..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/localworker/actions/LocalworkerActivityConfigurationAction.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.localworker.actions;
-
-import java.awt.Frame;
-import java.awt.event.ActionEvent;
-
-import javax.swing.Action;
-import javax.swing.JOptionPane;
-
-import net.sf.taverna.t2.activities.localworker.views.LocalworkerActivityConfigView;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.common.Scufl2Tools;
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-/**
- * The {@link LocalworkerActivity}s have pre-defined scripts, ports etc in a serialised form on
- * disk. So if the user wants to change them they have to do so at own risk.
- *
- * @author Ian Dunlop
- */
-@SuppressWarnings("serial")
-public class LocalworkerActivityConfigurationAction extends ActivityConfigurationAction {
-
-	public static final String EDIT_LOCALWORKER_SCRIPT = "Edit beanshell script";
-
-	private final EditManager editManager;
-
-	private final FileManager fileManager;
-
-	private final ApplicationConfiguration applicationConfiguration;
-
-	private Scufl2Tools scufl2Tools = new Scufl2Tools();
-
-	public LocalworkerActivityConfigurationAction(Activity activity, Frame owner,
-			EditManager editManager, FileManager fileManager,
-			ActivityIconManager activityIconManager,
-			ServiceDescriptionRegistry serviceDescriptionRegistry,
-			ApplicationConfiguration applicationConfiguration) {
-		super(activity, activityIconManager, serviceDescriptionRegistry);
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		this.applicationConfiguration = applicationConfiguration;
-		putValue(Action.NAME, EDIT_LOCALWORKER_SCRIPT);
-	}
-
-	/**
-	 * If the localworker has not been changed it pops up a {@link JOptionPane} warning the user
-	 * that they change things at their own risk. Otherwise just show the config view
-	 */
-	public void actionPerformed(ActionEvent e) {
-		Object[] options = { "Continue", "Cancel" };
-		Configuration configuration = scufl2Tools.configurationFor(activity, activity.getParent());
-		JsonNode json = configuration.getJson();
-		if (!json.get("isAltered").booleanValue()) {
-			int n = JOptionPane
-					.showOptionDialog(
-							null,
-							"Changing the properties of a Local Worker may affect its behaviour. Do you want to continue?",
-							"WARNING", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,
-							null, // do not use a
-							// custom Icon
-							options, options[0]);
-
-			if (n == 0) {
-				// continue was clicked so prepare for config
-				openDialog();
-			} else {
-				// do nothing
-			}
-		} else {
-			openDialog();
-		}
-	}
-
-	private void openDialog() {
-		ActivityConfigurationDialog currentDialog = ActivityConfigurationAction
-				.getDialog(getActivity());
-		if (currentDialog != null) {
-			currentDialog.toFront();
-			return;
-		}
-		final LocalworkerActivityConfigView localworkerConfigView = new LocalworkerActivityConfigView(
-				getActivity(), applicationConfiguration);
-		final ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(getActivity(),
-				localworkerConfigView, editManager);
-		ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
-
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/java/net/sf/taverna/t2/activities/localworker/menu/ConfigureLocalworkerMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/localworker/menu/ConfigureLocalworkerMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/localworker/menu/ConfigureLocalworkerMenuAction.java
deleted file mode 100644
index 3afed8d..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/localworker/menu/ConfigureLocalworkerMenuAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package net.sf.taverna.t2.activities.localworker.menu;
-
-import javax.swing.Action;
-
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-
-import net.sf.taverna.t2.activities.beanshell.actions.BeanshellActivityConfigurationAction;
-import net.sf.taverna.t2.activities.localworker.actions.LocalworkerActivityConfigurationAction;
-import net.sf.taverna.t2.activities.localworker.servicedescriptions.LocalworkerServiceDescription;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.ui.menu.ContextualMenuComponent;
-import net.sf.taverna.t2.ui.menu.MenuComponent;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-
-public class ConfigureLocalworkerMenuAction extends AbstractConfigureActivityMenuAction implements
-		MenuComponent, ContextualMenuComponent {
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ApplicationConfiguration applicationConfiguration;
-
-	public ConfigureLocalworkerMenuAction() {
-		super(LocalworkerServiceDescription.ACTIVITY_TYPE);
-	}
-
-	@Override
-	protected Action createAction() {
-		Action result = null;
-		result = new LocalworkerActivityConfigurationAction(findActivity(), getParentFrame(),
-				editManager, fileManager, activityIconManager, serviceDescriptionRegistry,
-				applicationConfiguration);
-		result.putValue(Action.NAME, BeanshellActivityConfigurationAction.EDIT_BEANSHELL_SCRIPT);
-		addMenuDots(result);
-		return result;
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setApplicationConfiguration(ApplicationConfiguration applicationConfiguration) {
-		this.applicationConfiguration = applicationConfiguration;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerActivityIcon.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerActivityIcon.java b/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerActivityIcon.java
deleted file mode 100644
index 7d6bb5a..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerActivityIcon.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.localworker.servicedescriptions;
-
-import java.net.URI;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
-
-/**
- *
- * @author Alex Nenadic
- * @author David Withers
- */
-public class LocalworkerActivityIcon implements ActivityIconSPI {
-
-	private static Icon icon;
-
-	public int canProvideIconScore(URI activityType) {
-		if (LocalworkerServiceDescription.ACTIVITY_TYPE.equals(activityType))
-			return DEFAULT_ICON + 1;
-		else
-			return NO_ICON;
-	}
-
-	public Icon getIcon(URI activityType) {
-		return getLocalworkerIcon();
-	}
-
-	public static Icon getLocalworkerIcon() {
-		if (icon == null) {
-			icon = new ImageIcon(LocalworkerActivityIcon.class
-					.getResource("/localworker.png"));
-		}
-		return icon;
-	}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceDescription.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceDescription.java b/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceDescription.java
deleted file mode 100644
index 38718b8..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceDescription.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package net.sf.taverna.t2.activities.localworker.servicedescriptions;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.swing.Icon;
-
-import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-public class LocalworkerServiceDescription extends ServiceDescription {
-
-	public static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/localworker");
-
-	private static final String LOCALWORKER = ServiceDescription.LOCAL_SERVICES;
-
-	private JsonNode json;
-	private String operation;
-	private String category;
-	private String provider;
-	private String localworkerName;
-
-	public JsonNode getJson() {
-		return json;
-	}
-
-	public void setJson(JsonNode json) {
-		this.json = json;
-	}
-
-	public String getOperation() {
-		return operation;
-	}
-
-	public void setOperation(String operation) {
-		this.operation = operation;
-	}
-
-	public String getCategory() {
-		return category;
-	}
-
-	public void setCategory(String category) {
-		this.category = category;
-	}
-
-	public String getProvider() {
-		return provider;
-	}
-
-	public void setProvider(String provider) {
-		this.provider = provider;
-	}
-
-	public String getLocalworkerName() {
-		return localworkerName;
-	}
-
-	public void setLocalworkerName(String localworkerName) {
-		this.localworkerName = localworkerName;
-	}
-
-	public String getType() {
-		return "Localworker";
-	}
-
-	@Override
-	public URI getActivityType() {
-		return ACTIVITY_TYPE;
-	}
-
-	@Override
-	public Configuration getActivityConfiguration() {
-		Configuration configuration = new Configuration();
-		configuration.setType(ACTIVITY_TYPE.resolve("#Config"));
-		configuration.setJson(getJson());
-		return configuration;
-	}
-
-	@Override
-	public Icon getIcon() {
-		return LocalworkerActivityIcon.getLocalworkerIcon();
-	}
-
-	@Override
-	public String getName() {
-		return operation;
-	}
-
-	@Override
-	public List<? extends Comparable<?>> getPath() {
-		List<String> result =
-		Arrays.asList (LOCALWORKER, category);
-		return result;
-	}
-
-	@Override
-	protected List<Object> getIdentifyingData() {
-		return Arrays.<Object>asList(getJson());
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceProvider.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceProvider.java b/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceProvider.java
deleted file mode 100644
index 42345db..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceProvider.java
+++ /dev/null
@@ -1,297 +0,0 @@
-package net.sf.taverna.t2.activities.localworker.servicedescriptions;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.swing.Icon;
-
-import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider;
-import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
-
-import org.apache.log4j.Logger;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-public class LocalworkerServiceProvider implements ServiceDescriptionProvider {
-
-	private static final String LOCALWORKER_NAMES = "/localworker_names";
-
-	private static final String LOCALWORKER_SERVICE = "Local service";
-
-	private static Logger logger = Logger.getLogger(Logger.class);
-
-	private static final URI providerId = URI
-			.create("http://taverna.sf.net/2010/service-provider/localworker");
-
-	/** Used to deserialize the Activities stored on disk */
-	private ObjectMapper objectMapper = new ObjectMapper();
-
-	private static Map<String, String> localWorkerToScript = new HashMap<String, String>();
-
-	static {
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.ByteArrayToString",
-				"Byte Array To String");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.DecodeBase64",
-				"Decode Base 64 to byte Array");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.EchoList", "Echo List");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings",
-				"Create Lots Of Strings");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.EncodeBase64",
-				"Encode Byte Array to Base 64");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks",
-				"Get image URLs from HTTP document");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.FilterStringList",
-				"Filter List of Strings by regex");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.FlattenList",
-				"Flatten List");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.PadNumber",
-				"Pad numeral with leading 0s");
-		localWorkerToScript.put(
-				"org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList",
-				"Filter list of strings extracting match to a regex");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.SendEmail",
-				"Send an Email");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.SliceList",
-				"Extract Elements from a List");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.SplitByRegex",
-				"Split string into string list by regular expression");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.StringConcat",
-				"Concatenate two strings");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.StringListMerge",
-				"Merge String List to a String");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.StringSetDifference",
-				"String List Difference");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.StringSetIntersection",
-				"String List Intersection");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.StringSetUnion",
-				"String List Union");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates",
-				"Remove String Duplicates");
-		localWorkerToScript.put(
-				"org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor",
-				"Always Fails");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.TestSometimesFails",
-				"Sometimes Fails");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.WebImageFetcher",
-				"Get Image From URL");
-		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.WebPageFetcher",
-				"Get Web Page from URL");
-
-		// xml:XPathText
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker",
-				"XPath From Text");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.xml.XSLTWorker",
-				"Transform XML");
-		localWorkerToScript.put(
-				"net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters",
-				"Transform XML with parameters");
-
-		// biojava
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker",
-				"Read Gen Bank File");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker",
-				"Reverse Complement DNA");
-		localWorkerToScript.put(
-				"net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker",
-				"Read Swiss Prot File");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker",
-				"Transcribe DNA");
-
-		// io
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.io.TextFileReader",
-				"Read Text File");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.io.TextFileWriter",
-				"Write Text File");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.io.LocalCommand",
-				"Execute Command Line App");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.io.FileListByExtTask",
-				"List Files by Extension");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask",
-				"List Files By Regex");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.io.DataRangeTask",
-				"Select Data Range From File");
-		localWorkerToScript.put(
-				"net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker",
-				"Concatenate Files");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker",
-				"Get Environment Variables as XML");
-
-		// ui
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ui.AskWorker", "Ask");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ui.SelectWorker", "Select");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ui.ChooseWorker", "Choose");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ui.TellWorker", "Tell");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ui.WarnWorker", "Warn");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker",
-				"Select File");
-		// ncbi
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker",
-				"Get Nucleotide FASTA");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker",
-				"Get Nucleotide GBSeq XML");
-		localWorkerToScript.put(
-				"net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker",
-				"Get Nucleotide INSDSeq XML");
-		localWorkerToScript.put(
-				"net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker",
-				"Get Nucleotide TinySeq XML");
-
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker",
-				"Get Protein FASTA");
-		localWorkerToScript.put(
-				"net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker",
-				"Get Protein INSDSeq XML");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker",
-				"Get Protein GBSeq XML");
-		localWorkerToScript.put(
-				"net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker",
-				"Get Protein TinySeq XML");
-
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker",
-				"Search PubMed XML");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker",
-				"Get PubMed XML By PMID");
-
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker",
-				"Execute SQL Query");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker",
-				"Execute SQL Update");
-
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.net.BrowseUrl",
-				"Open web browser at a URL");
-		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.net.ExtractHeader",
-				"Extract HTTP Header");
-	}
-
-	public String getName() {
-		return LOCALWORKER_SERVICE;
-	}
-
-	/**
-	 * Use the {@link net.sf.taverna.t2.activities.localworker.translator.LocalworkerTranslator} to
-	 * get a {@link Map} of all the local workers. Use the keys in this map
-	 * to load all the serialized activities from disk by using
-	 * <code> getClass().getResourceAsStream("/" + className) </code> to get
-	 * them and then the {@link ActivityXMLDeserializer} to get the actual {@link Activity}. Create
-	 * the {@link LocalworkerActivityItem} by
-	 * populating them with the correct ports and depths. Sets the category to
-	 * match the T1 version so that a query by category will split the local
-	 * workers in to the correct place.
-	 */
-	public void findServiceDescriptionsAsync(FindServiceDescriptionsCallBack callBack) {
-
-		List<ServiceDescription> items = new ArrayList<ServiceDescription>();
-
-		InputStream inputStream = getClass().getResourceAsStream(LOCALWORKER_NAMES);
-		if (inputStream == null) {
-			logger.error("Could not find resource " + LOCALWORKER_NAMES);
-			return;
-		}
-		BufferedReader inputReader = new BufferedReader(new InputStreamReader(inputStream));
-		String line = "";
-		String category = null;
-		try {
-			while ((line = inputReader.readLine()) != null) {
-				if (line.startsWith("category")) {
-					String[] split = line.split(":");
-					category = split[1];
-				} else {
-					LocalworkerServiceDescription createItem;
-					try {
-						createItem = createItem(line);
-					} catch (ItemCreationException e) {
-						logger.warn("Could not create item for: " + line, e);
-						continue;
-					}
-					createItem.setCategory(category);
-					createItem.setProvider("myGrid");
-					items.add(createItem);
-				}
-			}
-		} catch (IOException e1) {
-			logger.warn("Could not read local worker definitions from " + LOCALWORKER_NAMES);
-		}
-		callBack.partialResults(items);
-		callBack.finished();
-
-	}
-
-	@SuppressWarnings("serial")
-	public class ItemCreationException extends Exception {
-
-		public ItemCreationException() {
-			super();
-		}
-
-		public ItemCreationException(String message, Throwable cause) {
-			super(message, cause);
-		}
-
-		public ItemCreationException(String message) {
-			super(message);
-		}
-
-		public ItemCreationException(Throwable cause) {
-			super(cause);
-		}
-
-	}
-
-	/**
-	 * Loads the deserialised local worker from disk and creates a {@link LocalworkerActivityItem}
-	 * with the correct ports and script from it
-	 *
-	 * @param line
-	 * @return a LocalWorker with the appropriate Input/Output ports and script
-	 * @throws ItemCreationException
-	 */
-	private LocalworkerServiceDescription createItem(String line) throws ItemCreationException {
-		// get the file from disk
-		String resource = "/" + line + ".json";
-		InputStream resourceAsStream = getClass().getResourceAsStream(resource);
-		if (resourceAsStream == null) {
-			throw new ItemCreationException("Could not find resource " + resource);
-		}
-
-		JsonNode json;
-		try {
-			json = objectMapper.readTree(resourceAsStream);
-		} catch (IOException e) {
-			throw new ItemCreationException("Could not read resource " + resource, e);
-		}
-
-		LocalworkerServiceDescription item = new LocalworkerServiceDescription();
-		item.setJson(json);
-		item.setLocalworkerName(line);
-		item.setOperation(localWorkerToScript.get(line));
-		return item;
-
-	}
-
-	public Icon getIcon() {
-		return LocalworkerActivityIcon.getLocalworkerIcon();
-	}
-
-	@Override
-	public String toString() {
-		return "Local workers provider";
-	}
-
-	public static String getServiceNameFromClassname(String classname) {
-		return (localWorkerToScript.get(classname));
-	}
-
-	public String getId() {
-		return providerId.toString();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityConfigView.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityConfigView.java b/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityConfigView.java
deleted file mode 100644
index 155c631..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityConfigView.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.localworker.views;
-
-import net.sf.taverna.t2.activities.beanshell.views.BeanshellConfigurationPanel;
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-@SuppressWarnings("serial")
-public class LocalworkerActivityConfigView extends BeanshellConfigurationPanel {
-
-	public LocalworkerActivityConfigView(Activity activity, ApplicationConfiguration applicationConfiguration) {
-		super(activity, applicationConfiguration);
-	}
-
-	public boolean isConfigurationChanged() {
-		boolean configurationChanged = super.isConfigurationChanged();
-		if (configurationChanged) {
-			getJson().put("isAltered", true);
-		}
-		return configurationChanged;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityContextualView.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityContextualView.java b/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityContextualView.java
deleted file mode 100644
index fc09d57..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityContextualView.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.localworker.views;
-
-import java.awt.Frame;
-
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.localworker.actions.LocalworkerActivityConfigurationAction;
-import net.sf.taverna.t2.activities.localworker.servicedescriptions.LocalworkerServiceProvider;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-import uk.org.taverna.scufl2.api.port.InputActivityPort;
-import uk.org.taverna.scufl2.api.port.OutputActivityPort;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-@SuppressWarnings("serial")
-public class LocalworkerActivityContextualView extends HTMLBasedActivityContextualView {
-
-	private final EditManager editManager;
-	private final FileManager fileManager;
-	private final ActivityIconManager activityIconManager;
-	private final ServiceDescriptionRegistry serviceDescriptionRegistry;
-
-	private final ApplicationConfiguration applicationConfiguration;
-
-	public LocalworkerActivityContextualView(Activity activity, EditManager editManager,
-			FileManager fileManager, ColourManager colourManager,
-			ActivityIconManager activityIconManager,
-			ServiceDescriptionRegistry serviceDescriptionRegistry,
-			ApplicationConfiguration applicationConfiguration) {
-		super(activity, colourManager);
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		this.activityIconManager = activityIconManager;
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-		this.applicationConfiguration = applicationConfiguration;
-	}
-
-	@Override
-	protected String getRawTableRowsHtml() {
-		StringBuilder html = new StringBuilder();
-		html.append("<tr><th>Input Port Name</th><th>Depth</th></tr>");
-		for (InputActivityPort inputActivityPort : getActivity().getInputPorts()) {
-			html.append("<tr><td>" + inputActivityPort.getName() + "</td><td>");
-			html.append(inputActivityPort.getDepth() + "</td></tr>");
-		}
-		html.append("<tr><th>Output Port Name</th><th>Depth</th></tr>");
-		for (OutputActivityPort outputActivityPort : getActivity().getOutputPorts()) {
-			html.append("<tr><td>" + outputActivityPort.getName() + "</td><td>");
-			html.append(outputActivityPort.getDepth() + "</td></tr>");
-		}
-		return html.toString();
-	}
-
-	@Override
-	public String getViewTitle() {
-		String result = "";
-		Configuration configuration = getConfigBean();
-		JsonNode json = configuration.getJson();
-		String workerName = LocalworkerServiceProvider.getServiceNameFromClassname(json.get(
-				"localworkerName").textValue());
-		if (json.get("isAltered").booleanValue()) {
-			result = "Altered local worker service";
-			if ((workerName != null) && !workerName.equals("")) {
-				result += " - originally " + workerName;
-			}
-		} else {
-			result = "Local worker service";
-			if ((workerName != null) && !workerName.equals("")) {
-				result += " - " + workerName;
-			}
-		}
-		return result;
-	}
-
-	@Override
-	public Action getConfigureAction(Frame owner) {
-		return new LocalworkerActivityConfigurationAction(getActivity(), owner, editManager,
-				fileManager, activityIconManager, serviceDescriptionRegistry,
-				applicationConfiguration);
-	}
-
-	@Override
-	public int getPreferredPosition() {
-		return 100;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityViewFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityViewFactory.java b/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityViewFactory.java
deleted file mode 100644
index 4fec0a2..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityViewFactory.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.localworker.views;
-
-import java.util.Arrays;
-import java.util.List;
-
-import net.sf.taverna.t2.activities.localworker.servicedescriptions.LocalworkerServiceDescription;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-public class LocalworkerActivityViewFactory implements ContextualViewFactory<Activity> {
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private ActivityIconManager activityIconManager;
-	private ColourManager colourManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ApplicationConfiguration applicationConfiguration;
-
-	public boolean canHandle(Object object) {
-		return object instanceof Activity
-				&& ((Activity) object).getType()
-						.equals(LocalworkerServiceDescription.ACTIVITY_TYPE);
-	}
-
-	public List<ContextualView> getViews(Activity activity) {
-		return Arrays.asList(new ContextualView[] { new LocalworkerActivityContextualView(activity,
-				editManager, fileManager, colourManager, activityIconManager,
-				serviceDescriptionRegistry, applicationConfiguration) });
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setColourManager(ColourManager colourManager) {
-		this.colourManager = colourManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setApplicationConfiguration(ApplicationConfiguration applicationConfiguration) {
-		this.applicationConfiguration = applicationConfiguration;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
deleted file mode 100644
index c3c01e0..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.localworker.servicedescriptions.LocalworkerServiceProvider

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
deleted file mode 100644
index 5911ddf..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.localworker.menu.ConfigureLocalworkerMenuAction

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
deleted file mode 100644
index 720a022..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.localworker.servicedescriptions.LocalworkerActivityIcon
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
deleted file mode 100644
index f1d2c0d..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.localworker.views.LocalworkerActivityViewFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/META-INF/spring/localworker-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/localworker-activity-ui-context-osgi.xml b/src/main/resources/META-INF/spring/localworker-activity-ui-context-osgi.xml
deleted file mode 100644
index dd4c7a8..0000000
--- a/src/main/resources/META-INF/spring/localworker-activity-ui-context-osgi.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:beans="http://www.springframework.org/schema/beans"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd
-                      http://www.springframework.org/schema/osgi
-                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
-
-	<service ref="LocalworkerActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
-
-	<service ref="LocalworkerServiceProvider" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
-
-	<service ref="ConfigureLocalworkerMenuAction" auto-export="interfaces" />
-
-	<service ref="LocalworkerActivityViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
-
-	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
-	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
-	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
-	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
-	<reference id="serviceDescriptionRegistry" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry" />
-	<reference id="applicationConfiguration" interface="uk.org.taverna.configuration.app.ApplicationConfiguration" />
-
-</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/META-INF/spring/localworker-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/localworker-activity-ui-context.xml b/src/main/resources/META-INF/spring/localworker-activity-ui-context.xml
deleted file mode 100644
index edcd6be..0000000
--- a/src/main/resources/META-INF/spring/localworker-activity-ui-context.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-	<bean id="LocalworkerActivityIcon" class="net.sf.taverna.t2.activities.localworker.servicedescriptions.LocalworkerActivityIcon" />
-
-	<bean id="LocalworkerServiceProvider" class="net.sf.taverna.t2.activities.localworker.servicedescriptions.LocalworkerServiceProvider" />
-
-	<bean id="ConfigureLocalworkerMenuAction" class="net.sf.taverna.t2.activities.localworker.menu.ConfigureLocalworkerMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="fileManager" ref="fileManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="applicationConfiguration" ref="applicationConfiguration" />
-	</bean>
-
-	<bean id="LocalworkerActivityViewFactory" class="net.sf.taverna.t2.activities.localworker.views.LocalworkerActivityViewFactory">
-			<property name="editManager" ref="editManager" />
-			<property name="fileManager" ref="fileManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="colourManager" ref="colourManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="applicationConfiguration" ref="applicationConfiguration" />
-	</bean>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/localworker.png
----------------------------------------------------------------------
diff --git a/src/main/resources/localworker.png b/src/main/resources/localworker.png
deleted file mode 100644
index 758a457..0000000
Binary files a/src/main/resources/localworker.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/localworker_names
----------------------------------------------------------------------
diff --git a/src/main/resources/localworker_names b/src/main/resources/localworker_names
deleted file mode 100644
index 3df452c..0000000
--- a/src/main/resources/localworker_names
+++ /dev/null
@@ -1,67 +0,0 @@
-category:biojava
-net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker
-net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker
-net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker
-net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker
-category:io
-net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker
-net.sourceforge.taverna.scuflworkers.io.FileListByExtTask
-net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask
-net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker
-net.sourceforge.taverna.scuflworkers.io.LocalCommand
-net.sourceforge.taverna.scuflworkers.io.TextFileReader
-net.sourceforge.taverna.scuflworkers.io.TextFileWriter
-category:ui
-net.sourceforge.taverna.scuflworkers.ui.AskWorker
-net.sourceforge.taverna.scuflworkers.ui.ChooseWorker
-net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker
-net.sourceforge.taverna.scuflworkers.ui.SelectWorker
-net.sourceforge.taverna.scuflworkers.ui.TellWorker
-net.sourceforge.taverna.scuflworkers.ui.WarnWorker
-category:xml
-net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker
-net.sourceforge.taverna.scuflworkers.xml.XSLTWorker
-net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters
-category:list
-org.embl.ebi.escience.scuflworkers.java.EchoList
-org.embl.ebi.escience.scuflworkers.java.FlattenList
-org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates
-org.embl.ebi.escience.scuflworkers.java.StringListMerge
-category:test
-org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor
-org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings
-org.embl.ebi.escience.scuflworkers.java.TestSometimesFails
-category:text
-org.embl.ebi.escience.scuflworkers.java.ByteArrayToString
-org.embl.ebi.escience.scuflworkers.java.StringSetDifference
-org.embl.ebi.escience.scuflworkers.java.StringSetIntersection
-org.embl.ebi.escience.scuflworkers.java.StringSetUnion
-org.embl.ebi.escience.scuflworkers.java.PadNumber
-org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList
-org.embl.ebi.escience.scuflworkers.java.SplitByRegex
-org.embl.ebi.escience.scuflworkers.java.StringConcat
-org.embl.ebi.escience.scuflworkers.java.FilterStringList
-category:net
-org.embl.ebi.escience.scuflworkers.java.WebImageFetcher
-org.embl.ebi.escience.scuflworkers.java.WebPageFetcher
-org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks
-org.embl.ebi.escience.scuflworkers.java.SendEmail
-net.sourceforge.taverna.scuflworkers.net.BrowseUrl
-net.sourceforge.taverna.scuflworkers.net.ExtractHeader
-category:base64
-org.embl.ebi.escience.scuflworkers.java.EncodeBase64
-org.embl.ebi.escience.scuflworkers.java.DecodeBase64
-category:ncbi
-net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker
-net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker
-net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker
-net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker
-net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker
-net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker
-net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker
-net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker
-net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker
-net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker
-category:jdbc
-net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker
-net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker
deleted file mode 100644
index d6c62b2..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker
+++ /dev/null
@@ -1,74 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow">
-
-
-<class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import org.biojava.bio.seq.Sequence;
-import org.biojava.bio.seq.SequenceIterator;
-import org.biojava.bio.seq.io.SeqIOTools;
-import org.biojava.bio.seq.io.agave.AgaveWriter;
-
-BufferedReader getReader (String fileUrl) throws IOException {
-		InputStreamReader reader;
-		try {
-			reader = new FileReader(fileUrl);
-		}
-		catch (FileNotFoundException e) {
-			// try a real URL instead
-			URL url = new URL(fileUrl);
-			reader = new InputStreamReader (url.openStream());
-		}
-		return new BufferedReader(reader);
-	}
-
-if ((fileUrl == void) || (fileUrl == null)) {
-    throw new RuntimeException("The fileUrl must be specified");
-}
-
-BufferedReader br  = getReader(fileUrl);
-
-// read the GenBank File
-SequenceIterator sequences = SeqIOTools.readGenbank(br);
-
-// iterate through the sequences
-ByteArrayOutputStream os = new ByteArrayOutputStream();
-StringBuffer sb = new StringBuffer();
-AgaveWriter writer = new AgaveWriter();
-PrintStream ps = new PrintStream(os);
-
-while (sequences.hasNext()) {
-	Sequence seq = sequences.nextSequence();
-	writer.writeSequence(seq, ps);
-	sb.append(os.toString());
-}
-
-genbankdata = sb.toString();
-br.close();
-ps.close();
-  
-</script>
-  <dependencies class="java.util.Collections$SingletonList">
-    <element class="string">uk.org.mygrid.resources:biojava:1.4pre1</element>
-  </dependencies>
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>fileUrl</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>genbankdata</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/xml'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker.json
deleted file mode 100644
index 452850f..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import org.biojava.bio.seq.Sequence;\nimport org.biojava.bio.seq.SequenceIterator;\nimport org.biojava.bio.seq.io.SeqIOTools;\nimport org.biojava.bio.seq.io.agave.AgaveWriter;\n\nBufferedReader getReader (String fileUrl) throws IOException {\n\t\tInputStreamReader reader;\n\t\ttry {\n\t\t\treader = new FileReader(fileUrl);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t// try a real URL instead\n\t\t\tURL url = new URL(fileUrl);\n\t\t\treader = new InputStreamReader (url.openStream());\n\t\t}\n\t\treturn new BufferedReader(reader);\n\t}\n\nif ((fileUrl == void) || (fileUrl == null)) {\n    throw new RuntimeException(\"The fileUrl must be specified\");\n}\n\nBufferedReader br  = getReader(fileUrl);\n\n// read the GenBank File\nSequenceIterator sequences = SeqIOTools.readGenbank(br);\n\n// iterate through the sequences\nByteArrayOutputStream os = new ByteArrayOutputStream();\nStringBuffer sb = new StringBuffer();\nAgaveWriter writer = new AgaveWriter();\nPrintStrea
 m ps = new PrintStream(os);\n\nwhile (sequences.hasNext()) {\n\tSequence seq = sequences.nextSequence();\n\twriter.writeSequence(seq, ps);\n\tsb.append(os.toString());\n}\n\ngenbankdata = sb.toString();\nbr.close();\nps.close();\n  \n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker",
-  "inputPorts" : [ {
-    "name" : "fileUrl",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "genbankdata",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker
deleted file mode 100644
index 0044c82..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker
+++ /dev/null
@@ -1,43 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import org.biojava.bio.seq.DNATools;
-import org.biojava.bio.symbol.SymbolList;
-
-if ((rawSeq == void) || (rawSeq == null)) {
-    throw new RuntimeException("The rawSeq must be specified");
-}
-
-// make a DNA SymbolListbena
-SymbolList symL = DNATools.createDNA(rawSeq);
-
-// reverse complement it
-symL = DNATools.reverseComplement(symL);
-
-// prove that it worked
-revSeq = symL.seqString();
-</script>
-  <dependencies class="java.util.Collections$SingletonList">
-    <element class="string">uk.org.mygrid.resources:biojava:1.4pre1</element>
-  </dependencies>
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>rawSeq</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>revSeq</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker.json
deleted file mode 100644
index c214819..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import org.biojava.bio.seq.DNATools;\nimport org.biojava.bio.symbol.SymbolList;\n\nif ((rawSeq == void) || (rawSeq == null)) {\n    throw new RuntimeException(\"The rawSeq must be specified\");\n}\n\n// make a DNA SymbolListbena\nSymbolList symL = DNATools.createDNA(rawSeq);\n\n// reverse complement it\nsymL = DNATools.reverseComplement(symL);\n\n// prove that it worked\nrevSeq = symL.seqString();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker",
-  "inputPorts" : [ {
-    "name" : "rawSeq",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "revSeq",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker
deleted file mode 100644
index 7f64778..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker
+++ /dev/null
@@ -1,72 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import org.biojava.bio.seq.Sequence;
-import org.biojava.bio.seq.SequenceIterator;
-import org.biojava.bio.seq.io.SeqIOTools;
-import org.biojava.bio.seq.io.agave.AgaveWriter;
-
-BufferedReader getReader (String fileUrl) throws IOException {
-		InputStreamReader reader;
-		try {
-			reader = new FileReader(fileUrl);
-		}
-		catch (FileNotFoundException e) {
-			// try a real URL instead
-			URL url = new URL(fileUrl);
-			reader = new InputStreamReader (url.openStream());
-		}
-		return new BufferedReader(reader);
-	}
-	
-if ((fileUrl == void) || (fileUrl == null)) {
-    throw new RuntimeException("The fileUrl must be specified");
-}
-	
-BufferedReader br = getReader(fileUrl);
-
-// read the EMBL File
-SequenceIterator sequences = SeqIOTools.readSwissprot(br);
-
-// Prepare the writer
-AgaveWriter writer = new AgaveWriter();
-ByteArrayOutputStream os = new ByteArrayOutputStream();
-StringBuffer sb = new StringBuffer();
-PrintStream ps = new PrintStream(os);
-
-// iterate through the sequences
-while (sequences.hasNext()) {
-	Sequence seq = sequences.nextSequence();
-	writer.writeSequence(seq, ps);
-	sb.append(os.toString());
-}
-results = sb.toString();
-
-br.close();
-ps.close();
-  
-</script>
-  <dependencies class="java.util.Collections$SingletonList">
-    <element class="string">uk.org.mygrid.resources:biojava:1.4pre1</element>
-  </dependencies>
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>fileUrl</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>results</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker.json
deleted file mode 100644
index 929c316..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import org.biojava.bio.seq.Sequence;\nimport org.biojava.bio.seq.SequenceIterator;\nimport org.biojava.bio.seq.io.SeqIOTools;\nimport org.biojava.bio.seq.io.agave.AgaveWriter;\n\nBufferedReader getReader (String fileUrl) throws IOException {\n\t\tInputStreamReader reader;\n\t\ttry {\n\t\t\treader = new FileReader(fileUrl);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t// try a real URL instead\n\t\t\tURL url = new URL(fileUrl);\n\t\t\treader = new InputStreamReader (url.openStream());\n\t\t}\n\t\treturn new BufferedReader(reader);\n\t}\n\t\nif ((fileUrl == void) || (fileUrl == null)) {\n    throw new RuntimeException(\"The fileUrl must be specified\");\n}\n\t\nBufferedReader br = getReader(fileUrl);\n\n// read the EMBL File\nSequenceIterator sequences = SeqIOTools.readSwissprot(br);\n\n// Prepare the writer\nAgaveWriter writer = new AgaveWriter();\nByteArrayOutputStream os = new ByteArrayOutputStream();\nStringBuffer sb = new StringBuffer();\nPrintStream ps = ne
 w PrintStream(os);\n\n// iterate through the sequences\nwhile (sequences.hasNext()) {\n\tSequence seq = sequences.nextSequence();\n\twriter.writeSequence(seq, ps);\n\tsb.append(os.toString());\n}\nresults = sb.toString();\n\nbr.close();\nps.close();\n  \n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker",
-  "inputPorts" : [ {
-    "name" : "fileUrl",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "results",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file


[06/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna maven parent

Posted by st...@apache.org.
taverna maven parent


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/d8bffc91
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/d8bffc91
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/d8bffc91

Branch: refs/heads/master
Commit: d8bffc91ca0f2fa1ee761dd446534df753b78002
Parents: 67bd555
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Authored: Mon Oct 27 16:15:26 2014 +0000
Committer: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Committed: Mon Oct 27 16:15:26 2014 +0000

----------------------------------------------------------------------
 pom.xml | 30 +++++++++++++++++++++++++-----
 1 file changed, 25 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d8bffc91/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f6fabad..376cd5c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,11 +2,11 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>net.sf.taverna.t2</groupId>
-		<artifactId>ui-activities</artifactId>
-		<version>2.0-SNAPSHOT</version>
-	</parent>
+  <parent>
+    <groupId>net.sf.taverna</groupId>
+    <artifactId>taverna-parent</artifactId>
+    <version>3.0.1-SNAPSHOT</version>
+  </parent>
 	<groupId>net.sf.taverna.t2.ui-activities</groupId>
 	<artifactId>external-tool-activity-ui</artifactId>
 	<name>Taverna 2 ExternalTool Activity UI</name>
@@ -84,5 +84,25 @@
 		</dependency>
 
 	</dependencies>
+        <repositories>
+                <repository>
+                        <releases />
+                        <snapshots>
+                                <enabled>false</enabled>
+                        </snapshots>
+                        <id>mygrid-repository</id>
+                        <name>myGrid Repository</name>
+                        <url>http://www.mygrid.org.uk/maven/repository</url>
+                </repository>
+                <repository>
+                        <releases>
+                                <enabled>false</enabled>
+                        </releases>
+                        <snapshots />
+                        <id>mygrid-snapshot-repository</id>
+                        <name>myGrid Snapshot Repository</name>
+                        <url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
+                </repository>
+        </repositories>
 </project>
 


[44/50] [abbrv] incubator-taverna-workbench-common-activities git commit: Merge from https://github.com/taverna/taverna-wsdl-activity-ui master

Posted by st...@apache.org.
Merge from https://github.com/taverna/taverna-wsdl-activity-ui master


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/bf8df6b8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/bf8df6b8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/bf8df6b8

Branch: refs/heads/master
Commit: bf8df6b8cb4ad6ff7f5c285e599e7e0bf29d96c5
Parents: 912db68 440bbd6
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:34:40 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:34:40 2015 +0000

----------------------------------------------------------------------
 taverna-wsdl-activity-ui/pom.xml                |   95 +
 .../actions/AbstractAddXMLSplitterAction.java   |  156 ++
 .../wsdl/actions/AddXMLInputSplitterAction.java |  104 +
 .../actions/AddXMLOutputSplitterAction.java     |  105 +
 .../wsdl/actions/AddXMLSplitterEdit.java        |  315 +++
 .../actions/WSDLActivityConfigureAction.java    |   71 +
 .../wsdl/actions/XMLSplitterPortBuilder.java    |  127 ++
 ...LInputSplitterForWSDLActivityMenuAction.java |   11 +
 ...utSplitterForXMLInputSplitterMenuAction.java |   11 +
 .../menu/AddXMLInputSplitterMenuAction.java     |   70 +
 ...OutputSplitterForWSDLActivityMenuAction.java |   11 +
 ...tSplitterForXMLOutputSplitterMenuAction.java |   11 +
 .../menu/AddXMLOutputSplitterMenuAction.java    |   66 +
 .../wsdl/menu/ConfigureWSDLMenuAction.java      |   78 +
 .../AddWSDLServiceDialog.java                   |  303 +++
 .../ConfirmTrustedCertificateDialog.java        |  586 ++++++
 .../servicedescriptions/WSDLActivityIcon.java   |   60 +
 .../WSDLServiceDescription.java                 |  154 ++
 .../WSDLServiceProvider.java                    |  206 ++
 .../WSDLServiceProviderConfig.java              |   32 +
 .../XMLInputSplitterActivityIcon.java           |   63 +
 .../XMLOutputSplitterActivityIcon.java          |   64 +
 .../views/AbstractXMLSplitterActionView.java    |  159 ++
 .../views/WSDLActivityConfigurationView.java    |  446 +++++
 .../wsdl/views/WSDLActivityContextualView.java  |  108 +
 .../wsdl/views/WSDLActivityViewFactory.java     |   88 +
 .../wsdl/views/XMLSplitterContextualView.java   |   78 +
 .../wsdl/views/XMLSplitterViewFactory.java      |   66 +
 ...rvicedescriptions.ServiceDescriptionProvider |    1 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |    5 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |    3 +
 ...ntextualviews.activity.ContextualViewFactory |    2 +
 .../spring/wsdl-activity-ui-context-osgi.xml    |   37 +
 .../spring/wsdl-activity-ui-context.xml         |   53 +
 .../src/main/resources/wsdl.png                 |  Bin 0 -> 748 bytes
 .../src/main/resources/xml-input-splitter.png   |  Bin 0 -> 309 bytes
 .../src/main/resources/xml-output-splitter.png  |  Bin 0 -> 298 bytes
 .../src/main/resources/xml-splitter.png         |  Bin 0 -> 327 bytes
 .../views/TestWSDLActivityContextualView.java   |   53 +
 .../src/test/resources/GMService.wsdl           |   68 +
 .../src/test/resources/kegg.wsdl                | 1889 ++++++++++++++++++
 41 files changed, 5755 insertions(+)
----------------------------------------------------------------------



[34/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-spreadsheet-import-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualViewFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualViewFactory.java b/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualViewFactory.java
deleted file mode 100644
index 7e49168..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualViewFactory.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.spreadsheet.views;
-
-import java.util.Arrays;
-import java.util.List;
-
-import net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-/**
- * Factory for creating contextual a view of the SpreadsheetImport Activity
- *
- * @author David Withers
- */
-public class SpreadsheetImportContextualViewFactory implements ContextualViewFactory<Activity> {
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private ActivityIconManager activityIconManager;
-	private ColourManager colourManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ServiceRegistry serviceRegistry;
-
-	public boolean canHandle(Object object) {
-		return object instanceof Activity
-				&& ((Activity) object).getType().equals(
-						SpreadsheetImportTemplateService.ACTIVITY_TYPE);
-	}
-
-	public List<ContextualView> getViews(Activity activity) {
-		return Arrays.asList(new ContextualView[] { new SpreadsheetImportContextualView(activity,
-				editManager, fileManager, activityIconManager, colourManager,
-				serviceDescriptionRegistry, serviceRegistry) });
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setColourManager(ColourManager colourManager) {
-		this.colourManager = colourManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
deleted file mode 100644
index b1628b6..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportTemplateService

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
deleted file mode 100644
index 6720b04..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
+++ /dev/null
@@ -1,3 +0,0 @@
-net.sf.taverna.t2.activities.spreadsheet.menu.SpreadsheetImportAddTemplateAction
-net.sf.taverna.t2.activities.spreadsheet.menu.SpreadsheetImportConfigureMenuAction
-net.sf.taverna.t2.activities.spreadsheet.menu.SpreadsheetImportAddTemplateMenuAction

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
deleted file mode 100644
index 2dd012f..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportActivityIcon
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
deleted file mode 100644
index 4b9dd11..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.spreadsheet.views.SpreadsheetImportContextualViewFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context-osgi.xml b/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context-osgi.xml
deleted file mode 100644
index 72ffb77..0000000
--- a/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context-osgi.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:beans="http://www.springframework.org/schema/beans"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd
-                      http://www.springframework.org/schema/osgi
-                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
-
-	<service ref="SpreadsheetImportActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
-
-	<service ref="SpreadsheetImportTemplateService" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
-
-	<service ref="SpreadsheetImportAddTemplateAction" auto-export="interfaces" />
-	<service ref="SpreadsheetImportConfigureMenuAction" auto-export="interfaces" />
-	<service ref="SpreadsheetImportAddTemplateMenuAction" auto-export="interfaces" />
-
-	<service ref="SpreadsheetImportContextualViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
-
-	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
-	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
-	<reference id="menuManager" interface="net.sf.taverna.t2.ui.menu.MenuManager" />
-	<reference id="selectionManager" interface="net.sf.taverna.t2.workbench.selection.SelectionManager" />
-	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
-	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
-	<reference id="serviceDescriptionRegistry" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry" />
-	<reference id="serviceRegistry" interface="uk.org.taverna.commons.services.ServiceRegistry" />
-
-</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context.xml b/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context.xml
deleted file mode 100644
index 7fdba26..0000000
--- a/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-	<bean id="SpreadsheetImportActivityIcon" class="net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportActivityIcon">
-			<property name="colourManager" ref="colourManager" />
-	</bean>
-
-	<bean id="SpreadsheetImportTemplateService" class="net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportTemplateService" />
-
-	<bean id="SpreadsheetImportAddTemplateAction" class="net.sf.taverna.t2.activities.spreadsheet.menu.SpreadsheetImportAddTemplateAction">
-			<property name="editManager" ref="editManager" />
-			<property name="menuManager" ref="menuManager" />
-			<property name="selectionManager" ref="selectionManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-	<bean id="SpreadsheetImportAddTemplateMenuAction" class="net.sf.taverna.t2.activities.spreadsheet.menu.SpreadsheetImportAddTemplateMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="menuManager" ref="menuManager" />
-			<property name="selectionManager" ref="selectionManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-	<bean id="SpreadsheetImportConfigureMenuAction" class="net.sf.taverna.t2.activities.spreadsheet.menu.SpreadsheetImportConfigureMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="fileManager" ref="fileManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-
-	<bean id="SpreadsheetImportContextualViewFactory" class="net.sf.taverna.t2.activities.spreadsheet.views.SpreadsheetImportContextualViewFactory">
-			<property name="editManager" ref="editManager" />
-			<property name="fileManager" ref="fileManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="colourManager" ref="colourManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/resources/net/sf/taverna/t2/activities/spreadsheet/iln8/ui-text.properties
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/spreadsheet/iln8/ui-text.properties b/src/main/resources/net/sf/taverna/t2/activities/spreadsheet/iln8/ui-text.properties
deleted file mode 100644
index 2a4480f..0000000
--- a/src/main/resources/net/sf/taverna/t2/activities/spreadsheet/iln8/ui-text.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-SpreadsheetImportActivityConfigurationAction.canceButton=Cancel
-SpreadsheetImportActivityConfigurationAction.dialogTitle=Spreadsheet Import Configuration
-SpreadsheetImportActivityConfigurationAction.okButton=Finish
-SpreadsheetImportAddTemplateAction.addMenu=Spreadsheet import
-SpreadsheetImportConfigureMenuAction.configureMenu=Configure Spreadsheet Import
-SpreadsheetImportConfigTableModel.column=Column
-SpreadsheetImportConfigTableModel.portName=Port Name
-SpreadsheetImportConfigView.nextButton=Next
-SpreadsheetImportConfigView.backButton=Back
-SpreadsheetImportConfigView.columnMappingSectionLabel=Column to Port Name Mapping
-SpreadsheetImportConfigView.outputFormatSectionLabel=Output Format
-SpreadsheetImportConfigView.columnSectionLabel=Columns
-SpreadsheetImportConfigView.DEFAULT_MESSAGE=Select the data range
-SpreadsheetImportConfigView.DUPLICATE_PORT_NAME_ERROR_MESSAGE=Duplicate activity port name
-SpreadsheetImportConfigView.EMPTY_FROM_COLUMN_ERROR_MESSAGE='From' column must be specified
-SpreadsheetImportConfigView.EMPTY_FROM_ROW_ERROR_MESSAGE='From' row must be specified
-SpreadsheetImportConfigView.EMPTY_TO_COLUMN_ERROR_MESSAGE='To' column must be specified
-SpreadsheetImportConfigView.emptyCellSectionLabel=Empty cells
-SpreadsheetImportConfigView.emptyStringOption=Use an empty string
-SpreadsheetImportConfigView.excludeHeaderRowOption=Exclude header row
-SpreadsheetImportConfigView.from=From
-SpreadsheetImportConfigView.FROM_COLUMN_ERROR_MESSAGE='From' column can only contain characters A-Z
-SpreadsheetImportConfigView.FROM_ROW_ERROR_MESSAGE='From' row must be a number greater than 0
-SpreadsheetImportConfigView.generateErrorOption=Generate an error value
-SpreadsheetImportConfigView.ignoreBlankRowsOption=Ignore blank rows
-SpreadsheetImportConfigView.multiplePortOption=Multiple outputs (one per spreadsheet column)
-SpreadsheetImportConfigView.singlePortOption=A single CSV formatted output
-SpreadsheetImportConfigView.userDefinedCsvDelimiter=Use this value delimiter character:
-SpreadsheetImportConfigView.INCONSISTENT_COLUMN_MESSAGE='To' column must not be less than 'from' column
-SpreadsheetImportConfigView.INCONSISTENT_ROW_MESSAGE='To'row must not be less than 'from' row
-SpreadsheetImportConfigView.panelTitle=Configure spreadsheet file import
-SpreadsheetImportConfigView.rowSectionLabel=Rows
-SpreadsheetImportConfigView.selectAllRowsOption=All rows
-SpreadsheetImportConfigView.to=to
-SpreadsheetImportConfigView.TO_COLUMN_ERROR_MESSAGE='To' column can only contain characters A-Z
-SpreadsheetImportConfigView.TO_ROW_ERROR_MESSAGE='To' row must be a number greater than 0
-SpreadsheetImportConfigView.userDefinedOption=Use this value:
-SpreadsheetImportContextualView.activityName=Spreadsheet Import Activity
-SpreadsheetImportContextualView.depth=Depth
-SpreadsheetImportContextualView.inputPortName=Input Port Name
-SpreadsheetImportContextualView.outputPortName=Output Port Name
-SpreadsheetImportTemplateService.serviceDescription=A service that imports data from spreadsheets
-SpreadsheetImportTemplateService.serviceName=SpreadsheetImport

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/resources/spreadsheet-import.png
----------------------------------------------------------------------
diff --git a/src/main/resources/spreadsheet-import.png b/src/main/resources/spreadsheet-import.png
deleted file mode 100644
index 886fac3..0000000
Binary files a/src/main/resources/spreadsheet-import.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/pom.xml b/taverna-spreadsheet-import-activity-ui/pom.xml
new file mode 100644
index 0000000..1672ebf
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/pom.xml
@@ -0,0 +1,107 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>net.sf.taverna</groupId>
+		<artifactId>taverna-parent</artifactId>
+		<version>3.0.1-SNAPSHOT</version>
+	</parent>
+	<groupId>net.sf.taverna.t2.ui-activities</groupId>
+	<artifactId>spreadsheet-import-activity-ui</artifactId>
+        <version>2.0-SNAPSHOT</version>
+	<packaging>bundle</packaging>
+	<name>Taverna 2 Spreadsheet Import Activity UI</name>
+	<dependencies>
+		<dependency>
+			<groupId>net.sf.taverna.t2.activities</groupId>
+			<artifactId>spreadsheet-import-activity</artifactId>
+			<version>${t2.activities.version}</version>
+		</dependency>
+		<!-- taverna lang -->
+		<dependency>
+			<groupId>net.sf.taverna.t2.lang</groupId>
+			<artifactId>ui</artifactId>
+			<version>${t2.lang.version}</version>
+		</dependency>
+		<!-- taverna ui-api -->
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-icons-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-palette-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>contextual-views-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>file-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>menu-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-tools</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<!-- taverna ui-components -->
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-components</groupId>
+			<artifactId>workflow-view</artifactId>
+			<version>${t2.ui.components.version}
+			</version>
+		</dependency>
+		<dependency>
+			<groupId>uk.org.taverna.scufl2</groupId>
+			<artifactId>scufl2-api</artifactId>
+			<version>${scufl2.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-databind</artifactId>
+			<version>${jackson-databind.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>com.springsource.org.apache.commons.lang</artifactId>
+			<version>${commons.lang.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.log4j</groupId>
+			<artifactId>com.springsource.org.apache.log4j</artifactId>
+			<version>${log4j.version}</version>
+		</dependency>
+	</dependencies>
+	<repositories>
+		<repository>
+			<releases />
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+			<id>mygrid-repository</id>
+			<name>myGrid Repository</name>
+			<url>http://www.mygrid.org.uk/maven/repository
+			</url>
+		</repository>
+		<repository>
+			<releases>
+				<enabled>false</enabled>
+			</releases>
+			<snapshots />
+			<id>mygrid-snapshot-repository</id>
+			<name>myGrid Snapshot Repository</name>
+			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
+		</repository>
+	</repositories>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/actions/SpreadsheetImportActivityConfigurationAction.java
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/actions/SpreadsheetImportActivityConfigurationAction.java b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/actions/SpreadsheetImportActivityConfigurationAction.java
new file mode 100644
index 0000000..0a70680
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/actions/SpreadsheetImportActivityConfigurationAction.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (C) 2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.spreadsheet.actions;
+
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+
+import net.sf.taverna.t2.activities.spreadsheet.views.SpreadsheetImportConfigView;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+/**
+ * The configuration action for a SpreadsheetImport activity.
+ *
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class SpreadsheetImportActivityConfigurationAction extends ActivityConfigurationAction {
+
+	private static final String CONFIGURE = "Configure";
+
+	private final EditManager editManager;
+
+	private final FileManager fileManager;
+
+	private final ServiceRegistry serviceRegistry;
+
+	public SpreadsheetImportActivityConfigurationAction(Activity activity,
+			Frame owner, EditManager editManager, FileManager fileManager,
+			ActivityIconManager activityIconManager,
+			ServiceDescriptionRegistry serviceDescriptionRegistry, ServiceRegistry serviceRegistry) {
+		super(activity, activityIconManager, serviceDescriptionRegistry);
+		this.editManager = editManager;
+		this.fileManager = fileManager;
+		this.serviceRegistry = serviceRegistry;
+		putValue(NAME, CONFIGURE);
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		final SpreadsheetImportConfigView spreadsheetConfigView = new SpreadsheetImportConfigView(
+				getActivity(), serviceRegistry);
+		final ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(getActivity(),
+				spreadsheetConfigView, editManager);
+
+		ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
+
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/il8n/SpreadsheetImportUIText.java
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/il8n/SpreadsheetImportUIText.java b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/il8n/SpreadsheetImportUIText.java
new file mode 100644
index 0000000..82f8436
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/il8n/SpreadsheetImportUIText.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (C) 2009 The University of Manchester   
+ * 
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ * 
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *    
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *    
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.spreadsheet.il8n;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Access to a resource bundle containing UI text.
+ *
+ * @author David Withers
+ */
+public class SpreadsheetImportUIText {
+	private static final String BUNDLE_NAME = "net.sf.taverna.t2.activities.spreadsheet.iln8.ui-text";
+
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+	private SpreadsheetImportUIText() {
+	}
+
+	public static String getString(String key) {
+		try {
+			return RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			return '!' + key + '!';
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateAction.java
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateAction.java b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateAction.java
new file mode 100644
index 0000000..3073acb
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateAction.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (C) 2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.spreadsheet.menu;
+
+import java.awt.event.ActionEvent;
+import java.net.URI;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+
+import net.sf.taverna.t2.activities.spreadsheet.il8n.SpreadsheetImportUIText;
+import net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.ui.menu.AbstractContextualMenuAction;
+import net.sf.taverna.t2.ui.menu.MenuManager;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.core.Workflow;
+
+/**
+ * An action to add a spreadsheet import activity + a wrapping processor to the workflow.
+ *
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class SpreadsheetImportAddTemplateAction extends AbstractContextualMenuAction {
+
+	private static final URI insertSection = URI
+			.create("http://taverna.sf.net/2009/contextMenu/insert");
+
+	private EditManager editManager;
+	private MenuManager menuManager;
+	private SelectionManager selectionManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ServiceRegistry serviceRegistry;
+
+	public SpreadsheetImportAddTemplateAction() {
+		super(insertSection, 700);
+	}
+
+	@Override
+	public boolean isEnabled() {
+		return super.isEnabled() && getContextualSelection().getSelection() instanceof Workflow;
+	}
+
+	@Override
+	protected Action createAction() {
+
+		AbstractAction action = new AbstractAction(
+				SpreadsheetImportUIText.getString("SpreadsheetImportAddTemplateAction.addMenu"),
+				activityIconManager.iconForActivity(SpreadsheetImportTemplateService.ACTIVITY_TYPE)) {
+
+			public void actionPerformed(ActionEvent e) {
+				WorkflowView.importServiceDescription(serviceDescriptionRegistry
+						.getServiceDescription(SpreadsheetImportTemplateService.ACTIVITY_TYPE), false,
+						editManager, menuManager, selectionManager, serviceRegistry);
+			}
+
+		};
+
+		return action;
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setMenuManager(MenuManager menuManager) {
+		this.menuManager = menuManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateMenuAction.java b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateMenuAction.java
new file mode 100644
index 0000000..048073a
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateMenuAction.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.spreadsheet.menu;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.net.URI;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.KeyStroke;
+
+import net.sf.taverna.t2.activities.spreadsheet.il8n.SpreadsheetImportUIText;
+import net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.ui.menu.AbstractMenuAction;
+import net.sf.taverna.t2.ui.menu.DesignOnlyAction;
+import net.sf.taverna.t2.ui.menu.MenuManager;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
+import uk.org.taverna.commons.services.ServiceRegistry;
+
+/**
+ * An action to add a spreadsheet import activity + a wrapping processor to the workflow.
+ *
+ * @author Alan R Williams
+ */
+@SuppressWarnings("serial")
+public class SpreadsheetImportAddTemplateMenuAction extends AbstractMenuAction {
+
+	private static final URI ADD_SPREADSHEET_IMPORT_URI = URI
+			.create("http://taverna.sf.net/2008/t2workbench/menu#graphMenuAddSpreadsheetImport");
+
+	private static final URI INSERT = URI
+			.create("http://taverna.sf.net/2008/t2workbench/menu#insert");
+
+	private static String ADD_SPREADSHEET_IMPORT = SpreadsheetImportUIText
+			.getString("SpreadsheetImportAddTemplateAction.addMenu");
+
+	private EditManager editManager;
+	private MenuManager menuManager;
+	private SelectionManager selectionManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ServiceRegistry serviceRegistry;
+
+	public SpreadsheetImportAddTemplateMenuAction() {
+		super(INSERT, 700, ADD_SPREADSHEET_IMPORT_URI);
+	}
+
+	@Override
+	protected Action createAction() {
+		return new AddSpreadsheetImportMenuAction();
+	}
+
+	protected class AddSpreadsheetImportMenuAction extends AbstractAction implements
+			DesignOnlyAction {
+		AddSpreadsheetImportMenuAction() {
+			super();
+			putValue(SMALL_ICON,
+					activityIconManager
+							.iconForActivity(SpreadsheetImportTemplateService.ACTIVITY_TYPE));
+			putValue(NAME, ADD_SPREADSHEET_IMPORT);
+			putValue(SHORT_DESCRIPTION, ADD_SPREADSHEET_IMPORT);
+			putValue(
+					Action.ACCELERATOR_KEY,
+					KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.SHIFT_DOWN_MASK
+							| InputEvent.ALT_DOWN_MASK));
+
+		}
+
+		public void actionPerformed(ActionEvent e) {
+			WorkflowView.importServiceDescription(serviceDescriptionRegistry
+					.getServiceDescription(SpreadsheetImportTemplateService.ACTIVITY_TYPE), false,
+					editManager, menuManager, selectionManager, serviceRegistry);
+		}
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setMenuManager(MenuManager menuManager) {
+		this.menuManager = menuManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportConfigureMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportConfigureMenuAction.java b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportConfigureMenuAction.java
new file mode 100644
index 0000000..7d1fa0a
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportConfigureMenuAction.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (C) 2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.spreadsheet.menu;
+
+import javax.swing.Action;
+
+import uk.org.taverna.commons.services.ServiceRegistry;
+
+import net.sf.taverna.t2.activities.spreadsheet.actions.SpreadsheetImportActivityConfigurationAction;
+import net.sf.taverna.t2.activities.spreadsheet.il8n.SpreadsheetImportUIText;
+import net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+
+/**
+ * Menu action for SpreadsheetImport activity configuration.
+ *
+ * @author David Withers
+ */
+public class SpreadsheetImportConfigureMenuAction extends AbstractConfigureActivityMenuAction {
+
+	private EditManager editManager;
+	private FileManager fileManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ServiceRegistry serviceRegistry;
+
+	public SpreadsheetImportConfigureMenuAction() {
+		super(SpreadsheetImportTemplateService.ACTIVITY_TYPE);
+	}
+
+	@Override
+	protected Action createAction() {
+		Action result = new SpreadsheetImportActivityConfigurationAction(findActivity(),
+				getParentFrame(), editManager, fileManager, activityIconManager,
+				serviceDescriptionRegistry, serviceRegistry);
+		result.putValue(Action.NAME, SpreadsheetImportUIText
+				.getString("SpreadsheetImportConfigureMenuAction.configureMenu"));
+		addMenuDots(result);
+		return result;
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportActivityIcon.java
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportActivityIcon.java b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportActivityIcon.java
new file mode 100644
index 0000000..1987364
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportActivityIcon.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (C) 2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.spreadsheet.servicedescriptions;
+
+import java.awt.Color;
+import java.net.URI;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+
+/**
+ * UI icon for the SpreadsheetImport Activity.
+ *
+ * @author David Withers
+ */
+public class SpreadsheetImportActivityIcon implements ActivityIconSPI {
+
+	public static final String SPREADSHEET_COLOUR_HTML = "#40e0d0";
+	public static final Color SPREADSHEET_COLOUR = Color.decode(SPREADSHEET_COLOUR_HTML);
+
+	private static Icon icon = null;
+
+	@Override
+	public int canProvideIconScore(URI activityType) {
+		if (SpreadsheetImportTemplateService.ACTIVITY_TYPE.equals(activityType))
+			return DEFAULT_ICON + 1;
+		else
+			return NO_ICON;
+	}
+
+	@Override
+	public Icon getIcon(URI activityType) {
+		return getSpreadsheetImportIcon();
+	}
+
+	public static Icon getSpreadsheetImportIcon() {
+		if (icon == null) {
+			icon = new ImageIcon(
+					SpreadsheetImportActivityIcon.class.getResource("/spreadsheet-import.png"));
+		}
+		return icon;
+	}
+
+	public void setColourManager(ColourManager colourManager) {
+		colourManager.setPreferredColour(
+				"http://ns.taverna.org.uk/2010/activity/spreadsheet-import",
+				SPREADSHEET_COLOUR);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportTemplateService.java
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportTemplateService.java b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportTemplateService.java
new file mode 100644
index 0000000..8057f2d
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportTemplateService.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (C) 2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.spreadsheet.servicedescriptions;
+
+import java.net.URI;
+
+import javax.swing.Icon;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import net.sf.taverna.t2.activities.spreadsheet.il8n.SpreadsheetImportUIText;
+import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+
+/**
+ * Definition of the SpreadsheetImport spreadsheet import template service.
+ *
+ * @author David Withers
+ */
+public class SpreadsheetImportTemplateService extends AbstractTemplateService {
+
+	public static final URI ACTIVITY_TYPE = URI
+			.create("http://ns.taverna.org.uk/2010/activity/spreadsheet-import");
+
+	private static final String SERVICE_NAME = SpreadsheetImportUIText
+			.getString("SpreadsheetImportTemplateService.serviceName");
+
+	private static final URI providerId = URI
+			.create("http://taverna.sf.net/2010/service-provider/spreadsheet");
+
+	public String getName() {
+		return SERVICE_NAME;
+	}
+
+	@Override
+	public URI getActivityType() {
+		return ACTIVITY_TYPE;
+	}
+
+	@Override
+	public Configuration getActivityConfiguration() {
+		Configuration configuration = new Configuration();
+		configuration.setType(ACTIVITY_TYPE.resolve("#Config"));
+		ObjectNode json = (ObjectNode) configuration.getJson();
+		json.put("columnRange", json.objectNode().put("start", 0).put("end", 1));
+		json.put("rowRange", json.objectNode().put("start", 0).put("end", -1));
+		json.put("emptyCellValue", "");
+		json.put("allRows", true);
+		json.put("excludeFirstRow", false);
+		json.put("ignoreBlankRows", false);
+		json.put("emptyCellPolicy", "EMPTY_STRING");
+		json.put("outputFormat", "PORT_PER_COLUMN");
+		json.put("csvDelimiter", ",");
+		return configuration;
+	}
+
+	@Override
+	public Icon getIcon() {
+		return SpreadsheetImportActivityIcon.getSpreadsheetImportIcon();
+	}
+
+	@Override
+	public String getDescription() {
+		return SpreadsheetImportUIText
+				.getString("SpreadsheetImportTemplateService.serviceDescription");
+	}
+
+	public static ServiceDescription getServiceDescription() {
+		SpreadsheetImportTemplateService bts = new SpreadsheetImportTemplateService();
+		return bts.templateService;
+	}
+
+	public String getId() {
+		return providerId.toString();
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigTableModel.java
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigTableModel.java b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigTableModel.java
new file mode 100644
index 0000000..0409b8e
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigTableModel.java
@@ -0,0 +1,190 @@
+/*******************************************************************************
+ * Copyright (C) 2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+
+package net.sf.taverna.t2.activities.spreadsheet.views;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.swing.table.AbstractTableModel;
+
+import net.sf.taverna.t2.activities.spreadsheet.SpreadsheetUtils;
+import net.sf.taverna.t2.activities.spreadsheet.il8n.SpreadsheetImportUIText;
+
+/**
+ * TableModel for mapping column labels to port names.
+ * <p>
+ * The default mapping is for the port name to be the same as the column label. The
+ * columnToPortMapping only contains entries for port names that are not the same as the column
+ * label.
+ *
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class SpreadsheetImportConfigTableModel extends AbstractTableModel {
+
+	private Map<String, String> columnToPortMapping;
+
+	private int fromColumn, toColumn;
+
+	/**
+	 * Constructs a TableModel that maps column labels to port names for the specified range of
+	 * columns.
+	 *
+	 * @param fromColumn
+	 *            the start of the column range
+	 * @param toColumn
+	 *            the end of the column range
+	 * @param columnToPortMapping
+	 *            existing column to port mappings (can be null)
+	 */
+	public SpreadsheetImportConfigTableModel(String fromColumn, String toColumn,
+			Map<String, String> columnToPortMapping) {
+		if (columnToPortMapping == null) {
+			this.columnToPortMapping = new HashMap<String, String>();
+		} else {
+			this.columnToPortMapping = new HashMap<String, String>(columnToPortMapping);
+		}
+		this.fromColumn = SpreadsheetUtils.getColumnIndex(fromColumn);
+		this.toColumn = SpreadsheetUtils.getColumnIndex(toColumn);
+	}
+
+	/**
+	 * Sets the start of the column range.
+	 *
+	 * @param fromColumn
+	 *            the start of the column range
+	 */
+	public void setFromColumn(int fromColumn) {
+		if (this.fromColumn != fromColumn) {
+			this.fromColumn = fromColumn;
+			fireTableStructureChanged();
+		}
+	}
+
+	/**
+	 * Sets the end of the column range.
+	 *
+	 * @param toColumn
+	 *            the end of the column range
+	 */
+	public void setToColumn(int toColumn) {
+		if (this.toColumn != toColumn) {
+			this.toColumn = toColumn;
+			fireTableStructureChanged();
+		}
+	}
+
+	/**
+	 * Returns the port name for the given column label.
+	 * <p>
+	 * If the columnLabel is the columnToPortMapping the value is returned; otherwise the
+	 * columnLabel is returned.
+	 *
+	 * @param columnLabel
+	 *            the column to find the port name for
+	 * @return the port name for the given column label
+	 */
+	public String getPortName(String columnLabel) {
+		String portName;
+		if (columnToPortMapping.containsKey(columnLabel)) {
+			portName = columnToPortMapping.get(columnLabel);
+		} else {
+			portName = columnLabel;
+		}
+		return portName;
+	}
+
+	/**
+	 * Sets the port name for the column label.
+	 * <p>
+	 * If the port name is not the same as the column label the port name is added the
+	 * columnToPortMapping.
+	 *
+	 * @param columnLabel
+	 * @param portName
+	 */
+	public void setPortName(String columnLabel, String portName) {
+		if (columnLabel.equals(portName)) {
+			columnToPortMapping.remove(columnLabel);
+		} else {
+			columnToPortMapping.put(columnLabel, portName);
+		}
+	}
+
+	/**
+	 * Returns the map of column labels to port names.
+	 * <p>
+	 * The map only contains entries for port names that are not the same as their corresponding
+	 * column label.
+	 *
+	 * @return the map of column labels to port names
+	 */
+	public Map<String, String> getColumnToPortMapping() {
+		return columnToPortMapping;
+	}
+
+	// TableModel methods
+
+	@Override
+	public Class<?> getColumnClass(int columnIndex) {
+		return String.class;
+	}
+
+	public int getColumnCount() {
+		return 2;
+	}
+
+	@Override
+	public String getColumnName(int columnIndex) {
+		if (columnIndex == 0) {
+			return SpreadsheetImportUIText.getString("SpreadsheetImportConfigTableModel.column");
+		} else {
+			return SpreadsheetImportUIText.getString("SpreadsheetImportConfigTableModel.portName");
+		}
+	}
+
+	public int getRowCount() {
+		return toColumn - fromColumn + 1;
+	}
+
+	public Object getValueAt(int rowIndex, int columnIndex) {
+		String columnLabel = SpreadsheetUtils.getColumnLabel(rowIndex + fromColumn);
+		if (columnIndex == 0) {
+			return columnLabel;
+		} else {
+			return getPortName(columnLabel);
+		}
+	}
+
+	@Override
+	public boolean isCellEditable(int rowIndex, int columnIndex) {
+		return columnIndex == 1;
+	}
+
+	@Override
+	public void setValueAt(Object value, int rowIndex, int columnIndex) {
+		if (columnIndex == 1) {
+			setPortName(SpreadsheetUtils.getColumnLabel(rowIndex + fromColumn), value.toString());
+		}
+	}
+
+}


[18/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-localworker-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker.json
new file mode 100644
index 0000000..5e2a7df
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker.json
@@ -0,0 +1,24 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed\" +\n\"&rettype=\" + (((rettype == void ) || (rettype == null)) ? \"full\" : rettype) +\n\"&retmode=\" + (((retmode == void) || (retmode == null)) ? \"xml\" : retmode) +\n\"&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker",
+  "inputPorts" : [ {
+    "name" : "id",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "rettype",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "retmode",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputText",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker
new file mode 100644
index 0000000..37c440c
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker
@@ -0,0 +1,124 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>if ((term == void) || (term == null) || term.equals("")) {
+	throw new RunTimeException("port term must have a non-empty value");
+}
+
+URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed" +
+(field == void ? "" : ("&amp;field=" + field)) +
+(retstart == void ? "" : ("&amp;retstart=" + retstart)) +
+(retmax == void ? "" : ("&amp;retmax=" + retmax)) +
+(mindate == void ? "" : ("&amp;mindate=" + mindate)) +
+(maxdate == void ? "" : ("&amp;maxdate=" + maxdate)) +
+"&amp;rettype=" + (rettype == void ? "full" : rettype) +
+"&amp;retmode=" + (retmode == void ? "xml" : retmode) +
+"&amp;tool=taverna" +
+"&amp;term=" + term);
+
+BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
+StringWriter writer = new StringWriter();
+
+char[] buffer = new char[1024];
+    while (true) {
+        int r = reader.read(buffer);
+        if (r &lt;= 0) {
+            break;
+        }
+        writer.write(buffer, 0, r);
+    }
+reader.close();
+outputText = writer.toString();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>term</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>db</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>field</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>retstart</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>retmax</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>mindate</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>maxdate</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>rettype</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>outputText</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker.json
new file mode 100644
index 0000000..bd29f82
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker.json
@@ -0,0 +1,44 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if ((term == void) || (term == null) || term.equals(\"\")) {\n\tthrow new RunTimeException(\"port term must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed\" +\n(field == void ? \"\" : (\"&field=\" + field)) +\n(retstart == void ? \"\" : (\"&retstart=\" + retstart)) +\n(retmax == void ? \"\" : (\"&retmax=\" + retmax)) +\n(mindate == void ? \"\" : (\"&mindate=\" + mindate)) +\n(maxdate == void ? \"\" : (\"&maxdate=\" + maxdate)) +\n\"&rettype=\" + (rettype == void ? \"full\" : rettype) +\n\"&retmode=\" + (retmode == void ? \"xml\" : retmode) +\n\"&tool=taverna\" +\n\"&term=\" + term);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n 
    }\nreader.close();\noutputText = writer.toString();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker",
+  "inputPorts" : [ {
+    "name" : "term",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "db",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "field",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "retstart",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "retmax",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "mindate",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "maxdate",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "rettype",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputText",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl
new file mode 100644
index 0000000..a2317c5
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl
@@ -0,0 +1,31 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <name>url</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>text/plain</string>
+      </mimeTypes>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs />
+  <classLoaderSharing>workflow</classLoaderSharing>
+  <localDependencies />
+  <artifactDependencies />
+  <script>import java.awt.Desktop;
+import java.net.URI;
+
+if ((url == void) || (url == null)) {
+	throw new RuntimeException("Url must be specified");
+}
+
+URI uri = null;
+
+uri = new URI(url);
+
+Desktop.getDesktop().browse(uri);</script>
+  <dependencies />
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean><annotations /></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl.json
new file mode 100644
index 0000000..1a2155e
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.BrowseUrl.json
@@ -0,0 +1,11 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import java.awt.Desktop;\nimport java.net.URI;\n\nif ((url == void) || (url == null)) {\n\tthrow new RuntimeException(\"Url must be specified\");\n}\n\nURI uri = null;\n\nuri = new URI(url);\n\nDesktop.getDesktop().browse(uri);",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.net.BrowseUrl",
+  "inputPorts" : [ {
+    "name" : "url",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader
new file mode 100644
index 0000000..d3149d6
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader
@@ -0,0 +1,55 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <name>headers</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>text/plain</string>
+      </mimeTypes>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <name>header_key</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>text/plain</string>
+      </mimeTypes>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <name>header_value</name>
+      <depth>0</depth>
+      <mimeTypes />
+      <granularDepth>0</granularDepth>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+  <classLoaderSharing>workflow</classLoaderSharing>
+  <localDependencies />
+  <artifactDependencies />
+  <script>if ((headers == void) || (headers == null)) {
+	throw new RuntimeException("Headers must be specified");
+}
+
+if ((header_key == void) || (header_key == null)) {
+	throw new RuntimeException("Header_key must be specified");
+}
+
+String header_value = "";
+if (!header_key.endsWith(":")) {
+	header_key += ":";
+}
+for (String h : headers) {
+	if (h.startsWith(header_key)) {
+		header_value = h.substring(header_key.length());
+		header_value = header_value.trim();
+		break;
+	}
+}</script>
+  <dependencies />
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean><annotations /></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader.json
new file mode 100644
index 0000000..0e510fa
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.net.ExtractHeader.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if ((headers == void) || (headers == null)) {\n\tthrow new RuntimeException(\"Headers must be specified\");\n}\n\nif ((header_key == void) || (header_key == null)) {\n\tthrow new RuntimeException(\"Header_key must be specified\");\n}\n\nString header_value = \"\";\nif (!header_key.endsWith(\":\")) {\n\theader_key += \":\";\n}\nfor (String h : headers) {\n\tif (h.startsWith(header_key)) {\n\t\theader_value = h.substring(header_key.length());\n\t\theader_value = header_value.trim();\n\t\tbreak;\n\t}\n}",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.net.ExtractHeader",
+  "inputPorts" : [ {
+    "name" : "headers",
+    "depth" : 1,
+    "type" : "String"
+  }, {
+    "name" : "header_key",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "header_value",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker
new file mode 100644
index 0000000..f094efa
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker
@@ -0,0 +1,41 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import javax.swing.JOptionPane;
+
+answer = JOptionPane.showInputDialog(null, (message == void ? null : message), (title == void ? null : title), JOptionPane.QUESTION_MESSAGE);
+
+
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>title</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>message</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>answer</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker.json
new file mode 100644
index 0000000..c2095cc
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.AskWorker.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import javax.swing.JOptionPane;\n\nanswer = JOptionPane.showInputDialog(null, (message == void ? null : message), (title == void ? null : title), JOptionPane.QUESTION_MESSAGE);\n\n\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ui.AskWorker",
+  "inputPorts" : [ {
+    "name" : "title",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "message",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "answer",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker
new file mode 100644
index 0000000..5244d77
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker
@@ -0,0 +1,80 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import javax.swing.BoxLayout;
+import javax.swing.ButtonGroup;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+
+if ((selectionValues == void) || (selectionValues == null) || (selectionValues.isEmpty())) {
+    throw new RuntimeException("selectionValues must be specified and non-empty");
+}
+
+ButtonGroup group = new ButtonGroup();
+JPanel messagePanel = new JPanel();
+messagePanel.setLayout(new BoxLayout(messagePanel,BoxLayout.Y_AXIS));
+
+messagePanel.add(new JLabel((message == void ? null : message)));
+		
+JRadioButton[] buttonArray = new JRadioButton[selectionValues.size()];
+for (int i = 0; i &lt; buttonArray.length; i++) {			
+	buttonArray[i] = new JRadioButton(selectionValues.get(i));
+	if (i==0) buttonArray[i].setSelected(true);
+	group.add(buttonArray[i]);
+	messagePanel.add(buttonArray[i]);
+}				
+
+JOptionPane.showOptionDialog(null, messagePanel, (title == void ? null : title),
+		JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, new Object[]{"OK"}, null);
+		
+String answer="";
+for (JRadioButton button : buttonArray) {
+	if (button.isSelected()) {
+		answer=button.getText();
+	}
+}
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>title</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>message</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>selectionValues</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>answer</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker.json
new file mode 100644
index 0000000..0410fc7
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.ChooseWorker.json
@@ -0,0 +1,24 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import javax.swing.BoxLayout;\nimport javax.swing.ButtonGroup;\nimport javax.swing.JLabel;\nimport javax.swing.JOptionPane;\nimport javax.swing.JPanel;\nimport javax.swing.JRadioButton;\n\nif ((selectionValues == void) || (selectionValues == null) || (selectionValues.isEmpty())) {\n    throw new RuntimeException(\"selectionValues must be specified and non-empty\");\n}\n\nButtonGroup group = new ButtonGroup();\nJPanel messagePanel = new JPanel();\nmessagePanel.setLayout(new BoxLayout(messagePanel,BoxLayout.Y_AXIS));\n\nmessagePanel.add(new JLabel((message == void ? null : message)));\n\t\t\nJRadioButton[] buttonArray = new JRadioButton[selectionValues.size()];\nfor (int i = 0; i < buttonArray.length; i++) {\t\t\t\n\tbuttonArray[i] = new JRadioButton(selectionValues.get(i));\n\tif (i==0) buttonArray[i].setSelected(true);\n\tgroup.add(buttonArray[i]);\n\tmessagePanel.add(buttonArray[i]);\n}\t\t\t\t\n\nJOptionPane.showOptionDialog(null, messagePanel, (title == void ? null 
 : title),\n\t\tJOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, new Object[]{\"OK\"}, null);\n\t\t\nString answer=\"\";\nfor (JRadioButton button : buttonArray) {\n\tif (button.isSelected()) {\n\t\tanswer=button.getText();\n\t}\n}\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ui.ChooseWorker",
+  "inputPorts" : [ {
+    "name" : "title",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "message",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "selectionValues",
+    "depth" : 1,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "answer",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker
new file mode 100644
index 0000000..e594b7f
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker
@@ -0,0 +1,116 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import java.awt.CardLayout;
+import java.awt.Image;
+import java.awt.Toolkit;
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.swing.ImageIcon;
+import javax.swing.JEditorPane;
+import javax.swing.JFileChooser;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.filechooser.FileFilter;
+
+class FileExtFilter extends FileFilter {
+
+	public FileExtFilter(String ext, String label, boolean includeDir) {
+		this.ext = ext;
+		this.label = label;
+		this.includeDir = includeDir;
+	}
+
+	public String getDescription() {
+		return this.label;
+	}
+
+	public boolean accept(File file) {
+		if (file.isDirectory() &amp;&amp; includeDir) {
+			return true;
+		} else {
+			return file.getName().endsWith(this.ext);
+		}
+	}
+
+	String ext, label;
+
+	boolean includeDir;
+}
+
+if (title == void) {
+	title = null;
+}
+
+if ((fileExtensions == void) || (fileExtensions == null)) {
+	fileExtensions = "";
+}
+
+if ((fileExtLabels == void) || (fileExtLabels == null)) {
+	fileExtLabels = "";
+}
+
+JFileChooser chooser = new JFileChooser();
+chooser.setDialogTitle(title);
+
+String[] fileTypeList = fileExtensions.split(",");
+String[] filterLabelList = fileExtLabels.split(",");
+
+if (fileTypeList != null &amp;&amp; filterLabelList != null &amp;&amp; fileTypeList.length != filterLabelList.length) {
+	throw new RuntimeException("The list of extensions and file filter labels must be the same length");
+}
+
+// create the file filters
+for (int i = 0; i &lt; fileTypeList.length; i++) {
+	FileExtFilter filter = new FileExtFilter(fileTypeList[i], filterLabelList[i], true);
+	chooser.setFileFilter(filter);
+}
+
+chooser.showOpenDialog(null);
+File file = chooser.getSelectedFile();
+selectedFile = file.getAbsolutePath();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>title</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>fileExtensions</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>fileExtLabels</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>selectedFile</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker.json
new file mode 100644
index 0000000..1d71cef
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker.json
@@ -0,0 +1,24 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import java.awt.CardLayout;\nimport java.awt.Image;\nimport java.awt.Toolkit;\nimport java.io.File;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport javax.swing.ImageIcon;\nimport javax.swing.JEditorPane;\nimport javax.swing.JFileChooser;\nimport javax.swing.JLabel;\nimport javax.swing.JPanel;\nimport javax.swing.filechooser.FileFilter;\n\nclass FileExtFilter extends FileFilter {\n\n\tpublic FileExtFilter(String ext, String label, boolean includeDir) {\n\t\tthis.ext = ext;\n\t\tthis.label = label;\n\t\tthis.includeDir = includeDir;\n\t}\n\n\tpublic String getDescription() {\n\t\treturn this.label;\n\t}\n\n\tpublic boolean accept(File file) {\n\t\tif (file.isDirectory() && includeDir) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn file.getName().endsWith(this.ext);\n\t\t}\n\t}\n\n\tString ext, label;\n\n\tboolean includeDir;\n}\n\nif (title == void) {\n\ttitle = null;\n}\n\nif ((fileExtensions == void) || (fileExtensions == null)) {\n\tfileExtensions = \"\
 ";\n}\n\nif ((fileExtLabels == void) || (fileExtLabels == null)) {\n\tfileExtLabels = \"\";\n}\n\nJFileChooser chooser = new JFileChooser();\nchooser.setDialogTitle(title);\n\nString[] fileTypeList = fileExtensions.split(\",\");\nString[] filterLabelList = fileExtLabels.split(\",\");\n\nif (fileTypeList != null && filterLabelList != null && fileTypeList.length != filterLabelList.length) {\n\tthrow new RuntimeException(\"The list of extensions and file filter labels must be the same length\");\n}\n\n// create the file filters\nfor (int i = 0; i < fileTypeList.length; i++) {\n\tFileExtFilter filter = new FileExtFilter(fileTypeList[i], filterLabelList[i], true);\n\tchooser.setFileFilter(filter);\n}\n\nchooser.showOpenDialog(null);\nFile file = chooser.getSelectedFile();\nselectedFile = file.getAbsolutePath();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker",
+  "inputPorts" : [ {
+    "name" : "title",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "fileExtensions",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "fileExtLabels",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "selectedFile",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker
new file mode 100644
index 0000000..1745844
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker
@@ -0,0 +1,53 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import javax.swing.JOptionPane;
+
+if ((valueList == void) || (valueList == null) || (valueList.isEmpty())) {
+    throw new RuntimeException("valueList must be specified and non-empty");
+}
+
+answer = (String) JOptionPane.showInputDialog(null, (message == void ? null : message), (title == void ? null : title), JOptionPane.QUESTION_MESSAGE, null, valueList.toArray(), valueList.get(0));
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>valueList</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>message</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>title</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>answer</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker.json
new file mode 100644
index 0000000..6c287b6
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.SelectWorker.json
@@ -0,0 +1,24 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import javax.swing.JOptionPane;\n\nif ((valueList == void) || (valueList == null) || (valueList.isEmpty())) {\n    throw new RuntimeException(\"valueList must be specified and non-empty\");\n}\n\nanswer = (String) JOptionPane.showInputDialog(null, (message == void ? null : message), (title == void ? null : title), JOptionPane.QUESTION_MESSAGE, null, valueList.toArray(), valueList.get(0));\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ui.SelectWorker",
+  "inputPorts" : [ {
+    "name" : "valueList",
+    "depth" : 1,
+    "type" : "String"
+  }, {
+    "name" : "message",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "title",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "answer",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker
new file mode 100644
index 0000000..99ee6ab
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker
@@ -0,0 +1,42 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import javax.swing.JOptionPane;
+
+JOptionPane.showMessageDialog(null, (message == void ? null : message), (title == void ? null : title),	JOptionPane.INFORMATION_MESSAGE);
+
+answer = "answer";
+
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>title</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>message</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>answer</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker.json
new file mode 100644
index 0000000..8037a42
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.TellWorker.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import javax.swing.JOptionPane;\n\nJOptionPane.showMessageDialog(null, (message == void ? null : message), (title == void ? null : title),\tJOptionPane.INFORMATION_MESSAGE);\n\nanswer = \"answer\";\n\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ui.TellWorker",
+  "inputPorts" : [ {
+    "name" : "title",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "message",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "answer",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker
new file mode 100644
index 0000000..b211ba5
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker
@@ -0,0 +1,42 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import javax.swing.JOptionPane;
+
+JOptionPane.showMessageDialog(null, (message == void ? null : message), (title == void ? null : title),	JOptionPane.WARNING_MESSAGE);
+
+answer = "answer";
+  
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>title</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>message</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>answer</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker.json
new file mode 100644
index 0000000..eaa8c93
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.ui.WarnWorker.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import javax.swing.JOptionPane;\n\nJOptionPane.showMessageDialog(null, (message == void ? null : message), (title == void ? null : title),\tJOptionPane.WARNING_MESSAGE);\n\nanswer = \"answer\";\n  \n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ui.WarnWorker",
+  "inputPorts" : [ {
+    "name" : "title",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "message",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "answer",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker
new file mode 100644
index 0000000..0395225
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker
@@ -0,0 +1,75 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import org.dom4j.Document;
+import org.dom4j.Node;
+import org.dom4j.io.SAXReader;
+
+SAXReader reader = new SAXReader(false);
+reader.setIncludeInternalDTDDeclarations(false);
+reader.setIncludeExternalDTDDeclarations(false);
+
+Document document = reader.read(new StringReader(xmltext));
+List nodelist = document.selectNodes(xpath);
+
+// Process the elements in the nodelist
+ArrayList outputList = new ArrayList();
+ArrayList outputXmlList = new ArrayList();
+
+String val = null;
+String xmlVal = null;
+for (Iterator iter = nodelist.iterator(); iter.hasNext();) {
+	Node element = (Node) iter.next();
+	xmlVal = element.asXML();
+	val = element.getStringValue();
+	if (val != null &amp;&amp; !val.equals("")) {
+		outputList.add(val);
+		outputXmlList.add(xmlVal);
+	}
+
+}
+
+List nodelist=outputList;
+List nodelistAsXML=outputXmlList;</script>
+  <dependencies>
+    <string>dom4j:dom4j:1.6</string>
+  </dependencies>
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>xpath</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>xml-text</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/xml'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>nodelist</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>nodelistAsXML</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker.json
new file mode 100644
index 0000000..3fa2385
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker.json
@@ -0,0 +1,24 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import org.dom4j.Document;\nimport org.dom4j.Node;\nimport org.dom4j.io.SAXReader;\n\nSAXReader reader = new SAXReader(false);\nreader.setIncludeInternalDTDDeclarations(false);\nreader.setIncludeExternalDTDDeclarations(false);\n\nDocument document = reader.read(new StringReader(xmltext));\nList nodelist = document.selectNodes(xpath);\n\n// Process the elements in the nodelist\nArrayList outputList = new ArrayList();\nArrayList outputXmlList = new ArrayList();\n\nString val = null;\nString xmlVal = null;\nfor (Iterator iter = nodelist.iterator(); iter.hasNext();) {\n\tNode element = (Node) iter.next();\n\txmlVal = element.asXML();\n\tval = element.getStringValue();\n\tif (val != null && !val.equals(\"\")) {\n\t\toutputList.add(val);\n\t\toutputXmlList.add(xmlVal);\n\t}\n\n}\n\nList nodelist=outputList;\nList nodelistAsXML=outputXmlList;",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker",
+  "inputPorts" : [ {
+    "name" : "xpath",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "xml-text",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "nodelist",
+    "depth" : 1,
+    "granularDepth" : 1
+  }, {
+    "name" : "nodelistAsXML",
+    "depth" : 1,
+    "granularDepth" : 1
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker
new file mode 100644
index 0000000..1532b63
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker
@@ -0,0 +1,152 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputStr" to="outputStr" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.SourceLocator;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+BufferedReader getReader (String fileUrl) throws IOException {
+		InputStreamReader reader;
+		try {
+			reader = new FileReader(fileUrl);
+		}
+		catch (FileNotFoundException e) {
+			// try a real URL instead
+			URL url = new URL(fileUrl);
+			reader = new InputStreamReader (url.openStream());
+		}
+		return new BufferedReader(reader);
+	}
+	
+BufferedWriter getWriter (String fileUrl) throws IOException {
+		Writer writer;
+		try {
+			writer = new FileWriter(fileUrl);
+		}
+		catch (FileNotFoundException e) {
+			// try a real URL instead
+			URL url = new URL(fileUrl);
+			writer = new OutputStreamWriter (url.openConnection().getOutputStream());
+		}
+		return new BufferedWriter(writer);
+	}
+	
+String xslFilename = xslFileURL;
+String outFilename;
+if (outFileURL != void) {
+    outFilename = outFileURL;
+}
+
+String ext;
+if (outputExt != void) {
+    ext = outputExt;
+}
+
+if (((outFilename == null) || outFilename.equals("")) &amp;&amp; (ext != null)) {
+		outFilename = inFileURL.substring(0, inFileURL.indexOf(".")+1) + ext;
+}
+
+// Create transformer factory
+TransformerFactory factory = TransformerFactory.newInstance();
+
+// Use the factory to create a template containing the xsl file
+Templates template = factory.newTemplates(new StreamSource(getReader(xslFilename)));
+
+// Use the template to create a transformer
+Transformer xformer = template.newTransformer();
+
+// Prepare the input and output files
+Reader sourceReader = getReader(inFileURL);
+Source source = new StreamSource(sourceReader);
+StringWriter resultStr = new StringWriter();
+Result result = new StreamResult(resultStr);
+
+// Apply the xsl file to the source file and write the result to the
+// output file
+xformer.transform(source, result);
+
+outputStr = resultStr.toString();
+
+if ((outFilename != null) &amp;&amp; !outFilename.equals("")) {
+
+	BufferedWriter out = getWriter(outFilename);
+
+	out.write(outputStr);
+	out.close();
+}
+sourceReader.close();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>xslFileURL</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>outFileURL</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>inFileURL</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>outputExt</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>outputStr</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/xml'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker.json
new file mode 100644
index 0000000..09aff0d
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorker.json
@@ -0,0 +1,28 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import java.io.BufferedReader;\nimport java.io.BufferedWriter;\nimport java.io.FileInputStream;\nimport java.io.FileNotFoundException;\nimport java.io.FileReader;\nimport java.io.FileWriter;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.OutputStreamWriter;\nimport java.io.StringWriter;\nimport java.io.Writer;\nimport java.net.URL;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport javax.xml.transform.Result;\nimport javax.xml.transform.Source;\nimport javax.xml.transform.SourceLocator;\nimport javax.xml.transform.Templates;\nimport javax.xml.transform.Transformer;\nimport javax.xml.transform.TransformerConfigurationException;\nimport javax.xml.transform.TransformerException;\nimport javax.xml.transform.TransformerFactory;\nimport javax.xml.transform.stream.StreamResult;\nimport javax.xml.transform.stream.StreamSource;\n\nBufferedReader getReader (String fileUrl) throws IOException {\n\t\tInputStreamReader reader;\n\t\ttry {\n\
 t\t\treader = new FileReader(fileUrl);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t// try a real URL instead\n\t\t\tURL url = new URL(fileUrl);\n\t\t\treader = new InputStreamReader (url.openStream());\n\t\t}\n\t\treturn new BufferedReader(reader);\n\t}\n\t\nBufferedWriter getWriter (String fileUrl) throws IOException {\n\t\tWriter writer;\n\t\ttry {\n\t\t\twriter = new FileWriter(fileUrl);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t// try a real URL instead\n\t\t\tURL url = new URL(fileUrl);\n\t\t\twriter = new OutputStreamWriter (url.openConnection().getOutputStream());\n\t\t}\n\t\treturn new BufferedWriter(writer);\n\t}\n\t\nString xslFilename = xslFileURL;\nString outFilename;\nif (outFileURL != void) {\n    outFilename = outFileURL;\n}\n\nString ext;\nif (outputExt != void) {\n    ext = outputExt;\n}\n\nif (((outFilename == null) || outFilename.equals(\"\")) && (ext != null)) {\n\t\toutFilename = inFileURL.substring(0, inFileURL.indexOf(\".\")+1) + ext;\n}\n\
 n// Create transformer factory\nTransformerFactory factory = TransformerFactory.newInstance();\n\n// Use the factory to create a template containing the xsl file\nTemplates template = factory.newTemplates(new StreamSource(getReader(xslFilename)));\n\n// Use the template to create a transformer\nTransformer xformer = template.newTransformer();\n\n// Prepare the input and output files\nReader sourceReader = getReader(inFileURL);\nSource source = new StreamSource(sourceReader);\nStringWriter resultStr = new StringWriter();\nResult result = new StreamResult(resultStr);\n\n// Apply the xsl file to the source file and write the result to the\n// output file\nxformer.transform(source, result);\n\noutputStr = resultStr.toString();\n\nif ((outFilename != null) && !outFilename.equals(\"\")) {\n\n\tBufferedWriter out = getWriter(outFilename);\n\n\tout.write(outputStr);\n\tout.close();\n}\nsourceReader.close();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.xml.XSLTWorker",
+  "inputPorts" : [ {
+    "name" : "xslFileURL",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "outFileURL",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "inFileURL",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "outputExt",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputStr",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters
new file mode 100644
index 0000000..768c8f9
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters
@@ -0,0 +1,100 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow">
+  <class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class>
+  <inputMap>
+    <map from="xsltString" to="xsltString" />
+    <map from="paramList" to="paramList" />
+    <map from="sourceString" to="sourceString" />
+  </inputMap>
+  <outputMap>
+    <map from="outputString" to="outputString" />
+  </outputMap>
+  <configBean encoding="xstream">
+    <net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <name>sourceString</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>text/plain</string>
+      </mimeTypes>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <name>xsltString</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>text/plain</string>
+      </mimeTypes>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <name>paramList</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>text/plain</string>
+      </mimeTypes>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <name>outputString</name>
+      <depth>0</depth>
+      <mimeTypes />
+      <granularDepth>0</granularDepth>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+  <classLoaderSharing>workflow</classLoaderSharing>
+  <localDependencies />
+  <artifactDependencies />
+  <script>//From a proposal by Mikolaj Rybinski
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+param(paramstr) {
+    nameAndValue = paramstr.split("=");
+    if (nameAndValue.length != 2) {
+        throw new RuntimeException("Wrong parameter format: \"" + paramstr + "\".");
+    }
+    name = nameAndValue[0].trim();
+    value = nameAndValue[1].trim();
+    return this;
+}
+
+if ((sourceString == void) || (sourceString == null)) {
+        throw new RuntimeException("sourceString must be specified");
+}
+
+if ((xsltString == void) || (xsltString == null)) {
+        throw new RuntimeException("xsltString must be specified");
+}
+
+Source inSource = new StreamSource(new StringReader(sourceString));
+Source xslSource = new StreamSource(new StringReader(xsltString));
+
+// the factory pattern supports different XSLT processors
+// e.g. set the "javax.xml.transform.TransformerFactory" system property
+TransformerFactory tnfFact = TransformerFactory.newInstance();
+Transformer tnf = tnfFact.newTransformer(xslSource);
+
+if (paramList != void) {
+  for (String paramstr : paramList) {
+    p = param(paramstr);
+    tnf.setParameter(p.name, p.value);
+  }
+}
+
+Writer outputWriter = new StringWriter();
+tnf.transform(inSource, new StreamResult(outputWriter));
+outputString = outputWriter.toString();</script>
+  <dependencies />
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean><annotations /></activity>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters.json
new file mode 100644
index 0000000..0800c76
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters.json
@@ -0,0 +1,24 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "//From a proposal by Mikolaj Rybinski\nimport javax.xml.transform.Source;\nimport javax.xml.transform.Transformer;\nimport javax.xml.transform.TransformerFactory;\nimport javax.xml.transform.stream.StreamResult;\nimport javax.xml.transform.stream.StreamSource;\n\nparam(paramstr) {\n    nameAndValue = paramstr.split(\"=\");\n    if (nameAndValue.length != 2) {\n        throw new RuntimeException(\"Wrong parameter format: \\\"\" + paramstr + \"\\\".\");\n    }\n    name = nameAndValue[0].trim();\n    value = nameAndValue[1].trim();\n    return this;\n}\n\nif ((sourceString == void) || (sourceString == null)) {\n        throw new RuntimeException(\"sourceString must be specified\");\n}\n\nif ((xsltString == void) || (xsltString == null)) {\n        throw new RuntimeException(\"xsltString must be specified\");\n}\n\nSource inSource = new StreamSource(new StringReader(sourceString));\nSource xslSource = new StreamSource(new StringReader(xsltString));\n\n// the factory patte
 rn supports different XSLT processors\n// e.g. set the \"javax.xml.transform.TransformerFactory\" system property\nTransformerFactory tnfFact = TransformerFactory.newInstance();\nTransformer tnf = tnfFact.newTransformer(xslSource);\n\nif (paramList != void) {\n  for (String paramstr : paramList) {\n    p = param(paramstr);\n    tnf.setParameter(p.name, p.value);\n  }\n}\n\nWriter outputWriter = new StringWriter();\ntnf.transform(inSource, new StreamResult(outputWriter));\noutputString = outputWriter.toString();",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters",
+  "inputPorts" : [ {
+    "name" : "sourceString",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "xsltString",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "paramList",
+    "depth" : 1,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputString",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString
new file mode 100644
index 0000000..35b50d0
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString
@@ -0,0 +1,44 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>if ((bytes == void) || (bytes == null)) {
+	throw new RuntimeException("The 'bytes' parameter must be specified");
+}
+if (encoding == void) {
+	string = new String(bytes);
+} else {
+	string = new String(bytes, encoding);
+}
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>[B</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>bytes</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'application/octet-stream'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>encoding</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>string</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString.json
new file mode 100644
index 0000000..ae7f934
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ByteArrayToString.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if ((bytes == void) || (bytes == null)) {\n\tthrow new RuntimeException(\"The 'bytes' parameter must be specified\");\n}\nif (encoding == void) {\n\tstring = new String(bytes);\n} else {\n\tstring = new String(bytes, encoding);\n}\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.ByteArrayToString",
+  "inputPorts" : [ {
+    "name" : "bytes",
+    "depth" : 0,
+    "type" : "byte[]"
+  }, {
+    "name" : "encoding",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "string",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64 b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64
new file mode 100644
index 0000000..62c01bd
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64
@@ -0,0 +1,31 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import org.apache.commons.codec.binary.Base64;
+
+bytes = Base64.decodeBase64(base64.getBytes());
+</script>
+  <dependencies class="java.util.Collections$SingletonList">
+    <element class="string">commons-codec:commons-codec:1.3</element>
+  </dependencies>
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>base64</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>bytes</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'application/octet-stream'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64.json
new file mode 100644
index 0000000..1cb0f62
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.DecodeBase64.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import org.apache.commons.codec.binary.Base64;\n\nbytes = Base64.decodeBase64(base64.getBytes());\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.DecodeBase64",
+  "inputPorts" : [ {
+    "name" : "base64",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "bytes",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList
new file mode 100644
index 0000000..615c762
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList
@@ -0,0 +1,26 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>outputlist = inputlist;</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>[B</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>inputlist</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>outputlist</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList.json
new file mode 100644
index 0000000..aa0d198
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EchoList.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "outputlist = inputlist;",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.EchoList",
+  "inputPorts" : [ {
+    "name" : "inputlist",
+    "depth" : 1,
+    "type" : "byte[]"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputlist",
+    "depth" : 1,
+    "granularDepth" : 1
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings
new file mode 100644
index 0000000..6045d0a
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings
@@ -0,0 +1,19 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>List strings = new ArrayList();
+for (int i = 0; i &lt; 40; i++) {
+	strings.add("String" + i);
+}
+</script>
+  <dependencies />
+  <inputs />
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>strings</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings.json
new file mode 100644
index 0000000..4afc1f8
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings.json
@@ -0,0 +1,11 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "List strings = new ArrayList();\nfor (int i = 0; i < 40; i++) {\n\tstrings.add(\"String\" + i);\n}\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings",
+  "outputPorts" : [ {
+    "name" : "strings",
+    "depth" : 1,
+    "granularDepth" : 1
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file


[17/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-localworker-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64 b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64
new file mode 100644
index 0000000..8f6bcd0
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64
@@ -0,0 +1,30 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import org.apache.commons.codec.binary.Base64;
+
+base64 = new String(Base64.encodeBase64(bytes));</script>
+  <dependencies class="java.util.Collections$SingletonList">
+    <element class="string">commons-codec:commons-codec:1.3</element>
+  </dependencies>
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>[B</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>bytes</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'application/octet-stream'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>base64</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64.json
new file mode 100644
index 0000000..5cbd786
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.EncodeBase64.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import org.apache.commons.codec.binary.Base64;\n\nbase64 = new String(Base64.encodeBase64(bytes));",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.EncodeBase64",
+  "inputPorts" : [ {
+    "name" : "bytes",
+    "depth" : 0,
+    "type" : "byte[]"
+  } ],
+  "outputPorts" : [ {
+    "name" : "base64",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks
new file mode 100644
index 0000000..05946b1
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks
@@ -0,0 +1,41 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>String lowerCaseContent = document.toLowerCase();
+int index = 0;
+List imagelinks = new ArrayList();
+while ((index = lowerCaseContent.indexOf("&lt;img", index)) != -1) {
+	if ((index = lowerCaseContent.indexOf("src", index)) == -1)
+		break;
+	if ((index = lowerCaseContent.indexOf("=", index)) == -1)
+		break;
+	index++;
+	String remaining = document.substring(index);
+	StringTokenizer st = new StringTokenizer(remaining, "\t\n\r\"&gt;#");
+	String strLink = st.nextToken();
+	imagelinks.add(strLink);
+}
+
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>document</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/html'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>imagelinks</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/x-taverna-web-url')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks.json
new file mode 100644
index 0000000..2a23a47
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "String lowerCaseContent = document.toLowerCase();\nint index = 0;\nList imagelinks = new ArrayList();\nwhile ((index = lowerCaseContent.indexOf(\"<img\", index)) != -1) {\n\tif ((index = lowerCaseContent.indexOf(\"src\", index)) == -1)\n\t\tbreak;\n\tif ((index = lowerCaseContent.indexOf(\"=\", index)) == -1)\n\t\tbreak;\n\tindex++;\n\tString remaining = document.substring(index);\n\tStringTokenizer st = new StringTokenizer(remaining, \"\\t\\n\\r\\\">#\");\n\tString strLink = st.nextToken();\n\timagelinks.add(strLink);\n}\n\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks",
+  "inputPorts" : [ {
+    "name" : "document",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "imagelinks",
+    "depth" : 1,
+    "granularDepth" : 1
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList
new file mode 100644
index 0000000..7b107e6
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList
@@ -0,0 +1,43 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>filteredlist = new ArrayList();
+for (Iterator i = stringlist.iterator(); i.hasNext();) {
+	String item = (String) i.next();
+	if (item.matches(regex)) {
+		filteredlist.add(item);
+	}
+}
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>stringlist</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>regex</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>filteredlist</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList.json
new file mode 100644
index 0000000..0f26e3e
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FilterStringList.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "filteredlist = new ArrayList();\nfor (Iterator i = stringlist.iterator(); i.hasNext();) {\n\tString item = (String) i.next();\n\tif (item.matches(regex)) {\n\t\tfilteredlist.add(item);\n\t}\n}\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.FilterStringList",
+  "inputPorts" : [ {
+    "name" : "stringlist",
+    "depth" : 1,
+    "type" : "String"
+  }, {
+    "name" : "regex",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "filteredlist",
+    "depth" : 1,
+    "granularDepth" : 1
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList
new file mode 100644
index 0000000..558cc99
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList
@@ -0,0 +1,39 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>flatten(inputs, outputs, depth) {
+	for (i = inputs.iterator(); i.hasNext();) {
+	    element = i.next();
+		if (element instanceof Collection &amp;&amp; depth &gt; 0) {
+			flatten(element, outputs, depth - 1);
+		} else {
+			outputs.add(element);
+		}
+	}
+}
+
+outputlist = new ArrayList();
+
+flatten(inputlist, outputlist, 1);</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>[B</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>inputlist</name>
+      <depth>2</depth>
+      <mimeTypes>
+        <string>l(l(''))</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>outputlist</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList.json
new file mode 100644
index 0000000..4992e0b
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.FlattenList.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "flatten(inputs, outputs, depth) {\n\tfor (i = inputs.iterator(); i.hasNext();) {\n\t    element = i.next();\n\t\tif (element instanceof Collection && depth > 0) {\n\t\t\tflatten(element, outputs, depth - 1);\n\t\t} else {\n\t\t\toutputs.add(element);\n\t\t}\n\t}\n}\n\noutputlist = new ArrayList();\n\nflatten(inputlist, outputlist, 1);",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.FlattenList",
+  "inputPorts" : [ {
+    "name" : "inputlist",
+    "depth" : 2,
+    "type" : "byte[]"
+  } ],
+  "outputPorts" : [ {
+    "name" : "outputlist",
+    "depth" : 1,
+    "granularDepth" : 1
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber
new file mode 100644
index 0000000..3edd0cf
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber
@@ -0,0 +1,44 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>int targetLengthInt = 7;
+if (targetlength != void) {
+	targetLengthInt = Integer.parseInt(targetlength);
+}
+int currentLength = input.length();
+while (input.length() &lt; targetLengthInt) {
+	input = "0" + input;
+}
+padded = input;</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>input</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>targetlength</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>padded</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber.json
new file mode 100644
index 0000000..37828ea
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.PadNumber.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "int targetLengthInt = 7;\nif (targetlength != void) {\n\ttargetLengthInt = Integer.parseInt(targetlength);\n}\nint currentLength = input.length();\nwhile (input.length() < targetLengthInt) {\n\tinput = \"0\" + input;\n}\npadded = input;",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.PadNumber",
+  "inputPorts" : [ {
+    "name" : "input",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "targetlength",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "padded",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList
new file mode 100644
index 0000000..7a4165a
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList
@@ -0,0 +1,60 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import java.util.regex.*;
+
+filteredlist = new ArrayList();
+Pattern thePat = Pattern.compile(regex);
+int theGroup = Integer.parseInt(group);
+
+for (Iterator i = stringlist.iterator(); i.hasNext();) {
+	String item = (String) i.next();
+	Matcher matcher = thePat.matcher(item);
+
+	if (matcher.find()) {
+		filteredlist.add(matcher.group(theGroup));
+	}
+}
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>stringlist</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>regex</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>group</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>filteredlist</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList.json
new file mode 100644
index 0000000..86378fb
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList.json
@@ -0,0 +1,24 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import java.util.regex.*;\n\nfilteredlist = new ArrayList();\nPattern thePat = Pattern.compile(regex);\nint theGroup = Integer.parseInt(group);\n\nfor (Iterator i = stringlist.iterator(); i.hasNext();) {\n\tString item = (String) i.next();\n\tMatcher matcher = thePat.matcher(item);\n\n\tif (matcher.find()) {\n\t\tfilteredlist.add(matcher.group(theGroup));\n\t}\n}\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList",
+  "inputPorts" : [ {
+    "name" : "stringlist",
+    "depth" : 1,
+    "type" : "String"
+  }, {
+    "name" : "regex",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "group",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "filteredlist",
+    "depth" : 1,
+    "granularDepth" : 1
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail
new file mode 100644
index 0000000..f847773
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail
@@ -0,0 +1,85 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import javax.mail.Message;
+import javax.mail.Session;
+import javax.mail.Transport;
+import javax.mail.internet.MimeMessage;
+import javax.mail.internet.InternetAddress;
+
+if (subject == void) {
+	subject = "No subject";
+}
+if (body == void) {
+	throw new Exception("No body specified for message");
+}
+
+Properties mailProps = System.getProperties();
+if (smtpserver != void) {
+	mailProps.put("mail.smtp.host", smtpserver);
+}
+
+Session session = Session.getDefaultInstance(mailProps, null);
+MimeMessage message = new MimeMessage(session);
+message.setFrom(new InternetAddress(from));
+message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
+message.setSubject(subject);
+message.setText(body);
+Transport.send(message);
+</script>
+  <dependencies>
+    <string>javax.mail:mail:1.4</string>
+    <string>javax.activation:activation:1.1</string>
+  </dependencies>
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>to</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>from</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>subject</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>body</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>smtpserver</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs />
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail.json
new file mode 100644
index 0000000..9a7365d
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SendEmail.json
@@ -0,0 +1,27 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import javax.mail.Message;\nimport javax.mail.Session;\nimport javax.mail.Transport;\nimport javax.mail.internet.MimeMessage;\nimport javax.mail.internet.InternetAddress;\n\nif (subject == void) {\n\tsubject = \"No subject\";\n}\nif (body == void) {\n\tthrow new Exception(\"No body specified for message\");\n}\n\nProperties mailProps = System.getProperties();\nif (smtpserver != void) {\n\tmailProps.put(\"mail.smtp.host\", smtpserver);\n}\n\nSession session = Session.getDefaultInstance(mailProps, null);\nMimeMessage message = new MimeMessage(session);\nmessage.setFrom(new InternetAddress(from));\nmessage.addRecipient(Message.RecipientType.TO, new InternetAddress(to));\nmessage.setSubject(subject);\nmessage.setText(body);\nTransport.send(message);\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.SendEmail",
+  "inputPorts" : [ {
+    "name" : "to",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "from",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "subject",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "body",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "smtpserver",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex
new file mode 100644
index 0000000..7c296f3
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex
@@ -0,0 +1,47 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>List split = new ArrayList();
+if (!string.equals("")) {
+	String regexString = ",";
+	if (regex != void) {
+		regexString = regex;
+	}
+	String[] result = string.split(regexString);
+	for (int i = 0; i &lt; result.length; i++) {
+		split.add(result[i]);
+	}
+}
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>string</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>regex</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>split</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex.json
new file mode 100644
index 0000000..afbdc78
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.SplitByRegex.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "List split = new ArrayList();\nif (!string.equals(\"\")) {\n\tString regexString = \",\";\n\tif (regex != void) {\n\t\tregexString = regex;\n\t}\n\tString[] result = string.split(regexString);\n\tfor (int i = 0; i < result.length; i++) {\n\t\tsplit.add(result[i]);\n\t}\n}\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.SplitByRegex",
+  "inputPorts" : [ {
+    "name" : "string",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "regex",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "split",
+    "depth" : 1,
+    "granularDepth" : 1
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat
new file mode 100644
index 0000000..7993975
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat
@@ -0,0 +1,36 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>output = string1 + string2;</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>string1</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>string2</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>output</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat.json
new file mode 100644
index 0000000..24a3fa9
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringConcat.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "output = string1 + string2;",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.StringConcat",
+  "inputPorts" : [ {
+    "name" : "string1",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "string2",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "output",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge
new file mode 100644
index 0000000..cdd408d
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge
@@ -0,0 +1,49 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>String seperatorString = "\n";
+if (seperator != void) {
+	seperatorString = seperator;
+}
+StringBuffer sb = new StringBuffer();
+for (Iterator i = stringlist.iterator(); i.hasNext();) {
+	String item = (String) i.next();
+	sb.append(item);
+	if (i.hasNext()) {
+		sb.append(seperatorString);
+	}
+}
+concatenated = sb.toString();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>stringlist</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>seperator</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>concatenated</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge.json
new file mode 100644
index 0000000..a0b860f
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringListMerge.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "String seperatorString = \"\\n\";\nif (seperator != void) {\n\tseperatorString = seperator;\n}\nStringBuffer sb = new StringBuffer();\nfor (Iterator i = stringlist.iterator(); i.hasNext();) {\n\tString item = (String) i.next();\n\tsb.append(item);\n\tif (i.hasNext()) {\n\t\tsb.append(seperatorString);\n\t}\n}\nconcatenated = sb.toString();\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.StringListMerge",
+  "inputPorts" : [ {
+    "name" : "stringlist",
+    "depth" : 1,
+    "type" : "String"
+  }, {
+    "name" : "seperator",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "concatenated",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference
new file mode 100644
index 0000000..c7bb289
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference
@@ -0,0 +1,49 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>List difference = new ArrayList();
+for (Iterator i = list1.iterator(); i.hasNext();) {
+	Object o = i.next();
+	if (!list2.contains(o)) {
+		difference.add(o);
+	}
+}
+for (Iterator i = list2.iterator(); i.hasNext();) {
+	Object o = i.next();
+	if (!list1.contains(o)) {
+		difference.add(o);
+	}
+}
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>list1</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>list2</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>difference</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference.json
new file mode 100644
index 0000000..c844322
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetDifference.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "List difference = new ArrayList();\nfor (Iterator i = list1.iterator(); i.hasNext();) {\n\tObject o = i.next();\n\tif (!list2.contains(o)) {\n\t\tdifference.add(o);\n\t}\n}\nfor (Iterator i = list2.iterator(); i.hasNext();) {\n\tObject o = i.next();\n\tif (!list1.contains(o)) {\n\t\tdifference.add(o);\n\t}\n}\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.StringSetDifference",
+  "inputPorts" : [ {
+    "name" : "list1",
+    "depth" : 1,
+    "type" : "String"
+  }, {
+    "name" : "list2",
+    "depth" : 1,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "difference",
+    "depth" : 1,
+    "granularDepth" : 1
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection
new file mode 100644
index 0000000..a4c2f5a
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection
@@ -0,0 +1,43 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>List intersection = new ArrayList();
+for (Iterator i = list1.iterator(); i.hasNext();) {
+	Object o = i.next();
+	if (list2.contains(o)) {
+		intersection.add(o);
+	}
+}
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>list1</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>list2</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>intersection</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection.json
new file mode 100644
index 0000000..0404922
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetIntersection.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "List intersection = new ArrayList();\nfor (Iterator i = list1.iterator(); i.hasNext();) {\n\tObject o = i.next();\n\tif (list2.contains(o)) {\n\t\tintersection.add(o);\n\t}\n}\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.StringSetIntersection",
+  "inputPorts" : [ {
+    "name" : "list1",
+    "depth" : 1,
+    "type" : "String"
+  }, {
+    "name" : "list2",
+    "depth" : 1,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "intersection",
+    "depth" : 1,
+    "granularDepth" : 1
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion
new file mode 100644
index 0000000..1ef0958
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion
@@ -0,0 +1,43 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow">
+
+<class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>Set results = new HashSet();
+results.addAll(list1);
+results.addAll(list2);
+List union = new ArrayList();
+union.addAll(results);
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>list1</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>list2</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>union</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion.json
new file mode 100644
index 0000000..25960be
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringSetUnion.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "Set results = new HashSet();\nresults.addAll(list1);\nresults.addAll(list2);\nList union = new ArrayList();\nunion.addAll(results);\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.StringSetUnion",
+  "inputPorts" : [ {
+    "name" : "list1",
+    "depth" : 1,
+    "type" : "String"
+  }, {
+    "name" : "list2",
+    "depth" : 1,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "union",
+    "depth" : 1,
+    "granularDepth" : 1
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates
new file mode 100644
index 0000000..310dccc
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates
@@ -0,0 +1,33 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>List strippedlist = new ArrayList();
+for (Iterator i = stringlist.iterator(); i.hasNext();) {
+	String item = (String) i.next();
+	if (strippedlist.contains(item) == false) {
+		strippedlist.add(item);
+	}
+}
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>stringlist</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>strippedlist</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates.json
new file mode 100644
index 0000000..c5fecee
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "List strippedlist = new ArrayList();\nfor (Iterator i = stringlist.iterator(); i.hasNext();) {\n\tString item = (String) i.next();\n\tif (strippedlist.contains(item) == false) {\n\t\tstrippedlist.add(item);\n\t}\n}\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates",
+  "inputPorts" : [ {
+    "name" : "stringlist",
+    "depth" : 1,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "strippedlist",
+    "depth" : 1,
+    "granularDepth" : 1
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor
new file mode 100644
index 0000000..790073a
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor
@@ -0,0 +1,36 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>throw new Exception("This script fails");</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>foo</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>bar</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>urgle</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor.json
new file mode 100644
index 0000000..4a5b7d8
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "throw new Exception(\"This script fails\");",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor",
+  "inputPorts" : [ {
+    "name" : "foo",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "bar",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "urgle",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails
new file mode 100644
index 0000000..90e8ba8
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails
@@ -0,0 +1,34 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import java.util.Random;
+
+Random r = new Random();
+
+if ((r.nextInt() % 4) == 0) {
+	throw new RuntimeException("Fails every four runs!");
+}
+
+out = in;</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>in</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>out</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails.json
new file mode 100644
index 0000000..9ecf11d
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.TestSometimesFails.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import java.util.Random;\n\nRandom r = new Random();\n\nif ((r.nextInt() % 4) == 0) {\n\tthrow new RuntimeException(\"Fails every four runs!\");\n}\n\nout = in;",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.TestSometimesFails",
+  "inputPorts" : [ {
+    "name" : "in",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "out",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher
new file mode 100644
index 0000000..db3a73a
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher
@@ -0,0 +1,64 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>if ((url == void) || (url == null)) {
+	throw new RuntimeException("The url must be specified");
+}
+
+URL inputURL = null;
+if (base != void) {
+	inputURL = new URL(new URL(base), url);
+} else {
+	inputURL = new URL(url);
+}
+
+int bytesRead = 0;
+int totalBytesRead = 0;
+InputStream is = inputURL.openStream();
+ByteArrayOutputStream os = new ByteArrayOutputStream();
+byte[] buffer = new byte[2048];
+while (true) {
+	bytesRead = is.read(buffer);
+	if (bytesRead == -1) {
+		break;	
+	}
+
+	os.write(buffer, 0, bytesRead);
+}
+
+image = os.toByteArray();
+is.close();
+os.close();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>url</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/x-taverna-web-url'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>base</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/x-taverna-web-url'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>image</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'image/*'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher.json
new file mode 100644
index 0000000..a65b448
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebImageFetcher.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if ((url == void) || (url == null)) {\n\tthrow new RuntimeException(\"The url must be specified\");\n}\n\nURL inputURL = null;\nif (base != void) {\n\tinputURL = new URL(new URL(base), url);\n} else {\n\tinputURL = new URL(url);\n}\n\nint bytesRead = 0;\nint totalBytesRead = 0;\nInputStream is = inputURL.openStream();\nByteArrayOutputStream os = new ByteArrayOutputStream();\nbyte[] buffer = new byte[2048];\nwhile (true) {\n\tbytesRead = is.read(buffer);\n\tif (bytesRead == -1) {\n\t\tbreak;\t\n\t}\n\n\tos.write(buffer, 0, bytesRead);\n}\n\nimage = os.toByteArray();\nis.close();\nos.close();\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.WebImageFetcher",
+  "inputPorts" : [ {
+    "name" : "url",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "base",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "image",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher
new file mode 100644
index 0000000..dcd76a6
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher
@@ -0,0 +1,68 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>if ((url == void) || (url == null)) {
+	throw new RuntimeException("The url must be specified");
+}
+
+URL inputURL = null;
+if (base != void) {
+  inputURL = new URL(new URL(base), url);
+}
+else {
+  inputURL = new URL(url);
+}
+URLConnection con = inputURL.openConnection();
+InputStream in = con.getInputStream();
+
+StringBuffer result = new StringBuffer();
+BufferedReader reader;
+
+String encoding = con.getContentEncoding();
+if (encoding == null) {
+  reader = new BufferedReader(new InputStreamReader(in));
+} else {
+  reader = new BufferedReader(new InputStreamReader(in, encoding));
+}
+String line = null;
+String NEWLINE = System.getProperty("line.separator");
+while ((line = reader.readLine()) != null) {
+	result.append(line);
+	result.append(NEWLINE);
+}
+
+reader.close();
+contents = result.toString();
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>url</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/x-taverna-web-url'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>base</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/x-taverna-web-url'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>contents</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain,text/html'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher.json b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher.json
new file mode 100644
index 0000000..ad7a5b6
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/org.embl.ebi.escience.scuflworkers.java.WebPageFetcher.json
@@ -0,0 +1,20 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "if ((url == void) || (url == null)) {\n\tthrow new RuntimeException(\"The url must be specified\");\n}\n\nURL inputURL = null;\nif (base != void) {\n  inputURL = new URL(new URL(base), url);\n}\nelse {\n  inputURL = new URL(url);\n}\nURLConnection con = inputURL.openConnection();\nInputStream in = con.getInputStream();\n\nStringBuffer result = new StringBuffer();\nBufferedReader reader;\n\nString encoding = con.getContentEncoding();\nif (encoding == null) {\n  reader = new BufferedReader(new InputStreamReader(in));\n} else {\n  reader = new BufferedReader(new InputStreamReader(in, encoding));\n}\nString line = null;\nString NEWLINE = System.getProperty(\"line.separator\");\nwhile ((line = reader.readLine()) != null) {\n\tresult.append(line);\n\tresult.append(NEWLINE);\n}\n\nreader.close();\ncontents = result.toString();\n",
+  "localworkerName" : "org.embl.ebi.escience.scuflworkers.java.WebPageFetcher",
+  "inputPorts" : [ {
+    "name" : "url",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "base",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "contents",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file


[33/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-spreadsheet-import-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigView.java
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigView.java b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigView.java
new file mode 100644
index 0000000..af57c44
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigView.java
@@ -0,0 +1,1082 @@
+/*******************************************************************************
+ * Copyright (C) 2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.spreadsheet.views;
+
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.Stack;
+
+import javax.swing.ButtonGroup;
+import javax.swing.DefaultCellEditor;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.SwingConstants;
+import javax.swing.border.Border;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.table.DefaultTableColumnModel;
+import javax.swing.table.TableCellEditor;
+import javax.swing.table.TableColumn;
+import javax.swing.text.AttributeSet;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.JTextComponent;
+import javax.swing.text.PlainDocument;
+
+import net.sf.taverna.t2.activities.spreadsheet.Range;
+import net.sf.taverna.t2.activities.spreadsheet.SpreadsheetUtils;
+import net.sf.taverna.t2.activities.spreadsheet.il8n.SpreadsheetImportUIText;
+import net.sf.taverna.t2.lang.ui.DialogTextArea;
+import net.sf.taverna.t2.lang.ui.icons.Icons;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationPanel;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.log4j.Logger;
+
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+/**
+ * Configuration panel for the spreadsheet import activity.
+ *
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class SpreadsheetImportConfigView extends ActivityConfigurationPanel {
+
+	private static final String INCONSISTENT_ROW_MESSAGE = SpreadsheetImportUIText
+			.getString("SpreadsheetImportConfigView.INCONSISTENT_ROW_MESSAGE");
+
+	private static final String INCONSISTENT_COLUMN_MESSAGE = SpreadsheetImportUIText
+			.getString("SpreadsheetImportConfigView.INCONSISTENT_COLUMN_MESSAGE");
+
+	private static final String FROM_COLUMN_ERROR_MESSAGE = SpreadsheetImportUIText
+			.getString("SpreadsheetImportConfigView.FROM_COLUMN_ERROR_MESSAGE");
+
+	private static final String TO_COLUMN_ERROR_MESSAGE = SpreadsheetImportUIText
+			.getString("SpreadsheetImportConfigView.TO_COLUMN_ERROR_MESSAGE");
+
+	private static final String FROM_ROW_ERROR_MESSAGE = SpreadsheetImportUIText
+			.getString("SpreadsheetImportConfigView.FROM_ROW_ERROR_MESSAGE");
+
+	private static final String TO_ROW_ERROR_MESSAGE = SpreadsheetImportUIText
+			.getString("SpreadsheetImportConfigView.TO_ROW_ERROR_MESSAGE");
+
+	private static final String DEFAULT_MESSAGE = SpreadsheetImportUIText
+			.getString("SpreadsheetImportConfigView.DEFAULT_MESSAGE");
+
+	private static final String EMPTY_FROM_ROW_ERROR_MESSAGE = SpreadsheetImportUIText
+			.getString("SpreadsheetImportConfigView.EMPTY_FROM_ROW_ERROR_MESSAGE");
+
+	private static final String EMPTY_FROM_COLUMN_ERROR_MESSAGE = SpreadsheetImportUIText
+			.getString("SpreadsheetImportConfigView.EMPTY_FROM_COLUMN_ERROR_MESSAGE");
+
+	private static final String EMPTY_TO_COLUMN_ERROR_MESSAGE = SpreadsheetImportUIText
+			.getString("SpreadsheetImportConfigView.EMPTY_TO_COLUMN_ERROR_MESSAGE");
+
+	private static final String DUPLICATE_PORT_NAME_ERROR_MESSAGE = SpreadsheetImportUIText
+			.getString("SpreadsheetImportConfigView.DUPLICATE_PORT_NAME_ERROR_MESSAGE");
+
+	private static Logger logger = Logger.getLogger(SpreadsheetImportConfigView.class);
+
+	private JPanel titlePanel, contentPanel, buttonPanel, page1, page2;
+
+	private JLabel titleLabel, titleIcon, rowLabel, columnLabel;
+
+	private JLabel emptyCellLabel, outputFormatLabel, outputFormatDelimiterLabel, columnMappingLabel;
+
+	private DialogTextArea titleMessage;
+
+	private JTextField columnFromValue, columnToValue, rowFromValue, rowToValue;
+
+	private JTextField emptyCellUserDefinedValue, outputFormatDelimiter;
+
+	private JCheckBox rowSelectAllOption, rowExcludeFirstOption, rowIgnoreBlankRows;
+
+	private ButtonGroup emptyCellButtonGroup, outputFormatButtonGroup;
+
+	private JRadioButton emptyCellEmptyStringOption, emptyCellUserDefinedOption,
+	emptyCellErrorValueOption;
+
+	private JRadioButton outputFormatMultiplePort, outputFormatSinglePort;
+
+	private JTable columnMappingTable;
+
+	private SpreadsheetImportConfigTableModel columnMappingTableModel;
+
+	private JButton nextButton, backButton;
+
+	private CardLayout cardLayout = new CardLayout();
+
+	private Stack<String> warningMessages = new Stack<String>();
+
+	private Stack<String> errorMessages = new Stack<String>();
+
+	private ObjectNode newConfiguration;
+
+	private final ServiceRegistry serviceRegistry;
+
+	/**
+	 * Constructs a configuration view for an SpreadsheetImport Activity.
+	 *
+	 * @param activity
+	 */
+	public SpreadsheetImportConfigView(Activity activity, ServiceRegistry serviceRegistry) {
+		super(activity);
+		this.serviceRegistry = serviceRegistry;
+		initialise();
+	}
+
+	@Override
+	protected void initialise() {
+		super.initialise();
+		newConfiguration = getJson().deepCopy();
+
+		// title
+		titlePanel = new JPanel(new BorderLayout());
+		titlePanel.setBackground(Color.WHITE);
+		addDivider(titlePanel, SwingConstants.BOTTOM, true);
+
+		titleLabel = new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.panelTitle"));
+		titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 13.5f));
+		titleIcon = new JLabel("");
+		titleMessage = new DialogTextArea(DEFAULT_MESSAGE);
+		titleMessage.setMargin(new Insets(5, 10, 10, 10));
+		// titleMessage.setMinimumSize(new Dimension(0, 30));
+		titleMessage.setFont(titleMessage.getFont().deriveFont(11f));
+		titleMessage.setEditable(false);
+		titleMessage.setFocusable(false);
+		// titleMessage.setFont(titleLabel.getFont().deriveFont(Font.PLAIN,
+		// 12f));
+
+		// column range
+		columnLabel = new JLabel(SpreadsheetImportUIText
+				.getString("SpreadsheetImportConfigView.columnSectionLabel"));
+
+		JsonNode columnRange = newConfiguration.get("columnRange");
+		columnFromValue = new JTextField(new UpperCaseDocument(), SpreadsheetUtils.getColumnLabel(columnRange.get("start").intValue()), 4);
+		columnFromValue.setMinimumSize(columnFromValue.getPreferredSize());
+		columnToValue = new JTextField(new UpperCaseDocument(), SpreadsheetUtils.getColumnLabel(columnRange.get("end").intValue()), 4);
+		columnToValue.setMinimumSize(columnToValue.getPreferredSize());
+
+		columnFromValue.getDocument().addDocumentListener(new DocumentListener() {
+			public void changedUpdate(DocumentEvent e) {
+			}
+
+			public void insertUpdate(DocumentEvent e) {
+				checkValue(columnFromValue.getText());
+			}
+
+			public void removeUpdate(DocumentEvent e) {
+				checkValue(columnFromValue.getText());
+			}
+
+			private void checkValue(String text) {
+				if (text.trim().equals("")) {
+					addErrorMessage(EMPTY_FROM_COLUMN_ERROR_MESSAGE);
+				} else if (text.trim().matches("[A-Za-z]+")) {
+					String fromColumn = columnFromValue.getText().toUpperCase();
+					String toColumn = columnToValue.getText().toUpperCase();
+					int fromColumnIndex = SpreadsheetUtils.getColumnIndex(fromColumn);
+					int toColumnIndex = SpreadsheetUtils.getColumnIndex(toColumn);
+					if (checkColumnRange(fromColumnIndex, toColumnIndex)) {
+						columnMappingTableModel.setFromColumn(fromColumnIndex);
+						columnMappingTableModel.setToColumn(toColumnIndex);
+						newConfiguration.set("columnRange", newConfiguration.objectNode().put("start", fromColumnIndex).put("end", toColumnIndex));
+						validatePortNames();
+					}
+					removeErrorMessage(FROM_COLUMN_ERROR_MESSAGE);
+					removeErrorMessage(EMPTY_FROM_COLUMN_ERROR_MESSAGE);
+				} else {
+					addErrorMessage(FROM_COLUMN_ERROR_MESSAGE);
+					removeErrorMessage(EMPTY_FROM_COLUMN_ERROR_MESSAGE);
+				}
+			}
+
+		});
+
+		columnToValue.getDocument().addDocumentListener(new DocumentListener() {
+			public void changedUpdate(DocumentEvent e) {
+			}
+
+			public void insertUpdate(DocumentEvent e) {
+				checkValue(columnToValue.getText());
+			}
+
+			public void removeUpdate(DocumentEvent e) {
+				checkValue(columnToValue.getText());
+			}
+
+			private void checkValue(String text) {
+				if (text.trim().equals("")) {
+					addErrorMessage(EMPTY_TO_COLUMN_ERROR_MESSAGE);
+				} else if (text.trim().matches("[A-Za-z]+")) {
+					String fromColumn = columnFromValue.getText().toUpperCase();
+					String toColumn = columnToValue.getText().toUpperCase();
+					int fromColumnIndex = SpreadsheetUtils.getColumnIndex(fromColumn);
+					int toColumnIndex = SpreadsheetUtils.getColumnIndex(toColumn);
+					if (checkColumnRange(fromColumnIndex, toColumnIndex)) {
+						columnMappingTableModel.setFromColumn(fromColumnIndex);
+						columnMappingTableModel.setToColumn(toColumnIndex);
+						newConfiguration.set("columnRange", newConfiguration.objectNode().put("start", fromColumnIndex).put("end", toColumnIndex));
+						validatePortNames();
+					}
+					removeErrorMessage(TO_COLUMN_ERROR_MESSAGE);
+					removeErrorMessage(EMPTY_TO_COLUMN_ERROR_MESSAGE);
+
+				} else {
+					addErrorMessage(TO_COLUMN_ERROR_MESSAGE);
+					removeErrorMessage(EMPTY_TO_COLUMN_ERROR_MESSAGE);
+				}
+			}
+		});
+
+		// row range
+		rowLabel = new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.rowSectionLabel"));
+		addDivider(rowLabel, SwingConstants.TOP, false);
+
+		rowSelectAllOption = new JCheckBox(SpreadsheetImportUIText
+				.getString("SpreadsheetImportConfigView.selectAllRowsOption"));
+		rowExcludeFirstOption = new JCheckBox(SpreadsheetImportUIText
+				.getString("SpreadsheetImportConfigView.excludeHeaderRowOption"));
+		rowIgnoreBlankRows = new JCheckBox(SpreadsheetImportUIText
+				.getString("SpreadsheetImportConfigView.ignoreBlankRowsOption"));
+		rowSelectAllOption.setFocusable(false);
+		rowExcludeFirstOption.setFocusable(false);
+
+		JsonNode rowRange = newConfiguration.get("rowRange");
+		rowFromValue = new JTextField(new NumericDocument(), String.valueOf(rowRange.get("start").intValue() + 1), 4);
+		if (rowRange.get("end").intValue() == -1) {
+			rowToValue = new JTextField(new NumericDocument(), "", 4);
+		} else {
+			rowToValue = new JTextField(new NumericDocument(), String.valueOf(rowRange.get("end").intValue() + 1), 4);
+		}
+		rowFromValue.setMinimumSize(rowFromValue.getPreferredSize());
+		rowToValue.setMinimumSize(rowToValue.getPreferredSize());
+
+		if (newConfiguration.get("allRows").booleanValue()) {
+			rowSelectAllOption.setSelected(true);
+			rowFromValue.setEditable(false);
+			rowFromValue.setEnabled(false);
+			rowToValue.setEditable(false);
+			rowToValue.setEnabled(false);
+		} else {
+			rowExcludeFirstOption.setEnabled(false);
+		}
+		rowExcludeFirstOption.setSelected(newConfiguration.get("excludeFirstRow").booleanValue());
+		rowIgnoreBlankRows.setSelected(newConfiguration.get("ignoreBlankRows").booleanValue());
+
+		rowFromValue.getDocument().addDocumentListener(new DocumentListener() {
+			public void changedUpdate(DocumentEvent e) {
+			}
+
+			public void insertUpdate(DocumentEvent e) {
+				checkValue(rowFromValue.getText());
+			}
+
+			public void removeUpdate(DocumentEvent e) {
+				checkValue(rowFromValue.getText());
+			}
+
+			private void checkValue(String text) {
+				if (text.trim().equals("")) {
+					addErrorMessage(EMPTY_FROM_ROW_ERROR_MESSAGE);
+				} else if (text.trim().matches("[1-9][0-9]*")) {
+					checkRowRange(rowFromValue.getText(), rowToValue.getText());
+					int fromRow = Integer.parseInt(rowFromValue.getText());
+					((ObjectNode) newConfiguration.get("rowRange")).put("start", fromRow - 1);
+					removeErrorMessage(FROM_ROW_ERROR_MESSAGE);
+					removeErrorMessage(EMPTY_FROM_ROW_ERROR_MESSAGE);
+				} else {
+					addErrorMessage(FROM_ROW_ERROR_MESSAGE);
+					removeErrorMessage(EMPTY_FROM_ROW_ERROR_MESSAGE);
+				}
+			}
+		});
+
+		rowToValue.getDocument().addDocumentListener(new DocumentListener() {
+			public void changedUpdate(DocumentEvent e) {
+			}
+
+			public void insertUpdate(DocumentEvent e) {
+				checkValue(rowToValue.getText());
+			}
+
+			public void removeUpdate(DocumentEvent e) {
+				checkValue(rowToValue.getText());
+			}
+
+			private void checkValue(String text) {
+				if (text.trim().equals("")) {
+					((ObjectNode) newConfiguration.get("rowRange")).put("end", -1);
+					removeErrorMessage(TO_ROW_ERROR_MESSAGE);
+					removeErrorMessage(INCONSISTENT_ROW_MESSAGE);
+				} else if (text.trim().matches("[0-9]+")) {
+					checkRowRange(rowFromValue.getText(), rowToValue.getText());
+					int toRow = Integer.parseInt(rowToValue.getText());
+					((ObjectNode) newConfiguration.get("rowRange")).put("end", toRow - 1);
+					removeErrorMessage(TO_ROW_ERROR_MESSAGE);
+				} else {
+					addErrorMessage(TO_ROW_ERROR_MESSAGE);
+				}
+			}
+		});
+
+		rowSelectAllOption.addItemListener(new ItemListener() {
+			public void itemStateChanged(ItemEvent e) {
+				if (e.getStateChange() == ItemEvent.SELECTED) {
+					newConfiguration.put("allRows", true);
+					rowExcludeFirstOption.setEnabled(true);
+					if (rowExcludeFirstOption.isSelected()) {
+						rowFromValue.setText("2");
+					} else {
+						rowFromValue.setText("1");
+					}
+					rowToValue.setText("");
+					rowFromValue.setEditable(false);
+					rowFromValue.setEnabled(false);
+					rowToValue.setEditable(false);
+					rowToValue.setEnabled(false);
+				} else {
+					newConfiguration.put("allRows", false);
+					rowExcludeFirstOption.setEnabled(false);
+					rowFromValue.setEditable(true);
+					rowFromValue.setEnabled(true);
+					rowToValue.setEditable(true);
+					rowToValue.setEnabled(true);
+				}
+			}
+		});
+
+		rowExcludeFirstOption.addItemListener(new ItemListener() {
+			public void itemStateChanged(ItemEvent e) {
+				if (e.getStateChange() == ItemEvent.SELECTED) {
+					newConfiguration.put("excludeFirstRow", true);
+					rowFromValue.setText("2");
+					((ObjectNode) newConfiguration.get("rowRange")).put("start", 1);
+				} else {
+					newConfiguration.put("excludeFirstRow", false);
+					rowFromValue.setText("1");
+					((ObjectNode) newConfiguration.get("rowRange")).put("start", 0);
+				}
+			}
+		});
+
+		rowIgnoreBlankRows.addItemListener(new ItemListener() {
+			public void itemStateChanged(ItemEvent e) {
+				newConfiguration.put("ignoreBlankRows", e.getStateChange() == ItemEvent.SELECTED);
+			}
+		});
+
+		// empty cells
+		emptyCellLabel = new JLabel(SpreadsheetImportUIText
+				.getString("SpreadsheetImportConfigView.emptyCellSectionLabel"));
+		addDivider(emptyCellLabel, SwingConstants.TOP, false);
+
+		emptyCellButtonGroup = new ButtonGroup();
+		emptyCellEmptyStringOption = new JRadioButton(SpreadsheetImportUIText
+				.getString("SpreadsheetImportConfigView.emptyStringOption"));
+		emptyCellUserDefinedOption = new JRadioButton(SpreadsheetImportUIText
+				.getString("SpreadsheetImportConfigView.userDefinedOption"));
+		emptyCellErrorValueOption = new JRadioButton(SpreadsheetImportUIText
+				.getString("SpreadsheetImportConfigView.generateErrorOption"));
+		emptyCellEmptyStringOption.setFocusable(false);
+		emptyCellUserDefinedOption.setFocusable(false);
+		emptyCellErrorValueOption.setFocusable(false);
+
+		emptyCellUserDefinedValue = new JTextField(newConfiguration.get("emptyCellValue").textValue());
+
+		emptyCellButtonGroup.add(emptyCellEmptyStringOption);
+		emptyCellButtonGroup.add(emptyCellUserDefinedOption);
+		emptyCellButtonGroup.add(emptyCellErrorValueOption);
+
+		if (newConfiguration.get("emptyCellPolicy").textValue().equals("GENERATE_ERROR")) {
+			emptyCellErrorValueOption.setSelected(true);
+			emptyCellUserDefinedValue.setEnabled(false);
+			emptyCellUserDefinedValue.setEditable(false);
+		} else if (newConfiguration.get("emptyCellPolicy").textValue().equals("EMPTY_STRING")) {
+			emptyCellEmptyStringOption.setSelected(true);
+			emptyCellUserDefinedValue.setEnabled(false);
+			emptyCellUserDefinedValue.setEditable(false);
+		} else {
+			emptyCellUserDefinedOption.setSelected(true);
+			emptyCellUserDefinedValue.setText(newConfiguration.get("emptyCellValue").textValue());
+			emptyCellUserDefinedValue.setEnabled(true);
+			emptyCellUserDefinedValue.setEditable(true);
+		}
+
+		emptyCellEmptyStringOption.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				newConfiguration.put("emptyCellPolicy", "EMPTY_STRING");
+				emptyCellUserDefinedValue.setEnabled(false);
+				emptyCellUserDefinedValue.setEditable(false);
+			}
+		});
+		emptyCellUserDefinedOption.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				newConfiguration.put("emptyCellPolicy", "USER_DEFINED");
+				emptyCellUserDefinedValue.setEnabled(true);
+				emptyCellUserDefinedValue.setEditable(true);
+				emptyCellUserDefinedValue.requestFocusInWindow();
+			}
+		});
+		emptyCellErrorValueOption.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				newConfiguration.put("emptyCellPolicy", "GENERATE_ERROR");
+				emptyCellUserDefinedValue.setEnabled(false);
+				emptyCellUserDefinedValue.setEditable(false);
+			}
+		});
+
+		emptyCellUserDefinedValue.getDocument().addDocumentListener(new DocumentListener() {
+			public void changedUpdate(DocumentEvent e) {
+				newConfiguration.put("emptyCellValue", emptyCellUserDefinedValue.getText());
+			}
+
+			public void insertUpdate(DocumentEvent e) {
+				newConfiguration.put("emptyCellValue", emptyCellUserDefinedValue.getText());
+			}
+
+			public void removeUpdate(DocumentEvent e) {
+				newConfiguration.put("emptyCellValue", emptyCellUserDefinedValue.getText());
+			}
+		});
+
+		// column mappings
+		columnMappingLabel = new JLabel(SpreadsheetImportUIText
+				.getString("SpreadsheetImportConfigView.columnMappingSectionLabel"));
+		addDivider(columnMappingLabel, SwingConstants.TOP, false);
+
+		Map<String, String> columnToPortMapping = new HashMap<>();
+		if (newConfiguration.has("columnNames")) {
+			for (JsonNode columnName : newConfiguration.get("columnNames")) {
+				columnToPortMapping.put(columnName.get("column").textValue(), columnName.get("port").textValue());
+			}
+		}
+		columnMappingTableModel = new SpreadsheetImportConfigTableModel(columnFromValue.getText(),
+				columnToValue.getText(), columnToPortMapping);
+
+		columnMappingTable = new JTable();
+		columnMappingTable.setRowSelectionAllowed(false);
+		columnMappingTable.getTableHeader().setReorderingAllowed(false);
+		columnMappingTable.setGridColor(Color.LIGHT_GRAY);
+		// columnMappingTable.setFocusable(false);
+
+		columnMappingTable.setColumnModel(new DefaultTableColumnModel() {
+			public TableColumn getColumn(int columnIndex) {
+				TableColumn column = super.getColumn(columnIndex);
+				if (columnIndex == 0) {
+					column.setMaxWidth(100);
+				}
+				return column;
+			}
+		});
+
+		TableCellEditor defaultEditor = columnMappingTable.getDefaultEditor(String.class);
+		if (defaultEditor instanceof DefaultCellEditor) {
+			DefaultCellEditor defaultCellEditor = (DefaultCellEditor) defaultEditor;
+			defaultCellEditor.setClickCountToStart(1);
+			Component editorComponent = defaultCellEditor.getComponent();
+			if (editorComponent instanceof JTextComponent) {
+				final JTextComponent textField = (JTextComponent) editorComponent;
+				textField.getDocument().addDocumentListener(new DocumentListener() {
+					public void changedUpdate(DocumentEvent e) {
+						updateModel(textField.getText());
+					}
+
+					public void insertUpdate(DocumentEvent e) {
+						updateModel(textField.getText());
+					}
+
+					public void removeUpdate(DocumentEvent e) {
+						updateModel(textField.getText());
+					}
+
+					private void updateModel(String text) {
+						int row = columnMappingTable.getEditingRow();
+						int column = columnMappingTable.getEditingColumn();
+						columnMappingTableModel.setValueAt(text, row, column);
+
+						ArrayNode columnNames = newConfiguration.arrayNode();
+						Map<String, String> columnToPortMapping = columnMappingTableModel.getColumnToPortMapping();
+						for (Entry<String,String> entry : columnToPortMapping.entrySet()) {
+							columnNames.add(newConfiguration.objectNode().put("column", entry.getKey()).put("port", entry.getValue()));
+						}
+						newConfiguration.put("columnNames", columnNames);
+						validatePortNames();
+					}
+
+				});
+			}
+		}
+
+		columnMappingTable.setModel(columnMappingTableModel);
+
+		// output format
+		outputFormatLabel = new JLabel(SpreadsheetImportUIText
+				.getString("SpreadsheetImportConfigView.outputFormatSectionLabel"));
+
+		outputFormatMultiplePort = new JRadioButton(SpreadsheetImportUIText
+				.getString("SpreadsheetImportConfigView.multiplePortOption"));
+		outputFormatSinglePort = new JRadioButton(SpreadsheetImportUIText
+				.getString("SpreadsheetImportConfigView.singlePortOption"));
+		outputFormatMultiplePort.setFocusable(false);
+		outputFormatSinglePort.setFocusable(false);
+
+		outputFormatDelimiterLabel = new JLabel(SpreadsheetImportUIText
+				.getString("SpreadsheetImportConfigView.userDefinedCsvDelimiter"));
+		outputFormatDelimiter = new JTextField(newConfiguration.get("csvDelimiter").textValue(), 5);
+
+		outputFormatButtonGroup = new ButtonGroup();
+		outputFormatButtonGroup.add(outputFormatMultiplePort);
+		outputFormatButtonGroup.add(outputFormatSinglePort);
+
+		if (newConfiguration.get("outputFormat").textValue().equals("PORT_PER_COLUMN")) {
+			outputFormatMultiplePort.setSelected(true);
+			outputFormatDelimiterLabel.setEnabled(false);
+			outputFormatDelimiter.setEnabled(false);
+		} else {
+			outputFormatSinglePort.setSelected(true);
+			columnMappingLabel.setEnabled(false);
+			enableTable(columnMappingTable, false);
+		}
+
+		outputFormatMultiplePort.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				outputFormatDelimiterLabel.setEnabled(false);
+				outputFormatDelimiter.setEnabled(false);
+				columnMappingLabel.setEnabled(true);
+				enableTable(columnMappingTable, true);
+				newConfiguration.put("outputFormat", "PORT_PER_COLUMN");
+			}
+		});
+		outputFormatSinglePort.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				outputFormatDelimiterLabel.setEnabled(true);
+				outputFormatDelimiter.setEnabled(true);
+				columnMappingLabel.setEnabled(false);
+				enableTable(columnMappingTable, false);
+				newConfiguration.put("outputFormat", "SINGLE_PORT");
+			}
+
+		});
+		outputFormatDelimiter.getDocument().addDocumentListener(new DocumentListener() {
+			public void changedUpdate(DocumentEvent e) {
+				handleUpdate();
+			}
+
+			public void insertUpdate(DocumentEvent e) {
+				handleUpdate();
+			}
+
+			public void removeUpdate(DocumentEvent e) {
+				handleUpdate();
+			}
+
+			private void handleUpdate() {
+				String text = null;
+				try {
+					text = StringEscapeUtils.unescapeJava(outputFormatDelimiter.getText());
+				} catch (RuntimeException re) {}
+				if (text == null || text.length() == 0) {
+					newConfiguration.put("csvDelimiter", ",");
+				} else {
+					newConfiguration.put("csvDelimiter", text.substring(0, 1));
+				}
+			}
+
+		});
+
+		// buttons
+		nextButton = new JButton(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.nextButton"));
+		nextButton.setFocusable(false);
+		nextButton.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				backButton.setVisible(true);
+				nextButton.setVisible(false);
+				cardLayout.last(contentPanel);
+			}
+		});
+
+		backButton = new JButton(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.backButton"));
+		backButton.setFocusable(false);
+		backButton.setVisible(false);
+		backButton.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				nextButton.setVisible(true);
+				backButton.setVisible(false);
+				cardLayout.first(contentPanel);
+			}
+		});
+
+		buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
+		addDivider(buttonPanel, SwingConstants.TOP, true);
+
+		removeAll();
+		layoutPanel();
+	}
+
+	@Override
+	public void noteConfiguration() {
+		setJson(newConfiguration);
+		configureInputPorts(serviceRegistry);
+		configureOutputPorts(serviceRegistry);
+	}
+
+	@Override
+	public boolean checkValues() {
+		return errorMessages.isEmpty();
+	}
+
+	private void layoutPanel() {
+		setPreferredSize(new Dimension(450, 400));
+		setLayout(new BorderLayout());
+
+		page1 = new JPanel(new GridBagLayout());
+		page2 = new JPanel(new GridBagLayout());
+
+		contentPanel = new JPanel(cardLayout);
+		contentPanel.add(page1, "page1");
+		contentPanel.add(page2, "page2");
+		add(contentPanel, BorderLayout.CENTER);
+
+		// title
+		titlePanel.setBorder(new CompoundBorder(titlePanel.getBorder(), new EmptyBorder(10, 10, 0, 10)));
+		add(titlePanel, BorderLayout.NORTH);
+		titlePanel.add(titleLabel, BorderLayout.NORTH);
+		titlePanel.add(titleIcon, BorderLayout.WEST);
+		titlePanel.add(titleMessage, BorderLayout.CENTER);
+
+		GridBagConstraints c = new GridBagConstraints();
+		c.anchor = GridBagConstraints.WEST;
+		c.fill = GridBagConstraints.HORIZONTAL;
+		c.weightx = 1;
+		c.gridx = 0;
+		c.gridwidth = GridBagConstraints.REMAINDER;
+
+		// column range
+		c.insets = new Insets(10, 10, 0, 10);
+		page1.add(columnLabel, c);
+
+		c.insets = new Insets(10, 25, 0, 0);
+		c.gridwidth = 1;
+		c.weightx = 0;
+		page1.add(new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.from")), c);
+		c.insets = new Insets(10, 0, 0, 0);
+		c.gridx = 1;
+		page1.add(columnFromValue, c);
+		c.gridx = 2;
+		page1.add(new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.to")), c);
+		c.gridx = 3;
+		page1.add(columnToValue, c);
+
+		c.gridx = 0;
+		c.weightx = 1;
+		c.insets = new Insets(10, 10, 0, 10);
+		c.gridwidth = GridBagConstraints.REMAINDER;
+
+		// row range
+		page1.add(rowLabel, c);
+
+		c.insets = new Insets(10, 25, 0, 0);
+		c.gridwidth = 1;
+		c.gridx = 0;
+		c.weightx = 0;
+		page1.add(new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.from")), c);
+		c.insets = new Insets(10, 0, 0, 0);
+		c.gridx = 1;
+		page1.add(rowFromValue, c);
+		c.gridx = 2;
+		page1.add(new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.to")), c);
+		c.gridx = 3;
+		page1.add(rowToValue, c);
+		c.gridx = 4;
+		page1.add(rowSelectAllOption, c);
+		c.gridx = 5;
+		c.gridwidth = GridBagConstraints.REMAINDER;
+		c.insets = new Insets(10, 0, 0, 10);
+		page1.add(rowExcludeFirstOption, c);
+		c.insets = new Insets(10, 25, 0, 0);
+		c.gridx = 0;
+		page1.add(rowIgnoreBlankRows, c);
+
+		c.gridx = 0;
+
+		// empty cells
+		c.insets = new Insets(10, 10, 10, 10);
+		page1.add(emptyCellLabel, c);
+
+		c.insets = new Insets(0, 25, 0, 10);
+		page1.add(emptyCellEmptyStringOption, c);
+		JPanel userDefinedPanel = new JPanel(new BorderLayout());
+		userDefinedPanel.add(emptyCellUserDefinedOption, BorderLayout.WEST);
+		userDefinedPanel.add(emptyCellUserDefinedValue, BorderLayout.CENTER);
+		page1.add(userDefinedPanel, c);
+		c.weighty = 1;
+		c.anchor = GridBagConstraints.NORTHWEST;
+		page1.add(emptyCellErrorValueOption, c);
+
+		// output format
+		c.insets = new Insets(10, 10, 10, 10);
+		c.weighty = 0;
+		c.weightx = 1;
+		page2.add(outputFormatLabel, c);
+
+		c.insets = new Insets(0, 25, 0, 10);
+		page2.add(outputFormatMultiplePort, c);
+		page2.add(outputFormatSinglePort, c);
+
+		c.insets = new Insets(0, 50, 0, 10);
+		JPanel outputFormatDelimiterPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
+		outputFormatDelimiterPanel.add(outputFormatDelimiterLabel);
+		outputFormatDelimiterPanel.add(outputFormatDelimiter);
+		page2.add(outputFormatDelimiterPanel, c);
+
+		// column mapping
+		c.insets = new Insets(10, 10, 0, 10);
+		page2.add(columnMappingLabel, c);
+
+		c.insets = new Insets(10, 10, 10, 10);
+		c.fill = GridBagConstraints.BOTH;
+		c.weighty = 1;
+		page2.add(new JScrollPane(columnMappingTable), c);
+
+		buttonPanel.add(backButton);
+		buttonPanel.add(nextButton);
+		add(buttonPanel, BorderLayout.SOUTH);
+	}
+
+	/**
+	 * Displays the message with no icon.
+	 *
+	 * @param message
+	 *            the message to display
+	 */
+	public void setMessage(String message) {
+		titleIcon.setIcon(null);
+		titleMessage.setText(message);
+	}
+
+	/**
+	 * Adds the message to the top of the warning message stack. If the message is already in the
+	 * stack it is moved to the top. If there are no error messages the message is displayed.
+	 *
+	 * @param message
+	 *            the warning message to add
+	 */
+	public void addWarningMessage(String message) {
+		if (warningMessages.contains(message)) {
+			warningMessages.remove(message);
+		}
+		warningMessages.push(message);
+		if (errorMessages.isEmpty()) {
+			setWarningMessage(message);
+		}
+	}
+
+	/**
+	 * Removes the message from the warning message stack. If there are no error messages the next
+	 * warning message is displayed. If there are no warning messages the default message is
+	 * displayed.
+	 *
+	 * @param message
+	 *            the warning message to remove
+	 */
+	public void removeWarningMessage(String message) {
+		warningMessages.remove(message);
+		if (errorMessages.isEmpty()) {
+			if (warningMessages.isEmpty()) {
+				setMessage(DEFAULT_MESSAGE);
+			} else {
+				setWarningMessage(warningMessages.peek());
+			}
+		}
+	}
+
+	/**
+	 * Displays the message and a warning icon.
+	 *
+	 * @param message
+	 *            the warning message to display
+	 */
+	public void setWarningMessage(String message) {
+		titleIcon.setIcon(Icons.warningIcon);
+		titleMessage.setText(message);
+	}
+
+	/**
+	 * Adds the message to the top of the error message stack. If the message is already in the
+	 * stack it is moved to the top. The message is then displayed.
+	 *
+	 * @param message
+	 *            the error message to add
+	 */
+	public void addErrorMessage(String message) {
+		if (errorMessages.contains(message)) {
+			errorMessages.remove(message);
+		}
+		errorMessages.push(message);
+		setErrorMessage(message);
+	}
+
+	/**
+	 * Removes the message from the error message stack and displays the next error message. If
+	 * there are no error messages the next warning message is displayed. If there are no warning
+	 * messages the default message is displayed.
+	 *
+	 * @param message
+	 *            the error message to remove
+	 */
+	public void removeErrorMessage(String message) {
+		errorMessages.remove(message);
+		if (errorMessages.isEmpty()) {
+			if (warningMessages.isEmpty()) {
+				setMessage(DEFAULT_MESSAGE);
+			} else {
+				setWarningMessage(warningMessages.peek());
+			}
+		} else {
+			setErrorMessage(errorMessages.peek());
+		}
+	}
+
+	/**
+	 * Displays the message and an error icon.
+	 *
+	 * @param message
+	 *            the error message to display
+	 */
+	public void setErrorMessage(String message) {
+		titleIcon.setIcon(Icons.severeIcon);
+		titleMessage.setText(message);
+	}
+
+	protected boolean validatePortNames() {
+		boolean isValid = true;
+		Range columnRange = SpreadsheetUtils.getRange(newConfiguration.get("columnRange"));
+		Map<String, String> mapping = new HashMap<>();
+		if (newConfiguration.has("columnNames")) {
+			for (JsonNode columnName : newConfiguration.get("columnNames")) {
+				mapping.put(columnName.get("column").textValue(), columnName.get("port").textValue());
+			}
+		}
+		Set<String> usedNames = new HashSet<String>();
+		for (Entry<String, String> entry : mapping.entrySet()) {
+			if (columnRange.contains(SpreadsheetUtils.getColumnIndex(entry.getKey()))) {
+				String portName = entry.getValue();
+				if (!usedNames.add(portName)) {
+					isValid = false;
+					break;
+				}
+				if (portName.matches("[A-Z]+")) {
+					if (!mapping.containsKey(portName)) {
+						int columnIndex = SpreadsheetUtils.getColumnIndex(portName);
+						if (columnRange.contains(columnIndex)) {
+							isValid = false;
+							break;
+						}
+					}
+				}
+			}
+		}
+		if (isValid) {
+			removeErrorMessage(DUPLICATE_PORT_NAME_ERROR_MESSAGE);
+		} else {
+			addErrorMessage(DUPLICATE_PORT_NAME_ERROR_MESSAGE);
+		}
+		return isValid;
+	}
+
+	protected boolean checkRowRange(String from, String to) {
+		boolean result = false;
+		try {
+			int fromRow = Integer.parseInt(from);
+			int toRow = Integer.parseInt(to);
+			if (toRow < fromRow) {
+				addErrorMessage(INCONSISTENT_ROW_MESSAGE);
+			} else {
+				removeErrorMessage(INCONSISTENT_ROW_MESSAGE);
+				result = true;
+			}
+		} catch (NumberFormatException e) {
+			logger.warn("Problem checking row range", e);
+		}
+		return result;
+	}
+
+	protected boolean checkColumnRange(int fromColumn, int toColumn) {
+		boolean result = false;
+		if (toColumn < fromColumn) {
+			addErrorMessage(INCONSISTENT_COLUMN_MESSAGE);
+		} else {
+			removeErrorMessage(INCONSISTENT_COLUMN_MESSAGE);
+			result = true;
+		}
+		return result;
+	}
+
+	/**
+	 * Adds a light gray or etched border to the top or bottom of a JComponent.
+	 *
+	 * @param component
+	 */
+	protected void addDivider(JComponent component, final int position, final boolean etched) {
+		component.setBorder(new Border() {
+			private final Color borderColor = new Color(.6f, .6f, .6f);
+
+			public Insets getBorderInsets(Component c) {
+				if (position == SwingConstants.TOP) {
+					return new Insets(5, 0, 0, 0);
+				} else {
+					return new Insets(0, 0, 5, 0);
+				}
+			}
+
+			public boolean isBorderOpaque() {
+				return false;
+			}
+
+			public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
+				if (position == SwingConstants.TOP) {
+					if (etched) {
+						g.setColor(borderColor);
+						g.drawLine(x, y, x + width, y);
+						g.setColor(Color.WHITE);
+						g.drawLine(x, y + 1, x + width, y + 1);
+					} else {
+						g.setColor(Color.LIGHT_GRAY);
+						g.drawLine(x, y, x + width, y);
+					}
+				} else {
+					if (etched) {
+						g.setColor(borderColor);
+						g.drawLine(x, y + height - 2, x + width, y + height - 2);
+						g.setColor(Color.WHITE);
+						g.drawLine(x, y + height - 1, x + width, y + height - 1);
+					} else {
+						g.setColor(Color.LIGHT_GRAY);
+						g.drawLine(x, y + height - 1, x + width, y + height - 1);
+					}
+				}
+			}
+
+		});
+	}
+
+	private void enableTable(JTable table, boolean enabled) {
+		table.setEnabled(enabled);
+		Component editor = table.getEditorComponent();
+		if (editor != null) {
+			editor.setEnabled(enabled);
+		}
+		if (enabled) {
+			table.setForeground(Color.BLACK);
+			table.getTableHeader().setForeground(Color.BLACK);
+		} else {
+			table.setForeground(Color.LIGHT_GRAY);
+			table.getTableHeader().setForeground(Color.LIGHT_GRAY);
+		}
+	}
+
+	static class UpperCaseDocument extends PlainDocument {
+        @Override
+        public void replace(int offset, int length, String text, AttributeSet attrs) throws BadLocationException {
+        	if (text.matches("[A-Za-z]+")) {
+        		text = text.toUpperCase();
+        		super.replace(offset, length, text, attrs);
+        	}
+        }
+     }
+
+	static class NumericDocument extends PlainDocument {
+        @Override
+        public void replace(int offset, int length, String text, AttributeSet attrs) throws BadLocationException {
+        	if (text.length() == 0 || text.matches("[0-9]+")) {
+        		text = text.toUpperCase();
+        		super.replace(offset, length, text, attrs);
+        	}
+        }
+     }
+
+	/**
+	 * Main method for testing the panel.
+	 *
+	 * @param args
+	 * @throws ActivityConfigurationException
+	 */
+//	public static void main(String[] args) throws ActivityConfigurationException {
+//		final JFrame frame = new JFrame();
+//		SpreadsheetImportActivity activity = new SpreadsheetImportActivity();
+//		activity.configure(new SpreadsheetImportConfiguration());
+//		final SpreadsheetImportConfigView config = new SpreadsheetImportConfigView(activity);
+//		config.setOkAction(new AbstractAction("Finish") {
+//			public void actionPerformed(ActionEvent arg0) {
+//				Range columnRange = config.getConfiguration().getColumnRange();
+//				String fromColumn = SpreadsheetUtils.getColumnLabel(columnRange.getStart());
+//				String toColumn = SpreadsheetUtils.getColumnLabel(columnRange.getEnd());
+//				System.out.printf("%s (%s) - %s (%s)", fromColumn, columnRange.getStart(),
+//						toColumn, columnRange.getEnd());
+//				frame.setVisible(false);
+//				frame.dispose();
+//			}
+//		});
+//		config.setCancelAction(new AbstractAction("Cancel") {
+//			public void actionPerformed(ActionEvent arg0) {
+//				frame.setVisible(false);
+//				frame.dispose();
+//			}
+//		});
+//		frame.add(config);
+//		frame.pack();
+//		frame.setVisible(true);
+//	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualView.java
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualView.java b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualView.java
new file mode 100644
index 0000000..2078faa
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualView.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (C) 2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.spreadsheet.views;
+
+import java.awt.Frame;
+
+import javax.swing.Action;
+
+import net.sf.taverna.t2.activities.spreadsheet.actions.SpreadsheetImportActivityConfigurationAction;
+import net.sf.taverna.t2.activities.spreadsheet.il8n.SpreadsheetImportUIText;
+import net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportActivityIcon;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.activity.Activity;
+import uk.org.taverna.scufl2.api.port.InputActivityPort;
+import uk.org.taverna.scufl2.api.port.OutputActivityPort;
+
+/**
+ * A simple non editable HTML table view over a {@link SpreadsheetImportActivity}. Clicking on the
+ * configure button shows the editable {@link SpreadsheetImportConfigView}
+ *
+ * @author David Withers
+ */
+public class SpreadsheetImportContextualView extends HTMLBasedActivityContextualView {
+
+	private static final long serialVersionUID = 1L;
+	private final EditManager editManager;
+	private final FileManager fileManager;
+	private final ActivityIconManager activityIconManager;
+	private final ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private final ServiceRegistry serviceRegistry;
+
+	public SpreadsheetImportContextualView(Activity activity, EditManager editManager,
+			FileManager fileManager, ActivityIconManager activityIconManager,
+			ColourManager colourManager, ServiceDescriptionRegistry serviceDescriptionRegistry, ServiceRegistry serviceRegistry) {
+		super(activity, colourManager);
+		this.editManager = editManager;
+		this.fileManager = fileManager;
+		this.activityIconManager = activityIconManager;
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+		this.serviceRegistry = serviceRegistry;
+	}
+
+	@Override
+	protected String getRawTableRowsHtml() {
+		StringBuilder html = new StringBuilder();
+		html.append("<tr><th>");
+		html.append(SpreadsheetImportUIText
+				.getString("SpreadsheetImportContextualView.inputPortName"));
+		html.append("</th><th>");
+		html.append(SpreadsheetImportUIText.getString("SpreadsheetImportContextualView.depth"));
+		html.append("</th></tr>");
+		for (InputActivityPort port : getActivity().getInputPorts()) {
+			html.append("<tr><td>");
+			html.append(port.getName());
+			html.append("</td><td>");
+			html.append(port.getDepth());
+			html.append("</td></tr>");
+		}
+		html.append("<tr><th>");
+		html.append(SpreadsheetImportUIText
+				.getString("SpreadsheetImportContextualView.outputPortName"));
+		html.append("</th><th>");
+		html.append(SpreadsheetImportUIText.getString("SpreadsheetImportContextualView.depth"));
+		html.append("</th></tr>");
+		for (OutputActivityPort port : getActivity().getOutputPorts()) {
+			html.append("<tr><td>");
+			html.append(port.getName());
+			html.append("</td><td>");
+			html.append(port.getDepth());
+			html.append("</td></tr>");
+		}
+		return html.toString();
+	}
+
+	@Override
+	public String getViewTitle() {
+		return SpreadsheetImportUIText.getString("SpreadsheetImportContextualView.activityName");
+	}
+
+	@Override
+	public Action getConfigureAction(Frame owner) {
+		return new SpreadsheetImportActivityConfigurationAction(
+				getActivity(), owner, editManager, fileManager,
+				activityIconManager, serviceDescriptionRegistry, serviceRegistry);
+	}
+
+	@Override
+	public String getBackgroundColour() {
+		return SpreadsheetImportActivityIcon.SPREADSHEET_COLOUR_HTML;
+	}
+
+	@Override
+	public int getPreferredPosition() {
+		return 100;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualViewFactory.java
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualViewFactory.java b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualViewFactory.java
new file mode 100644
index 0000000..7e49168
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualViewFactory.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (C) 2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.spreadsheet.views;
+
+import java.util.Arrays;
+import java.util.List;
+
+import net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+/**
+ * Factory for creating contextual a view of the SpreadsheetImport Activity
+ *
+ * @author David Withers
+ */
+public class SpreadsheetImportContextualViewFactory implements ContextualViewFactory<Activity> {
+
+	private EditManager editManager;
+	private FileManager fileManager;
+	private ActivityIconManager activityIconManager;
+	private ColourManager colourManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ServiceRegistry serviceRegistry;
+
+	public boolean canHandle(Object object) {
+		return object instanceof Activity
+				&& ((Activity) object).getType().equals(
+						SpreadsheetImportTemplateService.ACTIVITY_TYPE);
+	}
+
+	public List<ContextualView> getViews(Activity activity) {
+		return Arrays.asList(new ContextualView[] { new SpreadsheetImportContextualView(activity,
+				editManager, fileManager, activityIconManager, colourManager,
+				serviceDescriptionRegistry, serviceRegistry) });
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setColourManager(ColourManager colourManager) {
+		this.colourManager = colourManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
new file mode 100644
index 0000000..b1628b6
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportTemplateService

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
new file mode 100644
index 0000000..6720b04
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
@@ -0,0 +1,3 @@
+net.sf.taverna.t2.activities.spreadsheet.menu.SpreadsheetImportAddTemplateAction
+net.sf.taverna.t2.activities.spreadsheet.menu.SpreadsheetImportConfigureMenuAction
+net.sf.taverna.t2.activities.spreadsheet.menu.SpreadsheetImportAddTemplateMenuAction

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
new file mode 100644
index 0000000..2dd012f
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportActivityIcon
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
new file mode 100644
index 0000000..4b9dd11
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.spreadsheet.views.SpreadsheetImportContextualViewFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context-osgi.xml b/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context-osgi.xml
new file mode 100644
index 0000000..72ffb77
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context-osgi.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:beans="http://www.springframework.org/schema/beans"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd
+                      http://www.springframework.org/schema/osgi
+                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+	<service ref="SpreadsheetImportActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
+
+	<service ref="SpreadsheetImportTemplateService" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
+
+	<service ref="SpreadsheetImportAddTemplateAction" auto-export="interfaces" />
+	<service ref="SpreadsheetImportConfigureMenuAction" auto-export="interfaces" />
+	<service ref="SpreadsheetImportAddTemplateMenuAction" auto-export="interfaces" />
+
+	<service ref="SpreadsheetImportContextualViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
+
+	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
+	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
+	<reference id="menuManager" interface="net.sf.taverna.t2.ui.menu.MenuManager" />
+	<reference id="selectionManager" interface="net.sf.taverna.t2.workbench.selection.SelectionManager" />
+	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
+	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
+	<reference id="serviceDescriptionRegistry" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry" />
+	<reference id="serviceRegistry" interface="uk.org.taverna.commons.services.ServiceRegistry" />
+
+</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context.xml b/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context.xml
new file mode 100644
index 0000000..7fdba26
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/resources/META-INF/spring/spreadsheet-import-activity-ui-context.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+	<bean id="SpreadsheetImportActivityIcon" class="net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportActivityIcon">
+			<property name="colourManager" ref="colourManager" />
+	</bean>
+
+	<bean id="SpreadsheetImportTemplateService" class="net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportTemplateService" />
+
+	<bean id="SpreadsheetImportAddTemplateAction" class="net.sf.taverna.t2.activities.spreadsheet.menu.SpreadsheetImportAddTemplateAction">
+			<property name="editManager" ref="editManager" />
+			<property name="menuManager" ref="menuManager" />
+			<property name="selectionManager" ref="selectionManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+			<property name="serviceRegistry" ref="serviceRegistry" />
+	</bean>
+	<bean id="SpreadsheetImportAddTemplateMenuAction" class="net.sf.taverna.t2.activities.spreadsheet.menu.SpreadsheetImportAddTemplateMenuAction">
+			<property name="editManager" ref="editManager" />
+			<property name="menuManager" ref="menuManager" />
+			<property name="selectionManager" ref="selectionManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+			<property name="serviceRegistry" ref="serviceRegistry" />
+	</bean>
+	<bean id="SpreadsheetImportConfigureMenuAction" class="net.sf.taverna.t2.activities.spreadsheet.menu.SpreadsheetImportConfigureMenuAction">
+			<property name="editManager" ref="editManager" />
+			<property name="fileManager" ref="fileManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+			<property name="serviceRegistry" ref="serviceRegistry" />
+	</bean>
+
+	<bean id="SpreadsheetImportContextualViewFactory" class="net.sf.taverna.t2.activities.spreadsheet.views.SpreadsheetImportContextualViewFactory">
+			<property name="editManager" ref="editManager" />
+			<property name="fileManager" ref="fileManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+			<property name="colourManager" ref="colourManager" />
+			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+			<property name="serviceRegistry" ref="serviceRegistry" />
+	</bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/resources/net/sf/taverna/t2/activities/spreadsheet/iln8/ui-text.properties
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/resources/net/sf/taverna/t2/activities/spreadsheet/iln8/ui-text.properties b/taverna-spreadsheet-import-activity-ui/src/main/resources/net/sf/taverna/t2/activities/spreadsheet/iln8/ui-text.properties
new file mode 100644
index 0000000..2a4480f
--- /dev/null
+++ b/taverna-spreadsheet-import-activity-ui/src/main/resources/net/sf/taverna/t2/activities/spreadsheet/iln8/ui-text.properties
@@ -0,0 +1,43 @@
+SpreadsheetImportActivityConfigurationAction.canceButton=Cancel
+SpreadsheetImportActivityConfigurationAction.dialogTitle=Spreadsheet Import Configuration
+SpreadsheetImportActivityConfigurationAction.okButton=Finish
+SpreadsheetImportAddTemplateAction.addMenu=Spreadsheet import
+SpreadsheetImportConfigureMenuAction.configureMenu=Configure Spreadsheet Import
+SpreadsheetImportConfigTableModel.column=Column
+SpreadsheetImportConfigTableModel.portName=Port Name
+SpreadsheetImportConfigView.nextButton=Next
+SpreadsheetImportConfigView.backButton=Back
+SpreadsheetImportConfigView.columnMappingSectionLabel=Column to Port Name Mapping
+SpreadsheetImportConfigView.outputFormatSectionLabel=Output Format
+SpreadsheetImportConfigView.columnSectionLabel=Columns
+SpreadsheetImportConfigView.DEFAULT_MESSAGE=Select the data range
+SpreadsheetImportConfigView.DUPLICATE_PORT_NAME_ERROR_MESSAGE=Duplicate activity port name
+SpreadsheetImportConfigView.EMPTY_FROM_COLUMN_ERROR_MESSAGE='From' column must be specified
+SpreadsheetImportConfigView.EMPTY_FROM_ROW_ERROR_MESSAGE='From' row must be specified
+SpreadsheetImportConfigView.EMPTY_TO_COLUMN_ERROR_MESSAGE='To' column must be specified
+SpreadsheetImportConfigView.emptyCellSectionLabel=Empty cells
+SpreadsheetImportConfigView.emptyStringOption=Use an empty string
+SpreadsheetImportConfigView.excludeHeaderRowOption=Exclude header row
+SpreadsheetImportConfigView.from=From
+SpreadsheetImportConfigView.FROM_COLUMN_ERROR_MESSAGE='From' column can only contain characters A-Z
+SpreadsheetImportConfigView.FROM_ROW_ERROR_MESSAGE='From' row must be a number greater than 0
+SpreadsheetImportConfigView.generateErrorOption=Generate an error value
+SpreadsheetImportConfigView.ignoreBlankRowsOption=Ignore blank rows
+SpreadsheetImportConfigView.multiplePortOption=Multiple outputs (one per spreadsheet column)
+SpreadsheetImportConfigView.singlePortOption=A single CSV formatted output
+SpreadsheetImportConfigView.userDefinedCsvDelimiter=Use this value delimiter character:
+SpreadsheetImportConfigView.INCONSISTENT_COLUMN_MESSAGE='To' column must not be less than 'from' column
+SpreadsheetImportConfigView.INCONSISTENT_ROW_MESSAGE='To'row must not be less than 'from' row
+SpreadsheetImportConfigView.panelTitle=Configure spreadsheet file import
+SpreadsheetImportConfigView.rowSectionLabel=Rows
+SpreadsheetImportConfigView.selectAllRowsOption=All rows
+SpreadsheetImportConfigView.to=to
+SpreadsheetImportConfigView.TO_COLUMN_ERROR_MESSAGE='To' column can only contain characters A-Z
+SpreadsheetImportConfigView.TO_ROW_ERROR_MESSAGE='To' row must be a number greater than 0
+SpreadsheetImportConfigView.userDefinedOption=Use this value:
+SpreadsheetImportContextualView.activityName=Spreadsheet Import Activity
+SpreadsheetImportContextualView.depth=Depth
+SpreadsheetImportContextualView.inputPortName=Input Port Name
+SpreadsheetImportContextualView.outputPortName=Output Port Name
+SpreadsheetImportTemplateService.serviceDescription=A service that imports data from spreadsheets
+SpreadsheetImportTemplateService.serviceName=SpreadsheetImport

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/taverna-spreadsheet-import-activity-ui/src/main/resources/spreadsheet-import.png
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity-ui/src/main/resources/spreadsheet-import.png b/taverna-spreadsheet-import-activity-ui/src/main/resources/spreadsheet-import.png
new file mode 100644
index 0000000..886fac3
Binary files /dev/null and b/taverna-spreadsheet-import-activity-ui/src/main/resources/spreadsheet-import.png differ


[35/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-spreadsheet-import-activity-ui/

Posted by st...@apache.org.
taverna-spreadsheet-import-activity-ui/


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/fa8b5b3d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/fa8b5b3d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/fa8b5b3d

Branch: refs/heads/master
Commit: fa8b5b3d5ab9a53aa980ce77a83d2c8879a79d06
Parents: 4091a90
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:27:31 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:27:31 2015 +0000

----------------------------------------------------------------------
 .gitignore                                      |   24 -
 .travis.yml                                     |    1 -
 README.md                                       |    5 -
 pom.xml                                         |  107 --
 ...dsheetImportActivityConfigurationAction.java |   72 --
 .../il8n/SpreadsheetImportUIText.java           |   46 -
 .../SpreadsheetImportAddTemplateAction.java     |  110 --
 .../SpreadsheetImportAddTemplateMenuAction.java |  124 --
 .../SpreadsheetImportConfigureMenuAction.java   |   84 --
 .../SpreadsheetImportActivityIcon.java          |   71 --
 .../SpreadsheetImportTemplateService.java       |   95 --
 .../SpreadsheetImportConfigTableModel.java      |  190 ---
 .../views/SpreadsheetImportConfigView.java      | 1082 ------------------
 .../views/SpreadsheetImportContextualView.java  |  121 --
 .../SpreadsheetImportContextualViewFactory.java |   87 --
 ...rvicedescriptions.ServiceDescriptionProvider |    1 -
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |    3 -
 ...a.t2.workbench.activityicons.ActivityIconSPI |    1 -
 ...ntextualviews.activity.ContextualViewFactory |    1 -
 ...eadsheet-import-activity-ui-context-osgi.xml |   28 -
 .../spreadsheet-import-activity-ui-context.xml  |   45 -
 .../spreadsheet/iln8/ui-text.properties         |   43 -
 src/main/resources/spreadsheet-import.png       |  Bin 4610 -> 0 bytes
 taverna-spreadsheet-import-activity-ui/pom.xml  |  107 ++
 ...dsheetImportActivityConfigurationAction.java |   72 ++
 .../il8n/SpreadsheetImportUIText.java           |   46 +
 .../SpreadsheetImportAddTemplateAction.java     |  110 ++
 .../SpreadsheetImportAddTemplateMenuAction.java |  124 ++
 .../SpreadsheetImportConfigureMenuAction.java   |   84 ++
 .../SpreadsheetImportActivityIcon.java          |   71 ++
 .../SpreadsheetImportTemplateService.java       |   95 ++
 .../SpreadsheetImportConfigTableModel.java      |  190 +++
 .../views/SpreadsheetImportConfigView.java      | 1082 ++++++++++++++++++
 .../views/SpreadsheetImportContextualView.java  |  121 ++
 .../SpreadsheetImportContextualViewFactory.java |   87 ++
 ...rvicedescriptions.ServiceDescriptionProvider |    1 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |    3 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |    1 +
 ...ntextualviews.activity.ContextualViewFactory |    1 +
 ...eadsheet-import-activity-ui-context-osgi.xml |   28 +
 .../spreadsheet-import-activity-ui-context.xml  |   45 +
 .../spreadsheet/iln8/ui-text.properties         |   43 +
 .../src/main/resources/spreadsheet-import.png   |  Bin 0 -> 4610 bytes
 43 files changed, 2311 insertions(+), 2341 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index ebe0e5b..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# ignore project files #
-.classpath
-.project
-.settings/
-catalog-v001.xml
-
-# ignore target files #
-target/
-bin/
-build/
-dist/
-apidoc/
-*.swp
-
-# ignore svn files if there
-.svn
-
-# ignore log files #
-*.log
-/logs/*
-*/logs/*
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index dff5f3a..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1 +0,0 @@
-language: java

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
deleted file mode 100644
index f856dbb..0000000
--- a/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Taverna Workflow system Spreadsheet Import Activity: data model and execution implementation
-
-Extends https://github.com/taverna/taverna-spreadsheet-import-activity
-
-This code was previously hosted at http://taverna.googlecode.com/svn/taverna/ui/net.sf.taverna.t2.ui-activities/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 1672ebf..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>net.sf.taverna</groupId>
-		<artifactId>taverna-parent</artifactId>
-		<version>3.0.1-SNAPSHOT</version>
-	</parent>
-	<groupId>net.sf.taverna.t2.ui-activities</groupId>
-	<artifactId>spreadsheet-import-activity-ui</artifactId>
-        <version>2.0-SNAPSHOT</version>
-	<packaging>bundle</packaging>
-	<name>Taverna 2 Spreadsheet Import Activity UI</name>
-	<dependencies>
-		<dependency>
-			<groupId>net.sf.taverna.t2.activities</groupId>
-			<artifactId>spreadsheet-import-activity</artifactId>
-			<version>${t2.activities.version}</version>
-		</dependency>
-		<!-- taverna lang -->
-		<dependency>
-			<groupId>net.sf.taverna.t2.lang</groupId>
-			<artifactId>ui</artifactId>
-			<version>${t2.lang.version}</version>
-		</dependency>
-		<!-- taverna ui-api -->
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-icons-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-palette-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>contextual-views-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>file-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>menu-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-tools</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<!-- taverna ui-components -->
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-components</groupId>
-			<artifactId>workflow-view</artifactId>
-			<version>${t2.ui.components.version}
-			</version>
-		</dependency>
-		<dependency>
-			<groupId>uk.org.taverna.scufl2</groupId>
-			<artifactId>scufl2-api</artifactId>
-			<version>${scufl2.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.core</groupId>
-			<artifactId>jackson-databind</artifactId>
-			<version>${jackson-databind.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>org.apache.commons</groupId>
-			<artifactId>com.springsource.org.apache.commons.lang</artifactId>
-			<version>${commons.lang.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.log4j</groupId>
-			<artifactId>com.springsource.org.apache.log4j</artifactId>
-			<version>${log4j.version}</version>
-		</dependency>
-	</dependencies>
-	<repositories>
-		<repository>
-			<releases />
-			<snapshots>
-				<enabled>false</enabled>
-			</snapshots>
-			<id>mygrid-repository</id>
-			<name>myGrid Repository</name>
-			<url>http://www.mygrid.org.uk/maven/repository
-			</url>
-		</repository>
-		<repository>
-			<releases>
-				<enabled>false</enabled>
-			</releases>
-			<snapshots />
-			<id>mygrid-snapshot-repository</id>
-			<name>myGrid Snapshot Repository</name>
-			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
-		</repository>
-	</repositories>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/java/net/sf/taverna/t2/activities/spreadsheet/actions/SpreadsheetImportActivityConfigurationAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/actions/SpreadsheetImportActivityConfigurationAction.java b/src/main/java/net/sf/taverna/t2/activities/spreadsheet/actions/SpreadsheetImportActivityConfigurationAction.java
deleted file mode 100644
index 0a70680..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/actions/SpreadsheetImportActivityConfigurationAction.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.spreadsheet.actions;
-
-import java.awt.Frame;
-import java.awt.event.ActionEvent;
-
-import net.sf.taverna.t2.activities.spreadsheet.views.SpreadsheetImportConfigView;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-/**
- * The configuration action for a SpreadsheetImport activity.
- *
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class SpreadsheetImportActivityConfigurationAction extends ActivityConfigurationAction {
-
-	private static final String CONFIGURE = "Configure";
-
-	private final EditManager editManager;
-
-	private final FileManager fileManager;
-
-	private final ServiceRegistry serviceRegistry;
-
-	public SpreadsheetImportActivityConfigurationAction(Activity activity,
-			Frame owner, EditManager editManager, FileManager fileManager,
-			ActivityIconManager activityIconManager,
-			ServiceDescriptionRegistry serviceDescriptionRegistry, ServiceRegistry serviceRegistry) {
-		super(activity, activityIconManager, serviceDescriptionRegistry);
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		this.serviceRegistry = serviceRegistry;
-		putValue(NAME, CONFIGURE);
-	}
-
-	public void actionPerformed(ActionEvent e) {
-		final SpreadsheetImportConfigView spreadsheetConfigView = new SpreadsheetImportConfigView(
-				getActivity(), serviceRegistry);
-		final ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(getActivity(),
-				spreadsheetConfigView, editManager);
-
-		ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
-
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/java/net/sf/taverna/t2/activities/spreadsheet/il8n/SpreadsheetImportUIText.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/il8n/SpreadsheetImportUIText.java b/src/main/java/net/sf/taverna/t2/activities/spreadsheet/il8n/SpreadsheetImportUIText.java
deleted file mode 100644
index 82f8436..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/il8n/SpreadsheetImportUIText.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.spreadsheet.il8n;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Access to a resource bundle containing UI text.
- *
- * @author David Withers
- */
-public class SpreadsheetImportUIText {
-	private static final String BUNDLE_NAME = "net.sf.taverna.t2.activities.spreadsheet.iln8.ui-text";
-
-	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
-	private SpreadsheetImportUIText() {
-	}
-
-	public static String getString(String key) {
-		try {
-			return RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			return '!' + key + '!';
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateAction.java b/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateAction.java
deleted file mode 100644
index 3073acb..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateAction.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.spreadsheet.menu;
-
-import java.awt.event.ActionEvent;
-import java.net.URI;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.spreadsheet.il8n.SpreadsheetImportUIText;
-import net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.ui.menu.AbstractContextualMenuAction;
-import net.sf.taverna.t2.ui.menu.MenuManager;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.core.Workflow;
-
-/**
- * An action to add a spreadsheet import activity + a wrapping processor to the workflow.
- *
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class SpreadsheetImportAddTemplateAction extends AbstractContextualMenuAction {
-
-	private static final URI insertSection = URI
-			.create("http://taverna.sf.net/2009/contextMenu/insert");
-
-	private EditManager editManager;
-	private MenuManager menuManager;
-	private SelectionManager selectionManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ServiceRegistry serviceRegistry;
-
-	public SpreadsheetImportAddTemplateAction() {
-		super(insertSection, 700);
-	}
-
-	@Override
-	public boolean isEnabled() {
-		return super.isEnabled() && getContextualSelection().getSelection() instanceof Workflow;
-	}
-
-	@Override
-	protected Action createAction() {
-
-		AbstractAction action = new AbstractAction(
-				SpreadsheetImportUIText.getString("SpreadsheetImportAddTemplateAction.addMenu"),
-				activityIconManager.iconForActivity(SpreadsheetImportTemplateService.ACTIVITY_TYPE)) {
-
-			public void actionPerformed(ActionEvent e) {
-				WorkflowView.importServiceDescription(serviceDescriptionRegistry
-						.getServiceDescription(SpreadsheetImportTemplateService.ACTIVITY_TYPE), false,
-						editManager, menuManager, selectionManager, serviceRegistry);
-			}
-
-		};
-
-		return action;
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setMenuManager(MenuManager menuManager) {
-		this.menuManager = menuManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateMenuAction.java
deleted file mode 100644
index 048073a..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportAddTemplateMenuAction.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.spreadsheet.menu;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-import java.net.URI;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.KeyStroke;
-
-import net.sf.taverna.t2.activities.spreadsheet.il8n.SpreadsheetImportUIText;
-import net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.ui.menu.AbstractMenuAction;
-import net.sf.taverna.t2.ui.menu.DesignOnlyAction;
-import net.sf.taverna.t2.ui.menu.MenuManager;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
-import uk.org.taverna.commons.services.ServiceRegistry;
-
-/**
- * An action to add a spreadsheet import activity + a wrapping processor to the workflow.
- *
- * @author Alan R Williams
- */
-@SuppressWarnings("serial")
-public class SpreadsheetImportAddTemplateMenuAction extends AbstractMenuAction {
-
-	private static final URI ADD_SPREADSHEET_IMPORT_URI = URI
-			.create("http://taverna.sf.net/2008/t2workbench/menu#graphMenuAddSpreadsheetImport");
-
-	private static final URI INSERT = URI
-			.create("http://taverna.sf.net/2008/t2workbench/menu#insert");
-
-	private static String ADD_SPREADSHEET_IMPORT = SpreadsheetImportUIText
-			.getString("SpreadsheetImportAddTemplateAction.addMenu");
-
-	private EditManager editManager;
-	private MenuManager menuManager;
-	private SelectionManager selectionManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ServiceRegistry serviceRegistry;
-
-	public SpreadsheetImportAddTemplateMenuAction() {
-		super(INSERT, 700, ADD_SPREADSHEET_IMPORT_URI);
-	}
-
-	@Override
-	protected Action createAction() {
-		return new AddSpreadsheetImportMenuAction();
-	}
-
-	protected class AddSpreadsheetImportMenuAction extends AbstractAction implements
-			DesignOnlyAction {
-		AddSpreadsheetImportMenuAction() {
-			super();
-			putValue(SMALL_ICON,
-					activityIconManager
-							.iconForActivity(SpreadsheetImportTemplateService.ACTIVITY_TYPE));
-			putValue(NAME, ADD_SPREADSHEET_IMPORT);
-			putValue(SHORT_DESCRIPTION, ADD_SPREADSHEET_IMPORT);
-			putValue(
-					Action.ACCELERATOR_KEY,
-					KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.SHIFT_DOWN_MASK
-							| InputEvent.ALT_DOWN_MASK));
-
-		}
-
-		public void actionPerformed(ActionEvent e) {
-			WorkflowView.importServiceDescription(serviceDescriptionRegistry
-					.getServiceDescription(SpreadsheetImportTemplateService.ACTIVITY_TYPE), false,
-					editManager, menuManager, selectionManager, serviceRegistry);
-		}
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setMenuManager(MenuManager menuManager) {
-		this.menuManager = menuManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportConfigureMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportConfigureMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportConfigureMenuAction.java
deleted file mode 100644
index 7d1fa0a..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/menu/SpreadsheetImportConfigureMenuAction.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.spreadsheet.menu;
-
-import javax.swing.Action;
-
-import uk.org.taverna.commons.services.ServiceRegistry;
-
-import net.sf.taverna.t2.activities.spreadsheet.actions.SpreadsheetImportActivityConfigurationAction;
-import net.sf.taverna.t2.activities.spreadsheet.il8n.SpreadsheetImportUIText;
-import net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-
-/**
- * Menu action for SpreadsheetImport activity configuration.
- *
- * @author David Withers
- */
-public class SpreadsheetImportConfigureMenuAction extends AbstractConfigureActivityMenuAction {
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ServiceRegistry serviceRegistry;
-
-	public SpreadsheetImportConfigureMenuAction() {
-		super(SpreadsheetImportTemplateService.ACTIVITY_TYPE);
-	}
-
-	@Override
-	protected Action createAction() {
-		Action result = new SpreadsheetImportActivityConfigurationAction(findActivity(),
-				getParentFrame(), editManager, fileManager, activityIconManager,
-				serviceDescriptionRegistry, serviceRegistry);
-		result.putValue(Action.NAME, SpreadsheetImportUIText
-				.getString("SpreadsheetImportConfigureMenuAction.configureMenu"));
-		addMenuDots(result);
-		return result;
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportActivityIcon.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportActivityIcon.java b/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportActivityIcon.java
deleted file mode 100644
index 1987364..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportActivityIcon.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.spreadsheet.servicedescriptions;
-
-import java.awt.Color;
-import java.net.URI;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-
-/**
- * UI icon for the SpreadsheetImport Activity.
- *
- * @author David Withers
- */
-public class SpreadsheetImportActivityIcon implements ActivityIconSPI {
-
-	public static final String SPREADSHEET_COLOUR_HTML = "#40e0d0";
-	public static final Color SPREADSHEET_COLOUR = Color.decode(SPREADSHEET_COLOUR_HTML);
-
-	private static Icon icon = null;
-
-	@Override
-	public int canProvideIconScore(URI activityType) {
-		if (SpreadsheetImportTemplateService.ACTIVITY_TYPE.equals(activityType))
-			return DEFAULT_ICON + 1;
-		else
-			return NO_ICON;
-	}
-
-	@Override
-	public Icon getIcon(URI activityType) {
-		return getSpreadsheetImportIcon();
-	}
-
-	public static Icon getSpreadsheetImportIcon() {
-		if (icon == null) {
-			icon = new ImageIcon(
-					SpreadsheetImportActivityIcon.class.getResource("/spreadsheet-import.png"));
-		}
-		return icon;
-	}
-
-	public void setColourManager(ColourManager colourManager) {
-		colourManager.setPreferredColour(
-				"http://ns.taverna.org.uk/2010/activity/spreadsheet-import",
-				SPREADSHEET_COLOUR);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportTemplateService.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportTemplateService.java b/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportTemplateService.java
deleted file mode 100644
index 8057f2d..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/servicedescriptions/SpreadsheetImportTemplateService.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.spreadsheet.servicedescriptions;
-
-import java.net.URI;
-
-import javax.swing.Icon;
-
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
-import net.sf.taverna.t2.activities.spreadsheet.il8n.SpreadsheetImportUIText;
-import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-
-/**
- * Definition of the SpreadsheetImport spreadsheet import template service.
- *
- * @author David Withers
- */
-public class SpreadsheetImportTemplateService extends AbstractTemplateService {
-
-	public static final URI ACTIVITY_TYPE = URI
-			.create("http://ns.taverna.org.uk/2010/activity/spreadsheet-import");
-
-	private static final String SERVICE_NAME = SpreadsheetImportUIText
-			.getString("SpreadsheetImportTemplateService.serviceName");
-
-	private static final URI providerId = URI
-			.create("http://taverna.sf.net/2010/service-provider/spreadsheet");
-
-	public String getName() {
-		return SERVICE_NAME;
-	}
-
-	@Override
-	public URI getActivityType() {
-		return ACTIVITY_TYPE;
-	}
-
-	@Override
-	public Configuration getActivityConfiguration() {
-		Configuration configuration = new Configuration();
-		configuration.setType(ACTIVITY_TYPE.resolve("#Config"));
-		ObjectNode json = (ObjectNode) configuration.getJson();
-		json.put("columnRange", json.objectNode().put("start", 0).put("end", 1));
-		json.put("rowRange", json.objectNode().put("start", 0).put("end", -1));
-		json.put("emptyCellValue", "");
-		json.put("allRows", true);
-		json.put("excludeFirstRow", false);
-		json.put("ignoreBlankRows", false);
-		json.put("emptyCellPolicy", "EMPTY_STRING");
-		json.put("outputFormat", "PORT_PER_COLUMN");
-		json.put("csvDelimiter", ",");
-		return configuration;
-	}
-
-	@Override
-	public Icon getIcon() {
-		return SpreadsheetImportActivityIcon.getSpreadsheetImportIcon();
-	}
-
-	@Override
-	public String getDescription() {
-		return SpreadsheetImportUIText
-				.getString("SpreadsheetImportTemplateService.serviceDescription");
-	}
-
-	public static ServiceDescription getServiceDescription() {
-		SpreadsheetImportTemplateService bts = new SpreadsheetImportTemplateService();
-		return bts.templateService;
-	}
-
-	public String getId() {
-		return providerId.toString();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigTableModel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigTableModel.java b/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigTableModel.java
deleted file mode 100644
index 0409b8e..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigTableModel.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-
-package net.sf.taverna.t2.activities.spreadsheet.views;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.swing.table.AbstractTableModel;
-
-import net.sf.taverna.t2.activities.spreadsheet.SpreadsheetUtils;
-import net.sf.taverna.t2.activities.spreadsheet.il8n.SpreadsheetImportUIText;
-
-/**
- * TableModel for mapping column labels to port names.
- * <p>
- * The default mapping is for the port name to be the same as the column label. The
- * columnToPortMapping only contains entries for port names that are not the same as the column
- * label.
- *
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class SpreadsheetImportConfigTableModel extends AbstractTableModel {
-
-	private Map<String, String> columnToPortMapping;
-
-	private int fromColumn, toColumn;
-
-	/**
-	 * Constructs a TableModel that maps column labels to port names for the specified range of
-	 * columns.
-	 *
-	 * @param fromColumn
-	 *            the start of the column range
-	 * @param toColumn
-	 *            the end of the column range
-	 * @param columnToPortMapping
-	 *            existing column to port mappings (can be null)
-	 */
-	public SpreadsheetImportConfigTableModel(String fromColumn, String toColumn,
-			Map<String, String> columnToPortMapping) {
-		if (columnToPortMapping == null) {
-			this.columnToPortMapping = new HashMap<String, String>();
-		} else {
-			this.columnToPortMapping = new HashMap<String, String>(columnToPortMapping);
-		}
-		this.fromColumn = SpreadsheetUtils.getColumnIndex(fromColumn);
-		this.toColumn = SpreadsheetUtils.getColumnIndex(toColumn);
-	}
-
-	/**
-	 * Sets the start of the column range.
-	 *
-	 * @param fromColumn
-	 *            the start of the column range
-	 */
-	public void setFromColumn(int fromColumn) {
-		if (this.fromColumn != fromColumn) {
-			this.fromColumn = fromColumn;
-			fireTableStructureChanged();
-		}
-	}
-
-	/**
-	 * Sets the end of the column range.
-	 *
-	 * @param toColumn
-	 *            the end of the column range
-	 */
-	public void setToColumn(int toColumn) {
-		if (this.toColumn != toColumn) {
-			this.toColumn = toColumn;
-			fireTableStructureChanged();
-		}
-	}
-
-	/**
-	 * Returns the port name for the given column label.
-	 * <p>
-	 * If the columnLabel is the columnToPortMapping the value is returned; otherwise the
-	 * columnLabel is returned.
-	 *
-	 * @param columnLabel
-	 *            the column to find the port name for
-	 * @return the port name for the given column label
-	 */
-	public String getPortName(String columnLabel) {
-		String portName;
-		if (columnToPortMapping.containsKey(columnLabel)) {
-			portName = columnToPortMapping.get(columnLabel);
-		} else {
-			portName = columnLabel;
-		}
-		return portName;
-	}
-
-	/**
-	 * Sets the port name for the column label.
-	 * <p>
-	 * If the port name is not the same as the column label the port name is added the
-	 * columnToPortMapping.
-	 *
-	 * @param columnLabel
-	 * @param portName
-	 */
-	public void setPortName(String columnLabel, String portName) {
-		if (columnLabel.equals(portName)) {
-			columnToPortMapping.remove(columnLabel);
-		} else {
-			columnToPortMapping.put(columnLabel, portName);
-		}
-	}
-
-	/**
-	 * Returns the map of column labels to port names.
-	 * <p>
-	 * The map only contains entries for port names that are not the same as their corresponding
-	 * column label.
-	 *
-	 * @return the map of column labels to port names
-	 */
-	public Map<String, String> getColumnToPortMapping() {
-		return columnToPortMapping;
-	}
-
-	// TableModel methods
-
-	@Override
-	public Class<?> getColumnClass(int columnIndex) {
-		return String.class;
-	}
-
-	public int getColumnCount() {
-		return 2;
-	}
-
-	@Override
-	public String getColumnName(int columnIndex) {
-		if (columnIndex == 0) {
-			return SpreadsheetImportUIText.getString("SpreadsheetImportConfigTableModel.column");
-		} else {
-			return SpreadsheetImportUIText.getString("SpreadsheetImportConfigTableModel.portName");
-		}
-	}
-
-	public int getRowCount() {
-		return toColumn - fromColumn + 1;
-	}
-
-	public Object getValueAt(int rowIndex, int columnIndex) {
-		String columnLabel = SpreadsheetUtils.getColumnLabel(rowIndex + fromColumn);
-		if (columnIndex == 0) {
-			return columnLabel;
-		} else {
-			return getPortName(columnLabel);
-		}
-	}
-
-	@Override
-	public boolean isCellEditable(int rowIndex, int columnIndex) {
-		return columnIndex == 1;
-	}
-
-	@Override
-	public void setValueAt(Object value, int rowIndex, int columnIndex) {
-		if (columnIndex == 1) {
-			setPortName(SpreadsheetUtils.getColumnLabel(rowIndex + fromColumn), value.toString());
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigView.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigView.java b/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigView.java
deleted file mode 100644
index af57c44..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportConfigView.java
+++ /dev/null
@@ -1,1082 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.spreadsheet.views;
-
-import java.awt.BorderLayout;
-import java.awt.CardLayout;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.FlowLayout;
-import java.awt.Font;
-import java.awt.Graphics;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.ItemEvent;
-import java.awt.event.ItemListener;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.Stack;
-
-import javax.swing.ButtonGroup;
-import javax.swing.DefaultCellEditor;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-import javax.swing.JScrollPane;
-import javax.swing.JTable;
-import javax.swing.JTextField;
-import javax.swing.SwingConstants;
-import javax.swing.border.Border;
-import javax.swing.border.CompoundBorder;
-import javax.swing.border.EmptyBorder;
-import javax.swing.event.DocumentEvent;
-import javax.swing.event.DocumentListener;
-import javax.swing.table.DefaultTableColumnModel;
-import javax.swing.table.TableCellEditor;
-import javax.swing.table.TableColumn;
-import javax.swing.text.AttributeSet;
-import javax.swing.text.BadLocationException;
-import javax.swing.text.JTextComponent;
-import javax.swing.text.PlainDocument;
-
-import net.sf.taverna.t2.activities.spreadsheet.Range;
-import net.sf.taverna.t2.activities.spreadsheet.SpreadsheetUtils;
-import net.sf.taverna.t2.activities.spreadsheet.il8n.SpreadsheetImportUIText;
-import net.sf.taverna.t2.lang.ui.DialogTextArea;
-import net.sf.taverna.t2.lang.ui.icons.Icons;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationPanel;
-
-import org.apache.commons.lang.StringEscapeUtils;
-import org.apache.log4j.Logger;
-
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.node.ArrayNode;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
-/**
- * Configuration panel for the spreadsheet import activity.
- *
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class SpreadsheetImportConfigView extends ActivityConfigurationPanel {
-
-	private static final String INCONSISTENT_ROW_MESSAGE = SpreadsheetImportUIText
-			.getString("SpreadsheetImportConfigView.INCONSISTENT_ROW_MESSAGE");
-
-	private static final String INCONSISTENT_COLUMN_MESSAGE = SpreadsheetImportUIText
-			.getString("SpreadsheetImportConfigView.INCONSISTENT_COLUMN_MESSAGE");
-
-	private static final String FROM_COLUMN_ERROR_MESSAGE = SpreadsheetImportUIText
-			.getString("SpreadsheetImportConfigView.FROM_COLUMN_ERROR_MESSAGE");
-
-	private static final String TO_COLUMN_ERROR_MESSAGE = SpreadsheetImportUIText
-			.getString("SpreadsheetImportConfigView.TO_COLUMN_ERROR_MESSAGE");
-
-	private static final String FROM_ROW_ERROR_MESSAGE = SpreadsheetImportUIText
-			.getString("SpreadsheetImportConfigView.FROM_ROW_ERROR_MESSAGE");
-
-	private static final String TO_ROW_ERROR_MESSAGE = SpreadsheetImportUIText
-			.getString("SpreadsheetImportConfigView.TO_ROW_ERROR_MESSAGE");
-
-	private static final String DEFAULT_MESSAGE = SpreadsheetImportUIText
-			.getString("SpreadsheetImportConfigView.DEFAULT_MESSAGE");
-
-	private static final String EMPTY_FROM_ROW_ERROR_MESSAGE = SpreadsheetImportUIText
-			.getString("SpreadsheetImportConfigView.EMPTY_FROM_ROW_ERROR_MESSAGE");
-
-	private static final String EMPTY_FROM_COLUMN_ERROR_MESSAGE = SpreadsheetImportUIText
-			.getString("SpreadsheetImportConfigView.EMPTY_FROM_COLUMN_ERROR_MESSAGE");
-
-	private static final String EMPTY_TO_COLUMN_ERROR_MESSAGE = SpreadsheetImportUIText
-			.getString("SpreadsheetImportConfigView.EMPTY_TO_COLUMN_ERROR_MESSAGE");
-
-	private static final String DUPLICATE_PORT_NAME_ERROR_MESSAGE = SpreadsheetImportUIText
-			.getString("SpreadsheetImportConfigView.DUPLICATE_PORT_NAME_ERROR_MESSAGE");
-
-	private static Logger logger = Logger.getLogger(SpreadsheetImportConfigView.class);
-
-	private JPanel titlePanel, contentPanel, buttonPanel, page1, page2;
-
-	private JLabel titleLabel, titleIcon, rowLabel, columnLabel;
-
-	private JLabel emptyCellLabel, outputFormatLabel, outputFormatDelimiterLabel, columnMappingLabel;
-
-	private DialogTextArea titleMessage;
-
-	private JTextField columnFromValue, columnToValue, rowFromValue, rowToValue;
-
-	private JTextField emptyCellUserDefinedValue, outputFormatDelimiter;
-
-	private JCheckBox rowSelectAllOption, rowExcludeFirstOption, rowIgnoreBlankRows;
-
-	private ButtonGroup emptyCellButtonGroup, outputFormatButtonGroup;
-
-	private JRadioButton emptyCellEmptyStringOption, emptyCellUserDefinedOption,
-	emptyCellErrorValueOption;
-
-	private JRadioButton outputFormatMultiplePort, outputFormatSinglePort;
-
-	private JTable columnMappingTable;
-
-	private SpreadsheetImportConfigTableModel columnMappingTableModel;
-
-	private JButton nextButton, backButton;
-
-	private CardLayout cardLayout = new CardLayout();
-
-	private Stack<String> warningMessages = new Stack<String>();
-
-	private Stack<String> errorMessages = new Stack<String>();
-
-	private ObjectNode newConfiguration;
-
-	private final ServiceRegistry serviceRegistry;
-
-	/**
-	 * Constructs a configuration view for an SpreadsheetImport Activity.
-	 *
-	 * @param activity
-	 */
-	public SpreadsheetImportConfigView(Activity activity, ServiceRegistry serviceRegistry) {
-		super(activity);
-		this.serviceRegistry = serviceRegistry;
-		initialise();
-	}
-
-	@Override
-	protected void initialise() {
-		super.initialise();
-		newConfiguration = getJson().deepCopy();
-
-		// title
-		titlePanel = new JPanel(new BorderLayout());
-		titlePanel.setBackground(Color.WHITE);
-		addDivider(titlePanel, SwingConstants.BOTTOM, true);
-
-		titleLabel = new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.panelTitle"));
-		titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 13.5f));
-		titleIcon = new JLabel("");
-		titleMessage = new DialogTextArea(DEFAULT_MESSAGE);
-		titleMessage.setMargin(new Insets(5, 10, 10, 10));
-		// titleMessage.setMinimumSize(new Dimension(0, 30));
-		titleMessage.setFont(titleMessage.getFont().deriveFont(11f));
-		titleMessage.setEditable(false);
-		titleMessage.setFocusable(false);
-		// titleMessage.setFont(titleLabel.getFont().deriveFont(Font.PLAIN,
-		// 12f));
-
-		// column range
-		columnLabel = new JLabel(SpreadsheetImportUIText
-				.getString("SpreadsheetImportConfigView.columnSectionLabel"));
-
-		JsonNode columnRange = newConfiguration.get("columnRange");
-		columnFromValue = new JTextField(new UpperCaseDocument(), SpreadsheetUtils.getColumnLabel(columnRange.get("start").intValue()), 4);
-		columnFromValue.setMinimumSize(columnFromValue.getPreferredSize());
-		columnToValue = new JTextField(new UpperCaseDocument(), SpreadsheetUtils.getColumnLabel(columnRange.get("end").intValue()), 4);
-		columnToValue.setMinimumSize(columnToValue.getPreferredSize());
-
-		columnFromValue.getDocument().addDocumentListener(new DocumentListener() {
-			public void changedUpdate(DocumentEvent e) {
-			}
-
-			public void insertUpdate(DocumentEvent e) {
-				checkValue(columnFromValue.getText());
-			}
-
-			public void removeUpdate(DocumentEvent e) {
-				checkValue(columnFromValue.getText());
-			}
-
-			private void checkValue(String text) {
-				if (text.trim().equals("")) {
-					addErrorMessage(EMPTY_FROM_COLUMN_ERROR_MESSAGE);
-				} else if (text.trim().matches("[A-Za-z]+")) {
-					String fromColumn = columnFromValue.getText().toUpperCase();
-					String toColumn = columnToValue.getText().toUpperCase();
-					int fromColumnIndex = SpreadsheetUtils.getColumnIndex(fromColumn);
-					int toColumnIndex = SpreadsheetUtils.getColumnIndex(toColumn);
-					if (checkColumnRange(fromColumnIndex, toColumnIndex)) {
-						columnMappingTableModel.setFromColumn(fromColumnIndex);
-						columnMappingTableModel.setToColumn(toColumnIndex);
-						newConfiguration.set("columnRange", newConfiguration.objectNode().put("start", fromColumnIndex).put("end", toColumnIndex));
-						validatePortNames();
-					}
-					removeErrorMessage(FROM_COLUMN_ERROR_MESSAGE);
-					removeErrorMessage(EMPTY_FROM_COLUMN_ERROR_MESSAGE);
-				} else {
-					addErrorMessage(FROM_COLUMN_ERROR_MESSAGE);
-					removeErrorMessage(EMPTY_FROM_COLUMN_ERROR_MESSAGE);
-				}
-			}
-
-		});
-
-		columnToValue.getDocument().addDocumentListener(new DocumentListener() {
-			public void changedUpdate(DocumentEvent e) {
-			}
-
-			public void insertUpdate(DocumentEvent e) {
-				checkValue(columnToValue.getText());
-			}
-
-			public void removeUpdate(DocumentEvent e) {
-				checkValue(columnToValue.getText());
-			}
-
-			private void checkValue(String text) {
-				if (text.trim().equals("")) {
-					addErrorMessage(EMPTY_TO_COLUMN_ERROR_MESSAGE);
-				} else if (text.trim().matches("[A-Za-z]+")) {
-					String fromColumn = columnFromValue.getText().toUpperCase();
-					String toColumn = columnToValue.getText().toUpperCase();
-					int fromColumnIndex = SpreadsheetUtils.getColumnIndex(fromColumn);
-					int toColumnIndex = SpreadsheetUtils.getColumnIndex(toColumn);
-					if (checkColumnRange(fromColumnIndex, toColumnIndex)) {
-						columnMappingTableModel.setFromColumn(fromColumnIndex);
-						columnMappingTableModel.setToColumn(toColumnIndex);
-						newConfiguration.set("columnRange", newConfiguration.objectNode().put("start", fromColumnIndex).put("end", toColumnIndex));
-						validatePortNames();
-					}
-					removeErrorMessage(TO_COLUMN_ERROR_MESSAGE);
-					removeErrorMessage(EMPTY_TO_COLUMN_ERROR_MESSAGE);
-
-				} else {
-					addErrorMessage(TO_COLUMN_ERROR_MESSAGE);
-					removeErrorMessage(EMPTY_TO_COLUMN_ERROR_MESSAGE);
-				}
-			}
-		});
-
-		// row range
-		rowLabel = new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.rowSectionLabel"));
-		addDivider(rowLabel, SwingConstants.TOP, false);
-
-		rowSelectAllOption = new JCheckBox(SpreadsheetImportUIText
-				.getString("SpreadsheetImportConfigView.selectAllRowsOption"));
-		rowExcludeFirstOption = new JCheckBox(SpreadsheetImportUIText
-				.getString("SpreadsheetImportConfigView.excludeHeaderRowOption"));
-		rowIgnoreBlankRows = new JCheckBox(SpreadsheetImportUIText
-				.getString("SpreadsheetImportConfigView.ignoreBlankRowsOption"));
-		rowSelectAllOption.setFocusable(false);
-		rowExcludeFirstOption.setFocusable(false);
-
-		JsonNode rowRange = newConfiguration.get("rowRange");
-		rowFromValue = new JTextField(new NumericDocument(), String.valueOf(rowRange.get("start").intValue() + 1), 4);
-		if (rowRange.get("end").intValue() == -1) {
-			rowToValue = new JTextField(new NumericDocument(), "", 4);
-		} else {
-			rowToValue = new JTextField(new NumericDocument(), String.valueOf(rowRange.get("end").intValue() + 1), 4);
-		}
-		rowFromValue.setMinimumSize(rowFromValue.getPreferredSize());
-		rowToValue.setMinimumSize(rowToValue.getPreferredSize());
-
-		if (newConfiguration.get("allRows").booleanValue()) {
-			rowSelectAllOption.setSelected(true);
-			rowFromValue.setEditable(false);
-			rowFromValue.setEnabled(false);
-			rowToValue.setEditable(false);
-			rowToValue.setEnabled(false);
-		} else {
-			rowExcludeFirstOption.setEnabled(false);
-		}
-		rowExcludeFirstOption.setSelected(newConfiguration.get("excludeFirstRow").booleanValue());
-		rowIgnoreBlankRows.setSelected(newConfiguration.get("ignoreBlankRows").booleanValue());
-
-		rowFromValue.getDocument().addDocumentListener(new DocumentListener() {
-			public void changedUpdate(DocumentEvent e) {
-			}
-
-			public void insertUpdate(DocumentEvent e) {
-				checkValue(rowFromValue.getText());
-			}
-
-			public void removeUpdate(DocumentEvent e) {
-				checkValue(rowFromValue.getText());
-			}
-
-			private void checkValue(String text) {
-				if (text.trim().equals("")) {
-					addErrorMessage(EMPTY_FROM_ROW_ERROR_MESSAGE);
-				} else if (text.trim().matches("[1-9][0-9]*")) {
-					checkRowRange(rowFromValue.getText(), rowToValue.getText());
-					int fromRow = Integer.parseInt(rowFromValue.getText());
-					((ObjectNode) newConfiguration.get("rowRange")).put("start", fromRow - 1);
-					removeErrorMessage(FROM_ROW_ERROR_MESSAGE);
-					removeErrorMessage(EMPTY_FROM_ROW_ERROR_MESSAGE);
-				} else {
-					addErrorMessage(FROM_ROW_ERROR_MESSAGE);
-					removeErrorMessage(EMPTY_FROM_ROW_ERROR_MESSAGE);
-				}
-			}
-		});
-
-		rowToValue.getDocument().addDocumentListener(new DocumentListener() {
-			public void changedUpdate(DocumentEvent e) {
-			}
-
-			public void insertUpdate(DocumentEvent e) {
-				checkValue(rowToValue.getText());
-			}
-
-			public void removeUpdate(DocumentEvent e) {
-				checkValue(rowToValue.getText());
-			}
-
-			private void checkValue(String text) {
-				if (text.trim().equals("")) {
-					((ObjectNode) newConfiguration.get("rowRange")).put("end", -1);
-					removeErrorMessage(TO_ROW_ERROR_MESSAGE);
-					removeErrorMessage(INCONSISTENT_ROW_MESSAGE);
-				} else if (text.trim().matches("[0-9]+")) {
-					checkRowRange(rowFromValue.getText(), rowToValue.getText());
-					int toRow = Integer.parseInt(rowToValue.getText());
-					((ObjectNode) newConfiguration.get("rowRange")).put("end", toRow - 1);
-					removeErrorMessage(TO_ROW_ERROR_MESSAGE);
-				} else {
-					addErrorMessage(TO_ROW_ERROR_MESSAGE);
-				}
-			}
-		});
-
-		rowSelectAllOption.addItemListener(new ItemListener() {
-			public void itemStateChanged(ItemEvent e) {
-				if (e.getStateChange() == ItemEvent.SELECTED) {
-					newConfiguration.put("allRows", true);
-					rowExcludeFirstOption.setEnabled(true);
-					if (rowExcludeFirstOption.isSelected()) {
-						rowFromValue.setText("2");
-					} else {
-						rowFromValue.setText("1");
-					}
-					rowToValue.setText("");
-					rowFromValue.setEditable(false);
-					rowFromValue.setEnabled(false);
-					rowToValue.setEditable(false);
-					rowToValue.setEnabled(false);
-				} else {
-					newConfiguration.put("allRows", false);
-					rowExcludeFirstOption.setEnabled(false);
-					rowFromValue.setEditable(true);
-					rowFromValue.setEnabled(true);
-					rowToValue.setEditable(true);
-					rowToValue.setEnabled(true);
-				}
-			}
-		});
-
-		rowExcludeFirstOption.addItemListener(new ItemListener() {
-			public void itemStateChanged(ItemEvent e) {
-				if (e.getStateChange() == ItemEvent.SELECTED) {
-					newConfiguration.put("excludeFirstRow", true);
-					rowFromValue.setText("2");
-					((ObjectNode) newConfiguration.get("rowRange")).put("start", 1);
-				} else {
-					newConfiguration.put("excludeFirstRow", false);
-					rowFromValue.setText("1");
-					((ObjectNode) newConfiguration.get("rowRange")).put("start", 0);
-				}
-			}
-		});
-
-		rowIgnoreBlankRows.addItemListener(new ItemListener() {
-			public void itemStateChanged(ItemEvent e) {
-				newConfiguration.put("ignoreBlankRows", e.getStateChange() == ItemEvent.SELECTED);
-			}
-		});
-
-		// empty cells
-		emptyCellLabel = new JLabel(SpreadsheetImportUIText
-				.getString("SpreadsheetImportConfigView.emptyCellSectionLabel"));
-		addDivider(emptyCellLabel, SwingConstants.TOP, false);
-
-		emptyCellButtonGroup = new ButtonGroup();
-		emptyCellEmptyStringOption = new JRadioButton(SpreadsheetImportUIText
-				.getString("SpreadsheetImportConfigView.emptyStringOption"));
-		emptyCellUserDefinedOption = new JRadioButton(SpreadsheetImportUIText
-				.getString("SpreadsheetImportConfigView.userDefinedOption"));
-		emptyCellErrorValueOption = new JRadioButton(SpreadsheetImportUIText
-				.getString("SpreadsheetImportConfigView.generateErrorOption"));
-		emptyCellEmptyStringOption.setFocusable(false);
-		emptyCellUserDefinedOption.setFocusable(false);
-		emptyCellErrorValueOption.setFocusable(false);
-
-		emptyCellUserDefinedValue = new JTextField(newConfiguration.get("emptyCellValue").textValue());
-
-		emptyCellButtonGroup.add(emptyCellEmptyStringOption);
-		emptyCellButtonGroup.add(emptyCellUserDefinedOption);
-		emptyCellButtonGroup.add(emptyCellErrorValueOption);
-
-		if (newConfiguration.get("emptyCellPolicy").textValue().equals("GENERATE_ERROR")) {
-			emptyCellErrorValueOption.setSelected(true);
-			emptyCellUserDefinedValue.setEnabled(false);
-			emptyCellUserDefinedValue.setEditable(false);
-		} else if (newConfiguration.get("emptyCellPolicy").textValue().equals("EMPTY_STRING")) {
-			emptyCellEmptyStringOption.setSelected(true);
-			emptyCellUserDefinedValue.setEnabled(false);
-			emptyCellUserDefinedValue.setEditable(false);
-		} else {
-			emptyCellUserDefinedOption.setSelected(true);
-			emptyCellUserDefinedValue.setText(newConfiguration.get("emptyCellValue").textValue());
-			emptyCellUserDefinedValue.setEnabled(true);
-			emptyCellUserDefinedValue.setEditable(true);
-		}
-
-		emptyCellEmptyStringOption.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				newConfiguration.put("emptyCellPolicy", "EMPTY_STRING");
-				emptyCellUserDefinedValue.setEnabled(false);
-				emptyCellUserDefinedValue.setEditable(false);
-			}
-		});
-		emptyCellUserDefinedOption.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				newConfiguration.put("emptyCellPolicy", "USER_DEFINED");
-				emptyCellUserDefinedValue.setEnabled(true);
-				emptyCellUserDefinedValue.setEditable(true);
-				emptyCellUserDefinedValue.requestFocusInWindow();
-			}
-		});
-		emptyCellErrorValueOption.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				newConfiguration.put("emptyCellPolicy", "GENERATE_ERROR");
-				emptyCellUserDefinedValue.setEnabled(false);
-				emptyCellUserDefinedValue.setEditable(false);
-			}
-		});
-
-		emptyCellUserDefinedValue.getDocument().addDocumentListener(new DocumentListener() {
-			public void changedUpdate(DocumentEvent e) {
-				newConfiguration.put("emptyCellValue", emptyCellUserDefinedValue.getText());
-			}
-
-			public void insertUpdate(DocumentEvent e) {
-				newConfiguration.put("emptyCellValue", emptyCellUserDefinedValue.getText());
-			}
-
-			public void removeUpdate(DocumentEvent e) {
-				newConfiguration.put("emptyCellValue", emptyCellUserDefinedValue.getText());
-			}
-		});
-
-		// column mappings
-		columnMappingLabel = new JLabel(SpreadsheetImportUIText
-				.getString("SpreadsheetImportConfigView.columnMappingSectionLabel"));
-		addDivider(columnMappingLabel, SwingConstants.TOP, false);
-
-		Map<String, String> columnToPortMapping = new HashMap<>();
-		if (newConfiguration.has("columnNames")) {
-			for (JsonNode columnName : newConfiguration.get("columnNames")) {
-				columnToPortMapping.put(columnName.get("column").textValue(), columnName.get("port").textValue());
-			}
-		}
-		columnMappingTableModel = new SpreadsheetImportConfigTableModel(columnFromValue.getText(),
-				columnToValue.getText(), columnToPortMapping);
-
-		columnMappingTable = new JTable();
-		columnMappingTable.setRowSelectionAllowed(false);
-		columnMappingTable.getTableHeader().setReorderingAllowed(false);
-		columnMappingTable.setGridColor(Color.LIGHT_GRAY);
-		// columnMappingTable.setFocusable(false);
-
-		columnMappingTable.setColumnModel(new DefaultTableColumnModel() {
-			public TableColumn getColumn(int columnIndex) {
-				TableColumn column = super.getColumn(columnIndex);
-				if (columnIndex == 0) {
-					column.setMaxWidth(100);
-				}
-				return column;
-			}
-		});
-
-		TableCellEditor defaultEditor = columnMappingTable.getDefaultEditor(String.class);
-		if (defaultEditor instanceof DefaultCellEditor) {
-			DefaultCellEditor defaultCellEditor = (DefaultCellEditor) defaultEditor;
-			defaultCellEditor.setClickCountToStart(1);
-			Component editorComponent = defaultCellEditor.getComponent();
-			if (editorComponent instanceof JTextComponent) {
-				final JTextComponent textField = (JTextComponent) editorComponent;
-				textField.getDocument().addDocumentListener(new DocumentListener() {
-					public void changedUpdate(DocumentEvent e) {
-						updateModel(textField.getText());
-					}
-
-					public void insertUpdate(DocumentEvent e) {
-						updateModel(textField.getText());
-					}
-
-					public void removeUpdate(DocumentEvent e) {
-						updateModel(textField.getText());
-					}
-
-					private void updateModel(String text) {
-						int row = columnMappingTable.getEditingRow();
-						int column = columnMappingTable.getEditingColumn();
-						columnMappingTableModel.setValueAt(text, row, column);
-
-						ArrayNode columnNames = newConfiguration.arrayNode();
-						Map<String, String> columnToPortMapping = columnMappingTableModel.getColumnToPortMapping();
-						for (Entry<String,String> entry : columnToPortMapping.entrySet()) {
-							columnNames.add(newConfiguration.objectNode().put("column", entry.getKey()).put("port", entry.getValue()));
-						}
-						newConfiguration.put("columnNames", columnNames);
-						validatePortNames();
-					}
-
-				});
-			}
-		}
-
-		columnMappingTable.setModel(columnMappingTableModel);
-
-		// output format
-		outputFormatLabel = new JLabel(SpreadsheetImportUIText
-				.getString("SpreadsheetImportConfigView.outputFormatSectionLabel"));
-
-		outputFormatMultiplePort = new JRadioButton(SpreadsheetImportUIText
-				.getString("SpreadsheetImportConfigView.multiplePortOption"));
-		outputFormatSinglePort = new JRadioButton(SpreadsheetImportUIText
-				.getString("SpreadsheetImportConfigView.singlePortOption"));
-		outputFormatMultiplePort.setFocusable(false);
-		outputFormatSinglePort.setFocusable(false);
-
-		outputFormatDelimiterLabel = new JLabel(SpreadsheetImportUIText
-				.getString("SpreadsheetImportConfigView.userDefinedCsvDelimiter"));
-		outputFormatDelimiter = new JTextField(newConfiguration.get("csvDelimiter").textValue(), 5);
-
-		outputFormatButtonGroup = new ButtonGroup();
-		outputFormatButtonGroup.add(outputFormatMultiplePort);
-		outputFormatButtonGroup.add(outputFormatSinglePort);
-
-		if (newConfiguration.get("outputFormat").textValue().equals("PORT_PER_COLUMN")) {
-			outputFormatMultiplePort.setSelected(true);
-			outputFormatDelimiterLabel.setEnabled(false);
-			outputFormatDelimiter.setEnabled(false);
-		} else {
-			outputFormatSinglePort.setSelected(true);
-			columnMappingLabel.setEnabled(false);
-			enableTable(columnMappingTable, false);
-		}
-
-		outputFormatMultiplePort.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				outputFormatDelimiterLabel.setEnabled(false);
-				outputFormatDelimiter.setEnabled(false);
-				columnMappingLabel.setEnabled(true);
-				enableTable(columnMappingTable, true);
-				newConfiguration.put("outputFormat", "PORT_PER_COLUMN");
-			}
-		});
-		outputFormatSinglePort.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				outputFormatDelimiterLabel.setEnabled(true);
-				outputFormatDelimiter.setEnabled(true);
-				columnMappingLabel.setEnabled(false);
-				enableTable(columnMappingTable, false);
-				newConfiguration.put("outputFormat", "SINGLE_PORT");
-			}
-
-		});
-		outputFormatDelimiter.getDocument().addDocumentListener(new DocumentListener() {
-			public void changedUpdate(DocumentEvent e) {
-				handleUpdate();
-			}
-
-			public void insertUpdate(DocumentEvent e) {
-				handleUpdate();
-			}
-
-			public void removeUpdate(DocumentEvent e) {
-				handleUpdate();
-			}
-
-			private void handleUpdate() {
-				String text = null;
-				try {
-					text = StringEscapeUtils.unescapeJava(outputFormatDelimiter.getText());
-				} catch (RuntimeException re) {}
-				if (text == null || text.length() == 0) {
-					newConfiguration.put("csvDelimiter", ",");
-				} else {
-					newConfiguration.put("csvDelimiter", text.substring(0, 1));
-				}
-			}
-
-		});
-
-		// buttons
-		nextButton = new JButton(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.nextButton"));
-		nextButton.setFocusable(false);
-		nextButton.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				backButton.setVisible(true);
-				nextButton.setVisible(false);
-				cardLayout.last(contentPanel);
-			}
-		});
-
-		backButton = new JButton(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.backButton"));
-		backButton.setFocusable(false);
-		backButton.setVisible(false);
-		backButton.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				nextButton.setVisible(true);
-				backButton.setVisible(false);
-				cardLayout.first(contentPanel);
-			}
-		});
-
-		buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
-		addDivider(buttonPanel, SwingConstants.TOP, true);
-
-		removeAll();
-		layoutPanel();
-	}
-
-	@Override
-	public void noteConfiguration() {
-		setJson(newConfiguration);
-		configureInputPorts(serviceRegistry);
-		configureOutputPorts(serviceRegistry);
-	}
-
-	@Override
-	public boolean checkValues() {
-		return errorMessages.isEmpty();
-	}
-
-	private void layoutPanel() {
-		setPreferredSize(new Dimension(450, 400));
-		setLayout(new BorderLayout());
-
-		page1 = new JPanel(new GridBagLayout());
-		page2 = new JPanel(new GridBagLayout());
-
-		contentPanel = new JPanel(cardLayout);
-		contentPanel.add(page1, "page1");
-		contentPanel.add(page2, "page2");
-		add(contentPanel, BorderLayout.CENTER);
-
-		// title
-		titlePanel.setBorder(new CompoundBorder(titlePanel.getBorder(), new EmptyBorder(10, 10, 0, 10)));
-		add(titlePanel, BorderLayout.NORTH);
-		titlePanel.add(titleLabel, BorderLayout.NORTH);
-		titlePanel.add(titleIcon, BorderLayout.WEST);
-		titlePanel.add(titleMessage, BorderLayout.CENTER);
-
-		GridBagConstraints c = new GridBagConstraints();
-		c.anchor = GridBagConstraints.WEST;
-		c.fill = GridBagConstraints.HORIZONTAL;
-		c.weightx = 1;
-		c.gridx = 0;
-		c.gridwidth = GridBagConstraints.REMAINDER;
-
-		// column range
-		c.insets = new Insets(10, 10, 0, 10);
-		page1.add(columnLabel, c);
-
-		c.insets = new Insets(10, 25, 0, 0);
-		c.gridwidth = 1;
-		c.weightx = 0;
-		page1.add(new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.from")), c);
-		c.insets = new Insets(10, 0, 0, 0);
-		c.gridx = 1;
-		page1.add(columnFromValue, c);
-		c.gridx = 2;
-		page1.add(new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.to")), c);
-		c.gridx = 3;
-		page1.add(columnToValue, c);
-
-		c.gridx = 0;
-		c.weightx = 1;
-		c.insets = new Insets(10, 10, 0, 10);
-		c.gridwidth = GridBagConstraints.REMAINDER;
-
-		// row range
-		page1.add(rowLabel, c);
-
-		c.insets = new Insets(10, 25, 0, 0);
-		c.gridwidth = 1;
-		c.gridx = 0;
-		c.weightx = 0;
-		page1.add(new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.from")), c);
-		c.insets = new Insets(10, 0, 0, 0);
-		c.gridx = 1;
-		page1.add(rowFromValue, c);
-		c.gridx = 2;
-		page1.add(new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.to")), c);
-		c.gridx = 3;
-		page1.add(rowToValue, c);
-		c.gridx = 4;
-		page1.add(rowSelectAllOption, c);
-		c.gridx = 5;
-		c.gridwidth = GridBagConstraints.REMAINDER;
-		c.insets = new Insets(10, 0, 0, 10);
-		page1.add(rowExcludeFirstOption, c);
-		c.insets = new Insets(10, 25, 0, 0);
-		c.gridx = 0;
-		page1.add(rowIgnoreBlankRows, c);
-
-		c.gridx = 0;
-
-		// empty cells
-		c.insets = new Insets(10, 10, 10, 10);
-		page1.add(emptyCellLabel, c);
-
-		c.insets = new Insets(0, 25, 0, 10);
-		page1.add(emptyCellEmptyStringOption, c);
-		JPanel userDefinedPanel = new JPanel(new BorderLayout());
-		userDefinedPanel.add(emptyCellUserDefinedOption, BorderLayout.WEST);
-		userDefinedPanel.add(emptyCellUserDefinedValue, BorderLayout.CENTER);
-		page1.add(userDefinedPanel, c);
-		c.weighty = 1;
-		c.anchor = GridBagConstraints.NORTHWEST;
-		page1.add(emptyCellErrorValueOption, c);
-
-		// output format
-		c.insets = new Insets(10, 10, 10, 10);
-		c.weighty = 0;
-		c.weightx = 1;
-		page2.add(outputFormatLabel, c);
-
-		c.insets = new Insets(0, 25, 0, 10);
-		page2.add(outputFormatMultiplePort, c);
-		page2.add(outputFormatSinglePort, c);
-
-		c.insets = new Insets(0, 50, 0, 10);
-		JPanel outputFormatDelimiterPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
-		outputFormatDelimiterPanel.add(outputFormatDelimiterLabel);
-		outputFormatDelimiterPanel.add(outputFormatDelimiter);
-		page2.add(outputFormatDelimiterPanel, c);
-
-		// column mapping
-		c.insets = new Insets(10, 10, 0, 10);
-		page2.add(columnMappingLabel, c);
-
-		c.insets = new Insets(10, 10, 10, 10);
-		c.fill = GridBagConstraints.BOTH;
-		c.weighty = 1;
-		page2.add(new JScrollPane(columnMappingTable), c);
-
-		buttonPanel.add(backButton);
-		buttonPanel.add(nextButton);
-		add(buttonPanel, BorderLayout.SOUTH);
-	}
-
-	/**
-	 * Displays the message with no icon.
-	 *
-	 * @param message
-	 *            the message to display
-	 */
-	public void setMessage(String message) {
-		titleIcon.setIcon(null);
-		titleMessage.setText(message);
-	}
-
-	/**
-	 * Adds the message to the top of the warning message stack. If the message is already in the
-	 * stack it is moved to the top. If there are no error messages the message is displayed.
-	 *
-	 * @param message
-	 *            the warning message to add
-	 */
-	public void addWarningMessage(String message) {
-		if (warningMessages.contains(message)) {
-			warningMessages.remove(message);
-		}
-		warningMessages.push(message);
-		if (errorMessages.isEmpty()) {
-			setWarningMessage(message);
-		}
-	}
-
-	/**
-	 * Removes the message from the warning message stack. If there are no error messages the next
-	 * warning message is displayed. If there are no warning messages the default message is
-	 * displayed.
-	 *
-	 * @param message
-	 *            the warning message to remove
-	 */
-	public void removeWarningMessage(String message) {
-		warningMessages.remove(message);
-		if (errorMessages.isEmpty()) {
-			if (warningMessages.isEmpty()) {
-				setMessage(DEFAULT_MESSAGE);
-			} else {
-				setWarningMessage(warningMessages.peek());
-			}
-		}
-	}
-
-	/**
-	 * Displays the message and a warning icon.
-	 *
-	 * @param message
-	 *            the warning message to display
-	 */
-	public void setWarningMessage(String message) {
-		titleIcon.setIcon(Icons.warningIcon);
-		titleMessage.setText(message);
-	}
-
-	/**
-	 * Adds the message to the top of the error message stack. If the message is already in the
-	 * stack it is moved to the top. The message is then displayed.
-	 *
-	 * @param message
-	 *            the error message to add
-	 */
-	public void addErrorMessage(String message) {
-		if (errorMessages.contains(message)) {
-			errorMessages.remove(message);
-		}
-		errorMessages.push(message);
-		setErrorMessage(message);
-	}
-
-	/**
-	 * Removes the message from the error message stack and displays the next error message. If
-	 * there are no error messages the next warning message is displayed. If there are no warning
-	 * messages the default message is displayed.
-	 *
-	 * @param message
-	 *            the error message to remove
-	 */
-	public void removeErrorMessage(String message) {
-		errorMessages.remove(message);
-		if (errorMessages.isEmpty()) {
-			if (warningMessages.isEmpty()) {
-				setMessage(DEFAULT_MESSAGE);
-			} else {
-				setWarningMessage(warningMessages.peek());
-			}
-		} else {
-			setErrorMessage(errorMessages.peek());
-		}
-	}
-
-	/**
-	 * Displays the message and an error icon.
-	 *
-	 * @param message
-	 *            the error message to display
-	 */
-	public void setErrorMessage(String message) {
-		titleIcon.setIcon(Icons.severeIcon);
-		titleMessage.setText(message);
-	}
-
-	protected boolean validatePortNames() {
-		boolean isValid = true;
-		Range columnRange = SpreadsheetUtils.getRange(newConfiguration.get("columnRange"));
-		Map<String, String> mapping = new HashMap<>();
-		if (newConfiguration.has("columnNames")) {
-			for (JsonNode columnName : newConfiguration.get("columnNames")) {
-				mapping.put(columnName.get("column").textValue(), columnName.get("port").textValue());
-			}
-		}
-		Set<String> usedNames = new HashSet<String>();
-		for (Entry<String, String> entry : mapping.entrySet()) {
-			if (columnRange.contains(SpreadsheetUtils.getColumnIndex(entry.getKey()))) {
-				String portName = entry.getValue();
-				if (!usedNames.add(portName)) {
-					isValid = false;
-					break;
-				}
-				if (portName.matches("[A-Z]+")) {
-					if (!mapping.containsKey(portName)) {
-						int columnIndex = SpreadsheetUtils.getColumnIndex(portName);
-						if (columnRange.contains(columnIndex)) {
-							isValid = false;
-							break;
-						}
-					}
-				}
-			}
-		}
-		if (isValid) {
-			removeErrorMessage(DUPLICATE_PORT_NAME_ERROR_MESSAGE);
-		} else {
-			addErrorMessage(DUPLICATE_PORT_NAME_ERROR_MESSAGE);
-		}
-		return isValid;
-	}
-
-	protected boolean checkRowRange(String from, String to) {
-		boolean result = false;
-		try {
-			int fromRow = Integer.parseInt(from);
-			int toRow = Integer.parseInt(to);
-			if (toRow < fromRow) {
-				addErrorMessage(INCONSISTENT_ROW_MESSAGE);
-			} else {
-				removeErrorMessage(INCONSISTENT_ROW_MESSAGE);
-				result = true;
-			}
-		} catch (NumberFormatException e) {
-			logger.warn("Problem checking row range", e);
-		}
-		return result;
-	}
-
-	protected boolean checkColumnRange(int fromColumn, int toColumn) {
-		boolean result = false;
-		if (toColumn < fromColumn) {
-			addErrorMessage(INCONSISTENT_COLUMN_MESSAGE);
-		} else {
-			removeErrorMessage(INCONSISTENT_COLUMN_MESSAGE);
-			result = true;
-		}
-		return result;
-	}
-
-	/**
-	 * Adds a light gray or etched border to the top or bottom of a JComponent.
-	 *
-	 * @param component
-	 */
-	protected void addDivider(JComponent component, final int position, final boolean etched) {
-		component.setBorder(new Border() {
-			private final Color borderColor = new Color(.6f, .6f, .6f);
-
-			public Insets getBorderInsets(Component c) {
-				if (position == SwingConstants.TOP) {
-					return new Insets(5, 0, 0, 0);
-				} else {
-					return new Insets(0, 0, 5, 0);
-				}
-			}
-
-			public boolean isBorderOpaque() {
-				return false;
-			}
-
-			public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
-				if (position == SwingConstants.TOP) {
-					if (etched) {
-						g.setColor(borderColor);
-						g.drawLine(x, y, x + width, y);
-						g.setColor(Color.WHITE);
-						g.drawLine(x, y + 1, x + width, y + 1);
-					} else {
-						g.setColor(Color.LIGHT_GRAY);
-						g.drawLine(x, y, x + width, y);
-					}
-				} else {
-					if (etched) {
-						g.setColor(borderColor);
-						g.drawLine(x, y + height - 2, x + width, y + height - 2);
-						g.setColor(Color.WHITE);
-						g.drawLine(x, y + height - 1, x + width, y + height - 1);
-					} else {
-						g.setColor(Color.LIGHT_GRAY);
-						g.drawLine(x, y + height - 1, x + width, y + height - 1);
-					}
-				}
-			}
-
-		});
-	}
-
-	private void enableTable(JTable table, boolean enabled) {
-		table.setEnabled(enabled);
-		Component editor = table.getEditorComponent();
-		if (editor != null) {
-			editor.setEnabled(enabled);
-		}
-		if (enabled) {
-			table.setForeground(Color.BLACK);
-			table.getTableHeader().setForeground(Color.BLACK);
-		} else {
-			table.setForeground(Color.LIGHT_GRAY);
-			table.getTableHeader().setForeground(Color.LIGHT_GRAY);
-		}
-	}
-
-	static class UpperCaseDocument extends PlainDocument {
-        @Override
-        public void replace(int offset, int length, String text, AttributeSet attrs) throws BadLocationException {
-        	if (text.matches("[A-Za-z]+")) {
-        		text = text.toUpperCase();
-        		super.replace(offset, length, text, attrs);
-        	}
-        }
-     }
-
-	static class NumericDocument extends PlainDocument {
-        @Override
-        public void replace(int offset, int length, String text, AttributeSet attrs) throws BadLocationException {
-        	if (text.length() == 0 || text.matches("[0-9]+")) {
-        		text = text.toUpperCase();
-        		super.replace(offset, length, text, attrs);
-        	}
-        }
-     }
-
-	/**
-	 * Main method for testing the panel.
-	 *
-	 * @param args
-	 * @throws ActivityConfigurationException
-	 */
-//	public static void main(String[] args) throws ActivityConfigurationException {
-//		final JFrame frame = new JFrame();
-//		SpreadsheetImportActivity activity = new SpreadsheetImportActivity();
-//		activity.configure(new SpreadsheetImportConfiguration());
-//		final SpreadsheetImportConfigView config = new SpreadsheetImportConfigView(activity);
-//		config.setOkAction(new AbstractAction("Finish") {
-//			public void actionPerformed(ActionEvent arg0) {
-//				Range columnRange = config.getConfiguration().getColumnRange();
-//				String fromColumn = SpreadsheetUtils.getColumnLabel(columnRange.getStart());
-//				String toColumn = SpreadsheetUtils.getColumnLabel(columnRange.getEnd());
-//				System.out.printf("%s (%s) - %s (%s)", fromColumn, columnRange.getStart(),
-//						toColumn, columnRange.getEnd());
-//				frame.setVisible(false);
-//				frame.dispose();
-//			}
-//		});
-//		config.setCancelAction(new AbstractAction("Cancel") {
-//			public void actionPerformed(ActionEvent arg0) {
-//				frame.setVisible(false);
-//				frame.dispose();
-//			}
-//		});
-//		frame.add(config);
-//		frame.pack();
-//		frame.setVisible(true);
-//	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/fa8b5b3d/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualView.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualView.java b/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualView.java
deleted file mode 100644
index 2078faa..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/spreadsheet/views/SpreadsheetImportContextualView.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.spreadsheet.views;
-
-import java.awt.Frame;
-
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.spreadsheet.actions.SpreadsheetImportActivityConfigurationAction;
-import net.sf.taverna.t2.activities.spreadsheet.il8n.SpreadsheetImportUIText;
-import net.sf.taverna.t2.activities.spreadsheet.servicedescriptions.SpreadsheetImportActivityIcon;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.port.InputActivityPort;
-import uk.org.taverna.scufl2.api.port.OutputActivityPort;
-
-/**
- * A simple non editable HTML table view over a {@link SpreadsheetImportActivity}. Clicking on the
- * configure button shows the editable {@link SpreadsheetImportConfigView}
- *
- * @author David Withers
- */
-public class SpreadsheetImportContextualView extends HTMLBasedActivityContextualView {
-
-	private static final long serialVersionUID = 1L;
-	private final EditManager editManager;
-	private final FileManager fileManager;
-	private final ActivityIconManager activityIconManager;
-	private final ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private final ServiceRegistry serviceRegistry;
-
-	public SpreadsheetImportContextualView(Activity activity, EditManager editManager,
-			FileManager fileManager, ActivityIconManager activityIconManager,
-			ColourManager colourManager, ServiceDescriptionRegistry serviceDescriptionRegistry, ServiceRegistry serviceRegistry) {
-		super(activity, colourManager);
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		this.activityIconManager = activityIconManager;
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-		this.serviceRegistry = serviceRegistry;
-	}
-
-	@Override
-	protected String getRawTableRowsHtml() {
-		StringBuilder html = new StringBuilder();
-		html.append("<tr><th>");
-		html.append(SpreadsheetImportUIText
-				.getString("SpreadsheetImportContextualView.inputPortName"));
-		html.append("</th><th>");
-		html.append(SpreadsheetImportUIText.getString("SpreadsheetImportContextualView.depth"));
-		html.append("</th></tr>");
-		for (InputActivityPort port : getActivity().getInputPorts()) {
-			html.append("<tr><td>");
-			html.append(port.getName());
-			html.append("</td><td>");
-			html.append(port.getDepth());
-			html.append("</td></tr>");
-		}
-		html.append("<tr><th>");
-		html.append(SpreadsheetImportUIText
-				.getString("SpreadsheetImportContextualView.outputPortName"));
-		html.append("</th><th>");
-		html.append(SpreadsheetImportUIText.getString("SpreadsheetImportContextualView.depth"));
-		html.append("</th></tr>");
-		for (OutputActivityPort port : getActivity().getOutputPorts()) {
-			html.append("<tr><td>");
-			html.append(port.getName());
-			html.append("</td><td>");
-			html.append(port.getDepth());
-			html.append("</td></tr>");
-		}
-		return html.toString();
-	}
-
-	@Override
-	public String getViewTitle() {
-		return SpreadsheetImportUIText.getString("SpreadsheetImportContextualView.activityName");
-	}
-
-	@Override
-	public Action getConfigureAction(Frame owner) {
-		return new SpreadsheetImportActivityConfigurationAction(
-				getActivity(), owner, editManager, fileManager,
-				activityIconManager, serviceDescriptionRegistry, serviceRegistry);
-	}
-
-	@Override
-	public String getBackgroundColour() {
-		return SpreadsheetImportActivityIcon.SPREADSHEET_COLOUR_HTML;
-	}
-
-	@Override
-	public int getPreferredPosition() {
-		return 100;
-	}
-
-}


[04/50] [abbrv] incubator-taverna-workbench-common-activities git commit: Using taverna-parent

Posted by st...@apache.org.
Using taverna-parent


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/c58dcee6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/c58dcee6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/c58dcee6

Branch: refs/heads/master
Commit: c58dcee60e07f30b784bc52410b9ee91717d4fd3
Parents: ed8b3c1
Author: Christian-B <br...@cs.man.ac.uk>
Authored: Wed Sep 24 09:12:06 2014 +0100
Committer: Christian-B <br...@cs.man.ac.uk>
Committed: Wed Sep 24 09:12:06 2014 +0100

----------------------------------------------------------------------
 pom.xml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/c58dcee6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b48b4bc..53b81ee 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,12 +2,13 @@
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
-		<groupId>net.sf.taverna.t2</groupId>
-		<artifactId>ui-activities</artifactId>
-		<version>2.0-SNAPSHOT</version>
+		<groupId>net.sf.taverna</groupId>
+		<artifactId>taverna-parent</artifactId>
+		<version>3.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>net.sf.taverna.t2.ui-activities</groupId>
 	<artifactId>xpath-activity-ui</artifactId>
+	<version>2.0-SNAPSHOT</version>
 	<packaging>bundle</packaging>
 	<name>XPath Activity - UI bindings</name>
 	<dependencies>


[14/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-external-tool-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/FilePanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/FilePanel.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/FilePanel.java
deleted file mode 100644
index 678711c..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/FilePanel.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.BorderLayout;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.util.List;
-
-import javax.swing.AbstractAction;
-import javax.swing.JButton;
-import javax.swing.JComponent;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import javax.swing.border.EmptyBorder;
-
-import net.sf.taverna.t2.activities.externaltool.utils.Tools;
-import net.sf.taverna.t2.lang.ui.DeselectingButton;
-import net.sf.taverna.t2.lang.ui.ReadOnlyTextArea;
-
-/**
- * @author alanrw
- *
- */
-public class FilePanel extends JPanel {
-	
-	private int outputGridy = 1;
-	private final ExternalToolConfigView view;
-	
-	public FilePanel(final ExternalToolConfigView view,
-			final List<ExternalToolFileViewer> viewList,
-			String fileHeader, String typeHeader, final String portPrefix,
-			final String description, String addText) {
-		super();
-		this.view = view;
-		this.setLayout(new BorderLayout());
-		final JPanel fileEditPanel = new JPanel(new GridBagLayout());
-
-		final GridBagConstraints fileConstraint = new GridBagConstraints();
-		fileConstraint.insets = new Insets(5, 5, 5, 5);
-		fileConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
-		fileConstraint.gridx = 0;
-		fileConstraint.gridy = 0;
-		fileConstraint.weightx = 0.1;
-		fileConstraint.fill = GridBagConstraints.BOTH;
-		
-		final String[] elementLabels = new String[] {"Taverna port name",
-				"Use port name for file",
-				fileHeader,
-				typeHeader
-		};
-
-		fileConstraint.gridx = 0;
-		synchronized (viewList) {
-			for (ExternalToolFileViewer outputView : viewList) {
-				addFileViewer(viewList, this, fileEditPanel,
-						outputView, elementLabels);
-			}
-		}
-		JButton addFilePortButton = new DeselectingButton(addText,
-				new AbstractAction() {
-			public void actionPerformed(ActionEvent e) {
-
-				int portNumber = 1;
-
-				String name2 = portPrefix + portNumber++;
-				boolean nameExists = true;
-				while (nameExists == true) {
-					nameExists = view.portNameExists(name2);
-					if (nameExists) {
-						name2 = portPrefix + portNumber++;
-					}
-				}
-
-				ExternalToolFileViewer newViewer = new ExternalToolFileViewer(
-						name2);
-				synchronized (viewList) {
-					viewList.add(newViewer);
-					addFileViewer(viewList, FilePanel.this, fileEditPanel,
-							newViewer, elementLabels);
-					fileEditPanel.revalidate();
-					fileEditPanel.repaint();
-				}
-			}
-
-		});
-		JTextArea descriptionText = new ReadOnlyTextArea(description);
-		descriptionText.setEditable(false);
-		descriptionText.setFocusable(false);
-		descriptionText.setBorder(new EmptyBorder(5, 5, 10, 5));
-
-		this.add(descriptionText, BorderLayout.NORTH);
-
-		this.add(new JScrollPane(fileEditPanel), BorderLayout.CENTER);
-
-		JPanel buttonPanel = new JPanel(new BorderLayout());
-
-		buttonPanel.add(addFilePortButton, BorderLayout.EAST);
-
-		this.add(buttonPanel, BorderLayout.SOUTH);
-	
-	}
-	
-	private void addFileViewer(final List<ExternalToolFileViewer> viewList,
-			final JPanel outerPanel, final JPanel panel,
-			ExternalToolFileViewer viewer, String[] elementLabels) {
-		Tools.addViewer(panel,
-				elementLabels,
-				new JComponent[] {viewer.getNameField(), viewer.getValueFromField(), viewer.getValueField(), viewer.getTypeSelector()},
-				viewList,
-				viewer,
-				outerPanel);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/InvocationPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/InvocationPanel.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/InvocationPanel.java
deleted file mode 100644
index 803328b..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/InvocationPanel.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.FlowLayout;
-import java.awt.GridLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Arrays;
-import java.util.Comparator;
-
-import javax.swing.AbstractAction;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.ButtonGroup;
-import javax.swing.DefaultComboBoxModel;
-import javax.swing.DefaultListCellRenderer;
-import javax.swing.JButton;
-import javax.swing.JComboBox;
-import javax.swing.JList;
-import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-import javax.swing.JTextArea;
-import javax.swing.SwingUtilities;
-import javax.swing.border.EmptyBorder;
-
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityHealthChecker;
-import net.sf.taverna.t2.activities.externaltool.configuration.ToolInvocationConfiguration;
-import net.sf.taverna.t2.activities.externaltool.manager.InvocationGroup;
-import net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupAddedEvent;
-import net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupRemovedEvent;
-import net.sf.taverna.t2.activities.externaltool.manager.InvocationManagerEvent;
-import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanism;
-import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismAddedEvent;
-import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismRemovedEvent;
-import net.sf.taverna.t2.activities.externaltool.manager.ToolInvocationConfigurationPanel;
-import net.sf.taverna.t2.activities.externaltool.manager.impl.InvocationGroupManagerImpl;
-import net.sf.taverna.t2.lang.observer.Observable;
-import net.sf.taverna.t2.lang.observer.Observer;
-import net.sf.taverna.t2.lang.ui.DeselectingButton;
-import net.sf.taverna.t2.workbench.ui.impl.configuration.ui.T2ConfigurationFrame;
-
-import org.apache.log4j.Logger;
-
-/**
- * @author alanrw
- *
- */
-public class InvocationPanel extends JPanel implements Observer<InvocationManagerEvent> {
-	
-	private static final String LOCATION_DESCRIPTION = ToolInvocationConfigurationPanel.HEADER_TEXT;
-	private final JComboBox mechanismSelection;
-	private final JComboBox groupSelection;
-	
-	private DefaultComboBoxModel mechanismSelectionModel = new DefaultComboBoxModel();
-	private DefaultComboBoxModel groupSelectionModel = new DefaultComboBoxModel();
-
-	private static InvocationGroupManagerImpl manager = InvocationGroupManagerImpl.getInstance();
-	
-	private static Logger logger = Logger
-	.getLogger(InvocationPanel.class);
-	
-	private JRadioButton unmanagedLocation;
-	private JRadioButton groupSelected;
-	private JRadioButton mechanismSelected;
-	private JButton manageInvocation;
-	private ButtonGroup mechanismOrGroup;
-	private ExternalToolActivityConfigurationBean configuration;
-	
-	private ActionListener radioChangeListener;
-	
-	boolean unmanagedShown = false;
-
-	public InvocationPanel(ExternalToolActivityConfigurationBean configuration) {
-		super();
-		manager.addObserver(this);
-		
-		mechanismSelection = new JComboBox();
-		populateMechanismList();
-		mechanismSelection.setModel(mechanismSelectionModel);
-		
-		groupSelection = new JComboBox();
-		populateGroupList();
-		groupSelection.setModel(groupSelectionModel);
-		populateInvocationPanel(configuration);
-		
-		radioChangeListener = new AbstractAction() {
-
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				if (unmanagedShown && unmanagedLocation.isSelected()) {
-					setUnmanagedLocationSelectability(true);
-					setMechanismSelectability(false);
-					setGroupSelectability(false);
-					return;
-				}
-				if (mechanismSelected.isSelected()) {
-					if (unmanagedShown) {
-						setUnmanagedLocationSelectability(false);
-					}
-					setMechanismSelectability(true);
-					setGroupSelectability(false);
-					return;
-				}
-				if (unmanagedShown) {
-					setUnmanagedLocationSelectability(false);
-				}
-				setMechanismSelectability(false);
-				setGroupSelectability(true);
-				return;			}
-			
-		};
-		if (unmanagedShown) {
-			unmanagedLocation.addActionListener(radioChangeListener);
-		}
-		groupSelected.addActionListener(radioChangeListener);
-		mechanismSelected.addActionListener(radioChangeListener);
-	}
-	
-	private void populateMechanismList() {
-		InvocationMechanism currentSelection = (InvocationMechanism) mechanismSelection.getSelectedItem();
-		InvocationMechanism[] mechanisms = InvocationGroupManagerImpl.getInstance()
-				.getMechanisms().toArray(new InvocationMechanism[] {});
-		Arrays.sort(mechanisms, new Comparator<InvocationMechanism>() {
-
-			@Override
-			public int compare(InvocationMechanism arg0, InvocationMechanism arg1) {
-				return arg0.getName().compareTo(
-						arg1.getName());
-			}
-		});
-		mechanismSelectionModel.removeAllElements();
-		for (InvocationMechanism mechanism : mechanisms) {
-			mechanismSelectionModel.addElement(mechanism);
-			logger.info("Added mechanism " + mechanism.hashCode());
-		}
-		if (currentSelection != null) {
-			mechanismSelection.setSelectedItem(currentSelection);
-		}
-		
-	}
-
-	private void populateGroupList() {
-		InvocationGroup currentSelection = (InvocationGroup) groupSelection.getSelectedItem();
-		InvocationGroup[] groups = InvocationGroupManagerImpl.getInstance()
-				.getInvocationGroups().toArray(new InvocationGroup[] {});
-		Arrays.sort(groups, new Comparator<InvocationGroup>() {
-
-			@Override
-			public int compare(InvocationGroup arg0, InvocationGroup arg1) {
-				return arg0.getName().compareTo(
-						arg1.getName());
-			}
-		});
-		groupSelectionModel.removeAllElements();
-		for (InvocationGroup group : groups) {
-			groupSelectionModel.addElement(group);
-			logger.info("Added group " + group.hashCode());
-		}
-		if (currentSelection != null) {
-			groupSelection.setSelectedItem(currentSelection);
-		}
-		
-	}
-
-	
-	private void populateInvocationPanel(ExternalToolActivityConfigurationBean configuration) {
-		this.configuration = configuration;
-		this.removeAll();
-		this.setLayout(new BorderLayout());
-
-		JTextArea descriptionText = new JTextArea(
-				LOCATION_DESCRIPTION);
-		descriptionText.setEditable(false);
-		descriptionText.setFocusable(false);
-		descriptionText.setBorder(new EmptyBorder(5, 5, 10, 5));
-		descriptionText.setLineWrap(true);
-		descriptionText.setWrapStyleWord(true);
-		descriptionText.setRows(3);
-		this.add(descriptionText, BorderLayout.NORTH);
-		
-		JPanel innerPanel = new JPanel(new BorderLayout());
-		
-		mechanismOrGroup = new ButtonGroup();
-
-		JPanel subPanel = new JPanel(new GridLayout(4,1));
-		
-		if (isUnmanaged(configuration)) {
-			createUnmanagedLocation(subPanel);
-			unmanagedShown = true;
-		}
-		
-		subPanel.add(createMechanismPanel());
-		
-		subPanel.add(createGroupPanel());
-		
-		subPanel.add(createButtonPanel());
-		
-		innerPanel.add(subPanel, BorderLayout.NORTH);
-		innerPanel.add(new JPanel(), BorderLayout.CENTER);
-		
-		initializeSelectability();
-		this.add(innerPanel, BorderLayout.CENTER);
-		this.repaint();
-	}
-
-	private boolean isUnmanaged(
-			ExternalToolActivityConfigurationBean configuration2) {
-		return (!ExternalToolActivityHealthChecker.updateLocation(configuration2));
-	}
-
-	private void initializeSelectability() {
-		if (isUnmanaged(configuration)) {
-			unmanagedLocation.setSelected(true);
-			setUnmanagedLocationSelectability(true);
-			setMechanismSelectability(false);
-			setGroupSelectability(false);
-			return;
-		}
-		if (configuration.getInvocationGroup() == null) {
-			mechanismSelected.setSelected(true);
-			if (unmanagedShown) {
-				setUnmanagedLocationSelectability(false);
-			}
-			setMechanismSelectability(true);
-			setGroupSelectability(false);
-			return;
-		}
-		groupSelected.setSelected(true);
-		if (unmanagedShown) {
-			setUnmanagedLocationSelectability(false);
-		}
-		setMechanismSelectability(false);
-		setGroupSelectability(true);
-		return;
-	}
-
-	private void setGroupSelectability(boolean b) {
-		groupSelection.setEnabled(b);
-	}
-
-	private void setMechanismSelectability(boolean b) {
-		mechanismSelection.setEnabled(b);
-	}
-
-	private void setUnmanagedLocationSelectability(boolean b) {
-		// Nothing to do
-	}
-
-	private JPanel createGroupPanel() {
-		JPanel groupPanel = new JPanel(new BorderLayout());
-		
-		JPanel groupSelectionPanel = new JPanel(new GridLayout(1, 2));
-		groupSelected = new JRadioButton("Select a symbolic location");
-		mechanismOrGroup.add(groupSelected);
-		groupSelected.setBorder(new EmptyBorder(10, 10, 10, 10));
-		groupSelectionPanel.add(groupSelected);
-
-		groupSelection.setRenderer(new DefaultListCellRenderer() {
-
-			@Override
-			public Component getListCellRendererComponent(JList arg0,
-					Object arg1, int arg2, boolean arg3, boolean arg4) {
-				if (arg1 instanceof InvocationGroup) {
-					return super.getListCellRendererComponent(arg0,
-							((InvocationGroup) arg1).getName(),
-							arg2, arg3, arg4);
-				}
-				return super.getListCellRendererComponent(arg0, arg1, arg2,
-						arg3, arg4);
-			}
-		});
-
-		groupSelectionPanel.add(groupSelection); 
-
-		groupPanel.add(groupSelectionPanel, BorderLayout.CENTER);
-		
-		if (configuration.getInvocationGroup() != null) {
-			groupSelection.setSelectedItem(configuration.getInvocationGroup());
-		} else {
-			groupSelection.setSelectedItem(manager.getDefaultGroup());
-		}
-
-		return groupPanel;
-	}
-
-	private JPanel createMechanismPanel() {
-		JPanel mechanismPanel = new JPanel(new BorderLayout());
-		JPanel mechanismSelectionPanel = new JPanel(new GridLayout(1, 3));
-		mechanismSelected = new JRadioButton("Select an explicit location");
-		mechanismOrGroup.add(mechanismSelected);
-		mechanismSelected.setBorder(new EmptyBorder(10, 10, 10, 10));
-		mechanismSelectionPanel.add(mechanismSelected);
-
-		mechanismSelection.setRenderer(new DefaultListCellRenderer() {
-
-			@Override
-			public Component getListCellRendererComponent(JList arg0,
-					Object arg1, int arg2, boolean arg3, boolean arg4) {
-				if (arg1 instanceof InvocationMechanism) {
-					return super.getListCellRendererComponent(arg0,
-							((InvocationMechanism) arg1).getName(),
-							arg2, arg3, arg4);
-				}
-				return super.getListCellRendererComponent(arg0, arg1, arg2,
-						arg3, arg4);
-			}
-		});
-
-		mechanismSelectionPanel.add(mechanismSelection);
-
-		mechanismPanel.add(mechanismSelectionPanel, BorderLayout.CENTER);
-		if (configuration.getMechanism() != null) {
-			mechanismSelection.setSelectedItem(configuration.getMechanism());
-		} else {
-			mechanismSelection.setSelectedItem(manager.getDefaultMechanism());
-		}
-		return mechanismPanel;
-
-	}
-	
-	private JPanel createButtonPanel() {
-		JPanel buttonPanel = new JPanel(new FlowLayout());
-		manageInvocation = new DeselectingButton("Manage locations",
-				new AbstractAction() {
-
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				T2ConfigurationFrame.showConfiguration(ToolInvocationConfiguration.getInstance().getDisplayName());
-			}});
-		buttonPanel.add(manageInvocation); 
-		return buttonPanel;		
-	}
-
-	private void createUnmanagedLocation(JPanel subPanel) {
-		unmanagedLocation = new JRadioButton("Continue using unmanaged location");
-		subPanel.add(unmanagedLocation);
-		mechanismOrGroup.add(unmanagedLocation);
-	}
-
-	private void handleInvocationManagerMessage(InvocationManagerEvent message) {
-		if (message instanceof InvocationMechanismRemovedEvent) {
-			InvocationMechanism removedMechanism = ((InvocationMechanismRemovedEvent) message).getRemovedMechanism();
-			InvocationMechanism replacementMechanism = ((InvocationMechanismRemovedEvent) message).getReplacementMechanism();
-			if (mechanismSelection.getSelectedItem().equals(removedMechanism)) {
-				mechanismSelection.setSelectedItem(replacementMechanism);
-			}
-			mechanismSelectionModel.removeElement(removedMechanism);
-		} else if (message instanceof InvocationMechanismAddedEvent) {
-			populateMechanismList();
-		}
-		else if (message instanceof InvocationGroupRemovedEvent) {
-			InvocationGroup removedGroup = ((InvocationGroupRemovedEvent) message).getRemovedGroup();
-			InvocationGroup replacementGroup = ((InvocationGroupRemovedEvent) message).getReplacementGroup();
-			if (groupSelection.getSelectedItem().equals(removedGroup)) {
-				groupSelection.setSelectedItem(replacementGroup);
-			}
-			groupSelectionModel.removeElement(removedGroup);
-		} else if (message instanceof InvocationGroupAddedEvent) {
-			populateGroupList();
-		}	
-	}
-	
-	@Override
-	public void notify(Observable<InvocationManagerEvent> sender,
-			final InvocationManagerEvent message) throws Exception {
-		if (SwingUtilities.isEventDispatchThread()) {
-			handleInvocationManagerMessage(message);
-		} else {
-			SwingUtilities.invokeLater(new Runnable() {
-				public void run() {
-					handleInvocationManagerMessage(message);
-				}
-			});
-		}	}
-
-	public void fillInConfiguration(
-			ExternalToolActivityConfigurationBean newConfiguration) {
-		if (unmanagedShown && unmanagedLocation.isSelected()) {
-			return;
-		}
-		if (mechanismSelected.isSelected()) {
-			newConfiguration.setMechanism((InvocationMechanism) mechanismSelection.getSelectedItem());
-			return;
-		}
-		newConfiguration.setInvocationGroup((InvocationGroup) groupSelection.getSelectedItem());	
-	}
-
-	public void stopObserving() {
-		manager.removeObserver(this);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/LoadDescriptionAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/LoadDescriptionAction.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/LoadDescriptionAction.java
deleted file mode 100644
index 7f0d82f..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/LoadDescriptionAction.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.event.ActionEvent;
-import java.io.IOException;
-import java.io.StringBufferInputStream;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import javax.swing.AbstractAction;
-import javax.swing.JOptionPane;
-
-import net.sf.taverna.t2.lang.ui.FileTools;
-
-import org.jdom.Document;
-import org.jdom.JDOMException;
-
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseEnumeration;
-
-final class LoadDescriptionAction extends AbstractAction {
-	/**
-	 * 
-	 */
-	private final ScriptPanel scriptPanel;
-	private final ExternalToolConfigView view;
-
-	LoadDescriptionAction(ScriptPanel scriptPanel, ExternalToolConfigView view) {
-		this.scriptPanel = scriptPanel;
-		this.view = view;
-	}
-
-	public void actionPerformed(ActionEvent e) {
-		String descriptionsString = FileTools.readStringFromFile(
-				this.scriptPanel, "Load tool description",
-				".xml");
-		if (descriptionsString != null) {
-			String errorMessage = null;
-			try {
-				Document doc = ScriptPanel.builder
-						.build(new StringReader(descriptionsString));
-				List<UseCaseDescription> descriptions = UseCaseEnumeration.readDescriptionsFromStream(new StringBufferInputStream(descriptionsString));
-				if (descriptions.isEmpty()) {
-					JOptionPane.showMessageDialog(this.scriptPanel, "No tool descriptions found", "File content", JOptionPane.ERROR_MESSAGE);
-					return;
-				}
-				
-				if (descriptions.size() == 1) {
-					view.getConfiguration().setUseCaseDescription(descriptions.get(0));
-					view.refreshConfiguration(view.getConfiguration());
-					return;
-				}
-				
-				List<String> descriptionNames = new ArrayList();
-				for (UseCaseDescription ud : descriptions) {
-					descriptionNames.add(ud.getUsecaseid());
-				}
-				Collections.sort(descriptionNames);
-				String chosenName = (String) JOptionPane.showInputDialog(this.scriptPanel, "Please select a tool description",
-						"Select tool description", JOptionPane.PLAIN_MESSAGE, null, descriptionNames.toArray(), descriptionNames.get(0));
-				if (chosenName != null) {
-					for (UseCaseDescription ud : descriptions) {
-						if (ud.getUsecaseid().equals(chosenName)) {
-							view.getConfiguration().setUseCaseDescription(ud);
-							view.refreshConfiguration(view.getConfiguration());
-							return;
-							
-						}
-					}
-				}
-			} catch (JDOMException e1) {
-				errorMessage = e1.getMessage();
-			} catch (IOException e1) {
-				errorMessage = e1.getMessage();
-			} catch (Exception e1) {
-				errorMessage = e1.getMessage();
-			}
-			if (errorMessage != null) {
-				JOptionPane.showMessageDialog(null, errorMessage,
-						"Tool description load error",
-						JOptionPane.ERROR_MESSAGE);
-			}
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/SaveDescriptionAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/SaveDescriptionAction.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/SaveDescriptionAction.java
deleted file mode 100644
index 31266b4..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/SaveDescriptionAction.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.Component;
-import java.awt.event.ActionEvent;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.prefs.Preferences;
-
-import javax.swing.AbstractAction;
-import javax.swing.JFileChooser;
-import javax.swing.JOptionPane;
-
-import net.sf.taverna.t2.lang.ui.ExtensionFileFilter;
-import net.sf.taverna.t2.lang.ui.FileTools;
-
-import org.apache.log4j.Logger;
-import org.jdom.Element;
-import org.jdom.output.Format;
-import org.jdom.output.XMLOutputter;
-
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseEnumeration;
-
-final class SaveDescriptionAction extends AbstractAction {
-	/**
-	 * 
-	 */
-	private final ScriptPanel scriptPanel;
-	private final ExternalToolConfigView view;
-	
-	private static Logger logger = Logger.getLogger(SaveDescriptionAction.class);
-
-	private static XMLOutputter outputter = new XMLOutputter(Format
-			.getPrettyFormat());
-
-	SaveDescriptionAction(ScriptPanel scriptPanel, ExternalToolConfigView view) {
-		this.scriptPanel = scriptPanel;
-		this.view = view;
-	}
-
-	public void actionPerformed(ActionEvent e) {
-		UseCaseDescription currentDescription = view.makeConfiguration().getUseCaseDescription();
-		String usecaseid = currentDescription.getUsecaseid();
-		String description = currentDescription.getDescription();
-		String group = currentDescription.getGroup();
-		if ((usecaseid == null) || usecaseid.isEmpty() || (description == null) || description.isEmpty() || (group == null) || group.isEmpty()) {
-			JOptionPane.showMessageDialog(view, "Please fill in the tool annotation and\nthen re-export the description", "Missing annotation", JOptionPane.PLAIN_MESSAGE, null);
-			view.showAnnotationPanel();
-		} else {
-		saveStringToFile(this.scriptPanel,
-				"Save tool description", ".xml", currentDescription);
-		}
-	}
-	
-	public static boolean saveStringToFile(Component parent, String dialogTitle, String extension, UseCaseDescription description) {
-		JFileChooser fileChooser = new JFileChooser();
-		fileChooser.setDialogTitle(dialogTitle);
-
-		fileChooser.resetChoosableFileFilters();
-		fileChooser.setAcceptAllFileFilterUsed(true);
-		
-		fileChooser.setFileFilter(new ExtensionFileFilter(new String[] { extension }));
-
-		Preferences prefs = Preferences.userNodeForPackage(FileTools.class);
-		String curDir = prefs
-				.get("currentDir", System.getProperty("user.home"));
-		fileChooser.setCurrentDirectory(new File(curDir));
-
-		boolean tryAgain = true;
-		while (tryAgain) {
-			tryAgain = false;
-			int returnVal = fileChooser.showSaveDialog(parent);
-			if (returnVal == JFileChooser.APPROVE_OPTION) {
-				prefs.put("currentDir", fileChooser.getCurrentDirectory()
-						.toString());
-				File file = fileChooser.getSelectedFile();
-				if (!file.getName().contains(".")) {
-					String newName = file.getName() + extension;
-					file = new File(file.getParentFile(), newName);
-				}
-
-				// TODO: Open in separate thread to avoid hanging UI
-				try {
-					List<UseCaseDescription> currentDescriptions;
-					if (file.exists()) {
-						currentDescriptions = UseCaseEnumeration.readDescriptionsFromStream(new FileInputStream(file));
-					} else {
-						currentDescriptions = new ArrayList<UseCaseDescription>();
-					}
-					Element overallElement = new Element("usecases");
-					for (UseCaseDescription ud : currentDescriptions) {
-						if (!ud.getUsecaseid().equals(description.getUsecaseid())) {
-							overallElement.addContent(ud.writeToXMLElement());
-						}
-					}
-
-					overallElement.addContent(description.writeToXMLElement());
-					BufferedWriter out = new BufferedWriter(new FileWriter(file));
-			        out.write(outputter.outputString(overallElement));
-			        out.close();
-					logger.info("Saved content by overwriting " + file);
-					return true;
-				} catch (IOException ex) {
-					logger.warn("Could not save content to " + file, ex);
-					JOptionPane.showMessageDialog(parent,
-							"Could not save to " + file + ": \n\n"
-									+ ex.getMessage(), "Warning",
-							JOptionPane.WARNING_MESSAGE);
-					return false;
-				}
-			}
-		}
-		return false;
-	}
-	
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ScriptPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ScriptPanel.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ScriptPanel.java
deleted file mode 100644
index ba15219..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ScriptPanel.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.BorderLayout;
-import java.awt.FlowLayout;
-import java.awt.GridLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.IOException;
-
-import javax.swing.AbstractAction;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JTextArea;
-import javax.swing.JTextField;
-import javax.swing.border.EmptyBorder;
-import javax.swing.text.JTextComponent;
-
-import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
-import net.sf.taverna.t2.lang.ui.DeselectingButton;
-import net.sf.taverna.t2.lang.ui.LineEnabledTextPanel;
-
-import org.jdom.input.SAXBuilder;
-
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseEnumeration;
-
-
-/**
- * @author alanrw
- *
- */
-public class ScriptPanel extends JPanel {
-	
-	private static final String SCRIPT_DESCRIPTION = "Specify the commands that you want to run. You can use data arriving at an input port to replace parts of the command or to write to a file. You can also take data written to a file and send it to an output port.";
-	static SAXBuilder builder = new SAXBuilder();
-	private final JTextComponent scriptTextArea;
-	
-	public ScriptPanel(final ExternalToolConfigView view, JTextComponent scriptTextArea, JCheckBox stdInCheckBox, JCheckBox stdOutCheckBox, JCheckBox stdErrCheckBox, JTextField returnCodesField) {
-		super();
-		this.setLayout(new BorderLayout());
-	
-		JTextArea descriptionText = new JTextArea(
-				SCRIPT_DESCRIPTION);
-		descriptionText.setEditable(false);
-		descriptionText.setFocusable(false);
-		descriptionText.setBorder(new EmptyBorder(5, 5, 10, 5));
-		descriptionText.setLineWrap(true);
-		descriptionText.setWrapStyleWord(true);
-		this.add(descriptionText, BorderLayout.NORTH);
-
-		this.scriptTextArea = scriptTextArea;
-		
-		this.add(new LineEnabledTextPanel(scriptTextArea),
-				BorderLayout.CENTER);
-		
-
-		UseCaseDescription useCaseDescription = view.getConfiguration().getUseCaseDescription();
-		stdInCheckBox.setSelected(useCaseDescription.isIncludeStdIn());
-		stdOutCheckBox.setSelected(useCaseDescription.isIncludeStdOut());
-		stdErrCheckBox.setSelected(useCaseDescription.isIncludeStdErr());
-		returnCodesField.setText(useCaseDescription.getReturnCodesAsText());
-		
-		JPanel codesPanel = new JPanel(new FlowLayout());
-		codesPanel.add(new JLabel("Valid return codes:"));
-		codesPanel.add(returnCodesField);
-
-		JPanel streamPanel = new JPanel(new FlowLayout());
-		streamPanel.add(stdInCheckBox);
-		streamPanel.add(stdOutCheckBox);
-		streamPanel.add(stdErrCheckBox);
-
-		JPanel buttonPanel = new JPanel(new FlowLayout());
-		if (view.isOriginallyFromRepository()) {
-			JButton revertButton = new DeselectingButton("Revert to original description",
-					new AbstractAction(){
-
-				@Override
-				public void actionPerformed(ActionEvent e) {
-					ExternalToolActivityConfigurationBean bean = view.makeConfiguration();
-					String repositoryUrl = bean.getRepositoryUrl();
-					String id = bean.getExternaltoolid();
-					UseCaseDescription usecase = null;
-					try {
-						usecase = UseCaseEnumeration.readDescriptionFromUrl(
-							repositoryUrl, id);
-					}
-					catch (IOException ex) {
-						// Already logged
-					}
-					if (usecase != null) {
-						bean.setUseCaseDescription(usecase);
-						view.setEditable(false, bean);
-					} else {
-						JOptionPane.showMessageDialog(view, "Unable to find tool description " + id, "Missing tool description", JOptionPane.ERROR_MESSAGE);
-					}
-				}});
-			revertButton.setToolTipText("Revert to the tool description from the repository");
-			buttonPanel.add(revertButton);
-		}
-		JButton loadScriptButton = new DeselectingButton("Load description",
-				new LoadDescriptionAction(this, view));
-		loadScriptButton.setToolTipText("Load tool description from a file");
-
-		JButton saveScriptButton = new DeselectingButton("Export description",
-				new SaveDescriptionAction(this, view));
-		saveScriptButton.setToolTipText("Export the tool description to a file");
-
-		JButton clearScriptButton = new DeselectingButton("Clear script",
-				new AbstractAction() {
-
-			public void actionPerformed(ActionEvent e) {
-				clearScript();
-			}
-
-		});
-		clearScriptButton.setToolTipText("Clear the script from the edit area");
-
-		buttonPanel.add(loadScriptButton);
-		buttonPanel.add(saveScriptButton);
-		buttonPanel.add(clearScriptButton);
-
-		JPanel subPanel = new JPanel(new GridLayout(3,1));
-		subPanel.add(codesPanel);
-		subPanel.add(streamPanel);
-		subPanel.add(buttonPanel);
-
-		this.add(subPanel, BorderLayout.SOUTH);
-	}
-
-	/**
-	 * Method for clearing the script
-	 * 
-	 */
-	private void clearScript() {
-		if (JOptionPane.showConfirmDialog(this,
-				"Do you really want to clear the tool description?",
-				"Clearing the tool description", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
-			scriptTextArea.setText("");
-		}
-
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticStringPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticStringPanel.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticStringPanel.java
deleted file mode 100644
index 885cab5..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticStringPanel.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.BorderLayout;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.util.List;
-
-import javax.swing.AbstractAction;
-import javax.swing.JButton;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import javax.swing.JTextField;
-import javax.swing.border.EmptyBorder;
-
-import net.sf.taverna.t2.activities.externaltool.utils.Tools;
-import net.sf.taverna.t2.lang.ui.DeselectingButton;
-import net.sf.taverna.t2.lang.ui.ReadOnlyTextArea;
-
-/**
- * @author alanrw
- *
- */
-public class StaticStringPanel extends JPanel {
-	
-	private static final String STATIC_STRING_DESCRIPTION = "A fixed string can be written to the specified file.";
-	private final List<ExternalToolStaticStringViewer> staticStringViewList;
-	
-	int staticGridy = 1;
-	
-	private static String[] elementLabels = new String[] {"String to copy", "To file"};
-	
-	public StaticStringPanel(final List<ExternalToolStaticStringViewer> staticStringViewList) {
-		super(new BorderLayout());
-		this.staticStringViewList = staticStringViewList;
-		final JPanel staticEditPanel = new JPanel(new GridBagLayout());
-
-		final GridBagConstraints staticConstraint = new GridBagConstraints();
-		staticConstraint.insets = new Insets(5, 5, 5, 5);
-		staticConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
-		staticConstraint.gridx = 0;
-		staticConstraint.gridy = 0;
-		staticConstraint.weightx = 0.1;
-		staticConstraint.fill = GridBagConstraints.BOTH;
-
-		staticConstraint.gridx = 0;
-		synchronized (staticStringViewList) {
-			for (ExternalToolStaticStringViewer staticView : staticStringViewList) {
-				addStaticStringViewer(StaticStringPanel.this, staticEditPanel,
-						staticView);
-			}
-		}
-
-		JTextArea descriptionText = new ReadOnlyTextArea(
-				STATIC_STRING_DESCRIPTION);
-		descriptionText.setEditable(false);
-		descriptionText.setFocusable(false);
-		descriptionText.setBorder(new EmptyBorder(5, 5, 10, 5));
-		this.add(descriptionText, BorderLayout.NORTH);
-
-		this.add(new JScrollPane(staticEditPanel),
-				BorderLayout.CENTER);
-		JButton addStaticStringButton = new DeselectingButton("Add string",
-				new AbstractAction() {
-			// FIXME refactor this into a method
-			public void actionPerformed(ActionEvent e) {
-
-				ExternalToolStaticStringViewer newViewer = new ExternalToolStaticStringViewer();
-				synchronized (staticStringViewList) {
-					staticStringViewList.add(newViewer);
-					addStaticStringViewer(StaticStringPanel.this, staticEditPanel,
-							newViewer);
-					staticEditPanel.revalidate();
-					staticEditPanel.repaint();
-				}
-			}
-
-		});
-
-		JPanel buttonPanel = new JPanel(new BorderLayout());
-
-		buttonPanel.add(addStaticStringButton, BorderLayout.EAST);
-
-		this.add(buttonPanel, BorderLayout.SOUTH);
-	
-	}
-	
-	private void addStaticStringViewer(final JPanel outerPanel,
-			final JPanel panel, ExternalToolStaticStringViewer viewer) {
-		Tools.addViewer(panel,
-				elementLabels,
-				new JComponent[] {new JScrollPane(viewer.getContentField()), viewer.getValueField()},
-				staticStringViewList,
-				viewer,
-				outerPanel);
-	}
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticUrlPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticUrlPanel.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticUrlPanel.java
deleted file mode 100644
index ba441f4..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticUrlPanel.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.BorderLayout;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.util.List;
-
-import javax.swing.AbstractAction;
-import javax.swing.JButton;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import javax.swing.JTextField;
-import javax.swing.border.EmptyBorder;
-
-import net.sf.taverna.t2.activities.externaltool.utils.Tools;
-import net.sf.taverna.t2.lang.ui.DeselectingButton;
-import net.sf.taverna.t2.lang.ui.ReadOnlyTextArea;
-
-/**
- * @author alanrw
- *
- */
-public class StaticUrlPanel extends JPanel {
-	
-	private static final String STATIC_URL_DESCRIPTION = "The data at a URL can be downloaded and stored in the specified file.";
-	private final List<ExternalToolStaticUrlViewer> staticUrlViewList;
-	private int staticGridy = 1;
-
-	private static String[] elementLabels = new String[] {"Copy from URL", "To file"};
-	
-
-	public StaticUrlPanel(final List<ExternalToolStaticUrlViewer> staticUrlViewList) {
-	
-	super(new BorderLayout());
-	this.staticUrlViewList = staticUrlViewList;
-	final JPanel staticEditPanel = new JPanel(new GridBagLayout());
-
-	final GridBagConstraints staticConstraint = new GridBagConstraints();
-	staticConstraint.insets = new Insets(5, 5, 5, 5);
-	staticConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
-	staticConstraint.gridx = 0;
-	staticConstraint.gridy = 0;
-	staticConstraint.weightx = 0.1;
-	staticConstraint.fill = GridBagConstraints.BOTH;
-
-	staticConstraint.gridx = 0;
-	synchronized (staticUrlViewList) {
-		for (ExternalToolStaticUrlViewer staticView : staticUrlViewList) {
-			addStaticUrlViewer(this, staticEditPanel,
-					staticView);
-		}
-	}
-
-	this.add(new JScrollPane(staticEditPanel),
-			BorderLayout.CENTER);
-
-	JTextArea descriptionText = new ReadOnlyTextArea(
-			STATIC_URL_DESCRIPTION);
-	descriptionText.setEditable(false);
-	descriptionText.setFocusable(false);
-	descriptionText.setBorder(new EmptyBorder(5, 5, 10, 5));
-
-	this.add(descriptionText, BorderLayout.NORTH);
-
-	JButton addstaticPortButton = new DeselectingButton("Add URL",
-			new AbstractAction() {
-		// FIXME refactor this into a method
-		public void actionPerformed(ActionEvent e) {
-
-			ExternalToolStaticUrlViewer newViewer = new ExternalToolStaticUrlViewer();
-			synchronized (staticUrlViewList) {
-				staticUrlViewList.add(newViewer);
-				addStaticUrlViewer(StaticUrlPanel.this, staticEditPanel,
-						newViewer);
-				staticEditPanel.revalidate();
-				staticEditPanel.repaint();
-			}
-		}
-
-	});
-	JPanel buttonPanel = new JPanel(new BorderLayout());
-
-	buttonPanel.add(addstaticPortButton, BorderLayout.EAST);
-
-	this.add(buttonPanel, BorderLayout.SOUTH);
-
-	}
-	
-	private void addStaticUrlViewer(final JPanel outerPanel,
-			final JPanel panel, ExternalToolStaticUrlViewer viewer) {
-		Tools.addViewer(panel,
-				elementLabels,
-				new JComponent[] {viewer.getContentField(), viewer.getValueField()},
-				staticUrlViewList,
-				viewer,
-				outerPanel);
-	}
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StringReplacementPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StringReplacementPanel.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StringReplacementPanel.java
deleted file mode 100644
index 1f85d3a..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StringReplacementPanel.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.util.List;
-
-import javax.swing.AbstractAction;
-import javax.swing.BorderFactory;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import javax.swing.JTextField;
-import javax.swing.border.CompoundBorder;
-import javax.swing.border.EmptyBorder;
-
-import net.sf.taverna.t2.activities.externaltool.manager.ssh.ExternalToolSshNodeViewer;
-import net.sf.taverna.t2.activities.externaltool.utils.Tools;
-import net.sf.taverna.t2.lang.ui.DeselectingButton;
-
-/**
- * @author alanrw
- *
- */
-public class StringReplacementPanel extends JPanel {
-	
-	private static final String STRING_REPLACEMENT_DESCRIPTION = "You can use a string replacement to " +
-	"feed data into the service via an input port and have that data replace part of the " +
-	"command.";
-	private final List<ExternalToolStringReplacementViewer> stringReplacementViewList;
-	private int stringReplacementGridy = 1;
-	private final ExternalToolConfigView view;
-	
-	private static Insets insets = new Insets(1,5,1,5);
-	
-	private static String[] elementLabels = new String[] {"Taverna port name", "Replace port name", "String to replace"};
-	
-	private static CompoundBorder border = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,5,5,5), BorderFactory.createLineBorder(Color.BLACK, 1));
-
-	
-	public StringReplacementPanel(final ExternalToolConfigView view, final List<ExternalToolStringReplacementViewer> stringReplacementViewList) {
-		super(new BorderLayout());
-		this.view = view;
-		this.stringReplacementViewList = stringReplacementViewList;
-
-		final JPanel inputEditPanel = new JPanel(new GridBagLayout());
-
-		final GridBagConstraints inputConstraint = new GridBagConstraints();
-
-		inputConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
-		inputConstraint.gridx = 0;
-		inputConstraint.gridy = 0;
-		inputConstraint.weightx = 0.1;
-		inputConstraint.fill = GridBagConstraints.BOTH;
-
-		inputConstraint.gridx = 0;
-		synchronized (stringReplacementViewList) {
-			for (ExternalToolStringReplacementViewer inputView : stringReplacementViewList) {
-				addStringReplacementViewer(this, inputEditPanel,
-						inputView, elementLabels);
-
-			}
-		}
-
-		JTextArea descriptionText = new JTextArea(
-				STRING_REPLACEMENT_DESCRIPTION);
-		descriptionText.setEditable(false);
-		descriptionText.setFocusable(false);
-		descriptionText.setBorder(new EmptyBorder(5, 5, 10, 5));
-		descriptionText.setLineWrap(true);
-		descriptionText.setWrapStyleWord(true);
-
-		this.add(descriptionText, BorderLayout.NORTH);
-		this.add(new JScrollPane(inputEditPanel),
-				BorderLayout.CENTER);
-		JButton addInputPortButton = new DeselectingButton("Add string replacement",
-				new AbstractAction() {
-
-			public void actionPerformed(ActionEvent e) {
-
-				int portNumber = 1;
-				String name2 = "in" + portNumber++;
-				boolean nameExists = true;
-				while (nameExists == true) {
-					nameExists = view.portNameExists(name2);
-					if (nameExists) {
-						name2 = "in" + portNumber++;
-					}
-				}
-
-				ExternalToolStringReplacementViewer newViewer = new ExternalToolStringReplacementViewer(
-						name2);
-				synchronized (stringReplacementViewList) {
-					stringReplacementViewList.add(newViewer);
-					addStringReplacementViewer(StringReplacementPanel.this, inputEditPanel,
-							newViewer, elementLabels);
-					inputEditPanel.revalidate();
-					inputEditPanel.repaint();
-				}
-
-			}
-
-		});
-
-		JPanel buttonPanel = new JPanel();
-		buttonPanel.setLayout(new BorderLayout());
-
-		buttonPanel.add(addInputPortButton, BorderLayout.EAST);
-
-		this.add(buttonPanel, BorderLayout.SOUTH);
-	}
-	
-	private void addStringReplacementViewer(final JPanel outerPanel,
-			final JPanel innerPanel, final ExternalToolStringReplacementViewer viewer, String[] elementLabels) {
-		Tools.addViewer(innerPanel,
-				elementLabels,
-				new JComponent[] {viewer.getNameField(), viewer.getValueFromField(), viewer.getValueField()},
-				stringReplacementViewList,
-				viewer,
-				outerPanel);
-	}
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ToolXMLPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ToolXMLPanel.java b/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ToolXMLPanel.java
deleted file mode 100644
index b49211f..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ToolXMLPanel.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.activities.externaltool.views;
-
-import java.awt.BorderLayout;
-
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-
-import net.sf.taverna.t2.renderers.impl.XMLTree;
-
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-
-/**
- * @author alanrw
- *
- */
-public class ToolXMLPanel extends JPanel {
-
-	public ToolXMLPanel(UseCaseDescription useCaseDescription) {
-		super(new BorderLayout());
-		XMLTree xmlTree = new XMLTree(useCaseDescription.writeToXMLElement());
-		this.add(new JScrollPane(xmlTree), BorderLayout.CENTER);
-	}
-
-	public void regenerateTree(UseCaseDescription useCaseDescription) {
-		this.removeAll();
-		XMLTree xmlTree = new XMLTree(useCaseDescription.writeToXMLElement());
-		this.add(new JScrollPane(xmlTree), BorderLayout.CENTER);		
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/resources/META-INF/services/net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor b/src/main/resources/META-INF/services/net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor
deleted file mode 100644
index 9307977..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor
+++ /dev/null
@@ -1,2 +0,0 @@
-net.sf.taverna.t2.activities.externaltool.manager.local.LocalInvocationMechanismEditor
-net.sf.taverna.t2.activities.externaltool.manager.ssh.SshInvocationMechanismEditor

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
deleted file mode 100644
index e94cf6e..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
+++ /dev/null
@@ -1,2 +0,0 @@
-net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolServiceProvider
-net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolTemplateServiceDescription

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
deleted file mode 100644
index db316f2..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
+++ /dev/null
@@ -1,4 +0,0 @@
-net.sf.taverna.t2.activities.externaltool.menu.ConfigureExternalToolMenuAction
-# net.sf.taverna.t2.activities.externaltool.menu.FeedbackMenuAction
-net.sf.taverna.t2.activities.externaltool.menu.AddExternalToolContextualMenuAction
-net.sf.taverna.t2.activities.externaltool.menu.AddExternalToolMenuAction

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ShutdownSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ShutdownSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ShutdownSPI
deleted file mode 100644
index e6686a0..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ShutdownSPI
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupManagerShutdownHook
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.StartupSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.StartupSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.StartupSPI
deleted file mode 100644
index 0dd97e4..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.StartupSPI
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupManagerStartupHook

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
deleted file mode 100644
index cdafd5d..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolActivityIcon

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.configuration.ConfigurationUIFactory
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.configuration.ConfigurationUIFactory b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.configuration.ConfigurationUIFactory
deleted file mode 100644
index b3d1525..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.configuration.ConfigurationUIFactory
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.externaltool.manager.ToolInvocationConfigurationUIFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
deleted file mode 100644
index ca0d30f..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.externaltool.views.ExternalToolActivityViewFactory

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/resources/META-INF/spring/external-tool-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/external-tool-activity-ui-context-osgi.xml b/src/main/resources/META-INF/spring/external-tool-activity-ui-context-osgi.xml
deleted file mode 100644
index 3d7110c..0000000
--- a/src/main/resources/META-INF/spring/external-tool-activity-ui-context-osgi.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:beans="http://www.springframework.org/schema/beans"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd
-                      http://www.springframework.org/schema/osgi
-                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
-
-	<service ref="ToolInvocationConfigurationUIFactory" interface="uk.org.taverna.configuration.ConfigurationUIFactory" />
-
-	<service ref="InvocationGroupManagerStartupHook" interface="net.sf.taverna.t2.workbench.StartupSPI" />
-
-	<service ref="ExternalToolActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
-
-	<service ref="LocalInvocationMechanismEditor" interface="net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor" />
-	<service ref="SshInvocationMechanismEditor" interface="net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor" />
-
-	<service ref="ExternalToolServiceProvider" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
-	<service ref="ExternalToolTemplateServiceDescription" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
-
-	<service ref="ConfigureExternalToolMenuAction" auto-export="interfaces" />
-	<service ref="AddExternalToolContextualMenuAction" auto-export="interfaces" />
-	<service ref="AddExternalToolMenuAction" auto-export="interfaces" />
-
-	<service ref="InvocationGroupManagerShutdownHook" interface="net.sf.taverna.t2.workbench.ShutdownSPI" />
-
-	<service ref="ExternalToolActivityViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
-
-	<list id="mechanismCreators" interface="net.sf.taverna.t2.activities.externaltool.manager.MechanismCreator" cardinality="0..N" />
-	<list id="invocationMechanismEditors" interface="net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor" cardinality="0..N" />
-
-	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
-	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
-	<reference id="menuManager" interface="net.sf.taverna.t2.ui.menu.MenuManager" />
-	<reference id="selectionManager" interface="net.sf.taverna.t2.workbench.selection.SelectionManager" />
-	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
-	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
-
-</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/resources/META-INF/spring/external-tool-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/external-tool-activity-ui-context.xml b/src/main/resources/META-INF/spring/external-tool-activity-ui-context.xml
deleted file mode 100644
index 7cf7f63..0000000
--- a/src/main/resources/META-INF/spring/external-tool-activity-ui-context.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-	<bean id="ToolInvocationConfigurationUIFactory" class="net.sf.taverna.t2.activities.externaltool.manager.ToolInvocationConfigurationUIFactory">
-		<property name="mechanismCreators" ref="mechanismCreators" />
-		<property name="invocationMechanismEditors" ref="invocationMechanismEditors" />
-	</bean>
-
-	<bean id="InvocationGroupManagerStartupHook" class="net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupManagerStartupHook" />
-
-	<bean id="ExternalToolActivityIcon" class="net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolActivityIcon">
-			<property name="colourManager" ref="colourManager" />
-	</bean>
-
-	<bean id="LocalInvocationMechanismEditor" class="net.sf.taverna.t2.activities.externaltool.manager.local.LocalInvocationMechanismEditor" />
-	<bean id="SshInvocationMechanismEditor" class="net.sf.taverna.t2.activities.externaltool.manager.ssh.SshInvocationMechanismEditor" />
-
-	<bean id="ExternalToolServiceProvider" class="net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolServiceProvider" />
-	<bean id="ExternalToolTemplateServiceDescription" class="net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolTemplateServiceDescription" />
-
-	<bean id="ConfigureExternalToolMenuAction" class="net.sf.taverna.t2.activities.externaltool.menu.ConfigureExternalToolMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="fileManager" ref="fileManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-	</bean>
-	<bean id="AddExternalToolContextualMenuAction" class="net.sf.taverna.t2.activities.externaltool.menu.AddExternalToolContextualMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="menuManager" ref="menuManager" />
-			<property name="selectionManager" ref="selectionManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-	</bean>
-	<bean id="AddExternalToolMenuAction" class="net.sf.taverna.t2.activities.externaltool.menu.AddExternalToolMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="menuManager" ref="menuManager" />
-			<property name="selectionManager" ref="selectionManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-	</bean>
-
-	<bean id="InvocationGroupManagerShutdownHook" class="net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupManagerShutdownHook" />
-
-	<bean id="ExternalToolActivityViewFactory" class="net.sf.taverna.t2.activities.externaltool.views.ExternalToolActivityViewFactory">
-			<property name="editManager" ref="editManager" />
-			<property name="fileManager" ref="fileManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="colourManager" ref="colourManager" />
-	</bean>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/src/main/resources/externaltool.png
----------------------------------------------------------------------
diff --git a/src/main/resources/externaltool.png b/src/main/resources/externaltool.png
deleted file mode 100644
index a9e84e6..0000000
Binary files a/src/main/resources/externaltool.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/pom.xml b/taverna-external-tool-activity-ui/pom.xml
new file mode 100644
index 0000000..376cd5c
--- /dev/null
+++ b/taverna-external-tool-activity-ui/pom.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>net.sf.taverna</groupId>
+    <artifactId>taverna-parent</artifactId>
+    <version>3.0.1-SNAPSHOT</version>
+  </parent>
+	<groupId>net.sf.taverna.t2.ui-activities</groupId>
+	<artifactId>external-tool-activity-ui</artifactId>
+	<name>Taverna 2 ExternalTool Activity UI</name>
+	<dependencies>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>menu-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-components</groupId>
+			<artifactId>graph-view</artifactId>
+			<version>${t2.ui.components.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-icons-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-palette-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.activities</groupId>
+			<artifactId>wsdl-activity</artifactId>
+			<version>${t2.activities.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-impl</groupId>
+			<artifactId>contextual-views-impl</artifactId>
+			<version>${t2.ui.impl.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>contextual-views-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-components</groupId>
+			<artifactId>workflow-view</artifactId>
+			<version>${t2.ui.components.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-tools</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-impl</groupId>
+			<artifactId>renderers-impl</artifactId>
+			<version>${t2.ui.impl.version}</version>
+		</dependency>
+
+		<!--  testing dependencies -->
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+                        <version>${junit.version}</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-impl</groupId>
+			<artifactId>activity-palette-impl</artifactId>
+			<version>${t2.ui.impl.version}</version>
+			<scope>test</scope>
+		</dependency>
+
+		<!-- function dependencies for invocation -->
+		<dependency>
+			<groupId>net.sf.taverna.t2.activities</groupId>
+			<artifactId>external-tool-activity</artifactId>
+			<version>${t2.activities.version}</version>
+		</dependency>
+
+	</dependencies>
+        <repositories>
+                <repository>
+                        <releases />
+                        <snapshots>
+                                <enabled>false</enabled>
+                        </snapshots>
+                        <id>mygrid-repository</id>
+                        <name>myGrid Repository</name>
+                        <url>http://www.mygrid.org.uk/maven/repository</url>
+                </repository>
+                <repository>
+                        <releases>
+                                <enabled>false</enabled>
+                        </releases>
+                        <snapshots />
+                        <id>mygrid-snapshot-repository</id>
+                        <name>myGrid Snapshot Repository</name>
+                        <url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
+                </repository>
+        </repositories>
+</project>
+

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/actions/ExternalToolActivityConfigureAction.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/actions/ExternalToolActivityConfigureAction.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/actions/ExternalToolActivityConfigureAction.java
new file mode 100644
index 0000000..398ee7c
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/actions/ExternalToolActivityConfigureAction.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (C) 2009 Hajo Nils Krabbenhoeft, INB, University of Luebeck
+ * modified 2010 Hajo Nils Krabbenhoeft, spratpix GmbH & Co. KG
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+
+package net.sf.taverna.t2.activities.externaltool.actions;
+
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+
+import javax.swing.Action;
+
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
+import net.sf.taverna.t2.activities.externaltool.views.ExternalToolConfigView;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
+
+/**
+ * This class implements an ActivityConfigurationAction to configure the ExternalToolActivity
+ * plugin. The configuration action is called "Configure UseCase invocation" and is implemented in
+ * the KnowARCConfigurationDialog inside the knowarc-usecases maven artifact.
+ *
+ * @author Hajo Nils Krabbenhoeft
+ */
+@SuppressWarnings("serial")
+public class ExternalToolActivityConfigureAction extends
+		ActivityConfigurationAction<ExternalToolActivity, ExternalToolActivityConfigurationBean> {
+
+	private final Frame owner;
+	private final EditManager editManager;
+	private final FileManager fileManager;
+
+	public ExternalToolActivityConfigureAction(ExternalToolActivity activity, Frame owner,
+			EditManager editManager, FileManager fileManager, ActivityIconManager activityIconManager) {
+		super(activity, activityIconManager);
+		this.editManager = editManager;
+		this.fileManager = fileManager;
+		putValue(Action.NAME, "Configure tool invocation");
+		this.owner = owner;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		/*
+		 * if (getActivity().getConfiguration() instanceof
+		 * RegisteredExternalToolActivityConfigurationBean) { new KnowARCConfigurationDialog(owner,
+		 * false, KnowARCConfigurationFactory.getConfiguration()).setVisible(true); } else
+		 */{
+			ActivityConfigurationDialog currentDialog = ActivityConfigurationAction
+					.getDialog(getActivity());
+			if (currentDialog != null) {
+				currentDialog.toFront();
+				return;
+			}
+			final ExternalToolConfigView externalToolConfigView = new ExternalToolConfigView(
+					(ExternalToolActivity) getActivity());
+			final ActivityConfigurationDialog<ExternalToolActivity, ExternalToolActivityConfigurationBean> dialog = new ActivityConfigurationDialog<ExternalToolActivity, ExternalToolActivityConfigurationBean>(
+					getActivity(), externalToolConfigView, editManager, fileManager);
+
+			ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/configuration/ToolInvocationConfiguration.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/configuration/ToolInvocationConfiguration.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/configuration/ToolInvocationConfiguration.java
new file mode 100644
index 0000000..0877045
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/configuration/ToolInvocationConfiguration.java
@@ -0,0 +1,57 @@
+/**
+ *
+ */
+package net.sf.taverna.t2.activities.externaltool.configuration;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import uk.org.taverna.configuration.AbstractConfigurable;
+
+
+/**
+ * @author alanrw
+ *
+ */
+public class ToolInvocationConfiguration extends AbstractConfigurable {
+
+	private static ToolInvocationConfiguration instance;
+
+	private Map<String, String> defaultPropertyMap;
+
+	public static ToolInvocationConfiguration getInstance() {
+		if (instance == null) {
+			instance = new ToolInvocationConfiguration();
+		}
+		return instance;
+	}
+
+	@Override
+	public String getCategory() {
+		return "general";
+	}
+
+	@Override
+	public Map<String, String> getDefaultPropertyMap() {
+		if (defaultPropertyMap == null) {
+			defaultPropertyMap = new HashMap<String, String>();
+		}
+		return defaultPropertyMap;
+	}
+
+	@Override
+	public String getDisplayName() {
+		return "Tool invocation";
+	}
+
+	@Override
+	public String getFilePrefix() {
+		return "ToolInvocation";
+	}
+
+	@Override
+	public String getUUID() {
+		return "B611F5C2-EB49-479E-B01A-7F3F56E6918A";
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/GroupPanel.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/GroupPanel.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/GroupPanel.java
new file mode 100644
index 0000000..8f62787
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/GroupPanel.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.externaltool.manager;
+
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import javax.swing.border.EmptyBorder;
+
+import net.sf.taverna.t2.activities.externaltool.manager.impl.InvocationGroupManagerImpl;
+
+/**
+ * UI for creating/editing dataflow input ports.
+ *
+ * @author David Withers
+ */
+public class GroupPanel extends JPanel {
+
+	private static final long serialVersionUID = 1L;
+
+	private JTextField groupNameField;
+
+	private JComboBox mechanismComboBox;
+
+	private static InvocationGroupManager manager = InvocationGroupManagerImpl.getInstance();
+
+	public GroupPanel(Object[] mechanisms) {
+		super(new GridBagLayout());
+
+		groupNameField = new JTextField();
+
+
+		setBorder(new EmptyBorder(10, 10, 10, 10));
+
+		GridBagConstraints constraints = new GridBagConstraints();
+
+		constraints.anchor = GridBagConstraints.WEST;
+		constraints.gridx = 0;
+		constraints.gridy = 0;
+		constraints.ipadx = 10;
+		add(new JLabel("Name:"), constraints);
+
+		constraints.gridx = 1;
+		constraints.gridwidth = 2;
+		constraints.ipadx = 0;
+		constraints.weightx = 1d;
+		constraints.fill = GridBagConstraints.HORIZONTAL;
+		add(groupNameField, constraints);
+
+		constraints.gridx = 0;
+		constraints.gridy = 1;
+		constraints.gridwidth = 1;
+		constraints.weightx = 0d;
+		constraints.fill = GridBagConstraints.NONE;
+		constraints.ipadx = 10;
+		constraints.insets = new Insets(10, 0, 0, 0);
+		add(new JLabel("Explicit location:"), constraints);
+
+		mechanismComboBox = new JComboBox(mechanisms);
+		mechanismComboBox.setSelectedItem(manager.getDefaultMechanism());
+
+		constraints.gridx = 1;
+		constraints.gridwidth = 2;
+		constraints.ipadx = 0;
+		add(mechanismComboBox, constraints);
+	}
+
+	/**
+	 * Returns the portNameField.
+	 *
+	 * @return the portNameField
+	 */
+	public JTextField getGroupNameField() {
+		return groupNameField;
+	}
+
+	/**
+	 * Returns the group name.
+	 *
+	 * @return the group name
+	 */
+	public String getGroupName() {
+		return groupNameField.getText();
+	}
+
+	public InvocationMechanism getSelectedMechanism() {
+		return (InvocationMechanism) mechanismComboBox.getSelectedItem();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerShutdownHook.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerShutdownHook.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerShutdownHook.java
new file mode 100644
index 0000000..3d54b26
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerShutdownHook.java
@@ -0,0 +1,34 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.manager;
+
+import net.sf.taverna.t2.activities.externaltool.manager.impl.InvocationGroupManagerImpl;
+import net.sf.taverna.t2.workbench.ShutdownSPI;
+
+/**
+ * @author alanrw
+ *
+ */
+public class InvocationGroupManagerShutdownHook implements ShutdownSPI {
+
+	/* (non-Javadoc)
+	 * @see net.sf.taverna.t2.workbench.ShutdownSPI#positionHint()
+	 */
+	@Override
+	public int positionHint() {
+		return 710;
+	}
+
+	/* (non-Javadoc)
+	 * @see net.sf.taverna.t2.workbench.ShutdownSPI#shutdown()
+	 */
+	@Override
+	public boolean shutdown() {
+		InvocationGroupManager manager = InvocationGroupManagerImpl.getInstance();
+		manager.saveConfiguration();
+		manager.persistInvocations();
+		return true;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerStartupHook.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerStartupHook.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerStartupHook.java
new file mode 100644
index 0000000..43cf4df
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationGroupManagerStartupHook.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (C) 2010 The University of Manchester   
+ * 
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ * 
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *    
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *    
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.externaltool.manager;
+
+import net.sf.taverna.t2.activities.externaltool.manager.impl.InvocationGroupManagerImpl;
+import net.sf.taverna.t2.workbench.StartupSPI;
+
+/**
+ * Load previously saved workflow ids that were scheduled to be deleted before
+ * previous Taverna shutdown, and initiate deletion of them now.
+ * 
+ * @see StoreRunIdsToDeleteLaterShutdownHook
+ * @see DatabaseCleanup
+ * 
+ * @author Stian Soiland-Reyes
+ * 
+ */
+public class InvocationGroupManagerStartupHook implements StartupSPI {
+
+	public int positionHint() {
+		return 900;
+	}
+
+	public boolean startup() {
+		InvocationGroupManagerImpl.getInstance().loadInvocations();
+		return true;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationMechanismEditor.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationMechanismEditor.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationMechanismEditor.java
new file mode 100644
index 0000000..495d22b
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/InvocationMechanismEditor.java
@@ -0,0 +1,28 @@
+/**
+ *
+ */
+package net.sf.taverna.t2.activities.externaltool.manager;
+
+import javax.swing.JPanel;
+
+/**
+ * @author alanrw
+ *
+ */
+public abstract class InvocationMechanismEditor<T extends InvocationMechanism> extends JPanel {
+
+	public abstract String getName();
+
+	public abstract boolean canShow(Class<?> c);
+
+	public abstract void show(T invocationMechanism);
+
+	public abstract T updateInvocationMechanism();
+
+	public abstract InvocationMechanism createMechanism(String mechanismName);
+
+	public boolean isSingleton() {
+		return false;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/MechanismPanel.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/MechanismPanel.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/MechanismPanel.java
new file mode 100644
index 0000000..c068d56
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/MechanismPanel.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.externaltool.manager;
+
+import java.awt.Component;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.util.List;
+
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import javax.swing.border.EmptyBorder;
+
+/**
+ * UI for creating/editing dataflow input ports.
+ *
+ * @author David Withers
+ */
+public class MechanismPanel extends JPanel {
+
+	private static final long serialVersionUID = 1L;
+
+	private JTextField mechanismNameField;
+
+	private JComboBox mechanismTypeSelector;
+
+	public MechanismPanel(List<InvocationMechanismEditor<?>> invocationMechanismEditors) {
+		super(new GridBagLayout());
+
+		mechanismNameField = new JTextField();
+
+
+		setBorder(new EmptyBorder(10, 10, 10, 10));
+
+		GridBagConstraints constraints = new GridBagConstraints();
+
+		constraints.anchor = GridBagConstraints.WEST;
+		constraints.gridx = 0;
+		constraints.gridy = 0;
+		constraints.ipadx = 10;
+		add(new JLabel("Name:"), constraints);
+
+		constraints.gridx = 1;
+		constraints.gridwidth = 2;
+		constraints.ipadx = 0;
+		constraints.weightx = 1d;
+		constraints.fill = GridBagConstraints.HORIZONTAL;
+		add(mechanismNameField, constraints);
+
+		constraints.gridx = 0;
+		constraints.gridy = 1;
+		constraints.gridwidth = 1;
+		constraints.weightx = 0d;
+		constraints.fill = GridBagConstraints.NONE;
+		constraints.ipadx = 10;
+		constraints.insets = new Insets(10, 0, 0, 0);
+		add(new JLabel("Type:"), constraints);
+
+		mechanismTypeSelector = new JComboBox();
+		for (InvocationMechanismEditor<?> ime : invocationMechanismEditors) {
+			if (!ime.isSingleton()) {
+				mechanismTypeSelector.addItem(ime.getName());
+			}
+		}
+		constraints.gridx = 1;
+		constraints.gridwidth = 2;
+		constraints.ipadx = 0;
+		add(mechanismTypeSelector, constraints);
+
+
+	}
+
+	/**
+	 * Returns the portNameField.
+	 *
+	 * @return the portNameField
+	 */
+	public JTextField getMechanismNameField() {
+		return mechanismNameField;
+	}
+
+	/**
+	 * Returns the port name.
+	 *
+	 * @return the port name
+	 */
+	public String getMechanismName() {
+		return mechanismNameField.getText();
+	}
+
+	public String getMechanismTypeName() {
+		return (String) mechanismTypeSelector.getSelectedItem();
+	}
+
+	public Component getMechanismTypeSelector() {
+		return mechanismTypeSelector;
+	}
+
+
+}


[39/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-wsdl-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/test/resources/kegg.wsdl
----------------------------------------------------------------------
diff --git a/src/test/resources/kegg.wsdl b/src/test/resources/kegg.wsdl
deleted file mode 100644
index a62b707..0000000
--- a/src/test/resources/kegg.wsdl
+++ /dev/null
@@ -1,1889 +0,0 @@
-<?xml version="1.0"?>
-<definitions
-    name="KEGG_v6.1"
-    xmlns:typens="SOAP/KEGG"
-    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
-    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
-    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-    xmlns="http://schemas.xmlsoap.org/wsdl/"
-    targetNamespace="SOAP/KEGG">
-
-  <types>
-    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="SOAP/KEGG">
-      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
-      <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>
-<!-- common variable -->
-      <xsd:complexType name="ArrayOfint">
-        <xsd:complexContent>
-          <xsd:restriction base="soapenc:Array">
-
-            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
-          </xsd:restriction>
-        </xsd:complexContent>
-      </xsd:complexType>
-      <xsd:complexType name="ArrayOfstring">
-        <xsd:complexContent>
-          <xsd:restriction base="soapenc:Array">
-            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
-          </xsd:restriction>
-
-        </xsd:complexContent>
-      </xsd:complexType>
-<!-- SSDB -->
-      <xsd:complexType name="SSDBRelation">
-        <xsd:all>
-          <xsd:element name="genes_id1" type="xsd:string"/>
-          <xsd:element name="genes_id2" type="xsd:string"/>
-          <xsd:element name="sw_score" type="xsd:int"/>
-          <xsd:element name="bit_score" type="xsd:float"/>
-
-          <xsd:element name="identity" type="xsd:float"/>
-          <xsd:element name="overlap" type="xsd:int"/>
-          <xsd:element name="start_position1" type="xsd:int"/>
-          <xsd:element name="end_position1" type="xsd:int"/>
-          <xsd:element name="start_position2" type="xsd:int"/>
-          <xsd:element name="end_position2" type="xsd:int"/>
-          <xsd:element name="best_flag_1to2" type="xsd:boolean"/>
-          <xsd:element name="best_flag_2to1" type="xsd:boolean"/>
-          <xsd:element name="definition1" type="xsd:string"/>
-
-          <xsd:element name="definition2" type="xsd:string"/>
-          <xsd:element name="length1" type="xsd:int"/>
-          <xsd:element name="length2" type="xsd:int"/>
-        </xsd:all>
-      </xsd:complexType>
-      <xsd:complexType name="ArrayOfSSDBRelation">
-        <xsd:complexContent>
-          <xsd:restriction base="soapenc:Array">
-            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:SSDBRelation[]"/>
-
-          </xsd:restriction>
-        </xsd:complexContent>
-      </xsd:complexType>
-<!-- MOTIF -->
-      <xsd:complexType name="MotifResult">
-        <xsd:all>
-          <xsd:element name="motif_id" type="xsd:string"/>
-          <xsd:element name="definition" type="xsd:string"/>
-          <xsd:element name="genes_id" type="xsd:string"/>
-
-          <xsd:element name="start_position" type="xsd:int"/>
-          <xsd:element name="end_position" type="xsd:int"/>
-          <xsd:element name="score" type="xsd:float"/>
-          <xsd:element name="evalue" type="xsd:double"/>
-        </xsd:all>
-      </xsd:complexType>
-      <xsd:complexType name="ArrayOfMotifResult">
-        <xsd:complexContent>
-          <xsd:restriction base="soapenc:Array">
-
-            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:MotifResult[]"/>
-          </xsd:restriction>
-        </xsd:complexContent>
-      </xsd:complexType>
-<!-- DEFINITION -->
-      <xsd:complexType name="Definition">
-        <xsd:all>
-          <xsd:element name="entry_id" type="xsd:string"/>
-          <xsd:element name="definition" type="xsd:string"/>
-
-        </xsd:all>
-      </xsd:complexType>
-      <xsd:complexType name="ArrayOfDefinition">
-        <xsd:complexContent>
-          <xsd:restriction base="soapenc:Array">
-            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:Definition[]"/>
-          </xsd:restriction>
-        </xsd:complexContent>
-      </xsd:complexType>
-
-<!-- LinkDB -->
-      <xsd:complexType name="LinkDBRelation">
-        <xsd:all>
-          <xsd:element name="entry_id1" type="xsd:string"/>
-          <xsd:element name="entry_id2" type="xsd:string"/>
-          <xsd:element name="type" type="xsd:string"/>
-          <xsd:element name="path" type="xsd:string"/>
-        </xsd:all>
-      </xsd:complexType>
-
-      <xsd:complexType name="ArrayOfLinkDBRelation">
-        <xsd:complexContent>
-          <xsd:restriction base="soapenc:Array">
-            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:LinkDBRelation[]"/>
-          </xsd:restriction>
-        </xsd:complexContent>
-      </xsd:complexType>
-<!-- Pathway -->
-      <xsd:complexType name="PathwayElement">
-
-        <xsd:all>
-          <xsd:element name="element_id" type="xsd:int"/>
-          <xsd:element name="type" type="xsd:string"/>
-          <xsd:element name="names" type="typens:ArrayOfstring"/>
-          <xsd:element name="components" type="typens:ArrayOfint"/>
-        </xsd:all>
-      </xsd:complexType>
-      <xsd:complexType name="ArrayOfPathwayElement">
-        <xsd:complexContent>
-
-          <xsd:restriction base="soapenc:Array">
-            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:PathwayElement[]"/>
-          </xsd:restriction>
-        </xsd:complexContent>
-      </xsd:complexType>
-      <xsd:complexType name="PathwayElementRelation">
-        <xsd:all>
-          <xsd:element name="element_id1" type="xsd:int"/>
-          <xsd:element name="element_id2" type="xsd:int"/>
-
-          <xsd:element name="type" type="xsd:string"/>
-          <!--xsd:element name="name" type="xsd:string"/-->
-          <xsd:element name="subtypes" type="typens:ArrayOfSubtype"/>
-        </xsd:all>
-      </xsd:complexType>
-      <xsd:complexType name="ArrayOfPathwayElementRelation">
-        <xsd:complexContent>
-          <xsd:restriction base="soapenc:Array">
-            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:PathwayElementRelation[]"/>
-
-          </xsd:restriction>
-        </xsd:complexContent>
-      </xsd:complexType>
-      <xsd:complexType name="Subtype">
-        <xsd:all>
-          <xsd:element name="relation" type="xsd:string"/>
-          <xsd:element name="element_id" type="xsd:int"/>
-          <xsd:element name="type" type="xsd:string"/>
-        </xsd:all>
-
-      </xsd:complexType>
-      <xsd:complexType name="ArrayOfSubtype">
-        <xsd:complexContent>
-          <xsd:restriction base="soapenc:Array">
-            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:Subtype[]"/>
-          </xsd:restriction>
-        </xsd:complexContent>
-      </xsd:complexType>
-<!-- v6.0 -->
-
-      <xsd:complexType name="StructureAlignment">
-        <xsd:all>
-          <xsd:element name="target_id" type="xsd:string"/>
-          <xsd:element name="score" type="xsd:float"/>
-          <xsd:element name="query_nodes" type="typens:ArrayOfint"/>
-          <xsd:element name="target_nodes" type="typens:ArrayOfint"/>
-        </xsd:all>
-      </xsd:complexType>
-      <xsd:complexType name="ArrayOfStructureAlignment">
-
-        <xsd:complexContent>
-          <xsd:restriction base="soapenc:Array">
-            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:StructureAlignment[]"/>
-          </xsd:restriction>
-        </xsd:complexContent>
-      </xsd:complexType>
-
-    </xsd:schema>
-  </types>
-
-<!-- KEGG information -->
-<!-- list_databases -->
-  <message name="list_databasesRequest"/>
-  <message name="list_databasesResponse">
-    <part name="return" type="typens:ArrayOfDefinition"/>
-  </message>
-<!-- list_organisms -->
-  <message name="list_organismsRequest"/>
-  <message name="list_organismsResponse">
-    <part name="return" type="typens:ArrayOfDefinition"/>
-
-  </message>
-<!-- list_pathways -->
-  <message name="list_pathwaysRequest">
-    <part name="org" type="xsd:string"/>
-  </message>
-  <message name="list_pathwaysResponse">
-    <part name="return" type="typens:ArrayOfDefinition"/>
-  </message>
-<!-- list_ko_classes -->
-  <message name="list_ko_classesRequest">
-
-    <part name="class_id" type="xsd:string"/>
-  </message>
-  <message name="list_ko_classesResponse">
-    <part name="return" type="typens:ArrayOfDefinition"/>
-  </message>
-<!-- DBGET -->
-<!-- binfo -->
-  <message name="binfoRequest">
-    <part name="db" type="xsd:string"/>
-  </message>
-
-  <message name="binfoResponse">
-    <part name="return" type="xsd:string"/>
-  </message>
-<!-- bget -->
-  <message name="bgetRequest">
-    <part name="string" type="xsd:string"/>
-  </message>
-  <message name="bgetResponse">
-    <part name="return" type="xsd:string"/>
-
-  </message>
-<!-- bfind -->
-  <message name="bfindRequest">
-    <part name="string" type="xsd:string"/>
-  </message>
-  <message name="bfindResponse">
-    <part name="return" type="xsd:string"/>
-  </message>
-<!-- btit -->
-  <message name="btitRequest">
-
-    <part name="string" type="xsd:string"/>
-  </message>
-  <message name="btitResponse">
-    <part name="return" type="xsd:string"/>
-  </message>
-<!-- bconv -->
-  <message name="bconvRequest">
-    <part name="string" type="xsd:string"/>
-  </message>
-
-  <message name="bconvResponse">
-    <part name="return" type="xsd:string"/>
-  </message>
-<!-- LinkDB -->
-  <message name="get_linkdb_by_entryRequest">
-    <part name="entry_id" type="xsd:string"/>
-    <part name="db" type="xsd:string"/>
-    <part name="offset" type="xsd:int"/>
-    <part name="limit" type="xsd:int"/>
-
-  </message>
-  <message name="get_linkdb_by_entryResponse">
-    <part name="return" type="typens:ArrayOfLinkDBRelation"/>
-  </message>
-<!-- SSDB -->
-<!-- get_best_neighbors_by_gene -->
-  <message name="get_best_neighbors_by_geneRequest">
-    <part name="genes_id" type="xsd:string"/>
-    <part name="offset" type="xsd:int"/>
-    <part name="limit" type="xsd:int"/>
-
-  </message>
-  <message name="get_best_neighbors_by_geneResponse">
-    <part name="return" type="typens:ArrayOfSSDBRelation"/>
-  </message>
-<!-- get_best_best_neighbors_by_gene -->
-  <message name="get_best_best_neighbors_by_geneRequest">
-    <part name="genes_id" type="xsd:string"/>
-    <part name="offset" type="xsd:int"/>
-    <part name="limit" type="xsd:int"/>
-
-  </message>
-  <message name="get_best_best_neighbors_by_geneResponse">
-    <part name="return" type="typens:ArrayOfSSDBRelation"/>
-  </message>
-<!-- get_reverse_best_neighbors_by_gene -->
-  <message name="get_reverse_best_neighbors_by_geneRequest">
-    <part name="genes_id" type="xsd:string"/>
-    <part name="offset" type="xsd:int"/>
-    <part name="limit" type="xsd:int"/>
-
-  </message>
-  <message name="get_reverse_best_neighbors_by_geneResponse">
-    <part name="return" type="typens:ArrayOfSSDBRelation"/>
-  </message>
-<!-- get_paralogs_by_geneRequest -->
-  <message name="get_paralogs_by_geneRequest">
-    <part name="genes_id" type="xsd:string"/>
-    <part name="offset" type="xsd:int"/>
-    <part name="limit" type="xsd:int"/>
-
-  </message>
-  <message name="get_paralogs_by_geneResponse">
-    <part name="return" type="typens:ArrayOfSSDBRelation"/>
-  </message>
-<!-- MOTIF -->
-<!-- get_motifs_by_gene -->
-  <message name="get_motifs_by_geneRequest">
-    <part name="genes_id" type="xsd:string"/>
-    <part name="db" type="xsd:string"/>
-  </message>
-
-  <message name="get_motifs_by_geneResponse">
-    <part name="return" type="typens:ArrayOfMotifResult"/>
-  </message>
-<!-- get_genes_by_motifs -->
-  <message name="get_genes_by_motifsRequest">
-    <part name="motif_id_list" type="typens:ArrayOfstring"/>
-    <part name="offset" type="xsd:int"/>
-    <part name="limit" type="xsd:int"/>
-  </message>
-
-  <message name="get_genes_by_motifsResponse">
-    <part name="return" type="typens:ArrayOfDefinition"/>
-  </message>
-<!-- KO,OC,PC -->
-<!-- get_ko_by_gene -->
-  <message name="get_ko_by_geneRequest">
-    <part name="genes_id" type="xsd:string"/>
-  </message>
-  <message name="get_ko_by_geneResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-
-  </message>
-<!-- get_ko_by_ko_class -->
-  <message name="get_ko_by_ko_classRequest">
-    <part name="class_id" type="xsd:string"/>
-  </message>
-  <message name="get_ko_by_ko_classResponse">
-    <part name="return" type="typens:ArrayOfDefinition"/>
-  </message>
-<!-- get_genes_by_ko -->
-  <message name="get_genes_by_koRequest">
-
-    <part name="ko_id" type="xsd:string"/>
-    <part name="org" type="xsd:string"/>
-  </message>
-  <message name="get_genes_by_koResponse">
-    <part name="return" type="typens:ArrayOfDefinition"/>
-  </message>
-<!-- get_genes_by_ko_class -->
-  <message name="get_genes_by_ko_classRequest">
-    <part name="class_id" type="xsd:string"/>
-
-    <part name="org" type="xsd:string"/>
-	<part name="offset" type="xsd:int"/>
-    <part name="limit" type="xsd:int"/>
-  </message>
-  <message name="get_genes_by_ko_classResponse">
-    <part name="return" type="typens:ArrayOfDefinition"/>
-  </message>
-<!-- get_oc_members_by_gene -->
-<!--
-  <message name="get_oc_members_by_geneRequest">
-    <part name="genes_id" type="xsd:string"/>
-    <part name="offset" type="xsd:int"/>
-    <part name="limit" type="xsd:int"/>
-  </message>
-  <message name="get_oc_members_by_geneResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
--->
-<!-- get_pc_members_by_gene -->
-
-<!--
-  <message name="get_pc_members_by_geneRequest">
-    <part name="genes_id" type="xsd:string"/>
-    <part name="offset" type="xsd:int"/>
-    <part name="limit" type="xsd:int"/>
-  </message>
-  <message name="get_pc_members_by_geneResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
--->
-<!-- PATHWAY -->
-<!-- Coloring pathways -->
-<!-- mark_pathway_by_objects -->
-  <message name="get_elements_by_pathwayRequest">
-    <part name="pathway_id" type="xsd:string"/>
-  </message>
-  <message name="get_elements_by_pathwayResponse">
-    <part name="return" type="typens:ArrayOfPathwayElement"/>
-  </message>
-  <message name="get_element_relations_by_pathwayRequest">
-
-    <part name="pathway_id" type="xsd:string"/>
-  </message>
-  <message name="get_element_relations_by_pathwayResponse">
-    <part name="return" type="typens:ArrayOfPathwayElementRelation"/>
-  </message>
-  <message name="color_pathway_by_elementsRequest">
-    <part name="pathway_id" type="xsd:string"/>
-    <part name="element_list" type="typens:ArrayOfint"/>
-    <part name="fg_color_list" type="typens:ArrayOfstring"/>
-
-    <part name="bg_color_list" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="color_pathway_by_elementsResponse">
-    <part name="return" type="xsd:string"/>
-  </message>
-  <message name="get_html_of_colored_pathway_by_elementsRequest">
-    <part name="pathway_id" type="xsd:string"/>
-    <part name="element_list" type="typens:ArrayOfint"/>
-    <part name="fg_color_list" type="typens:ArrayOfstring"/>
-
-    <part name="bg_color_list" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_html_of_colored_pathway_by_elementsResponse">
-    <part name="return" type="xsd:string"/>
-  </message>
-
-  <message name="mark_pathway_by_objectsRequest">
-    <part name="pathway_id" type="xsd:string"/>
-    <part name="object_id_list" type="typens:ArrayOfstring"/>
-
-  </message>
-  <message name="mark_pathway_by_objectsResponse">
-    <part name="return" type="xsd:string"/>
-  </message>
-<!-- color_pathway_by_objects -->
-  <message name="color_pathway_by_objectsRequest">
-    <part name="pathway_id" type="xsd:string"/>
-    <part name="object_id_list" type="typens:ArrayOfstring"/>
-    <part name="fg_color_list" type="typens:ArrayOfstring"/>
-
-    <part name="bg_color_list" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="color_pathway_by_objectsResponse">
-    <part name="return" type="xsd:string"/>
-  </message>
-<!-- get_html_org_marked_pathway_by_objects -->
-  <message name="get_html_of_marked_pathway_by_objectsRequest">
-    <part name="pathway_id" type="xsd:string"/>
-    <part name="object_id_list" type="typens:ArrayOfstring"/>
-
-  </message>
-  <message name="get_html_of_marked_pathway_by_objectsResponse">
-    <part name="return" type="xsd:string"/>
-  </message>
-<!-- get_html_of_colored_pathway_by_objects -->
-  <message name="get_html_of_colored_pathway_by_objectsRequest">
-    <part name="pathway_id" type="xsd:string"/>
-    <part name="object_id_list" type="typens:ArrayOfstring"/>
-    <part name="fg_color_list" type="typens:ArrayOfstring"/>
-
-    <part name="bg_color_list" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_html_of_colored_pathway_by_objectsResponse">
-    <part name="return" type="xsd:string"/>
-  </message>
-<!-- Objects on the pathway -->
-<!-- get_genes_by_pathway -->
-  <message name="get_genes_by_pathwayRequest">
-    <part name="pathway_id" type="xsd:string"/>
-  </message>
-
-  <message name="get_genes_by_pathwayResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-<!-- get_enzymes_by_pathway -->
-  <message name="get_enzymes_by_pathwayRequest">
-    <part name="pathway_id" type="xsd:string"/>
-  </message>
-  <message name="get_enzymes_by_pathwayResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-
-  </message>
-<!-- get_reactions_by_pathway -->
-  <message name="get_reactions_by_pathwayRequest">
-    <part name="pathway_id" type="xsd:string"/>
-  </message>
-  <message name="get_reactions_by_pathwayResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-<!-- Pathways by objects -->
-<!-- get_pathways_by_genes -->
-
-  <message name="get_pathways_by_genesRequest">
-    <part name="genes_id_list" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_pathways_by_genesResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-<!-- get_pathways_by_enzymes  -->
-  <message name="get_pathways_by_enzymesRequest">
-    <part name="enzyme_id_list" type="typens:ArrayOfstring"/>
-
-  </message>
-  <message name="get_pathways_by_enzymesResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-<!-- get_pathways_by_reactions -->
-  <message name="get_pathways_by_reactionsRequest">
-    <part name="reaction_id_list" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_pathways_by_reactionsResponse">
-
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-<!-- Mutual transformation of objects -->
-<!-- Relation among pathways -->
-<!-- get_linked_pathways -->
-  <message name="get_linked_pathwaysRequest">
-    <part name="pathway_id" type="xsd:string"/>
-  </message>
-  <message name="get_linked_pathwaysResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-
-  </message>
-<!-- Relation among genes and enzymes -->
-<!-- get_genes_by_enzyme -->
-  <message name="get_genes_by_enzymeRequest">
-    <part name="enzyme_id" type="xsd:string"/>
-    <part name="org" type="xsd:string"/>
-  </message>
-  <message name="get_genes_by_enzymeResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-
-<!-- get_enzymes_by_gene -->
-  <message name="get_enzymes_by_geneRequest">
-    <part name="genes_id" type="xsd:string"/>
-  </message>
-  <message name="get_enzymes_by_geneResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-<!-- Relation among enzymes, compounds and reactions -->
-<!-- get_enzymes_by_reaction -->
-  <message name="get_enzymes_by_reactionRequest">
-
-    <part name="reaction_id" type="xsd:string"/>
-  </message>
-  <message name="get_enzymes_by_reactionResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-<!-- get_reactions_by_enzyme -->
-  <message name="get_reactions_by_enzymeRequest">
-    <part name="enzyme_id" type="xsd:string"/>
-  </message>
-
-  <message name="get_reactions_by_enzymeResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-<!-- GENES -->
-<!-- get_genes_by_organism -->
-  <message name="get_genes_by_organismRequest">
-    <part name="org" type="xsd:string"/>
-    <part name="offset" type="xsd:int"/>
-    <part name="limit" type="xsd:int"/>
-  </message>
-
-  <message name="get_genes_by_organismResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-<!-- GENOME -->
-<!-- get_number_of_genes_by_organism -->
-  <message name="get_number_of_genes_by_organismRequest">
-    <part name="abbr" type="xsd:string"/>
-  </message>
-  <message name="get_number_of_genes_by_organismResponse">
-    <part name="return" type="xsd:int"/>
-
-  </message>
-<!-- LIGAND -->
-  <message name="get_reactions_by_glycanRequest">
-    <part name="glycan_id" type="xsd:string"/>
-  </message>
-  <message name="get_reactions_by_glycanResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_reactions_by_compoundRequest">
-
-    <part name="compound_id" type="xsd:string"/>
-  </message>
-  <message name="get_reactions_by_compoundResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_enzymes_by_glycanRequest">
-    <part name="glycan_id" type="xsd:string"/>
-  </message>
-  <message name="get_enzymes_by_glycanResponse">
-
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_enzymes_by_compoundRequest">
-    <part name="compound_id" type="xsd:string"/>
-  </message>
-  <message name="get_enzymes_by_compoundResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_pathways_by_compoundsRequest">
-
-    <part name="compound_id_list" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_pathways_by_compoundsResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_pathways_by_glycansRequest">
-    <part name="glycan_id_list" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_pathways_by_glycansResponse">
-
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_compounds_by_pathwayRequest">
-    <part name="pathway_id" type="xsd:string"/>
-  </message>
-  <message name="get_compounds_by_pathwayResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_compounds_by_enzymeRequest">
-
-    <part name="enzyme_id" type="xsd:string"/>
-  </message>
-  <message name="get_compounds_by_enzymeResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_glycans_by_enzymeRequest">
-    <part name="enzyme_id" type="xsd:string"/>
-  </message>
-  <message name="get_glycans_by_enzymeResponse">
-
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_glycans_by_pathwayRequest">
-    <part name="pathway_id" type="xsd:string"/>
-  </message>
-  <message name="get_glycans_by_pathwayResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_compounds_by_reactionRequest">
-
-    <part name="reaction_id" type="xsd:string"/>
-  </message>
-  <message name="get_compounds_by_reactionResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_glycans_by_reactionRequest">
-    <part name="reaction_id" type="xsd:string"/>
-  </message>
-  <message name="get_glycans_by_reactionResponse">
-
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="convert_mol_to_kcfRequest">
-    <part name="mol_text" type="xsd:string"/>
-  </message>
-  <message name="convert_mol_to_kcfResponse">
-    <part name="return" type="xsd:string"/>
-  </message>
-  <message name="get_kos_by_pathwayRequest">
-
-    <part name="pathway_id" type="xsd:string"/>
-  </message>
-  <message name="get_kos_by_pathwayResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-  <message name="get_pathways_by_kosRequest">
-    <part name="ko_id_list" type="typens:ArrayOfstring"/>
-    <part name="org" type="xsd:string"/>
-  </message>
-
-  <message name="get_pathways_by_kosResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-
-<!-- v6.0 -->
-  <message name="search_compounds_by_nameRequest">
-    <part name="name" type="xsd:string"/>
-  </message>
-  <message name="search_compounds_by_nameResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-
-  </message>
-
-  <message name="search_glycans_by_nameRequest">
-    <part name="name" type="xsd:string"/>
-  </message>
-  <message name="search_glycans_by_nameResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-
-  <message name="search_compounds_by_compositionRequest">
-
-    <part name="composition" type="xsd:string"/>
-  </message>
-  <message name="search_compounds_by_compositionResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-
-  <message name="search_compounds_by_massRequest">
-    <part name="mass" type="xsd:float"/>
-    <part name="range" type="xsd:float"/>
-
-  </message>
-  <message name="search_compounds_by_massResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-
-  <message name="search_glycans_by_massRequest">
-    <part name="mass" type="xsd:float"/>
-    <part name="range" type="xsd:float"/>
-  </message>
-
-  <message name="search_glycans_by_massResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-
-  <message name="search_glycans_by_compositionRequest">
-    <part name="composition" type="xsd:string"/>
-  </message>
-  <message name="search_glycans_by_compositionResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-
-  </message>
-
-  <message name="search_compounds_by_subcompRequest">
-    <part name="mol" type="xsd:string"/>
-    <part name="offset" type="xsd:int"/>
-    <part name="limit" type="xsd:int"/>
-  </message>
-  <message name="search_compounds_by_subcompResponse">
-    <part name="return" type="typens:ArrayOfStructureAlignment"/>
-
-  </message>
-
-  <message name="search_glycans_by_kcamRequest">
-    <part name="kcf" type="xsd:string"/>
-    <part name="program" type="xsd:string"/>
-    <part name="option" type="xsd:string"/>
-    <part name="offset" type="xsd:int"/>
-    <part name="limit" type="xsd:int"/>
-  </message>
-
-  <message name="search_glycans_by_kcamResponse">
-    <part name="return" type="typens:ArrayOfStructureAlignment"/>
-  </message>
-
-  <message name="get_linkdb_between_databasesRequest">
-    <part name="from_db" type="xsd:string"/>
-    <part name="to_db" type="xsd:string"/>
-    <part name="offset" type="xsd:int"/>
-    <part name="limit" type="xsd:int"/>
-
-  </message>
-  <message name="get_linkdb_between_databasesResponse">
-    <part name="return" type="typens:ArrayOfLinkDBRelation"/>
-  </message>
-
-<!-- v6.1 -->
-  <message name="search_drugs_by_nameRequest">
-    <part name="name" type="xsd:string"/>
-  </message>
-  <message name="search_drugs_by_nameResponse">
-
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-
-  <message name="search_drugs_by_compositionRequest">
-    <part name="composition" type="xsd:string"/>
-  </message>
-  <message name="search_drugs_by_compositionResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-
-  <message name="search_drugs_by_massRequest">
-    <part name="mass" type="xsd:float"/>
-    <part name="range" type="xsd:float"/>
-  </message>
-  <message name="search_drugs_by_massResponse">
-    <part name="return" type="typens:ArrayOfstring"/>
-  </message>
-
-  <message name="search_drugs_by_subcompRequest">
-
-    <part name="mol" type="xsd:string"/>
-    <part name="offset" type="xsd:int"/>
-    <part name="limit" type="xsd:int"/>
-  </message>
-  <message name="search_drugs_by_subcompResponse">
-    <part name="return" type="typens:ArrayOfStructureAlignment"/>
-  </message>
-
-  <portType name="KEGGPortType">
-
-<!-- KEGG information -->
-    <operation name="list_databases">
-      <input message="typens:list_databasesRequest"/>
-      <output message="typens:list_databasesResponse"/>
-    </operation>
-    <operation name="list_organisms">
-      <input message="typens:list_organismsRequest"/>
-      <output message="typens:list_organismsResponse"/>
-    </operation>
-
-    <operation name="list_pathways">
-      <input message="typens:list_pathwaysRequest"/>
-      <output message="typens:list_pathwaysResponse"/>
-    </operation>
-    <operation name="list_ko_classes">
-      <input message="typens:list_ko_classesRequest"/>
-      <output message="typens:list_ko_classesResponse"/>
-    </operation>
-<!-- DBGET -->
-
-    <operation name="binfo">
-      <input message="typens:binfoRequest"/>
-      <output message="typens:binfoResponse"/>
-    </operation>
-    <operation name="bget">
-      <input message="typens:bgetRequest"/>
-      <output message="typens:bgetResponse"/>
-    </operation>
-    <operation name="bfind">
-
-      <input message="typens:bfindRequest"/>
-      <output message="typens:bfindResponse"/>
-    </operation>
-    <operation name="btit">
-      <input message="typens:btitRequest"/>
-      <output message="typens:btitResponse"/>
-    </operation>
-    <operation name="bconv">
-      <input message="typens:bconvRequest"/>
-
-      <output message="typens:bconvResponse"/>
-    </operation>
-<!-- LinkDB -->
-    <operation name="get_linkdb_by_entry">
-      <input message="typens:get_linkdb_by_entryRequest"/>
-      <output message="typens:get_linkdb_by_entryResponse"/>
-    </operation>
-<!-- SSDB -->
-    <operation name="get_best_neighbors_by_gene">
-      <input message="typens:get_best_neighbors_by_geneRequest"/>
-
-      <output message="typens:get_best_neighbors_by_geneResponse"/>
-    </operation>
-    <operation name="get_best_best_neighbors_by_gene">
-      <input message="typens:get_best_best_neighbors_by_geneRequest"/>
-      <output message="typens:get_best_best_neighbors_by_geneResponse"/>
-    </operation>
-    <operation name="get_reverse_best_neighbors_by_gene">
-      <input message="typens:get_reverse_best_neighbors_by_geneRequest"/>
-      <output message="typens:get_reverse_best_neighbors_by_geneResponse"/>
-
-    </operation>
-    <operation name="get_paralogs_by_gene">
-      <input message="typens:get_paralogs_by_geneRequest"/>
-      <output message="typens:get_paralogs_by_geneResponse"/>
-    </operation>
-<!-- MOTIF -->
-    <operation name="get_motifs_by_gene">
-      <input message="typens:get_motifs_by_geneRequest"/>
-      <output message="typens:get_motifs_by_geneResponse"/>
-
-    </operation>
-    <operation name="get_genes_by_motifs">
-      <input message="typens:get_genes_by_motifsRequest"/>
-      <output message="typens:get_genes_by_motifsResponse"/>
-    </operation>
-<!-- KO,OC,PC -->
-    <operation name="get_ko_by_gene">
-      <input message="typens:get_ko_by_geneRequest"/>
-      <output message="typens:get_ko_by_geneResponse"/>
-
-    </operation>
-    <operation name="get_ko_by_ko_class">
-      <input message="typens:get_ko_by_ko_classRequest"/>
-      <output message="typens:get_ko_by_ko_classResponse"/>
-    </operation>
-    <operation name="get_genes_by_ko">
-      <input message="typens:get_genes_by_koRequest"/>
-      <output message="typens:get_genes_by_koResponse"/>
-    </operation>
-
-    <operation name="get_genes_by_ko_class">
-      <input message="typens:get_genes_by_ko_classRequest"/>
-      <output message="typens:get_genes_by_ko_classResponse"/>
-    </operation>
-<!--
-    <operation name="get_oc_members_by_gene">
-      <input message="typens:get_oc_members_by_geneRequest"/>
-      <output message="typens:get_oc_members_by_geneResponse"/>
-    </operation>
--->
-<!--
-    <operation name="get_pc_members_by_gene">
-      <input message="typens:get_pc_members_by_geneRequest"/>
-      <output message="typens:get_pc_members_by_geneResponse"/>
-    </operation>
--->
-<!-- PATHWAY -->
-<!-- Coloring pathways -->
-    <operation name="get_elements_by_pathway">
-      <input message="typens:get_elements_by_pathwayRequest"/>
-      <output message="typens:get_elements_by_pathwayResponse"/>
-
-    </operation>
-    <operation name="get_element_relations_by_pathway">
-      <input message="typens:get_element_relations_by_pathwayRequest"/>
-      <output message="typens:get_element_relations_by_pathwayResponse"/>
-    </operation>
-    <operation name="color_pathway_by_elements">
-      <input message="typens:color_pathway_by_elementsRequest"/>
-      <output message="typens:color_pathway_by_elementsResponse"/>
-    </operation>
-
-    <operation name="get_html_of_colored_pathway_by_elements">
-      <input message="typens:get_html_of_colored_pathway_by_elementsRequest"/>
-      <output message="typens:get_html_of_colored_pathway_by_elementsResponse"/>
-    </operation>
-
-    <operation name="mark_pathway_by_objects">
-      <input message="typens:mark_pathway_by_objectsRequest"/>
-      <output message="typens:mark_pathway_by_objectsResponse"/>
-    </operation>
-
-    <operation name="color_pathway_by_objects">
-      <input message="typens:color_pathway_by_objectsRequest"/>
-      <output message="typens:color_pathway_by_objectsResponse"/>
-    </operation>
-    <operation name="get_html_of_marked_pathway_by_objects">
-      <input message="typens:get_html_of_marked_pathway_by_objectsRequest"/>
-      <output message="typens:get_html_of_marked_pathway_by_objectsResponse"/>
-    </operation>
-    <operation name="get_html_of_colored_pathway_by_objects">
-
-      <input message="typens:get_html_of_colored_pathway_by_objectsRequest"/>
-      <output message="typens:get_html_of_colored_pathway_by_objectsResponse"/>
-    </operation>
-<!-- Objects on the pathway -->
-    <operation name="get_genes_by_pathway">
-      <input message="typens:get_genes_by_pathwayRequest"/>
-      <output message="typens:get_genes_by_pathwayResponse"/>
-    </operation>
-    <operation name="get_enzymes_by_pathway">
-
-      <input message="typens:get_enzymes_by_pathwayRequest"/>
-      <output message="typens:get_enzymes_by_pathwayResponse"/>
-    </operation>
-    <operation name="get_reactions_by_pathway">
-      <input message="typens:get_reactions_by_pathwayRequest"/>
-      <output message="typens:get_reactions_by_pathwayResponse"/>
-    </operation>
-<!-- Pathways by objects -->
-    <operation name="get_pathways_by_genes">
-
-      <input message="typens:get_pathways_by_genesRequest"/>
-      <output message="typens:get_pathways_by_genesResponse"/>
-    </operation>
-    <operation name="get_pathways_by_enzymes">
-      <input message="typens:get_pathways_by_enzymesRequest"/>
-      <output message="typens:get_pathways_by_enzymesResponse"/>
-    </operation>
-    <operation name="get_pathways_by_reactions">
-      <input message="typens:get_pathways_by_reactionsRequest"/>
-
-      <output message="typens:get_pathways_by_reactionsResponse"/>
-    </operation>
-<!-- Mutual transformation of objects -->
-<!-- Realtion among pathways -->
-    <operation name="get_linked_pathways">
-      <input message="typens:get_linked_pathwaysRequest"/>
-      <output message="typens:get_linked_pathwaysResponse"/>
-    </operation>
-<!-- Realtion among genes and enzymes -->
-    <operation name="get_genes_by_enzyme">
-
-      <input message="typens:get_genes_by_enzymeRequest"/>
-      <output message="typens:get_genes_by_enzymeResponse"/>
-    </operation>
-    <operation name="get_enzymes_by_gene">
-      <input message="typens:get_enzymes_by_geneRequest"/>
-      <output message="typens:get_enzymes_by_geneResponse"/>
-    </operation>
-<!-- Realtion among enzymes, compounds and reactions -->
-    <operation name="get_enzymes_by_reaction">
-
-      <input message="typens:get_enzymes_by_reactionRequest"/>
-      <output message="typens:get_enzymes_by_reactionResponse"/>
-    </operation>
-    <operation name="get_reactions_by_enzyme">
-      <input message="typens:get_reactions_by_enzymeRequest"/>
-      <output message="typens:get_reactions_by_enzymeResponse"/>
-    </operation>
-<!-- GENES -->
-    <operation name="get_genes_by_organism">
-
-      <input message="typens:get_genes_by_organismRequest"/>
-      <output message="typens:get_genes_by_organismResponse"/>
-    </operation>
-<!-- GENOME -->
-    <operation name="get_number_of_genes_by_organism">
-      <input message="typens:get_number_of_genes_by_organismRequest"/>
-      <output message="typens:get_number_of_genes_by_organismResponse"/>
-    </operation>
-<!-- LIGAND -->
-    <operation name="get_reactions_by_glycan">
-
-      <input message="typens:get_reactions_by_glycanRequest"/>
-      <output message="typens:get_reactions_by_glycanResponse"/>
-    </operation>
-    <operation name="get_reactions_by_compound">
-      <input message="typens:get_reactions_by_compoundRequest"/>
-      <output message="typens:get_reactions_by_compoundResponse"/>
-    </operation>
-    <operation name="get_enzymes_by_glycan">
-      <input message="typens:get_enzymes_by_glycanRequest"/>
-
-      <output message="typens:get_enzymes_by_glycanResponse"/>
-    </operation>
-    <operation name="get_enzymes_by_compound">
-      <input message="typens:get_enzymes_by_compoundRequest"/>
-      <output message="typens:get_enzymes_by_compoundResponse"/>
-    </operation>
-    <operation name="get_pathways_by_compounds">
-      <input message="typens:get_pathways_by_compoundsRequest"/>
-      <output message="typens:get_pathways_by_compoundsResponse"/>
-
-    </operation>
-    <operation name="get_pathways_by_glycans">
-      <input message="typens:get_pathways_by_glycansRequest"/>
-      <output message="typens:get_pathways_by_glycansResponse"/>
-    </operation>
-    <operation name="get_compounds_by_pathway">
-      <input message="typens:get_compounds_by_pathwayRequest"/>
-      <output message="typens:get_compounds_by_pathwayResponse"/>
-    </operation>
-
-    <operation name="get_glycans_by_pathway">
-      <input message="typens:get_glycans_by_pathwayRequest"/>
-      <output message="typens:get_glycans_by_pathwayResponse"/>
-    </operation>
-    <operation name="get_compounds_by_reaction">
-      <input message="typens:get_compounds_by_reactionRequest"/>
-      <output message="typens:get_compounds_by_reactionResponse"/>
-    </operation>
-    <operation name="get_glycans_by_reaction">
-
-      <input message="typens:get_glycans_by_reactionRequest"/>
-      <output message="typens:get_glycans_by_reactionResponse"/>
-    </operation>
-    <operation name="get_compounds_by_enzyme">
-      <input message="typens:get_compounds_by_enzymeRequest"/>
-      <output message="typens:get_compounds_by_enzymeResponse"/>
-    </operation>
-    <operation name="get_glycans_by_enzyme">
-      <input message="typens:get_glycans_by_enzymeRequest"/>
-
-      <output message="typens:get_glycans_by_enzymeResponse"/>
-    </operation>
-    <operation name="convert_mol_to_kcf">
-      <input message="typens:convert_mol_to_kcfRequest"/>
-      <output message="typens:convert_mol_to_kcfResponse"/>
-    </operation>
-    <operation name="get_kos_by_pathway">
-      <input message="typens:get_kos_by_pathwayRequest"/>
-      <output message="typens:get_kos_by_pathwayResponse"/>
-
-    </operation>
-    <operation name="get_pathways_by_kos">
-      <input message="typens:get_pathways_by_kosRequest"/>
-      <output message="typens:get_pathways_by_kosResponse"/>
-    </operation>
-<!-- v6.0 -->
-    <operation name="search_compounds_by_name">
-      <input message="typens:search_compounds_by_nameRequest"/>
-      <output message="typens:search_compounds_by_nameResponse"/>
-
-    </operation>
-    <operation name="search_glycans_by_name">
-      <input message="typens:search_glycans_by_nameRequest"/>
-      <output message="typens:search_glycans_by_nameResponse"/>
-    </operation>
-    <operation name="search_compounds_by_composition">
-      <input message="typens:search_compounds_by_compositionRequest"/>
-      <output message="typens:search_compounds_by_compositionResponse"/>
-    </operation>
-
-    <operation name="search_compounds_by_mass">
-      <input message="typens:search_compounds_by_massRequest"/>
-      <output message="typens:search_compounds_by_massResponse"/>
-    </operation>
-    <operation name="search_glycans_by_mass">
-      <input message="typens:search_glycans_by_massRequest"/>
-      <output message="typens:search_glycans_by_massResponse"/>
-    </operation>
-    <operation name="search_glycans_by_composition">
-
-      <input message="typens:search_glycans_by_compositionRequest"/>
-      <output message="typens:search_glycans_by_compositionResponse"/>
-    </operation>
-    <operation name="search_compounds_by_subcomp">
-      <input message="typens:search_compounds_by_subcompRequest"/>
-      <output message="typens:search_compounds_by_subcompResponse"/>
-    </operation>
-    <operation name="search_glycans_by_kcam">
-      <input message="typens:search_glycans_by_kcamRequest"/>
-
-      <output message="typens:search_glycans_by_kcamResponse"/>
-    </operation>
-    <operation name="get_linkdb_between_databases">
-      <input message="typens:get_linkdb_between_databasesRequest"/>
-      <output message="typens:get_linkdb_between_databasesResponse"/>
-    </operation>
-
-<!-- v6.1 -->
-    <operation name="search_drugs_by_name">
-      <input message="typens:search_drugs_by_nameRequest"/>
-
-      <output message="typens:search_drugs_by_nameResponse"/>
-    </operation>
-    <operation name="search_drugs_by_composition">
-      <input message="typens:search_drugs_by_compositionRequest"/>
-      <output message="typens:search_drugs_by_compositionResponse"/>
-    </operation>
-    <operation name="search_drugs_by_mass">
-      <input message="typens:search_drugs_by_massRequest"/>
-      <output message="typens:search_drugs_by_massResponse"/>
-
-    </operation>
-    <operation name="search_drugs_by_subcomp">
-      <input message="typens:search_drugs_by_subcompRequest"/>
-      <output message="typens:search_drugs_by_subcompResponse"/>
-    </operation>
-
-  </portType>
-
-
-  <binding name="KEGGBinding" type="typens:KEGGPortType">
-
-    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
-<!-- KEGG information -->
-    <operation name="list_databases">
-      <soap:operation soapAction="SOAP/KEGG#list_databases"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </output>
-    </operation>
-    <operation name="list_organisms">
-      <soap:operation soapAction="SOAP/KEGG#list_organisms"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </output>
-    </operation>
-    <operation name="list_pathways">
-      <soap:operation soapAction="SOAP/KEGG#list_pathways"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </output>
-    </operation>
-    <operation name="list_ko_classes">
-      <soap:operation soapAction="SOAP/KEGG#list_ko_classes"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </output>
-    </operation>
-<!-- DBGET -->
-    <operation name="binfo">
-      <soap:operation soapAction="SOAP/KEGG#binfo"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="bget">
-      <soap:operation soapAction="SOAP/KEGG#bget"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="bfind">
-      <soap:operation soapAction="SOAP/KEGG#bfind"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="btit">
-      <soap:operation soapAction="SOAP/KEGG#btit"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="bconv">
-      <soap:operation soapAction="SOAP/KEGG#bconv"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-<!-- LinkDB -->
-    <operation name="get_linkdb_by_entry">
-      <soap:operation soapAction="SOAP/KEGG#get_linkdb_by_entry"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-<!-- SSDB -->
-    <operation name="get_best_neighbors_by_gene">
-      <soap:operation soapAction="SOAP/KEGG#get_best_neighbors_by_gene"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_best_best_neighbors_by_gene">
-      <soap:operation soapAction="SOAP/KEGG#get_best_best_neighbors_by_gene"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_reverse_best_neighbors_by_gene">
-      <soap:operation soapAction="SOAP/KEGG#get_reverse_best_neighbors_by_gene"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_paralogs_by_gene">
-      <soap:operation soapAction="SOAP/KEGG#get_paralogs_by_gene"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-<!-- MOTIF -->
-    <operation name="get_motifs_by_gene">
-      <soap:operation soapAction="SOAP/KEGG#get_motifs_by_gene"/>
-      <input>
-
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_genes_by_motifs">
-      <soap:operation soapAction="SOAP/KEGG#get_genes_by_motifs"/>
-      <input>
-
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-<!-- KO,OC,PC -->
-    <operation name="get_ko_by_gene">
-      <soap:operation soapAction="SOAP/KEGG#get_ko_by_gene"/>
-
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_ko_by_ko_class">
-      <soap:operation soapAction="SOAP/KEGG#get_ko_by_ko_class"/>
-
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_genes_by_ko">
-      <soap:operation soapAction="SOAP/KEGG#get_genes_by_ko"/>
-
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_genes_by_ko_class">
-      <soap:operation soapAction="SOAP/KEGG#get_genes_by_ko_class"/>
-
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-<!--
-    <operation name="get_oc_members_by_gene">
-      <soap:operation soapAction="SOAP/KEGG#get_oc_members_by_gene"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
--->
-<!--
-    <operation name="get_pc_members_by_gene">
-      <soap:operation soapAction="SOAP/KEGG#get_pc_members_by_gene"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
--->
-<!-- PATHWAY -->
-
-<!-- Coloring pathways -->
-    <operation name="get_elements_by_pathway">
-      <soap:operation soapAction="SOAP/KEGG#get_elements_by_pathway"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-
-    </operation>
-    <operation name="get_element_relations_by_pathway">
-      <soap:operation soapAction="SOAP/KEGG#get_element_relations_by_pathway"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-
-    </operation>
-    <operation name="color_pathway_by_elements">
-      <soap:operation soapAction="SOAP/KEGG#color_pathway_by_elements"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-
-    </operation>
-    <operation name="get_html_of_colored_pathway_by_elements">
-      <soap:operation soapAction="SOAP/KEGG#get_html_of_colored_pathway_by_elements"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-
-    </operation>
-
-    <operation name="mark_pathway_by_objects">
-      <soap:operation soapAction="SOAP/KEGG#mark_pathway_by_objects"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </output>
-    </operation>
-    <operation name="color_pathway_by_objects">
-      <soap:operation soapAction="SOAP/KEGG#color_pathway_by_objects"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </output>
-    </operation>
-    <operation name="get_html_of_marked_pathway_by_objects">
-      <soap:operation soapAction="SOAP/KEGG#get_html_of_marked_pathway_by_objects"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </output>
-    </operation>
-    <operation name="get_html_of_colored_pathway_by_objects">
-      <soap:operation soapAction="SOAP/KEGG#get_html_of_colored_pathway_by_objects"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </output>
-    </operation>
-<!-- Objects on the pathway -->
-    <operation name="get_genes_by_pathway">
-      <soap:operation soapAction="SOAP/KEGG#get_genes_by_pathway"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_enzymes_by_pathway">
-      <soap:operation soapAction="SOAP/KEGG#get_enzymes_by_pathway"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_reactions_by_pathway">
-      <soap:operation soapAction="SOAP/KEGG#get_reactions_by_pathway"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-<!-- Pathways by object -->
-    <operation name="get_pathways_by_genes">
-      <soap:operation soapAction="SOAP/KEGG#get_pathways_by_genes"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_pathways_by_enzymes">
-      <soap:operation soapAction="SOAP/KEGG#get_pathways_by_enzymes"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_pathways_by_reactions">
-      <soap:operation soapAction="SOAP/KEGG#get_pathways_by_reactions"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-<!-- Mutual transformation of objects -->
-    <operation name="get_linked_pathways">
-      <soap:operation soapAction="SOAP/KEGG#get_linked_pathways"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_genes_by_enzyme">
-      <soap:operation soapAction="SOAP/KEGG#get_genes_by_enzyme"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_enzymes_by_gene">
-      <soap:operation soapAction="SOAP/KEGG#get_enzymes_by_gene"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_enzymes_by_reaction">
-      <soap:operation soapAction="SOAP/KEGG#get_enzymes_by_reaction"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_reactions_by_enzyme">
-      <soap:operation soapAction="SOAP/KEGG#get_reactions_by_enzyme"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-<!-- GENES -->
-    <operation name="get_genes_by_organism">
-      <soap:operation soapAction="SOAP/KEGG#get_genes_by_organism"/>
-      <input>
-
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-<!-- GENOME -->
-    <operation name="get_number_of_genes_by_organism">
-      <soap:operation soapAction="SOAP/KEGG#get_number_of_genes_by_organism"/>
-
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-<!-- LIGAND -->
-    <operation name="get_reactions_by_glycan">
-
-      <soap:operation soapAction="SOAP/KEGG#get_reactions_by_glycan"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_reactions_by_compound">
-
-      <soap:operation soapAction="SOAP/KEGG#get_reactions_by_compound"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_enzymes_by_glycan">
-
-      <soap:operation soapAction="SOAP/KEGG#get_enzymes_by_glycan"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_enzymes_by_compound">
-
-      <soap:operation soapAction="SOAP/KEGG#get_enzymes_by_compound"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_pathways_by_compounds">
-
-      <soap:operation soapAction="SOAP/KEGG#get_pathways_by_compounds"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_pathways_by_glycans">
-
-      <soap:operation soapAction="SOAP/KEGG#get_pathways_by_glycans"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_compounds_by_pathway">
-
-      <soap:operation soapAction="SOAP/KEGG#get_compounds_by_pathway"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_glycans_by_pathway">
-
-      <soap:operation soapAction="SOAP/KEGG#get_glycans_by_pathway"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_compounds_by_reaction">
-
-      <soap:operation soapAction="SOAP/KEGG#get_compounds_by_reaction"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_glycans_by_reaction">
-
-      <soap:operation soapAction="SOAP/KEGG#get_glycans_by_reaction"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_compounds_by_enzyme">
-
-      <soap:operation soapAction="SOAP/KEGG#get_compounds_by_enzyme"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_glycans_by_enzyme">
-
-      <soap:operation soapAction="SOAP/KEGG#get_glycans_by_enzyme"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="convert_mol_to_kcf">
-
-      <soap:operation soapAction="SOAP/KEGG#convert_mol_to_kcf"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_kos_by_pathway">
-
-      <soap:operation soapAction="SOAP/KEGG#get_kos_by_pathway"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-    <operation name="get_pathways_by_kos">
-
-      <soap:operation soapAction="SOAP/KEGG#get_pathways_by_kos"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-    </operation>
-
-<!-- v6.0 -->
-    <operation name="search_compounds_by_name">
-      <soap:operation soapAction="SOAP/KEGG#search_compounds_by_name"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-
-    </operation>
-    <operation name="search_glycans_by_name">
-      <soap:operation soapAction="SOAP/KEGG#search_glycans_by_name"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-
-    </operation>
-    <operation name="search_compounds_by_composition">
-      <soap:operation soapAction="SOAP/KEGG#search_compounds_by_composition"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-
-    </operation>
-    <operation name="search_compounds_by_mass">
-      <soap:operation soapAction="SOAP/KEGG#search_compounds_by_mass"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-
-    </operation>
-    <operation name="search_glycans_by_mass">
-      <soap:operation soapAction="SOAP/KEGG#search_glycans_by_mass"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-
-    </operation>
-    <operation name="search_glycans_by_composition">
-      <soap:operation soapAction="SOAP/KEGG#search_glycans_by_composition"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-
-    </operation>
-    <operation name="search_compounds_by_subcomp">
-      <soap:operation soapAction="SOAP/KEGG#search_compounds_by_subcomp"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-
-    </operation>
-    <operation name="search_glycans_by_kcam">
-      <soap:operation soapAction="SOAP/KEGG#search_glycans_by_kcam"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-
-    </operation>
-    <operation name="get_linkdb_between_databases">
-      <soap:operation soapAction="SOAP/KEGG#get_linkdb_between_databases"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </output>
-
-    </operation>
-
-<!-- v6.1 -->
-    <operation name="search_drugs_by_name">
-      <soap:operation soapAction="SOAP/KEGG#search_drugs_by_name"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </output>
-    </operation>
-    <operation name="search_drugs_by_composition">
-      <soap:operation soapAction="SOAP/KEGG#search_drugs_by_composition"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </output>
-    </operation>
-    <operation name="search_drugs_by_mass">
-      <soap:operation soapAction="SOAP/KEGG#search_drugs_by_mass"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </output>
-    </operation>
-    <operation name="search_drugs_by_subcomp">
-      <soap:operation soapAction="SOAP/KEGG#search_drugs_by_subcomp"/>
-      <input>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </input>
-      <output>
-        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-      </output>
-    </operation>
-
-  </binding>
-
-  <service name="KEGG">
-    <port name="KEGGPort" binding="typens:KEGGBinding">
-      <soap:address location="http://soap.genome.jp/keggapi/request_v6.1.cgi"/>
-    </port>
-  </service>
-
-</definitions>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/pom.xml b/taverna-wsdl-activity-ui/pom.xml
new file mode 100644
index 0000000..be2d224
--- /dev/null
+++ b/taverna-wsdl-activity-ui/pom.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>net.sf.taverna</groupId>
+		<artifactId>taverna-parent</artifactId>
+		<version>3.0.1-SNAPSHOT</version>
+	</parent>
+	<groupId>net.sf.taverna.t2.ui-activities</groupId>
+	<artifactId>wsdl-activity-ui</artifactId>
+        <version>2.0-SNAPSHOT</version>
+	<packaging>bundle</packaging>
+	<name>Taverna 2 WSDL Activity UI</name>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<!-- Use the java version instead of xmlcommons for javax.* packages -->
+						<Import-Package>javax.xml.namespace;version="0.0.0",javax.xml.parsers;version="0.0.0",org.w3c.dom;version="0.0.0",org.xml.sax;version="0.0.0",*</Import-Package>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-icons-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-palette-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.activities</groupId>
+			<artifactId>wsdl-activity</artifactId>
+			<version>${t2.activities.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-components</groupId>
+			<artifactId>credential-manager-ui</artifactId>
+			<version>${t2.ui.components.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>contextual-views-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-tools</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.lang</groupId>
+			<artifactId>ui</artifactId>
+			<version>${t2.lang.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>${junit.version}</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+	<repositories>
+		<repository>
+			<releases />
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+			<id>mygrid-repository</id>
+			<name>myGrid Repository</name>
+			<url>http://www.mygrid.org.uk/maven/repository
+			</url>
+		</repository>
+		<repository>
+			<releases>
+				<enabled>false</enabled>
+			</releases>
+			<snapshots />
+			<id>mygrid-snapshot-repository</id>
+			<name>myGrid Snapshot Repository</name>
+			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
+		</repository>
+	</repositories>
+</project>
+

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AbstractAddXMLSplitterAction.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AbstractAddXMLSplitterAction.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AbstractAddXMLSplitterAction.java
new file mode 100644
index 0000000..d92dab9
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AbstractAddXMLSplitterAction.java
@@ -0,0 +1,156 @@
+package net.sf.taverna.t2.activities.wsdl.actions;
+/*******************************************************************************
+ * Copyright (C) 2008 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+
+import java.awt.event.ActionEvent;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.swing.AbstractAction;
+import javax.swing.JComponent;
+import javax.swing.JOptionPane;
+import javax.wsdl.WSDLException;
+import javax.xml.parsers.ParserConfigurationException;
+
+import net.sf.taverna.t2.workbench.edits.EditException;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.wsdl.parser.ArrayTypeDescriptor;
+import net.sf.taverna.wsdl.parser.ComplexTypeDescriptor;
+import net.sf.taverna.wsdl.parser.TypeDescriptor;
+import net.sf.taverna.wsdl.parser.UnknownOperationException;
+
+import org.apache.log4j.Logger;
+import org.jdom.JDOMException;
+import org.xml.sax.SAXException;
+
+import uk.org.taverna.scufl2.api.activity.Activity;
+import uk.org.taverna.scufl2.api.common.Scufl2Tools;
+import uk.org.taverna.scufl2.api.core.Workflow;
+import uk.org.taverna.scufl2.api.profiles.Profile;
+
+/**
+ * Abstract superclass of {@link AddXMLOutputSplitterAction} and
+ * {@link AddXMLInputSplitterAction}.
+ * <p>
+ * Pops up a {@link JOptionPane} with the names of all the wsdl ports. The one
+ * that is selected is added as an input/output splitter to the currently open
+ * dataflow using the {@link AddXMLSplitterEdit}
+ *
+ * @author Ian Dunlop
+ * @author Stian Soiland-Reyes
+ * @author Stuart Owen
+ *
+ */
+@SuppressWarnings("serial")
+public abstract class AbstractAddXMLSplitterAction extends AbstractAction {
+
+	private static Logger logger = Logger.getLogger(AddXMLOutputSplitterAction.class);
+
+	protected Scufl2Tools scufl2Tools = new Scufl2Tools();
+
+	protected JComponent owner;
+	protected final Activity activity;
+	protected final EditManager editManager;
+	protected final SelectionManager selectionManager;
+
+	public AbstractAddXMLSplitterAction(Activity activity,
+			JComponent owner, EditManager editManager, SelectionManager selectionManager) {
+		this.activity = activity;
+		this.owner = owner;
+		this.editManager = editManager;
+		this.selectionManager = selectionManager;
+	}
+
+	public void actionPerformed(ActionEvent ev) {
+		List<String> possibilities;
+		Map<String, TypeDescriptor> typeDescriptors;
+		try {
+			typeDescriptors = getTypeDescriptors();
+		} catch (UnknownOperationException ex) {
+			logger.error("Can't find operation for activity "
+					+ activity, ex);
+			return;
+		} catch (IOException | ParserConfigurationException | WSDLException | SAXException | JDOMException ex) {
+			logger.error("Can't read definition for activity "
+					+ activity, ex);
+			return;
+		}
+
+		typeDescriptors = filterDescriptors(typeDescriptors);
+
+		possibilities = new ArrayList<String>(typeDescriptors.keySet());
+		if (possibilities.isEmpty()) {
+			logger.warn("No type descriptors found for activity " + activity);
+			return;
+		}
+		Collections.sort(possibilities);
+
+		String portName = (String) JOptionPane.showInputDialog(owner,
+				"Select the port to add the splitter to",
+				"Add output XML splitter", JOptionPane.PLAIN_MESSAGE, null,
+				possibilities.toArray(), possibilities.get(0));
+
+		Workflow workflow = selectionManager.getSelectedWorkflow();
+		Profile profile = selectionManager.getSelectedProfile();
+		TypeDescriptor typeDescriptorForPort = typeDescriptors
+				.get(portName);
+
+		if (typeDescriptorForPort instanceof ArrayTypeDescriptor
+				|| typeDescriptorForPort instanceof ComplexTypeDescriptor) {
+			AddXMLSplitterEdit edit = new AddXMLSplitterEdit(workflow, profile,
+					activity, typeDescriptorForPort, portName, isInput());
+			try {
+				editManager.doDataflowEdit(workflow.getParent(), edit);
+			} catch (EditException ex) {
+				logger.error("Could not perform edit to add " + portName, ex);
+			}
+		} else {
+			logger.warn("Unknown typedescriptor for " + portName);
+		}
+	}
+
+	public static Map<String, TypeDescriptor> filterDescriptors(
+			Map<String, TypeDescriptor> descriptors) {
+		Map<String, TypeDescriptor> filtered = new HashMap<String, TypeDescriptor>();
+		for (Entry<String, TypeDescriptor> entry : descriptors.entrySet()) {
+			TypeDescriptor descriptor = entry.getValue();
+			if (descriptor.getMimeType().contains("'text/xml'")) {
+				filtered.put(entry.getKey(), descriptor);
+			}
+		}
+		return filtered;
+	}
+
+	protected abstract boolean isInput();
+
+	public abstract Map<String, TypeDescriptor> getTypeDescriptors()
+			throws UnknownOperationException, IOException, ParserConfigurationException, WSDLException, SAXException, JDOMException;
+
+	public void setOwner(JComponent owner) {
+		this.owner = owner;
+	}
+}
\ No newline at end of file


[20/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-localworker-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/actions/LocalworkerActivityConfigurationAction.java
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/actions/LocalworkerActivityConfigurationAction.java b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/actions/LocalworkerActivityConfigurationAction.java
new file mode 100644
index 0000000..2016ad0
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/actions/LocalworkerActivityConfigurationAction.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.localworker.actions;
+
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+
+import javax.swing.Action;
+import javax.swing.JOptionPane;
+
+import net.sf.taverna.t2.activities.localworker.views.LocalworkerActivityConfigView;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
+import uk.org.taverna.configuration.app.ApplicationConfiguration;
+import uk.org.taverna.scufl2.api.activity.Activity;
+import uk.org.taverna.scufl2.api.common.Scufl2Tools;
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+/**
+ * The {@link LocalworkerActivity}s have pre-defined scripts, ports etc in a serialised form on
+ * disk. So if the user wants to change them they have to do so at own risk.
+ *
+ * @author Ian Dunlop
+ */
+@SuppressWarnings("serial")
+public class LocalworkerActivityConfigurationAction extends ActivityConfigurationAction {
+
+	public static final String EDIT_LOCALWORKER_SCRIPT = "Edit beanshell script";
+
+	private final EditManager editManager;
+
+	private final FileManager fileManager;
+
+	private final ApplicationConfiguration applicationConfiguration;
+
+	private Scufl2Tools scufl2Tools = new Scufl2Tools();
+
+	public LocalworkerActivityConfigurationAction(Activity activity, Frame owner,
+			EditManager editManager, FileManager fileManager,
+			ActivityIconManager activityIconManager,
+			ServiceDescriptionRegistry serviceDescriptionRegistry,
+			ApplicationConfiguration applicationConfiguration) {
+		super(activity, activityIconManager, serviceDescriptionRegistry);
+		this.editManager = editManager;
+		this.fileManager = fileManager;
+		this.applicationConfiguration = applicationConfiguration;
+		putValue(Action.NAME, EDIT_LOCALWORKER_SCRIPT);
+	}
+
+	/**
+	 * If the localworker has not been changed it pops up a {@link JOptionPane} warning the user
+	 * that they change things at their own risk. Otherwise just show the config view
+	 */
+	public void actionPerformed(ActionEvent e) {
+		Object[] options = { "Continue", "Cancel" };
+		Configuration configuration = scufl2Tools.configurationFor(activity, activity.getParent());
+		JsonNode json = configuration.getJson();
+		if (!json.get("isAltered").booleanValue()) {
+			int n = JOptionPane
+					.showOptionDialog(
+							null,
+							"Changing the properties of a Local Worker may affect its behaviour. Do you want to continue?",
+							"WARNING", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,
+							null, // do not use a
+							// custom Icon
+							options, options[0]);
+
+			if (n == 0) {
+				// continue was clicked so prepare for config
+				openDialog();
+			} else {
+				// do nothing
+			}
+		} else {
+			openDialog();
+		}
+	}
+
+	private void openDialog() {
+		ActivityConfigurationDialog currentDialog = ActivityConfigurationAction
+				.getDialog(getActivity());
+		if (currentDialog != null) {
+			currentDialog.toFront();
+			return;
+		}
+		final LocalworkerActivityConfigView localworkerConfigView = new LocalworkerActivityConfigView(
+				getActivity(), applicationConfiguration);
+		final ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(getActivity(),
+				localworkerConfigView, editManager);
+		ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
+
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/menu/ConfigureLocalworkerMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/menu/ConfigureLocalworkerMenuAction.java b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/menu/ConfigureLocalworkerMenuAction.java
new file mode 100644
index 0000000..3afed8d
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/menu/ConfigureLocalworkerMenuAction.java
@@ -0,0 +1,62 @@
+package net.sf.taverna.t2.activities.localworker.menu;
+
+import javax.swing.Action;
+
+import uk.org.taverna.configuration.app.ApplicationConfiguration;
+
+import net.sf.taverna.t2.activities.beanshell.actions.BeanshellActivityConfigurationAction;
+import net.sf.taverna.t2.activities.localworker.actions.LocalworkerActivityConfigurationAction;
+import net.sf.taverna.t2.activities.localworker.servicedescriptions.LocalworkerServiceDescription;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.ui.menu.ContextualMenuComponent;
+import net.sf.taverna.t2.ui.menu.MenuComponent;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+
+public class ConfigureLocalworkerMenuAction extends AbstractConfigureActivityMenuAction implements
+		MenuComponent, ContextualMenuComponent {
+
+	private EditManager editManager;
+	private FileManager fileManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ApplicationConfiguration applicationConfiguration;
+
+	public ConfigureLocalworkerMenuAction() {
+		super(LocalworkerServiceDescription.ACTIVITY_TYPE);
+	}
+
+	@Override
+	protected Action createAction() {
+		Action result = null;
+		result = new LocalworkerActivityConfigurationAction(findActivity(), getParentFrame(),
+				editManager, fileManager, activityIconManager, serviceDescriptionRegistry,
+				applicationConfiguration);
+		result.putValue(Action.NAME, BeanshellActivityConfigurationAction.EDIT_BEANSHELL_SCRIPT);
+		addMenuDots(result);
+		return result;
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setApplicationConfiguration(ApplicationConfiguration applicationConfiguration) {
+		this.applicationConfiguration = applicationConfiguration;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerActivityIcon.java
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerActivityIcon.java b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerActivityIcon.java
new file mode 100644
index 0000000..7d6bb5a
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerActivityIcon.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.localworker.servicedescriptions;
+
+import java.net.URI;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
+
+/**
+ *
+ * @author Alex Nenadic
+ * @author David Withers
+ */
+public class LocalworkerActivityIcon implements ActivityIconSPI {
+
+	private static Icon icon;
+
+	public int canProvideIconScore(URI activityType) {
+		if (LocalworkerServiceDescription.ACTIVITY_TYPE.equals(activityType))
+			return DEFAULT_ICON + 1;
+		else
+			return NO_ICON;
+	}
+
+	public Icon getIcon(URI activityType) {
+		return getLocalworkerIcon();
+	}
+
+	public static Icon getLocalworkerIcon() {
+		if (icon == null) {
+			icon = new ImageIcon(LocalworkerActivityIcon.class
+					.getResource("/localworker.png"));
+		}
+		return icon;
+	}
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceDescription.java
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceDescription.java b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceDescription.java
new file mode 100644
index 0000000..38718b8
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceDescription.java
@@ -0,0 +1,105 @@
+package net.sf.taverna.t2.activities.localworker.servicedescriptions;
+
+import java.net.URI;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.swing.Icon;
+
+import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+public class LocalworkerServiceDescription extends ServiceDescription {
+
+	public static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/localworker");
+
+	private static final String LOCALWORKER = ServiceDescription.LOCAL_SERVICES;
+
+	private JsonNode json;
+	private String operation;
+	private String category;
+	private String provider;
+	private String localworkerName;
+
+	public JsonNode getJson() {
+		return json;
+	}
+
+	public void setJson(JsonNode json) {
+		this.json = json;
+	}
+
+	public String getOperation() {
+		return operation;
+	}
+
+	public void setOperation(String operation) {
+		this.operation = operation;
+	}
+
+	public String getCategory() {
+		return category;
+	}
+
+	public void setCategory(String category) {
+		this.category = category;
+	}
+
+	public String getProvider() {
+		return provider;
+	}
+
+	public void setProvider(String provider) {
+		this.provider = provider;
+	}
+
+	public String getLocalworkerName() {
+		return localworkerName;
+	}
+
+	public void setLocalworkerName(String localworkerName) {
+		this.localworkerName = localworkerName;
+	}
+
+	public String getType() {
+		return "Localworker";
+	}
+
+	@Override
+	public URI getActivityType() {
+		return ACTIVITY_TYPE;
+	}
+
+	@Override
+	public Configuration getActivityConfiguration() {
+		Configuration configuration = new Configuration();
+		configuration.setType(ACTIVITY_TYPE.resolve("#Config"));
+		configuration.setJson(getJson());
+		return configuration;
+	}
+
+	@Override
+	public Icon getIcon() {
+		return LocalworkerActivityIcon.getLocalworkerIcon();
+	}
+
+	@Override
+	public String getName() {
+		return operation;
+	}
+
+	@Override
+	public List<? extends Comparable<?>> getPath() {
+		List<String> result =
+		Arrays.asList (LOCALWORKER, category);
+		return result;
+	}
+
+	@Override
+	protected List<Object> getIdentifyingData() {
+		return Arrays.<Object>asList(getJson());
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceProvider.java
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceProvider.java b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceProvider.java
new file mode 100644
index 0000000..42345db
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/servicedescriptions/LocalworkerServiceProvider.java
@@ -0,0 +1,297 @@
+package net.sf.taverna.t2.activities.localworker.servicedescriptions;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.swing.Icon;
+
+import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider;
+import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
+
+import org.apache.log4j.Logger;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class LocalworkerServiceProvider implements ServiceDescriptionProvider {
+
+	private static final String LOCALWORKER_NAMES = "/localworker_names";
+
+	private static final String LOCALWORKER_SERVICE = "Local service";
+
+	private static Logger logger = Logger.getLogger(Logger.class);
+
+	private static final URI providerId = URI
+			.create("http://taverna.sf.net/2010/service-provider/localworker");
+
+	/** Used to deserialize the Activities stored on disk */
+	private ObjectMapper objectMapper = new ObjectMapper();
+
+	private static Map<String, String> localWorkerToScript = new HashMap<String, String>();
+
+	static {
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.ByteArrayToString",
+				"Byte Array To String");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.DecodeBase64",
+				"Decode Base 64 to byte Array");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.EchoList", "Echo List");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings",
+				"Create Lots Of Strings");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.EncodeBase64",
+				"Encode Byte Array to Base 64");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks",
+				"Get image URLs from HTTP document");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.FilterStringList",
+				"Filter List of Strings by regex");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.FlattenList",
+				"Flatten List");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.PadNumber",
+				"Pad numeral with leading 0s");
+		localWorkerToScript.put(
+				"org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList",
+				"Filter list of strings extracting match to a regex");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.SendEmail",
+				"Send an Email");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.SliceList",
+				"Extract Elements from a List");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.SplitByRegex",
+				"Split string into string list by regular expression");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.StringConcat",
+				"Concatenate two strings");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.StringListMerge",
+				"Merge String List to a String");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.StringSetDifference",
+				"String List Difference");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.StringSetIntersection",
+				"String List Intersection");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.StringSetUnion",
+				"String List Union");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates",
+				"Remove String Duplicates");
+		localWorkerToScript.put(
+				"org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor",
+				"Always Fails");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.TestSometimesFails",
+				"Sometimes Fails");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.WebImageFetcher",
+				"Get Image From URL");
+		localWorkerToScript.put("org.embl.ebi.escience.scuflworkers.java.WebPageFetcher",
+				"Get Web Page from URL");
+
+		// xml:XPathText
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker",
+				"XPath From Text");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.xml.XSLTWorker",
+				"Transform XML");
+		localWorkerToScript.put(
+				"net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters",
+				"Transform XML with parameters");
+
+		// biojava
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker",
+				"Read Gen Bank File");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker",
+				"Reverse Complement DNA");
+		localWorkerToScript.put(
+				"net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker",
+				"Read Swiss Prot File");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker",
+				"Transcribe DNA");
+
+		// io
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.io.TextFileReader",
+				"Read Text File");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.io.TextFileWriter",
+				"Write Text File");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.io.LocalCommand",
+				"Execute Command Line App");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.io.FileListByExtTask",
+				"List Files by Extension");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask",
+				"List Files By Regex");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.io.DataRangeTask",
+				"Select Data Range From File");
+		localWorkerToScript.put(
+				"net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker",
+				"Concatenate Files");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker",
+				"Get Environment Variables as XML");
+
+		// ui
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ui.AskWorker", "Ask");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ui.SelectWorker", "Select");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ui.ChooseWorker", "Choose");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ui.TellWorker", "Tell");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ui.WarnWorker", "Warn");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker",
+				"Select File");
+		// ncbi
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker",
+				"Get Nucleotide FASTA");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker",
+				"Get Nucleotide GBSeq XML");
+		localWorkerToScript.put(
+				"net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker",
+				"Get Nucleotide INSDSeq XML");
+		localWorkerToScript.put(
+				"net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker",
+				"Get Nucleotide TinySeq XML");
+
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker",
+				"Get Protein FASTA");
+		localWorkerToScript.put(
+				"net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker",
+				"Get Protein INSDSeq XML");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker",
+				"Get Protein GBSeq XML");
+		localWorkerToScript.put(
+				"net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker",
+				"Get Protein TinySeq XML");
+
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker",
+				"Search PubMed XML");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker",
+				"Get PubMed XML By PMID");
+
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker",
+				"Execute SQL Query");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker",
+				"Execute SQL Update");
+
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.net.BrowseUrl",
+				"Open web browser at a URL");
+		localWorkerToScript.put("net.sourceforge.taverna.scuflworkers.net.ExtractHeader",
+				"Extract HTTP Header");
+	}
+
+	public String getName() {
+		return LOCALWORKER_SERVICE;
+	}
+
+	/**
+	 * Use the {@link net.sf.taverna.t2.activities.localworker.translator.LocalworkerTranslator} to
+	 * get a {@link Map} of all the local workers. Use the keys in this map
+	 * to load all the serialized activities from disk by using
+	 * <code> getClass().getResourceAsStream("/" + className) </code> to get
+	 * them and then the {@link ActivityXMLDeserializer} to get the actual {@link Activity}. Create
+	 * the {@link LocalworkerActivityItem} by
+	 * populating them with the correct ports and depths. Sets the category to
+	 * match the T1 version so that a query by category will split the local
+	 * workers in to the correct place.
+	 */
+	public void findServiceDescriptionsAsync(FindServiceDescriptionsCallBack callBack) {
+
+		List<ServiceDescription> items = new ArrayList<ServiceDescription>();
+
+		InputStream inputStream = getClass().getResourceAsStream(LOCALWORKER_NAMES);
+		if (inputStream == null) {
+			logger.error("Could not find resource " + LOCALWORKER_NAMES);
+			return;
+		}
+		BufferedReader inputReader = new BufferedReader(new InputStreamReader(inputStream));
+		String line = "";
+		String category = null;
+		try {
+			while ((line = inputReader.readLine()) != null) {
+				if (line.startsWith("category")) {
+					String[] split = line.split(":");
+					category = split[1];
+				} else {
+					LocalworkerServiceDescription createItem;
+					try {
+						createItem = createItem(line);
+					} catch (ItemCreationException e) {
+						logger.warn("Could not create item for: " + line, e);
+						continue;
+					}
+					createItem.setCategory(category);
+					createItem.setProvider("myGrid");
+					items.add(createItem);
+				}
+			}
+		} catch (IOException e1) {
+			logger.warn("Could not read local worker definitions from " + LOCALWORKER_NAMES);
+		}
+		callBack.partialResults(items);
+		callBack.finished();
+
+	}
+
+	@SuppressWarnings("serial")
+	public class ItemCreationException extends Exception {
+
+		public ItemCreationException() {
+			super();
+		}
+
+		public ItemCreationException(String message, Throwable cause) {
+			super(message, cause);
+		}
+
+		public ItemCreationException(String message) {
+			super(message);
+		}
+
+		public ItemCreationException(Throwable cause) {
+			super(cause);
+		}
+
+	}
+
+	/**
+	 * Loads the deserialised local worker from disk and creates a {@link LocalworkerActivityItem}
+	 * with the correct ports and script from it
+	 *
+	 * @param line
+	 * @return a LocalWorker with the appropriate Input/Output ports and script
+	 * @throws ItemCreationException
+	 */
+	private LocalworkerServiceDescription createItem(String line) throws ItemCreationException {
+		// get the file from disk
+		String resource = "/" + line + ".json";
+		InputStream resourceAsStream = getClass().getResourceAsStream(resource);
+		if (resourceAsStream == null) {
+			throw new ItemCreationException("Could not find resource " + resource);
+		}
+
+		JsonNode json;
+		try {
+			json = objectMapper.readTree(resourceAsStream);
+		} catch (IOException e) {
+			throw new ItemCreationException("Could not read resource " + resource, e);
+		}
+
+		LocalworkerServiceDescription item = new LocalworkerServiceDescription();
+		item.setJson(json);
+		item.setLocalworkerName(line);
+		item.setOperation(localWorkerToScript.get(line));
+		return item;
+
+	}
+
+	public Icon getIcon() {
+		return LocalworkerActivityIcon.getLocalworkerIcon();
+	}
+
+	@Override
+	public String toString() {
+		return "Local workers provider";
+	}
+
+	public static String getServiceNameFromClassname(String classname) {
+		return (localWorkerToScript.get(classname));
+	}
+
+	public String getId() {
+		return providerId.toString();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityConfigView.java
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityConfigView.java b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityConfigView.java
new file mode 100644
index 0000000..155c631
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityConfigView.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.localworker.views;
+
+import net.sf.taverna.t2.activities.beanshell.views.BeanshellConfigurationPanel;
+import uk.org.taverna.configuration.app.ApplicationConfiguration;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+@SuppressWarnings("serial")
+public class LocalworkerActivityConfigView extends BeanshellConfigurationPanel {
+
+	public LocalworkerActivityConfigView(Activity activity, ApplicationConfiguration applicationConfiguration) {
+		super(activity, applicationConfiguration);
+	}
+
+	public boolean isConfigurationChanged() {
+		boolean configurationChanged = super.isConfigurationChanged();
+		if (configurationChanged) {
+			getJson().put("isAltered", true);
+		}
+		return configurationChanged;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityContextualView.java
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityContextualView.java b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityContextualView.java
new file mode 100644
index 0000000..fc09d57
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityContextualView.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.localworker.views;
+
+import java.awt.Frame;
+
+import javax.swing.Action;
+
+import net.sf.taverna.t2.activities.localworker.actions.LocalworkerActivityConfigurationAction;
+import net.sf.taverna.t2.activities.localworker.servicedescriptions.LocalworkerServiceProvider;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
+import uk.org.taverna.configuration.app.ApplicationConfiguration;
+import uk.org.taverna.scufl2.api.activity.Activity;
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+import uk.org.taverna.scufl2.api.port.InputActivityPort;
+import uk.org.taverna.scufl2.api.port.OutputActivityPort;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+@SuppressWarnings("serial")
+public class LocalworkerActivityContextualView extends HTMLBasedActivityContextualView {
+
+	private final EditManager editManager;
+	private final FileManager fileManager;
+	private final ActivityIconManager activityIconManager;
+	private final ServiceDescriptionRegistry serviceDescriptionRegistry;
+
+	private final ApplicationConfiguration applicationConfiguration;
+
+	public LocalworkerActivityContextualView(Activity activity, EditManager editManager,
+			FileManager fileManager, ColourManager colourManager,
+			ActivityIconManager activityIconManager,
+			ServiceDescriptionRegistry serviceDescriptionRegistry,
+			ApplicationConfiguration applicationConfiguration) {
+		super(activity, colourManager);
+		this.editManager = editManager;
+		this.fileManager = fileManager;
+		this.activityIconManager = activityIconManager;
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+		this.applicationConfiguration = applicationConfiguration;
+	}
+
+	@Override
+	protected String getRawTableRowsHtml() {
+		StringBuilder html = new StringBuilder();
+		html.append("<tr><th>Input Port Name</th><th>Depth</th></tr>");
+		for (InputActivityPort inputActivityPort : getActivity().getInputPorts()) {
+			html.append("<tr><td>" + inputActivityPort.getName() + "</td><td>");
+			html.append(inputActivityPort.getDepth() + "</td></tr>");
+		}
+		html.append("<tr><th>Output Port Name</th><th>Depth</th></tr>");
+		for (OutputActivityPort outputActivityPort : getActivity().getOutputPorts()) {
+			html.append("<tr><td>" + outputActivityPort.getName() + "</td><td>");
+			html.append(outputActivityPort.getDepth() + "</td></tr>");
+		}
+		return html.toString();
+	}
+
+	@Override
+	public String getViewTitle() {
+		String result = "";
+		Configuration configuration = getConfigBean();
+		JsonNode json = configuration.getJson();
+		String workerName = LocalworkerServiceProvider.getServiceNameFromClassname(json.get(
+				"localworkerName").textValue());
+		if (json.get("isAltered").booleanValue()) {
+			result = "Altered local worker service";
+			if ((workerName != null) && !workerName.equals("")) {
+				result += " - originally " + workerName;
+			}
+		} else {
+			result = "Local worker service";
+			if ((workerName != null) && !workerName.equals("")) {
+				result += " - " + workerName;
+			}
+		}
+		return result;
+	}
+
+	@Override
+	public Action getConfigureAction(Frame owner) {
+		return new LocalworkerActivityConfigurationAction(getActivity(), owner, editManager,
+				fileManager, activityIconManager, serviceDescriptionRegistry,
+				applicationConfiguration);
+	}
+
+	@Override
+	public int getPreferredPosition() {
+		return 100;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityViewFactory.java
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityViewFactory.java b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityViewFactory.java
new file mode 100644
index 0000000..4fec0a2
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/java/net/sf/taverna/t2/activities/localworker/views/LocalworkerActivityViewFactory.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.localworker.views;
+
+import java.util.Arrays;
+import java.util.List;
+
+import net.sf.taverna.t2.activities.localworker.servicedescriptions.LocalworkerServiceDescription;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
+import uk.org.taverna.configuration.app.ApplicationConfiguration;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+public class LocalworkerActivityViewFactory implements ContextualViewFactory<Activity> {
+
+	private EditManager editManager;
+	private FileManager fileManager;
+	private ActivityIconManager activityIconManager;
+	private ColourManager colourManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ApplicationConfiguration applicationConfiguration;
+
+	public boolean canHandle(Object object) {
+		return object instanceof Activity
+				&& ((Activity) object).getType()
+						.equals(LocalworkerServiceDescription.ACTIVITY_TYPE);
+	}
+
+	public List<ContextualView> getViews(Activity activity) {
+		return Arrays.asList(new ContextualView[] { new LocalworkerActivityContextualView(activity,
+				editManager, fileManager, colourManager, activityIconManager,
+				serviceDescriptionRegistry, applicationConfiguration) });
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setColourManager(ColourManager colourManager) {
+		this.colourManager = colourManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setApplicationConfiguration(ApplicationConfiguration applicationConfiguration) {
+		this.applicationConfiguration = applicationConfiguration;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
new file mode 100644
index 0000000..c3c01e0
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.localworker.servicedescriptions.LocalworkerServiceProvider

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
new file mode 100644
index 0000000..5911ddf
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.localworker.menu.ConfigureLocalworkerMenuAction

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
new file mode 100644
index 0000000..720a022
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.localworker.servicedescriptions.LocalworkerActivityIcon
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
new file mode 100644
index 0000000..f1d2c0d
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.localworker.views.LocalworkerActivityViewFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/META-INF/spring/localworker-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/META-INF/spring/localworker-activity-ui-context-osgi.xml b/taverna-localworker-activity-ui/src/main/resources/META-INF/spring/localworker-activity-ui-context-osgi.xml
new file mode 100644
index 0000000..dd4c7a8
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/META-INF/spring/localworker-activity-ui-context-osgi.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:beans="http://www.springframework.org/schema/beans"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd
+                      http://www.springframework.org/schema/osgi
+                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+	<service ref="LocalworkerActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
+
+	<service ref="LocalworkerServiceProvider" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
+
+	<service ref="ConfigureLocalworkerMenuAction" auto-export="interfaces" />
+
+	<service ref="LocalworkerActivityViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
+
+	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
+	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
+	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
+	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
+	<reference id="serviceDescriptionRegistry" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry" />
+	<reference id="applicationConfiguration" interface="uk.org.taverna.configuration.app.ApplicationConfiguration" />
+
+</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/META-INF/spring/localworker-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/META-INF/spring/localworker-activity-ui-context.xml b/taverna-localworker-activity-ui/src/main/resources/META-INF/spring/localworker-activity-ui-context.xml
new file mode 100644
index 0000000..edcd6be
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/META-INF/spring/localworker-activity-ui-context.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+	<bean id="LocalworkerActivityIcon" class="net.sf.taverna.t2.activities.localworker.servicedescriptions.LocalworkerActivityIcon" />
+
+	<bean id="LocalworkerServiceProvider" class="net.sf.taverna.t2.activities.localworker.servicedescriptions.LocalworkerServiceProvider" />
+
+	<bean id="ConfigureLocalworkerMenuAction" class="net.sf.taverna.t2.activities.localworker.menu.ConfigureLocalworkerMenuAction">
+			<property name="editManager" ref="editManager" />
+			<property name="fileManager" ref="fileManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+			<property name="applicationConfiguration" ref="applicationConfiguration" />
+	</bean>
+
+	<bean id="LocalworkerActivityViewFactory" class="net.sf.taverna.t2.activities.localworker.views.LocalworkerActivityViewFactory">
+			<property name="editManager" ref="editManager" />
+			<property name="fileManager" ref="fileManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+			<property name="colourManager" ref="colourManager" />
+			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+			<property name="applicationConfiguration" ref="applicationConfiguration" />
+	</bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/localworker.png
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/localworker.png b/taverna-localworker-activity-ui/src/main/resources/localworker.png
new file mode 100644
index 0000000..758a457
Binary files /dev/null and b/taverna-localworker-activity-ui/src/main/resources/localworker.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/localworker_names
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/localworker_names b/taverna-localworker-activity-ui/src/main/resources/localworker_names
new file mode 100644
index 0000000..3df452c
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/localworker_names
@@ -0,0 +1,67 @@
+category:biojava
+net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker
+net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker
+net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker
+net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker
+category:io
+net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker
+net.sourceforge.taverna.scuflworkers.io.FileListByExtTask
+net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask
+net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker
+net.sourceforge.taverna.scuflworkers.io.LocalCommand
+net.sourceforge.taverna.scuflworkers.io.TextFileReader
+net.sourceforge.taverna.scuflworkers.io.TextFileWriter
+category:ui
+net.sourceforge.taverna.scuflworkers.ui.AskWorker
+net.sourceforge.taverna.scuflworkers.ui.ChooseWorker
+net.sourceforge.taverna.scuflworkers.ui.SelectFileWorker
+net.sourceforge.taverna.scuflworkers.ui.SelectWorker
+net.sourceforge.taverna.scuflworkers.ui.TellWorker
+net.sourceforge.taverna.scuflworkers.ui.WarnWorker
+category:xml
+net.sourceforge.taverna.scuflworkers.xml.XPathTextWorker
+net.sourceforge.taverna.scuflworkers.xml.XSLTWorker
+net.sourceforge.taverna.scuflworkers.xml.XSLTWorkerWithParameters
+category:list
+org.embl.ebi.escience.scuflworkers.java.EchoList
+org.embl.ebi.escience.scuflworkers.java.FlattenList
+org.embl.ebi.escience.scuflworkers.java.StringStripDuplicates
+org.embl.ebi.escience.scuflworkers.java.StringListMerge
+category:test
+org.embl.ebi.escience.scuflworkers.java.TestAlwaysFailingProcessor
+org.embl.ebi.escience.scuflworkers.java.EmitLotsOfStrings
+org.embl.ebi.escience.scuflworkers.java.TestSometimesFails
+category:text
+org.embl.ebi.escience.scuflworkers.java.ByteArrayToString
+org.embl.ebi.escience.scuflworkers.java.StringSetDifference
+org.embl.ebi.escience.scuflworkers.java.StringSetIntersection
+org.embl.ebi.escience.scuflworkers.java.StringSetUnion
+org.embl.ebi.escience.scuflworkers.java.PadNumber
+org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList
+org.embl.ebi.escience.scuflworkers.java.SplitByRegex
+org.embl.ebi.escience.scuflworkers.java.StringConcat
+org.embl.ebi.escience.scuflworkers.java.FilterStringList
+category:net
+org.embl.ebi.escience.scuflworkers.java.WebImageFetcher
+org.embl.ebi.escience.scuflworkers.java.WebPageFetcher
+org.embl.ebi.escience.scuflworkers.java.ExtractImageLinks
+org.embl.ebi.escience.scuflworkers.java.SendEmail
+net.sourceforge.taverna.scuflworkers.net.BrowseUrl
+net.sourceforge.taverna.scuflworkers.net.ExtractHeader
+category:base64
+org.embl.ebi.escience.scuflworkers.java.EncodeBase64
+org.embl.ebi.escience.scuflworkers.java.DecodeBase64
+category:ncbi
+net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker
+net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker
+net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker
+net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker
+net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker
+net.sourceforge.taverna.scuflworkers.ncbi.ProteinINSDSeqXMLWorker
+net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker
+net.sourceforge.taverna.scuflworkers.ncbi.ProteinTinySeqXMLWorker
+net.sourceforge.taverna.scuflworkers.ncbi.PubMedESearchWorker
+net.sourceforge.taverna.scuflworkers.ncbi.PubMedEFetchWorker
+category:jdbc
+net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker
+net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker
new file mode 100644
index 0000000..d6c62b2
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker
@@ -0,0 +1,74 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow">
+
+
+<class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import org.biojava.bio.seq.Sequence;
+import org.biojava.bio.seq.SequenceIterator;
+import org.biojava.bio.seq.io.SeqIOTools;
+import org.biojava.bio.seq.io.agave.AgaveWriter;
+
+BufferedReader getReader (String fileUrl) throws IOException {
+		InputStreamReader reader;
+		try {
+			reader = new FileReader(fileUrl);
+		}
+		catch (FileNotFoundException e) {
+			// try a real URL instead
+			URL url = new URL(fileUrl);
+			reader = new InputStreamReader (url.openStream());
+		}
+		return new BufferedReader(reader);
+	}
+
+if ((fileUrl == void) || (fileUrl == null)) {
+    throw new RuntimeException("The fileUrl must be specified");
+}
+
+BufferedReader br  = getReader(fileUrl);
+
+// read the GenBank File
+SequenceIterator sequences = SeqIOTools.readGenbank(br);
+
+// iterate through the sequences
+ByteArrayOutputStream os = new ByteArrayOutputStream();
+StringBuffer sb = new StringBuffer();
+AgaveWriter writer = new AgaveWriter();
+PrintStream ps = new PrintStream(os);
+
+while (sequences.hasNext()) {
+	Sequence seq = sequences.nextSequence();
+	writer.writeSequence(seq, ps);
+	sb.append(os.toString());
+}
+
+genbankdata = sb.toString();
+br.close();
+ps.close();
+  
+</script>
+  <dependencies class="java.util.Collections$SingletonList">
+    <element class="string">uk.org.mygrid.resources:biojava:1.4pre1</element>
+  </dependencies>
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>fileUrl</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>genbankdata</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/xml'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker.json
new file mode 100644
index 0000000..452850f
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import org.biojava.bio.seq.Sequence;\nimport org.biojava.bio.seq.SequenceIterator;\nimport org.biojava.bio.seq.io.SeqIOTools;\nimport org.biojava.bio.seq.io.agave.AgaveWriter;\n\nBufferedReader getReader (String fileUrl) throws IOException {\n\t\tInputStreamReader reader;\n\t\ttry {\n\t\t\treader = new FileReader(fileUrl);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t// try a real URL instead\n\t\t\tURL url = new URL(fileUrl);\n\t\t\treader = new InputStreamReader (url.openStream());\n\t\t}\n\t\treturn new BufferedReader(reader);\n\t}\n\nif ((fileUrl == void) || (fileUrl == null)) {\n    throw new RuntimeException(\"The fileUrl must be specified\");\n}\n\nBufferedReader br  = getReader(fileUrl);\n\n// read the GenBank File\nSequenceIterator sequences = SeqIOTools.readGenbank(br);\n\n// iterate through the sequences\nByteArrayOutputStream os = new ByteArrayOutputStream();\nStringBuffer sb = new StringBuffer();\nAgaveWriter writer = new AgaveWriter();\nPrintStrea
 m ps = new PrintStream(os);\n\nwhile (sequences.hasNext()) {\n\tSequence seq = sequences.nextSequence();\n\twriter.writeSequence(seq, ps);\n\tsb.append(os.toString());\n}\n\ngenbankdata = sb.toString();\nbr.close();\nps.close();\n  \n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.biojava.GenBankParserWorker",
+  "inputPorts" : [ {
+    "name" : "fileUrl",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "genbankdata",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker
new file mode 100644
index 0000000..0044c82
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker
@@ -0,0 +1,43 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import org.biojava.bio.seq.DNATools;
+import org.biojava.bio.symbol.SymbolList;
+
+if ((rawSeq == void) || (rawSeq == null)) {
+    throw new RuntimeException("The rawSeq must be specified");
+}
+
+// make a DNA SymbolListbena
+SymbolList symL = DNATools.createDNA(rawSeq);
+
+// reverse complement it
+symL = DNATools.reverseComplement(symL);
+
+// prove that it worked
+revSeq = symL.seqString();
+</script>
+  <dependencies class="java.util.Collections$SingletonList">
+    <element class="string">uk.org.mygrid.resources:biojava:1.4pre1</element>
+  </dependencies>
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>rawSeq</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>revSeq</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker.json
new file mode 100644
index 0000000..c214819
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import org.biojava.bio.seq.DNATools;\nimport org.biojava.bio.symbol.SymbolList;\n\nif ((rawSeq == void) || (rawSeq == null)) {\n    throw new RuntimeException(\"The rawSeq must be specified\");\n}\n\n// make a DNA SymbolListbena\nSymbolList symL = DNATools.createDNA(rawSeq);\n\n// reverse complement it\nsymL = DNATools.reverseComplement(symL);\n\n// prove that it worked\nrevSeq = symL.seqString();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.biojava.ReverseCompWorker",
+  "inputPorts" : [ {
+    "name" : "rawSeq",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "revSeq",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker
new file mode 100644
index 0000000..7f64778
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker
@@ -0,0 +1,72 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import org.biojava.bio.seq.Sequence;
+import org.biojava.bio.seq.SequenceIterator;
+import org.biojava.bio.seq.io.SeqIOTools;
+import org.biojava.bio.seq.io.agave.AgaveWriter;
+
+BufferedReader getReader (String fileUrl) throws IOException {
+		InputStreamReader reader;
+		try {
+			reader = new FileReader(fileUrl);
+		}
+		catch (FileNotFoundException e) {
+			// try a real URL instead
+			URL url = new URL(fileUrl);
+			reader = new InputStreamReader (url.openStream());
+		}
+		return new BufferedReader(reader);
+	}
+	
+if ((fileUrl == void) || (fileUrl == null)) {
+    throw new RuntimeException("The fileUrl must be specified");
+}
+	
+BufferedReader br = getReader(fileUrl);
+
+// read the EMBL File
+SequenceIterator sequences = SeqIOTools.readSwissprot(br);
+
+// Prepare the writer
+AgaveWriter writer = new AgaveWriter();
+ByteArrayOutputStream os = new ByteArrayOutputStream();
+StringBuffer sb = new StringBuffer();
+PrintStream ps = new PrintStream(os);
+
+// iterate through the sequences
+while (sequences.hasNext()) {
+	Sequence seq = sequences.nextSequence();
+	writer.writeSequence(seq, ps);
+	sb.append(os.toString());
+}
+results = sb.toString();
+
+br.close();
+ps.close();
+  
+</script>
+  <dependencies class="java.util.Collections$SingletonList">
+    <element class="string">uk.org.mygrid.resources:biojava:1.4pre1</element>
+  </dependencies>
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>fileUrl</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>results</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker.json
new file mode 100644
index 0000000..929c316
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import org.biojava.bio.seq.Sequence;\nimport org.biojava.bio.seq.SequenceIterator;\nimport org.biojava.bio.seq.io.SeqIOTools;\nimport org.biojava.bio.seq.io.agave.AgaveWriter;\n\nBufferedReader getReader (String fileUrl) throws IOException {\n\t\tInputStreamReader reader;\n\t\ttry {\n\t\t\treader = new FileReader(fileUrl);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t// try a real URL instead\n\t\t\tURL url = new URL(fileUrl);\n\t\t\treader = new InputStreamReader (url.openStream());\n\t\t}\n\t\treturn new BufferedReader(reader);\n\t}\n\t\nif ((fileUrl == void) || (fileUrl == null)) {\n    throw new RuntimeException(\"The fileUrl must be specified\");\n}\n\t\nBufferedReader br = getReader(fileUrl);\n\n// read the EMBL File\nSequenceIterator sequences = SeqIOTools.readSwissprot(br);\n\n// Prepare the writer\nAgaveWriter writer = new AgaveWriter();\nByteArrayOutputStream os = new ByteArrayOutputStream();\nStringBuffer sb = new StringBuffer();\nPrintStream ps = ne
 w PrintStream(os);\n\n// iterate through the sequences\nwhile (sequences.hasNext()) {\n\tSequence seq = sequences.nextSequence();\n\twriter.writeSequence(seq, ps);\n\tsb.append(os.toString());\n}\nresults = sb.toString();\n\nbr.close();\nps.close();\n  \n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.biojava.SwissProtParserWorker",
+  "inputPorts" : [ {
+    "name" : "fileUrl",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "results",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker
new file mode 100644
index 0000000..e46e219
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker
@@ -0,0 +1,48 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import org.biojava.bio.seq.DNATools;
+import org.biojava.bio.seq.RNATools;
+import org.biojava.bio.symbol.SymbolList;
+
+if ((dna_seq == void) || (dna_seq == null)) {
+	throw new RuntimeException("The dna_seq must be specified");
+}
+
+// make a DNA SymbolList
+SymbolList symL = DNATools.createDNA(dna_seq);
+
+// transcribe it to RNA (after BioJava 1.4 this method is
+// deprecated)
+symL = RNATools.transcribe(symL);
+
+// (after BioJava 1.4 use this method instead)
+// symL = DNATools.toRNA(symL);
+
+// just to prove it worked
+rna_seq = symL.seqString();
+</script>
+  <dependencies class="java.util.Collections$SingletonList">
+    <element class="string">uk.org.mygrid.resources:biojava:1.4pre1</element>
+  </dependencies>
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>dna_seq</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>rna_seq</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker.json
new file mode 100644
index 0000000..767852c
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker.json
@@ -0,0 +1,16 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import org.biojava.bio.seq.DNATools;\nimport org.biojava.bio.seq.RNATools;\nimport org.biojava.bio.symbol.SymbolList;\n\nif ((dna_seq == void) || (dna_seq == null)) {\n\tthrow new RuntimeException(\"The dna_seq must be specified\");\n}\n\n// make a DNA SymbolList\nSymbolList symL = DNATools.createDNA(dna_seq);\n\n// transcribe it to RNA (after BioJava 1.4 this method is\n// deprecated)\nsymL = RNATools.transcribe(symL);\n\n// (after BioJava 1.4 use this method instead)\n// symL = DNATools.toRNA(symL);\n\n// just to prove it worked\nrna_seq = symL.seqString();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker",
+  "inputPorts" : [ {
+    "name" : "dna_seq",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "rna_seq",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker
new file mode 100644
index 0000000..9ed72e4
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker
@@ -0,0 +1,101 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>BufferedReader getReader (String fileUrl) throws IOException {
+		InputStreamReader reader;
+		try {
+			reader = new FileReader(fileUrl);
+		}
+		catch (FileNotFoundException e) {
+			// try a real URL instead
+			URL url = new URL(fileUrl);
+			reader = new InputStreamReader (url.openStream());
+		}
+		return new BufferedReader(reader);
+	}
+
+String NEWLINE = System.getProperty("line.separator");
+
+boolean displayResults = false;
+if (displayresults != void) {
+	displayResults = Boolean.valueOf(displayresults).booleanValue();
+}
+
+StringBuffer sb = new StringBuffer(2000);
+
+if (outputfile == void) {
+	throw new RuntimeException("The 'outputfile' parameter cannot be null");
+}
+
+if (filelist == null) {
+	throw new RuntimeException("The 'filelist' parameter cannot be null");
+}
+
+String str = null;
+
+Writer writer = new FileWriter(outputfile);
+for (int i = 0; i &lt; filelist.size(); i++) {
+	BufferedReader reader = getReader(filelist.get(i));
+	while ((str = reader.readLine()) != null) {
+		writer.write(str);
+		writer.write(NEWLINE);
+
+		if (displayResults) {
+			sb.append(str);
+			sb.append(NEWLINE);
+		}
+	}
+
+	reader.close();
+
+}
+writer.flush();
+writer.close();
+
+if (displayResults) {
+	results= sb.toString();
+}
+
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>filelist</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>outputfile</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>displayresults</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>results</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker.json
new file mode 100644
index 0000000..d91d466
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker.json
@@ -0,0 +1,24 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "BufferedReader getReader (String fileUrl) throws IOException {\n\t\tInputStreamReader reader;\n\t\ttry {\n\t\t\treader = new FileReader(fileUrl);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t// try a real URL instead\n\t\t\tURL url = new URL(fileUrl);\n\t\t\treader = new InputStreamReader (url.openStream());\n\t\t}\n\t\treturn new BufferedReader(reader);\n\t}\n\nString NEWLINE = System.getProperty(\"line.separator\");\n\nboolean displayResults = false;\nif (displayresults != void) {\n\tdisplayResults = Boolean.valueOf(displayresults).booleanValue();\n}\n\nStringBuffer sb = new StringBuffer(2000);\n\nif (outputfile == void) {\n\tthrow new RuntimeException(\"The 'outputfile' parameter cannot be null\");\n}\n\nif (filelist == null) {\n\tthrow new RuntimeException(\"The 'filelist' parameter cannot be null\");\n}\n\nString str = null;\n\nWriter writer = new FileWriter(outputfile);\nfor (int i = 0; i < filelist.size(); i++) {\n\tBufferedReader reader = getReader(file
 list.get(i));\n\twhile ((str = reader.readLine()) != null) {\n\t\twriter.write(str);\n\t\twriter.write(NEWLINE);\n\n\t\tif (displayResults) {\n\t\t\tsb.append(str);\n\t\t\tsb.append(NEWLINE);\n\t\t}\n\t}\n\n\treader.close();\n\n}\nwriter.flush();\nwriter.close();\n\nif (displayResults) {\n\tresults= sb.toString();\n}\n\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker",
+  "inputPorts" : [ {
+    "name" : "filelist",
+    "depth" : 1,
+    "type" : "String"
+  }, {
+    "name" : "outputfile",
+    "depth" : 0,
+    "type" : "String"
+  }, {
+    "name" : "displayresults",
+    "depth" : 0,
+    "type" : "String"
+  } ],
+  "outputPorts" : [ {
+    "name" : "results",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker
new file mode 100644
index 0000000..410ceb0
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker
@@ -0,0 +1,33 @@
+<activity  xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="properties" to="properties" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>import java.net.URLEncoder;
+
+Properties sysProps = System.getProperties();
+Set keys = sysProps.keySet();
+Iterator it = keys.iterator();
+String currKey = null;
+StringBuffer sb = new StringBuffer();
+sb.append("&lt;?xml version=\"1.0\"?&gt;\n");
+sb.append("&lt;property-list&gt;\n");
+while (it.hasNext()) {
+	currKey = (String) it.next();
+	sb.append("&lt;property ");
+	sb.append(" name=\"" + URLEncoder.encode(currKey) + "\"");
+	sb.append(" value=\"" + URLEncoder.encode(sysProps.getProperty(currKey)) + "\"/&gt;\n");
+}
+sb.append("&lt;/property-list&gt;");
+
+properties = sb.toString();
+</script>
+  <dependencies />
+  <inputs />
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>properties</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/xml'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker.json
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker.json b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker.json
new file mode 100644
index 0000000..5dc2349
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker.json
@@ -0,0 +1,11 @@
+{
+  "classLoaderSharing" : "workflow",
+  "script" : "import java.net.URLEncoder;\n\nProperties sysProps = System.getProperties();\nSet keys = sysProps.keySet();\nIterator it = keys.iterator();\nString currKey = null;\nStringBuffer sb = new StringBuffer();\nsb.append(\"<?xml version=\\\"1.0\\\"?>\\n\");\nsb.append(\"<property-list>\\n\");\nwhile (it.hasNext()) {\n\tcurrKey = (String) it.next();\n\tsb.append(\"<property \");\n\tsb.append(\" name=\\\"\" + URLEncoder.encode(currKey) + \"\\\"\");\n\tsb.append(\" value=\\\"\" + URLEncoder.encode(sysProps.getProperty(currKey)) + \"\\\"/>\\n\");\n}\nsb.append(\"</property-list>\");\n\nproperties = sb.toString();\n",
+  "localworkerName" : "net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker",
+  "outputPorts" : [ {
+    "name" : "properties",
+    "depth" : 0,
+    "granularDepth" : 0
+  } ],
+  "isAltered" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask
----------------------------------------------------------------------
diff --git a/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask
new file mode 100644
index 0000000..910d0d6
--- /dev/null
+++ b/taverna-localworker-activity-ui/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask
@@ -0,0 +1,73 @@
+<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+  <script>class FileExtFilter implements FileFilter {
+
+	public FileExtFilter(String ext) {
+		this.ext = ext;
+	}
+
+	public boolean accept(File file) {
+		return file.getName().endsWith(ext);
+	}
+
+	String ext = null;
+}
+
+if (extension == void || extension.equals("")) {
+	throw new RuntimeException(
+			"The 'extension' parameter cannot be null.  Please enter a valid file extension.");
+}
+
+if (directory == void || directory.equals("")) {
+	throw new RuntimeException(
+			"The 'directory' parameter cannot be null.  Please enter a valid file directory.");
+}
+
+File dirObj = new File(directory);
+
+if (!dirObj.exists()) {
+	throw new RuntimeException("The 'directory' parameter specified:" + directory
+			+ "does not exist.  Please enter a valid file directory.");
+}
+
+File[] fileObjList = dirObj.listFiles(new FileExtFilter(extension));
+List filelist = new ArrayList();
+for (int i = 0; i &lt; fileObjList.length; i++) {
+	filelist.add(fileObjList[i].getAbsolutePath());
+}
+
+
+</script>
+  <dependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>directory</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>extension</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>'text/plain'</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>filelist</name>
+      <depth>1</depth>
+      <mimeTypes>
+        <string>l('text/plain')</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file


[13/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-external-tool-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationPanel.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationPanel.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationPanel.java
new file mode 100644
index 0000000..22500cd
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationPanel.java
@@ -0,0 +1,379 @@
+/**
+ *
+ */
+package net.sf.taverna.t2.activities.externaltool.manager;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.swing.AbstractAction;
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.DefaultListModel;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.ListSelectionModel;
+import javax.swing.SwingUtilities;
+import javax.swing.border.EmptyBorder;
+
+import net.sf.taverna.t2.activities.externaltool.manager.impl.InvocationGroupManagerImpl;
+import net.sf.taverna.t2.lang.observer.Observable;
+import net.sf.taverna.t2.lang.observer.Observer;
+import net.sf.taverna.t2.lang.ui.DeselectingButton;
+import net.sf.taverna.t2.lang.ui.ValidatingUserInputDialog;
+import net.sf.taverna.t2.workbench.helper.Helper;
+
+/**
+ * @author alanrw
+ *
+ */
+public class ToolInvocationConfigurationPanel extends JPanel implements
+		Observer<InvocationManagerEvent> {
+
+	public static final String HEADER_TEXT = "A tool can be set to run at an explicit location (e.g. on a specificic machine or one of a set of machines). Alternatively, it can be set to run at a symbolic location, which means the tool will then be run at the explicit location pointed to by the symbolic location.";
+
+	private static InvocationGroupManagerImpl manager = InvocationGroupManagerImpl.getInstance();
+
+	private final List<InvocationMechanismEditor<?>> invocationMechanismEditors;
+
+	private JTextArea headerText;
+
+	private static String EXPLICIT_LOCATIONS = "explicit locations";
+	private static String SYMBOLIC_LOCATIONS = "symbolic locations";
+
+	private List<MechanismCreator> mechanismCreators;
+
+	JList locationList = new JList();
+
+	DefaultListModel groupListModel = new DefaultListModel();
+	DefaultListModel mechanismListModel = new DefaultListModel();
+	JComboBox locationTypeCombo = new JComboBox(new String[] { EXPLICIT_LOCATIONS,
+			SYMBOLIC_LOCATIONS });
+
+	public ToolInvocationConfigurationPanel(List<MechanismCreator> mechanismCreators,
+			List<InvocationMechanismEditor<?>> invocationMechanismEditors) {
+		super();
+		this.mechanismCreators = mechanismCreators;
+		this.invocationMechanismEditors = invocationMechanismEditors;
+		manager.addObserver(this);
+
+		this.setLayout(new GridBagLayout());
+		GridBagConstraints gbc = new GridBagConstraints();
+
+		headerText = new JTextArea(HEADER_TEXT);
+		headerText.setLineWrap(true);
+		headerText.setWrapStyleWord(true);
+		headerText.setEditable(false);
+		headerText.setFocusable(false);
+		headerText.setBorder(new EmptyBorder(10, 10, 10, 10));
+
+		gbc.anchor = GridBagConstraints.WEST;
+		gbc.insets = new Insets(0, 0, 10, 0);
+		gbc.gridx = 0;
+		gbc.gridy = 0;
+		gbc.gridwidth = 1;
+		gbc.weightx = 1.0;
+		gbc.weighty = 0.0;
+		gbc.fill = GridBagConstraints.HORIZONTAL;
+		add(headerText, gbc);
+
+		JPanel locationPanel = new JPanel(new BorderLayout());
+		JPanel subPanel = new JPanel(new FlowLayout());
+		JLabel modify = new JLabel("Modify:");
+
+		locationTypeCombo.setSelectedItem(EXPLICIT_LOCATIONS);
+		locationTypeCombo.addActionListener(new ActionListener() {
+
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				switchList();
+			}
+		});
+		subPanel.add(modify);
+		subPanel.add(locationTypeCombo);
+
+		populateLists();
+		switchList();
+		locationList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+		locationList.setCellRenderer(new DefaultListCellRenderer() {
+			public Component getListCellRendererComponent(JList list, Object value, int index,
+					boolean isSelected, boolean cellHasFocus) {
+				Object toShow = value;
+				if (value instanceof InvocationGroup) {
+					InvocationGroup invocationGroup = (InvocationGroup) value;
+					toShow = invocationGroup.getName() + "  -->  "
+							+ invocationGroup.getMechanismName();
+				}
+				return super.getListCellRendererComponent(list, toShow, index, isSelected,
+						cellHasFocus);
+			}
+		});
+		locationPanel.add(new JScrollPane(locationList), BorderLayout.CENTER);
+		locationPanel.add(subPanel, BorderLayout.NORTH);
+
+		JPanel buttonPanel = new JPanel(new FlowLayout());
+		JButton helpButton = new DeselectingButton("Help", new AbstractAction() {
+
+			public void actionPerformed(ActionEvent e) {
+				Helper.showHelp(ToolInvocationConfigurationPanel.this);
+			}
+		});
+
+		buttonPanel.add(helpButton);
+
+		buttonPanel.add(addLocationButton());
+		buttonPanel.add(removeLocationButton());
+		buttonPanel.add(editLocationButton());
+		locationPanel.add(buttonPanel, BorderLayout.SOUTH);
+
+		gbc.gridy++;
+		gbc.weighty = 1;
+
+		gbc.fill = GridBagConstraints.BOTH;
+		gbc.anchor = GridBagConstraints.SOUTH;
+		gbc.insets = new Insets(10, 0, 0, 0);
+		this.add(locationPanel, gbc);
+	}
+
+	private void switchList() {
+		if (isShowingGroups()) {
+			locationList.setModel(groupListModel);
+		} else {
+			locationList.setModel(mechanismListModel);
+		}
+	}
+
+	private void populateLists() {
+		poopulateGroupList();
+		populateMechanismList();
+	}
+
+	private void populateMechanismList() {
+		Object currentSelection = locationList.getSelectedValue();
+		ArrayList<InvocationMechanism> mechanisms = new ArrayList<InvocationMechanism>();
+		mechanisms.addAll(manager.getMechanisms());
+		Collections.sort(mechanisms, new Comparator<InvocationMechanism>() {
+
+			@Override
+			public int compare(InvocationMechanism o1, InvocationMechanism o2) {
+				return o1.getName().compareTo(o2.getName());
+			}
+		});
+		mechanismListModel.clear();
+		for (InvocationMechanism m : mechanisms) {
+			mechanismListModel.addElement(m);
+		}
+		if ((currentSelection != null) && !isShowingGroups()) {
+			locationList.setSelectedValue(currentSelection, true);
+		}
+	}
+
+	private void poopulateGroupList() {
+		Object currentSelection = locationList.getSelectedValue();
+		ArrayList<InvocationGroup> groups = new ArrayList<InvocationGroup>();
+		groups.addAll(manager.getInvocationGroups());
+		Collections.sort(groups, new Comparator<InvocationGroup>() {
+
+			@Override
+			public int compare(InvocationGroup o1, InvocationGroup o2) {
+				return o1.getName().compareTo(o2.getName());
+			}
+		});
+		groupListModel.clear();
+		for (InvocationGroup g : groups) {
+			groupListModel.addElement(g);
+		}
+		if ((currentSelection != null) && isShowingGroups()) {
+			locationList.setSelectedValue(currentSelection, true);
+		}
+	}
+
+	private boolean isShowingGroups() {
+		return (locationTypeCombo.getSelectedItem().equals(SYMBOLIC_LOCATIONS));
+	}
+
+	private JButton addLocationButton() {
+		final JButton result = new DeselectingButton("Add", new AbstractAction() {
+
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				if (isShowingGroups()) {
+					Set<String> usedGroupNames = new HashSet<String>();
+					for (InvocationGroup g : manager.getInvocationGroups()) {
+						usedGroupNames.add(g.getName());
+					}
+
+					GroupPanel inputPanel = new GroupPanel(mechanismListModel.toArray());
+
+					ValidatingUserInputDialog vuid = new ValidatingUserInputDialog(
+							"Add symbolic location", inputPanel);
+					vuid.addTextComponentValidation(inputPanel.getGroupNameField(),
+							"Set the symbolic location name.", usedGroupNames,
+							"Duplicate symbolic location name.", "[\\p{L}\\p{Digit}_.]+",
+							"Invalid symbolic location name.");
+					vuid.setSize(new Dimension(400, 250));
+
+					if (vuid.show(ToolInvocationConfigurationPanel.this)) {
+						String groupName = inputPanel.getGroupName();
+						InvocationGroup newGroup = new InvocationGroup(mechanismCreators);
+						newGroup.setName(groupName);
+						newGroup.setMechanism(inputPanel.getSelectedMechanism());
+						manager.addInvocationGroup(newGroup);
+						locationList.setSelectedValue(newGroup, true);
+					}
+				} else {
+					Set<String> usedNames = new HashSet<String>();
+					for (InvocationMechanism m : manager.getMechanisms()) {
+						usedNames.add(m.getName());
+					}
+
+					MechanismPanel inputPanel = new MechanismPanel(invocationMechanismEditors);
+
+					ValidatingUserInputDialog vuid = new ValidatingUserInputDialog(
+							"Add explicit location", inputPanel);
+					vuid.addTextComponentValidation(inputPanel.getMechanismNameField(),
+							"Set the explicit location name.", usedNames,
+							"Duplicate explicit location name.", "[\\p{L}\\p{Digit}_.]+",
+							"Invalid explicit location name.");
+					vuid.addMessageComponent(inputPanel.getMechanismTypeSelector(),
+							"Set the location name and type.");
+					vuid.setSize(new Dimension(400, 250));
+
+					if (vuid.show(ToolInvocationConfigurationPanel.this)) {
+						String mechanismName = inputPanel.getMechanismName();
+						String mechanismTypeName = inputPanel.getMechanismTypeName();
+						InvocationMechanismEditor ime = findEditor(mechanismTypeName);
+						InvocationMechanism newMechanism = ime.createMechanism(mechanismName);
+						manager.addMechanism(newMechanism);
+						ime.show(newMechanism);
+						ime.setPreferredSize(new Dimension(550, 500));
+						int answer = JOptionPane.showConfirmDialog(
+								ToolInvocationConfigurationPanel.this, ime,
+								"New explicit location", JOptionPane.OK_CANCEL_OPTION,
+								JOptionPane.PLAIN_MESSAGE, null);
+						if (answer == JOptionPane.OK_OPTION) {
+							ime.updateInvocationMechanism();
+							InvocationGroupManagerImpl.getInstance().mechanismChanged(newMechanism);
+						}
+						locationList.setSelectedValue(newMechanism, true);
+					}
+				}
+			}
+		});
+		return result;
+	}
+
+	private JButton removeLocationButton() {
+		JButton result = new DeselectingButton("Remove", new AbstractAction() {
+
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				if (isShowingGroups()) {
+					InvocationGroup toRemove = (InvocationGroup) locationList.getSelectedValue();
+					if ((toRemove != null) && !toRemove.equals(manager.getDefaultGroup())) {
+						manager.removeInvocationGroup(toRemove);
+					}
+					locationList.setSelectedValue(manager.getDefaultGroup(), true);
+				} else {
+					InvocationMechanism toRemove = (InvocationMechanism) locationList
+							.getSelectedValue();
+					if ((toRemove != null) && !toRemove.equals(manager.getDefaultMechanism())) {
+						manager.removeMechanism(toRemove);
+						locationList.setSelectedValue(manager.getDefaultMechanism(), true);
+					}
+				}
+			}
+		});
+		return result;
+	}
+
+	private JButton editLocationButton() {
+		final JButton result = new DeselectingButton("Edit", new AbstractAction() {
+
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				if (isShowingGroups()) {
+					InvocationGroup toEdit = (InvocationGroup) locationList.getSelectedValue();
+					if (toEdit != null) {
+						InvocationMechanism chosenMechanism = (InvocationMechanism) JOptionPane
+								.showInputDialog(ToolInvocationConfigurationPanel.this,
+										"Select an explicit location", "Edit symbolic location",
+										JOptionPane.PLAIN_MESSAGE, null,
+										mechanismListModel.toArray(), toEdit.getMechanism());
+						if (chosenMechanism != null) {
+							toEdit.setMechanism(chosenMechanism);
+							manager.groupChanged(toEdit);
+						}
+					}
+				} else {
+					InvocationMechanism toEdit = (InvocationMechanism) locationList
+							.getSelectedValue();
+					if (toEdit != null) {
+						InvocationMechanismEditor ime = findEditor(toEdit.getClass());
+						ime.show(toEdit);
+						ime.setPreferredSize(new Dimension(550, 500));
+						int answer = JOptionPane.showConfirmDialog(
+								ToolInvocationConfigurationPanel.this, ime,
+								"Edit explicit location", JOptionPane.OK_CANCEL_OPTION,
+								JOptionPane.PLAIN_MESSAGE, null);
+						if (answer == JOptionPane.OK_OPTION) {
+							ime.updateInvocationMechanism();
+							InvocationGroupManagerImpl.getInstance().mechanismChanged(toEdit);
+						}
+					}
+				}
+			}
+		});
+		return result;
+	}
+
+	protected InvocationMechanismEditor findEditor(String name) {
+		for (InvocationMechanismEditor ime : invocationMechanismEditors) {
+			if (ime.getName().equalsIgnoreCase(name)) {
+				return ime;
+			}
+		}
+		return null;
+	}
+
+	protected InvocationMechanismEditor findEditor(Class c) {
+		for (InvocationMechanismEditor ime : invocationMechanismEditors) {
+			if (ime.canShow(c)) {
+				return ime;
+			}
+		}
+		return null;
+	}
+
+	@Override
+	public void notify(Observable<InvocationManagerEvent> arg0, InvocationManagerEvent arg1)
+			throws Exception {
+		if (SwingUtilities.isEventDispatchThread()) {
+			populateLists();
+		} else {
+			SwingUtilities.invokeLater(new Runnable() {
+				public void run() {
+					populateLists();
+				}
+			});
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationUIFactory.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationUIFactory.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationUIFactory.java
new file mode 100644
index 0000000..82dd443
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ToolInvocationConfigurationUIFactory.java
@@ -0,0 +1,54 @@
+/**
+ *
+ */
+package net.sf.taverna.t2.activities.externaltool.manager;
+
+import java.util.List;
+
+import javax.swing.JPanel;
+
+import uk.org.taverna.configuration.Configurable;
+import uk.org.taverna.configuration.ConfigurationUIFactory;
+
+import net.sf.taverna.t2.activities.externaltool.configuration.ToolInvocationConfiguration;
+
+/**
+ * @author alanrw
+ *
+ */
+public class ToolInvocationConfigurationUIFactory implements ConfigurationUIFactory {
+
+	private List<MechanismCreator> mechanismCreators;
+	private List<InvocationMechanismEditor<?>> invocationMechanismEditors;
+
+	private ToolInvocationConfigurationPanel configPanel;
+
+	@Override
+	public boolean canHandle(String uuid) {
+		return uuid.equals(getConfigurable().getUUID());
+	}
+
+	@Override
+	public Configurable getConfigurable() {
+		return ToolInvocationConfiguration.getInstance();
+	}
+
+	@Override
+	public JPanel getConfigurationPanel() {
+		if (configPanel == null) {
+			configPanel = new ToolInvocationConfigurationPanel(mechanismCreators,
+					invocationMechanismEditors);
+		}
+		return configPanel;
+	}
+
+	public void setMechanismCreators(List<MechanismCreator> mechanismCreators) {
+		this.mechanismCreators = mechanismCreators;
+	}
+
+	public void setInvocationMechanismEditors(
+			List<InvocationMechanismEditor<?>> invocationMechanismEditors) {
+		this.invocationMechanismEditors = invocationMechanismEditors;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/local/LocalInvocationMechanismEditor.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/local/LocalInvocationMechanismEditor.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/local/LocalInvocationMechanismEditor.java
new file mode 100644
index 0000000..64fcc36
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/local/LocalInvocationMechanismEditor.java
@@ -0,0 +1,122 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.manager.local;
+
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import net.sf.taverna.t2.activities.externaltool.local.ExternalToolLocalInvocationMechanism;
+import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanism;
+import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor;
+
+/**
+ * @author alanrw
+ *
+ */
+public final class LocalInvocationMechanismEditor extends
+		InvocationMechanismEditor<ExternalToolLocalInvocationMechanism> {
+
+	private ExternalToolLocalInvocationMechanism invocationMechanism;
+	
+	private JTextField directoryField = new JTextField(30);
+	
+	private JTextField shellPrefixField = new JTextField(30);
+	
+	private JTextField linkCommandField = new JTextField(30);
+	
+	private JCheckBox retrieveDataField = new JCheckBox();
+	
+
+	@Override
+	public boolean canShow(Class<?> c) {
+		return ExternalToolLocalInvocationMechanism.class.isAssignableFrom(c);
+	}
+
+	@Override
+	public String getName() {
+		return ("Local");
+	}
+
+	@Override
+	public void show(ExternalToolLocalInvocationMechanism invocationMechanism) {
+		this.invocationMechanism = invocationMechanism;
+		this.removeAll();
+		final JPanel innerPanel = new JPanel(new GridBagLayout());
+		final GridBagConstraints inputConstraint = new GridBagConstraints();
+//		inputConstraint.insets = new Insets(5,5,5,5);
+		inputConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
+		inputConstraint.gridx = 0;
+		inputConstraint.gridy = 0;
+		inputConstraint.weightx = 0.1;
+		inputConstraint.fill = GridBagConstraints.BOTH;
+		innerPanel.add(new JLabel("Working directory: "), inputConstraint);
+		inputConstraint.gridx++;
+		directoryField.setText(invocationMechanism.getDirectory());
+		innerPanel.add(directoryField, inputConstraint);
+		inputConstraint.gridx = 0;
+		inputConstraint.gridy++;
+		innerPanel.add(new JLabel("Shell: "), inputConstraint);
+		inputConstraint.gridx++;
+		shellPrefixField.setText(invocationMechanism.getShellPrefix());
+		innerPanel.add(shellPrefixField, inputConstraint);
+		
+		inputConstraint.gridx = 0;
+		inputConstraint.gridy++;
+		innerPanel.add(new JLabel("Link command: "), inputConstraint);
+		inputConstraint.gridx++;
+		linkCommandField.setText(invocationMechanism.getLinkCommand());
+		innerPanel.add(linkCommandField, inputConstraint);
+		
+		inputConstraint.gridx = 0;
+		inputConstraint.gridy++;
+		innerPanel.add(new JLabel("Fetch data: "), inputConstraint);
+		inputConstraint.gridx++;
+		retrieveDataField.setSelected(invocationMechanism.isRetrieveData());
+		innerPanel.add(retrieveDataField, inputConstraint);
+		
+		this.add(innerPanel);
+	}
+
+	@Override
+	public ExternalToolLocalInvocationMechanism updateInvocationMechanism() {
+		if ((directoryField.getText() == null) || (directoryField.getText().length() == 0)) {
+			invocationMechanism.setDirectory(null);
+		} else {
+			invocationMechanism.setDirectory(directoryField.getText());
+		}
+		if ((shellPrefixField.getText() == null) || (shellPrefixField.getText().length() == 0)) {
+			invocationMechanism.setShellPrefix(null);
+		} else {
+			invocationMechanism.setShellPrefix(shellPrefixField.getText());
+		}
+		if ((shellPrefixField.getText() == null) || (shellPrefixField.getText().length() == 0)) {
+			invocationMechanism.setShellPrefix(null);
+		} else {
+			invocationMechanism.setShellPrefix(shellPrefixField.getText());
+		}
+		if ((linkCommandField.getText() == null) || (linkCommandField.getText().length() == 0)) {
+			invocationMechanism.setLinkCommand(null);
+		} else {
+			invocationMechanism.setLinkCommand(linkCommandField.getText());
+		}
+		invocationMechanism.setRetrieveData(retrieveDataField.isSelected());
+		return invocationMechanism;
+	}
+
+	@Override
+	public InvocationMechanism createMechanism(String mechanismName) {
+		ExternalToolLocalInvocationMechanism result = new ExternalToolLocalInvocationMechanism();
+		result.setName(mechanismName);
+		return(result);
+	}
+
+	public boolean isSingleton() {
+		return true;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/ExternalToolSshNodeViewer.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/ExternalToolSshNodeViewer.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/ExternalToolSshNodeViewer.java
new file mode 100644
index 0000000..fb837c5
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/ExternalToolSshNodeViewer.java
@@ -0,0 +1,110 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.manager.ssh;
+
+import javax.swing.JCheckBox;
+import javax.swing.JTextField;
+
+import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanism;
+
+import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNode;
+
+
+
+/**
+ * @author alanrw
+ *
+ */
+public class ExternalToolSshNodeViewer {
+	
+	private JTextField hostnameField;
+	private JTextField portField;
+	private JTextField directoryField;
+	private JTextField linkCommandField;
+	private JTextField copyCommandField;
+	private JCheckBox retrieveDataField;
+
+	public ExternalToolSshNodeViewer(SshNode node) {
+		this();
+		hostnameField.setText(node.getHost());
+		portField.setText(Integer.toString(node.getPort()));
+		if (node.getDirectory() != null) {
+			directoryField.setText(node.getDirectory());
+		} else {
+			directoryField.setText("");
+		}
+		if (node.getLinkCommand() != null) {
+			linkCommandField.setText(node.getLinkCommand());
+		} else {
+			linkCommandField.setText("");
+		}
+		if (node.getCopyCommand() != null) {
+			copyCommandField.setText(node.getCopyCommand());
+		} else {
+			copyCommandField.setText("");
+		}
+		retrieveDataField.setSelected(node.isRetrieveData());
+	}
+
+	public ExternalToolSshNodeViewer() {
+		hostnameField = new JTextField(30);
+		hostnameField.setText(SshNode.DEFAULT_HOST);
+		portField = new JTextField(3);
+		portField.setText("" + SshNode.DEFAULT_PORT);
+		directoryField = new JTextField(30);
+		directoryField.setText(SshNode.DEFAULT_DIRECTORY);
+		linkCommandField = new JTextField(30);
+		linkCommandField.setText(InvocationMechanism.UNIX_LINK);
+		copyCommandField = new JTextField(30);
+		copyCommandField.setText(InvocationMechanism.UNIX_COPY);
+		retrieveDataField = new JCheckBox();
+	}
+
+	public JTextField getHostnameField() {
+		return hostnameField;
+	}
+
+	public JTextField getPortField() {
+		return portField;
+	}
+	
+	public JTextField getDirectoryField() {
+		return directoryField;
+	}
+
+	public JTextField getLinkCommandField() {
+		return linkCommandField;
+	}
+
+	public JTextField getCopyCommandField() {
+		return copyCommandField;
+	}
+
+	public String getHostname() {
+		return hostnameField.getText();
+	}
+
+	public int getPort() {
+		return Integer.parseInt(portField.getText());
+	}
+	
+	public String getDirectory() {
+		return directoryField.getText();
+	}
+	
+	public String getLinkCommand() {
+		return linkCommandField.getText();
+	}
+	
+	public String getCopyCommand() {
+		return copyCommandField.getText();
+	}
+
+	/**
+	 * @return the retrieveDataField
+	 */
+	public JCheckBox getRetrieveDataField() {
+		return retrieveDataField;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/SshInvocationMechanismEditor.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/SshInvocationMechanismEditor.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/SshInvocationMechanismEditor.java
new file mode 100644
index 0000000..e8291ed
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/manager/ssh/SshInvocationMechanismEditor.java
@@ -0,0 +1,234 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.manager.ssh;
+
+import java.awt.Color;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.AbstractAction;
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextField;
+import javax.swing.border.CompoundBorder;
+
+import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanism;
+import net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor;
+import net.sf.taverna.t2.activities.externaltool.ssh.ExternalToolSshInvocationMechanism;
+import net.sf.taverna.t2.lang.ui.DeselectingButton;
+import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNode;
+import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNodeFactory;
+
+/**
+ * @author alanrw
+ *
+ */
+public final class SshInvocationMechanismEditor extends
+		InvocationMechanismEditor<ExternalToolSshInvocationMechanism> {
+	
+	private ArrayList<ExternalToolSshNodeViewer> nodeViewers = new ArrayList<ExternalToolSshNodeViewer>();
+	private int inputGridy = 0;
+	
+	private ExternalToolSshInvocationMechanism mechanism = null;
+	
+	private static Insets insets = new Insets(1,5,1,5);
+	
+	private static CompoundBorder border = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,5,5,5), BorderFactory.createLineBorder(Color.BLACK, 1));
+
+	@Override
+	public boolean canShow(Class<?> c) {
+		return ExternalToolSshInvocationMechanism.class.isAssignableFrom(c);
+	}
+
+	@Override
+	public void show(ExternalToolSshInvocationMechanism invocationMechanism) {
+		mechanism = invocationMechanism;
+		this.removeAll();
+		inputGridy = 1;
+		final JPanel innerPanel = new JPanel(new GridBagLayout());
+
+		final GridBagConstraints inputConstraint = new GridBagConstraints();
+		inputConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
+		inputConstraint.gridx = 0;
+		inputConstraint.gridy = 0;
+		inputConstraint.weightx = 0.1;
+		inputConstraint.fill = GridBagConstraints.BOTH;
+
+		inputConstraint.gridx = 0;
+			nodeViewers.clear();
+			for (SshNode node : invocationMechanism.getNodes()) {
+				ExternalToolSshNodeViewer nodeViewer = new ExternalToolSshNodeViewer(node);
+				addNodeViewer(this, innerPanel, nodeViewer);
+			}
+
+		this.setLayout(new GridBagLayout());
+		GridBagConstraints outerPanelConstraint = new GridBagConstraints();
+		outerPanelConstraint.gridx = 0;
+		outerPanelConstraint.gridy = 0;
+		outerPanelConstraint.weightx = 0.1;
+		outerPanelConstraint.weighty = 0.1;
+		outerPanelConstraint.fill = GridBagConstraints.BOTH;
+		this.add(new JScrollPane(innerPanel),
+				outerPanelConstraint);
+		outerPanelConstraint.weighty = 0;
+		final JButton addHostButton = new DeselectingButton("Add host",
+				new AbstractAction() {
+			public void actionPerformed(ActionEvent e) {
+
+				ExternalToolSshNodeViewer newViewer = new ExternalToolSshNodeViewer();
+
+					addNodeViewer(SshInvocationMechanismEditor.this, innerPanel, newViewer);
+					innerPanel.revalidate();
+					innerPanel.repaint();
+			}
+
+		});
+		JPanel buttonPanel = new JPanel();
+		buttonPanel.setLayout(new GridBagLayout());
+
+		JPanel filler = new JPanel();
+		outerPanelConstraint.weightx = 0.1;
+		outerPanelConstraint.weighty = 0;
+		outerPanelConstraint.gridx = 0;
+		outerPanelConstraint.gridy = 0;
+
+		buttonPanel.add(filler, outerPanelConstraint);
+
+		outerPanelConstraint.weightx = 0;
+		outerPanelConstraint.weighty = 0;
+		outerPanelConstraint.gridx = 1;
+		outerPanelConstraint.gridy = 0;
+
+		buttonPanel.add(addHostButton, outerPanelConstraint);
+
+		outerPanelConstraint.weightx = 0;
+		outerPanelConstraint.weighty = 0;
+		outerPanelConstraint.gridx = 0;
+		outerPanelConstraint.gridy = 1;
+		outerPanelConstraint.fill = GridBagConstraints.BOTH;
+		this.add(buttonPanel, outerPanelConstraint);
+	}
+
+	protected void addNodeViewer(final JPanel result, final JPanel innerPanel,
+			ExternalToolSshNodeViewer viewer) {
+		final JPanel subPanel = new JPanel();
+		subPanel.setLayout(new GridBagLayout());
+		subPanel.setBorder(border);
+		final GridBagConstraints inputConstraint = new GridBagConstraints();
+		inputConstraint.insets = insets;
+		inputConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
+		inputConstraint.weightx = 0.1;
+		inputConstraint.fill = GridBagConstraints.BOTH;
+
+		inputConstraint.gridy = 0 ;
+		inputConstraint.gridx = 0;
+		
+		subPanel.add(new JLabel("Host: "), inputConstraint);
+		final JTextField hostnameField = viewer.getHostnameField();
+		inputConstraint.gridx++;
+		subPanel.add(hostnameField, inputConstraint);
+
+		inputConstraint.gridy++ ;
+		inputConstraint.gridx = 0;
+		subPanel.add(new JLabel("Port: "), inputConstraint);
+		final JTextField portField = viewer.getPortField();
+		inputConstraint.gridx++;
+		subPanel.add(portField ,inputConstraint);
+		
+		inputConstraint.gridy++ ;
+		inputConstraint.gridx = 0;
+		subPanel.add(new JLabel("Working directory: "), inputConstraint);
+		final JTextField directoryField = viewer.getDirectoryField();
+		inputConstraint.gridx++;
+		subPanel.add(directoryField ,inputConstraint);
+		
+		inputConstraint.gridy++ ;
+		inputConstraint.gridx = 0;
+		subPanel.add(new JLabel("Link command: "), inputConstraint);
+		final JTextField linkCommandField = viewer.getLinkCommandField();
+		inputConstraint.gridx++;
+		subPanel.add(linkCommandField ,inputConstraint);
+
+		inputConstraint.gridy++ ;
+		inputConstraint.gridx = 0;
+		subPanel.add(new JLabel("Copy command: "), inputConstraint);
+		final JTextField copyCommandField = viewer.getCopyCommandField();
+		inputConstraint.gridx++;
+		subPanel.add(copyCommandField ,inputConstraint);
+
+		inputConstraint.gridy++ ;
+		inputConstraint.gridx = 0;
+		subPanel.add(new JLabel("Fetch data: "), inputConstraint);
+		inputConstraint.gridx++;
+		final JCheckBox retrieveDataField = viewer.getRetrieveDataField();
+		subPanel.add(retrieveDataField ,inputConstraint);
+
+		inputConstraint.gridy++ ;
+		inputConstraint.gridx = 1;
+		inputConstraint.fill = GridBagConstraints.NONE;
+		inputConstraint.anchor = GridBagConstraints.EAST;
+		final ExternalToolSshNodeViewer v = viewer;
+		final JButton removeButton = new DeselectingButton("Remove",
+				new AbstractAction() {
+
+			public void actionPerformed(ActionEvent e) {
+				synchronized(nodeViewers) {
+					nodeViewers.remove(v);
+				}
+				innerPanel.remove(subPanel);
+				innerPanel.revalidate();
+				innerPanel.repaint();
+				result.revalidate();
+				result.repaint();
+			}
+
+		});
+		subPanel.add(removeButton, inputConstraint);
+		
+		inputConstraint.gridy = ++inputGridy;
+		innerPanel.add(subPanel, inputConstraint);
+
+		nodeViewers.add(viewer);
+		inputGridy++;		
+	}
+
+	private List<SshNode> getNodeList() {
+		List<SshNode> result = new ArrayList<SshNode>();
+		for (ExternalToolSshNodeViewer viewer : nodeViewers) {
+			SshNode node = SshNodeFactory.getInstance().getSshNode(viewer.getHostname(), viewer.getPort(), viewer.getDirectory());
+			node.setLinkCommand(viewer.getLinkCommand());
+			node.setCopyCommand(viewer.getCopyCommand());
+			node.setRetrieveData(viewer.getRetrieveDataField().isSelected());
+			result.add(node);
+		}
+		return result;
+	}
+
+	@Override
+	public ExternalToolSshInvocationMechanism updateInvocationMechanism() {
+		mechanism.setNodes(getNodeList());
+		return mechanism;
+	}
+
+	@Override
+	public InvocationMechanism createMechanism(String mechanismName) {
+		ExternalToolSshInvocationMechanism result = new ExternalToolSshInvocationMechanism();
+		result.setName(mechanismName);
+		return result;
+	}
+
+	@Override
+	public String getName() {
+		return ("SSH");
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolContextualMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolContextualMenuAction.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolContextualMenuAction.java
new file mode 100644
index 0000000..505546d
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolContextualMenuAction.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.externaltool.menu;
+
+import java.awt.event.ActionEvent;
+import java.net.URI;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
+import net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolTemplateServiceDescription;
+import net.sf.taverna.t2.ui.menu.AbstractContextualMenuAction;
+import net.sf.taverna.t2.ui.menu.MenuManager;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
+import net.sf.taverna.t2.workflowmodel.Dataflow;
+
+import org.apache.log4j.Logger;
+
+/**
+ * An action to add an external tool + a wrapping processor to the workflow.
+ *
+ * @author Alex Nenadic
+ * @author Alan Williamns
+ *
+ */
+@SuppressWarnings("serial")
+public class AddExternalToolContextualMenuAction extends AbstractContextualMenuAction {
+
+	private static final String ADD_EXTERNAL_TOOL = "Tool";
+
+	private static final URI insertSection = URI
+			.create("http://taverna.sf.net/2009/contextMenu/insert");
+
+	private static Logger logger = Logger.getLogger(AddExternalToolMenuAction.class);
+
+	private EditManager editManager;
+
+	private MenuManager menuManager;
+
+	private SelectionManager selectionManager;
+
+	private ActivityIconManager activityIconManager;
+
+	public AddExternalToolContextualMenuAction() {
+		super(insertSection, 900);
+	}
+
+	@Override
+	public boolean isEnabled() {
+		return super.isEnabled() && getContextualSelection().getSelection() instanceof Dataflow;
+	}
+
+	@Override
+	protected Action createAction() {
+
+		return new AddExternalToolAction();
+	}
+
+	protected class AddExternalToolAction extends AbstractAction {
+		AddExternalToolAction() {
+			super(ADD_EXTERNAL_TOOL, activityIconManager.iconForActivity(
+					new ExternalToolActivity()));
+		}
+
+		public void actionPerformed(ActionEvent e) {
+			WorkflowView.importServiceDescription(
+					ExternalToolTemplateServiceDescription.getServiceDescription(), false,
+					editManager, menuManager, selectionManager);
+		}
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setMenuManager(MenuManager menuManager) {
+		this.menuManager = menuManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolMenuAction.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolMenuAction.java
new file mode 100644
index 0000000..ff1f11e
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/AddExternalToolMenuAction.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.externaltool.menu;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.net.URI;
+
+import javax.swing.Action;
+import javax.swing.KeyStroke;
+
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
+import net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolTemplateServiceDescription;
+import net.sf.taverna.t2.ui.menu.AbstractMenuAction;
+import net.sf.taverna.t2.ui.menu.DesignOnlyAction;
+import net.sf.taverna.t2.ui.menu.MenuManager;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
+import net.sf.taverna.t2.workbench.views.graph.menu.InsertMenu;
+
+import org.apache.log4j.Logger;
+
+/**
+ * An action to add a externaltool activity + a wrapping processor to the workflow.
+ *
+ * @author Alex Nenadic
+ * @author alanrw
+ *
+ */
+@SuppressWarnings("serial")
+public class AddExternalToolMenuAction extends AbstractMenuAction {
+
+	private static final String ADD_EXTERNAL_TOOL = "Tool";
+
+	private static final URI ADD_EXTERNAL_TOOL_URI = URI
+	.create("http://taverna.sf.net/2008/t2workbench/menu#graphMenuAddExternalTool");
+
+	private static Logger logger = Logger
+			.getLogger(AddExternalToolMenuAction.class);
+
+	private EditManager editManager;
+	private MenuManager menuManager;
+	private SelectionManager selectionManager;
+
+	private ActivityIconManager activityIconManager;
+
+	public AddExternalToolMenuAction() {
+		super(InsertMenu.INSERT, 900, ADD_EXTERNAL_TOOL_URI);
+	}
+
+	@Override
+	protected Action createAction() {
+
+		return new AddExternalToolAction();
+	}
+
+	protected class AddExternalToolAction extends DesignOnlyAction {
+		AddExternalToolAction () {
+			super ();
+			putValue(SMALL_ICON, activityIconManager.iconForActivity(
+					new ExternalToolActivity()));
+			putValue(NAME, ADD_EXTERNAL_TOOL);
+			putValue(SHORT_DESCRIPTION, "Tool");
+			putValue(Action.ACCELERATOR_KEY,
+					KeyStroke.getKeyStroke(KeyEvent.VK_T, InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_DOWN_MASK));
+		}
+
+		public void actionPerformed(ActionEvent e) {
+			WorkflowView.importServiceDescription(ExternalToolTemplateServiceDescription.getServiceDescription(),
+			false, editManager, menuManager, selectionManager);
+		}
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setMenuManager(MenuManager menuManager) {
+		this.menuManager = menuManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/ConfigureExternalToolMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/ConfigureExternalToolMenuAction.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/ConfigureExternalToolMenuAction.java
new file mode 100644
index 0000000..f57b25c
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/ConfigureExternalToolMenuAction.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (C) 2010 Hajo Nils Krabbenhoeft, spratpix GmbH & Co. KG
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+
+package net.sf.taverna.t2.activities.externaltool.menu;
+
+import javax.swing.Action;
+
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
+import net.sf.taverna.t2.activities.externaltool.actions.ExternalToolActivityConfigureAction;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+
+/**
+ * This class adds the plugin configuration action to the context menu of every use case activity.
+ *
+ * @author Hajo Nils Krabbenhoeft
+ */
+public class ConfigureExternalToolMenuAction extends
+		AbstractConfigureActivityMenuAction<ExternalToolActivity> {
+
+	private EditManager editManager;
+	private FileManager fileManager;
+	private ActivityIconManager activityIconManager;
+
+	public ConfigureExternalToolMenuAction() {
+		super(ExternalToolActivity.class);
+	}
+
+	@Override
+	protected Action createAction() {
+		ExternalToolActivityConfigureAction configAction = new ExternalToolActivityConfigureAction(
+				findActivity(), getParentFrame(), editManager, fileManager, activityIconManager);
+		addMenuDots(configAction);
+		return configAction;
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/FeedbackMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/FeedbackMenuAction.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/FeedbackMenuAction.java
new file mode 100644
index 0000000..8c7a284
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/menu/FeedbackMenuAction.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (C) 2010 Hajo Nils Krabbenhoeft, spratpix GmbH & Co. KG
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+
+package net.sf.taverna.t2.activities.externaltool.menu;
+
+import java.awt.Desktop;
+import java.awt.event.ActionEvent;
+import java.io.IOException;
+import java.net.URI;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JOptionPane;
+
+import net.sf.taverna.t2.ui.menu.AbstractMenuAction;
+
+import org.apache.log4j.Logger;
+
+/**
+ * This class adds the feedback item to the context menu of every use case
+ * activity.
+ *
+ * @author Hajo Nils Krabbenhoeft
+ */
+public class FeedbackMenuAction extends AbstractMenuAction {
+
+	private static Logger logger = Logger.getLogger(FeedbackMenuAction.class);
+
+
+	private static final URI feedbackSection = URI.create("http://taverna.sf.net/2009/contextMenu/configure");
+
+	public FeedbackMenuAction() {
+		super(feedbackSection, 51);
+	}
+
+	protected Action createAction() {
+	    // final ImageIcon icon = KnowARCConfigurationFactory.getConfiguration().getIcon();
+		return new SendFeedbackAction("Send Feedback...", null);
+	}
+
+	private final class SendFeedbackAction extends AbstractAction {
+		private static final long serialVersionUID = 1L;
+
+		private static final String errTitle = "Could not open web browser for feedback:";
+		private static final String feedbackUrl = "http://www.taverna.org.uk/about/contact-us/feedback?product=ExternalToolService";
+
+		private SendFeedbackAction(String name, Icon icon) {
+			super(name, icon);
+		}
+
+		public void actionPerformed(ActionEvent e) {
+			if (Desktop.isDesktopSupported()) {
+				try {
+					Desktop.getDesktop().browse(URI.create(feedbackUrl));
+				} catch (IOException e1) {
+					JOptionPane.showMessageDialog(null, feedbackUrl + "\n" + e1.getLocalizedMessage(), errTitle, JOptionPane.ERROR_MESSAGE);
+				}
+			} else {
+				JOptionPane.showMessageDialog(null, "Go to " + feedbackUrl, errTitle, JOptionPane.ERROR_MESSAGE);
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/AddExternalToolServiceDialog.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/AddExternalToolServiceDialog.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/AddExternalToolServiceDialog.java
new file mode 100644
index 0000000..86b0882
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/AddExternalToolServiceDialog.java
@@ -0,0 +1,189 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester   
+ * 
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ * 
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *    
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *    
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.externaltool.servicedescriptions;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import javax.swing.border.EmptyBorder;
+
+import net.sf.taverna.t2.workbench.MainWindow;
+import net.sf.taverna.t2.workbench.helper.HelpEnabledDialog;
+
+import org.apache.log4j.Logger;
+
+/**
+ * Dialog that lets user specify a URL of a Tool service they want 
+ * to add to the Service Panel. In the case the Tool URL is behind
+ * HTTPS or service's endpoints require HTTPS it will ask user to confirm
+ * if they want to trust it. 
+ * 
+ * @author Alex Nenadic
+ *
+ */
+@SuppressWarnings("serial")
+public abstract class AddExternalToolServiceDialog extends HelpEnabledDialog {
+
+	private JTextField toolLocationField;
+	private Logger logger = Logger.getLogger(AddExternalToolServiceDialog.class);
+
+	public AddExternalToolServiceDialog()  {
+		super(MainWindow.getMainWindow(), "Add tool service", true, null); // create a non-modal dialog
+		initComponents();
+		setLocationRelativeTo(getParent());
+	}
+
+	private void initComponents() {
+		JPanel mainPanel = new JPanel(new GridBagLayout());
+		mainPanel.setBorder(new EmptyBorder(10,10,10,10));
+		
+		JLabel toolLocatitionLabel = new JLabel("Tool registry location",ExternalToolActivityIcon.getExternalToolIcon(), JLabel.LEFT);		
+		GridBagConstraints gbc = new GridBagConstraints();
+		gbc.weighty = 0.0;
+		
+		gbc.weightx = 0.0;
+		gbc.gridx = 0;
+		gbc.gridy = 0;
+		gbc.fill = GridBagConstraints.NONE;
+		gbc.anchor = GridBagConstraints.WEST;
+		gbc.insets = new Insets(5, 10, 0, 0);
+		mainPanel.add(toolLocatitionLabel, gbc);
+        
+		toolLocationField = new JTextField("http://taverna.nordugrid.org/sharedRepository/xml.php");
+		gbc.weightx = 1.0;
+		gbc.gridx = 1;
+		gbc.gridy = 0;
+		gbc.fill = GridBagConstraints.HORIZONTAL;
+		gbc.anchor = GridBagConstraints.WEST;
+		gbc.insets = new Insets(5, 10, 0, 5);		
+		mainPanel.add(toolLocationField, gbc);
+		
+	    final JButton addServiceButton = new JButton("Add");
+	    addServiceButton.addActionListener(new ActionListener()
+	        {
+	            public void actionPerformed(ActionEvent evt)
+	            {
+	                addPressed();
+	            }
+	        });
+	    
+	    // When user presses "Return" key fire the action on the "Add" button
+	    addServiceButton.addKeyListener(new java.awt.event.KeyAdapter() {
+			public void keyPressed(java.awt.event.KeyEvent evt) {
+				if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
+					addPressed();
+				}
+			}
+		});
+		getRootPane().setDefaultButton(addServiceButton);
+	    
+        JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
+        buttonsPanel.add(addServiceButton);
+        
+        getContentPane().setLayout(new BorderLayout());
+        getContentPane().add(mainPanel, BorderLayout.CENTER);
+        getContentPane().add(buttonsPanel, BorderLayout.SOUTH);
+        
+		setSize(getPreferredSize());
+        pack();
+	}
+	
+    /**
+     * 'Add service' button pressed or otherwise activated.
+     */
+    private void addPressed()
+    {
+		final String toolURLString = toolLocationField.getText().trim();
+		new Thread("Adding tool " + toolURLString) {
+			public void run() {
+				// Only add the service provider for this service if service URL
+				// starts with 'http'
+				// or if it starts with 'https' and user explicitly said they
+				// wanted to trust this service.
+				/*
+				 * if (shouldTrust(toolURLString)){ addRegistry(toolURLString);
+				 * }
+				 */
+				try {
+					URL url = new URL(toolURLString);
+					URLConnection connection = url.openConnection();
+					try {
+						// If the url starts with 'https' - security hook for
+						// https connection's trust manager
+						// will be engaged and user will be asked automatically
+						// if they want
+						// to trust the connection (if it is not already
+						// trusted). If the urls starts with 'http' -
+						// this will not have any effect apart from checking if
+						// we can open a connection.
+						connection.connect(); // if this does not fail - add the
+						// tool
+						// service provider for this service to
+						// the registry
+					} finally {
+						try {
+							connection.getInputStream().close();
+						} catch (IOException ex) {
+						}
+					}
+					addRegistry(toolURLString);
+				} catch (Exception ex) { // anything failed
+					JOptionPane.showMessageDialog(null,
+							"Could not read the tool descriptions from "
+									+ toolURLString + ":\n" + ex,
+							"Could not add tool service",
+							JOptionPane.ERROR_MESSAGE);
+
+					logger.error(
+							"Failed to add tool description provider for service: "
+									+ toolURLString, ex);
+
+				}
+			};
+		}.start();
+		closeDialog();
+    }
+
+	protected abstract void addRegistry(String tool);	
+	
+	/**
+	 * Closes the dialog.
+	 */
+	private void closeDialog() {
+		setVisible(false);
+		dispose();
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolActivityIcon.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolActivityIcon.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolActivityIcon.java
new file mode 100644
index 0000000..f91755f
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolActivityIcon.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (C) 2009 Hajo Nils Krabbenhoeft, INB, University of Luebeck
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+
+package net.sf.taverna.t2.activities.externaltool.servicedescriptions;
+
+import java.awt.Color;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
+
+/**
+ * This class provides an icon for the use case activity.
+ *
+ * @author Hajo Nils Krabbenhoeft
+ */
+public class ExternalToolActivityIcon implements ActivityIconSPI {
+
+	private static final String PROCESSOR_COLOUR_STRING = "#F28C55";
+
+	private static Icon icon;
+
+	public int canProvideIconScore(Activity<?> activity) {
+		if (activity.getClass().getName().equals(ExternalToolActivity.class.getName()))
+			return DEFAULT_ICON + 1;
+		else
+			return NO_ICON;
+	}
+
+	public Icon getIcon(Activity<?> activity) {
+		return getExternalToolIcon();
+	}
+
+	public static Icon getExternalToolIcon() {
+		if (icon == null) {
+			icon = new ImageIcon(ExternalToolActivityIcon.class.getResource("/externaltool.png"));
+		}
+		return icon;
+	}
+
+	public static String getColourString() {
+		return PROCESSOR_COLOUR_STRING;
+	}
+
+	public void setColourManager(ColourManager colourManager) {
+		// set colour for XPath processors in the workflow diagram
+		colourManager.setPreferredColour(ExternalToolActivity.class.getCanonicalName(),
+				Color.decode(PROCESSOR_COLOUR_STRING));
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceDescription.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceDescription.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceDescription.java
new file mode 100644
index 0000000..02c2bf6
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceDescription.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (C) 2009 Hajo Nils Krabbenhoeft, INB, University of Luebeck   
+ * 
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ * 
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *    
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *    
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+
+package net.sf.taverna.t2.activities.externaltool.servicedescriptions;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+
+import org.apache.log4j.Logger;
+
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
+import net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupManager;
+import net.sf.taverna.t2.activities.externaltool.manager.impl.InvocationGroupManagerImpl;
+import net.sf.taverna.t2.activities.externaltool.views.ExternalToolConfigView;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
+import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
+
+/**
+ * ExternalToolServiceDescription stores the repository URL and the use case id so
+ * that it can create an ExternalToolActivityConfigurationBean
+ * 
+ * @author Hajo Nils Krabbenhoeft
+ */
+public class ExternalToolServiceDescription extends ServiceDescription<ExternalToolActivityConfigurationBean> {
+	
+	private static Logger logger = Logger
+	.getLogger(ExternalToolServiceDescription.class);
+
+	
+	private static InvocationGroupManager manager = InvocationGroupManagerImpl.getInstance();
+
+	private String repositoryUrl;
+	private String externaltoolid;
+	private UseCaseDescription useCaseDescription;
+
+	public String getRepositoryUrl() {
+		return repositoryUrl;
+	}
+
+	public void setRepositoryUrl(String repositoryUrl) {
+		this.repositoryUrl = repositoryUrl;
+	}
+
+	public String getExternaltoolid() {
+		return externaltoolid;
+	}
+
+	public void setExternaltoolid(String externaltoolid) {
+		this.externaltoolid = externaltoolid;
+	}
+
+	public Icon getIcon() {
+		if (useCaseDescription != null) {
+			String icon_url = useCaseDescription.getIcon_url();
+			if ((icon_url != null) && !icon_url.isEmpty() && !icon_url.endsWith(".ico"))
+				try {
+					ImageIcon result = new ImageIcon(new URL(icon_url));
+					if ((result != null) && (result.getIconHeight() != 0) && (result.getIconWidth() != 0)){
+						return result;
+					}
+				} catch (MalformedURLException e) {
+					logger.error("Problematic URL" + icon_url, e);
+				}
+		}
+		return ExternalToolActivityIcon.getExternalToolIcon();
+	}
+
+	public Class<? extends Activity<ExternalToolActivityConfigurationBean>> getActivityClass() {
+		return ExternalToolActivity.class;
+	}
+
+	public ExternalToolActivityConfigurationBean getActivityConfiguration() {
+		ExternalToolActivityConfigurationBean bean = new ExternalToolActivityConfigurationBean();
+		bean.setRepositoryUrl(repositoryUrl);
+		bean.setExternaltoolid(externaltoolid);
+		bean.setUseCaseDescription(useCaseDescription);
+		bean.setMechanism(manager.getDefaultMechanism());
+
+		return bean;
+	}
+
+	public String getName() {
+		return externaltoolid;
+	}
+
+	@SuppressWarnings("unchecked")
+	public List<? extends Comparable> getPath() {
+		List<String> result = new ArrayList<String>();
+		result.add("Tools decribed @ " + repositoryUrl);
+		String group = useCaseDescription.getGroup();
+		if ((group != null) && !group.isEmpty()) {
+			String[] groups = group.split(":");
+			for (String g : groups) {
+				result.add(g);
+			}
+		}
+		return result;
+	}
+
+	protected List<Object> getIdentifyingData() {
+		// we require use cases inside one XML file to have unique IDs, which
+		// means every externaltool is uniquely identified by its repository URL and
+		// its use case ID.
+		return Arrays.<Object> asList(repositoryUrl, externaltoolid);
+	}
+	
+	public String getDescription() {
+		if (useCaseDescription != null) {
+			String description = useCaseDescription.getDescription();
+			if (description == null) {
+				return "";
+			}
+			return description;
+		}
+		return "";
+	}
+
+	public void setUseCaseDescription(UseCaseDescription usecase) {
+		this.useCaseDescription = usecase;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProvider.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProvider.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProvider.java
new file mode 100644
index 0000000..4f3cbf2
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProvider.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (C) 2009 Hajo Nils Krabbenhoeft, INB, University of Luebeck   
+ * 
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ * 
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *    
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *    
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+
+package net.sf.taverna.t2.activities.externaltool.servicedescriptions;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.swing.Icon;
+
+import net.sf.taverna.t2.servicedescriptions.AbstractConfigurableServiceProvider;
+import net.sf.taverna.t2.servicedescriptions.CustomizedConfigurePanelProvider;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseEnumeration;
+
+/**
+ * ExternalToolServiceProvider searches an use case repository XML for use case
+ * descriptions.
+ * 
+ * @author Hajo Nils Krabbenhoeft
+ */
+public class ExternalToolServiceProvider extends AbstractConfigurableServiceProvider<ExternalToolServiceProviderConfig>  implements
+CustomizedConfigurePanelProvider<ExternalToolServiceProviderConfig>{
+
+	private static final URI providerId = URI
+	.create("http://taverna.sf.net/2010/service-provider/externaltool");
+	
+	public ExternalToolServiceProvider() {
+		super(new ExternalToolServiceProviderConfig("http://taverna.nordugrid.org/sharedRepository/xml.php"));
+	}
+
+	public String getName() {
+		return "Tool service";
+	}
+
+	public List<ExternalToolServiceProviderConfig> getDefaultConfigurations() {
+		List<ExternalToolServiceProviderConfig> defaults = new ArrayList<ExternalToolServiceProviderConfig>();
+		// Disabled until sensible set
+//		defaults.add(new ExternalToolServiceProviderConfig("http://taverna.nordugrid.org/sharedRepository/xml.php"));
+		return defaults;
+	}
+
+	public void findServiceDescriptionsAsync(FindServiceDescriptionsCallBack callBack) {
+		String repositoryUrl = serviceProviderConfig.getRepositoryUrl();
+		callBack.status("Parsing use case repository:" + repositoryUrl);
+			// prepare a list of all use case descriptions which are stored in
+			// the given repository URL
+			List<UseCaseDescription> usecases = new ArrayList<UseCaseDescription> ();
+			try {
+				usecases = UseCaseEnumeration.readDescriptionsFromUrl(
+						repositoryUrl);
+			} catch (IOException e) {
+				callBack.fail("Unable to read tool descriptions", e);
+			}
+			callBack.status("Found " + usecases.size() + " use cases:" + repositoryUrl);
+			// convert all the UseCaseDescriptions in the XML file into
+			// ExternalToolServiceDescription items
+			List<ExternalToolServiceDescription> items = new ArrayList<ExternalToolServiceDescription>();
+			for (UseCaseDescription usecase : usecases) {
+				ExternalToolServiceDescription item = new ExternalToolServiceDescription();
+				item.setRepositoryUrl(repositoryUrl);
+				item.setExternaltoolid(usecase.getUsecaseid());
+				item.setUseCaseDescription(usecase);
+				items.add(item);
+			}
+			// we dont have streaming data loading or partial results, so return
+			// results and finish
+			callBack.partialResults(items);
+			callBack.finished();
+	}
+
+	@Override
+	public String toString() {
+		return getName() + " " + getConfiguration().getRepositoryUrl();
+	}
+
+	public Icon getIcon() {
+	    return ExternalToolActivityIcon.getExternalToolIcon();
+	}
+
+	@Override
+	protected List<? extends Object> getIdentifyingData() {
+		List<String> result;
+		// one can fully identify an use case repository by its URL
+		result = Arrays.asList(getConfiguration().getRepositoryUrl());
+		return result;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry registry) {
+	}
+	
+	@SuppressWarnings("serial")
+	public void createCustomizedConfigurePanel(final CustomizedConfigureCallBack<ExternalToolServiceProviderConfig> callBack) {
+			
+		AddExternalToolServiceDialog addWSDLServiceDialog = new AddExternalToolServiceDialog() {
+				@Override
+				protected void addRegistry(String externalToolURL) {
+					
+					ExternalToolServiceProviderConfig providerConfig = new ExternalToolServiceProviderConfig(externalToolURL);					
+					callBack.newProviderConfiguration(providerConfig);
+				}
+			};
+			addWSDLServiceDialog.setVisible(true);		
+	}
+
+
+	public String getId() {
+		return providerId.toString();
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProviderConfig.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProviderConfig.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProviderConfig.java
new file mode 100644
index 0000000..0967a6e
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolServiceProviderConfig.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (C) 2009 Hajo Nils Krabbenhoeft, INB, University of Luebeck   
+ * 
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ * 
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *    
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *    
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+
+package net.sf.taverna.t2.activities.externaltool.servicedescriptions;
+
+import net.sf.taverna.t2.lang.beans.PropertyAnnotated;
+import net.sf.taverna.t2.lang.beans.PropertyAnnotation;
+
+/**
+ * ExternalToolServiceProviderConfig stores the URL of the use case repository XML file
+ * 
+ * @author Hajo Nils Krabbenhoeft
+ */
+public class ExternalToolServiceProviderConfig extends PropertyAnnotated {
+	private String repositoryUrl;
+
+	public ExternalToolServiceProviderConfig() {
+	}
+
+	public ExternalToolServiceProviderConfig(String repositoryUrl) {
+		this.repositoryUrl = repositoryUrl;
+	}
+
+	@PropertyAnnotation(displayName = "Tool registry location", preferred = true)
+	public String getRepositoryUrl() {
+		return repositoryUrl;
+	}
+
+	public void setRepositoryUrl(String repositoryUrl) {
+		this.repositoryUrl = repositoryUrl;
+	}
+
+	@Override
+	public String toString() {
+		return repositoryUrl;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolTemplateServiceDescription.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolTemplateServiceDescription.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolTemplateServiceDescription.java
new file mode 100644
index 0000000..30ae3eb
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/servicedescriptions/ExternalToolTemplateServiceDescription.java
@@ -0,0 +1,77 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.servicedescriptions;
+
+import java.net.URI;
+import java.util.UUID;
+
+import javax.swing.Icon;
+
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
+
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivity;
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
+import net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupManager;
+import net.sf.taverna.t2.activities.externaltool.manager.impl.InvocationGroupManagerImpl;
+import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
+import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
+
+/**
+ * @author alanrw
+ *
+ */
+public class ExternalToolTemplateServiceDescription extends
+		AbstractTemplateService<ExternalToolActivityConfigurationBean> {
+	
+	private static final URI providerId = URI
+	.create("http://taverna.sf.net/2010/service-provider/external-tool");
+	
+	private static final String EXTERNAL_TOOL = "Tool";
+	
+	private static InvocationGroupManager manager = InvocationGroupManagerImpl.getInstance();
+
+	@Override
+	public Class<? extends Activity<ExternalToolActivityConfigurationBean>> getActivityClass() {
+		return ExternalToolActivity.class;
+	}
+
+	@Override
+	public ExternalToolActivityConfigurationBean getActivityConfiguration() {
+		ExternalToolActivityConfigurationBean result = new ExternalToolActivityConfigurationBean();
+		result.setExternaltoolid(UUID.randomUUID().toString());
+		result.setUseCaseDescription(new UseCaseDescription(""));
+		result.setMechanism(manager.getDefaultMechanism());
+		return result;
+	}
+
+	@Override
+	public Icon getIcon() {
+		return ExternalToolActivityIcon.getExternalToolIcon();
+	}
+	
+	@Override
+	public String getDescription() {
+		return "A service that allows tools to be used as services";	
+	}
+	
+	@SuppressWarnings("unchecked")
+	public static ServiceDescription getServiceDescription() {
+		ExternalToolTemplateServiceDescription bts = new ExternalToolTemplateServiceDescription();
+		return bts.templateService;
+	}
+
+
+
+	@Override
+	public String getId() {
+		return providerId.toString();
+	}
+
+	@Override
+	public String getName() {
+		return EXTERNAL_TOOL;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/utils/Tools.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/utils/Tools.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/utils/Tools.java
new file mode 100644
index 0000000..55cda5c
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/utils/Tools.java
@@ -0,0 +1,129 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.utils;
+
+import java.awt.Color;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.util.List;
+import java.util.Map;
+
+import javax.swing.AbstractAction;
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.border.CompoundBorder;
+
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
+import de.uni_luebeck.inb.knowarc.usecases.ScriptInputUser;
+
+import net.sf.taverna.t2.lang.ui.DeselectingButton;
+
+/**
+ * @author alanrw
+ *
+ */
+public class Tools {
+	
+	private static CompoundBorder border = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,5,5,5), BorderFactory.createLineBorder(Color.BLACK, 1));
+	
+	private static Insets insets = new Insets(5,5,5,5);
+	
+	public static void addViewer(final JPanel innerPanel, String[] labels, JComponent[] elements,
+			final List viewerList, final Object viewer, final JPanel outerPanel) {
+		final JPanel subPanel = new JPanel();
+		subPanel.setLayout(new GridBagLayout());
+		subPanel.setBorder(border);
+		
+		final GridBagConstraints labelConstraint = new GridBagConstraints();
+		labelConstraint.insets = insets;
+		labelConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
+		labelConstraint.fill = GridBagConstraints.BOTH;
+		labelConstraint.gridy = 0;
+		labelConstraint.gridx = 0;
+		labelConstraint.weightx = 0;
+
+		final GridBagConstraints elementConstraint = new GridBagConstraints();
+		elementConstraint.insets = insets;
+		elementConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
+		elementConstraint.fill = GridBagConstraints.BOTH;
+		elementConstraint.gridy = 0;
+		elementConstraint.gridx = 1;
+		elementConstraint.weightx = 1.0;
+		
+		final GridBagConstraints removeConstraint = new GridBagConstraints();
+		removeConstraint.insets = insets;
+		removeConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
+		removeConstraint.fill = GridBagConstraints.BOTH;
+		removeConstraint.gridx = 1;
+		removeConstraint.weightx = 0;
+		removeConstraint.fill = GridBagConstraints.NONE;
+		removeConstraint.anchor = GridBagConstraints.EAST;
+		
+		final GridBagConstraints subPanelConstraint = new GridBagConstraints();
+		subPanelConstraint.insets = insets;
+		subPanelConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
+		subPanelConstraint.fill = GridBagConstraints.BOTH;
+		subPanelConstraint.gridx = 1;
+//		subPanelConstraint.gridy = ++stringReplacementGridy;
+		subPanelConstraint.weightx = 1.00;
+		subPanelConstraint.fill = GridBagConstraints.HORIZONTAL;
+		subPanelConstraint.anchor = GridBagConstraints.WEST;		
+		
+		for (int i = 0; i < labels.length; i++) {
+			subPanel.add(new JLabel(labels[i] + ":"), labelConstraint);
+			subPanel.add(elements[i], elementConstraint);
+			labelConstraint.gridy++;
+			elementConstraint.gridy++;
+		}
+		
+		removeConstraint.gridy = labelConstraint.gridy + 1;
+		final JButton removeButton = new DeselectingButton("Remove",
+				new AbstractAction() {
+
+			public void actionPerformed(ActionEvent e) {
+				synchronized (viewerList) {
+					viewerList.remove(viewer);
+				}
+				innerPanel.remove(subPanel);
+				innerPanel.revalidate();
+				innerPanel.repaint();
+				outerPanel.revalidate();
+				outerPanel.repaint();
+			}
+
+		});
+		subPanel.add(removeButton, removeConstraint);
+		innerPanel.add(subPanel, subPanelConstraint);
+	}
+	
+	public static boolean isStringReplacement(ScriptInputUser si) {
+		return !si.isList() && !si.isFile() && !si.isTempFile();
+	}
+	
+	public static boolean isInputFile(ScriptInputUser si) {
+		return !si.isList() && si.isFile();
+	}
+
+	public static boolean isFileList(ScriptInputUser si) {
+		return si.isList() && si.isFile();
+	}
+	
+	public static boolean isUnderstood(ScriptInputUser si) {
+		return isStringReplacement(si) || isInputFile(si) || isFileList(si);
+	}
+	
+	public static boolean areAllUnderstood(Map<String, ScriptInput> inputs) {
+		for (ScriptInput si : inputs.values()) {
+			if ((si instanceof ScriptInputUser) && !isUnderstood((ScriptInputUser) si)) {
+				return false;
+			}
+		}
+		return true;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/AnnotationPanel.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/AnnotationPanel.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/AnnotationPanel.java
new file mode 100644
index 0000000..83e75e8
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/AnnotationPanel.java
@@ -0,0 +1,41 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.FlowLayout;
+
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+/**
+ * @author alanrw
+ *
+ */
+public class AnnotationPanel extends JPanel {
+	
+	public AnnotationPanel(Component nameField, Component descriptionArea, Component groupField) {
+		super();
+		this.setLayout(new BorderLayout());
+		JPanel subPanel = new JPanel(new BorderLayout());
+		JPanel namePanel = new JPanel();
+		namePanel.setLayout(new FlowLayout(FlowLayout.LEFT));
+		namePanel.add(new JLabel("Name: "));
+		namePanel.add(nameField);
+		subPanel.add(namePanel, BorderLayout.NORTH);
+		JPanel groupPanel = new JPanel();
+		groupPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
+		groupPanel.add(new JLabel("Group: "));
+		groupPanel.add(groupField);
+		subPanel.add(groupPanel, BorderLayout.SOUTH);
+		this.add(subPanel, BorderLayout.NORTH);
+		JPanel descriptionPanel = new JPanel();
+		descriptionPanel.setLayout(new BorderLayout());
+		descriptionPanel.add(new JLabel("Description:"), BorderLayout.NORTH);
+		descriptionPanel.add(descriptionArea, BorderLayout.CENTER);
+		this.add(descriptionPanel, BorderLayout.CENTER);
+	}
+
+}


[10/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-beanshell-activity-ui/

Posted by st...@apache.org.
taverna-beanshell-activity-ui/


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/6b540057
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/6b540057
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/6b540057

Branch: refs/heads/master
Commit: 6b540057cdd47126bbe835a7c61348d548c48cd7
Parents: 8334579
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:27:30 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:27:30 2015 +0000

----------------------------------------------------------------------
 .gitignore                                      |  24 --
 .travis.yml                                     |   1 -
 README.md                                       |   5 -
 pom.xml                                         | 100 --------
 .../BeanshellActivityConfigurationAction.java   |  71 ------
 .../menu/AddBeanshellTemplateAction.java        | 113 ---------
 .../menu/AddBeanshellTemplateMenuAction.java    | 121 ----------
 .../menu/ConfigureBeanshellMenuAction.java      |  67 ------
 .../BeanshellActivityIcon.java                  |  58 -----
 .../BeanshellTemplateService.java               |  57 -----
 .../views/BeanshellActivityViewFactory.java     |  84 -------
 .../views/BeanshellConfigurationPanel.java      | 231 -------------------
 .../views/BeanshellContextualView.java          | 104 ---------
 ...rvicedescriptions.ServiceDescriptionProvider |   1 -
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |   3 -
 ...a.t2.workbench.activityicons.ActivityIconSPI |   1 -
 ...ntextualviews.activity.ContextualViewFactory |   1 -
 .../beanshell-activity-ui-context-osgi.xml      |  29 ---
 .../spring/beanshell-activity-ui-context.xml    |  43 ----
 src/main/resources/beanshell.png                | Bin 1015 -> 0 bytes
 .../t2/activities/beanshell/views/keys.txt      |  90 --------
 taverna-beanshell-activity-ui/pom.xml           | 100 ++++++++
 .../BeanshellActivityConfigurationAction.java   |  71 ++++++
 .../menu/AddBeanshellTemplateAction.java        | 113 +++++++++
 .../menu/AddBeanshellTemplateMenuAction.java    | 121 ++++++++++
 .../menu/ConfigureBeanshellMenuAction.java      |  67 ++++++
 .../BeanshellActivityIcon.java                  |  58 +++++
 .../BeanshellTemplateService.java               |  57 +++++
 .../views/BeanshellActivityViewFactory.java     |  84 +++++++
 .../views/BeanshellConfigurationPanel.java      | 231 +++++++++++++++++++
 .../views/BeanshellContextualView.java          | 104 +++++++++
 ...rvicedescriptions.ServiceDescriptionProvider |   1 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |   3 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |   1 +
 ...ntextualviews.activity.ContextualViewFactory |   1 +
 .../beanshell-activity-ui-context-osgi.xml      |  29 +++
 .../spring/beanshell-activity-ui-context.xml    |  43 ++++
 .../src/main/resources/beanshell.png            | Bin 0 -> 1015 bytes
 .../t2/activities/beanshell/views/keys.txt      |  90 ++++++++
 39 files changed, 1174 insertions(+), 1204 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index ebe0e5b..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# ignore project files #
-.classpath
-.project
-.settings/
-catalog-v001.xml
-
-# ignore target files #
-target/
-bin/
-build/
-dist/
-apidoc/
-*.swp
-
-# ignore svn files if there
-.svn
-
-# ignore log files #
-*.log
-/logs/*
-*/logs/*
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index dff5f3a..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1 +0,0 @@
-language: java

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
deleted file mode 100644
index 1685758..0000000
--- a/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Taverna Workflow system Beanshell Activity: User Interface part for use in the Taverna Workbench.
-
-Extends https://github.com/taverna/taverna-beanshell-activity
-
-This code was previously hosted at http://taverna.googlecode.com/svn/taverna/ui/net.sf.taverna.t2.ui-activities/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 0afe9ef..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>net.sf.taverna</groupId>
-                <artifactId>taverna-parent</artifactId>
-                <version>3.0.1-SNAPSHOT</version>
-	</parent>
-	<groupId>net.sf.taverna.t2.ui-activities</groupId>
-	<artifactId>beanshell-activity-ui</artifactId>
-        <version>2.0-SNAPSHOT</version>
-	<packaging>bundle</packaging>
-	<name>Taverna 2 Beanshell Activity UI</name>
-	<dependencies>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-icons-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-palette-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-tools</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>edits-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>file-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>menu-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-components</groupId>
-			<artifactId>workflow-view</artifactId>
-			<version>${t2.ui.components.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.lang</groupId>
-			<artifactId>ui</artifactId>
-			<version>${t2.lang.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>uk.org.taverna.configuration</groupId>
-			<artifactId>taverna-app-configuration-api</artifactId>
-			<version>${taverna.configuration.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>uk.org.taverna.commons</groupId>
-			<artifactId>taverna-services-api</artifactId>
-			<version>0.1.0-SNAPSHOT</version>
-		</dependency>
-		<dependency>
-			<groupId>uk.org.taverna.scufl2</groupId>
-			<artifactId>scufl2-api</artifactId>
-			<version>${scufl2.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-                        <version>${junit.version}</version>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-	<repositories>
-		<repository>
-			<releases />
-			<snapshots>
-				<enabled>false</enabled>
-			</snapshots>
-			<id>mygrid-repository</id>
-			<name>myGrid Repository</name>
-			<url>http://www.mygrid.org.uk/maven/repository
-			</url>
-		</repository>
-		<repository>
-			<releases>
-				<enabled>false</enabled>
-			</releases>
-			<snapshots />
-			<id>mygrid-snapshot-repository</id>
-			<name>myGrid Snapshot Repository</name>
-			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
-		</repository>
-	</repositories>
-</project>
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java
deleted file mode 100644
index fe6159c..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.beanshell.actions;
-
-import java.awt.Frame;
-import java.awt.event.ActionEvent;
-
-import net.sf.taverna.t2.activities.beanshell.views.BeanshellConfigurationPanel;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-@SuppressWarnings("serial")
-public class BeanshellActivityConfigurationAction extends ActivityConfigurationAction {
-
-	public static final String EDIT_BEANSHELL_SCRIPT = "Edit beanshell script";
-	private final EditManager editManager;
-	private final FileManager fileManager;
-	private final ApplicationConfiguration applicationConfiguration;
-
-	public BeanshellActivityConfigurationAction(Activity activity, Frame owner,
-			EditManager editManager, FileManager fileManager,
-			ActivityIconManager activityIconManager,
-			ServiceDescriptionRegistry serviceDescriptionRegistry,
-			ApplicationConfiguration applicationConfiguration) {
-		super(activity, activityIconManager, serviceDescriptionRegistry);
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		this.applicationConfiguration = applicationConfiguration;
-		putValue(NAME, EDIT_BEANSHELL_SCRIPT);
-	}
-
-	public void actionPerformed(ActionEvent e) {
-		ActivityConfigurationDialog currentDialog = ActivityConfigurationAction.getDialog(getActivity());
-		if (currentDialog != null) {
-			currentDialog.toFront();
-			return;
-		}
-		final BeanshellConfigurationPanel beanshellConfigView = new BeanshellConfigurationPanel(
-				getActivity(), applicationConfiguration);
-		final ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(getActivity(),
-				beanshellConfigView, editManager);
-
-		ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
-
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java
deleted file mode 100644
index 97eab18..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.beanshell.menu;
-
-import java.awt.event.ActionEvent;
-import java.net.URI;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.ui.menu.AbstractContextualMenuAction;
-import net.sf.taverna.t2.ui.menu.MenuManager;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.core.Workflow;
-
-/**
- * An action to add a beanshell activity + a wrapping processor to the workflow.
- *
- * @author Alex Nenadic
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class AddBeanshellTemplateAction extends AbstractContextualMenuAction {
-
-	private static final String ADD_BEANSHELL = "Beanshell";
-
-	private static final URI insertSection = URI
-			.create("http://taverna.sf.net/2009/contextMenu/insert");
-
-	private EditManager editManager;
-	private MenuManager menuManager;
-	private SelectionManager selectionManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ServiceRegistry serviceRegistry;
-
-	public AddBeanshellTemplateAction() {
-		super(insertSection, 300);
-	}
-
-	@Override
-	public boolean isEnabled() {
-		return super.isEnabled() && getContextualSelection().getSelection() instanceof Workflow;
-	}
-
-	@Override
-	protected Action createAction() {
-
-		return new AddBeanshellAction();
-	}
-
-	protected class AddBeanshellAction extends AbstractAction {
-		AddBeanshellAction() {
-			super(ADD_BEANSHELL, activityIconManager
-					.iconForActivity(BeanshellTemplateService.ACTIVITY_TYPE));
-		}
-
-		public void actionPerformed(ActionEvent e) {
-			WorkflowView.importServiceDescription(serviceDescriptionRegistry
-					.getServiceDescription(BeanshellTemplateService.ACTIVITY_TYPE), false,
-					editManager, menuManager, selectionManager, serviceRegistry);
-		}
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setMenuManager(MenuManager menuManager) {
-		this.menuManager = menuManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java
deleted file mode 100644
index 7933000..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.beanshell.menu;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-import java.net.URI;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.KeyStroke;
-
-import net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.ui.menu.AbstractMenuAction;
-import net.sf.taverna.t2.ui.menu.DesignOnlyAction;
-import net.sf.taverna.t2.ui.menu.MenuManager;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
-import uk.org.taverna.commons.services.ServiceRegistry;
-
-/**
- * An action to add a beanshell activity + a wrapping processor to the workflow.
- *
- * @author Alex Nenadic
- * @author alanrw
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class AddBeanshellTemplateMenuAction extends AbstractMenuAction {
-
-	private static final String ADD_BEANSHELL = "Beanshell";
-
-	private static final URI INSERT = URI
-			.create("http://taverna.sf.net/2008/t2workbench/menu#insert");
-
-	private static final URI ADD_BEANSHELL_URI = URI
-			.create("http://taverna.sf.net/2008/t2workbench/menu#graphMenuAddBeanshell");
-
-	private EditManager editManager;
-	private MenuManager menuManager;
-	private SelectionManager selectionManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ServiceRegistry serviceRegistry;
-
-	public AddBeanshellTemplateMenuAction() {
-		super(INSERT, 300, ADD_BEANSHELL_URI);
-	}
-
-	@Override
-	protected Action createAction() {
-		return new AddBeanshellMenuAction();
-	}
-
-	protected class AddBeanshellMenuAction extends AbstractAction implements DesignOnlyAction {
-		AddBeanshellMenuAction() {
-			super();
-			putValue(SMALL_ICON,
-					activityIconManager.iconForActivity(BeanshellTemplateService.ACTIVITY_TYPE));
-			putValue(NAME, ADD_BEANSHELL);
-			putValue(SHORT_DESCRIPTION, "Beanshell service");
-			putValue(
-					Action.ACCELERATOR_KEY,
-					KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.SHIFT_DOWN_MASK
-							| InputEvent.ALT_DOWN_MASK));
-		}
-
-		public void actionPerformed(ActionEvent e) {
-			WorkflowView.importServiceDescription(serviceDescriptionRegistry
-					.getServiceDescription(BeanshellTemplateService.ACTIVITY_TYPE), false,
-					editManager, menuManager, selectionManager, serviceRegistry);
-		}
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setMenuManager(MenuManager menuManager) {
-		this.menuManager = menuManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java
deleted file mode 100644
index 64ef0c8..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package net.sf.taverna.t2.activities.beanshell.menu;
-
-import java.net.URI;
-
-import net.sf.taverna.t2.activities.beanshell.actions.BeanshellActivityConfigurationAction;
-import net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-
-import javax.swing.Action;
-
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-public class ConfigureBeanshellMenuAction extends AbstractConfigureActivityMenuAction {
-
-	public static final URI LOCALWORKER_ACTIVITY = URI
-			.create("http://ns.taverna.org.uk/2010/activity/localworker");
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ApplicationConfiguration applicationConfiguration;
-
-	public ConfigureBeanshellMenuAction() {
-		super(BeanshellTemplateService.ACTIVITY_TYPE);
-	}
-
-	@Override
-	protected Action createAction() {
-		Activity a = findActivity();
-		Action result = null;
-		if (!(a.getType().equals(LOCALWORKER_ACTIVITY))) {
-			result = new BeanshellActivityConfigurationAction(findActivity(), getParentFrame(),
-					editManager, fileManager, activityIconManager, serviceDescriptionRegistry,
-					applicationConfiguration);
-			result.putValue(Action.NAME, BeanshellActivityConfigurationAction.EDIT_BEANSHELL_SCRIPT);
-			addMenuDots(result);
-		}
-		return result;
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setApplicationConfiguration(ApplicationConfiguration applicationConfiguration) {
-		this.applicationConfiguration = applicationConfiguration;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java
deleted file mode 100644
index 055aa81..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.beanshell.servicedescriptions;
-
-import java.net.URI;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
-
-/**
- *
- * @author Alex Nenadic
- * @author David Withers
- */
-public class BeanshellActivityIcon implements ActivityIconSPI {
-
-	private static Icon icon = null;
-
-	@Override
-	public int canProvideIconScore(URI activityType) {
-		if (BeanshellTemplateService.ACTIVITY_TYPE.equals(activityType))
-			return DEFAULT_ICON + 1;
-		else
-			return NO_ICON;
-	}
-
-	@Override
-	public Icon getIcon(URI activityType) {
-		return getBeanshellIcon();
-	}
-
-	public static Icon getBeanshellIcon() {
-		if (icon == null) {
-			icon = new ImageIcon(BeanshellActivityIcon.class.getResource("/beanshell.png"));
-		}
-		return icon;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java
deleted file mode 100644
index c2cb38f..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package net.sf.taverna.t2.activities.beanshell.servicedescriptions;
-
-import java.net.URI;
-
-import javax.swing.Icon;
-
-import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-
-public class BeanshellTemplateService extends AbstractTemplateService {
-
-	public static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/beanshell");
-
-	private static final String BEANSHELL = "Beanshell";
-
-	private static final URI providerId = URI
-	.create("http://taverna.sf.net/2010/service-provider/beanshell");
-
-	public String getName() {
-		return BEANSHELL;
-	}
-
-	@Override
-	public URI getActivityType() {
-		return ACTIVITY_TYPE;
-	}
-
-	@Override
-	public Configuration getActivityConfiguration() {
-		Configuration configuration = new Configuration();
-		configuration.setType(ACTIVITY_TYPE.resolve("#Config"));
-		configuration.getJsonAsObjectNode().put("script", "");
-		configuration.getJsonAsObjectNode().put("classLoaderSharing", "workflow");
-		return configuration;
-	}
-
-	@Override
-	public Icon getIcon() {
-		return BeanshellActivityIcon.getBeanshellIcon();
-	}
-
-	@Override
-	public String getDescription() {
-		return "A service that allows Beanshell scripts, with dependencies on libraries";
-	}
-
-	public static ServiceDescription getServiceDescription() {
-		BeanshellTemplateService bts = new BeanshellTemplateService();
-		return bts.templateService;
-	}
-
-	public String getId() {
-		return providerId.toString();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellActivityViewFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellActivityViewFactory.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellActivityViewFactory.java
deleted file mode 100644
index 5c83730..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellActivityViewFactory.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.beanshell.views;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.List;
-
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-public class BeanshellActivityViewFactory implements ContextualViewFactory<Activity> {
-
-	private static final URI ACTIVITY_TYPE = URI
-			.create("http://ns.taverna.org.uk/2010/activity/beanshell");
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private ActivityIconManager activityIconManager;
-	private ColourManager colourManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-
-	private ApplicationConfiguration applicationConfiguration;
-
-	public boolean canHandle(Object object) {
-		return object instanceof Activity && ((Activity) object).getType().equals(ACTIVITY_TYPE);
-	}
-
-	public List<ContextualView> getViews(Activity activity) {
-		return Arrays.asList(new ContextualView[] { new BeanshellContextualView(activity,
-				editManager, fileManager, activityIconManager, colourManager,
-				serviceDescriptionRegistry, applicationConfiguration) });
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setColourManager(ColourManager colourManager) {
-		this.colourManager = colourManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setApplicationConfiguration(ApplicationConfiguration applicationConfiguration) {
-		this.applicationConfiguration = applicationConfiguration;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellConfigurationPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellConfigurationPanel.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellConfigurationPanel.java
deleted file mode 100644
index 8489d7a..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellConfigurationPanel.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2012 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.beanshell.views;
-
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JSpinner;
-import javax.swing.SpinnerNumberModel;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
-import javax.swing.event.DocumentEvent;
-import javax.swing.event.DocumentListener;
-
-import net.sf.taverna.t2.lang.ui.EditorKeySetUtil;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityPortConfiguration;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.DependencyConfigurationPanel;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ListConfigurationComponent;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.MultiPageActivityConfigurationPanel;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ScriptConfigurationComponent;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ValidatingTextField;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ValidatingTextGroup;
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.port.InputActivityPort;
-import uk.org.taverna.scufl2.api.port.OutputActivityPort;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.node.ArrayNode;
-
-/**
- * Component for configuring a Beanshell activity.
- *
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class BeanshellConfigurationPanel extends MultiPageActivityConfigurationPanel {
-
-	private ScriptConfigurationComponent scriptConfigurationComponent;
-	private ValidatingTextGroup inputTextGroup, outputTextGroup;
-	private DependencyConfigurationPanel dependencyConfigurationPanel;
-	private File libDir;
-
-	public BeanshellConfigurationPanel(Activity activity,
-			ApplicationConfiguration applicationConfiguration) {
-		super(activity);
-		libDir = new File(applicationConfiguration.getApplicationHomeDir(), "lib");
-		if (!libDir.exists()) {
-			libDir.mkdir();
-		}
-		initialise();
-	}
-
-	@Override
-	protected void initialise() {
-		super.initialise();
-		removeAllPages();
-		addPage("Script", createScriptEditPanel());
-		addPage("Input ports", createInputPanel());
-		addPage("Output ports", createOutputPanel());
-		addPage("Dependencies", createDependenciesPanel());
-		setPreferredSize(new Dimension(600, 500));
-	}
-
-	@Override
-	public void noteConfiguration() {
-		setProperty("script", scriptConfigurationComponent.getScript());
-		setProperty("classLoaderSharing", dependencyConfigurationPanel.getClassLoaderSharing());
-		List<String> localDependencies = dependencyConfigurationPanel.getLocalDependencies();
-		if (localDependencies == null || localDependencies.isEmpty()) {
-			getJson().remove("localDependency");
-		} else {
-			ArrayNode localDependenciesArray = getJson().arrayNode();
-			for (String localDependency : localDependencies) {
-				localDependenciesArray.add(localDependency);
-			}
-			getJson().put("localDependency", localDependenciesArray);
-		}
-	}
-
-	@Override
-	public boolean checkValues() {
-		return true;
-	}
-
-	private Component createScriptEditPanel() {
-		Set<String> keywords = EditorKeySetUtil.loadKeySet(getClass().getResourceAsStream(
-				"keys.txt"));
-		Set<String> ports = new HashSet<>();
-		for (InputActivityPort ip : getActivity().getInputPorts()) {
-			ports.add(ip.getName());
-		}
-		for (OutputActivityPort op : getActivity().getOutputPorts()) {
-			ports.add(op.getName());
-		}
-		scriptConfigurationComponent = new ScriptConfigurationComponent(getProperty("script"),
-				keywords, ports, "Beanshell", ".bsh");
-		return scriptConfigurationComponent;
-	}
-
-	private Component createInputPanel() {
-		inputTextGroup = new ValidatingTextGroup();
-		ListConfigurationComponent<ActivityPortConfiguration> inputPanel = new ListConfigurationComponent<ActivityPortConfiguration>(
-				"Input Port", getInputPorts()) {
-			@Override
-			protected Component createItemComponent(ActivityPortConfiguration port) {
-				return new PortComponent(port, inputTextGroup);
-			}
-
-			@Override
-			protected ActivityPortConfiguration createDefaultItem() {
-				return new ActivityPortConfiguration("in", 0);
-			}
-		};
-		return inputPanel;
-	}
-
-	private Component createOutputPanel() {
-		outputTextGroup = new ValidatingTextGroup();
-		ListConfigurationComponent<ActivityPortConfiguration> inputPanel = new ListConfigurationComponent<ActivityPortConfiguration>(
-				"Output Port", getOutputPorts()) {
-			@Override
-			protected Component createItemComponent(ActivityPortConfiguration port) {
-				return new PortComponent(port, outputTextGroup);
-			}
-
-			@Override
-			protected ActivityPortConfiguration createDefaultItem() {
-				return new ActivityPortConfiguration("out", 0);
-			}
-		};
-		return inputPanel;
-	}
-
-	private Component createDependenciesPanel() {
-		String classLoaderSharing = getProperty("classLoaderSharing");
-		List<String> localDependencies = new ArrayList<>();
-		if (getJson().has("localDependency")) {
-			for (JsonNode localDependency : getJson().get("localDependency")) {
-				localDependencies.add(localDependency.textValue());
-			}
-		}
-		dependencyConfigurationPanel = new DependencyConfigurationPanel(classLoaderSharing,
-				localDependencies, libDir);
-		return dependencyConfigurationPanel;
-	}
-
-	class PortComponent extends JPanel {
-
-		private ValidatingTextField nameField;
-		private SpinnerNumberModel depthModel;
-		private final ValidatingTextGroup validatingTextGroup;
-
-		public PortComponent(final ActivityPortConfiguration portConfiguration,
-				ValidatingTextGroup validatingTextGroup) {
-			this.validatingTextGroup = validatingTextGroup;
-
-			nameField = new ValidatingTextField(portConfiguration.getName());
-			nameField.getDocument().addDocumentListener(new DocumentListener() {
-				@Override
-				public void removeUpdate(DocumentEvent e) {
-					portConfiguration.setName(nameField.getText());
-				}
-
-				@Override
-				public void insertUpdate(DocumentEvent e) {
-					portConfiguration.setName(nameField.getText());
-				}
-
-				@Override
-				public void changedUpdate(DocumentEvent e) {
-					portConfiguration.setName(nameField.getText());
-				}
-			});
-			validatingTextGroup.addValidTextComponent(nameField);
-			depthModel = new SpinnerNumberModel(portConfiguration.getDepth(), 0, 100, 1);
-			depthModel.addChangeListener(new ChangeListener() {
-				@Override
-				public void stateChanged(ChangeEvent e) {
-					portConfiguration.setDepth(depthModel.getNumber().intValue());
-				}
-			});
-
-			setLayout(new GridBagLayout());
-			GridBagConstraints c = new GridBagConstraints();
-			c.anchor = GridBagConstraints.WEST;
-			add(new JLabel("Name"), c);
-			c.fill = GridBagConstraints.HORIZONTAL;
-			c.weightx = 1;
-			add(nameField, c);
-			c.fill = GridBagConstraints.NONE;
-			c.weightx = 0;
-			add(new JLabel("Depth"), c);
-			add(new JSpinner(depthModel), c);
-
-		}
-
-		public void removeNotify() {
-			validatingTextGroup.removeTextComponent(nameField);
-		}
-
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellContextualView.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellContextualView.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellContextualView.java
deleted file mode 100644
index e738e38..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellContextualView.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.beanshell.views;
-
-import java.awt.Frame;
-
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.beanshell.actions.BeanshellActivityConfigurationAction;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.port.InputActivityPort;
-import uk.org.taverna.scufl2.api.port.OutputActivityPort;
-
-/**
- * A simple non editable HTML table view over a {@link BeanshellActivity}.
- * Clicking on the configure button shows the editable {@link BeanshellConfigView}
- *
- * @author Ian Dunlop
- * @author Stuart Owen
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class BeanshellContextualView extends HTMLBasedActivityContextualView {
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private final ActivityIconManager activityIconManager;
-	private final ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private final ApplicationConfiguration applicationConfiguration;
-
-	public BeanshellContextualView(Activity activity, EditManager editManager,
-			FileManager fileManager, ActivityIconManager activityIconManager,
-			ColourManager colourManager, ServiceDescriptionRegistry serviceDescriptionRegistry,
-			ApplicationConfiguration applicationConfiguration) {
-		super(activity, colourManager);
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		this.activityIconManager = activityIconManager;
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-		this.applicationConfiguration = applicationConfiguration;
-		init();
-	}
-
-	private void init() {
-	}
-
-	@Override
-	protected String getRawTableRowsHtml() {
-		StringBuilder html = new StringBuilder();
-		html.append("<tr><th>Input Port Name</th><th>Depth</th></tr>");
-		for (InputActivityPort inputActivityPort : getActivity().getInputPorts()) {
-			html.append("<tr><td>" + inputActivityPort.getName() + "</td><td>");
-			html.append(inputActivityPort.getDepth() + "</td></tr>");
-		}
-		html.append("<tr><th>Output Port Name</th><th>Depth</th></tr>");
-		for (OutputActivityPort outputActivityPort : getActivity().getOutputPorts()) {
-			html.append("<tr><td>" + outputActivityPort.getName() + "</td><td>");
-			html.append(outputActivityPort.getDepth() + "</td></tr>");
-		}
-		return html.toString();
-	}
-
-	@Override
-	public String getViewTitle() {
-		return "Beanshell service";
-	}
-
-	@Override
-	public Action getConfigureAction(Frame owner) {
-		return new BeanshellActivityConfigurationAction(getActivity(), owner, editManager,
-				fileManager, activityIconManager, serviceDescriptionRegistry, applicationConfiguration);
-	}
-
-	@Override
-	public int getPreferredPosition() {
-		return 100;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
deleted file mode 100644
index a77db8d..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
deleted file mode 100644
index a3c71cd..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
+++ /dev/null
@@ -1,3 +0,0 @@
-net.sf.taverna.t2.activities.beanshell.menu.AddBeanshellTemplateAction
-net.sf.taverna.t2.activities.beanshell.menu.AddBeanshellTemplateMenuAction
-net.sf.taverna.t2.activities.beanshell.menu.ConfigureBeanshellMenuAction

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
deleted file mode 100644
index a268bf1..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellActivityIcon
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
deleted file mode 100644
index dcdf598..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.beanshell.views.BeanshellActivityViewFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/META-INF/spring/beanshell-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/beanshell-activity-ui-context-osgi.xml b/src/main/resources/META-INF/spring/beanshell-activity-ui-context-osgi.xml
deleted file mode 100644
index 58a3e18..0000000
--- a/src/main/resources/META-INF/spring/beanshell-activity-ui-context-osgi.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:beans="http://www.springframework.org/schema/beans"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd
-                      http://www.springframework.org/schema/osgi
-                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
-
-	<service ref="BeanshellActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
-
-	<service ref="BeanshellTemplateService" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
-
-	<service ref="AddBeanshellTemplateAction" auto-export="interfaces" />
-	<service ref="AddBeanshellTemplateMenuAction" auto-export="interfaces" />
-	<service ref="ConfigureBeanshellMenuAction" auto-export="interfaces" />
-
-	<service ref="BeanshellActivityViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
-
-	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
-	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
-	<reference id="menuManager" interface="net.sf.taverna.t2.ui.menu.MenuManager" />
-	<reference id="selectionManager" interface="net.sf.taverna.t2.workbench.selection.SelectionManager" />
-	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
-	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
-	<reference id="serviceDescriptionRegistry" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry" />
-	<reference id="serviceRegistry" interface="uk.org.taverna.commons.services.ServiceRegistry" />
-	<reference id="applicationConfiguration" interface="uk.org.taverna.configuration.app.ApplicationConfiguration" />
-
-</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/META-INF/spring/beanshell-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/beanshell-activity-ui-context.xml b/src/main/resources/META-INF/spring/beanshell-activity-ui-context.xml
deleted file mode 100644
index fc6d5d4..0000000
--- a/src/main/resources/META-INF/spring/beanshell-activity-ui-context.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-	<bean id="BeanshellActivityIcon" class="net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellActivityIcon" />
-
-	<bean id="BeanshellTemplateService" class="net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService" />
-
-	<bean id="AddBeanshellTemplateAction" class="net.sf.taverna.t2.activities.beanshell.menu.AddBeanshellTemplateAction">
-			<property name="editManager" ref="editManager" />
-			<property name="menuManager" ref="menuManager" />
-			<property name="selectionManager" ref="selectionManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-	<bean id="AddBeanshellTemplateMenuAction" class="net.sf.taverna.t2.activities.beanshell.menu.AddBeanshellTemplateMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="menuManager" ref="menuManager" />
-			<property name="selectionManager" ref="selectionManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-	<bean id="ConfigureBeanshellMenuAction" class="net.sf.taverna.t2.activities.beanshell.menu.ConfigureBeanshellMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="fileManager" ref="fileManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="applicationConfiguration" ref="applicationConfiguration" />
-	</bean>
-
-	<bean id="BeanshellActivityViewFactory" class="net.sf.taverna.t2.activities.beanshell.views.BeanshellActivityViewFactory">
-			<property name="editManager" ref="editManager" />
-			<property name="fileManager" ref="fileManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="colourManager" ref="colourManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="applicationConfiguration" ref="applicationConfiguration" />
-	</bean>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/beanshell.png
----------------------------------------------------------------------
diff --git a/src/main/resources/beanshell.png b/src/main/resources/beanshell.png
deleted file mode 100644
index 8f6edfb..0000000
Binary files a/src/main/resources/beanshell.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/net/sf/taverna/t2/activities/beanshell/views/keys.txt
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/beanshell/views/keys.txt b/src/main/resources/net/sf/taverna/t2/activities/beanshell/views/keys.txt
deleted file mode 100644
index 15cb51b..0000000
--- a/src/main/resources/net/sf/taverna/t2/activities/beanshell/views/keys.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-++
---
-+
--
-~
-!
-*
-/
-%
-<<
->>
->>>
-<
->
-<=
->=
-==
-!=
-&
-^
-|
-&&
-||
-:
-=
-+=
--=
-*=
-/=
-%=
-&=
-^=
-|=
-<<=
->>=
->>>=
-=
-abstract
-assert
-boolean
-break
-byte
-case
-catch
-char
-class
-const
-continue
-default
-do
-double
-else
-enum
-extends
-false
-final
-finally
-float
-for
-goto
-if
-implements
-import
-instanceof
-int
-interface
-long
-native
-new
-null
-package
-private
-protected
-public
-return
-short
-static
-strictfp
-super
-switch
-synchronized
-this
-throw
-throws
-transient
-true
-try
-void
-volatile
-while 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/pom.xml b/taverna-beanshell-activity-ui/pom.xml
new file mode 100644
index 0000000..0afe9ef
--- /dev/null
+++ b/taverna-beanshell-activity-ui/pom.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>net.sf.taverna</groupId>
+                <artifactId>taverna-parent</artifactId>
+                <version>3.0.1-SNAPSHOT</version>
+	</parent>
+	<groupId>net.sf.taverna.t2.ui-activities</groupId>
+	<artifactId>beanshell-activity-ui</artifactId>
+        <version>2.0-SNAPSHOT</version>
+	<packaging>bundle</packaging>
+	<name>Taverna 2 Beanshell Activity UI</name>
+	<dependencies>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-icons-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-palette-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-tools</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>edits-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>file-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>menu-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-components</groupId>
+			<artifactId>workflow-view</artifactId>
+			<version>${t2.ui.components.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.lang</groupId>
+			<artifactId>ui</artifactId>
+			<version>${t2.lang.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>uk.org.taverna.configuration</groupId>
+			<artifactId>taverna-app-configuration-api</artifactId>
+			<version>${taverna.configuration.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>uk.org.taverna.commons</groupId>
+			<artifactId>taverna-services-api</artifactId>
+			<version>0.1.0-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>uk.org.taverna.scufl2</groupId>
+			<artifactId>scufl2-api</artifactId>
+			<version>${scufl2.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+                        <version>${junit.version}</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+	<repositories>
+		<repository>
+			<releases />
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+			<id>mygrid-repository</id>
+			<name>myGrid Repository</name>
+			<url>http://www.mygrid.org.uk/maven/repository
+			</url>
+		</repository>
+		<repository>
+			<releases>
+				<enabled>false</enabled>
+			</releases>
+			<snapshots />
+			<id>mygrid-snapshot-repository</id>
+			<name>myGrid Snapshot Repository</name>
+			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
+		</repository>
+	</repositories>
+</project>
+

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java
new file mode 100644
index 0000000..fe6159c
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.beanshell.actions;
+
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+
+import net.sf.taverna.t2.activities.beanshell.views.BeanshellConfigurationPanel;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
+import uk.org.taverna.configuration.app.ApplicationConfiguration;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+@SuppressWarnings("serial")
+public class BeanshellActivityConfigurationAction extends ActivityConfigurationAction {
+
+	public static final String EDIT_BEANSHELL_SCRIPT = "Edit beanshell script";
+	private final EditManager editManager;
+	private final FileManager fileManager;
+	private final ApplicationConfiguration applicationConfiguration;
+
+	public BeanshellActivityConfigurationAction(Activity activity, Frame owner,
+			EditManager editManager, FileManager fileManager,
+			ActivityIconManager activityIconManager,
+			ServiceDescriptionRegistry serviceDescriptionRegistry,
+			ApplicationConfiguration applicationConfiguration) {
+		super(activity, activityIconManager, serviceDescriptionRegistry);
+		this.editManager = editManager;
+		this.fileManager = fileManager;
+		this.applicationConfiguration = applicationConfiguration;
+		putValue(NAME, EDIT_BEANSHELL_SCRIPT);
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		ActivityConfigurationDialog currentDialog = ActivityConfigurationAction.getDialog(getActivity());
+		if (currentDialog != null) {
+			currentDialog.toFront();
+			return;
+		}
+		final BeanshellConfigurationPanel beanshellConfigView = new BeanshellConfigurationPanel(
+				getActivity(), applicationConfiguration);
+		final ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(getActivity(),
+				beanshellConfigView, editManager);
+
+		ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
+
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java
new file mode 100644
index 0000000..97eab18
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.beanshell.menu;
+
+import java.awt.event.ActionEvent;
+import java.net.URI;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+
+import net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.ui.menu.AbstractContextualMenuAction;
+import net.sf.taverna.t2.ui.menu.MenuManager;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.core.Workflow;
+
+/**
+ * An action to add a beanshell activity + a wrapping processor to the workflow.
+ *
+ * @author Alex Nenadic
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class AddBeanshellTemplateAction extends AbstractContextualMenuAction {
+
+	private static final String ADD_BEANSHELL = "Beanshell";
+
+	private static final URI insertSection = URI
+			.create("http://taverna.sf.net/2009/contextMenu/insert");
+
+	private EditManager editManager;
+	private MenuManager menuManager;
+	private SelectionManager selectionManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ServiceRegistry serviceRegistry;
+
+	public AddBeanshellTemplateAction() {
+		super(insertSection, 300);
+	}
+
+	@Override
+	public boolean isEnabled() {
+		return super.isEnabled() && getContextualSelection().getSelection() instanceof Workflow;
+	}
+
+	@Override
+	protected Action createAction() {
+
+		return new AddBeanshellAction();
+	}
+
+	protected class AddBeanshellAction extends AbstractAction {
+		AddBeanshellAction() {
+			super(ADD_BEANSHELL, activityIconManager
+					.iconForActivity(BeanshellTemplateService.ACTIVITY_TYPE));
+		}
+
+		public void actionPerformed(ActionEvent e) {
+			WorkflowView.importServiceDescription(serviceDescriptionRegistry
+					.getServiceDescription(BeanshellTemplateService.ACTIVITY_TYPE), false,
+					editManager, menuManager, selectionManager, serviceRegistry);
+		}
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setMenuManager(MenuManager menuManager) {
+		this.menuManager = menuManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java
new file mode 100644
index 0000000..7933000
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.beanshell.menu;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.net.URI;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.KeyStroke;
+
+import net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.ui.menu.AbstractMenuAction;
+import net.sf.taverna.t2.ui.menu.DesignOnlyAction;
+import net.sf.taverna.t2.ui.menu.MenuManager;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
+import uk.org.taverna.commons.services.ServiceRegistry;
+
+/**
+ * An action to add a beanshell activity + a wrapping processor to the workflow.
+ *
+ * @author Alex Nenadic
+ * @author alanrw
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class AddBeanshellTemplateMenuAction extends AbstractMenuAction {
+
+	private static final String ADD_BEANSHELL = "Beanshell";
+
+	private static final URI INSERT = URI
+			.create("http://taverna.sf.net/2008/t2workbench/menu#insert");
+
+	private static final URI ADD_BEANSHELL_URI = URI
+			.create("http://taverna.sf.net/2008/t2workbench/menu#graphMenuAddBeanshell");
+
+	private EditManager editManager;
+	private MenuManager menuManager;
+	private SelectionManager selectionManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ServiceRegistry serviceRegistry;
+
+	public AddBeanshellTemplateMenuAction() {
+		super(INSERT, 300, ADD_BEANSHELL_URI);
+	}
+
+	@Override
+	protected Action createAction() {
+		return new AddBeanshellMenuAction();
+	}
+
+	protected class AddBeanshellMenuAction extends AbstractAction implements DesignOnlyAction {
+		AddBeanshellMenuAction() {
+			super();
+			putValue(SMALL_ICON,
+					activityIconManager.iconForActivity(BeanshellTemplateService.ACTIVITY_TYPE));
+			putValue(NAME, ADD_BEANSHELL);
+			putValue(SHORT_DESCRIPTION, "Beanshell service");
+			putValue(
+					Action.ACCELERATOR_KEY,
+					KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.SHIFT_DOWN_MASK
+							| InputEvent.ALT_DOWN_MASK));
+		}
+
+		public void actionPerformed(ActionEvent e) {
+			WorkflowView.importServiceDescription(serviceDescriptionRegistry
+					.getServiceDescription(BeanshellTemplateService.ACTIVITY_TYPE), false,
+					editManager, menuManager, selectionManager, serviceRegistry);
+		}
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setMenuManager(MenuManager menuManager) {
+		this.menuManager = menuManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java
new file mode 100644
index 0000000..64ef0c8
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java
@@ -0,0 +1,67 @@
+package net.sf.taverna.t2.activities.beanshell.menu;
+
+import java.net.URI;
+
+import net.sf.taverna.t2.activities.beanshell.actions.BeanshellActivityConfigurationAction;
+import net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+
+import javax.swing.Action;
+
+import uk.org.taverna.configuration.app.ApplicationConfiguration;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+public class ConfigureBeanshellMenuAction extends AbstractConfigureActivityMenuAction {
+
+	public static final URI LOCALWORKER_ACTIVITY = URI
+			.create("http://ns.taverna.org.uk/2010/activity/localworker");
+
+	private EditManager editManager;
+	private FileManager fileManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ApplicationConfiguration applicationConfiguration;
+
+	public ConfigureBeanshellMenuAction() {
+		super(BeanshellTemplateService.ACTIVITY_TYPE);
+	}
+
+	@Override
+	protected Action createAction() {
+		Activity a = findActivity();
+		Action result = null;
+		if (!(a.getType().equals(LOCALWORKER_ACTIVITY))) {
+			result = new BeanshellActivityConfigurationAction(findActivity(), getParentFrame(),
+					editManager, fileManager, activityIconManager, serviceDescriptionRegistry,
+					applicationConfiguration);
+			result.putValue(Action.NAME, BeanshellActivityConfigurationAction.EDIT_BEANSHELL_SCRIPT);
+			addMenuDots(result);
+		}
+		return result;
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setApplicationConfiguration(ApplicationConfiguration applicationConfiguration) {
+		this.applicationConfiguration = applicationConfiguration;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java
new file mode 100644
index 0000000..055aa81
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.beanshell.servicedescriptions;
+
+import java.net.URI;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
+
+/**
+ *
+ * @author Alex Nenadic
+ * @author David Withers
+ */
+public class BeanshellActivityIcon implements ActivityIconSPI {
+
+	private static Icon icon = null;
+
+	@Override
+	public int canProvideIconScore(URI activityType) {
+		if (BeanshellTemplateService.ACTIVITY_TYPE.equals(activityType))
+			return DEFAULT_ICON + 1;
+		else
+			return NO_ICON;
+	}
+
+	@Override
+	public Icon getIcon(URI activityType) {
+		return getBeanshellIcon();
+	}
+
+	public static Icon getBeanshellIcon() {
+		if (icon == null) {
+			icon = new ImageIcon(BeanshellActivityIcon.class.getResource("/beanshell.png"));
+		}
+		return icon;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java
new file mode 100644
index 0000000..c2cb38f
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java
@@ -0,0 +1,57 @@
+package net.sf.taverna.t2.activities.beanshell.servicedescriptions;
+
+import java.net.URI;
+
+import javax.swing.Icon;
+
+import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+
+public class BeanshellTemplateService extends AbstractTemplateService {
+
+	public static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/beanshell");
+
+	private static final String BEANSHELL = "Beanshell";
+
+	private static final URI providerId = URI
+	.create("http://taverna.sf.net/2010/service-provider/beanshell");
+
+	public String getName() {
+		return BEANSHELL;
+	}
+
+	@Override
+	public URI getActivityType() {
+		return ACTIVITY_TYPE;
+	}
+
+	@Override
+	public Configuration getActivityConfiguration() {
+		Configuration configuration = new Configuration();
+		configuration.setType(ACTIVITY_TYPE.resolve("#Config"));
+		configuration.getJsonAsObjectNode().put("script", "");
+		configuration.getJsonAsObjectNode().put("classLoaderSharing", "workflow");
+		return configuration;
+	}
+
+	@Override
+	public Icon getIcon() {
+		return BeanshellActivityIcon.getBeanshellIcon();
+	}
+
+	@Override
+	public String getDescription() {
+		return "A service that allows Beanshell scripts, with dependencies on libraries";
+	}
+
+	public static ServiceDescription getServiceDescription() {
+		BeanshellTemplateService bts = new BeanshellTemplateService();
+		return bts.templateService;
+	}
+
+	public String getId() {
+		return providerId.toString();
+	}
+
+}


[37/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-wsdl-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceDescription.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceDescription.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceDescription.java
new file mode 100644
index 0000000..faa3f8c
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceDescription.java
@@ -0,0 +1,154 @@
+/*********************************************************************
+ * Copyright (C) 2007-2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ **********************************************************************/
+package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
+
+import java.net.URI;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import javax.swing.Icon;
+
+import net.sf.taverna.t2.security.credentialmanager.CMException;
+import net.sf.taverna.t2.security.credentialmanager.CredentialManager;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
+
+import org.apache.log4j.Logger;
+
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+public class WSDLServiceDescription extends ServiceDescription {
+
+	public static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/wsdl");
+	public static final URI INPUT_SPLITTER_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/xml-splitter/in");
+	public static final URI OUTPUT_SPLITTER_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/xml-splitter/out");
+
+	private static final String WSDL = "WSDL @ ";
+
+	private String use;
+	private URI uri;
+	private String style;
+	private String operation;
+	private final CredentialManager credentialManager;
+
+	private static Logger logger = Logger.getLogger(WSDLServiceDescription.class);
+
+	public WSDLServiceDescription(CredentialManager credentialManager) {
+		this.credentialManager = credentialManager;
+	}
+
+	public String getUse() {
+		return use;
+	}
+
+	public void setUse(String use) {
+		this.use = use;
+	}
+
+	public URI getURI() {
+		return uri;
+	}
+
+	public void setURI(URI url) {
+		this.uri = url;
+	}
+
+	public String getStyle() {
+		return style;
+	}
+
+	public void setStyle(String style) {
+		this.style = style;
+	}
+
+	public String getType() {
+		return "WSDL";
+	}
+
+	@Override
+	public String toString() {
+		return operation;
+	}
+
+	public String getOperation() {
+		return operation;
+	}
+
+	public void setOperation(String operation) {
+		this.operation = operation;
+	}
+
+	public Icon getIcon() {
+		return WSDLActivityIcon.getWSDLIcon();
+	}
+
+	@Override
+	public URI getActivityType() {
+		return ACTIVITY_TYPE;
+	}
+
+	@Override
+	public Configuration getActivityConfiguration() {
+		Configuration configuration = new Configuration();
+		configuration.setType(ACTIVITY_TYPE.resolve("#Config"));
+		ObjectNode json = (ObjectNode) configuration.getJson();
+		ObjectNode operation = json.objectNode();
+		json.put("operation", operation);
+		operation.put("wsdl", getURI().toString());
+		operation.put("name", getOperation());
+		return configuration;
+	}
+
+	public String getName() {
+		return getOperation();
+	}
+
+	public List<? extends Comparable<?>> getPath() {
+		return Collections.singletonList(WSDL + getURI());
+	}
+
+	protected List<Object> getIdentifyingData() {
+		return Arrays.<Object> asList(getURI(), getOperation());
+	}
+
+	@Override
+	public boolean isTemplateService() {
+		return needsSecurity();
+	}
+
+	protected boolean needsSecurity() {
+		if (credentialManager == null) {
+			// We don't know if it needs security or not
+			return false;
+		}
+		// A match is a good indicator that security configuration is needed
+		try {
+			return credentialManager.hasUsernamePasswordForService(getURI());
+		} catch (CMException e) {
+			logger.warn("Could not check if credential manager has username/password for " + getURI(), e);
+			return false;
+		}
+	}
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProvider.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProvider.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProvider.java
new file mode 100644
index 0000000..daf0cad
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProvider.java
@@ -0,0 +1,206 @@
+package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.swing.Icon;
+import javax.wsdl.Operation;
+import javax.wsdl.WSDLException;
+import javax.xml.parsers.ParserConfigurationException;
+
+import net.sf.taverna.t2.activities.wsdl.WSDLActivityHealthChecker;
+import net.sf.taverna.t2.lang.observer.Observable;
+import net.sf.taverna.t2.lang.observer.Observer;
+import net.sf.taverna.t2.security.credentialmanager.CredentialManager;
+import net.sf.taverna.t2.servicedescriptions.AbstractConfigurableServiceProvider;
+import net.sf.taverna.t2.servicedescriptions.CustomizedConfigurePanelProvider;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.servicedescriptions.events.RemovedProviderEvent;
+import net.sf.taverna.t2.servicedescriptions.events.ServiceDescriptionRegistryEvent;
+import net.sf.taverna.wsdl.parser.UnknownOperationException;
+import net.sf.taverna.wsdl.parser.WSDLParser;
+
+import org.apache.log4j.Logger;
+import org.xml.sax.SAXException;
+
+public class WSDLServiceProvider extends
+		AbstractConfigurableServiceProvider<WSDLServiceProviderConfig> implements
+		CustomizedConfigurePanelProvider<WSDLServiceProviderConfig> {
+
+	private static Logger logger = Logger.getLogger(WSDLServiceProvider.class);
+
+	private static final URI providerId = URI
+	.create("http://taverna.sf.net/2010/service-provider/wsdl");
+
+	private CredentialManager credentialManager;
+
+	public static class FlushWSDLCacheOnRemovalObserver implements
+			Observer<ServiceDescriptionRegistryEvent> {
+		public void notify(
+				Observable<ServiceDescriptionRegistryEvent> registry,
+				ServiceDescriptionRegistryEvent event) throws Exception {
+			if (!(event instanceof RemovedProviderEvent)) {
+				return;
+			}
+			RemovedProviderEvent removedProviderEvent = (RemovedProviderEvent) event;
+			if (!(removedProviderEvent.getProvider() instanceof WSDLServiceProvider)) {
+				return;
+			}
+			WSDLServiceProvider serviceProvider = (WSDLServiceProvider) removedProviderEvent
+					.getProvider();
+			URI wsdlLocation = serviceProvider.getConfiguration().getURI();
+			WSDLParser.flushCache(wsdlLocation.toASCIIString());
+			logger.info("Flushed cache for WSDL " + wsdlLocation);
+		}
+	}
+
+	private static final String WSDL_SERVICE = "WSDL service";
+
+	private static FlushWSDLCacheOnRemovalObserver flushObserver = new FlushWSDLCacheOnRemovalObserver();
+
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+
+	public WSDLServiceProvider() {
+		super(new WSDLServiceProviderConfig("http://somehost/service?wsdl"));
+	}
+
+	public String getName() {
+		return WSDL_SERVICE;
+	}
+
+	public List<WSDLServiceProviderConfig> getDefaultConfigurations() {
+
+		List<WSDLServiceProviderConfig> defaults = new ArrayList<WSDLServiceProviderConfig>();
+
+		// If defaults have failed to load from a configuration file then load them here.
+		if (!serviceDescriptionRegistry.isDefaultSystemConfigurableProvidersLoaded()){
+			// 2009-12-16: 503 server error
+			defaults.add(new WSDLServiceProviderConfig(
+							"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/eutils.wsdl"));
+			defaults.add(new WSDLServiceProviderConfig(
+					"http://soap.bind.ca/wsdl/bind.wsdl"));
+			defaults.add(new WSDLServiceProviderConfig(
+					"http://www.ebi.ac.uk/ws/services/urn:Dbfetch?wsdl"));
+		} // else return an empty list
+
+		return defaults;
+	}
+
+	public void findServiceDescriptionsAsync(
+			FindServiceDescriptionsCallBack callBack) {
+
+		URI wsdl = serviceProviderConfig.getURI();
+
+		callBack.status("Parsing wsdl:" + wsdl);
+		WSDLParser parser = null;
+		try {
+			parser = new WSDLParser(wsdl.toASCIIString());
+			List<Operation> operations = parser.getOperations();
+			callBack.status("Found " + operations.size() + " WSDL operations:"
+					+ wsdl);
+			List<WSDLServiceDescription> items = new ArrayList<WSDLServiceDescription>();
+			for (Operation op : operations) {
+				WSDLServiceDescription item = new WSDLServiceDescription(credentialManager);
+				try {
+					String name = op.getName();
+					item.setOperation(name);
+					String use = parser.getUse(name);
+					String style = parser.getStyle();
+					if (!WSDLActivityHealthChecker.checkStyleAndUse(style, use)) {
+						logger.warn("Unsupported style and use combination " + style + "/" + use + " for operation " + name + " from " + wsdl);
+						continue;
+					}
+					item.setUse(use);
+					item.setStyle(style);
+					item.setURI(wsdl);
+					item.setDescription(parser.getOperationDocumentation(name));
+					items.add(item);
+				} catch (UnknownOperationException e) {
+					String message = "Encountered an unexpected operation name:"
+							+ item.getOperation();
+					callBack.fail(message, e);
+				}
+			}
+			callBack.partialResults(items);
+			callBack.finished();
+		} catch (ParserConfigurationException e) {
+			String message = "Error configuring the WSDL parser";
+			callBack.fail(message, e);
+		} catch (WSDLException e) {
+			String message = "There was an error with the wsdl: " + wsdl;
+			callBack.fail(message, e);
+		} catch (IOException e) {
+			String message = "There was an IO error parsing the wsdl: " + wsdl
+					+ " Possible reason: the wsdl location was incorrect.";
+			callBack.fail(message, e);
+		} catch (SAXException e) {
+			String message = "There was an error with the XML in the wsdl: "
+					+ wsdl;
+			callBack.fail(message, e);
+		} catch (IllegalArgumentException e) { // a problem with the wsdl url
+			String message = "There was an error with the wsdl: " + wsdl + " "
+					+ "Possible reason: the wsdl location was incorrect.";
+			callBack.fail(message, e);
+		} catch (Exception e) { // anything else we did not expect
+			String message = "There was an error with the wsdl: " + wsdl;
+			callBack.fail(message, e);
+		}
+	}
+
+	@Override
+	public String toString() {
+		return getName() + " " + getConfiguration().getURI();
+	}
+
+	public Icon getIcon() {
+		return WSDLActivityIcon.getWSDLIcon();
+	}
+
+	@Override
+	protected List<? extends Object> getIdentifyingData() {
+		List<String> result;
+		result = Arrays.asList(getConfiguration().getURI().toString());
+		return result;
+	}
+
+	/**
+	 * Will be set by ServiceDescriptionRegistryImpl
+	 *
+	 * @param registry Registry this provider has been added to
+	 */
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+		synchronized (flushObserver) {
+			// Add the (static common) observer if the registry does not have it
+			if (!serviceDescriptionRegistry.getObservers().contains(flushObserver)) {
+				serviceDescriptionRegistry.addObserver(flushObserver);
+			}
+		}
+	}
+
+	@SuppressWarnings("serial")
+	public void createCustomizedConfigurePanel(final CustomizedConfigureCallBack<WSDLServiceProviderConfig> callBack) {
+
+		AddWSDLServiceDialog addWSDLServiceDialog = new AddWSDLServiceDialog() {
+				@Override
+				protected void addRegistry(String wsdlURL) {
+
+					WSDLServiceProviderConfig providerConfig = new WSDLServiceProviderConfig(wsdlURL);
+					callBack.newProviderConfiguration(providerConfig);
+				}
+			};
+			addWSDLServiceDialog.setVisible(true);
+	}
+
+	public String getId() {
+		return providerId.toString();
+	}
+
+	public void setCredentialManager(CredentialManager credentialManager) {
+		this.credentialManager = credentialManager;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProviderConfig.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProviderConfig.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProviderConfig.java
new file mode 100644
index 0000000..9a63c03
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/WSDLServiceProviderConfig.java
@@ -0,0 +1,32 @@
+package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
+
+import java.net.URI;
+
+import net.sf.taverna.t2.lang.beans.PropertyAnnotated;
+import net.sf.taverna.t2.lang.beans.PropertyAnnotation;
+
+public class WSDLServiceProviderConfig extends PropertyAnnotated {
+	private URI uri;
+	
+	public WSDLServiceProviderConfig() {
+	}
+
+	public WSDLServiceProviderConfig(String uri) {
+		this.uri = URI.create(uri);
+	}
+
+	@PropertyAnnotation(displayName = "WSDL location", preferred = true)
+	public URI getURI() {
+		return uri;
+	}
+
+	public void setURI(URI uri) {
+		this.uri = uri;
+	}
+
+	@Override
+	public String toString() {
+		return getURI().toASCIIString();
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLInputSplitterActivityIcon.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLInputSplitterActivityIcon.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLInputSplitterActivityIcon.java
new file mode 100644
index 0000000..cc92f3b
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLInputSplitterActivityIcon.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
+
+import java.net.URI;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
+
+/**
+ *
+ * @author Alex Nenadic
+ *
+ */
+public class XMLInputSplitterActivityIcon implements ActivityIconSPI{
+
+	private static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/xml-splitter/in");
+
+	private static Icon icon = null;
+
+	public int canProvideIconScore(URI activityType) {
+		if (activityType.equals(ACTIVITY_TYPE))
+			return DEFAULT_ICON + 1;
+		else
+			return NO_ICON;
+	}
+
+	public Icon getIcon(URI activityType) {
+		return getXMLOutputSplitterIcon();
+	}
+
+	public static Icon getXMLOutputSplitterIcon() {
+		if (icon == null) {
+			icon = new ImageIcon(XMLOutputSplitterActivityIcon.class.getResource("/xml-splitter.png"));
+		}
+		return icon;
+	}
+
+}
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLOutputSplitterActivityIcon.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLOutputSplitterActivityIcon.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLOutputSplitterActivityIcon.java
new file mode 100644
index 0000000..73c9bcb
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/XMLOutputSplitterActivityIcon.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
+
+import java.net.URI;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
+
+/**
+ *
+ * @author Alex Nenadic
+ *
+ */
+public class XMLOutputSplitterActivityIcon implements ActivityIconSPI{
+
+	private static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/xml-splitter/out");
+
+	private static Icon icon = null;
+
+	public int canProvideIconScore(URI activityType) {
+		if (activityType.equals(ACTIVITY_TYPE))
+			return DEFAULT_ICON + 1;
+		else
+			return NO_ICON;
+	}
+
+	public Icon getIcon(URI activityType) {
+		return getXMLOutputSplitterIcon();
+	}
+
+	public static Icon getXMLOutputSplitterIcon() {
+		if (icon == null) {
+			icon = new ImageIcon(XMLOutputSplitterActivityIcon.class.getResource("/xml-splitter.png"));
+		}
+		return icon;
+	}
+
+}
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/AbstractXMLSplitterActionView.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/AbstractXMLSplitterActionView.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/AbstractXMLSplitterActionView.java
new file mode 100644
index 0000000..0ca95e5
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/AbstractXMLSplitterActionView.java
@@ -0,0 +1,159 @@
+package net.sf.taverna.t2.activities.wsdl.views;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+import javax.wsdl.WSDLException;
+import javax.xml.parsers.ParserConfigurationException;
+
+import net.sf.taverna.t2.activities.wsdl.actions.AbstractAddXMLSplitterAction;
+import net.sf.taverna.t2.activities.wsdl.actions.AddXMLInputSplitterAction;
+import net.sf.taverna.t2.activities.wsdl.actions.AddXMLOutputSplitterAction;
+import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
+import net.sf.taverna.wsdl.parser.TypeDescriptor;
+import net.sf.taverna.wsdl.parser.UnknownOperationException;
+
+import org.apache.log4j.Logger;
+import org.jdom.JDOMException;
+import org.xml.sax.SAXException;
+
+import uk.org.taverna.scufl2.api.activity.Activity;
+import uk.org.taverna.scufl2.api.port.DepthPort;
+import uk.org.taverna.scufl2.api.port.InputActivityPort;
+import uk.org.taverna.scufl2.api.port.OutputActivityPort;
+
+@SuppressWarnings("serial")
+public abstract class AbstractXMLSplitterActionView extends HTMLBasedActivityContextualView {
+
+	private static Logger logger = Logger.getLogger(AbstractXMLSplitterActionView.class);
+	protected final EditManager editManager;
+	protected final SelectionManager selectionManager;
+	protected AbstractAddXMLSplitterAction splitterAction;
+
+	public AbstractXMLSplitterActionView(Activity activity, EditManager editManager,
+			SelectionManager selectionManager, ColourManager colourManager) {
+		super(activity, colourManager);
+		this.editManager = editManager;
+		this.selectionManager = selectionManager;
+		if (getActivity().getType().equals(WSDLServiceDescription.OUTPUT_SPLITTER_TYPE)) {
+			splitterAction = new AddXMLOutputSplitterAction(getActivity(),
+					null, editManager, selectionManager);
+		} else if (getActivity().getType().equals(WSDLServiceDescription.INPUT_SPLITTER_TYPE)) {
+			splitterAction = new AddXMLInputSplitterAction(getActivity(),
+					null, editManager, selectionManager);
+		}
+		super.initView();
+	}
+
+	@Override
+	public void initView() {
+	}
+
+	protected void addOutputSplitter(final JComponent mainFrame, JPanel flowPanel) {
+		if (getActivity().getType().equals(WSDLServiceDescription.OUTPUT_SPLITTER_TYPE)) {
+			try {
+				Map<String, TypeDescriptor> descriptors = splitterAction.getTypeDescriptors();
+				if (!AbstractAddXMLSplitterAction.filterDescriptors(descriptors).isEmpty()) {
+					flowPanel.add(new JButton(splitterAction));
+				}
+			} catch (UnknownOperationException | IOException | ParserConfigurationException
+					| WSDLException | SAXException | JDOMException e) {
+				logger.warn("Could not find type descriptors for " + getActivity(), e);
+			}
+		}
+	}
+
+	protected void addInputSplitter(final JComponent mainFrame, JPanel flowPanel) {
+		if (getActivity().getType().equals(WSDLServiceDescription.INPUT_SPLITTER_TYPE)) {
+			try {
+				Map<String, TypeDescriptor> descriptors = splitterAction.getTypeDescriptors();
+				if (!AbstractAddXMLSplitterAction.filterDescriptors(descriptors).isEmpty()) {
+					splitterAction.setOwner(mainFrame);
+					flowPanel.add(new JButton(splitterAction));
+				}
+			} catch (UnknownOperationException | IOException | ParserConfigurationException
+					| WSDLException | SAXException | JDOMException e) {
+				logger.warn("Could not find type descriptors for " + getActivity(), e);
+			}
+		}
+	}
+
+	protected String describePorts() {
+		StringBuilder html = new StringBuilder();
+
+		if (!getActivity().getInputPorts().isEmpty()) {
+			html.append("<tr><th colspan='2' align='left'>Inputs</th></tr>");
+			for (InputActivityPort port : getActivity().getInputPorts()) {
+				TypeDescriptor descriptor = null;
+				if (getActivity().getType().equals(WSDLServiceDescription.INPUT_SPLITTER_TYPE)) {
+					try {
+						descriptor = splitterAction.getTypeDescriptors().get(port.getName());
+					} catch (UnknownOperationException | IOException | ParserConfigurationException
+							| WSDLException | SAXException | JDOMException e) {
+						logger.warn("Could not find type descriptors for " + getActivity(), e);
+					}
+				}
+				if (descriptor == null) {
+					html.append(describePort(port));
+				} else {
+					html.append(describePort(port, descriptor));
+				}
+
+			}
+		}
+
+		if (!getActivity().getOutputPorts().isEmpty()) {
+			html.append("<tr><th colspan='2' align='left'>Outputs</th></tr>");
+			for (OutputActivityPort port : getActivity().getOutputPorts()) {
+				TypeDescriptor descriptor = null;
+				if (getActivity().getType().equals(WSDLServiceDescription.OUTPUT_SPLITTER_TYPE)) {
+					try {
+						descriptor = splitterAction.getTypeDescriptors().get(port.getName());
+					} catch (UnknownOperationException | IOException | ParserConfigurationException
+							| WSDLException | SAXException | JDOMException e) {
+						logger.warn("Could not find type descriptors for " + getActivity(), e);
+					}
+				}
+				if (descriptor == null) {
+					html.append(describePort(port));
+				} else {
+					html.append(describePort(port, descriptor));
+				}
+			}
+		}
+
+		return html.toString();
+	}
+
+	private String describePort(DepthPort port, TypeDescriptor descriptor) {
+		String html = "<tr><td>" + port.getName() + "</td><td>";
+		if (descriptor != null && descriptor.isOptional()) {
+			html += "<em>optional</em><br>";
+		}
+		html+="Depth:"+port.getDepth()+"<br>";
+		if (descriptor != null ) {
+            html+="<code>"+descriptor.getQname().toString()+"</code><br>";
+//            if (descriptor.getDocumentation() != null && !descriptor.getDocumentation().isEmpty()){
+//                html += "<p>"+descriptor.getDocumentation()+"</p>";
+//            }
+        }
+
+		html+="</td></tr>";
+		return html;
+	}
+
+	private String describePort(DepthPort port) {
+		String html = "<tr><td>" + port.getName() + "</td><td>";
+		html += "Depth:" + port.getDepth() + "<br>";
+		html += "</td></tr>";
+		return html;
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityConfigurationView.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityConfigurationView.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityConfigurationView.java
new file mode 100644
index 0000000..4f728d9
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityConfigurationView.java
@@ -0,0 +1,446 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2008 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.views;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.net.URI;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.SwingConstants;
+import javax.swing.border.Border;
+import javax.swing.border.EmptyBorder;
+import javax.swing.plaf.basic.BasicComboBoxRenderer;
+
+import net.sf.taverna.t2.activities.wsdl.security.SecurityProfiles;
+import net.sf.taverna.t2.lang.ui.DialogTextArea;
+import net.sf.taverna.t2.security.credentialmanager.CredentialManager;
+import net.sf.taverna.t2.workbench.ui.credentialmanager.CredentialManagerUI;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationPanel;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+/**
+ * Configuration dialog for WSDL activity.
+ *
+ * @author Alex Nenadic
+ */
+@SuppressWarnings("serial")
+public class WSDLActivityConfigurationView extends ActivityConfigurationPanel implements ItemListener {
+
+	private CredentialManager credentialManager;
+	private CredentialManagerUI credManagerUI;
+
+	private ButtonGroup buttonGroup;
+	private JRadioButton noSecurityRadioButton;
+	private JLabel noSecurityLabel;
+	private JRadioButton httpSecurityAuthNRadioButton;
+	private JLabel httpSecurityAuthNLabel;
+	private JRadioButton wsSecurityAuthNRadioButton;
+	private JLabel wsSecurityAuthNLabel;
+
+	// Password types
+	private final String PLAINTEXT_PASSWORD = "Plaintext password";
+	private final String DIGEST_PASSWORD = "Digest password";
+	private String[] passwordTypes = new String[] { PLAINTEXT_PASSWORD, DIGEST_PASSWORD };
+	private String[] tooltips = new String[] {
+			"Password will be sent in plaintext (which is OK if service is using HTTPS)",
+			"Password will be digested (cryptographically hashed) before sending" };
+	private JComboBox<String> passwordTypeComboBox;
+	private JCheckBox addTimestampCheckBox;
+	private JButton setHttpUsernamePasswordButton;
+	private JButton setWsdlUsernamePasswordButton;
+
+	// private Logger logger = Logger.getLogger(WSDLActivityConfigurationView.class);
+
+	public WSDLActivityConfigurationView(Activity activity, CredentialManager credentialManager) {
+		super(activity);
+		this.credentialManager = credentialManager;
+		initialise();
+	}
+
+	@Override
+	protected void initialise() {
+		super.initialise();
+
+		int gridy = 0;
+
+		// title panel
+		JPanel titlePanel = new JPanel(new BorderLayout());
+		titlePanel.setBackground(Color.WHITE);
+		JLabel titleLabel = new JLabel("Security configuration");
+		titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 13.5f));
+		titleLabel.setBorder(new EmptyBorder(10, 10, 0, 10));
+		DialogTextArea titleMessage = new DialogTextArea(
+				"Select a security profile for the service");
+		titleMessage.setMargin(new Insets(5, 20, 10, 10));
+		titleMessage.setFont(titleMessage.getFont().deriveFont(11f));
+		titleMessage.setEditable(false);
+		titleMessage.setFocusable(false);
+		titlePanel.setBorder(new EmptyBorder(10, 10, 0, 10));
+		titlePanel.add(titleLabel, BorderLayout.NORTH);
+		titlePanel.add(titleMessage, BorderLayout.CENTER);
+		addDivider(titlePanel, SwingConstants.BOTTOM, true);
+
+		// Main panel
+		JPanel mainPanel = new JPanel();
+		mainPanel.setLayout(new GridBagLayout());
+		mainPanel.setBorder(new EmptyBorder(10, 10, 10, 10));
+
+		// Create the radio buttons
+		noSecurityRadioButton = new JRadioButton("None");
+		noSecurityRadioButton.addItemListener(this);
+
+		wsSecurityAuthNRadioButton = new JRadioButton(
+				"WS-Security username and password authentication");
+		wsSecurityAuthNRadioButton.addItemListener(this);
+
+		httpSecurityAuthNRadioButton = new JRadioButton("HTTP username and password authentication");
+		httpSecurityAuthNRadioButton.addItemListener(this);
+
+		// Group the radio buttons
+		buttonGroup = new ButtonGroup();
+		buttonGroup.add(noSecurityRadioButton);
+		buttonGroup.add(wsSecurityAuthNRadioButton);
+		buttonGroup.add(httpSecurityAuthNRadioButton);
+
+		GridBagConstraints gbc = new GridBagConstraints();
+		gbc.weightx = 1.0;
+		gbc.weighty = 0.0;
+
+		gbc.gridx = 0;
+		gbc.gridy = gridy++;
+		gbc.fill = GridBagConstraints.NONE;
+		gbc.anchor = GridBagConstraints.WEST;
+		gbc.insets = new Insets(5, 10, 0, 0);
+		mainPanel.add(noSecurityRadioButton, gbc);
+
+		noSecurityLabel = new JLabel("Service requires no security");
+		noSecurityLabel.setFont(noSecurityLabel.getFont().deriveFont(11f));
+		// addDivider(noSecurityLabel, SwingConstants.BOTTOM, false);
+		gbc.gridx = 0;
+		gbc.gridy = gridy++;
+		gbc.fill = GridBagConstraints.HORIZONTAL;
+		gbc.anchor = GridBagConstraints.WEST;
+		gbc.insets = new Insets(0, 40, 10, 10);
+		mainPanel.add(noSecurityLabel, gbc);
+
+		gbc.gridx = 0;
+		gbc.gridy = gridy++;
+		gbc.fill = GridBagConstraints.NONE;
+		gbc.anchor = GridBagConstraints.WEST;
+		gbc.insets = new Insets(5, 10, 0, 0);
+		mainPanel.add(httpSecurityAuthNRadioButton, gbc);
+
+		ActionListener usernamePasswordListener = new ActionListener() {
+
+			public void actionPerformed(ActionEvent e) {
+				// Get Credential Manager UI to get the username and password for the service
+				if (credManagerUI == null) {
+					credManagerUI = new CredentialManagerUI(credentialManager);
+				}
+				credManagerUI.newPasswordForService(URI.create(getJson().get("operation")
+						.get("wsdl").textValue()));
+			}
+		};
+
+		httpSecurityAuthNLabel = new JLabel(
+				"Service requires HTTP username and password in order to authenticate the user");
+		httpSecurityAuthNLabel.setFont(httpSecurityAuthNLabel.getFont().deriveFont(11f));
+		gbc.gridx = 0;
+		gbc.gridy = gridy++;
+		gbc.fill = GridBagConstraints.HORIZONTAL;
+		gbc.anchor = GridBagConstraints.WEST;
+		gbc.insets = new Insets(0, 40, 10, 10);
+		mainPanel.add(httpSecurityAuthNLabel, gbc);
+
+		// Set username and password button;
+		setHttpUsernamePasswordButton = new JButton("Set username and password");
+		gbc.gridx = 0;
+		gbc.gridy = gridy++;
+		gbc.fill = GridBagConstraints.NONE;
+		gbc.anchor = GridBagConstraints.EAST;
+		gbc.insets = new Insets(0, 40, 10, 10);
+		gbc.weightx = 1.0;
+		gbc.weighty = 1.0; // add any vertical space to this component
+		mainPanel.add(setHttpUsernamePasswordButton, gbc);
+		setHttpUsernamePasswordButton.addActionListener(usernamePasswordListener);
+
+		gbc.gridx = 0;
+		gbc.gridy = gridy++;
+		gbc.fill = GridBagConstraints.NONE;
+		gbc.anchor = GridBagConstraints.WEST;
+		gbc.insets = new Insets(5, 10, 0, 0);
+		mainPanel.add(wsSecurityAuthNRadioButton, gbc);
+
+		wsSecurityAuthNLabel = new JLabel(
+				"Service requires WS-Security username and password in order to authenticate the user");
+		wsSecurityAuthNLabel.setFont(wsSecurityAuthNLabel.getFont().deriveFont(11f));
+		gbc.gridx = 0;
+		gbc.gridy = gridy++;
+		gbc.fill = GridBagConstraints.HORIZONTAL;
+		gbc.anchor = GridBagConstraints.WEST;
+		gbc.insets = new Insets(0, 40, 0, 0);
+		mainPanel.add(wsSecurityAuthNLabel, gbc);
+
+		// Password type list
+		passwordTypeComboBox = new JComboBox<>(passwordTypes);
+		passwordTypeComboBox.setRenderer(new ComboBoxTooltipRenderer());
+		gbc.gridx = 0;
+		gbc.gridy = gridy++;
+		gbc.fill = GridBagConstraints.NONE;
+		gbc.anchor = GridBagConstraints.WEST;
+		gbc.insets = new Insets(10, 40, 0, 0);
+		mainPanel.add(passwordTypeComboBox, gbc);
+
+		// 'Add timestamp' checkbox
+		addTimestampCheckBox = new JCheckBox("Add a timestamp to SOAP message");
+		gbc.gridx = 0;
+		gbc.gridy = gridy++;
+		gbc.fill = GridBagConstraints.NONE;
+		gbc.anchor = GridBagConstraints.WEST;
+		gbc.insets = new Insets(5, 40, 10, 10);
+		mainPanel.add(addTimestampCheckBox, gbc);
+
+		// Set username and password button;
+		setWsdlUsernamePasswordButton = new JButton("Set username and password");
+		gbc.gridx = 0;
+		gbc.gridy = gridy++;
+		gbc.fill = GridBagConstraints.NONE;
+		gbc.anchor = GridBagConstraints.EAST;
+		gbc.insets = new Insets(0, 40, 10, 10);
+		gbc.weightx = 1.0;
+		gbc.weighty = 1.0; // add any vertical space to this component
+		mainPanel.add(setWsdlUsernamePasswordButton, gbc);
+		setWsdlUsernamePasswordButton.addActionListener(usernamePasswordListener);
+
+		addDivider(mainPanel, SwingConstants.BOTTOM, true);
+
+		// Enable/disable controls based on what is the current security profiles
+		if (!getJson().has("securityProfile")) {
+			noSecurityRadioButton.setSelected(true);
+		} else {
+			URI securityProfile = URI.create(getJson().get("securityProfile").textValue());
+			if (securityProfile.equals(SecurityProfiles.WSSECURITY_USERNAMETOKEN_PLAINTEXTPASSWORD)
+					|| securityProfile
+							.equals(SecurityProfiles.WSSECURITY_USERNAMETOKEN_DIGESTPASSWORD)
+					|| securityProfile
+							.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_PLAINTEXTPASSWORD)
+					|| securityProfile
+							.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_DIGESTPASSWORD)) {
+				wsSecurityAuthNRadioButton.setSelected(true);
+			}
+			if (securityProfile.equals(SecurityProfiles.HTTP_BASIC_AUTHN)
+					|| securityProfile.equals(SecurityProfiles.HTTP_DIGEST_AUTHN)) {
+				httpSecurityAuthNRadioButton.setSelected(true);
+			}
+			if (securityProfile.equals(SecurityProfiles.WSSECURITY_USERNAMETOKEN_PLAINTEXTPASSWORD)
+					|| securityProfile
+							.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_PLAINTEXTPASSWORD)) {
+				passwordTypeComboBox.setSelectedItem(PLAINTEXT_PASSWORD);
+			} else if (securityProfile
+					.equals(SecurityProfiles.WSSECURITY_USERNAMETOKEN_DIGESTPASSWORD)
+					|| securityProfile
+							.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_DIGESTPASSWORD)) {
+				passwordTypeComboBox.setSelectedItem(DIGEST_PASSWORD);
+			}
+			if (securityProfile
+					.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_DIGESTPASSWORD)
+					|| securityProfile
+							.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_PLAINTEXTPASSWORD)) {
+				addTimestampCheckBox.setSelected(true);
+			} else {
+				addTimestampCheckBox.setSelected(false);
+			}
+		}
+
+		// Put everything together
+		JPanel layoutPanel = new JPanel(new BorderLayout());
+		layoutPanel.add(titlePanel, BorderLayout.NORTH);
+		layoutPanel.add(mainPanel, BorderLayout.CENTER);
+		layoutPanel.setPreferredSize(new Dimension(550, 400));
+
+		add(layoutPanel);
+	}
+
+	@Override
+	public boolean checkValues() {
+		return true;
+	}
+
+	@Override
+	public void noteConfiguration() {
+
+		if (noSecurityRadioButton.isSelected()) {
+			getJson().remove("securityProfile"); // no security required
+		} else if (httpSecurityAuthNRadioButton.isSelected()) {
+			getJson().put("securityProfile", SecurityProfiles.HTTP_BASIC_AUTHN.toString());
+		} else if (wsSecurityAuthNRadioButton.isSelected()) { // plaintext password
+			if (passwordTypeComboBox.getSelectedItem().equals(PLAINTEXT_PASSWORD)) {
+				if (addTimestampCheckBox.isSelected()) {
+					getJson().put(
+							"securityProfile",
+							SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_PLAINTEXTPASSWORD
+									.toString());
+				} else {
+					getJson().put("securityProfile",
+							SecurityProfiles.WSSECURITY_USERNAMETOKEN_PLAINTEXTPASSWORD.toString());
+				}
+			} else { // digest password
+				if (addTimestampCheckBox.isSelected()) {
+					getJson().put(
+							"securityProfile",
+							SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_DIGESTPASSWORD
+									.toString());
+				} else {
+					getJson().put("securityProfile",
+							SecurityProfiles.WSSECURITY_USERNAMETOKEN_DIGESTPASSWORD.toString());
+				}
+			}
+		}
+	}
+
+	/**
+	 * Disable/enable items on the panel based on this radio button
+	 * has been selected.
+	 */
+	public void itemStateChanged(ItemEvent e) {
+
+		Object source = e.getItemSelectable();
+		if (source == noSecurityRadioButton) {
+			httpSecurityAuthNLabel.setEnabled(false);
+			wsSecurityAuthNLabel.setEnabled(false);
+			passwordTypeComboBox.setEnabled(false);
+			setHttpUsernamePasswordButton.setEnabled(false);
+			setWsdlUsernamePasswordButton.setEnabled(false);
+			addTimestampCheckBox.setEnabled(false);
+
+			noSecurityLabel.setEnabled(true);
+		} else if (source == httpSecurityAuthNRadioButton) {
+			noSecurityLabel.setEnabled(false);
+			httpSecurityAuthNLabel.setEnabled(true);
+			wsSecurityAuthNLabel.setEnabled(false);
+			passwordTypeComboBox.setEnabled(false);
+			setHttpUsernamePasswordButton.setEnabled(true);
+			setWsdlUsernamePasswordButton.setEnabled(false);
+			addTimestampCheckBox.setEnabled(false);
+		} else if (source == wsSecurityAuthNRadioButton) {
+			noSecurityLabel.setEnabled(false);
+			httpSecurityAuthNLabel.setEnabled(false);
+			wsSecurityAuthNLabel.setEnabled(true);
+			passwordTypeComboBox.setEnabled(true);
+			setHttpUsernamePasswordButton.setEnabled(false);
+			setWsdlUsernamePasswordButton.setEnabled(true);
+			addTimestampCheckBox.setEnabled(true);
+		}
+	}
+
+	/**
+	 * A renderer for JComboBox that will display a tooltip for
+	 * the selected item.
+	 */
+	class ComboBoxTooltipRenderer extends BasicComboBoxRenderer {
+		public Component getListCellRendererComponent(JList list, Object value, int index,
+				boolean isSelected, boolean cellHasFocus) {
+			if (isSelected) {
+				setBackground(list.getSelectionBackground());
+				setForeground(list.getSelectionForeground());
+				if (-1 < index) {
+					list.setToolTipText(tooltips[index]);
+				}
+			} else {
+				setBackground(list.getBackground());
+				setForeground(list.getForeground());
+			}
+			setFont(list.getFont());
+			setText((value == null) ? "" : value.toString());
+			return this;
+		}
+	}
+
+	/**
+	 * Adds a light gray or etched border to the top or bottom of a JComponent.
+	 *
+	 * @author David Withers
+	 * @param component
+	 */
+	protected void addDivider(JComponent component, final int position, final boolean etched) {
+		component.setBorder(new Border() {
+			private final Color borderColor = new Color(.6f, .6f, .6f);
+
+			public Insets getBorderInsets(Component c) {
+				if (position == SwingConstants.TOP) {
+					return new Insets(5, 0, 0, 0);
+				} else {
+					return new Insets(0, 0, 5, 0);
+				}
+			}
+
+			public boolean isBorderOpaque() {
+				return false;
+			}
+
+			public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
+				if (position == SwingConstants.TOP) {
+					if (etched) {
+						g.setColor(borderColor);
+						g.drawLine(x, y, x + width, y);
+						g.setColor(Color.WHITE);
+						g.drawLine(x, y + 1, x + width, y + 1);
+					} else {
+						g.setColor(Color.LIGHT_GRAY);
+						g.drawLine(x, y, x + width, y);
+					}
+				} else {
+					if (etched) {
+						g.setColor(borderColor);
+						g.drawLine(x, y + height - 2, x + width, y + height - 2);
+						g.setColor(Color.WHITE);
+						g.drawLine(x, y + height - 1, x + width, y + height - 1);
+					} else {
+						g.setColor(Color.LIGHT_GRAY);
+						g.drawLine(x, y + height - 1, x + width, y + height - 1);
+					}
+				}
+			}
+
+		});
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityContextualView.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityContextualView.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityContextualView.java
new file mode 100644
index 0000000..ac129ec
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityContextualView.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2008 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.views;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import java.awt.Frame;
+
+import javax.swing.Action;
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+
+import net.sf.taverna.t2.activities.wsdl.actions.WSDLActivityConfigureAction;
+import net.sf.taverna.t2.security.credentialmanager.CredentialManager;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+@SuppressWarnings("serial")
+public class WSDLActivityContextualView extends AbstractXMLSplitterActionView {
+
+	private final ActivityIconManager activityIconManager;
+	private final ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private final CredentialManager credentialManager;
+	private final FileManager fileManager;
+
+	public WSDLActivityContextualView(Activity activity, EditManager editManager, FileManager fileManager,
+			SelectionManager selectionManager, ActivityIconManager activityIconManager,
+			ColourManager colourManager, CredentialManager credentialManager,
+			ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		super(activity, editManager, selectionManager, colourManager);
+		this.fileManager = fileManager;
+		this.activityIconManager = activityIconManager;
+		this.credentialManager = credentialManager;
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	/**
+	 * Gets the component from the {@link HTMLBasedActivityContextualView} and adds buttons to it
+	 * allowing XML splitters to be added
+	 */
+	@Override
+	public JComponent getMainFrame() {
+		final JComponent mainFrame = super.getMainFrame();
+		JPanel flowPanel = new JPanel(new FlowLayout());
+
+		addInputSplitter(mainFrame, flowPanel);
+		addOutputSplitter(mainFrame, flowPanel);
+
+		mainFrame.add(flowPanel, BorderLayout.SOUTH);
+		return mainFrame;
+	}
+
+	@Override
+	public String getViewTitle() {
+		return "WSDL-based service";
+	}
+
+	@Override
+	protected String getRawTableRowsHtml() {
+		JsonNode operation = getConfigBean().getJson().get("operation");
+		String summary = "<tr><td>WSDL</td><td>" + operation.get("wsdl").textValue();
+		summary += "</td></tr><tr><td>Operation</td><td>" + operation.get("name").textValue()
+				+ "</td></tr>";
+		boolean securityConfigured = getConfigBean().getJson().has("securityProfile");
+		summary += "<tr><td>Secure</td><td>" + securityConfigured + "</td></tr>";
+		summary += "</tr>";
+		summary += describePorts();
+		return summary;
+	}
+
+	@Override
+	public Action getConfigureAction(Frame owner) {
+		return new WSDLActivityConfigureAction(getActivity(), owner, editManager, fileManager,
+				activityIconManager, serviceDescriptionRegistry, credentialManager);
+	}
+
+	@Override
+	public int getPreferredPosition() {
+		return 100;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityViewFactory.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityViewFactory.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityViewFactory.java
new file mode 100644
index 0000000..b3fb8ed
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/WSDLActivityViewFactory.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2008 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.views;
+
+import java.util.Arrays;
+import java.util.List;
+
+import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
+import net.sf.taverna.t2.security.credentialmanager.CredentialManager;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+public class WSDLActivityViewFactory implements ContextualViewFactory<Activity> {
+
+	private EditManager editManager;
+	private ActivityIconManager activityIconManager;
+	private ColourManager colourManager;
+	private SelectionManager selectionManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private CredentialManager credentialManager;
+	private FileManager fileManager;
+
+	public boolean canHandle(Object object) {
+		return object instanceof Activity
+				&& ((Activity) object).getType().equals(WSDLServiceDescription.ACTIVITY_TYPE);
+	}
+
+	public List<ContextualView> getViews(Activity activity) {
+		return Arrays
+				.asList(new ContextualView[] { new WSDLActivityContextualView(activity,
+						editManager, fileManager, selectionManager, activityIconManager, colourManager,
+						credentialManager, serviceDescriptionRegistry) });
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setColourManager(ColourManager colourManager) {
+		this.colourManager = colourManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setCredentialManager(CredentialManager credentialManager) {
+		this.credentialManager = credentialManager;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterContextualView.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterContextualView.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterContextualView.java
new file mode 100644
index 0000000..228edd4
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterContextualView.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2008 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.views;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
+
+import org.apache.log4j.Logger;
+
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+@SuppressWarnings("serial")
+public class XMLSplitterContextualView extends AbstractXMLSplitterActionView {
+
+	public XMLSplitterContextualView(Activity activity,
+			EditManager editManager, SelectionManager selectionManager, ColourManager colourManager) {
+		super(activity, editManager, selectionManager, colourManager);
+	}
+
+	static Logger logger = Logger.getLogger(XMLSplitterContextualView.class);
+
+	/**
+	 * Gets the component from the {@link HTMLBasedActivityContextualView} and adds buttons to it
+	 * allowing XML splitters to be added
+	 */
+	@Override
+	public JComponent getMainFrame() {
+		final JComponent mainFrame = super.getMainFrame();
+		JPanel flowPanel = new JPanel(new FlowLayout());
+
+		addInputSplitter(mainFrame, flowPanel);
+		addOutputSplitter(mainFrame, flowPanel);
+		mainFrame.add(flowPanel, BorderLayout.SOUTH);
+		return mainFrame;
+	}
+
+	@Override
+	public String getViewTitle() {
+		return "XML splitter";
+	}
+
+	@Override
+	protected String getRawTableRowsHtml() {
+		return describePorts();
+	}
+
+	@Override
+	public int getPreferredPosition() {
+		return 100;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterViewFactory.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterViewFactory.java b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterViewFactory.java
new file mode 100644
index 0000000..d0d5f8f
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/java/net/sf/taverna/t2/activities/wsdl/views/XMLSplitterViewFactory.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2008 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.views;
+
+import java.util.Arrays;
+import java.util.List;
+
+import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
+import net.sf.taverna.t2.activities.wsdl.xmlsplitter.XMLInputSplitterActivity;
+import net.sf.taverna.t2.activities.wsdl.xmlsplitter.XMLOutputSplitterActivity;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+public class XMLSplitterViewFactory implements ContextualViewFactory<Activity> {
+
+	private EditManager editManager;
+	private SelectionManager selectionManager;
+	private ColourManager colourManager;
+
+	public boolean canHandle(Object object) {
+
+		return object instanceof Activity
+				&& (((Activity) object).getType().equals(WSDLServiceDescription.INPUT_SPLITTER_TYPE)
+				|| ((Activity) object).getType().equals(WSDLServiceDescription.OUTPUT_SPLITTER_TYPE));
+	}
+
+	public List<ContextualView> getViews(Activity activity) {
+		return Arrays.asList(new ContextualView[] { new XMLSplitterContextualView(activity,
+				editManager, selectionManager, colourManager) });
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+	public void setColourManager(ColourManager colourManager) {
+		this.colourManager = colourManager;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
new file mode 100644
index 0000000..3bf8341
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceProvider

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
new file mode 100644
index 0000000..7b0e040
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
@@ -0,0 +1,5 @@
+net.sf.taverna.t2.activities.wsdl.menu.AddXMLInputSplitterForWSDLActivityMenuAction
+net.sf.taverna.t2.activities.wsdl.menu.AddXMLInputSplitterForXMLInputSplitterMenuAction
+net.sf.taverna.t2.activities.wsdl.menu.AddXMLOutputSplitterForWSDLActivityMenuAction
+net.sf.taverna.t2.activities.wsdl.menu.AddXMLOutputSplitterForXMLOutputSplitterMenuAction
+net.sf.taverna.t2.activities.wsdl.menu.ConfigureWSDLMenuAction

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
new file mode 100644
index 0000000..17d19e3
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
@@ -0,0 +1,3 @@
+net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLActivityIcon
+net.sf.taverna.t2.activities.wsdl.servicedescriptions.XMLInputSplitterActivityIcon
+net.sf.taverna.t2.activities.wsdl.servicedescriptions.XMLOutputSplitterActivityIcon
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
new file mode 100644
index 0000000..04d48eb
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
@@ -0,0 +1,2 @@
+net.sf.taverna.t2.activities.wsdl.views.WSDLActivityViewFactory
+net.sf.taverna.t2.activities.wsdl.views.XMLSplitterViewFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/resources/META-INF/spring/wsdl-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/resources/META-INF/spring/wsdl-activity-ui-context-osgi.xml b/taverna-wsdl-activity-ui/src/main/resources/META-INF/spring/wsdl-activity-ui-context-osgi.xml
new file mode 100644
index 0000000..ac79064
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/resources/META-INF/spring/wsdl-activity-ui-context-osgi.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:beans="http://www.springframework.org/schema/beans"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd
+                      http://www.springframework.org/schema/osgi
+                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+	<service ref="WSDLActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
+	<service ref="XMLInputSplitterActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
+	<service ref="XMLOutputSplitterActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
+
+	<service ref="WSDLServiceProvider">
+		<interfaces>
+			<beans:value>net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider</beans:value>
+			<beans:value>net.sf.taverna.t2.servicedescriptions.ConfigurableServiceProvider</beans:value>
+		</interfaces>
+	</service>
+
+	<service ref="AddXMLInputSplitterForWSDLActivityMenuAction" auto-export="interfaces" />
+	<service ref="AddXMLInputSplitterForXMLInputSplitterMenuAction" auto-export="interfaces" />
+	<service ref="AddXMLOutputSplitterForWSDLActivityMenuAction" auto-export="interfaces" />
+	<service ref="AddXMLOutputSplitterForXMLOutputSplitterMenuAction" auto-export="interfaces" />
+	<service ref="ConfigureWSDLMenuAction" auto-export="interfaces" />
+
+	<service ref="WSDLActivityViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
+	<service ref="XMLSplitterViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
+
+	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
+	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
+	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
+	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
+	<reference id="serviceDescriptionRegistry" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry" />
+	<reference id="credentialManager" interface="net.sf.taverna.t2.security.credentialmanager.CredentialManager" />
+	<reference id="selectionManager" interface="net.sf.taverna.t2.workbench.selection.SelectionManager" />
+
+</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/resources/META-INF/spring/wsdl-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/resources/META-INF/spring/wsdl-activity-ui-context.xml b/taverna-wsdl-activity-ui/src/main/resources/META-INF/spring/wsdl-activity-ui-context.xml
new file mode 100644
index 0000000..fede275
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/main/resources/META-INF/spring/wsdl-activity-ui-context.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+	<bean id="WSDLActivityIcon" class="net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLActivityIcon" />
+	<bean id="XMLInputSplitterActivityIcon" class="net.sf.taverna.t2.activities.wsdl.servicedescriptions.XMLInputSplitterActivityIcon" />
+	<bean id="XMLOutputSplitterActivityIcon" class="net.sf.taverna.t2.activities.wsdl.servicedescriptions.XMLOutputSplitterActivityIcon" />
+
+	<bean id="WSDLServiceProvider" class="net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceProvider">
+			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+			<property name="credentialManager" ref="credentialManager" />
+	</bean>
+
+	<bean id="AddXMLInputSplitterForWSDLActivityMenuAction" class="net.sf.taverna.t2.activities.wsdl.menu.AddXMLInputSplitterForWSDLActivityMenuAction">
+			<property name="editManager" ref="editManager" />
+			<property name="selectionManager" ref="selectionManager" />
+	</bean>
+	<bean id="AddXMLInputSplitterForXMLInputSplitterMenuAction" class="net.sf.taverna.t2.activities.wsdl.menu.AddXMLInputSplitterForXMLInputSplitterMenuAction">
+			<property name="editManager" ref="editManager" />
+			<property name="selectionManager" ref="selectionManager" />
+	</bean>
+	<bean id="AddXMLOutputSplitterForWSDLActivityMenuAction" class="net.sf.taverna.t2.activities.wsdl.menu.AddXMLOutputSplitterForWSDLActivityMenuAction">
+			<property name="editManager" ref="editManager" />
+			<property name="selectionManager" ref="selectionManager" />
+	</bean>
+	<bean id="AddXMLOutputSplitterForXMLOutputSplitterMenuAction" class="net.sf.taverna.t2.activities.wsdl.menu.AddXMLOutputSplitterForXMLOutputSplitterMenuAction">
+			<property name="editManager" ref="editManager" />
+			<property name="selectionManager" ref="selectionManager" />
+	</bean>
+	<bean id="ConfigureWSDLMenuAction" class="net.sf.taverna.t2.activities.wsdl.menu.ConfigureWSDLMenuAction">
+			<property name="editManager" ref="editManager" />
+			<property name="fileManager" ref="fileManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+			<property name="credentialManager" ref="credentialManager" />
+	</bean>
+
+	<bean id="WSDLActivityViewFactory" class="net.sf.taverna.t2.activities.wsdl.views.WSDLActivityViewFactory">
+			<property name="editManager" ref="editManager" />
+			<property name="fileManager" ref="fileManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+			<property name="colourManager" ref="colourManager" />
+			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+			<property name="credentialManager" ref="credentialManager" />
+	</bean>
+	<bean id="XMLSplitterViewFactory" class="net.sf.taverna.t2.activities.wsdl.views.XMLSplitterViewFactory">
+			<property name="editManager" ref="editManager" />
+			<property name="selectionManager" ref="selectionManager" />
+			<property name="colourManager" ref="colourManager" />
+	</bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/resources/wsdl.png
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/resources/wsdl.png b/taverna-wsdl-activity-ui/src/main/resources/wsdl.png
new file mode 100644
index 0000000..f9fdae8
Binary files /dev/null and b/taverna-wsdl-activity-ui/src/main/resources/wsdl.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/resources/xml-input-splitter.png
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/resources/xml-input-splitter.png b/taverna-wsdl-activity-ui/src/main/resources/xml-input-splitter.png
new file mode 100644
index 0000000..1ebe0b6
Binary files /dev/null and b/taverna-wsdl-activity-ui/src/main/resources/xml-input-splitter.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/resources/xml-output-splitter.png
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/resources/xml-output-splitter.png b/taverna-wsdl-activity-ui/src/main/resources/xml-output-splitter.png
new file mode 100644
index 0000000..f174f81
Binary files /dev/null and b/taverna-wsdl-activity-ui/src/main/resources/xml-output-splitter.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/main/resources/xml-splitter.png
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/main/resources/xml-splitter.png b/taverna-wsdl-activity-ui/src/main/resources/xml-splitter.png
new file mode 100644
index 0000000..15875e5
Binary files /dev/null and b/taverna-wsdl-activity-ui/src/main/resources/xml-splitter.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/test/java/net/sf/taverna/t2/activities/wsdl/views/TestWSDLActivityContextualView.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/test/java/net/sf/taverna/t2/activities/wsdl/views/TestWSDLActivityContextualView.java b/taverna-wsdl-activity-ui/src/test/java/net/sf/taverna/t2/activities/wsdl/views/TestWSDLActivityContextualView.java
new file mode 100644
index 0000000..0fa054b
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/test/java/net/sf/taverna/t2/activities/wsdl/views/TestWSDLActivityContextualView.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.wsdl.views;
+
+import static org.junit.Assert.assertNull;
+
+import org.junit.Before;
+
+import uk.org.taverna.scufl2.api.activity.Activity;
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+public class TestWSDLActivityContextualView {
+
+	Activity a;
+
+	@Before
+	public void setUp() throws Exception {
+		a=new Activity();
+		Configuration configuration = new Configuration();
+		ObjectNode json = (ObjectNode) configuration.getJson();
+		ObjectNode operation = json.objectNode();
+		operation.put("name", "getReport");
+		json.set("operation", operation);
+		String wsdlUrl=TestWSDLActivityContextualView.class.getResource("/GMService.wsdl").toExternalForm();
+		operation.put("wsdl", wsdlUrl);
+		configuration.setConfigures(a);
+	}
+
+	public void testConfigurationAction() {
+		WSDLActivityContextualView view = new WSDLActivityContextualView(a, null, null, null, null, null, null, null);
+		assertNull("WSDL has no configure action, so should be null",view.getConfigureAction(null));
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/test/resources/GMService.wsdl
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/test/resources/GMService.wsdl b/taverna-wsdl-activity-ui/src/test/resources/GMService.wsdl
new file mode 100644
index 0000000..cf128ba
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/test/resources/GMService.wsdl
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://webservice.gominer.lmp.nci.nih.gov" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://webservice.gominer.lmp.nci.nih.gov">
+  <wsdl:types>
+    <xsd:schema targetNamespace="http://webservice.gominer.lmp.nci.nih.gov" elementFormDefault="qualified" attributeFormDefault="qualified">
+      <xsd:complexType name="ArrayOfString">
+        <xsd:sequence>
+          <xsd:element name="string" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:element name="getReport">
+
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:element name="in0" type="tns:ArrayOfString" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="in1" type="tns:ArrayOfString" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="in2" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="in3" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="in4" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="in5" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="in6" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
+
+            <xsd:element name="in7" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
+          </xsd:sequence>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="getReportResponse">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:element name="out" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+          </xsd:sequence>
+
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:schema>
+  </wsdl:types>
+  <wsdl:message name="getReportResponse">
+    <wsdl:part element="tns:getReportResponse" name="parameters"/>
+  </wsdl:message>
+  <wsdl:message name="getReportRequest">
+    <wsdl:part element="tns:getReport" name="parameters"/>
+
+  </wsdl:message>
+  <wsdl:portType name="GOMinerWSPortType">
+    <wsdl:operation name="getReport">
+      <wsdl:input message="tns:getReportRequest" name="getReportRequest"/>
+      <wsdl:output message="tns:getReportResponse" name="getReportResponse"/>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="GOMinerWSHttpBinding" type="tns:GOMinerWSPortType">
+    <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+    <wsdl:operation name="getReport">
+      <wsdlsoap:operation soapAction=""/>
+      <wsdl:input name="getReportRequest">
+        <wsdlsoap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output name="getReportResponse">
+        <wsdlsoap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+
+  </wsdl:binding>
+  <wsdl:service name="GOMinerWS">
+    <wsdl:port binding="tns:GOMinerWSHttpBinding" name="GOMinerWSHttpPort">
+      <wsdlsoap:address location="http://discover.nci.nih.gov/gominer/xfire/GMService"/>
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file


[36/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-wsdl-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/taverna-wsdl-activity-ui/src/test/resources/kegg.wsdl
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity-ui/src/test/resources/kegg.wsdl b/taverna-wsdl-activity-ui/src/test/resources/kegg.wsdl
new file mode 100644
index 0000000..a62b707
--- /dev/null
+++ b/taverna-wsdl-activity-ui/src/test/resources/kegg.wsdl
@@ -0,0 +1,1889 @@
+<?xml version="1.0"?>
+<definitions
+    name="KEGG_v6.1"
+    xmlns:typens="SOAP/KEGG"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+    xmlns="http://schemas.xmlsoap.org/wsdl/"
+    targetNamespace="SOAP/KEGG">
+
+  <types>
+    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="SOAP/KEGG">
+      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
+      <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>
+<!-- common variable -->
+      <xsd:complexType name="ArrayOfint">
+        <xsd:complexContent>
+          <xsd:restriction base="soapenc:Array">
+
+            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
+          </xsd:restriction>
+        </xsd:complexContent>
+      </xsd:complexType>
+      <xsd:complexType name="ArrayOfstring">
+        <xsd:complexContent>
+          <xsd:restriction base="soapenc:Array">
+            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
+          </xsd:restriction>
+
+        </xsd:complexContent>
+      </xsd:complexType>
+<!-- SSDB -->
+      <xsd:complexType name="SSDBRelation">
+        <xsd:all>
+          <xsd:element name="genes_id1" type="xsd:string"/>
+          <xsd:element name="genes_id2" type="xsd:string"/>
+          <xsd:element name="sw_score" type="xsd:int"/>
+          <xsd:element name="bit_score" type="xsd:float"/>
+
+          <xsd:element name="identity" type="xsd:float"/>
+          <xsd:element name="overlap" type="xsd:int"/>
+          <xsd:element name="start_position1" type="xsd:int"/>
+          <xsd:element name="end_position1" type="xsd:int"/>
+          <xsd:element name="start_position2" type="xsd:int"/>
+          <xsd:element name="end_position2" type="xsd:int"/>
+          <xsd:element name="best_flag_1to2" type="xsd:boolean"/>
+          <xsd:element name="best_flag_2to1" type="xsd:boolean"/>
+          <xsd:element name="definition1" type="xsd:string"/>
+
+          <xsd:element name="definition2" type="xsd:string"/>
+          <xsd:element name="length1" type="xsd:int"/>
+          <xsd:element name="length2" type="xsd:int"/>
+        </xsd:all>
+      </xsd:complexType>
+      <xsd:complexType name="ArrayOfSSDBRelation">
+        <xsd:complexContent>
+          <xsd:restriction base="soapenc:Array">
+            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:SSDBRelation[]"/>
+
+          </xsd:restriction>
+        </xsd:complexContent>
+      </xsd:complexType>
+<!-- MOTIF -->
+      <xsd:complexType name="MotifResult">
+        <xsd:all>
+          <xsd:element name="motif_id" type="xsd:string"/>
+          <xsd:element name="definition" type="xsd:string"/>
+          <xsd:element name="genes_id" type="xsd:string"/>
+
+          <xsd:element name="start_position" type="xsd:int"/>
+          <xsd:element name="end_position" type="xsd:int"/>
+          <xsd:element name="score" type="xsd:float"/>
+          <xsd:element name="evalue" type="xsd:double"/>
+        </xsd:all>
+      </xsd:complexType>
+      <xsd:complexType name="ArrayOfMotifResult">
+        <xsd:complexContent>
+          <xsd:restriction base="soapenc:Array">
+
+            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:MotifResult[]"/>
+          </xsd:restriction>
+        </xsd:complexContent>
+      </xsd:complexType>
+<!-- DEFINITION -->
+      <xsd:complexType name="Definition">
+        <xsd:all>
+          <xsd:element name="entry_id" type="xsd:string"/>
+          <xsd:element name="definition" type="xsd:string"/>
+
+        </xsd:all>
+      </xsd:complexType>
+      <xsd:complexType name="ArrayOfDefinition">
+        <xsd:complexContent>
+          <xsd:restriction base="soapenc:Array">
+            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:Definition[]"/>
+          </xsd:restriction>
+        </xsd:complexContent>
+      </xsd:complexType>
+
+<!-- LinkDB -->
+      <xsd:complexType name="LinkDBRelation">
+        <xsd:all>
+          <xsd:element name="entry_id1" type="xsd:string"/>
+          <xsd:element name="entry_id2" type="xsd:string"/>
+          <xsd:element name="type" type="xsd:string"/>
+          <xsd:element name="path" type="xsd:string"/>
+        </xsd:all>
+      </xsd:complexType>
+
+      <xsd:complexType name="ArrayOfLinkDBRelation">
+        <xsd:complexContent>
+          <xsd:restriction base="soapenc:Array">
+            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:LinkDBRelation[]"/>
+          </xsd:restriction>
+        </xsd:complexContent>
+      </xsd:complexType>
+<!-- Pathway -->
+      <xsd:complexType name="PathwayElement">
+
+        <xsd:all>
+          <xsd:element name="element_id" type="xsd:int"/>
+          <xsd:element name="type" type="xsd:string"/>
+          <xsd:element name="names" type="typens:ArrayOfstring"/>
+          <xsd:element name="components" type="typens:ArrayOfint"/>
+        </xsd:all>
+      </xsd:complexType>
+      <xsd:complexType name="ArrayOfPathwayElement">
+        <xsd:complexContent>
+
+          <xsd:restriction base="soapenc:Array">
+            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:PathwayElement[]"/>
+          </xsd:restriction>
+        </xsd:complexContent>
+      </xsd:complexType>
+      <xsd:complexType name="PathwayElementRelation">
+        <xsd:all>
+          <xsd:element name="element_id1" type="xsd:int"/>
+          <xsd:element name="element_id2" type="xsd:int"/>
+
+          <xsd:element name="type" type="xsd:string"/>
+          <!--xsd:element name="name" type="xsd:string"/-->
+          <xsd:element name="subtypes" type="typens:ArrayOfSubtype"/>
+        </xsd:all>
+      </xsd:complexType>
+      <xsd:complexType name="ArrayOfPathwayElementRelation">
+        <xsd:complexContent>
+          <xsd:restriction base="soapenc:Array">
+            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:PathwayElementRelation[]"/>
+
+          </xsd:restriction>
+        </xsd:complexContent>
+      </xsd:complexType>
+      <xsd:complexType name="Subtype">
+        <xsd:all>
+          <xsd:element name="relation" type="xsd:string"/>
+          <xsd:element name="element_id" type="xsd:int"/>
+          <xsd:element name="type" type="xsd:string"/>
+        </xsd:all>
+
+      </xsd:complexType>
+      <xsd:complexType name="ArrayOfSubtype">
+        <xsd:complexContent>
+          <xsd:restriction base="soapenc:Array">
+            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:Subtype[]"/>
+          </xsd:restriction>
+        </xsd:complexContent>
+      </xsd:complexType>
+<!-- v6.0 -->
+
+      <xsd:complexType name="StructureAlignment">
+        <xsd:all>
+          <xsd:element name="target_id" type="xsd:string"/>
+          <xsd:element name="score" type="xsd:float"/>
+          <xsd:element name="query_nodes" type="typens:ArrayOfint"/>
+          <xsd:element name="target_nodes" type="typens:ArrayOfint"/>
+        </xsd:all>
+      </xsd:complexType>
+      <xsd:complexType name="ArrayOfStructureAlignment">
+
+        <xsd:complexContent>
+          <xsd:restriction base="soapenc:Array">
+            <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:StructureAlignment[]"/>
+          </xsd:restriction>
+        </xsd:complexContent>
+      </xsd:complexType>
+
+    </xsd:schema>
+  </types>
+
+<!-- KEGG information -->
+<!-- list_databases -->
+  <message name="list_databasesRequest"/>
+  <message name="list_databasesResponse">
+    <part name="return" type="typens:ArrayOfDefinition"/>
+  </message>
+<!-- list_organisms -->
+  <message name="list_organismsRequest"/>
+  <message name="list_organismsResponse">
+    <part name="return" type="typens:ArrayOfDefinition"/>
+
+  </message>
+<!-- list_pathways -->
+  <message name="list_pathwaysRequest">
+    <part name="org" type="xsd:string"/>
+  </message>
+  <message name="list_pathwaysResponse">
+    <part name="return" type="typens:ArrayOfDefinition"/>
+  </message>
+<!-- list_ko_classes -->
+  <message name="list_ko_classesRequest">
+
+    <part name="class_id" type="xsd:string"/>
+  </message>
+  <message name="list_ko_classesResponse">
+    <part name="return" type="typens:ArrayOfDefinition"/>
+  </message>
+<!-- DBGET -->
+<!-- binfo -->
+  <message name="binfoRequest">
+    <part name="db" type="xsd:string"/>
+  </message>
+
+  <message name="binfoResponse">
+    <part name="return" type="xsd:string"/>
+  </message>
+<!-- bget -->
+  <message name="bgetRequest">
+    <part name="string" type="xsd:string"/>
+  </message>
+  <message name="bgetResponse">
+    <part name="return" type="xsd:string"/>
+
+  </message>
+<!-- bfind -->
+  <message name="bfindRequest">
+    <part name="string" type="xsd:string"/>
+  </message>
+  <message name="bfindResponse">
+    <part name="return" type="xsd:string"/>
+  </message>
+<!-- btit -->
+  <message name="btitRequest">
+
+    <part name="string" type="xsd:string"/>
+  </message>
+  <message name="btitResponse">
+    <part name="return" type="xsd:string"/>
+  </message>
+<!-- bconv -->
+  <message name="bconvRequest">
+    <part name="string" type="xsd:string"/>
+  </message>
+
+  <message name="bconvResponse">
+    <part name="return" type="xsd:string"/>
+  </message>
+<!-- LinkDB -->
+  <message name="get_linkdb_by_entryRequest">
+    <part name="entry_id" type="xsd:string"/>
+    <part name="db" type="xsd:string"/>
+    <part name="offset" type="xsd:int"/>
+    <part name="limit" type="xsd:int"/>
+
+  </message>
+  <message name="get_linkdb_by_entryResponse">
+    <part name="return" type="typens:ArrayOfLinkDBRelation"/>
+  </message>
+<!-- SSDB -->
+<!-- get_best_neighbors_by_gene -->
+  <message name="get_best_neighbors_by_geneRequest">
+    <part name="genes_id" type="xsd:string"/>
+    <part name="offset" type="xsd:int"/>
+    <part name="limit" type="xsd:int"/>
+
+  </message>
+  <message name="get_best_neighbors_by_geneResponse">
+    <part name="return" type="typens:ArrayOfSSDBRelation"/>
+  </message>
+<!-- get_best_best_neighbors_by_gene -->
+  <message name="get_best_best_neighbors_by_geneRequest">
+    <part name="genes_id" type="xsd:string"/>
+    <part name="offset" type="xsd:int"/>
+    <part name="limit" type="xsd:int"/>
+
+  </message>
+  <message name="get_best_best_neighbors_by_geneResponse">
+    <part name="return" type="typens:ArrayOfSSDBRelation"/>
+  </message>
+<!-- get_reverse_best_neighbors_by_gene -->
+  <message name="get_reverse_best_neighbors_by_geneRequest">
+    <part name="genes_id" type="xsd:string"/>
+    <part name="offset" type="xsd:int"/>
+    <part name="limit" type="xsd:int"/>
+
+  </message>
+  <message name="get_reverse_best_neighbors_by_geneResponse">
+    <part name="return" type="typens:ArrayOfSSDBRelation"/>
+  </message>
+<!-- get_paralogs_by_geneRequest -->
+  <message name="get_paralogs_by_geneRequest">
+    <part name="genes_id" type="xsd:string"/>
+    <part name="offset" type="xsd:int"/>
+    <part name="limit" type="xsd:int"/>
+
+  </message>
+  <message name="get_paralogs_by_geneResponse">
+    <part name="return" type="typens:ArrayOfSSDBRelation"/>
+  </message>
+<!-- MOTIF -->
+<!-- get_motifs_by_gene -->
+  <message name="get_motifs_by_geneRequest">
+    <part name="genes_id" type="xsd:string"/>
+    <part name="db" type="xsd:string"/>
+  </message>
+
+  <message name="get_motifs_by_geneResponse">
+    <part name="return" type="typens:ArrayOfMotifResult"/>
+  </message>
+<!-- get_genes_by_motifs -->
+  <message name="get_genes_by_motifsRequest">
+    <part name="motif_id_list" type="typens:ArrayOfstring"/>
+    <part name="offset" type="xsd:int"/>
+    <part name="limit" type="xsd:int"/>
+  </message>
+
+  <message name="get_genes_by_motifsResponse">
+    <part name="return" type="typens:ArrayOfDefinition"/>
+  </message>
+<!-- KO,OC,PC -->
+<!-- get_ko_by_gene -->
+  <message name="get_ko_by_geneRequest">
+    <part name="genes_id" type="xsd:string"/>
+  </message>
+  <message name="get_ko_by_geneResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+
+  </message>
+<!-- get_ko_by_ko_class -->
+  <message name="get_ko_by_ko_classRequest">
+    <part name="class_id" type="xsd:string"/>
+  </message>
+  <message name="get_ko_by_ko_classResponse">
+    <part name="return" type="typens:ArrayOfDefinition"/>
+  </message>
+<!-- get_genes_by_ko -->
+  <message name="get_genes_by_koRequest">
+
+    <part name="ko_id" type="xsd:string"/>
+    <part name="org" type="xsd:string"/>
+  </message>
+  <message name="get_genes_by_koResponse">
+    <part name="return" type="typens:ArrayOfDefinition"/>
+  </message>
+<!-- get_genes_by_ko_class -->
+  <message name="get_genes_by_ko_classRequest">
+    <part name="class_id" type="xsd:string"/>
+
+    <part name="org" type="xsd:string"/>
+	<part name="offset" type="xsd:int"/>
+    <part name="limit" type="xsd:int"/>
+  </message>
+  <message name="get_genes_by_ko_classResponse">
+    <part name="return" type="typens:ArrayOfDefinition"/>
+  </message>
+<!-- get_oc_members_by_gene -->
+<!--
+  <message name="get_oc_members_by_geneRequest">
+    <part name="genes_id" type="xsd:string"/>
+    <part name="offset" type="xsd:int"/>
+    <part name="limit" type="xsd:int"/>
+  </message>
+  <message name="get_oc_members_by_geneResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+-->
+<!-- get_pc_members_by_gene -->
+
+<!--
+  <message name="get_pc_members_by_geneRequest">
+    <part name="genes_id" type="xsd:string"/>
+    <part name="offset" type="xsd:int"/>
+    <part name="limit" type="xsd:int"/>
+  </message>
+  <message name="get_pc_members_by_geneResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+-->
+<!-- PATHWAY -->
+<!-- Coloring pathways -->
+<!-- mark_pathway_by_objects -->
+  <message name="get_elements_by_pathwayRequest">
+    <part name="pathway_id" type="xsd:string"/>
+  </message>
+  <message name="get_elements_by_pathwayResponse">
+    <part name="return" type="typens:ArrayOfPathwayElement"/>
+  </message>
+  <message name="get_element_relations_by_pathwayRequest">
+
+    <part name="pathway_id" type="xsd:string"/>
+  </message>
+  <message name="get_element_relations_by_pathwayResponse">
+    <part name="return" type="typens:ArrayOfPathwayElementRelation"/>
+  </message>
+  <message name="color_pathway_by_elementsRequest">
+    <part name="pathway_id" type="xsd:string"/>
+    <part name="element_list" type="typens:ArrayOfint"/>
+    <part name="fg_color_list" type="typens:ArrayOfstring"/>
+
+    <part name="bg_color_list" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="color_pathway_by_elementsResponse">
+    <part name="return" type="xsd:string"/>
+  </message>
+  <message name="get_html_of_colored_pathway_by_elementsRequest">
+    <part name="pathway_id" type="xsd:string"/>
+    <part name="element_list" type="typens:ArrayOfint"/>
+    <part name="fg_color_list" type="typens:ArrayOfstring"/>
+
+    <part name="bg_color_list" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_html_of_colored_pathway_by_elementsResponse">
+    <part name="return" type="xsd:string"/>
+  </message>
+
+  <message name="mark_pathway_by_objectsRequest">
+    <part name="pathway_id" type="xsd:string"/>
+    <part name="object_id_list" type="typens:ArrayOfstring"/>
+
+  </message>
+  <message name="mark_pathway_by_objectsResponse">
+    <part name="return" type="xsd:string"/>
+  </message>
+<!-- color_pathway_by_objects -->
+  <message name="color_pathway_by_objectsRequest">
+    <part name="pathway_id" type="xsd:string"/>
+    <part name="object_id_list" type="typens:ArrayOfstring"/>
+    <part name="fg_color_list" type="typens:ArrayOfstring"/>
+
+    <part name="bg_color_list" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="color_pathway_by_objectsResponse">
+    <part name="return" type="xsd:string"/>
+  </message>
+<!-- get_html_org_marked_pathway_by_objects -->
+  <message name="get_html_of_marked_pathway_by_objectsRequest">
+    <part name="pathway_id" type="xsd:string"/>
+    <part name="object_id_list" type="typens:ArrayOfstring"/>
+
+  </message>
+  <message name="get_html_of_marked_pathway_by_objectsResponse">
+    <part name="return" type="xsd:string"/>
+  </message>
+<!-- get_html_of_colored_pathway_by_objects -->
+  <message name="get_html_of_colored_pathway_by_objectsRequest">
+    <part name="pathway_id" type="xsd:string"/>
+    <part name="object_id_list" type="typens:ArrayOfstring"/>
+    <part name="fg_color_list" type="typens:ArrayOfstring"/>
+
+    <part name="bg_color_list" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_html_of_colored_pathway_by_objectsResponse">
+    <part name="return" type="xsd:string"/>
+  </message>
+<!-- Objects on the pathway -->
+<!-- get_genes_by_pathway -->
+  <message name="get_genes_by_pathwayRequest">
+    <part name="pathway_id" type="xsd:string"/>
+  </message>
+
+  <message name="get_genes_by_pathwayResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+<!-- get_enzymes_by_pathway -->
+  <message name="get_enzymes_by_pathwayRequest">
+    <part name="pathway_id" type="xsd:string"/>
+  </message>
+  <message name="get_enzymes_by_pathwayResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+
+  </message>
+<!-- get_reactions_by_pathway -->
+  <message name="get_reactions_by_pathwayRequest">
+    <part name="pathway_id" type="xsd:string"/>
+  </message>
+  <message name="get_reactions_by_pathwayResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+<!-- Pathways by objects -->
+<!-- get_pathways_by_genes -->
+
+  <message name="get_pathways_by_genesRequest">
+    <part name="genes_id_list" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_pathways_by_genesResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+<!-- get_pathways_by_enzymes  -->
+  <message name="get_pathways_by_enzymesRequest">
+    <part name="enzyme_id_list" type="typens:ArrayOfstring"/>
+
+  </message>
+  <message name="get_pathways_by_enzymesResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+<!-- get_pathways_by_reactions -->
+  <message name="get_pathways_by_reactionsRequest">
+    <part name="reaction_id_list" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_pathways_by_reactionsResponse">
+
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+<!-- Mutual transformation of objects -->
+<!-- Relation among pathways -->
+<!-- get_linked_pathways -->
+  <message name="get_linked_pathwaysRequest">
+    <part name="pathway_id" type="xsd:string"/>
+  </message>
+  <message name="get_linked_pathwaysResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+
+  </message>
+<!-- Relation among genes and enzymes -->
+<!-- get_genes_by_enzyme -->
+  <message name="get_genes_by_enzymeRequest">
+    <part name="enzyme_id" type="xsd:string"/>
+    <part name="org" type="xsd:string"/>
+  </message>
+  <message name="get_genes_by_enzymeResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+
+<!-- get_enzymes_by_gene -->
+  <message name="get_enzymes_by_geneRequest">
+    <part name="genes_id" type="xsd:string"/>
+  </message>
+  <message name="get_enzymes_by_geneResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+<!-- Relation among enzymes, compounds and reactions -->
+<!-- get_enzymes_by_reaction -->
+  <message name="get_enzymes_by_reactionRequest">
+
+    <part name="reaction_id" type="xsd:string"/>
+  </message>
+  <message name="get_enzymes_by_reactionResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+<!-- get_reactions_by_enzyme -->
+  <message name="get_reactions_by_enzymeRequest">
+    <part name="enzyme_id" type="xsd:string"/>
+  </message>
+
+  <message name="get_reactions_by_enzymeResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+<!-- GENES -->
+<!-- get_genes_by_organism -->
+  <message name="get_genes_by_organismRequest">
+    <part name="org" type="xsd:string"/>
+    <part name="offset" type="xsd:int"/>
+    <part name="limit" type="xsd:int"/>
+  </message>
+
+  <message name="get_genes_by_organismResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+<!-- GENOME -->
+<!-- get_number_of_genes_by_organism -->
+  <message name="get_number_of_genes_by_organismRequest">
+    <part name="abbr" type="xsd:string"/>
+  </message>
+  <message name="get_number_of_genes_by_organismResponse">
+    <part name="return" type="xsd:int"/>
+
+  </message>
+<!-- LIGAND -->
+  <message name="get_reactions_by_glycanRequest">
+    <part name="glycan_id" type="xsd:string"/>
+  </message>
+  <message name="get_reactions_by_glycanResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_reactions_by_compoundRequest">
+
+    <part name="compound_id" type="xsd:string"/>
+  </message>
+  <message name="get_reactions_by_compoundResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_enzymes_by_glycanRequest">
+    <part name="glycan_id" type="xsd:string"/>
+  </message>
+  <message name="get_enzymes_by_glycanResponse">
+
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_enzymes_by_compoundRequest">
+    <part name="compound_id" type="xsd:string"/>
+  </message>
+  <message name="get_enzymes_by_compoundResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_pathways_by_compoundsRequest">
+
+    <part name="compound_id_list" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_pathways_by_compoundsResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_pathways_by_glycansRequest">
+    <part name="glycan_id_list" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_pathways_by_glycansResponse">
+
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_compounds_by_pathwayRequest">
+    <part name="pathway_id" type="xsd:string"/>
+  </message>
+  <message name="get_compounds_by_pathwayResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_compounds_by_enzymeRequest">
+
+    <part name="enzyme_id" type="xsd:string"/>
+  </message>
+  <message name="get_compounds_by_enzymeResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_glycans_by_enzymeRequest">
+    <part name="enzyme_id" type="xsd:string"/>
+  </message>
+  <message name="get_glycans_by_enzymeResponse">
+
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_glycans_by_pathwayRequest">
+    <part name="pathway_id" type="xsd:string"/>
+  </message>
+  <message name="get_glycans_by_pathwayResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_compounds_by_reactionRequest">
+
+    <part name="reaction_id" type="xsd:string"/>
+  </message>
+  <message name="get_compounds_by_reactionResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_glycans_by_reactionRequest">
+    <part name="reaction_id" type="xsd:string"/>
+  </message>
+  <message name="get_glycans_by_reactionResponse">
+
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="convert_mol_to_kcfRequest">
+    <part name="mol_text" type="xsd:string"/>
+  </message>
+  <message name="convert_mol_to_kcfResponse">
+    <part name="return" type="xsd:string"/>
+  </message>
+  <message name="get_kos_by_pathwayRequest">
+
+    <part name="pathway_id" type="xsd:string"/>
+  </message>
+  <message name="get_kos_by_pathwayResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+  <message name="get_pathways_by_kosRequest">
+    <part name="ko_id_list" type="typens:ArrayOfstring"/>
+    <part name="org" type="xsd:string"/>
+  </message>
+
+  <message name="get_pathways_by_kosResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+
+<!-- v6.0 -->
+  <message name="search_compounds_by_nameRequest">
+    <part name="name" type="xsd:string"/>
+  </message>
+  <message name="search_compounds_by_nameResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+
+  </message>
+
+  <message name="search_glycans_by_nameRequest">
+    <part name="name" type="xsd:string"/>
+  </message>
+  <message name="search_glycans_by_nameResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+
+  <message name="search_compounds_by_compositionRequest">
+
+    <part name="composition" type="xsd:string"/>
+  </message>
+  <message name="search_compounds_by_compositionResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+
+  <message name="search_compounds_by_massRequest">
+    <part name="mass" type="xsd:float"/>
+    <part name="range" type="xsd:float"/>
+
+  </message>
+  <message name="search_compounds_by_massResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+
+  <message name="search_glycans_by_massRequest">
+    <part name="mass" type="xsd:float"/>
+    <part name="range" type="xsd:float"/>
+  </message>
+
+  <message name="search_glycans_by_massResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+
+  <message name="search_glycans_by_compositionRequest">
+    <part name="composition" type="xsd:string"/>
+  </message>
+  <message name="search_glycans_by_compositionResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+
+  </message>
+
+  <message name="search_compounds_by_subcompRequest">
+    <part name="mol" type="xsd:string"/>
+    <part name="offset" type="xsd:int"/>
+    <part name="limit" type="xsd:int"/>
+  </message>
+  <message name="search_compounds_by_subcompResponse">
+    <part name="return" type="typens:ArrayOfStructureAlignment"/>
+
+  </message>
+
+  <message name="search_glycans_by_kcamRequest">
+    <part name="kcf" type="xsd:string"/>
+    <part name="program" type="xsd:string"/>
+    <part name="option" type="xsd:string"/>
+    <part name="offset" type="xsd:int"/>
+    <part name="limit" type="xsd:int"/>
+  </message>
+
+  <message name="search_glycans_by_kcamResponse">
+    <part name="return" type="typens:ArrayOfStructureAlignment"/>
+  </message>
+
+  <message name="get_linkdb_between_databasesRequest">
+    <part name="from_db" type="xsd:string"/>
+    <part name="to_db" type="xsd:string"/>
+    <part name="offset" type="xsd:int"/>
+    <part name="limit" type="xsd:int"/>
+
+  </message>
+  <message name="get_linkdb_between_databasesResponse">
+    <part name="return" type="typens:ArrayOfLinkDBRelation"/>
+  </message>
+
+<!-- v6.1 -->
+  <message name="search_drugs_by_nameRequest">
+    <part name="name" type="xsd:string"/>
+  </message>
+  <message name="search_drugs_by_nameResponse">
+
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+
+  <message name="search_drugs_by_compositionRequest">
+    <part name="composition" type="xsd:string"/>
+  </message>
+  <message name="search_drugs_by_compositionResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+
+  <message name="search_drugs_by_massRequest">
+    <part name="mass" type="xsd:float"/>
+    <part name="range" type="xsd:float"/>
+  </message>
+  <message name="search_drugs_by_massResponse">
+    <part name="return" type="typens:ArrayOfstring"/>
+  </message>
+
+  <message name="search_drugs_by_subcompRequest">
+
+    <part name="mol" type="xsd:string"/>
+    <part name="offset" type="xsd:int"/>
+    <part name="limit" type="xsd:int"/>
+  </message>
+  <message name="search_drugs_by_subcompResponse">
+    <part name="return" type="typens:ArrayOfStructureAlignment"/>
+  </message>
+
+  <portType name="KEGGPortType">
+
+<!-- KEGG information -->
+    <operation name="list_databases">
+      <input message="typens:list_databasesRequest"/>
+      <output message="typens:list_databasesResponse"/>
+    </operation>
+    <operation name="list_organisms">
+      <input message="typens:list_organismsRequest"/>
+      <output message="typens:list_organismsResponse"/>
+    </operation>
+
+    <operation name="list_pathways">
+      <input message="typens:list_pathwaysRequest"/>
+      <output message="typens:list_pathwaysResponse"/>
+    </operation>
+    <operation name="list_ko_classes">
+      <input message="typens:list_ko_classesRequest"/>
+      <output message="typens:list_ko_classesResponse"/>
+    </operation>
+<!-- DBGET -->
+
+    <operation name="binfo">
+      <input message="typens:binfoRequest"/>
+      <output message="typens:binfoResponse"/>
+    </operation>
+    <operation name="bget">
+      <input message="typens:bgetRequest"/>
+      <output message="typens:bgetResponse"/>
+    </operation>
+    <operation name="bfind">
+
+      <input message="typens:bfindRequest"/>
+      <output message="typens:bfindResponse"/>
+    </operation>
+    <operation name="btit">
+      <input message="typens:btitRequest"/>
+      <output message="typens:btitResponse"/>
+    </operation>
+    <operation name="bconv">
+      <input message="typens:bconvRequest"/>
+
+      <output message="typens:bconvResponse"/>
+    </operation>
+<!-- LinkDB -->
+    <operation name="get_linkdb_by_entry">
+      <input message="typens:get_linkdb_by_entryRequest"/>
+      <output message="typens:get_linkdb_by_entryResponse"/>
+    </operation>
+<!-- SSDB -->
+    <operation name="get_best_neighbors_by_gene">
+      <input message="typens:get_best_neighbors_by_geneRequest"/>
+
+      <output message="typens:get_best_neighbors_by_geneResponse"/>
+    </operation>
+    <operation name="get_best_best_neighbors_by_gene">
+      <input message="typens:get_best_best_neighbors_by_geneRequest"/>
+      <output message="typens:get_best_best_neighbors_by_geneResponse"/>
+    </operation>
+    <operation name="get_reverse_best_neighbors_by_gene">
+      <input message="typens:get_reverse_best_neighbors_by_geneRequest"/>
+      <output message="typens:get_reverse_best_neighbors_by_geneResponse"/>
+
+    </operation>
+    <operation name="get_paralogs_by_gene">
+      <input message="typens:get_paralogs_by_geneRequest"/>
+      <output message="typens:get_paralogs_by_geneResponse"/>
+    </operation>
+<!-- MOTIF -->
+    <operation name="get_motifs_by_gene">
+      <input message="typens:get_motifs_by_geneRequest"/>
+      <output message="typens:get_motifs_by_geneResponse"/>
+
+    </operation>
+    <operation name="get_genes_by_motifs">
+      <input message="typens:get_genes_by_motifsRequest"/>
+      <output message="typens:get_genes_by_motifsResponse"/>
+    </operation>
+<!-- KO,OC,PC -->
+    <operation name="get_ko_by_gene">
+      <input message="typens:get_ko_by_geneRequest"/>
+      <output message="typens:get_ko_by_geneResponse"/>
+
+    </operation>
+    <operation name="get_ko_by_ko_class">
+      <input message="typens:get_ko_by_ko_classRequest"/>
+      <output message="typens:get_ko_by_ko_classResponse"/>
+    </operation>
+    <operation name="get_genes_by_ko">
+      <input message="typens:get_genes_by_koRequest"/>
+      <output message="typens:get_genes_by_koResponse"/>
+    </operation>
+
+    <operation name="get_genes_by_ko_class">
+      <input message="typens:get_genes_by_ko_classRequest"/>
+      <output message="typens:get_genes_by_ko_classResponse"/>
+    </operation>
+<!--
+    <operation name="get_oc_members_by_gene">
+      <input message="typens:get_oc_members_by_geneRequest"/>
+      <output message="typens:get_oc_members_by_geneResponse"/>
+    </operation>
+-->
+<!--
+    <operation name="get_pc_members_by_gene">
+      <input message="typens:get_pc_members_by_geneRequest"/>
+      <output message="typens:get_pc_members_by_geneResponse"/>
+    </operation>
+-->
+<!-- PATHWAY -->
+<!-- Coloring pathways -->
+    <operation name="get_elements_by_pathway">
+      <input message="typens:get_elements_by_pathwayRequest"/>
+      <output message="typens:get_elements_by_pathwayResponse"/>
+
+    </operation>
+    <operation name="get_element_relations_by_pathway">
+      <input message="typens:get_element_relations_by_pathwayRequest"/>
+      <output message="typens:get_element_relations_by_pathwayResponse"/>
+    </operation>
+    <operation name="color_pathway_by_elements">
+      <input message="typens:color_pathway_by_elementsRequest"/>
+      <output message="typens:color_pathway_by_elementsResponse"/>
+    </operation>
+
+    <operation name="get_html_of_colored_pathway_by_elements">
+      <input message="typens:get_html_of_colored_pathway_by_elementsRequest"/>
+      <output message="typens:get_html_of_colored_pathway_by_elementsResponse"/>
+    </operation>
+
+    <operation name="mark_pathway_by_objects">
+      <input message="typens:mark_pathway_by_objectsRequest"/>
+      <output message="typens:mark_pathway_by_objectsResponse"/>
+    </operation>
+
+    <operation name="color_pathway_by_objects">
+      <input message="typens:color_pathway_by_objectsRequest"/>
+      <output message="typens:color_pathway_by_objectsResponse"/>
+    </operation>
+    <operation name="get_html_of_marked_pathway_by_objects">
+      <input message="typens:get_html_of_marked_pathway_by_objectsRequest"/>
+      <output message="typens:get_html_of_marked_pathway_by_objectsResponse"/>
+    </operation>
+    <operation name="get_html_of_colored_pathway_by_objects">
+
+      <input message="typens:get_html_of_colored_pathway_by_objectsRequest"/>
+      <output message="typens:get_html_of_colored_pathway_by_objectsResponse"/>
+    </operation>
+<!-- Objects on the pathway -->
+    <operation name="get_genes_by_pathway">
+      <input message="typens:get_genes_by_pathwayRequest"/>
+      <output message="typens:get_genes_by_pathwayResponse"/>
+    </operation>
+    <operation name="get_enzymes_by_pathway">
+
+      <input message="typens:get_enzymes_by_pathwayRequest"/>
+      <output message="typens:get_enzymes_by_pathwayResponse"/>
+    </operation>
+    <operation name="get_reactions_by_pathway">
+      <input message="typens:get_reactions_by_pathwayRequest"/>
+      <output message="typens:get_reactions_by_pathwayResponse"/>
+    </operation>
+<!-- Pathways by objects -->
+    <operation name="get_pathways_by_genes">
+
+      <input message="typens:get_pathways_by_genesRequest"/>
+      <output message="typens:get_pathways_by_genesResponse"/>
+    </operation>
+    <operation name="get_pathways_by_enzymes">
+      <input message="typens:get_pathways_by_enzymesRequest"/>
+      <output message="typens:get_pathways_by_enzymesResponse"/>
+    </operation>
+    <operation name="get_pathways_by_reactions">
+      <input message="typens:get_pathways_by_reactionsRequest"/>
+
+      <output message="typens:get_pathways_by_reactionsResponse"/>
+    </operation>
+<!-- Mutual transformation of objects -->
+<!-- Realtion among pathways -->
+    <operation name="get_linked_pathways">
+      <input message="typens:get_linked_pathwaysRequest"/>
+      <output message="typens:get_linked_pathwaysResponse"/>
+    </operation>
+<!-- Realtion among genes and enzymes -->
+    <operation name="get_genes_by_enzyme">
+
+      <input message="typens:get_genes_by_enzymeRequest"/>
+      <output message="typens:get_genes_by_enzymeResponse"/>
+    </operation>
+    <operation name="get_enzymes_by_gene">
+      <input message="typens:get_enzymes_by_geneRequest"/>
+      <output message="typens:get_enzymes_by_geneResponse"/>
+    </operation>
+<!-- Realtion among enzymes, compounds and reactions -->
+    <operation name="get_enzymes_by_reaction">
+
+      <input message="typens:get_enzymes_by_reactionRequest"/>
+      <output message="typens:get_enzymes_by_reactionResponse"/>
+    </operation>
+    <operation name="get_reactions_by_enzyme">
+      <input message="typens:get_reactions_by_enzymeRequest"/>
+      <output message="typens:get_reactions_by_enzymeResponse"/>
+    </operation>
+<!-- GENES -->
+    <operation name="get_genes_by_organism">
+
+      <input message="typens:get_genes_by_organismRequest"/>
+      <output message="typens:get_genes_by_organismResponse"/>
+    </operation>
+<!-- GENOME -->
+    <operation name="get_number_of_genes_by_organism">
+      <input message="typens:get_number_of_genes_by_organismRequest"/>
+      <output message="typens:get_number_of_genes_by_organismResponse"/>
+    </operation>
+<!-- LIGAND -->
+    <operation name="get_reactions_by_glycan">
+
+      <input message="typens:get_reactions_by_glycanRequest"/>
+      <output message="typens:get_reactions_by_glycanResponse"/>
+    </operation>
+    <operation name="get_reactions_by_compound">
+      <input message="typens:get_reactions_by_compoundRequest"/>
+      <output message="typens:get_reactions_by_compoundResponse"/>
+    </operation>
+    <operation name="get_enzymes_by_glycan">
+      <input message="typens:get_enzymes_by_glycanRequest"/>
+
+      <output message="typens:get_enzymes_by_glycanResponse"/>
+    </operation>
+    <operation name="get_enzymes_by_compound">
+      <input message="typens:get_enzymes_by_compoundRequest"/>
+      <output message="typens:get_enzymes_by_compoundResponse"/>
+    </operation>
+    <operation name="get_pathways_by_compounds">
+      <input message="typens:get_pathways_by_compoundsRequest"/>
+      <output message="typens:get_pathways_by_compoundsResponse"/>
+
+    </operation>
+    <operation name="get_pathways_by_glycans">
+      <input message="typens:get_pathways_by_glycansRequest"/>
+      <output message="typens:get_pathways_by_glycansResponse"/>
+    </operation>
+    <operation name="get_compounds_by_pathway">
+      <input message="typens:get_compounds_by_pathwayRequest"/>
+      <output message="typens:get_compounds_by_pathwayResponse"/>
+    </operation>
+
+    <operation name="get_glycans_by_pathway">
+      <input message="typens:get_glycans_by_pathwayRequest"/>
+      <output message="typens:get_glycans_by_pathwayResponse"/>
+    </operation>
+    <operation name="get_compounds_by_reaction">
+      <input message="typens:get_compounds_by_reactionRequest"/>
+      <output message="typens:get_compounds_by_reactionResponse"/>
+    </operation>
+    <operation name="get_glycans_by_reaction">
+
+      <input message="typens:get_glycans_by_reactionRequest"/>
+      <output message="typens:get_glycans_by_reactionResponse"/>
+    </operation>
+    <operation name="get_compounds_by_enzyme">
+      <input message="typens:get_compounds_by_enzymeRequest"/>
+      <output message="typens:get_compounds_by_enzymeResponse"/>
+    </operation>
+    <operation name="get_glycans_by_enzyme">
+      <input message="typens:get_glycans_by_enzymeRequest"/>
+
+      <output message="typens:get_glycans_by_enzymeResponse"/>
+    </operation>
+    <operation name="convert_mol_to_kcf">
+      <input message="typens:convert_mol_to_kcfRequest"/>
+      <output message="typens:convert_mol_to_kcfResponse"/>
+    </operation>
+    <operation name="get_kos_by_pathway">
+      <input message="typens:get_kos_by_pathwayRequest"/>
+      <output message="typens:get_kos_by_pathwayResponse"/>
+
+    </operation>
+    <operation name="get_pathways_by_kos">
+      <input message="typens:get_pathways_by_kosRequest"/>
+      <output message="typens:get_pathways_by_kosResponse"/>
+    </operation>
+<!-- v6.0 -->
+    <operation name="search_compounds_by_name">
+      <input message="typens:search_compounds_by_nameRequest"/>
+      <output message="typens:search_compounds_by_nameResponse"/>
+
+    </operation>
+    <operation name="search_glycans_by_name">
+      <input message="typens:search_glycans_by_nameRequest"/>
+      <output message="typens:search_glycans_by_nameResponse"/>
+    </operation>
+    <operation name="search_compounds_by_composition">
+      <input message="typens:search_compounds_by_compositionRequest"/>
+      <output message="typens:search_compounds_by_compositionResponse"/>
+    </operation>
+
+    <operation name="search_compounds_by_mass">
+      <input message="typens:search_compounds_by_massRequest"/>
+      <output message="typens:search_compounds_by_massResponse"/>
+    </operation>
+    <operation name="search_glycans_by_mass">
+      <input message="typens:search_glycans_by_massRequest"/>
+      <output message="typens:search_glycans_by_massResponse"/>
+    </operation>
+    <operation name="search_glycans_by_composition">
+
+      <input message="typens:search_glycans_by_compositionRequest"/>
+      <output message="typens:search_glycans_by_compositionResponse"/>
+    </operation>
+    <operation name="search_compounds_by_subcomp">
+      <input message="typens:search_compounds_by_subcompRequest"/>
+      <output message="typens:search_compounds_by_subcompResponse"/>
+    </operation>
+    <operation name="search_glycans_by_kcam">
+      <input message="typens:search_glycans_by_kcamRequest"/>
+
+      <output message="typens:search_glycans_by_kcamResponse"/>
+    </operation>
+    <operation name="get_linkdb_between_databases">
+      <input message="typens:get_linkdb_between_databasesRequest"/>
+      <output message="typens:get_linkdb_between_databasesResponse"/>
+    </operation>
+
+<!-- v6.1 -->
+    <operation name="search_drugs_by_name">
+      <input message="typens:search_drugs_by_nameRequest"/>
+
+      <output message="typens:search_drugs_by_nameResponse"/>
+    </operation>
+    <operation name="search_drugs_by_composition">
+      <input message="typens:search_drugs_by_compositionRequest"/>
+      <output message="typens:search_drugs_by_compositionResponse"/>
+    </operation>
+    <operation name="search_drugs_by_mass">
+      <input message="typens:search_drugs_by_massRequest"/>
+      <output message="typens:search_drugs_by_massResponse"/>
+
+    </operation>
+    <operation name="search_drugs_by_subcomp">
+      <input message="typens:search_drugs_by_subcompRequest"/>
+      <output message="typens:search_drugs_by_subcompResponse"/>
+    </operation>
+
+  </portType>
+
+
+  <binding name="KEGGBinding" type="typens:KEGGPortType">
+
+    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+<!-- KEGG information -->
+    <operation name="list_databases">
+      <soap:operation soapAction="SOAP/KEGG#list_databases"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </output>
+    </operation>
+    <operation name="list_organisms">
+      <soap:operation soapAction="SOAP/KEGG#list_organisms"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </output>
+    </operation>
+    <operation name="list_pathways">
+      <soap:operation soapAction="SOAP/KEGG#list_pathways"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </output>
+    </operation>
+    <operation name="list_ko_classes">
+      <soap:operation soapAction="SOAP/KEGG#list_ko_classes"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </output>
+    </operation>
+<!-- DBGET -->
+    <operation name="binfo">
+      <soap:operation soapAction="SOAP/KEGG#binfo"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="bget">
+      <soap:operation soapAction="SOAP/KEGG#bget"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="bfind">
+      <soap:operation soapAction="SOAP/KEGG#bfind"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="btit">
+      <soap:operation soapAction="SOAP/KEGG#btit"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="bconv">
+      <soap:operation soapAction="SOAP/KEGG#bconv"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+<!-- LinkDB -->
+    <operation name="get_linkdb_by_entry">
+      <soap:operation soapAction="SOAP/KEGG#get_linkdb_by_entry"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+<!-- SSDB -->
+    <operation name="get_best_neighbors_by_gene">
+      <soap:operation soapAction="SOAP/KEGG#get_best_neighbors_by_gene"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_best_best_neighbors_by_gene">
+      <soap:operation soapAction="SOAP/KEGG#get_best_best_neighbors_by_gene"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_reverse_best_neighbors_by_gene">
+      <soap:operation soapAction="SOAP/KEGG#get_reverse_best_neighbors_by_gene"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_paralogs_by_gene">
+      <soap:operation soapAction="SOAP/KEGG#get_paralogs_by_gene"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+<!-- MOTIF -->
+    <operation name="get_motifs_by_gene">
+      <soap:operation soapAction="SOAP/KEGG#get_motifs_by_gene"/>
+      <input>
+
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_genes_by_motifs">
+      <soap:operation soapAction="SOAP/KEGG#get_genes_by_motifs"/>
+      <input>
+
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+<!-- KO,OC,PC -->
+    <operation name="get_ko_by_gene">
+      <soap:operation soapAction="SOAP/KEGG#get_ko_by_gene"/>
+
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_ko_by_ko_class">
+      <soap:operation soapAction="SOAP/KEGG#get_ko_by_ko_class"/>
+
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_genes_by_ko">
+      <soap:operation soapAction="SOAP/KEGG#get_genes_by_ko"/>
+
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_genes_by_ko_class">
+      <soap:operation soapAction="SOAP/KEGG#get_genes_by_ko_class"/>
+
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+<!--
+    <operation name="get_oc_members_by_gene">
+      <soap:operation soapAction="SOAP/KEGG#get_oc_members_by_gene"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+-->
+<!--
+    <operation name="get_pc_members_by_gene">
+      <soap:operation soapAction="SOAP/KEGG#get_pc_members_by_gene"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+-->
+<!-- PATHWAY -->
+
+<!-- Coloring pathways -->
+    <operation name="get_elements_by_pathway">
+      <soap:operation soapAction="SOAP/KEGG#get_elements_by_pathway"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+
+    </operation>
+    <operation name="get_element_relations_by_pathway">
+      <soap:operation soapAction="SOAP/KEGG#get_element_relations_by_pathway"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+
+    </operation>
+    <operation name="color_pathway_by_elements">
+      <soap:operation soapAction="SOAP/KEGG#color_pathway_by_elements"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+
+    </operation>
+    <operation name="get_html_of_colored_pathway_by_elements">
+      <soap:operation soapAction="SOAP/KEGG#get_html_of_colored_pathway_by_elements"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+
+    </operation>
+
+    <operation name="mark_pathway_by_objects">
+      <soap:operation soapAction="SOAP/KEGG#mark_pathway_by_objects"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </output>
+    </operation>
+    <operation name="color_pathway_by_objects">
+      <soap:operation soapAction="SOAP/KEGG#color_pathway_by_objects"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </output>
+    </operation>
+    <operation name="get_html_of_marked_pathway_by_objects">
+      <soap:operation soapAction="SOAP/KEGG#get_html_of_marked_pathway_by_objects"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </output>
+    </operation>
+    <operation name="get_html_of_colored_pathway_by_objects">
+      <soap:operation soapAction="SOAP/KEGG#get_html_of_colored_pathway_by_objects"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </output>
+    </operation>
+<!-- Objects on the pathway -->
+    <operation name="get_genes_by_pathway">
+      <soap:operation soapAction="SOAP/KEGG#get_genes_by_pathway"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_enzymes_by_pathway">
+      <soap:operation soapAction="SOAP/KEGG#get_enzymes_by_pathway"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_reactions_by_pathway">
+      <soap:operation soapAction="SOAP/KEGG#get_reactions_by_pathway"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+<!-- Pathways by object -->
+    <operation name="get_pathways_by_genes">
+      <soap:operation soapAction="SOAP/KEGG#get_pathways_by_genes"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_pathways_by_enzymes">
+      <soap:operation soapAction="SOAP/KEGG#get_pathways_by_enzymes"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_pathways_by_reactions">
+      <soap:operation soapAction="SOAP/KEGG#get_pathways_by_reactions"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+<!-- Mutual transformation of objects -->
+    <operation name="get_linked_pathways">
+      <soap:operation soapAction="SOAP/KEGG#get_linked_pathways"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_genes_by_enzyme">
+      <soap:operation soapAction="SOAP/KEGG#get_genes_by_enzyme"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_enzymes_by_gene">
+      <soap:operation soapAction="SOAP/KEGG#get_enzymes_by_gene"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_enzymes_by_reaction">
+      <soap:operation soapAction="SOAP/KEGG#get_enzymes_by_reaction"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_reactions_by_enzyme">
+      <soap:operation soapAction="SOAP/KEGG#get_reactions_by_enzyme"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+<!-- GENES -->
+    <operation name="get_genes_by_organism">
+      <soap:operation soapAction="SOAP/KEGG#get_genes_by_organism"/>
+      <input>
+
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+<!-- GENOME -->
+    <operation name="get_number_of_genes_by_organism">
+      <soap:operation soapAction="SOAP/KEGG#get_number_of_genes_by_organism"/>
+
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+<!-- LIGAND -->
+    <operation name="get_reactions_by_glycan">
+
+      <soap:operation soapAction="SOAP/KEGG#get_reactions_by_glycan"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_reactions_by_compound">
+
+      <soap:operation soapAction="SOAP/KEGG#get_reactions_by_compound"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_enzymes_by_glycan">
+
+      <soap:operation soapAction="SOAP/KEGG#get_enzymes_by_glycan"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_enzymes_by_compound">
+
+      <soap:operation soapAction="SOAP/KEGG#get_enzymes_by_compound"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_pathways_by_compounds">
+
+      <soap:operation soapAction="SOAP/KEGG#get_pathways_by_compounds"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_pathways_by_glycans">
+
+      <soap:operation soapAction="SOAP/KEGG#get_pathways_by_glycans"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_compounds_by_pathway">
+
+      <soap:operation soapAction="SOAP/KEGG#get_compounds_by_pathway"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_glycans_by_pathway">
+
+      <soap:operation soapAction="SOAP/KEGG#get_glycans_by_pathway"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_compounds_by_reaction">
+
+      <soap:operation soapAction="SOAP/KEGG#get_compounds_by_reaction"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_glycans_by_reaction">
+
+      <soap:operation soapAction="SOAP/KEGG#get_glycans_by_reaction"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_compounds_by_enzyme">
+
+      <soap:operation soapAction="SOAP/KEGG#get_compounds_by_enzyme"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_glycans_by_enzyme">
+
+      <soap:operation soapAction="SOAP/KEGG#get_glycans_by_enzyme"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="convert_mol_to_kcf">
+
+      <soap:operation soapAction="SOAP/KEGG#convert_mol_to_kcf"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_kos_by_pathway">
+
+      <soap:operation soapAction="SOAP/KEGG#get_kos_by_pathway"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+    <operation name="get_pathways_by_kos">
+
+      <soap:operation soapAction="SOAP/KEGG#get_pathways_by_kos"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+
+<!-- v6.0 -->
+    <operation name="search_compounds_by_name">
+      <soap:operation soapAction="SOAP/KEGG#search_compounds_by_name"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+
+    </operation>
+    <operation name="search_glycans_by_name">
+      <soap:operation soapAction="SOAP/KEGG#search_glycans_by_name"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+
+    </operation>
+    <operation name="search_compounds_by_composition">
+      <soap:operation soapAction="SOAP/KEGG#search_compounds_by_composition"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+
+    </operation>
+    <operation name="search_compounds_by_mass">
+      <soap:operation soapAction="SOAP/KEGG#search_compounds_by_mass"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+
+    </operation>
+    <operation name="search_glycans_by_mass">
+      <soap:operation soapAction="SOAP/KEGG#search_glycans_by_mass"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+
+    </operation>
+    <operation name="search_glycans_by_composition">
+      <soap:operation soapAction="SOAP/KEGG#search_glycans_by_composition"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+
+    </operation>
+    <operation name="search_compounds_by_subcomp">
+      <soap:operation soapAction="SOAP/KEGG#search_compounds_by_subcomp"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+
+    </operation>
+    <operation name="search_glycans_by_kcam">
+      <soap:operation soapAction="SOAP/KEGG#search_glycans_by_kcam"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+
+    </operation>
+    <operation name="get_linkdb_between_databases">
+      <soap:operation soapAction="SOAP/KEGG#get_linkdb_between_databases"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+
+    </operation>
+
+<!-- v6.1 -->
+    <operation name="search_drugs_by_name">
+      <soap:operation soapAction="SOAP/KEGG#search_drugs_by_name"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </output>
+    </operation>
+    <operation name="search_drugs_by_composition">
+      <soap:operation soapAction="SOAP/KEGG#search_drugs_by_composition"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </output>
+    </operation>
+    <operation name="search_drugs_by_mass">
+      <soap:operation soapAction="SOAP/KEGG#search_drugs_by_mass"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </output>
+    </operation>
+    <operation name="search_drugs_by_subcomp">
+      <soap:operation soapAction="SOAP/KEGG#search_drugs_by_subcomp"/>
+      <input>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="encoded" namespace="SOAP/KEGG" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+      </output>
+    </operation>
+
+  </binding>
+
+  <service name="KEGG">
+    <port name="KEGGPort" binding="typens:KEGGBinding">
+      <soap:address location="http://soap.genome.jp/keggapi/request_v6.1.cgi"/>
+    </port>
+  </service>
+
+</definitions>


[07/50] [abbrv] incubator-taverna-workbench-common-activities git commit: avoid project.version

Posted by st...@apache.org.
avoid project.version


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/b241be85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/b241be85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/b241be85

Branch: refs/heads/master
Commit: b241be8596915484637da0f7dfad19c0eb2ffc77
Parents: f039ec3
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Authored: Mon Oct 27 16:46:57 2014 +0000
Committer: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Committed: Mon Oct 27 16:46:57 2014 +0000

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/b241be85/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a77137e..556de86 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,7 +16,7 @@
 		<dependency>
 			<groupId>net.sf.taverna.t2.ui-activities</groupId>
 			<artifactId>beanshell-activity-ui</artifactId>
-			<version>${project.version}</version>
+			<version>${t2.activities.version}</version>
 		</dependency>
 		<dependency>
 			<groupId>net.sf.taverna.t2.ui-api</groupId>


[11/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-external-tool-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ScriptPanel.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ScriptPanel.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ScriptPanel.java
new file mode 100644
index 0000000..ba15219
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ScriptPanel.java
@@ -0,0 +1,149 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.IOException;
+
+import javax.swing.AbstractAction;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.border.EmptyBorder;
+import javax.swing.text.JTextComponent;
+
+import net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean;
+import net.sf.taverna.t2.lang.ui.DeselectingButton;
+import net.sf.taverna.t2.lang.ui.LineEnabledTextPanel;
+
+import org.jdom.input.SAXBuilder;
+
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseEnumeration;
+
+
+/**
+ * @author alanrw
+ *
+ */
+public class ScriptPanel extends JPanel {
+	
+	private static final String SCRIPT_DESCRIPTION = "Specify the commands that you want to run. You can use data arriving at an input port to replace parts of the command or to write to a file. You can also take data written to a file and send it to an output port.";
+	static SAXBuilder builder = new SAXBuilder();
+	private final JTextComponent scriptTextArea;
+	
+	public ScriptPanel(final ExternalToolConfigView view, JTextComponent scriptTextArea, JCheckBox stdInCheckBox, JCheckBox stdOutCheckBox, JCheckBox stdErrCheckBox, JTextField returnCodesField) {
+		super();
+		this.setLayout(new BorderLayout());
+	
+		JTextArea descriptionText = new JTextArea(
+				SCRIPT_DESCRIPTION);
+		descriptionText.setEditable(false);
+		descriptionText.setFocusable(false);
+		descriptionText.setBorder(new EmptyBorder(5, 5, 10, 5));
+		descriptionText.setLineWrap(true);
+		descriptionText.setWrapStyleWord(true);
+		this.add(descriptionText, BorderLayout.NORTH);
+
+		this.scriptTextArea = scriptTextArea;
+		
+		this.add(new LineEnabledTextPanel(scriptTextArea),
+				BorderLayout.CENTER);
+		
+
+		UseCaseDescription useCaseDescription = view.getConfiguration().getUseCaseDescription();
+		stdInCheckBox.setSelected(useCaseDescription.isIncludeStdIn());
+		stdOutCheckBox.setSelected(useCaseDescription.isIncludeStdOut());
+		stdErrCheckBox.setSelected(useCaseDescription.isIncludeStdErr());
+		returnCodesField.setText(useCaseDescription.getReturnCodesAsText());
+		
+		JPanel codesPanel = new JPanel(new FlowLayout());
+		codesPanel.add(new JLabel("Valid return codes:"));
+		codesPanel.add(returnCodesField);
+
+		JPanel streamPanel = new JPanel(new FlowLayout());
+		streamPanel.add(stdInCheckBox);
+		streamPanel.add(stdOutCheckBox);
+		streamPanel.add(stdErrCheckBox);
+
+		JPanel buttonPanel = new JPanel(new FlowLayout());
+		if (view.isOriginallyFromRepository()) {
+			JButton revertButton = new DeselectingButton("Revert to original description",
+					new AbstractAction(){
+
+				@Override
+				public void actionPerformed(ActionEvent e) {
+					ExternalToolActivityConfigurationBean bean = view.makeConfiguration();
+					String repositoryUrl = bean.getRepositoryUrl();
+					String id = bean.getExternaltoolid();
+					UseCaseDescription usecase = null;
+					try {
+						usecase = UseCaseEnumeration.readDescriptionFromUrl(
+							repositoryUrl, id);
+					}
+					catch (IOException ex) {
+						// Already logged
+					}
+					if (usecase != null) {
+						bean.setUseCaseDescription(usecase);
+						view.setEditable(false, bean);
+					} else {
+						JOptionPane.showMessageDialog(view, "Unable to find tool description " + id, "Missing tool description", JOptionPane.ERROR_MESSAGE);
+					}
+				}});
+			revertButton.setToolTipText("Revert to the tool description from the repository");
+			buttonPanel.add(revertButton);
+		}
+		JButton loadScriptButton = new DeselectingButton("Load description",
+				new LoadDescriptionAction(this, view));
+		loadScriptButton.setToolTipText("Load tool description from a file");
+
+		JButton saveScriptButton = new DeselectingButton("Export description",
+				new SaveDescriptionAction(this, view));
+		saveScriptButton.setToolTipText("Export the tool description to a file");
+
+		JButton clearScriptButton = new DeselectingButton("Clear script",
+				new AbstractAction() {
+
+			public void actionPerformed(ActionEvent e) {
+				clearScript();
+			}
+
+		});
+		clearScriptButton.setToolTipText("Clear the script from the edit area");
+
+		buttonPanel.add(loadScriptButton);
+		buttonPanel.add(saveScriptButton);
+		buttonPanel.add(clearScriptButton);
+
+		JPanel subPanel = new JPanel(new GridLayout(3,1));
+		subPanel.add(codesPanel);
+		subPanel.add(streamPanel);
+		subPanel.add(buttonPanel);
+
+		this.add(subPanel, BorderLayout.SOUTH);
+	}
+
+	/**
+	 * Method for clearing the script
+	 * 
+	 */
+	private void clearScript() {
+		if (JOptionPane.showConfirmDialog(this,
+				"Do you really want to clear the tool description?",
+				"Clearing the tool description", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
+			scriptTextArea.setText("");
+		}
+
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticStringPanel.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticStringPanel.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticStringPanel.java
new file mode 100644
index 0000000..885cab5
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticStringPanel.java
@@ -0,0 +1,106 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.BorderLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.util.List;
+
+import javax.swing.AbstractAction;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.border.EmptyBorder;
+
+import net.sf.taverna.t2.activities.externaltool.utils.Tools;
+import net.sf.taverna.t2.lang.ui.DeselectingButton;
+import net.sf.taverna.t2.lang.ui.ReadOnlyTextArea;
+
+/**
+ * @author alanrw
+ *
+ */
+public class StaticStringPanel extends JPanel {
+	
+	private static final String STATIC_STRING_DESCRIPTION = "A fixed string can be written to the specified file.";
+	private final List<ExternalToolStaticStringViewer> staticStringViewList;
+	
+	int staticGridy = 1;
+	
+	private static String[] elementLabels = new String[] {"String to copy", "To file"};
+	
+	public StaticStringPanel(final List<ExternalToolStaticStringViewer> staticStringViewList) {
+		super(new BorderLayout());
+		this.staticStringViewList = staticStringViewList;
+		final JPanel staticEditPanel = new JPanel(new GridBagLayout());
+
+		final GridBagConstraints staticConstraint = new GridBagConstraints();
+		staticConstraint.insets = new Insets(5, 5, 5, 5);
+		staticConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
+		staticConstraint.gridx = 0;
+		staticConstraint.gridy = 0;
+		staticConstraint.weightx = 0.1;
+		staticConstraint.fill = GridBagConstraints.BOTH;
+
+		staticConstraint.gridx = 0;
+		synchronized (staticStringViewList) {
+			for (ExternalToolStaticStringViewer staticView : staticStringViewList) {
+				addStaticStringViewer(StaticStringPanel.this, staticEditPanel,
+						staticView);
+			}
+		}
+
+		JTextArea descriptionText = new ReadOnlyTextArea(
+				STATIC_STRING_DESCRIPTION);
+		descriptionText.setEditable(false);
+		descriptionText.setFocusable(false);
+		descriptionText.setBorder(new EmptyBorder(5, 5, 10, 5));
+		this.add(descriptionText, BorderLayout.NORTH);
+
+		this.add(new JScrollPane(staticEditPanel),
+				BorderLayout.CENTER);
+		JButton addStaticStringButton = new DeselectingButton("Add string",
+				new AbstractAction() {
+			// FIXME refactor this into a method
+			public void actionPerformed(ActionEvent e) {
+
+				ExternalToolStaticStringViewer newViewer = new ExternalToolStaticStringViewer();
+				synchronized (staticStringViewList) {
+					staticStringViewList.add(newViewer);
+					addStaticStringViewer(StaticStringPanel.this, staticEditPanel,
+							newViewer);
+					staticEditPanel.revalidate();
+					staticEditPanel.repaint();
+				}
+			}
+
+		});
+
+		JPanel buttonPanel = new JPanel(new BorderLayout());
+
+		buttonPanel.add(addStaticStringButton, BorderLayout.EAST);
+
+		this.add(buttonPanel, BorderLayout.SOUTH);
+	
+	}
+	
+	private void addStaticStringViewer(final JPanel outerPanel,
+			final JPanel panel, ExternalToolStaticStringViewer viewer) {
+		Tools.addViewer(panel,
+				elementLabels,
+				new JComponent[] {new JScrollPane(viewer.getContentField()), viewer.getValueField()},
+				staticStringViewList,
+				viewer,
+				outerPanel);
+	}
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticUrlPanel.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticUrlPanel.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticUrlPanel.java
new file mode 100644
index 0000000..ba441f4
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StaticUrlPanel.java
@@ -0,0 +1,108 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.BorderLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.util.List;
+
+import javax.swing.AbstractAction;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.border.EmptyBorder;
+
+import net.sf.taverna.t2.activities.externaltool.utils.Tools;
+import net.sf.taverna.t2.lang.ui.DeselectingButton;
+import net.sf.taverna.t2.lang.ui.ReadOnlyTextArea;
+
+/**
+ * @author alanrw
+ *
+ */
+public class StaticUrlPanel extends JPanel {
+	
+	private static final String STATIC_URL_DESCRIPTION = "The data at a URL can be downloaded and stored in the specified file.";
+	private final List<ExternalToolStaticUrlViewer> staticUrlViewList;
+	private int staticGridy = 1;
+
+	private static String[] elementLabels = new String[] {"Copy from URL", "To file"};
+	
+
+	public StaticUrlPanel(final List<ExternalToolStaticUrlViewer> staticUrlViewList) {
+	
+	super(new BorderLayout());
+	this.staticUrlViewList = staticUrlViewList;
+	final JPanel staticEditPanel = new JPanel(new GridBagLayout());
+
+	final GridBagConstraints staticConstraint = new GridBagConstraints();
+	staticConstraint.insets = new Insets(5, 5, 5, 5);
+	staticConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
+	staticConstraint.gridx = 0;
+	staticConstraint.gridy = 0;
+	staticConstraint.weightx = 0.1;
+	staticConstraint.fill = GridBagConstraints.BOTH;
+
+	staticConstraint.gridx = 0;
+	synchronized (staticUrlViewList) {
+		for (ExternalToolStaticUrlViewer staticView : staticUrlViewList) {
+			addStaticUrlViewer(this, staticEditPanel,
+					staticView);
+		}
+	}
+
+	this.add(new JScrollPane(staticEditPanel),
+			BorderLayout.CENTER);
+
+	JTextArea descriptionText = new ReadOnlyTextArea(
+			STATIC_URL_DESCRIPTION);
+	descriptionText.setEditable(false);
+	descriptionText.setFocusable(false);
+	descriptionText.setBorder(new EmptyBorder(5, 5, 10, 5));
+
+	this.add(descriptionText, BorderLayout.NORTH);
+
+	JButton addstaticPortButton = new DeselectingButton("Add URL",
+			new AbstractAction() {
+		// FIXME refactor this into a method
+		public void actionPerformed(ActionEvent e) {
+
+			ExternalToolStaticUrlViewer newViewer = new ExternalToolStaticUrlViewer();
+			synchronized (staticUrlViewList) {
+				staticUrlViewList.add(newViewer);
+				addStaticUrlViewer(StaticUrlPanel.this, staticEditPanel,
+						newViewer);
+				staticEditPanel.revalidate();
+				staticEditPanel.repaint();
+			}
+		}
+
+	});
+	JPanel buttonPanel = new JPanel(new BorderLayout());
+
+	buttonPanel.add(addstaticPortButton, BorderLayout.EAST);
+
+	this.add(buttonPanel, BorderLayout.SOUTH);
+
+	}
+	
+	private void addStaticUrlViewer(final JPanel outerPanel,
+			final JPanel panel, ExternalToolStaticUrlViewer viewer) {
+		Tools.addViewer(panel,
+				elementLabels,
+				new JComponent[] {viewer.getContentField(), viewer.getValueField()},
+				staticUrlViewList,
+				viewer,
+				outerPanel);
+	}
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StringReplacementPanel.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StringReplacementPanel.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StringReplacementPanel.java
new file mode 100644
index 0000000..1f85d3a
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/StringReplacementPanel.java
@@ -0,0 +1,134 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.util.List;
+
+import javax.swing.AbstractAction;
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+
+import net.sf.taverna.t2.activities.externaltool.manager.ssh.ExternalToolSshNodeViewer;
+import net.sf.taverna.t2.activities.externaltool.utils.Tools;
+import net.sf.taverna.t2.lang.ui.DeselectingButton;
+
+/**
+ * @author alanrw
+ *
+ */
+public class StringReplacementPanel extends JPanel {
+	
+	private static final String STRING_REPLACEMENT_DESCRIPTION = "You can use a string replacement to " +
+	"feed data into the service via an input port and have that data replace part of the " +
+	"command.";
+	private final List<ExternalToolStringReplacementViewer> stringReplacementViewList;
+	private int stringReplacementGridy = 1;
+	private final ExternalToolConfigView view;
+	
+	private static Insets insets = new Insets(1,5,1,5);
+	
+	private static String[] elementLabels = new String[] {"Taverna port name", "Replace port name", "String to replace"};
+	
+	private static CompoundBorder border = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,5,5,5), BorderFactory.createLineBorder(Color.BLACK, 1));
+
+	
+	public StringReplacementPanel(final ExternalToolConfigView view, final List<ExternalToolStringReplacementViewer> stringReplacementViewList) {
+		super(new BorderLayout());
+		this.view = view;
+		this.stringReplacementViewList = stringReplacementViewList;
+
+		final JPanel inputEditPanel = new JPanel(new GridBagLayout());
+
+		final GridBagConstraints inputConstraint = new GridBagConstraints();
+
+		inputConstraint.anchor = GridBagConstraints.FIRST_LINE_START;
+		inputConstraint.gridx = 0;
+		inputConstraint.gridy = 0;
+		inputConstraint.weightx = 0.1;
+		inputConstraint.fill = GridBagConstraints.BOTH;
+
+		inputConstraint.gridx = 0;
+		synchronized (stringReplacementViewList) {
+			for (ExternalToolStringReplacementViewer inputView : stringReplacementViewList) {
+				addStringReplacementViewer(this, inputEditPanel,
+						inputView, elementLabels);
+
+			}
+		}
+
+		JTextArea descriptionText = new JTextArea(
+				STRING_REPLACEMENT_DESCRIPTION);
+		descriptionText.setEditable(false);
+		descriptionText.setFocusable(false);
+		descriptionText.setBorder(new EmptyBorder(5, 5, 10, 5));
+		descriptionText.setLineWrap(true);
+		descriptionText.setWrapStyleWord(true);
+
+		this.add(descriptionText, BorderLayout.NORTH);
+		this.add(new JScrollPane(inputEditPanel),
+				BorderLayout.CENTER);
+		JButton addInputPortButton = new DeselectingButton("Add string replacement",
+				new AbstractAction() {
+
+			public void actionPerformed(ActionEvent e) {
+
+				int portNumber = 1;
+				String name2 = "in" + portNumber++;
+				boolean nameExists = true;
+				while (nameExists == true) {
+					nameExists = view.portNameExists(name2);
+					if (nameExists) {
+						name2 = "in" + portNumber++;
+					}
+				}
+
+				ExternalToolStringReplacementViewer newViewer = new ExternalToolStringReplacementViewer(
+						name2);
+				synchronized (stringReplacementViewList) {
+					stringReplacementViewList.add(newViewer);
+					addStringReplacementViewer(StringReplacementPanel.this, inputEditPanel,
+							newViewer, elementLabels);
+					inputEditPanel.revalidate();
+					inputEditPanel.repaint();
+				}
+
+			}
+
+		});
+
+		JPanel buttonPanel = new JPanel();
+		buttonPanel.setLayout(new BorderLayout());
+
+		buttonPanel.add(addInputPortButton, BorderLayout.EAST);
+
+		this.add(buttonPanel, BorderLayout.SOUTH);
+	}
+	
+	private void addStringReplacementViewer(final JPanel outerPanel,
+			final JPanel innerPanel, final ExternalToolStringReplacementViewer viewer, String[] elementLabels) {
+		Tools.addViewer(innerPanel,
+				elementLabels,
+				new JComponent[] {viewer.getNameField(), viewer.getValueFromField(), viewer.getValueField()},
+				stringReplacementViewList,
+				viewer,
+				outerPanel);
+	}
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ToolXMLPanel.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ToolXMLPanel.java b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ToolXMLPanel.java
new file mode 100644
index 0000000..b49211f
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/java/net/sf/taverna/t2/activities/externaltool/views/ToolXMLPanel.java
@@ -0,0 +1,33 @@
+/**
+ * 
+ */
+package net.sf.taverna.t2.activities.externaltool.views;
+
+import java.awt.BorderLayout;
+
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+
+import net.sf.taverna.t2.renderers.impl.XMLTree;
+
+import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
+
+/**
+ * @author alanrw
+ *
+ */
+public class ToolXMLPanel extends JPanel {
+
+	public ToolXMLPanel(UseCaseDescription useCaseDescription) {
+		super(new BorderLayout());
+		XMLTree xmlTree = new XMLTree(useCaseDescription.writeToXMLElement());
+		this.add(new JScrollPane(xmlTree), BorderLayout.CENTER);
+	}
+
+	public void regenerateTree(UseCaseDescription useCaseDescription) {
+		this.removeAll();
+		XMLTree xmlTree = new XMLTree(useCaseDescription.writeToXMLElement());
+		this.add(new JScrollPane(xmlTree), BorderLayout.CENTER);		
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor
new file mode 100644
index 0000000..9307977
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor
@@ -0,0 +1,2 @@
+net.sf.taverna.t2.activities.externaltool.manager.local.LocalInvocationMechanismEditor
+net.sf.taverna.t2.activities.externaltool.manager.ssh.SshInvocationMechanismEditor

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
new file mode 100644
index 0000000..e94cf6e
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
@@ -0,0 +1,2 @@
+net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolServiceProvider
+net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolTemplateServiceDescription

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
new file mode 100644
index 0000000..db316f2
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
@@ -0,0 +1,4 @@
+net.sf.taverna.t2.activities.externaltool.menu.ConfigureExternalToolMenuAction
+# net.sf.taverna.t2.activities.externaltool.menu.FeedbackMenuAction
+net.sf.taverna.t2.activities.externaltool.menu.AddExternalToolContextualMenuAction
+net.sf.taverna.t2.activities.externaltool.menu.AddExternalToolMenuAction

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ShutdownSPI
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ShutdownSPI b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ShutdownSPI
new file mode 100644
index 0000000..e6686a0
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ShutdownSPI
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupManagerShutdownHook
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.StartupSPI
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.StartupSPI b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.StartupSPI
new file mode 100644
index 0000000..0dd97e4
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.StartupSPI
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupManagerStartupHook

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
new file mode 100644
index 0000000..cdafd5d
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolActivityIcon

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.configuration.ConfigurationUIFactory
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.configuration.ConfigurationUIFactory b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.configuration.ConfigurationUIFactory
new file mode 100644
index 0000000..b3d1525
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.configuration.ConfigurationUIFactory
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.externaltool.manager.ToolInvocationConfigurationUIFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
new file mode 100644
index 0000000..ca0d30f
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.externaltool.views.ExternalToolActivityViewFactory

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/resources/META-INF/spring/external-tool-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/resources/META-INF/spring/external-tool-activity-ui-context-osgi.xml b/taverna-external-tool-activity-ui/src/main/resources/META-INF/spring/external-tool-activity-ui-context-osgi.xml
new file mode 100644
index 0000000..3d7110c
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/resources/META-INF/spring/external-tool-activity-ui-context-osgi.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:beans="http://www.springframework.org/schema/beans"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd
+                      http://www.springframework.org/schema/osgi
+                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+	<service ref="ToolInvocationConfigurationUIFactory" interface="uk.org.taverna.configuration.ConfigurationUIFactory" />
+
+	<service ref="InvocationGroupManagerStartupHook" interface="net.sf.taverna.t2.workbench.StartupSPI" />
+
+	<service ref="ExternalToolActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
+
+	<service ref="LocalInvocationMechanismEditor" interface="net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor" />
+	<service ref="SshInvocationMechanismEditor" interface="net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor" />
+
+	<service ref="ExternalToolServiceProvider" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
+	<service ref="ExternalToolTemplateServiceDescription" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
+
+	<service ref="ConfigureExternalToolMenuAction" auto-export="interfaces" />
+	<service ref="AddExternalToolContextualMenuAction" auto-export="interfaces" />
+	<service ref="AddExternalToolMenuAction" auto-export="interfaces" />
+
+	<service ref="InvocationGroupManagerShutdownHook" interface="net.sf.taverna.t2.workbench.ShutdownSPI" />
+
+	<service ref="ExternalToolActivityViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
+
+	<list id="mechanismCreators" interface="net.sf.taverna.t2.activities.externaltool.manager.MechanismCreator" cardinality="0..N" />
+	<list id="invocationMechanismEditors" interface="net.sf.taverna.t2.activities.externaltool.manager.InvocationMechanismEditor" cardinality="0..N" />
+
+	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
+	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
+	<reference id="menuManager" interface="net.sf.taverna.t2.ui.menu.MenuManager" />
+	<reference id="selectionManager" interface="net.sf.taverna.t2.workbench.selection.SelectionManager" />
+	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
+	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
+
+</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/resources/META-INF/spring/external-tool-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/resources/META-INF/spring/external-tool-activity-ui-context.xml b/taverna-external-tool-activity-ui/src/main/resources/META-INF/spring/external-tool-activity-ui-context.xml
new file mode 100644
index 0000000..7cf7f63
--- /dev/null
+++ b/taverna-external-tool-activity-ui/src/main/resources/META-INF/spring/external-tool-activity-ui-context.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+	<bean id="ToolInvocationConfigurationUIFactory" class="net.sf.taverna.t2.activities.externaltool.manager.ToolInvocationConfigurationUIFactory">
+		<property name="mechanismCreators" ref="mechanismCreators" />
+		<property name="invocationMechanismEditors" ref="invocationMechanismEditors" />
+	</bean>
+
+	<bean id="InvocationGroupManagerStartupHook" class="net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupManagerStartupHook" />
+
+	<bean id="ExternalToolActivityIcon" class="net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolActivityIcon">
+			<property name="colourManager" ref="colourManager" />
+	</bean>
+
+	<bean id="LocalInvocationMechanismEditor" class="net.sf.taverna.t2.activities.externaltool.manager.local.LocalInvocationMechanismEditor" />
+	<bean id="SshInvocationMechanismEditor" class="net.sf.taverna.t2.activities.externaltool.manager.ssh.SshInvocationMechanismEditor" />
+
+	<bean id="ExternalToolServiceProvider" class="net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolServiceProvider" />
+	<bean id="ExternalToolTemplateServiceDescription" class="net.sf.taverna.t2.activities.externaltool.servicedescriptions.ExternalToolTemplateServiceDescription" />
+
+	<bean id="ConfigureExternalToolMenuAction" class="net.sf.taverna.t2.activities.externaltool.menu.ConfigureExternalToolMenuAction">
+			<property name="editManager" ref="editManager" />
+			<property name="fileManager" ref="fileManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+	</bean>
+	<bean id="AddExternalToolContextualMenuAction" class="net.sf.taverna.t2.activities.externaltool.menu.AddExternalToolContextualMenuAction">
+			<property name="editManager" ref="editManager" />
+			<property name="menuManager" ref="menuManager" />
+			<property name="selectionManager" ref="selectionManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+	</bean>
+	<bean id="AddExternalToolMenuAction" class="net.sf.taverna.t2.activities.externaltool.menu.AddExternalToolMenuAction">
+			<property name="editManager" ref="editManager" />
+			<property name="menuManager" ref="menuManager" />
+			<property name="selectionManager" ref="selectionManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+	</bean>
+
+	<bean id="InvocationGroupManagerShutdownHook" class="net.sf.taverna.t2.activities.externaltool.manager.InvocationGroupManagerShutdownHook" />
+
+	<bean id="ExternalToolActivityViewFactory" class="net.sf.taverna.t2.activities.externaltool.views.ExternalToolActivityViewFactory">
+			<property name="editManager" ref="editManager" />
+			<property name="fileManager" ref="fileManager" />
+			<property name="activityIconManager" ref="activityIconManager" />
+			<property name="colourManager" ref="colourManager" />
+	</bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/e48c3199/taverna-external-tool-activity-ui/src/main/resources/externaltool.png
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity-ui/src/main/resources/externaltool.png b/taverna-external-tool-activity-ui/src/main/resources/externaltool.png
new file mode 100644
index 0000000..a9e84e6
Binary files /dev/null and b/taverna-external-tool-activity-ui/src/main/resources/externaltool.png differ


[23/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-localworker-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker
deleted file mode 100644
index e46e219..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker
+++ /dev/null
@@ -1,48 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import org.biojava.bio.seq.DNATools;
-import org.biojava.bio.seq.RNATools;
-import org.biojava.bio.symbol.SymbolList;
-
-if ((dna_seq == void) || (dna_seq == null)) {
-	throw new RuntimeException("The dna_seq must be specified");
-}
-
-// make a DNA SymbolList
-SymbolList symL = DNATools.createDNA(dna_seq);
-
-// transcribe it to RNA (after BioJava 1.4 this method is
-// deprecated)
-symL = RNATools.transcribe(symL);
-
-// (after BioJava 1.4 use this method instead)
-// symL = DNATools.toRNA(symL);
-
-// just to prove it worked
-rna_seq = symL.seqString();
-</script>
-  <dependencies class="java.util.Collections$SingletonList">
-    <element class="string">uk.org.mygrid.resources:biojava:1.4pre1</element>
-  </dependencies>
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>dna_seq</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>rna_seq</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker.json
deleted file mode 100644
index 767852c..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import org.biojava.bio.seq.DNATools;\nimport org.biojava.bio.seq.RNATools;\nimport org.biojava.bio.symbol.SymbolList;\n\nif ((dna_seq == void) || (dna_seq == null)) {\n\tthrow new RuntimeException(\"The dna_seq must be specified\");\n}\n\n// make a DNA SymbolList\nSymbolList symL = DNATools.createDNA(dna_seq);\n\n// transcribe it to RNA (after BioJava 1.4 this method is\n// deprecated)\nsymL = RNATools.transcribe(symL);\n\n// (after BioJava 1.4 use this method instead)\n// symL = DNATools.toRNA(symL);\n\n// just to prove it worked\nrna_seq = symL.seqString();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.biojava.TranscribeWorker",
-  "inputPorts" : [ {
-    "name" : "dna_seq",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "rna_seq",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker
deleted file mode 100644
index 9ed72e4..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker
+++ /dev/null
@@ -1,101 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>BufferedReader getReader (String fileUrl) throws IOException {
-		InputStreamReader reader;
-		try {
-			reader = new FileReader(fileUrl);
-		}
-		catch (FileNotFoundException e) {
-			// try a real URL instead
-			URL url = new URL(fileUrl);
-			reader = new InputStreamReader (url.openStream());
-		}
-		return new BufferedReader(reader);
-	}
-
-String NEWLINE = System.getProperty("line.separator");
-
-boolean displayResults = false;
-if (displayresults != void) {
-	displayResults = Boolean.valueOf(displayresults).booleanValue();
-}
-
-StringBuffer sb = new StringBuffer(2000);
-
-if (outputfile == void) {
-	throw new RuntimeException("The 'outputfile' parameter cannot be null");
-}
-
-if (filelist == null) {
-	throw new RuntimeException("The 'filelist' parameter cannot be null");
-}
-
-String str = null;
-
-Writer writer = new FileWriter(outputfile);
-for (int i = 0; i &lt; filelist.size(); i++) {
-	BufferedReader reader = getReader(filelist.get(i));
-	while ((str = reader.readLine()) != null) {
-		writer.write(str);
-		writer.write(NEWLINE);
-
-		if (displayResults) {
-			sb.append(str);
-			sb.append(NEWLINE);
-		}
-	}
-
-	reader.close();
-
-}
-writer.flush();
-writer.close();
-
-if (displayResults) {
-	results= sb.toString();
-}
-
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>filelist</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>outputfile</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>displayresults</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>results</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker.json
deleted file mode 100644
index d91d466..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "BufferedReader getReader (String fileUrl) throws IOException {\n\t\tInputStreamReader reader;\n\t\ttry {\n\t\t\treader = new FileReader(fileUrl);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t// try a real URL instead\n\t\t\tURL url = new URL(fileUrl);\n\t\t\treader = new InputStreamReader (url.openStream());\n\t\t}\n\t\treturn new BufferedReader(reader);\n\t}\n\nString NEWLINE = System.getProperty(\"line.separator\");\n\nboolean displayResults = false;\nif (displayresults != void) {\n\tdisplayResults = Boolean.valueOf(displayresults).booleanValue();\n}\n\nStringBuffer sb = new StringBuffer(2000);\n\nif (outputfile == void) {\n\tthrow new RuntimeException(\"The 'outputfile' parameter cannot be null\");\n}\n\nif (filelist == null) {\n\tthrow new RuntimeException(\"The 'filelist' parameter cannot be null\");\n}\n\nString str = null;\n\nWriter writer = new FileWriter(outputfile);\nfor (int i = 0; i < filelist.size(); i++) {\n\tBufferedReader reader = getReader(file
 list.get(i));\n\twhile ((str = reader.readLine()) != null) {\n\t\twriter.write(str);\n\t\twriter.write(NEWLINE);\n\n\t\tif (displayResults) {\n\t\t\tsb.append(str);\n\t\t\tsb.append(NEWLINE);\n\t\t}\n\t}\n\n\treader.close();\n\n}\nwriter.flush();\nwriter.close();\n\nif (displayResults) {\n\tresults= sb.toString();\n}\n\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.io.ConcatenateFileListWorker",
-  "inputPorts" : [ {
-    "name" : "filelist",
-    "depth" : 1,
-    "type" : "String"
-  }, {
-    "name" : "outputfile",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "displayresults",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "results",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker
deleted file mode 100644
index 410ceb0..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker
+++ /dev/null
@@ -1,33 +0,0 @@
-<activity  xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="properties" to="properties" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>import java.net.URLEncoder;
-
-Properties sysProps = System.getProperties();
-Set keys = sysProps.keySet();
-Iterator it = keys.iterator();
-String currKey = null;
-StringBuffer sb = new StringBuffer();
-sb.append("&lt;?xml version=\"1.0\"?&gt;\n");
-sb.append("&lt;property-list&gt;\n");
-while (it.hasNext()) {
-	currKey = (String) it.next();
-	sb.append("&lt;property ");
-	sb.append(" name=\"" + URLEncoder.encode(currKey) + "\"");
-	sb.append(" value=\"" + URLEncoder.encode(sysProps.getProperty(currKey)) + "\"/&gt;\n");
-}
-sb.append("&lt;/property-list&gt;");
-
-properties = sb.toString();
-</script>
-  <dependencies />
-  <inputs />
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>properties</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/xml'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker.json
deleted file mode 100644
index 5dc2349..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import java.net.URLEncoder;\n\nProperties sysProps = System.getProperties();\nSet keys = sysProps.keySet();\nIterator it = keys.iterator();\nString currKey = null;\nStringBuffer sb = new StringBuffer();\nsb.append(\"<?xml version=\\\"1.0\\\"?>\\n\");\nsb.append(\"<property-list>\\n\");\nwhile (it.hasNext()) {\n\tcurrKey = (String) it.next();\n\tsb.append(\"<property \");\n\tsb.append(\" name=\\\"\" + URLEncoder.encode(currKey) + \"\\\"\");\n\tsb.append(\" value=\\\"\" + URLEncoder.encode(sysProps.getProperty(currKey)) + \"\\\"/>\\n\");\n}\nsb.append(\"</property-list>\");\n\nproperties = sb.toString();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.io.EnvVariableWorker",
-  "outputPorts" : [ {
-    "name" : "properties",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask b/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask
deleted file mode 100644
index 910d0d6..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask
+++ /dev/null
@@ -1,73 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>class FileExtFilter implements FileFilter {
-
-	public FileExtFilter(String ext) {
-		this.ext = ext;
-	}
-
-	public boolean accept(File file) {
-		return file.getName().endsWith(ext);
-	}
-
-	String ext = null;
-}
-
-if (extension == void || extension.equals("")) {
-	throw new RuntimeException(
-			"The 'extension' parameter cannot be null.  Please enter a valid file extension.");
-}
-
-if (directory == void || directory.equals("")) {
-	throw new RuntimeException(
-			"The 'directory' parameter cannot be null.  Please enter a valid file directory.");
-}
-
-File dirObj = new File(directory);
-
-if (!dirObj.exists()) {
-	throw new RuntimeException("The 'directory' parameter specified:" + directory
-			+ "does not exist.  Please enter a valid file directory.");
-}
-
-File[] fileObjList = dirObj.listFiles(new FileExtFilter(extension));
-List filelist = new ArrayList();
-for (int i = 0; i &lt; fileObjList.length; i++) {
-	filelist.add(fileObjList[i].getAbsolutePath());
-}
-
-
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>directory</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>extension</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>filelist</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask.json
deleted file mode 100644
index 656453e..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByExtTask.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "class FileExtFilter implements FileFilter {\n\n\tpublic FileExtFilter(String ext) {\n\t\tthis.ext = ext;\n\t}\n\n\tpublic boolean accept(File file) {\n\t\treturn file.getName().endsWith(ext);\n\t}\n\n\tString ext = null;\n}\n\nif (extension == void || extension.equals(\"\")) {\n\tthrow new RuntimeException(\n\t\t\t\"The 'extension' parameter cannot be null.  Please enter a valid file extension.\");\n}\n\nif (directory == void || directory.equals(\"\")) {\n\tthrow new RuntimeException(\n\t\t\t\"The 'directory' parameter cannot be null.  Please enter a valid file directory.\");\n}\n\nFile dirObj = new File(directory);\n\nif (!dirObj.exists()) {\n\tthrow new RuntimeException(\"The 'directory' parameter specified:\" + directory\n\t\t\t+ \"does not exist.  Please enter a valid file directory.\");\n}\n\nFile[] fileObjList = dirObj.listFiles(new FileExtFilter(extension));\nList filelist = new ArrayList();\nfor (int i = 0; i < fileObjList.length; i++) {\n\tfilelist.add(fileObj
 List[i].getAbsolutePath());\n}\n\n\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.io.FileListByExtTask",
-  "inputPorts" : [ {
-    "name" : "directory",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "extension",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "filelist",
-    "depth" : 1,
-    "granularDepth" : 1
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask b/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask
deleted file mode 100644
index 06906b6..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask
+++ /dev/null
@@ -1,71 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>class FileRegexFilter implements FileFilter {
-
-	public FileRegexFilter(String regex) {
-		this.regex = regex;
-	}
-
-	public boolean accept(File file) {
-		return file.getName().matches(regex);
-	}
-
-	String regex = null;
-}
-
-if (regex == void || regex.equals("")) {
-	throw new RuntimeException(
-			"The 'regex' parameter cannot be null.  Please enter a valid file extension.");
-}
-
-if (directory == void || directory.equals("")) {
-	throw new RuntimeException(
-			"The 'directory' parameter cannot be null.  Please enter a valid file directory.");
-}
-
-File dirObj = new File(directory);
-
-if (!dirObj.exists()) {
-	throw new RuntimeException("The 'directory' parameter specified:" + directory
-			+ "does not exist.  Please enter a valid file directory.");
-}
-
-File[] fileObjList = dirObj.listFiles(new FileRegexFilter(regex));
-List filelist = new ArrayList();
-for (int i = 0; i &lt; fileObjList.length; i++) {
-	filelist.add(fileObjList[i].getAbsolutePath());
-}
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>directory</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>regex</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>1</granularDepth>
-      <name>filelist</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask.json
deleted file mode 100644
index 35cdb01..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "class FileRegexFilter implements FileFilter {\n\n\tpublic FileRegexFilter(String regex) {\n\t\tthis.regex = regex;\n\t}\n\n\tpublic boolean accept(File file) {\n\t\treturn file.getName().matches(regex);\n\t}\n\n\tString regex = null;\n}\n\nif (regex == void || regex.equals(\"\")) {\n\tthrow new RuntimeException(\n\t\t\t\"The 'regex' parameter cannot be null.  Please enter a valid file extension.\");\n}\n\nif (directory == void || directory.equals(\"\")) {\n\tthrow new RuntimeException(\n\t\t\t\"The 'directory' parameter cannot be null.  Please enter a valid file directory.\");\n}\n\nFile dirObj = new File(directory);\n\nif (!dirObj.exists()) {\n\tthrow new RuntimeException(\"The 'directory' parameter specified:\" + directory\n\t\t\t+ \"does not exist.  Please enter a valid file directory.\");\n}\n\nFile[] fileObjList = dirObj.listFiles(new FileRegexFilter(regex));\nList filelist = new ArrayList();\nfor (int i = 0; i < fileObjList.length; i++) {\n\tfilelist.add(fileObjL
 ist[i].getAbsolutePath());\n}\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.io.FileListByRegexTask",
-  "inputPorts" : [ {
-    "name" : "directory",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "regex",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "filelist",
-    "depth" : 1,
-    "granularDepth" : 1
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand b/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand
deleted file mode 100644
index c0adc09..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand
+++ /dev/null
@@ -1,80 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>if (command == void || command.equals("")) {
-	throw new RuntimeException("The 'command' port cannot be null.");
-}
-Process proc = null;
-Runtime rt = Runtime.getRuntime();
-
-String osName = System.getProperty("os.name");
-String[] cmdArray = null;
-if (osName.contains("Windows")) {
-	cmdArray = new String[] { "cmd.exe", "/c", command };
-} else {// TODO: investigate if this will work in Linux and OSX
-	cmdArray = new String[] { command };
-}
-
-// concatenate the arrays
-if ((args == void) || (args == null)) {
-	args = new ArrayList();
-}
-
-int argSize = cmdArray.length + args.size();
-ArrayList appArray = new ArrayList(argSize);
-for (int i = 0; i &lt; cmdArray.length; i++) {
-	appArray.add(cmdArray[i]);
-}
-
-for (int i = 0; i &lt; args.size(); i++) {
-	appArray.add(args.get(i));
-}
-
-String[] applist = new String[argSize];
-appArray.toArray(applist);
-proc = rt.exec(applist);
-
-// Get the input stream and read from it
-InputStream in = proc.getInputStream();
-
-int c;
-StringBuffer sb = new StringBuffer();
-while ((c = in.read()) != -1) {
-	sb.append((char) c);
-}
-in.close();
-result = sb.toString();
-  
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>command</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>args</name>
-      <depth>1</depth>
-      <mimeTypes>
-        <string>l('text/plain')</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>result</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand.json
deleted file mode 100644
index f6ddf4f..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.LocalCommand.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if (command == void || command.equals(\"\")) {\n\tthrow new RuntimeException(\"The 'command' port cannot be null.\");\n}\nProcess proc = null;\nRuntime rt = Runtime.getRuntime();\n\nString osName = System.getProperty(\"os.name\");\nString[] cmdArray = null;\nif (osName.contains(\"Windows\")) {\n\tcmdArray = new String[] { \"cmd.exe\", \"/c\", command };\n} else {// TODO: investigate if this will work in Linux and OSX\n\tcmdArray = new String[] { command };\n}\n\n// concatenate the arrays\nif ((args == void) || (args == null)) {\n\targs = new ArrayList();\n}\n\nint argSize = cmdArray.length + args.size();\nArrayList appArray = new ArrayList(argSize);\nfor (int i = 0; i < cmdArray.length; i++) {\n\tappArray.add(cmdArray[i]);\n}\n\nfor (int i = 0; i < args.size(); i++) {\n\tappArray.add(args.get(i));\n}\n\nString[] applist = new String[argSize];\nappArray.toArray(applist);\nproc = rt.exec(applist);\n\n// Get the input stream and read from it\nInputStream in = proc.getInpu
 tStream();\n\nint c;\nStringBuffer sb = new StringBuffer();\nwhile ((c = in.read()) != -1) {\n\tsb.append((char) c);\n}\nin.close();\nresult = sb.toString();\n  \n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.io.LocalCommand",
-  "inputPorts" : [ {
-    "name" : "command",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "args",
-    "depth" : 1,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "result",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader b/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader
deleted file mode 100644
index 6e9adb4..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader
+++ /dev/null
@@ -1,76 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>BufferedReader getReader (String fileUrl, String encoding) throws IOException {
-		InputStreamReader reader;
-		try {
-			if (encoding == null) {
-				reader = new FileReader(fileUrl);
-			} else {
-				reader = new InputStreamReader(new FileInputStream(fileUrl),encoding); 
-			}
-		}
-		catch (FileNotFoundException e) {
-			// try a real URL instead
-			URL url = new URL(fileUrl);
-			if (encoding == null) {
-				reader = new InputStreamReader (url.openStream());
-			} else {
-				reader = new InputStreamReader (url.openStream(), encoding);
-			}
-		}
-		return new BufferedReader(reader);
-	}
-
-
-
-StringBuffer sb = new StringBuffer(4000);
-
-if (encoding == void) {
-	encoding = null;
-}
-
-BufferedReader in = getReader(fileurl, encoding);
-String str;
-String lineEnding = System.getProperty("line.separator");
-
-while ((str = in.readLine()) != null) {
-	sb.append(str);
-	sb.append(lineEnding);
-}
-in.close();
-filecontents = sb.toString();
-  
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>fileurl</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>encoding</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>filecontents</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader.json
deleted file mode 100644
index 1424433..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileReader.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "BufferedReader getReader (String fileUrl, String encoding) throws IOException {\n\t\tInputStreamReader reader;\n\t\ttry {\n\t\t\tif (encoding == null) {\n\t\t\t\treader = new FileReader(fileUrl);\n\t\t\t} else {\n\t\t\t\treader = new InputStreamReader(new FileInputStream(fileUrl),encoding); \n\t\t\t}\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t// try a real URL instead\n\t\t\tURL url = new URL(fileUrl);\n\t\t\tif (encoding == null) {\n\t\t\t\treader = new InputStreamReader (url.openStream());\n\t\t\t} else {\n\t\t\t\treader = new InputStreamReader (url.openStream(), encoding);\n\t\t\t}\n\t\t}\n\t\treturn new BufferedReader(reader);\n\t}\n\n\n\nStringBuffer sb = new StringBuffer(4000);\n\nif (encoding == void) {\n\tencoding = null;\n}\n\nBufferedReader in = getReader(fileurl, encoding);\nString str;\nString lineEnding = System.getProperty(\"line.separator\");\n\nwhile ((str = in.readLine()) != null) {\n\tsb.append(str);\n\tsb.append(lineEnding);\n}\nin.close();
 \nfilecontents = sb.toString();\n  \n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.io.TextFileReader",
-  "inputPorts" : [ {
-    "name" : "fileurl",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "encoding",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "filecontents",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter b/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter
deleted file mode 100644
index 88ac962..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter
+++ /dev/null
@@ -1,57 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>
-  BufferedWriter out;
-  if (encoding == void) {
-  	out = new BufferedWriter(new FileWriter(outputFile));
-  }
-  else {
-  	out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), encoding)); 
-  }
-out.write(filecontents);
-out.flush();
-out.close();
-outputFile = filecontents;
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>outputFile</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>filecontents</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>encoding</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>outputFile</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter.json
deleted file mode 100644
index 5a9f368..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.io.TextFileWriter.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "\n  BufferedWriter out;\n  if (encoding == void) {\n  \tout = new BufferedWriter(new FileWriter(outputFile));\n  }\n  else {\n  \tout = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), encoding)); \n  }\nout.write(filecontents);\nout.flush();\nout.close();\noutputFile = filecontents;\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.io.TextFileWriter",
-  "inputPorts" : [ {
-    "name" : "outputFile",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "filecontents",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "encoding",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputFile",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker
deleted file mode 100644
index b6263cf..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker
+++ /dev/null
@@ -1,309 +0,0 @@
-<activity  xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap><map from="password" to="password" /><map from="userid" to="userid" /><map from="params" to="params" /><map from="url" to="url" /><map from="provideXml" to="provideXml" /><map from="driver" to="driver" /><map from="sql" to="sql" /></inputMap><outputMap><map from="resultList" to="resultList" /><map from="xmlresults" to="xmlresults" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-
-  <script>
- import java.sql.Driver;
-import java.sql.DriverManager;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-
-import javax.sql.rowset.WebRowSet;
-
-import com.sun.rowset.WebRowSetImpl;
-
-
-
-if ((driver == void) || (driver == null) || driver.equals("")) {
-	throw new RuntimeException("The driver must be specified");
-}
-
-if ((url == void) || (url == null) || url.equals("")) {
-	throw new RuntimeException("The url must be specified");
-}
-
-boolean provideXmlBoolean = ((provideXml != void) &amp;&amp; (provideXml != null) &amp;&amp; Boolean.valueOf(provideXml));
-
-if ((params == void) || (params == null)) {
-   params = new ArrayList();
-}
-
-if ((sql == void) || (sql == null) || sql.equals("")) {
-	throw new RuntimeException("The sql must be specified");
-}
-
-Class c = Thread.currentThread().getContextClassLoader().loadClass(driver);
-
-if (c == null) {
-	throw new RuntimeException("Class " + driver + " not found");
-}
-
-Driver d = c.newInstance();
-if (d == null) {
-	throw new RuntimeException("Could not create instance of driver");
-}
-
-Properties p = new Properties();
-
-if ((userid == void) || (userid == null)) {
-	userid = "";
-}
-
-p.setProperty("user", userid);
-
-if ((password == void) || (password == null)) {
-	password = "";
-}
-
-p.setProperty("password", password);
-
-Connection con = null;
-PreparedStatement ps = null;
-ResultSet rs = null;
-try {
-
-	con = d.connect(url, p);
-	ps = con.prepareStatement(sql);
-
-	int paramSize = params.size();
-	for (int i = 0; i &lt; paramSize; i++) {
-		ps.setObject(i + 1, params.get(i));
-	}
-
-	rs = ps.executeQuery();
-
-	if (provideXmlBoolean) {
-		WebRowSet webrs = new WebRowSetImpl();
-		StringWriter sw = new StringWriter();
-		webrs.writeXml(rs, sw);
-		xmlresults = sw.toString();
-	} else {
-		xmlresults = "";
-	}
-
-	try {
-		rs.beforeFirst();
-	} catch (SQLException e) {
-		// redo the query
-		rs = ps.executeQuery();
-	}
-
-	ResultSetMetaData rsmd = rs.getMetaData();
-	int numCols = rsmd.getColumnCount();
-	resultList = new ArrayList();
-	
-	// put the results into the results list.
-	while (rs.next()) {
-		List row = new ArrayList(numCols);
-		for (int i = 0; i &lt; numCols; i++) {
-			String str = rs.getString(i + 1); 
-			row.add(str == null ? "null" : str); 
-		}
-		resultList.add(row);
-	}
-}
-finally {
-	if (rs != null) {
-		rs.close();
-	}
-	if (ps != null) {
-		ps.close();
-	}
-	if (con != null) {
-		con.close();
-	}
-}
-  
-
- </script>
-
-  <dependencies />
-
-  <classLoaderSharing>system</classLoaderSharing>
-
-  <localDependencies />
-
-  <artifactDependencies />
-
-  <inputs>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-      <handledReferenceSchemes />
-
-      <translatedElementType>java.lang.String</translatedElementType>
-
-      <allowsLiteralValues>true</allowsLiteralValues>
-
-      <name>driver</name>
-
-      <depth>0</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-      <handledReferenceSchemes />
-
-      <translatedElementType>java.lang.String</translatedElementType>
-
-      <allowsLiteralValues>true</allowsLiteralValues>
-
-      <name>password</name>
-
-      <depth>0</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-      <handledReferenceSchemes />
-
-      <translatedElementType>java.lang.String</translatedElementType>
-
-      <allowsLiteralValues>true</allowsLiteralValues>
-
-      <name>userid</name>
-
-      <depth>0</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-      <handledReferenceSchemes />
-
-      <translatedElementType>java.lang.String</translatedElementType>
-
-      <allowsLiteralValues>true</allowsLiteralValues>
-
-      <name>url</name>
-
-      <depth>0</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-      <handledReferenceSchemes />
-
-      <translatedElementType>java.lang.String</translatedElementType>
-
-      <allowsLiteralValues>true</allowsLiteralValues>
-
-      <name>provideXml</name>
-
-      <depth>0</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-      <handledReferenceSchemes />
-
-      <translatedElementType>java.lang.String</translatedElementType>
-
-      <allowsLiteralValues>true</allowsLiteralValues>
-
-      <name>sql</name>
-
-      <depth>0</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-      <handledReferenceSchemes />
-
-      <translatedElementType>java.lang.String</translatedElementType>
-
-      <allowsLiteralValues>true</allowsLiteralValues>
-
-      <name>params</name>
-
-      <depth>1</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-  </inputs>
-
-  <outputs>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-
-      <granularDepth>2</granularDepth>
-
-      <name>resultList</name>
-
-      <depth>2</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-
-      <granularDepth>0</granularDepth>
-
-      <name>xmlresults</name>
-
-      <depth>0</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-
-  </outputs>
-
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean><annotations /></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker.json
deleted file mode 100644
index da1f005..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "\n import java.sql.Driver;\nimport java.sql.DriverManager;\nimport java.sql.Connection;\nimport java.sql.PreparedStatement;\nimport java.sql.ResultSet;\nimport java.sql.ResultSetMetaData;\nimport java.sql.SQLException;\n\nimport javax.sql.rowset.WebRowSet;\n\nimport com.sun.rowset.WebRowSetImpl;\n\n\n\nif ((driver == void) || (driver == null) || driver.equals(\"\")) {\n\tthrow new RuntimeException(\"The driver must be specified\");\n}\n\nif ((url == void) || (url == null) || url.equals(\"\")) {\n\tthrow new RuntimeException(\"The url must be specified\");\n}\n\nboolean provideXmlBoolean = ((provideXml != void) && (provideXml != null) && Boolean.valueOf(provideXml));\n\nif ((params == void) || (params == null)) {\n   params = new ArrayList();\n}\n\nif ((sql == void) || (sql == null) || sql.equals(\"\")) {\n\tthrow new RuntimeException(\"The sql must be specified\");\n}\n\nClass c = Thread.currentThread().getContextClassLoader().loadClass(driver);\n\nif (c == null) {\n\t
 throw new RuntimeException(\"Class \" + driver + \" not found\");\n}\n\nDriver d = c.newInstance();\nif (d == null) {\n\tthrow new RuntimeException(\"Could not create instance of driver\");\n}\n\nProperties p = new Properties();\n\nif ((userid == void) || (userid == null)) {\n\tuserid = \"\";\n}\n\np.setProperty(\"user\", userid);\n\nif ((password == void) || (password == null)) {\n\tpassword = \"\";\n}\n\np.setProperty(\"password\", password);\n\nConnection con = null;\nPreparedStatement ps = null;\nResultSet rs = null;\ntry {\n\n\tcon = d.connect(url, p);\n\tps = con.prepareStatement(sql);\n\n\tint paramSize = params.size();\n\tfor (int i = 0; i < paramSize; i++) {\n\t\tps.setObject(i + 1, params.get(i));\n\t}\n\n\trs = ps.executeQuery();\n\n\tif (provideXmlBoolean) {\n\t\tWebRowSet webrs = new WebRowSetImpl();\n\t\tStringWriter sw = new StringWriter();\n\t\twebrs.writeXml(rs, sw);\n\t\txmlresults = sw.toString();\n\t} else {\n\t\txmlresults = \"\";\n\t}\n\n\ttry {\n\t\trs.beforeF
 irst();\n\t} catch (SQLException e) {\n\t\t// redo the query\n\t\trs = ps.executeQuery();\n\t}\n\n\tResultSetMetaData rsmd = rs.getMetaData();\n\tint numCols = rsmd.getColumnCount();\n\tresultList = new ArrayList();\n\t\n\t// put the results into the results list.\n\twhile (rs.next()) {\n\t\tList row = new ArrayList(numCols);\n\t\tfor (int i = 0; i < numCols; i++) {\n\t\t\tString str = rs.getString(i + 1); \n\t\t\trow.add(str == null ? \"null\" : str); \n\t\t}\n\t\tresultList.add(row);\n\t}\n}\nfinally {\n\tif (rs != null) {\n\t\trs.close();\n\t}\n\tif (ps != null) {\n\t\tps.close();\n\t}\n\tif (con != null) {\n\t\tcon.close();\n\t}\n}\n  \n\n ",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.jdbc.SQLQueryWorker",
-  "inputPorts" : [ {
-    "name" : "driver",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "password",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "userid",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "url",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "provideXml",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "sql",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "params",
-    "depth" : 1,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "resultList",
-    "depth" : 2,
-    "granularDepth" : 2
-  }, {
-    "name" : "xmlresults",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker
deleted file mode 100644
index fa0748c..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker
+++ /dev/null
@@ -1,229 +0,0 @@
-<activity  xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap><map from="password" to="password" /><map from="userid" to="userid" /><map from="params" to="params" /><map from="url" to="url" /><map from="provideXml" to="provideXml" /><map from="driver" to="driver" /><map from="sql" to="sql" /></inputMap><outputMap><map from="resultList" to="resultList" /><map from="xmlresults" to="xmlresults" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-
-  <script>import java.sql.Driver;
-import java.sql.DriverManager;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-
-if ((driver == void) || (driver == null) || driver.equals("")) {
-	throw new RuntimeException("The driver must be specified");
-}
-
-if ((url == void) || (url == null) || url.equals("")) {
-	throw new RuntimeException("The url must be specified");
-}
-
-if ((params == void) || (params == null)) {
-   params = new ArrayList();
-}
-
-if ((sql == void) || (sql == null) || sql.equals("")) {
-	throw new RuntimeException("The sql must be specified");
-}
-
-Class c = Thread.currentThread().getContextClassLoader().loadClass(driver);
-
-if (c == null) {
-	throw new RuntimeException("Class " + driver + " not found");
-}
-
-Driver d = c.newInstance();
-if (d == null) {
-	throw new RuntimeException("Could not create instance of driver");
-}
-
-Properties p = new Properties();
-
-if ((userid == void) || (userid == null)) {
-	userid = "";
-}
-
-p.setProperty("user", userid);
-
-if ((password == void) || (password == null)) {
-	password = "";
-}
-
-p.setProperty("password", password);
-
-Connection con = null;
-PreparedStatement ps = null;
-
-try {
-	con = d.connect(url, p);
-	ps = con.prepareStatement(sql);
-
-	int paramsSize = params.size();
-	for (int i = 0; i &lt; paramsSize; i++) {
-		ps.setObject(i + 1, params.get(i));
-	}
-
-	ps.executeUpdate();
-
-	resultList = "update successful";
-}
-finally {
-	if (ps != null) {
-		ps.close();
-	}
-	if (con != null) {
-		con.close();
-	}
-}
-
-</script>
-
-  <dependencies />
-
-  <classLoaderSharing>system</classLoaderSharing>
-    <localDependencies />
-
-  <artifactDependencies />
-
-  <inputs>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-      <handledReferenceSchemes />
-
-      <translatedElementType>java.lang.String</translatedElementType>
-
-      <allowsLiteralValues>true</allowsLiteralValues>
-
-      <name>driver</name>
-
-      <depth>0</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-      <handledReferenceSchemes />
-
-      <translatedElementType>java.lang.String</translatedElementType>
-
-      <allowsLiteralValues>true</allowsLiteralValues>
-
-      <name>password</name>
-
-      <depth>0</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-      <handledReferenceSchemes />
-
-      <translatedElementType>java.lang.String</translatedElementType>
-
-      <allowsLiteralValues>true</allowsLiteralValues>
-
-      <name>userid</name>
-
-      <depth>0</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-      <handledReferenceSchemes />
-
-      <translatedElementType>java.lang.String</translatedElementType>
-
-      <allowsLiteralValues>true</allowsLiteralValues>
-
-      <name>url</name>
-
-      <depth>0</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-      <handledReferenceSchemes />
-
-      <translatedElementType>java.lang.String</translatedElementType>
-
-      <allowsLiteralValues>true</allowsLiteralValues>
-
-      <name>sql</name>
-
-      <depth>0</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-      <handledReferenceSchemes />
-
-      <translatedElementType>java.lang.String</translatedElementType>
-
-      <allowsLiteralValues>true</allowsLiteralValues>
-
-      <name>params</name>
-
-      <depth>1</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-
-  </inputs>
-
-  <outputs>
-
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-
-      <granularDepth>0</granularDepth>
-
-      <name>resultList</name>
-
-      <depth>0</depth>
-
-      <mimeTypes>
-
-        <string>text/plain</string>
-
-      </mimeTypes>
-
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-
-  </outputs>
-
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean><annotations /></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker.json
deleted file mode 100644
index 3144afd..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "import java.sql.Driver;\nimport java.sql.DriverManager;\nimport java.sql.Connection;\nimport java.sql.PreparedStatement;\n\nif ((driver == void) || (driver == null) || driver.equals(\"\")) {\n\tthrow new RuntimeException(\"The driver must be specified\");\n}\n\nif ((url == void) || (url == null) || url.equals(\"\")) {\n\tthrow new RuntimeException(\"The url must be specified\");\n}\n\nif ((params == void) || (params == null)) {\n   params = new ArrayList();\n}\n\nif ((sql == void) || (sql == null) || sql.equals(\"\")) {\n\tthrow new RuntimeException(\"The sql must be specified\");\n}\n\nClass c = Thread.currentThread().getContextClassLoader().loadClass(driver);\n\nif (c == null) {\n\tthrow new RuntimeException(\"Class \" + driver + \" not found\");\n}\n\nDriver d = c.newInstance();\nif (d == null) {\n\tthrow new RuntimeException(\"Could not create instance of driver\");\n}\n\nProperties p = new Properties();\n\nif ((userid == void) || (userid == null)) {\n\tuserid = \"
 \";\n}\n\np.setProperty(\"user\", userid);\n\nif ((password == void) || (password == null)) {\n\tpassword = \"\";\n}\n\np.setProperty(\"password\", password);\n\nConnection con = null;\nPreparedStatement ps = null;\n\ntry {\n\tcon = d.connect(url, p);\n\tps = con.prepareStatement(sql);\n\n\tint paramsSize = params.size();\n\tfor (int i = 0; i < paramsSize; i++) {\n\t\tps.setObject(i + 1, params.get(i));\n\t}\n\n\tps.executeUpdate();\n\n\tresultList = \"update successful\";\n}\nfinally {\n\tif (ps != null) {\n\t\tps.close();\n\t}\n\tif (con != null) {\n\t\tcon.close();\n\t}\n}\n\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.jdbc.SQLUpdateWorker",
-  "inputPorts" : [ {
-    "name" : "driver",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "password",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "userid",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "url",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "sql",
-    "depth" : 0,
-    "type" : "String"
-  }, {
-    "name" : "params",
-    "depth" : 1,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "resultList",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker
deleted file mode 100644
index 8b7a680..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker
+++ /dev/null
@@ -1,45 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>if ((id == void) || (id == null) || id.equals("")) {
-	throw new RunTimeException("port id must have a non-empty value");
-}
-
-URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&amp;db=nucleotide&amp;retmode=text&amp;id=" + id);
-
-BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
-StringWriter writer = new StringWriter();
-
-char[] buffer = new char[1024];
-    while (true) {
-        int r = reader.read(buffer);
-        if (r &lt;= 0) {
-            break;
-        }
-        writer.write(buffer, 0, r);
-    }
-reader.close();
-outputText = writer.toString();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>id</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>outputText</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker.json
deleted file mode 100644
index feb26cc..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&db=nucleotide&retmode=text&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.NucleotideFastaWorker",
-  "inputPorts" : [ {
-    "name" : "id",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputText",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker
deleted file mode 100644
index 80f791a..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker
+++ /dev/null
@@ -1,45 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>if ((id == void) || (id == null) || id.equals("")) {
-	throw new RunTimeException("port id must have a non-empty value");
-}
-
-URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gb&amp;db=nucleotide&amp;retmode=xml&amp;id=" + id);
-
-BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
-StringWriter writer = new StringWriter();
-
-char[] buffer = new char[1024];
-    while (true) {
-        int r = reader.read(buffer);
-        if (r &lt;= 0) {
-            break;
-        }
-        writer.write(buffer, 0, r);
-    }
-reader.close();
-outputText = writer.toString();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>id</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>outputText</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker.json
deleted file mode 100644
index e616f51..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gb&db=nucleotide&retmode=xml&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.NucleotideGBSeqWorker",
-  "inputPorts" : [ {
-    "name" : "id",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputText",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker
deleted file mode 100644
index 2ce601b..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker
+++ /dev/null
@@ -1,45 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>if ((id == void) || (id == null) || id.equals("")) {
-	throw new RunTimeException("port id must have a non-empty value");
-}
-
-URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gbc&amp;db=nucleotide&amp;retmode=xml&amp;id=" + id);
-
-BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
-StringWriter writer = new StringWriter();
-
-char[] buffer = new char[1024];
-    while (true) {
-        int r = reader.read(buffer);
-        if (r &lt;= 0) {
-            break;
-        }
-        writer.write(buffer, 0, r);
-    }
-reader.close();
-outputText = writer.toString();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>id</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>outputText</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker.json
deleted file mode 100644
index 8dfbdbe..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gbc&db=nucleotide&retmode=xml&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.NucleotideINSDSeqXMLWorker",
-  "inputPorts" : [ {
-    "name" : "id",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputText",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker
deleted file mode 100644
index aad694a..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker
+++ /dev/null
@@ -1,45 +0,0 @@
-<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>if ((id == void) || (id == null) || id.equals("")) {
-	throw new RunTimeException("port id must have a non-empty value");
-}
-
-URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&amp;db=nucleotide&amp;retmode=xml&amp;id=" + id);
-
-BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
-StringWriter writer = new StringWriter();
-
-char[] buffer = new char[1024];
-    while (true) {
-        int r = reader.read(buffer);
-        if (r &lt;= 0) {
-            break;
-        }
-        writer.write(buffer, 0, r);
-    }
-reader.close();
-outputText = writer.toString();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>id</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>outputText</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker.json
deleted file mode 100644
index 3867455..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&db=nucleotide&retmode=xml&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.NucleotideTinySeqXMLWorker",
-  "inputPorts" : [ {
-    "name" : "id",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputText",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker
deleted file mode 100644
index c07b04e..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker
+++ /dev/null
@@ -1,45 +0,0 @@
-<activity  xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>if ((id == void) || (id == null) || id.equals("")) {
-	throw new RunTimeException("port id must have a non-empty value");
-}
-
-URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&amp;db=protein&amp;retmode=text&amp;id=" + id);
-
-BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
-StringWriter writer = new StringWriter();
-
-char[] buffer = new char[1024];
-    while (true) {
-        int r = reader.read(buffer);
-        if (r &lt;= 0) {
-            break;
-        }
-        writer.write(buffer, 0, r);
-    }
-reader.close();
-outputText = writer.toString();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>id</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>outputText</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker.json
deleted file mode 100644
index fc5b181..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=fasta&db=protein&retmode=text&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.ProteinFastaWorker",
-  "inputPorts" : [ {
-    "name" : "id",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputText",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker
deleted file mode 100644
index bf85c2b..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker
+++ /dev/null
@@ -1,45 +0,0 @@
-<activity  xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
-  <script>if ((id == void) || (id == null) || id.equals("")) {
-	throw new RunTimeException("port id must have a non-empty value");
-}
-
-URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gb&amp;db=protein&amp;retmode=xml&amp;id=" + id);
-
-BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
-StringWriter writer = new StringWriter();
-
-char[] buffer = new char[1024];
-    while (true) {
-        int r = reader.read(buffer);
-        if (r &lt;= 0) {
-            break;
-        }
-        writer.write(buffer, 0, r);
-    }
-reader.close();
-outputText = writer.toString();
-</script>
-  <dependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>id</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>outputText</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>'text/plain'</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/d157489f/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker.json
----------------------------------------------------------------------
diff --git a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker.json b/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker.json
deleted file mode 100644
index 160ce92..0000000
--- a/src/main/resources/net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "classLoaderSharing" : "workflow",
-  "script" : "if ((id == void) || (id == null) || id.equals(\"\")) {\n\tthrow new RunTimeException(\"port id must have a non-empty value\");\n}\n\nURL url = new URL (\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gb&db=protein&retmode=xml&id=\" + id);\n\nBufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));\nStringWriter writer = new StringWriter();\n\nchar[] buffer = new char[1024];\n    while (true) {\n        int r = reader.read(buffer);\n        if (r <= 0) {\n            break;\n        }\n        writer.write(buffer, 0, r);\n    }\nreader.close();\noutputText = writer.toString();\n",
-  "localworkerName" : "net.sourceforge.taverna.scuflworkers.ncbi.ProteinGBSeqWorker",
-  "inputPorts" : [ {
-    "name" : "id",
-    "depth" : 0,
-    "type" : "String"
-  } ],
-  "outputPorts" : [ {
-    "name" : "outputText",
-    "depth" : 0,
-    "granularDepth" : 0
-  } ],
-  "isAltered" : false
-}
\ No newline at end of file


[42/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-wsdl-activity-ui/

Posted by st...@apache.org.
taverna-wsdl-activity-ui/


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/440bbd62
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/440bbd62
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/440bbd62

Branch: refs/heads/master
Commit: 440bbd6255b084c3beac1402b91b28da6171279f
Parents: d0f11e5
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:27:31 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:27:31 2015 +0000

----------------------------------------------------------------------
 .gitignore                                      |   24 -
 .travis.yml                                     |    1 -
 README.md                                       |    5 -
 pom.xml                                         |   95 -
 .../actions/AbstractAddXMLSplitterAction.java   |  156 --
 .../wsdl/actions/AddXMLInputSplitterAction.java |  104 -
 .../actions/AddXMLOutputSplitterAction.java     |  105 -
 .../wsdl/actions/AddXMLSplitterEdit.java        |  315 ---
 .../actions/WSDLActivityConfigureAction.java    |   71 -
 .../wsdl/actions/XMLSplitterPortBuilder.java    |  127 --
 ...LInputSplitterForWSDLActivityMenuAction.java |   11 -
 ...utSplitterForXMLInputSplitterMenuAction.java |   11 -
 .../menu/AddXMLInputSplitterMenuAction.java     |   70 -
 ...OutputSplitterForWSDLActivityMenuAction.java |   11 -
 ...tSplitterForXMLOutputSplitterMenuAction.java |   11 -
 .../menu/AddXMLOutputSplitterMenuAction.java    |   66 -
 .../wsdl/menu/ConfigureWSDLMenuAction.java      |   78 -
 .../AddWSDLServiceDialog.java                   |  303 ---
 .../ConfirmTrustedCertificateDialog.java        |  586 ------
 .../servicedescriptions/WSDLActivityIcon.java   |   60 -
 .../WSDLServiceDescription.java                 |  154 --
 .../WSDLServiceProvider.java                    |  206 --
 .../WSDLServiceProviderConfig.java              |   32 -
 .../XMLInputSplitterActivityIcon.java           |   63 -
 .../XMLOutputSplitterActivityIcon.java          |   64 -
 .../views/AbstractXMLSplitterActionView.java    |  159 --
 .../views/WSDLActivityConfigurationView.java    |  446 -----
 .../wsdl/views/WSDLActivityContextualView.java  |  108 -
 .../wsdl/views/WSDLActivityViewFactory.java     |   88 -
 .../wsdl/views/XMLSplitterContextualView.java   |   78 -
 .../wsdl/views/XMLSplitterViewFactory.java      |   66 -
 ...rvicedescriptions.ServiceDescriptionProvider |    1 -
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |    5 -
 ...a.t2.workbench.activityicons.ActivityIconSPI |    3 -
 ...ntextualviews.activity.ContextualViewFactory |    2 -
 .../spring/wsdl-activity-ui-context-osgi.xml    |   37 -
 .../spring/wsdl-activity-ui-context.xml         |   53 -
 src/main/resources/wsdl.png                     |  Bin 748 -> 0 bytes
 src/main/resources/xml-input-splitter.png       |  Bin 309 -> 0 bytes
 src/main/resources/xml-output-splitter.png      |  Bin 298 -> 0 bytes
 src/main/resources/xml-splitter.png             |  Bin 327 -> 0 bytes
 .../views/TestWSDLActivityContextualView.java   |   53 -
 src/test/resources/GMService.wsdl               |   68 -
 src/test/resources/kegg.wsdl                    | 1889 ------------------
 taverna-wsdl-activity-ui/pom.xml                |   95 +
 .../actions/AbstractAddXMLSplitterAction.java   |  156 ++
 .../wsdl/actions/AddXMLInputSplitterAction.java |  104 +
 .../actions/AddXMLOutputSplitterAction.java     |  105 +
 .../wsdl/actions/AddXMLSplitterEdit.java        |  315 +++
 .../actions/WSDLActivityConfigureAction.java    |   71 +
 .../wsdl/actions/XMLSplitterPortBuilder.java    |  127 ++
 ...LInputSplitterForWSDLActivityMenuAction.java |   11 +
 ...utSplitterForXMLInputSplitterMenuAction.java |   11 +
 .../menu/AddXMLInputSplitterMenuAction.java     |   70 +
 ...OutputSplitterForWSDLActivityMenuAction.java |   11 +
 ...tSplitterForXMLOutputSplitterMenuAction.java |   11 +
 .../menu/AddXMLOutputSplitterMenuAction.java    |   66 +
 .../wsdl/menu/ConfigureWSDLMenuAction.java      |   78 +
 .../AddWSDLServiceDialog.java                   |  303 +++
 .../ConfirmTrustedCertificateDialog.java        |  586 ++++++
 .../servicedescriptions/WSDLActivityIcon.java   |   60 +
 .../WSDLServiceDescription.java                 |  154 ++
 .../WSDLServiceProvider.java                    |  206 ++
 .../WSDLServiceProviderConfig.java              |   32 +
 .../XMLInputSplitterActivityIcon.java           |   63 +
 .../XMLOutputSplitterActivityIcon.java          |   64 +
 .../views/AbstractXMLSplitterActionView.java    |  159 ++
 .../views/WSDLActivityConfigurationView.java    |  446 +++++
 .../wsdl/views/WSDLActivityContextualView.java  |  108 +
 .../wsdl/views/WSDLActivityViewFactory.java     |   88 +
 .../wsdl/views/XMLSplitterContextualView.java   |   78 +
 .../wsdl/views/XMLSplitterViewFactory.java      |   66 +
 ...rvicedescriptions.ServiceDescriptionProvider |    1 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |    5 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |    3 +
 ...ntextualviews.activity.ContextualViewFactory |    2 +
 .../spring/wsdl-activity-ui-context-osgi.xml    |   37 +
 .../spring/wsdl-activity-ui-context.xml         |   53 +
 .../src/main/resources/wsdl.png                 |  Bin 0 -> 748 bytes
 .../src/main/resources/xml-input-splitter.png   |  Bin 0 -> 309 bytes
 .../src/main/resources/xml-output-splitter.png  |  Bin 0 -> 298 bytes
 .../src/main/resources/xml-splitter.png         |  Bin 0 -> 327 bytes
 .../views/TestWSDLActivityContextualView.java   |   53 +
 .../src/test/resources/GMService.wsdl           |   68 +
 .../src/test/resources/kegg.wsdl                | 1889 ++++++++++++++++++
 85 files changed, 5755 insertions(+), 5785 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index ebe0e5b..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# ignore project files #
-.classpath
-.project
-.settings/
-catalog-v001.xml
-
-# ignore target files #
-target/
-bin/
-build/
-dist/
-apidoc/
-*.swp
-
-# ignore svn files if there
-.svn
-
-# ignore log files #
-*.log
-/logs/*
-*/logs/*
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index dff5f3a..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1 +0,0 @@
-language: java

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
deleted file mode 100644
index 4f5af42..0000000
--- a/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Taverna Workflow system WSDL Activity: User Interface part for use in the Taverna Workbench.
-
-Extends https://github.com/taverna/taverna-wsdl-activity
-
-This code was previously hosted at http://taverna.googlecode.com/svn/taverna/ui/net.sf.taverna.t2.ui-activities/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index be2d224..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>net.sf.taverna</groupId>
-		<artifactId>taverna-parent</artifactId>
-		<version>3.0.1-SNAPSHOT</version>
-	</parent>
-	<groupId>net.sf.taverna.t2.ui-activities</groupId>
-	<artifactId>wsdl-activity-ui</artifactId>
-        <version>2.0-SNAPSHOT</version>
-	<packaging>bundle</packaging>
-	<name>Taverna 2 WSDL Activity UI</name>
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.felix</groupId>
-				<artifactId>maven-bundle-plugin</artifactId>
-				<extensions>true</extensions>
-				<configuration>
-					<instructions>
-						<!-- Use the java version instead of xmlcommons for javax.* packages -->
-						<Import-Package>javax.xml.namespace;version="0.0.0",javax.xml.parsers;version="0.0.0",org.w3c.dom;version="0.0.0",org.xml.sax;version="0.0.0",*</Import-Package>
-					</instructions>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
-	<dependencies>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-icons-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-palette-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.activities</groupId>
-			<artifactId>wsdl-activity</artifactId>
-			<version>${t2.activities.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-components</groupId>
-			<artifactId>credential-manager-ui</artifactId>
-			<version>${t2.ui.components.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>contextual-views-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-tools</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.lang</groupId>
-			<artifactId>ui</artifactId>
-			<version>${t2.lang.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>${junit.version}</version>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-	<repositories>
-		<repository>
-			<releases />
-			<snapshots>
-				<enabled>false</enabled>
-			</snapshots>
-			<id>mygrid-repository</id>
-			<name>myGrid Repository</name>
-			<url>http://www.mygrid.org.uk/maven/repository
-			</url>
-		</repository>
-		<repository>
-			<releases>
-				<enabled>false</enabled>
-			</releases>
-			<snapshots />
-			<id>mygrid-snapshot-repository</id>
-			<name>myGrid Snapshot Repository</name>
-			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
-		</repository>
-	</repositories>
-</project>
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AbstractAddXMLSplitterAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AbstractAddXMLSplitterAction.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AbstractAddXMLSplitterAction.java
deleted file mode 100644
index d92dab9..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AbstractAddXMLSplitterAction.java
+++ /dev/null
@@ -1,156 +0,0 @@
-package net.sf.taverna.t2.activities.wsdl.actions;
-/*******************************************************************************
- * Copyright (C) 2008 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-
-import java.awt.event.ActionEvent;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.swing.AbstractAction;
-import javax.swing.JComponent;
-import javax.swing.JOptionPane;
-import javax.wsdl.WSDLException;
-import javax.xml.parsers.ParserConfigurationException;
-
-import net.sf.taverna.t2.workbench.edits.EditException;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.wsdl.parser.ArrayTypeDescriptor;
-import net.sf.taverna.wsdl.parser.ComplexTypeDescriptor;
-import net.sf.taverna.wsdl.parser.TypeDescriptor;
-import net.sf.taverna.wsdl.parser.UnknownOperationException;
-
-import org.apache.log4j.Logger;
-import org.jdom.JDOMException;
-import org.xml.sax.SAXException;
-
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.common.Scufl2Tools;
-import uk.org.taverna.scufl2.api.core.Workflow;
-import uk.org.taverna.scufl2.api.profiles.Profile;
-
-/**
- * Abstract superclass of {@link AddXMLOutputSplitterAction} and
- * {@link AddXMLInputSplitterAction}.
- * <p>
- * Pops up a {@link JOptionPane} with the names of all the wsdl ports. The one
- * that is selected is added as an input/output splitter to the currently open
- * dataflow using the {@link AddXMLSplitterEdit}
- *
- * @author Ian Dunlop
- * @author Stian Soiland-Reyes
- * @author Stuart Owen
- *
- */
-@SuppressWarnings("serial")
-public abstract class AbstractAddXMLSplitterAction extends AbstractAction {
-
-	private static Logger logger = Logger.getLogger(AddXMLOutputSplitterAction.class);
-
-	protected Scufl2Tools scufl2Tools = new Scufl2Tools();
-
-	protected JComponent owner;
-	protected final Activity activity;
-	protected final EditManager editManager;
-	protected final SelectionManager selectionManager;
-
-	public AbstractAddXMLSplitterAction(Activity activity,
-			JComponent owner, EditManager editManager, SelectionManager selectionManager) {
-		this.activity = activity;
-		this.owner = owner;
-		this.editManager = editManager;
-		this.selectionManager = selectionManager;
-	}
-
-	public void actionPerformed(ActionEvent ev) {
-		List<String> possibilities;
-		Map<String, TypeDescriptor> typeDescriptors;
-		try {
-			typeDescriptors = getTypeDescriptors();
-		} catch (UnknownOperationException ex) {
-			logger.error("Can't find operation for activity "
-					+ activity, ex);
-			return;
-		} catch (IOException | ParserConfigurationException | WSDLException | SAXException | JDOMException ex) {
-			logger.error("Can't read definition for activity "
-					+ activity, ex);
-			return;
-		}
-
-		typeDescriptors = filterDescriptors(typeDescriptors);
-
-		possibilities = new ArrayList<String>(typeDescriptors.keySet());
-		if (possibilities.isEmpty()) {
-			logger.warn("No type descriptors found for activity " + activity);
-			return;
-		}
-		Collections.sort(possibilities);
-
-		String portName = (String) JOptionPane.showInputDialog(owner,
-				"Select the port to add the splitter to",
-				"Add output XML splitter", JOptionPane.PLAIN_MESSAGE, null,
-				possibilities.toArray(), possibilities.get(0));
-
-		Workflow workflow = selectionManager.getSelectedWorkflow();
-		Profile profile = selectionManager.getSelectedProfile();
-		TypeDescriptor typeDescriptorForPort = typeDescriptors
-				.get(portName);
-
-		if (typeDescriptorForPort instanceof ArrayTypeDescriptor
-				|| typeDescriptorForPort instanceof ComplexTypeDescriptor) {
-			AddXMLSplitterEdit edit = new AddXMLSplitterEdit(workflow, profile,
-					activity, typeDescriptorForPort, portName, isInput());
-			try {
-				editManager.doDataflowEdit(workflow.getParent(), edit);
-			} catch (EditException ex) {
-				logger.error("Could not perform edit to add " + portName, ex);
-			}
-		} else {
-			logger.warn("Unknown typedescriptor for " + portName);
-		}
-	}
-
-	public static Map<String, TypeDescriptor> filterDescriptors(
-			Map<String, TypeDescriptor> descriptors) {
-		Map<String, TypeDescriptor> filtered = new HashMap<String, TypeDescriptor>();
-		for (Entry<String, TypeDescriptor> entry : descriptors.entrySet()) {
-			TypeDescriptor descriptor = entry.getValue();
-			if (descriptor.getMimeType().contains("'text/xml'")) {
-				filtered.put(entry.getKey(), descriptor);
-			}
-		}
-		return filtered;
-	}
-
-	protected abstract boolean isInput();
-
-	public abstract Map<String, TypeDescriptor> getTypeDescriptors()
-			throws UnknownOperationException, IOException, ParserConfigurationException, WSDLException, SAXException, JDOMException;
-
-	public void setOwner(JComponent owner) {
-		this.owner = owner;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLInputSplitterAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLInputSplitterAction.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLInputSplitterAction.java
deleted file mode 100644
index 6faee9d..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLInputSplitterAction.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2008 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.actions;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.swing.JComponent;
-import javax.swing.JOptionPane;
-import javax.wsdl.WSDLException;
-import javax.xml.parsers.ParserConfigurationException;
-
-import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
-import net.sf.taverna.t2.activities.wsdl.xmlsplitter.AddXMLSplitterEdit;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.wsdl.parser.ArrayTypeDescriptor;
-import net.sf.taverna.wsdl.parser.ComplexTypeDescriptor;
-import net.sf.taverna.wsdl.parser.TypeDescriptor;
-import net.sf.taverna.wsdl.parser.UnknownOperationException;
-import net.sf.taverna.wsdl.parser.WSDLParser;
-import net.sf.taverna.wsdl.xmlsplitter.XMLSplitterSerialisationHelper;
-
-import org.jdom.Element;
-import org.jdom.JDOMException;
-import org.jdom.input.SAXBuilder;
-import org.xml.sax.SAXException;
-
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-
-/**
- * Pops up a {@link JOptionPane} with the names of all the wsdl ports. The one
- * that is selected is added as an input splitter to the currently open dataflow
- * using the {@link AddXMLSplitterEdit}
- *
- * @author Ian Dunlop
- * @author Stian Soiland-Reyes
- */
-@SuppressWarnings("serial")
-public class AddXMLInputSplitterAction extends AbstractAddXMLSplitterAction {
-
-	public AddXMLInputSplitterAction(Activity activity, JComponent owner, EditManager editManager,
-			SelectionManager selectionManager) {
-		super(activity, owner, editManager, selectionManager);
-		putValue(NAME, "Add input XML splitter");
-	}
-
-	@Override
-	public Map<String, TypeDescriptor> getTypeDescriptors() throws UnknownOperationException, IOException, ParserConfigurationException, WSDLException, SAXException, JDOMException {
-		Map<String, TypeDescriptor> descriptors = new HashMap<String, TypeDescriptor>();
-		Configuration configuration = scufl2Tools.configurationFor(activity, selectionManager.getSelectedProfile());
-		if (activity.getType().equals(WSDLServiceDescription.ACTIVITY_TYPE)) {
-			String wsdlLocation = configuration.getJson().get("operation").get("wsdl").textValue();
-			String operationName = configuration.getJson().get("operation").get("name").textValue();
-			List<TypeDescriptor> inputDescriptors = new WSDLParser(wsdlLocation)
-					.getOperationInputParameters(operationName);
-			for (TypeDescriptor descriptor : inputDescriptors) {
-				descriptors.put(descriptor.getName(), descriptor);
-			}
-		} else if (activity.getType().equals(WSDLServiceDescription.INPUT_SPLITTER_TYPE)) {
-			String wrappedType = configuration.getJson().get("wrappedType").textValue();
-			Element element = new SAXBuilder().build(new StringReader(wrappedType)).getRootElement();
-			TypeDescriptor typeDescriptor = XMLSplitterSerialisationHelper.extensionXMLToTypeDescriptor(element);
-			if (typeDescriptor instanceof ComplexTypeDescriptor) {
-				for (TypeDescriptor desc : ((ComplexTypeDescriptor)typeDescriptor).getElements()) {
-					descriptors.put(desc.getName(), desc);
-				}
-			}
-			else if (typeDescriptor instanceof ArrayTypeDescriptor) {
-				TypeDescriptor desc = ((ArrayTypeDescriptor)typeDescriptor).getElementType();
-				descriptors.put(typeDescriptor.getName(), desc);
-			}
-		}
-		return descriptors;
-	}
-
-	@Override
-	protected boolean isInput() {
-		return true;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLOutputSplitterAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLOutputSplitterAction.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLOutputSplitterAction.java
deleted file mode 100644
index 60cba69..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLOutputSplitterAction.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2008 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.actions;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.swing.JComponent;
-import javax.swing.JOptionPane;
-import javax.wsdl.WSDLException;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.jdom.Element;
-import org.jdom.JDOMException;
-import org.jdom.input.SAXBuilder;
-import org.xml.sax.SAXException;
-
-import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
-import net.sf.taverna.t2.activities.wsdl.xmlsplitter.AddXMLSplitterEdit;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.wsdl.parser.ArrayTypeDescriptor;
-import net.sf.taverna.wsdl.parser.ComplexTypeDescriptor;
-import net.sf.taverna.wsdl.parser.TypeDescriptor;
-import net.sf.taverna.wsdl.parser.UnknownOperationException;
-import net.sf.taverna.wsdl.parser.WSDLParser;
-import net.sf.taverna.wsdl.xmlsplitter.XMLSplitterSerialisationHelper;
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-
-/**
- * Pops up a {@link JOptionPane} with the names of all the wsdl ports. The one
- * that is selected is added as an output splitter to the currently open
- * dataflow using the {@link AddXMLSplitterEdit}
- *
- * @author Ian Dunlop
- * @author Stian Soiland-Reyes
- */
-@SuppressWarnings("serial")
-public class AddXMLOutputSplitterAction extends AbstractAddXMLSplitterAction {
-
-	public AddXMLOutputSplitterAction(Activity activity, JComponent owner, EditManager editManager,
-			SelectionManager selectionManager) {
-		super(activity, owner, editManager, selectionManager);
-		putValue(NAME, "Add output XML splitter");
-
-	}
-
-	@Override
-	public Map<String, TypeDescriptor> getTypeDescriptors() throws UnknownOperationException, IOException, ParserConfigurationException, WSDLException, SAXException, JDOMException {
-		Map<String, TypeDescriptor> descriptors = new HashMap<String, TypeDescriptor>();
-		Configuration configuration = scufl2Tools.configurationFor(activity, selectionManager.getSelectedProfile());
-		if (activity.getType().equals(WSDLServiceDescription.ACTIVITY_TYPE)) {
-			String wsdlLocation = configuration.getJson().get("operation").get("wsdl").textValue();
-			String operationName = configuration.getJson().get("operation").get("name").textValue();
-			List<TypeDescriptor> inputDescriptors = new WSDLParser(wsdlLocation)
-					.getOperationOutputParameters(operationName);
-			for (TypeDescriptor descriptor : inputDescriptors) {
-				descriptors.put(descriptor.getName(), descriptor);
-			}
-		} else if (activity.getType().equals(WSDLServiceDescription.OUTPUT_SPLITTER_TYPE)) {
-			String wrappedType = configuration.getJson().get("wrappedType").textValue();
-			Element element = new SAXBuilder().build(new StringReader(wrappedType)).getRootElement();
-			TypeDescriptor typeDescriptor = XMLSplitterSerialisationHelper.extensionXMLToTypeDescriptor(element);
-			if (typeDescriptor instanceof ComplexTypeDescriptor) {
-				for (TypeDescriptor desc : ((ComplexTypeDescriptor) typeDescriptor)
-						.getElements()) {
-					descriptors.put(desc.getName(), desc);
-				}
-			}
-			else if (typeDescriptor instanceof ArrayTypeDescriptor) {
-				TypeDescriptor desc = ((ArrayTypeDescriptor)typeDescriptor).getElementType();
-				descriptors.put(typeDescriptor.getName(), desc);
-			}
-		}
-		return descriptors;
-	}
-
-	@Override
-	protected boolean isInput() {
-		return false;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLSplitterEdit.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLSplitterEdit.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLSplitterEdit.java
deleted file mode 100644
index 484feac..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/AddXMLSplitterEdit.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.actions;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
-import net.sf.taverna.t2.activities.wsdl.xmlsplitter.XMLSplitterConfigurationBeanBuilder;
-import net.sf.taverna.t2.workbench.edits.CompoundEdit;
-import net.sf.taverna.t2.workbench.edits.Edit;
-import net.sf.taverna.t2.workbench.edits.EditException;
-import net.sf.taverna.t2.workflow.edits.AddChildEdit;
-import net.sf.taverna.t2.workflow.edits.AddDataLinkEdit;
-import net.sf.taverna.t2.workflow.edits.AddProcessorEdit;
-import net.sf.taverna.wsdl.parser.ArrayTypeDescriptor;
-import net.sf.taverna.wsdl.parser.TypeDescriptor;
-import net.sf.taverna.wsdl.xmlsplitter.XMLSplitterSerialisationHelper;
-
-import org.jdom.Element;
-
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.common.Scufl2Tools;
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-import uk.org.taverna.scufl2.api.core.DataLink;
-import uk.org.taverna.scufl2.api.core.Processor;
-import uk.org.taverna.scufl2.api.core.Workflow;
-import uk.org.taverna.scufl2.api.iterationstrategy.CrossProduct;
-import uk.org.taverna.scufl2.api.port.InputProcessorPort;
-import uk.org.taverna.scufl2.api.port.OutputProcessorPort;
-import uk.org.taverna.scufl2.api.profiles.ProcessorBinding;
-import uk.org.taverna.scufl2.api.profiles.Profile;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-public class AddXMLSplitterEdit implements Edit<Workflow> {
-
-	public static final URI INPUT_SPLITTER_TYPE = URI
-			.create("http://ns.taverna.org.uk/2010/activity/xml-splitter/in");
-	public static final URI OUTPUT_SPLITTER_TYPE = URI
-			.create("http://ns.taverna.org.uk/2010/activity/xml-splitter/out");
-	public static final URI SPLITTER_CONFIG_TYPE = URI
-			.create("http://ns.taverna.org.uk/2010/activity/xml-splitter#Config");
-
-	private Scufl2Tools scufl2Tools = new Scufl2Tools();
-
-	private final Workflow workflow;
-	private final Profile profile;
-	private final Activity activity;
-	private TypeDescriptor typeDescriptor;
-	private final String portName;
-	private final boolean isInput;
-
-	private CompoundEdit compoundEdit1 = null;
-	private Edit<?> linkUpEdit;
-	private boolean applied = false;
-
-	public AddXMLSplitterEdit(Workflow workflow, Profile profile, Activity activity,
-			TypeDescriptor typeDescriptor, String portName, boolean isInput) {
-		this.workflow = workflow;
-		this.profile = profile;
-		this.activity = activity;
-		this.typeDescriptor = typeDescriptor;
-		this.portName = portName;
-		this.isInput = isInput;
-	}
-
-	@Override
-	public Workflow doEdit() throws EditException {
-		if (applied) {
-			throw new EditException("Edit has already been applied!");
-		}
-
-		Activity splitter = null;
-		Configuration splitterConfiguration = null;
-		String sourcePortName = "";
-		Processor sourceProcessor = null;
-
-		String sinkPortName = "";
-		Processor sinkProcessor = null;
-
-		Processor activityProcessor = null;
-		List<ProcessorBinding> processorBindingsToActivity = scufl2Tools
-				.processorBindingsToActivity(activity);
-		for (ProcessorBinding processorBinding : processorBindingsToActivity) {
-			activityProcessor = processorBinding.getBoundProcessor();
-			break;
-		}
-		if (activityProcessor == null) {
-			throw new EditException("Cannot find the processor that the activity belongs to");
-		}
-
-		String displayName = portName;
-		if (portName.equals("parameters")) {
-			displayName = isInput ? "input" : "output";
-		}
-		String processorName = activityProcessor.getName();
-		String candidateName;
-		if (displayName.startsWith(processorName)) {
-			// No need to make GetRequest_GetRequestResponse
-			candidateName = displayName;
-		} else {
-			// Combine with processor name
-			String displayProcessorName;
-			if (activity.getType().equals(INPUT_SPLITTER_TYPE)
-					|| activity.getType().equals(OUTPUT_SPLITTER_TYPE)) {
-				// For splitters on splitters - avoid adding up blah_bluh_blih_more_stuff
-				String[] processorNameSplit = processorName.replace("_input", "")
-						.replace("_output", "").split("_");
-				displayProcessorName = processorNameSplit[processorNameSplit.length - 1];
-			} else {
-				displayProcessorName = activityProcessor.getName();
-			}
-			candidateName = displayProcessorName + "_" + displayName;
-		}
-
-		Processor splitterProcessor = new Processor();
-		splitterProcessor.setName(candidateName);
-
-		CrossProduct crossProduct = new CrossProduct();
-		crossProduct.setParent(splitterProcessor.getIterationStrategyStack());
-
-		ProcessorBinding processorBinding = new ProcessorBinding();
-		processorBinding.setBoundProcessor(splitterProcessor);
-
-		try {
-			if (activity.getType().equals(INPUT_SPLITTER_TYPE)) {
-				if (!isInput) {
-					throw new EditException(
-							"Can only add an input splitter to another input splitter");
-				}
-				if (typeDescriptor instanceof ArrayTypeDescriptor
-						&& !((ArrayTypeDescriptor) typeDescriptor).isWrapped()) {
-					typeDescriptor = ((ArrayTypeDescriptor) typeDescriptor).getElementType();
-				}
-
-				Element element = XMLSplitterSerialisationHelper
-						.typeDescriptorToExtensionXML(typeDescriptor);
-//				String wrappedType = new XMLOutputter().outputString(element);
-
-				splitter = new Activity();
-				splitter.setType(INPUT_SPLITTER_TYPE);
-				splitterConfiguration = new Configuration();
-				splitterConfiguration.setType(SPLITTER_CONFIG_TYPE);
-				splitterConfiguration.setConfigures(splitter);
-//				((ObjectNode) splitterConfiguration.getJson()).put("wrappedType", wrappedType);
-
-				JsonNode bean = XMLSplitterConfigurationBeanBuilder.buildBeanForInput(element);
-				splitterConfiguration.setJson(bean);
-
-				XMLSplitterPortBuilder.addPortsForInput(element, splitter, splitterProcessor,
-						processorBinding);
-
-			} else if (activity.getType().equals(OUTPUT_SPLITTER_TYPE)) {
-				if (isInput) {
-					throw new EditException(
-							"Can only add an output splitter to another output splitter");
-				}
-				if (typeDescriptor instanceof ArrayTypeDescriptor
-						&& !((ArrayTypeDescriptor) typeDescriptor).isWrapped()) {
-					typeDescriptor = ((ArrayTypeDescriptor) typeDescriptor).getElementType();
-				}
-
-				Element element = XMLSplitterSerialisationHelper
-						.typeDescriptorToExtensionXML(typeDescriptor);
-//				String wrappedType = new XMLOutputter().outputString(element);
-
-				splitter = new Activity();
-				splitter.setType(OUTPUT_SPLITTER_TYPE);
-				splitterConfiguration = new Configuration();
-				splitterConfiguration.setType(SPLITTER_CONFIG_TYPE);
-				splitterConfiguration.setConfigures(splitter);
-//				((ObjectNode) splitterConfiguration.getJson()).put("wrappedType", wrappedType);
-
-				JsonNode bean = XMLSplitterConfigurationBeanBuilder.buildBeanForOutput(element);
-				splitterConfiguration.setJson(bean);
-
-				XMLSplitterPortBuilder.addPortsForOutput(element, splitter, splitterProcessor,
-						processorBinding);
-
-			} else if (activity.getType().equals(WSDLServiceDescription.ACTIVITY_TYPE)) {
-				if (isInput) {
-					Element element = XMLSplitterSerialisationHelper
-							.typeDescriptorToExtensionXML(typeDescriptor);
-//					String wrappedType = new XMLOutputter().outputString(element);
-
-					splitter = new Activity();
-					splitter.setType(WSDLServiceDescription.INPUT_SPLITTER_TYPE);
-					splitterConfiguration = new Configuration();
-					splitterConfiguration.setType(SPLITTER_CONFIG_TYPE);
-					splitterConfiguration.setConfigures(splitter);
-//					((ObjectNode) splitterConfiguration.getJson()).put("wrappedType", wrappedType);
-
-					JsonNode bean = XMLSplitterConfigurationBeanBuilder.buildBeanForInput(element);
-					splitterConfiguration.setJson(bean);
-
-					XMLSplitterPortBuilder.addPortsForInput(element, splitter, splitterProcessor,
-							processorBinding);
-
-				} else {
-					Element element = XMLSplitterSerialisationHelper
-							.typeDescriptorToExtensionXML(typeDescriptor);
-//					String wrappedType = new XMLOutputter().outputString(element);
-
-					splitter = new Activity();
-					splitter.setType(WSDLServiceDescription.OUTPUT_SPLITTER_TYPE);
-					splitterConfiguration = new Configuration();
-					splitterConfiguration.setType(SPLITTER_CONFIG_TYPE);
-					splitterConfiguration.setConfigures(splitter);
-//					((ObjectNode) splitterConfiguration.getJson()).put("wrappedType", wrappedType);
-
-					JsonNode bean = XMLSplitterConfigurationBeanBuilder.buildBeanForOutput(element);
-					splitterConfiguration.setJson(bean);
-
-					XMLSplitterPortBuilder.addPortsForOutput(element, splitter, splitterProcessor,
-							processorBinding);
-				}
-			} else {
-				throw new EditException(
-						"The activity type is not suitable for adding xml processing processors");
-			}
-		} catch (Exception e) {
-			throw new EditException(
-					"An error occured whilst tyring to add an XMLSplitter to the activity:"
-							+ activity, e);
-		}
-
-		if (isInput) {
-			sourcePortName = "output";
-			sinkPortName = portName;
-			sinkProcessor = activityProcessor;
-			sourceProcessor = splitterProcessor;
-		} else {
-			sourcePortName = portName;
-			sinkPortName = "input";
-			sinkProcessor = splitterProcessor;
-			sourceProcessor = activityProcessor;
-		}
-
-		processorBinding.setBoundActivity(splitter);
-
-		List<Edit<?>> editList = new ArrayList<Edit<?>>();
-		editList.add(new AddChildEdit<Profile>(profile, splitter));
-		editList.add(new AddChildEdit<Profile>(profile, splitterConfiguration));
-		editList.add(new AddChildEdit<Profile>(profile, processorBinding));
-		editList.add(new AddProcessorEdit(workflow, splitterProcessor));
-
-		compoundEdit1 = new CompoundEdit(editList);
-		compoundEdit1.doEdit();
-
-		List<Edit<?>> linkUpEditList = new ArrayList<Edit<?>>();
-
-		OutputProcessorPort source = sourceProcessor.getOutputPorts().getByName(sourcePortName);
-		InputProcessorPort sink = sinkProcessor.getInputPorts().getByName(sinkPortName);
-
-		if (source == null)
-			throw new EditException("Unable to find the source port when linking up "
-					+ sourcePortName + " to " + sinkPortName);
-		if (sink == null)
-			throw new EditException("Unable to find the sink port when linking up "
-					+ sourcePortName + " to " + sinkPortName);
-
-		DataLink dataLink = new DataLink();
-		dataLink.setReceivesFrom(source);
-		dataLink.setSendsTo(sink);
-		linkUpEditList.add(new AddDataLinkEdit(workflow, dataLink));
-
-		linkUpEdit = new CompoundEdit(linkUpEditList);
-		linkUpEdit.doEdit();
-		applied = true;
-		return workflow;
-	}
-
-	@Override
-	public void undo() {
-		if (!applied) {
-			throw new RuntimeException("Attempt to undo edit that was never applied");
-		}
-		if (linkUpEdit.isApplied())
-			linkUpEdit.undo();
-		if (compoundEdit1.isApplied())
-			compoundEdit1.undo();
-		applied = false;
-	}
-
-	@Override
-	public boolean isApplied() {
-		return applied;
-	}
-
-	@Override
-	public Object getSubject() {
-		return workflow;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/WSDLActivityConfigureAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/WSDLActivityConfigureAction.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/WSDLActivityConfigureAction.java
deleted file mode 100644
index 92a8fb6..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/WSDLActivityConfigureAction.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2008 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.actions;
-
-import java.awt.Frame;
-import java.awt.event.ActionEvent;
-
-import javax.swing.Action;
-import javax.swing.JDialog;
-
-import net.sf.taverna.t2.activities.wsdl.views.WSDLActivityConfigurationView;
-import net.sf.taverna.t2.security.credentialmanager.CredentialManager;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationPanel;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-@SuppressWarnings("serial")
-public class WSDLActivityConfigureAction extends ActivityConfigurationAction {
-
-	private final EditManager editManager;
-	private final FileManager fileManager;
-	private final CredentialManager credentialManager;
-
-	public WSDLActivityConfigureAction(Activity activity, Frame owner, EditManager editManager,
-			FileManager fileManager, ActivityIconManager activityIconManager,
-			ServiceDescriptionRegistry serviceDescriptionRegistry, CredentialManager credentialManager) {
-		super(activity, activityIconManager, serviceDescriptionRegistry);
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		this.credentialManager = credentialManager;
-		putValue(Action.NAME, "Configure security");
-	}
-
-	public void actionPerformed(ActionEvent e) {
-		JDialog currentDialog = ActivityConfigurationAction.getDialog(getActivity());
-		if (currentDialog != null) {
-			currentDialog.toFront();
-			return;
-		}
-		final ActivityConfigurationPanel rshellConfigView = new WSDLActivityConfigurationView(
-				getActivity(), credentialManager);
-		final ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(getActivity(),
-				rshellConfigView, editManager);
-
-		ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/XMLSplitterPortBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/XMLSplitterPortBuilder.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/XMLSplitterPortBuilder.java
deleted file mode 100644
index f41f298..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/actions/XMLSplitterPortBuilder.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.actions;
-
-import net.sf.taverna.wsdl.parser.ArrayTypeDescriptor;
-import net.sf.taverna.wsdl.parser.BaseTypeDescriptor;
-import net.sf.taverna.wsdl.parser.ComplexTypeDescriptor;
-import net.sf.taverna.wsdl.parser.TypeDescriptor;
-import net.sf.taverna.wsdl.xmlsplitter.XMLSplitterSerialisationHelper;
-
-import org.jdom.Element;
-
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.common.NamedSet;
-import uk.org.taverna.scufl2.api.core.Processor;
-import uk.org.taverna.scufl2.api.port.InputActivityPort;
-import uk.org.taverna.scufl2.api.port.InputProcessorPort;
-import uk.org.taverna.scufl2.api.port.OutputActivityPort;
-import uk.org.taverna.scufl2.api.port.OutputProcessorPort;
-import uk.org.taverna.scufl2.api.profiles.ProcessorBinding;
-import uk.org.taverna.scufl2.api.profiles.ProcessorInputPortBinding;
-import uk.org.taverna.scufl2.api.profiles.ProcessorOutputPortBinding;
-
-/**
- * A helper class to facilitate in building XMLSplitter ports
- * from the type descriptor XML.
- *
- * @author Stuart Owen
- * @author David Withers
- */
-public class XMLSplitterPortBuilder {
-
-	public static void addPortsForInput(Element element, Activity activity, Processor processor,
-			ProcessorBinding binding) {
-		TypeDescriptor descriptor = XMLSplitterSerialisationHelper.extensionXMLToTypeDescriptor(element);
-		addOutputPort("output", 0, activity, processor, binding);
-
-		if (descriptor instanceof ComplexTypeDescriptor) {
-			for (TypeDescriptor typeDescriptor : ((ComplexTypeDescriptor) descriptor).getElements()) {
-				addInputPort(typeDescriptor.getName(), depthForDescriptor(typeDescriptor), activity, processor,
-						binding);
-			}
-			NamedSet<InputActivityPort> inputPorts = activity.getInputPorts();
-			for (TypeDescriptor typeDescriptor : ((ComplexTypeDescriptor) descriptor).getAttributes()) {
-				String name = typeDescriptor.getName();
-				if (inputPorts.containsName(name)) {
-					name = "1" + name;
-				}
-				addInputPort(name, depthForDescriptor(typeDescriptor), activity, processor, binding);
-			}
-		} else if (descriptor instanceof ArrayTypeDescriptor) {
-			addInputPort(descriptor.getName(), 1, activity, processor, binding);
-		}
-	}
-
-	public static void addPortsForOutput(Element element, Activity activity, Processor processor,
-			ProcessorBinding binding) {
-		TypeDescriptor descriptor = XMLSplitterSerialisationHelper.extensionXMLToTypeDescriptor(element);
-		addInputPort("input", 0, activity, processor, binding);
-
-		if (descriptor instanceof ComplexTypeDescriptor) {
-			for (TypeDescriptor typeDescriptor : ((ComplexTypeDescriptor) descriptor).getElements()) {
-				addOutputPort(typeDescriptor.getName(), depthForDescriptor(typeDescriptor), activity, processor,
-						binding);
-			}
-			NamedSet<OutputActivityPort> outputPorts = activity.getOutputPorts();
-			for (TypeDescriptor typeDescriptor : ((ComplexTypeDescriptor) descriptor).getAttributes()) {
-				String name = typeDescriptor.getName();
-				if (outputPorts.containsName(name)) {
-					name = "1" + name;
-				}
-				addOutputPort(name, depthForDescriptor(typeDescriptor), activity, processor, binding);
-			}
-		} else if (descriptor instanceof ArrayTypeDescriptor) {
-			addOutputPort(descriptor.getName(), 1, activity, processor, binding);
-		}
-	}
-
-	private static int depthForDescriptor(TypeDescriptor desc) {
-		if (desc instanceof ArrayTypeDescriptor
-				&& (!((ArrayTypeDescriptor) desc).isWrapped() || ((ArrayTypeDescriptor) desc)
-						.getElementType() instanceof BaseTypeDescriptor)) {
-			return 1;
-		} else {
-			return 0;
-		}
-	}
-
-	private static void addOutputPort(String name, int depth, Activity activity,
-			Processor processor, ProcessorBinding binding) {
-		OutputActivityPort activityPort = new OutputActivityPort(activity, name);
-		activityPort.setDepth(depth);
-		activityPort.setGranularDepth(depth);
-		OutputProcessorPort processorPort = new OutputProcessorPort(processor, name);
-		processorPort.setDepth(depth);
-		processorPort.setGranularDepth(depth);
-		new ProcessorOutputPortBinding(binding, activityPort, processorPort);
-	}
-
-	private static void addInputPort(String name, int depth, Activity activity,
-			Processor processor, ProcessorBinding binding) {
-		InputActivityPort activityPort = new InputActivityPort(activity, name);
-		activityPort.setDepth(depth);
-		InputProcessorPort processorPort = new InputProcessorPort(processor, name);
-		processorPort.setDepth(depth);
-		new ProcessorInputPortBinding(binding, processorPort, activityPort);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForWSDLActivityMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForWSDLActivityMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForWSDLActivityMenuAction.java
deleted file mode 100644
index a2935e6..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForWSDLActivityMenuAction.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package net.sf.taverna.t2.activities.wsdl.menu;
-
-import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
-
-public class AddXMLInputSplitterForWSDLActivityMenuAction extends AddXMLInputSplitterMenuAction {
-
-	public AddXMLInputSplitterForWSDLActivityMenuAction() {
-		super(WSDLServiceDescription.ACTIVITY_TYPE);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForXMLInputSplitterMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForXMLInputSplitterMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForXMLInputSplitterMenuAction.java
deleted file mode 100644
index 070c006..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterForXMLInputSplitterMenuAction.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package net.sf.taverna.t2.activities.wsdl.menu;
-
-import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
-
-public class AddXMLInputSplitterForXMLInputSplitterMenuAction extends AddXMLInputSplitterMenuAction {
-
-	public AddXMLInputSplitterForXMLInputSplitterMenuAction() {
-		super(WSDLServiceDescription.INPUT_SPLITTER_TYPE);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterMenuAction.java
deleted file mode 100644
index 60ef904..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLInputSplitterMenuAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- *
- */
-package net.sf.taverna.t2.activities.wsdl.menu;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Map;
-
-import javax.swing.Action;
-import javax.wsdl.WSDLException;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.jdom.JDOMException;
-import org.xml.sax.SAXException;
-
-import net.sf.taverna.t2.activities.wsdl.InputPortTypeDescriptorActivity;
-import net.sf.taverna.t2.activities.wsdl.actions.AbstractAddXMLSplitterAction;
-import net.sf.taverna.t2.activities.wsdl.actions.AddXMLInputSplitterAction;
-import net.sf.taverna.t2.ui.menu.ContextualMenuComponent;
-import net.sf.taverna.t2.ui.menu.MenuComponent;
-import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.wsdl.parser.TypeDescriptor;
-import net.sf.taverna.wsdl.parser.UnknownOperationException;
-
-/**
- * @author alanrw
- */
-public abstract class AddXMLInputSplitterMenuAction extends AbstractConfigureActivityMenuAction
-		implements MenuComponent, ContextualMenuComponent {
-
-	private static final String ADD_XML_INPUT_SPLITTER = "Add XML Input Splitter";
-	private EditManager editManager;
-	private SelectionManager selectionManager;
-
-	public AddXMLInputSplitterMenuAction(URI activityType) {
-		super(activityType);
-	}
-
-	@Override
-	protected Action createAction() {
-		AddXMLInputSplitterAction configAction = new AddXMLInputSplitterAction(findActivity(),
-				null, editManager, selectionManager);
-		Map<String, TypeDescriptor> descriptors;
-		try {
-			descriptors = configAction.getTypeDescriptors();
-		} catch (UnknownOperationException | IOException | ParserConfigurationException
-				| WSDLException | SAXException | JDOMException e) {
-			return null;
-		}
-		if (!AbstractAddXMLSplitterAction.filterDescriptors(descriptors).isEmpty()) {
-			configAction.putValue(Action.NAME, ADD_XML_INPUT_SPLITTER);
-			addMenuDots(configAction);
-			return configAction;
-		} else {
-			return null;
-		}
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForWSDLActivityMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForWSDLActivityMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForWSDLActivityMenuAction.java
deleted file mode 100644
index 58b3724..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForWSDLActivityMenuAction.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package net.sf.taverna.t2.activities.wsdl.menu;
-
-import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
-
-public class AddXMLOutputSplitterForWSDLActivityMenuAction extends AddXMLOutputSplitterMenuAction {
-
-	public AddXMLOutputSplitterForWSDLActivityMenuAction() {
-		super(WSDLServiceDescription.ACTIVITY_TYPE);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForXMLOutputSplitterMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForXMLOutputSplitterMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForXMLOutputSplitterMenuAction.java
deleted file mode 100644
index 129c996..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterForXMLOutputSplitterMenuAction.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package net.sf.taverna.t2.activities.wsdl.menu;
-
-import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
-
-public class AddXMLOutputSplitterForXMLOutputSplitterMenuAction extends AddXMLOutputSplitterMenuAction {
-
-	public AddXMLOutputSplitterForXMLOutputSplitterMenuAction() {
-		super(WSDLServiceDescription.OUTPUT_SPLITTER_TYPE);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterMenuAction.java
deleted file mode 100644
index 33541e6..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/AddXMLOutputSplitterMenuAction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- *
- */
-package net.sf.taverna.t2.activities.wsdl.menu;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Map;
-
-import javax.swing.Action;
-import javax.wsdl.WSDLException;
-import javax.xml.parsers.ParserConfigurationException;
-
-import net.sf.taverna.t2.activities.wsdl.actions.AbstractAddXMLSplitterAction;
-import net.sf.taverna.t2.activities.wsdl.actions.AddXMLOutputSplitterAction;
-import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.wsdl.parser.TypeDescriptor;
-import net.sf.taverna.wsdl.parser.UnknownOperationException;
-
-import org.jdom.JDOMException;
-import org.xml.sax.SAXException;
-
-/**
- * @author alanrw
- */
-public abstract class AddXMLOutputSplitterMenuAction extends AbstractConfigureActivityMenuAction {
-
-	private static final String ADD_XML_OUTPUT_SPLITTER = "Add XML Output Splitter";
-	private EditManager editManager;
-	private SelectionManager selectionManager;
-
-	public AddXMLOutputSplitterMenuAction(URI activityType) {
-		super(activityType);
-	}
-
-	@Override
-	protected Action createAction() {
-		AddXMLOutputSplitterAction configAction = new AddXMLOutputSplitterAction(
-				findActivity(), null, editManager, selectionManager);
-		Map<String, TypeDescriptor> descriptors;
-		try {
-			descriptors = configAction.getTypeDescriptors();
-		} catch (UnknownOperationException | IOException | ParserConfigurationException
-				| WSDLException | SAXException | JDOMException e) {
-			return null;
-		}
-		if (!AbstractAddXMLSplitterAction.filterDescriptors(descriptors).isEmpty()) {
-			configAction.putValue(Action.NAME, ADD_XML_OUTPUT_SPLITTER);
-			addMenuDots(configAction);
-			return configAction;
-		} else {
-			return null;
-		}
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/ConfigureWSDLMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/ConfigureWSDLMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/ConfigureWSDLMenuAction.java
deleted file mode 100644
index 87e7d0f..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/menu/ConfigureWSDLMenuAction.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.menu;
-
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.wsdl.actions.WSDLActivityConfigureAction;
-import net.sf.taverna.t2.activities.wsdl.servicedescriptions.WSDLServiceDescription;
-import net.sf.taverna.t2.security.credentialmanager.CredentialManager;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.ui.menu.ContextualMenuComponent;
-import net.sf.taverna.t2.ui.menu.MenuComponent;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-
-public class ConfigureWSDLMenuAction extends AbstractConfigureActivityMenuAction implements
-		MenuComponent, ContextualMenuComponent {
-
-	private EditManager editManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private CredentialManager credentialManager;
-	private FileManager fileManager;
-
-	public ConfigureWSDLMenuAction() {
-		super(WSDLServiceDescription.ACTIVITY_TYPE);
-	}
-
-	@Override
-	protected Action createAction() {
-		WSDLActivityConfigureAction configAction = new WSDLActivityConfigureAction(findActivity(),
-				getParentFrame(), editManager, fileManager, activityIconManager,
-				serviceDescriptionRegistry, credentialManager);
-		addMenuDots(configAction);
-		return configAction;
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setCredentialManager(CredentialManager credentialManager) {
-		this.credentialManager = credentialManager;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/440bbd62/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/AddWSDLServiceDialog.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/AddWSDLServiceDialog.java b/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/AddWSDLServiceDialog.java
deleted file mode 100644
index b2b31ae..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/wsdl/servicedescriptions/AddWSDLServiceDialog.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.wsdl.servicedescriptions;
-
-import java.awt.BorderLayout;
-import java.awt.FlowLayout;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-import java.io.IOException;
-import java.net.URL;
-import java.net.URLConnection;
-
-import javax.swing.JButton;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import javax.swing.border.EmptyBorder;
-
-import net.sf.taverna.t2.workbench.MainWindow;
-import net.sf.taverna.t2.workbench.helper.HelpEnabledDialog;
-
-import org.apache.log4j.Logger;
-
-/**
- * Dialog that lets user specify a URL of a WSDL service they want
- * to add to the Service Panel. In the case the WSDL URL is behind
- * HTTPS or service's endpoints require HTTPS it will ask user to confirm
- * if they want to trust it.
- *
- * @author Alex Nenadic
- *
- */
-@SuppressWarnings("serial")
-public abstract class AddWSDLServiceDialog extends HelpEnabledDialog {
-
-	private JTextField wsdlLocationField;
-	private Logger logger = Logger.getLogger(AddWSDLServiceDialog.class);
-
-	public AddWSDLServiceDialog()  {
-		super(MainWindow.getMainWindow(), "Add WSDL service", true, null); // create a non-modal dialog
-		initComponents();
-		setLocationRelativeTo(getParent());
-	}
-
-	private void initComponents() {
-		JPanel mainPanel = new JPanel(new GridBagLayout());
-		mainPanel.setBorder(new EmptyBorder(10,10,10,10));
-
-		JLabel wsdlLocatitionLabel = new JLabel("WSDL location",WSDLActivityIcon.getWSDLIcon(), JLabel.LEFT);
-		GridBagConstraints gbc = new GridBagConstraints();
-		gbc.weighty = 0.0;
-
-		gbc.weightx = 0.0;
-		gbc.gridx = 0;
-		gbc.gridy = 0;
-		gbc.fill = GridBagConstraints.NONE;
-		gbc.anchor = GridBagConstraints.WEST;
-		gbc.insets = new Insets(5, 10, 0, 0);
-		mainPanel.add(wsdlLocatitionLabel, gbc);
-
-		wsdlLocationField = new JTextField("http://somehost/service?wsdl");
-		gbc.weightx = 1.0;
-		gbc.gridx = 1;
-		gbc.gridy = 0;
-		gbc.fill = GridBagConstraints.HORIZONTAL;
-		gbc.anchor = GridBagConstraints.WEST;
-		gbc.insets = new Insets(5, 10, 0, 5);
-		mainPanel.add(wsdlLocationField, gbc);
-
-	    final JButton addServiceButton = new JButton("Add");
-	    addServiceButton.addActionListener(new ActionListener()
-	        {
-	            public void actionPerformed(ActionEvent evt)
-	            {
-	                addPressed();
-	            }
-	        });
-
-	    // When user presses "Return" key fire the action on the "Add" button
-	    addServiceButton.addKeyListener(new java.awt.event.KeyAdapter() {
-			public void keyPressed(java.awt.event.KeyEvent evt) {
-				if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
-					addPressed();
-				}
-			}
-		});
-		getRootPane().setDefaultButton(addServiceButton);
-
-        JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
-        buttonsPanel.add(addServiceButton);
-
-        getContentPane().setLayout(new BorderLayout());
-        getContentPane().add(mainPanel, BorderLayout.CENTER);
-        getContentPane().add(buttonsPanel, BorderLayout.SOUTH);
-
-		setSize(getPreferredSize());
-        pack();
-	}
-
-    /**
-     * 'Add service' button pressed or otherwise activated.
-     */
-    private void addPressed()
-    {
-		final String wsdlURLString = wsdlLocationField.getText().trim();
-		new Thread("Adding WSDL " + wsdlURLString) {
-			public void run() {
-				// Only add the service provider for this service if service URL
-				// starts with 'http'
-				// or if it starts with 'https' and user explicitly said they
-				// wanted to trust this service.
-				/*
-				 * if (shouldTrust(wsdlURLString)){ addRegistry(wsdlURLString);
-				 * }
-				 */
-				try {
-					URL url = new URL(wsdlURLString);
-					URLConnection connection = url.openConnection();
-					try {
-						// If the url starts with 'https' - security hook for
-						// https connection's trust manager
-						// will be engaged and user will be asked automatically
-						// if they want
-						// to trust the connection (if it is not already
-						// trusted). If the urls starts with 'http' -
-						// this will not have any effect apart from checking if
-						// we can open a connection.
-						connection.connect(); // if this does not fail - add the
-						// WSDL
-						// service provider for this service to
-						// the registry
-					} finally {
-						try {
-							connection.getInputStream().close();
-						} catch (IOException ex) {
-						}
-					}
-					addRegistry(wsdlURLString);
-				} catch (Exception ex) { // anything failed
-					JOptionPane.showMessageDialog(null,
-							"Could not read the WSDL definition from "
-									+ wsdlURLString + ":\n" + ex,
-							"Could not add WSDL service",
-							JOptionPane.ERROR_MESSAGE);
-
-					logger.error(
-							"Failed to add WSDL service provider for service: "
-									+ wsdlURLString, ex);
-
-				}
-			};
-		}.start();
-		closeDialog();
-    }
-
-    /**
-     * If WSDL service's URL starts with 'https' - asks user
-     * whether to trust it or not. If it starts with 'http' -
-     * does not ask anything as the service is implicitly trusted (weird but true).
-     */
-	protected abstract void addRegistry(String wsdl);
-
-	/**
-	 * Checks if a service is trusted and if not - asks user if they want to trust it.
-	 */
-//	public boolean shouldTrust(String wsdlURLString){
-//		try {
-//			URI wsdlURI = new URI(wsdlURLString);
-//			URL wsdlURL = wsdlURI.toURL();
-//			String protocol = wsdlURL.getProtocol();
-//			if (protocol.toLowerCase().startsWith("https")){
-//				logger.info("Checking if service " + wsdlURLString + " is already trusted.");
-//				// Check if opening an HTTPS connection will cause a SSLHandshakeException.
-//				// This is most probably due to the fact that we do not have this service's
-//				// certificate in Credential Manager's truststore
-//				try {
-//					HttpsURLConnection httpsConnection;
-//					httpsConnection = (HttpsURLConnection) wsdlURL.openConnection();
-//					httpsConnection.connect();
-//					logger.info("HTTPS works out of the box for service " + wsdlURLString);
-//					return true; // Opening HTTPS connection worked - so we trust this service already
-//				}
-//				catch (SSLException sslex) { // most probably due to the fact that service is not trusted, i.e. its certificate is not in Credential Manager's Truststore
-//					logger.info("Service " + wsdlURLString + " is not trusted out of the box. Trying to fetch its certificate.");
-//					logger.info("The SSLException was caused by: " + sslex.getCause());
-//						// Handshake most probably failed as we do not already trust this service -
-//						// fetch its certificate and ask user if they want to add this service as trusted
-//					try {
-//
-//						// This controls SSL socket creation for HTTPS connections
-//						// per thread so the damage of switching off certificates
-//						// verification is limited
-//						ThreadLocalSSLSocketFactory.install();
-//						// switch certificate checking off for a moment so we can fetch
-//						// service's certificate
-//						ThreadLocalSSLSocketFactory.startTrustingEverything();
-//
-//						HttpsURLConnection httpsConnection;
-//						httpsConnection = (HttpsURLConnection) wsdlURL
-//								.openConnection();
-//						httpsConnection.connect();
-//						// Stop being overly trusting
-//						ThreadLocalSSLSocketFactory.stopTrustingEverything();
-//						Certificate[] certificates = httpsConnection
-//								.getServerCertificates();
-//						logger.info("Need to ask user if they want to trust service " + wsdlURLString);
-//						// Ask user if they want to trust this service
-//						ConfirmTrustedCertificateDialog confirmCertTrustDialog = new ConfirmTrustedCertificateDialog(
-//								this, "Untrusted HTTPS connection", true,
-//								(X509Certificate) certificates[0]);
-//						confirmCertTrustDialog.setLocationRelativeTo(null);
-//						confirmCertTrustDialog.setVisible(true);
-//						boolean shouldTrust = confirmCertTrustDialog
-//								.shouldTrust();
-//						if (shouldTrust) {
-//							try {
-//								CredentialManager credManager = CredentialManager
-//										.getInstance();
-//								credManager
-//										.saveTrustedCertificate((X509Certificate) certificates[0]);
-//								return true;
-//							} catch (CMException cme) {
-//								logger
-//										.error(
-//												"Failed to add WSDL service provider for service: "
-//														+ wsdlURLString
-//														+ " . Credential Manager failed to "
-//														+ "save trusted certificate.",
-//												cme);
-//								return false;
-//							}
-//						} else {
-//							// Do not even add a WSDL service provider for this
-//							// service and tell user the service will not be
-//							// added to Service Panel
-//							JOptionPane
-//									.showMessageDialog(
-//											this,
-//											"As you refused to trust it, the service will not be added to Service Panel.",
-//											"Add WSDL service",
-//											JOptionPane.INFORMATION_MESSAGE);
-//							return false;
-//						}
-//					} catch (Exception e1) {
-//						logger
-//								.error(
-//										"Failed to add WSDL service provider for service: "
-//												+ wsdlURLString
-//												+ ". 'Trust everyone' HTTPS connection failed.",
-//										e1);
-//						return false;
-//					} finally {// switch it off here as well if some unexpected exception occurred
-//						ThreadLocalSSLSocketFactory.stopTrustingEverything();
-//					}
-//
-//				} catch (Exception e2) {
-//					logger.error("Failed to add WSDL service provider for service: "+ wsdlURLString+". Connecting to service failed.", e2);
-//					return false;
-//				}
-//			}
-//			else{ // protocol starts with 'http'
-//				return true;
-//			}
-//		} catch (MalformedURLException e3) {
-//			logger.error("Failed to add WSDL service provider: URL "+ wsdlURLString+" was malformed.", e3);
-//			return false;
-//		} catch (URISyntaxException e4) {
-//			logger.error("Failed to add WSDL service provider: URI "+ wsdlURLString+" could not be parsed.", e4);
-//			return false;
-//		}
-//	}
-
-	/**
-	 * Closes the dialog.
-	 */
-	private void closeDialog() {
-		setVisible(false);
-		dispose();
-	}
-}


[31/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-rest-activity-ui/

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/mediatypes.txt
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/mediatypes.txt b/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/mediatypes.txt
deleted file mode 100644
index 4f0f0f4..0000000
--- a/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/mediatypes.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-application/atom+xml
-application/http
-application/javascript
-application/json
-application/octet-stream
-application/ogg
-application/pdf
-application/postscript
-application/rdf+xml
-application/sparql-query
-application/sparql-results+xml
-application/vnd.taverna.scufl+xml
-application/vnd.taverna.t2flow+xml
-application/x-gzip
-application/x-rar-compressed
-application/x-shockwave-flash
-application/x-tar
-application/x-www-form-urlencoded
-application/xhtml+xml
-application/xml
-application/zip
-audio/mp4
-audio/mpeg
-audio/mpeg4-generic
-audio/ogg
-audio/vnd.wave
-audio/vorbis
-audio/webm
-audio/x-ms-wma
-image/gif
-image/jpeg
-image/png
-image/svg+xml
-image/tiff
-image/vnd.microsoft.icon
-message/http
-message/rfc822
-multipart/alternative
-multipart/byteranges
-multipart/digest
-multipart/encrypted
-multipart/form-data
-multipart/mixed
-multipart/related
-multipart/signed
-text/css
-text/csv
-text/html
-text/javascript
-text/n3
-text/plain
-text/tab-separated-values
-text/turtle
-text/uri-list
-text/vcard
-text/xml
-video/H264
-video/MPV
-video/mp4
-video/mpeg
-video/mpeg4-generic
-video/ogg
-video/quicktime
-video/webm
-video/x-ms-wmv

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/src/main/resources/net/sf/taverna/t2/activities/rest/ui/servicedescription/service_type_rest.png
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/rest/ui/servicedescription/service_type_rest.png b/src/main/resources/net/sf/taverna/t2/activities/rest/ui/servicedescription/service_type_rest.png
deleted file mode 100644
index a4276c2..0000000
Binary files a/src/main/resources/net/sf/taverna/t2/activities/rest/ui/servicedescription/service_type_rest.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/pom.xml b/taverna-rest-activity-ui/pom.xml
new file mode 100644
index 0000000..99ac649
--- /dev/null
+++ b/taverna-rest-activity-ui/pom.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>net.sf.taverna</groupId>
+		<artifactId>taverna-parent</artifactId>
+		<version>3.0.1-SNAPSHOT</version>
+	</parent>
+	<groupId>net.sf.taverna.t2.ui-activities</groupId>
+	<artifactId>rest-activity-ui</artifactId>
+        <version>2.0-SNAPSHOT</version>
+	<packaging>bundle</packaging>
+	<name>REST Activity - UI bindings</name>
+
+	<dependencies>
+		<dependency>
+			<groupId>net.sf.taverna.t2.activities</groupId>
+			<artifactId>rest-activity</artifactId>
+			<version>${t2.activities.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-palette-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>menu-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>contextual-views-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>workbench-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>report-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-components</groupId>
+			<artifactId>workflow-view</artifactId>
+			<version>${t2.ui.components.version}</version>
+		</dependency>
+	</dependencies>
+	<repositories>
+		<repository>
+			<releases />
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+			<id>mygrid-repository</id>
+			<name>myGrid Repository</name>
+			<url>http://www.mygrid.org.uk/maven/repository
+			</url>
+		</repository>
+		<repository>
+			<releases>
+				<enabled>false</enabled>
+			</releases>
+			<snapshots />
+			<id>mygrid-snapshot-repository</id>
+			<name>myGrid Snapshot Repository</name>
+			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
+		</repository>
+	</repositories>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/HTTPHeadersTableModel.java
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/HTTPHeadersTableModel.java b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/HTTPHeadersTableModel.java
new file mode 100644
index 0000000..30507c9
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/HTTPHeadersTableModel.java
@@ -0,0 +1,119 @@
+package net.sf.taverna.t2.activities.rest.ui.config;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+
+import javax.swing.table.AbstractTableModel;
+
+@SuppressWarnings("serial")
+public class HTTPHeadersTableModel extends AbstractTableModel {
+
+    protected String[] columnNames;
+    protected ArrayList<ArrayList<String>> data;
+
+    public HTTPHeadersTableModel() {
+    	columnNames = new String[] {"HTTP Header Name", "HTTP Header Value"};
+    	data = new ArrayList<ArrayList<String>>();
+    }
+
+    public String getColumnName(int column) {
+        return columnNames[column];
+    }
+
+    public boolean isCellEditable(int row, int column) {
+        return true;
+    }
+
+    public int getColumnCount()
+    {
+        return columnNames.length;
+    }
+
+    public int getRowCount()
+    {
+        return data.size();
+    }
+
+    public Object getValueAt(int row, int column)
+    {
+        return data.get(row).get(column);
+    }
+
+    public void setValueAt(Object value, int row, int column) {
+        if ((row < 0) || (column < 0)) {
+          throw new IllegalArgumentException("Invalid row/column setting");
+        }
+        data.get(row).set(column, (String)value);
+      }
+    
+    /**
+     * Get the class at of the cells at the given column position.
+     */
+    public Class<? extends Object> getColumnClass(int iCol)
+    {
+        return getValueAt(0, iCol).getClass();
+    }
+
+    
+	public void addEmptyRow() {
+        data.add(new ArrayList<String>(Arrays.asList("", ""))); // add empty row
+        fireTableRowsInserted(
+           data.size() - 1,
+           data.size() - 1);
+    }
+	
+	public void addRow(ArrayList<String> headerValuePair) {
+        data.add(headerValuePair);
+        fireTableRowsInserted(
+           data.size() - 1,
+           data.size() - 1);
+    }
+	
+	public void removeRow(int row)
+	{
+		if (row >=0 && row < data.size()){
+			data.remove(row);
+			fireTableRowsDeleted(row, row);
+		}
+	}
+
+	public ArrayList<ArrayList<String>> getHTTPHeaderData(){
+		// Return a deep copy of the 2-dimensional array
+		return deepCopy(data);
+	}
+	
+	public void setHTTPHeaderData(ArrayList<ArrayList<String>> data){
+		this.data = deepCopy(data);
+		fireTableChanged(null);
+	}
+	
+	public ArrayList<String> getHTTPHeaderNames(){
+		ArrayList<String> headerNames = new ArrayList<String>();
+		for (ArrayList<String> headerNameValuePair : data){
+			headerNames.add(headerNameValuePair.get(0));
+		}
+		return headerNames;
+	}
+	
+	public ArrayList<String> getHTTPHeaderValues(){
+		ArrayList<String> headerValues = new ArrayList<String>();
+		for (ArrayList<String> headerNameValuePair : data){
+			headerValues.add(headerNameValuePair.get(1));
+		}
+		return headerValues;
+	}
+	
+	public static ArrayList<ArrayList<String>> deepCopy(ArrayList<ArrayList<String>> src)
+	{
+	    ArrayList<ArrayList<String>> dest = new ArrayList<ArrayList<String>>();
+
+	    for (int i = 0; i< src.size(); i++){ 	
+	    	dest.add(new ArrayList<String>(Arrays.asList(new String[src.get(i).size()])));  
+	    	Collections.copy(dest.get(i), src.get(i));
+	    }
+	    return dest;
+	}
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigurationPanel.java
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigurationPanel.java b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigurationPanel.java
new file mode 100644
index 0000000..d6b46e1
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigurationPanel.java
@@ -0,0 +1,670 @@
+package net.sf.taverna.t2.activities.rest.ui.config;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Scanner;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.ListSelectionModel;
+
+import net.sf.taverna.t2.activities.rest.RESTActivity;
+import net.sf.taverna.t2.activities.rest.RESTActivity.DATA_FORMAT;
+import net.sf.taverna.t2.activities.rest.RESTActivity.HTTP_METHOD;
+import net.sf.taverna.t2.activities.rest.RESTActivityConfigurationBean;
+import net.sf.taverna.t2.activities.rest.URISignatureHandler;
+import net.sf.taverna.t2.activities.rest.URISignatureHandler.URISignatureParsingException;
+import net.sf.taverna.t2.workbench.MainWindow;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.MultiPageActivityConfigurationPanel;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+@SuppressWarnings("serial")
+public class RESTActivityConfigurationPanel extends MultiPageActivityConfigurationPanel {
+	private static final Icon infoIcon = new ImageIcon(
+			RESTActivityConfigurationPanel.class.getResource("information.png"));
+
+	// GENERAL tab
+	private JComboBox<HTTP_METHOD> cbHTTPMethod; // HTTP method of this REST activity
+	private JTextField tfURLSignature; // URL signature that determines its
+										// input ports
+	private JComboBox<String> cbAccepts; // for Accepts header
+	private JLabel jlContentTypeExplanation;
+	private JLabel jlContentTypeExplanationPlaceholder;
+	private JLabel jlContentType;
+	private JLabel jlContentTypeLabelPlaceholder; // this placeholder label will
+													// take up space of the
+													// ContentType combo-box
+													// when the latter is not
+													// shown
+	private JLabel jlContentTypeFieldPlaceholder;
+	private JComboBox<String> cbContentType; // for MIME type of data sent to the server
+										// by POST / PUT methods
+	private JLabel jlSendDataAs;
+	private JComboBox<DATA_FORMAT> cbSendDataAs;
+	private JLabel jlSendDataAsLabelPlaceholder;
+	private JLabel jlSendDataAsFieldPlaceholder;
+
+	// ADVANCED tab
+	private JCheckBox cbSendHTTPExpectHeader;
+	private JCheckBox cbShowRedirectionOutputPort;
+	private JCheckBox cbShowActualUrlPort;
+	private JCheckBox cbShowResponseHeadersPort;
+	private JCheckBox cbEscapeParameters;
+	private JButton addHeaderButton;
+	private JButton removeHeaderButton;
+	private JTable httpHeadersTable;
+	private HTTPHeadersTableModel httpHeadersTableModel;
+
+	private String[] mediaTypes;
+
+	private final ServiceRegistry serviceRegistry;
+
+	public RESTActivityConfigurationPanel(Activity activity, ServiceRegistry serviceRegistry) {
+		super(activity);
+		this.serviceRegistry = serviceRegistry;
+		initialise();
+	}
+
+	@Override
+	protected void initialise() {
+		super.initialise();
+		removeAllPages();
+		addPage("General", createGeneralTab());
+		addPage("Advanced", createAdvancedTab());
+		refreshConfiguration();
+	}
+
+	@Override
+	public void noteConfiguration() {
+		ObjectNode requestNode = json.objectNode();
+
+		String methodName = ((HTTP_METHOD) cbHTTPMethod.getSelectedItem()).name();
+		requestNode.put("httpMethod", methodName);
+		requestNode.put("absoluteURITemplate", tfURLSignature.getText().trim());
+
+		ArrayNode headersNode = requestNode.arrayNode();
+		headersNode.addObject().put("header", "Accept").put("value", (String) cbAccepts.getSelectedItem());
+		headersNode.addObject().put("header", "Content-Type").put("value", (String) cbContentType.getSelectedItem());
+		if (cbSendHTTPExpectHeader.isSelected()) {
+			headersNode.addObject().put("header", "Expect").put("value", "100-continue");
+		}
+		ArrayList<String> headerNames = httpHeadersTableModel.getHTTPHeaderNames();
+		ArrayList<String> headerValues = httpHeadersTableModel.getHTTPHeaderValues();
+		for (int i = 0; i < headerNames.size(); i++) {
+			headersNode.addObject().put("header", headerNames.get(i)).put("value", headerValues.get(i));
+		}
+
+		requestNode.set("headers", headersNode);
+		json.set("request", requestNode);
+
+		json.put("outgoingDataFormat", ((DATA_FORMAT) cbSendDataAs.getSelectedItem()).name());
+		json.put("showRedirectionOutputPort", cbShowRedirectionOutputPort
+				.isSelected());
+		json.put("showActualURLPort", cbShowActualUrlPort.isSelected());
+		json.put("showResponseHeadersPort", cbShowResponseHeadersPort.isSelected());
+		json.put("escapeParameters", cbEscapeParameters.isSelected());
+
+		configureInputPorts(serviceRegistry);
+		configureOutputPorts(serviceRegistry);
+	}
+
+	/**
+	 * Check that user values in the UI are valid.
+	 */
+	@Override
+	public boolean checkValues() {
+		// HTTP method is a fixed selection combo-box - no validation required
+
+		// URL signature must be present and be valid
+		String candidateURLSignature = tfURLSignature.getText().trim();
+		if (candidateURLSignature == null
+				|| candidateURLSignature.length() == 0) {
+			JOptionPane.showMessageDialog(MainWindow.getMainWindow(),
+					"URL signature must not be empty",
+					"REST Activity Configuration - Warning",
+					JOptionPane.WARNING_MESSAGE);
+			return (false);
+		} else {
+			try {
+				// Test if any exceptions will be thrown - if not, proceed to
+				// other validations
+				URISignatureHandler.validate(candidateURLSignature);
+			} catch (URISignatureParsingException e) {
+				JOptionPane.showMessageDialog(MainWindow.getMainWindow(), e
+						.getMessage(), "REST Activity Configuration - Warning",
+						JOptionPane.WARNING_MESSAGE);
+				return (false);
+			}
+
+			// Test if the URL string contains "unsafe" characters, i.e. characters
+			// that need URL-encoding.
+			// From RFC 1738: "...Only alphanumerics [0-9a-zA-Z], the special
+			// characters "$-_.+!*'()," (not including the quotes) and reserved
+			// characters used for their reserved purposes may be
+			// used unencoded within a URL."
+			// Reserved characters are: ";/?:@&=" ..." (excluding quotes) and "%" used
+			// for escaping.
+			// We do not warn the user if they have not properly enclosed parameter
+			// names in curly braces as this check is already being done elsewhere in the code.
+			// We do not check the characters in parameter names either.
+			try {
+				// Test if any exceptions will be thrown - if not, proceed to
+				// other validations
+				URISignatureHandler.checkForUnsafeCharacters(candidateURLSignature);
+			} catch (URISignatureParsingException e) {
+				JOptionPane.showMessageDialog(MainWindow.getMainWindow(), e
+						.getMessage(), "REST Activity Configuration - Warning",
+						JOptionPane.WARNING_MESSAGE);
+				return (false);
+			}
+
+			// Other HTTP headers configured must not have empty names
+			ArrayList<String> otherHTTPHeaderNames = httpHeadersTableModel.getHTTPHeaderNames();
+			for (String headerName : otherHTTPHeaderNames){
+				if (headerName.equals("")){
+					JOptionPane.showMessageDialog(MainWindow.getMainWindow(), "One of the HTTP header names is empty", "REST Activity Configuration - Warning",
+							JOptionPane.WARNING_MESSAGE);
+					return false;
+				}
+			}
+		}
+
+		// All valid, return true
+		return true;
+	}
+
+	/**
+	 * Update GUI from a changed configuration bean (perhaps by undo / redo).
+	 */
+	@Override
+	public void refreshConfiguration() {
+		RESTActivityConfigurationBean configBean = new RESTActivityConfigurationBean(json);
+
+		cbHTTPMethod.setSelectedItem(configBean.getHttpMethod());
+		tfURLSignature.setText(configBean.getUrlSignature());
+		tfURLSignature.setCaretPosition(0);
+		cbAccepts.setSelectedItem(configBean.getAcceptsHeaderValue());
+		cbContentType.setSelectedItem(configBean.getContentTypeForUpdates());
+		cbSendDataAs.setSelectedItem(configBean.getOutgoingDataFormat());
+		cbSendHTTPExpectHeader.setSelected(configBean
+				.getSendHTTPExpectRequestHeader());
+		cbShowRedirectionOutputPort.setSelected(configBean
+				.getShowRedirectionOutputPort());
+		cbShowActualUrlPort.setSelected(configBean.getShowActualUrlPort());
+		cbShowResponseHeadersPort.setSelected(configBean.getShowResponseHeadersPort());
+		cbEscapeParameters.setSelected(configBean.getEscapeParameters());
+		httpHeadersTableModel.setHTTPHeaderData(configBean.getOtherHTTPHeaders());
+	}
+
+	private JPanel createGeneralTab() {
+		JPanel jpGeneral = new JPanel(new GridBagLayout());
+		GridBagConstraints c = new GridBagConstraints();
+		// All components to be anchored WEST
+		c.anchor = GridBagConstraints.WEST;
+
+		c.gridx = 0;
+		c.gridy = 0;
+		c.gridwidth = 1;
+		c.insets = new Insets(7, 7, 3, 3);
+		c.weightx = 0.0;
+		c.fill = GridBagConstraints.NONE;
+		JLabel labelMethod = new JLabel("HTTP Method:", infoIcon, JLabel.LEFT);
+		labelMethod
+				.setToolTipText("<html>HTTP method determines how a request to the remote server will be made.<br><br>"
+						+ "Supported HTTP methods are normally used for different purposes:<br>"
+						+ "<b>GET</b> - to fetch data;<br>"
+						+ "<b>POST</b> - to create new resources;<br>"
+						+ "<b>PUT</b> - to update existing resources;<br>"
+						+ "<b>DELETE</b> - to remove existing resources.<br><br>"
+						+ "Documentation of the server that is about to be used may suggest the<br>"
+						+ "HTTP method that should be used.</html>");
+		jpGeneral.add(labelMethod, c);
+
+		// the HTTP method combo-box will always contain the same values - it is
+		// the selected
+		// method which is important; therefore, can prepopulate as the set of
+		// values is known
+		c.gridx++;
+		c.insets = new Insets(7, 3, 3, 7);
+		c.fill = GridBagConstraints.HORIZONTAL;
+		c.weightx = 1.0;
+		cbHTTPMethod = new JComboBox<>(HTTP_METHOD.values());
+		cbHTTPMethod.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				boolean contentTypeSelEnabled = RESTActivity
+						.hasMessageBodyInputPort((HTTP_METHOD) cbHTTPMethod
+								.getSelectedItem());
+
+				jlContentTypeExplanation.setVisible(contentTypeSelEnabled);
+				jlContentType.setVisible(contentTypeSelEnabled);
+				cbContentType.setVisible(contentTypeSelEnabled);
+				jlSendDataAs.setVisible(contentTypeSelEnabled);
+				cbSendDataAs.setVisible(contentTypeSelEnabled);
+
+				jlContentTypeExplanationPlaceholder
+						.setVisible(!contentTypeSelEnabled);
+				jlContentTypeLabelPlaceholder
+						.setVisible(!contentTypeSelEnabled);
+				jlContentTypeFieldPlaceholder
+						.setVisible(!contentTypeSelEnabled);
+				jlSendDataAsLabelPlaceholder.setVisible(!contentTypeSelEnabled);
+				jlSendDataAsFieldPlaceholder.setVisible(!contentTypeSelEnabled);
+			}
+		});
+		jpGeneral.add(cbHTTPMethod, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		c.insets = new Insets(3, 7, 3, 3);
+		c.fill = GridBagConstraints.NONE;
+		c.weightx = 0.0;
+		JLabel labelString = new JLabel("URL Template:", infoIcon, JLabel.LEFT);
+		labelString
+				.setToolTipText("<html>URL template enables to define a URL with <b>configurable<br>"
+						+ "parameters</b> that will be used to access a remote server.<br><br>"
+						+ "The template may contain zero or more <b>parameters</b> - each<br>"
+						+ "enclosed within curly braces <b>\"{\"</b> and <b>\"}\"</b>.<br>"
+						+ "Taverna will automatically create an individual input port for<br>"
+						+ "this activity for each parameter.<br><br>"
+						+ "Values extracted from these input ports during the workflow<br>"
+						+ "execution these will be used to replace the parameters to<br>"
+						+ "produce complete URLs.<br><br>"
+						+ "For example, if the URL template is configured as<br>"
+						+ "\"<i>http://www.myexperiment.org/user.xml?id={userID}</i>\", a<br>"
+						+ "single input port with the name \"<i>userID</i>\" will be created.</html>");
+		labelString.setLabelFor(tfURLSignature);
+		jpGeneral.add(labelString, c);
+
+		c.gridx++;
+		c.insets = new Insets(3, 3, 3, 7);
+		c.fill = GridBagConstraints.HORIZONTAL;
+		c.weightx = 1.0;
+		tfURLSignature = new JTextField(40);
+		tfURLSignature.addFocusListener(new FocusListener() {
+			public void focusGained(FocusEvent e) {
+				tfURLSignature.selectAll();
+			}
+
+			public void focusLost(FocusEvent e) { /* do nothing */
+			}
+		});
+		jpGeneral.add(tfURLSignature, c);
+
+		c.gridx = 0;
+		c.gridwidth = 2;
+		c.gridy++;
+		c.weightx = 0.0;
+		c.fill = GridBagConstraints.NONE;
+		c.insets = new Insets(18, 7, 3, 7);
+		JLabel jlAcceptsExplanation = new JLabel(
+				"Preferred MIME type for data to be fetched from the remote server --");
+		jpGeneral.add(jlAcceptsExplanation, c);
+		c.gridwidth = 1;
+
+		c.gridx = 0;
+		c.gridy++;
+		c.insets = new Insets(3, 7, 3, 3);
+		c.weightx = 0.0;
+		c.fill = GridBagConstraints.NONE;
+		JLabel jlAccepts = new JLabel("'Accept' header:", infoIcon, JLabel.LEFT);
+		jlAccepts
+				.setToolTipText("<html>Select a MIME type from the drop-down menu or type your own.<br>Select blank if you do not want this header to be set.</br>");
+		jlAccepts.setLabelFor(cbAccepts);
+		jpGeneral.add(jlAccepts, c);
+
+		c.gridx++;
+		c.insets = new Insets(3, 3, 3, 7);
+		c.weightx = 1.0;
+		c.fill = GridBagConstraints.HORIZONTAL;
+		cbAccepts = new JComboBox<>(getMediaTypes());
+		cbAccepts.setEditable(true);
+		cbAccepts.getEditor().getEditorComponent().addFocusListener(
+				new FocusListener() {
+					public void focusGained(FocusEvent e) {
+						cbAccepts.getEditor().selectAll();
+					}
+
+					public void focusLost(FocusEvent e) { /* do nothing */
+					}
+				});
+		jpGeneral.add(cbAccepts, c);
+
+		c.gridx = 0;
+		c.gridwidth = 2;
+		c.gridy++;
+		c.insets = new Insets(18, 7, 3, 7);
+		c.weightx = 0.0;
+		c.fill = GridBagConstraints.NONE;
+		jlContentTypeExplanation = new JLabel(
+				"MIME type of data that will be sent to the remote server --");
+		jpGeneral.add(jlContentTypeExplanation, c);
+		c.gridwidth = 1;
+
+		c.gridx = 0;
+		c.gridy++;
+		c.insets = new Insets(3, 7, 3, 3);
+		c.weightx = 0.0;
+		c.fill = GridBagConstraints.NONE;
+		jlContentType = new JLabel("'Content-Type' header:", infoIcon,
+				JLabel.LEFT);
+		jlContentType
+				.setToolTipText("<html>Select a MIME type from the drop-down menu or type your own.<br>Select blank if you do not want this header to be set.</html>");
+		jlContentType.setLabelFor(cbContentType);
+		jpGeneral.add(jlContentType, c);
+
+		c.gridx++;
+		c.insets = new Insets(3, 3, 3, 7);
+		c.weightx = 1.0;
+		c.fill = GridBagConstraints.HORIZONTAL;
+		cbContentType = new JComboBox<>(getMediaTypes());
+		cbContentType.setEditable(true);
+		cbContentType.getEditor().getEditorComponent().addFocusListener(
+				new FocusListener() {
+					public void focusGained(FocusEvent e) {
+						cbContentType.getEditor().selectAll();
+					}
+
+					public void focusLost(FocusEvent e) { /* do nothing */
+					}
+				});
+		cbContentType.addActionListener(new ActionListener() {
+			public void actionPerformed(ActionEvent e) {
+				// change selection in the "Send data as" combo-box, based on
+				// the selection of Content-Type
+				String selectedContentType = (String) cbContentType
+						.getSelectedItem();
+				if (selectedContentType.startsWith("text")) {
+					cbSendDataAs.setSelectedItem(DATA_FORMAT.String);
+				} else {
+					cbSendDataAs.setSelectedItem(DATA_FORMAT.Binary);
+				}
+			}
+		});
+		jpGeneral.add(cbContentType, c);
+
+		c.gridx = 0;
+		c.gridwidth = 2;
+		c.gridy++;
+		c.insets = new Insets(18, 7, 3, 7);
+		c.weightx = 0.0;
+		c.fill = GridBagConstraints.NONE;
+		jlContentTypeExplanationPlaceholder = new JLabel();
+		jlContentTypeExplanationPlaceholder
+				.setPreferredSize(jlContentTypeExplanation.getPreferredSize());
+		jpGeneral.add(jlContentTypeExplanationPlaceholder, c);
+		c.gridwidth = 1;
+
+		c.gridx = 0;
+		c.gridy++;
+		c.insets = new Insets(3, 7, 3, 3);
+		c.weightx = 0.0;
+		c.fill = GridBagConstraints.NONE;
+		jlContentTypeLabelPlaceholder = new JLabel();
+		jlContentTypeLabelPlaceholder.setPreferredSize(jlContentType
+				.getPreferredSize());
+		jpGeneral.add(jlContentTypeLabelPlaceholder, c);
+
+		c.gridx++;
+		c.insets = new Insets(3, 3, 3, 7);
+		c.weightx = 1.0;
+		c.fill = GridBagConstraints.HORIZONTAL;
+		jlContentTypeFieldPlaceholder = new JLabel();
+		jlContentTypeFieldPlaceholder.setPreferredSize(cbContentType
+				.getPreferredSize());
+		jpGeneral.add(jlContentTypeFieldPlaceholder, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		c.weightx = 0.0;
+		c.fill = GridBagConstraints.NONE;
+		c.insets = new Insets(3, 7, 8, 3);
+		jlSendDataAs = new JLabel("Send data as:", infoIcon, JLabel.LEFT);
+		jlSendDataAs
+				.setToolTipText("Select the format for the data to be sent to the remote server");
+		jlSendDataAs.setLabelFor(cbSendDataAs);
+		jpGeneral.add(jlSendDataAs, c);
+
+		c.gridx++;
+		c.insets = new Insets(3, 3, 8, 7);
+		c.weightx = 1.0;
+		c.fill = GridBagConstraints.HORIZONTAL;
+		cbSendDataAs = new JComboBox<>(DATA_FORMAT.values());
+		cbSendDataAs.setEditable(false);
+		jpGeneral.add(cbSendDataAs, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		c.insets = new Insets(3, 7, 8, 3);
+		c.weightx = 0.0;
+		c.fill = GridBagConstraints.NONE;
+		jlSendDataAsLabelPlaceholder = new JLabel();
+		jlSendDataAsLabelPlaceholder.setPreferredSize(jlSendDataAs
+				.getPreferredSize());
+		jpGeneral.add(jlSendDataAsLabelPlaceholder, c);
+
+		c.gridx++;
+		c.insets = new Insets(3, 3, 8, 7);
+		c.weightx = 1.0;
+		c.fill = GridBagConstraints.HORIZONTAL;
+		jlSendDataAsFieldPlaceholder = new JLabel();
+		jlSendDataAsFieldPlaceholder.setPreferredSize(cbSendDataAs
+				.getPreferredSize());
+		jpGeneral.add(jlSendDataAsFieldPlaceholder, c);
+
+		JPanel finalPanel = new JPanel(new BorderLayout());
+		finalPanel.add(jpGeneral, BorderLayout.NORTH);
+		return (finalPanel);
+	}
+
+	private String[] getMediaTypes() {
+		if (mediaTypes != null) {
+			return mediaTypes;
+		}
+		List<String> types = new ArrayList<String>();
+		InputStream typesStream = getClass().getResourceAsStream(
+				"mediatypes.txt");
+		try {
+			// media types must be ASCII and can't have whitespace
+			Scanner scanner = new Scanner(typesStream, "ascii");
+			while (scanner.hasNext()) {
+				types.add(scanner.next());
+			}
+			scanner.close();
+		} finally {
+			try {
+				typesStream.close();
+			} catch (IOException ex) {
+			}
+		}
+		mediaTypes = types.toArray(new String[0]);
+
+		return mediaTypes;
+	}
+
+	private JPanel createAdvancedTab() {
+		JPanel jpAdvanced = new JPanel(new GridBagLayout());
+		GridBagConstraints c = new GridBagConstraints();
+
+		c.gridx = 0;
+		c.gridy = 0;
+		c.anchor = GridBagConstraints.WEST;
+		c.fill = GridBagConstraints.BOTH;
+		c.insets = new Insets(8, 10, 2, 4);
+		JLabel jlExpectHeaderInfoIcon = new JLabel(infoIcon);
+		jlExpectHeaderInfoIcon
+				.setToolTipText("<html>Ticking this checkbox may significantly improve performance when<br>"
+						+ "large volumes of data are sent to the remote server and a redirect<br>"
+						+ "from the original URL to the one specified by the server is likely.<br>"
+						+ "<br>"
+						+ "However, this checkbox <b>must not</b> be ticked to allow this activity<br>"
+						+ "to post updates to Twitter.</html>");
+		jpAdvanced.add(jlExpectHeaderInfoIcon, c);
+
+		c.gridx++;
+		c.weightx = 1.0;
+		c.insets = new Insets(8, 0, 2, 8);
+		cbSendHTTPExpectHeader = new JCheckBox(
+				"Send HTTP Expect request-header field");
+		jpAdvanced.add(cbSendHTTPExpectHeader, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		c.weightx = 0;
+		c.insets = new Insets(2, 10, 5, 4);
+		JLabel jlShowRedirectionOutputPortInfoIcon = new JLabel(infoIcon);
+		jlShowRedirectionOutputPortInfoIcon
+				.setToolTipText("<html>\"Redirection\" output port displays the URL of the final redirect<br>"
+						+ "that has yielded the output data on the \"Response Body\" port.</html>");
+		jpAdvanced.add(jlShowRedirectionOutputPortInfoIcon, c);
+
+		c.gridx++;
+		c.weightx = 1.0;
+		c.insets = new Insets(2, 0, 5, 8);
+		cbShowRedirectionOutputPort = new JCheckBox(
+				"Show \"Redirection\" output port");
+		jpAdvanced.add(cbShowRedirectionOutputPort, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		c.weightx = 0;
+		c.insets = new Insets(2, 10, 5, 4);
+		JLabel jlShowActualUrlPortInfoIcon = new JLabel(infoIcon);
+		jlShowActualUrlPortInfoIcon
+				.setToolTipText("<html>\"Actual URL\" output port displays the URL used by the REST service<br>"
+						+ "with the actual parameter values.</html>");
+		jpAdvanced.add(jlShowActualUrlPortInfoIcon, c);
+
+		c.gridx++;
+		c.weightx = 1.0;
+		c.insets = new Insets(2, 0, 5, 8);
+		cbShowActualUrlPort = new JCheckBox(
+				"Show \"Actual URL\" output port");
+		jpAdvanced.add(cbShowActualUrlPort, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		c.weightx = 0;
+		c.insets = new Insets(2, 10, 5, 4);
+		JLabel jlShowResponseHeadersPortInfoIcon = new JLabel(infoIcon);
+		jlShowResponseHeadersPortInfoIcon
+				.setToolTipText("<html>\"Response headers\" output port displays the HTTP headers<br>"
+						+ "received from the final (after redirection) HTTP call.</html>");
+		jpAdvanced.add(jlShowResponseHeadersPortInfoIcon, c);
+
+		c.gridx++;
+		c.weightx = 1.0;
+		c.insets = new Insets(2, 0, 5, 8);
+		cbShowResponseHeadersPort = new JCheckBox(
+				"Show \"Response headers\" output port");
+		jpAdvanced.add(cbShowResponseHeadersPort, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		c.weightx = 0;
+		c.insets = new Insets(2, 10, 5, 4);
+		JLabel jlEscapeParametersInfoIcon = new JLabel(infoIcon);
+		jlEscapeParametersInfoIcon
+				.setToolTipText("<html>Determines if parameters you pass to form the full URL<br>" +
+						" of the REST service will be URL-escaped.</html>");
+		jpAdvanced.add(jlEscapeParametersInfoIcon, c);
+
+		c.gridx++;
+		c.weightx = 1.0;
+		c.insets = new Insets(2, 0, 5, 8);
+		cbEscapeParameters = new JCheckBox("Escape URL parameter values");
+		jpAdvanced.add(cbEscapeParameters, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		c.weightx = 0;
+		c.anchor = GridBagConstraints.WEST;
+		c.fill = GridBagConstraints.NONE;
+		c.insets = new Insets(2, 10, 5, 4);
+		JLabel jlHTTPHeadersInfoIcon = new JLabel(infoIcon);
+		jlHTTPHeadersInfoIcon
+				.setToolTipText("<html>Set additional HTTP headers</html>");
+		jpAdvanced.add(jlHTTPHeadersInfoIcon, c);
+
+		c.gridx = 1;
+		c.weightx = 0;
+		c.weighty = 0;
+		c.anchor = GridBagConstraints.WEST;
+		c.fill = GridBagConstraints.NONE;
+		c.insets = new Insets(2, 10, 5, 4);
+		addHeaderButton = new JButton("Add HTTP header");
+		addHeaderButton.addActionListener(new ActionListener() {
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				httpHeadersTableModel.addEmptyRow();
+				httpHeadersTable.getSelectionModel().setSelectionInterval(httpHeadersTableModel.getRowCount() - 1, httpHeadersTableModel.getRowCount() - 1);			}
+		});
+		removeHeaderButton = new JButton("Remove HTTP header");
+		removeHeaderButton.addActionListener(new ActionListener() {
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				int row = httpHeadersTable.getSelectedRow();
+				httpHeadersTableModel.removeRow(row);
+			}
+		});
+		JPanel buttonPanel = new JPanel();
+		buttonPanel.add(addHeaderButton, FlowLayout.LEFT);
+		buttonPanel.add(removeHeaderButton);
+		jpAdvanced.add(buttonPanel, c);
+
+		c.gridx = 1;
+		c.gridy++;
+		c.weightx = 0;
+		c.weighty = 1.0;
+		c.fill = GridBagConstraints.BOTH;
+		c.insets = new Insets(2, 10, 5, 4);
+		httpHeadersTableModel = new HTTPHeadersTableModel();
+		httpHeadersTable = new JTable(httpHeadersTableModel);
+		httpHeadersTable.setGridColor(Color.GRAY);
+		httpHeadersTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+		setVisibleRowCount(httpHeadersTable, 3);
+		JScrollPane headersTableScrollPane = new JScrollPane(httpHeadersTable);
+		jpAdvanced.add(headersTableScrollPane, c);
+
+		return (jpAdvanced);
+	}
+
+	/*
+	 * Based on http://www.javalobby.org/java/forums/t19559.html
+	 */
+	public static void setVisibleRowCount(JTable table, int visibleRows){
+	    int height = 0;
+	    for(int row = 0; row < visibleRows; row++)
+	        height += table.getRowHeight(row);
+
+	    table.setPreferredScrollableViewportSize(new Dimension(
+	            table.getPreferredScrollableViewportSize().width,
+	            height));
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigureAction.java
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigureAction.java b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigureAction.java
new file mode 100644
index 0000000..bfb50d0
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/config/RESTActivityConfigureAction.java
@@ -0,0 +1,51 @@
+package net.sf.taverna.t2.activities.rest.ui.config;
+
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+@SuppressWarnings("serial")
+/**
+ * @author Sergejs Aleksejevs
+ * @author David Withers
+ */
+public class RESTActivityConfigureAction extends ActivityConfigurationAction {
+
+	private final EditManager editManager;
+	private final FileManager fileManager;
+	private final ServiceRegistry serviceRegistry;
+
+	public RESTActivityConfigureAction(Activity activity, Frame owner, EditManager editManager,
+			FileManager fileManager, ActivityIconManager activityIconManager,
+			ServiceDescriptionRegistry serviceDescriptionRegistry, ServiceRegistry serviceRegistry) {
+		super(activity, activityIconManager, serviceDescriptionRegistry);
+		this.editManager = editManager;
+		this.fileManager = fileManager;
+		this.serviceRegistry = serviceRegistry;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		ActivityConfigurationDialog currentDialog = ActivityConfigurationAction
+				.getDialog(getActivity());
+
+		if (currentDialog != null) {
+			currentDialog.toFront();
+			return;
+		}
+
+		RESTActivityConfigurationPanel panel = new RESTActivityConfigurationPanel(getActivity(), serviceRegistry);
+		ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(getActivity(), panel,
+				editManager);
+
+		ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateAction.java
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateAction.java b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateAction.java
new file mode 100644
index 0000000..96326f6
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateAction.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.rest.ui.menu;
+
+import java.awt.event.ActionEvent;
+import java.net.URI;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+
+import net.sf.taverna.t2.activities.rest.ui.servicedescription.GenericRESTTemplateService;
+import net.sf.taverna.t2.ui.menu.AbstractContextualMenuAction;
+import net.sf.taverna.t2.ui.menu.MenuManager;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.core.Workflow;
+
+/**
+ * An action to add a REST activity + a wrapping processor to the workflow.
+ *
+ * @author Alex Nenadic
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class AddRESTTemplateAction extends AbstractContextualMenuAction {
+
+	private static final String ADD_REST = "REST";
+
+	private static final URI insertSection = URI
+			.create("http://taverna.sf.net/2009/contextMenu/insert");
+
+	private EditManager editManager;
+	private MenuManager menuManager;
+	private SelectionManager selectionManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceRegistry serviceRegistry;
+
+	public AddRESTTemplateAction() {
+		super(insertSection, 500);
+	}
+
+	@Override
+	public boolean isEnabled() {
+		return super.isEnabled() && getContextualSelection().getSelection() instanceof Workflow;
+	}
+
+	@Override
+	protected Action createAction() {
+
+		return new AddRestAction();
+	}
+
+	protected class AddRestAction extends AbstractAction {
+		AddRestAction() {
+			super(ADD_REST, activityIconManager
+					.iconForActivity(GenericRESTTemplateService.ACTIVITY_TYPE));
+		}
+
+		public void actionPerformed(ActionEvent e) {
+			WorkflowView.importServiceDescription(
+					GenericRESTTemplateService.getServiceDescription(), false, editManager,
+					menuManager, selectionManager, serviceRegistry);
+		}
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setMenuManager(MenuManager menuManager) {
+		this.menuManager = menuManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateMenuAction.java b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateMenuAction.java
new file mode 100644
index 0000000..ec738e2
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/menu/AddRESTTemplateMenuAction.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.rest.ui.menu;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.net.URI;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.KeyStroke;
+
+import net.sf.taverna.t2.activities.rest.ui.servicedescription.GenericRESTTemplateService;
+import net.sf.taverna.t2.ui.menu.AbstractMenuAction;
+import net.sf.taverna.t2.ui.menu.DesignOnlyAction;
+import net.sf.taverna.t2.ui.menu.MenuManager;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
+import uk.org.taverna.commons.services.ServiceRegistry;
+
+/**
+ * An action to add a REST activity + a wrapping processor to the workflow.
+ *
+ * @author Alex Nenadic
+ * @author alanrw
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class AddRESTTemplateMenuAction extends AbstractMenuAction {
+
+	private static final String ADD_REST = "REST";
+
+	private static final URI INSERT = URI
+			.create("http://taverna.sf.net/2008/t2workbench/menu#insert");
+
+	private static final URI ADD_REST_URI = URI
+			.create("http://taverna.sf.net/2008/t2workbench/menu#graphMenuAddREST");
+
+	private EditManager editManager;
+	private MenuManager menuManager;
+	private SelectionManager selectionManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceRegistry serviceRegistry;
+
+	public AddRESTTemplateMenuAction() {
+		super(INSERT, 500, ADD_REST_URI);
+	}
+
+	@Override
+	protected Action createAction() {
+		return new AddRESTMenuAction();
+	}
+
+	protected class AddRESTMenuAction extends AbstractAction implements DesignOnlyAction {
+		AddRESTMenuAction() {
+			super();
+			putValue(SMALL_ICON, activityIconManager.iconForActivity(GenericRESTTemplateService.ACTIVITY_TYPE));
+			putValue(NAME, ADD_REST);
+			putValue(SHORT_DESCRIPTION, "REST service");
+			putValue(
+					Action.ACCELERATOR_KEY,
+					KeyStroke.getKeyStroke(KeyEvent.VK_H, InputEvent.SHIFT_DOWN_MASK
+							| InputEvent.ALT_DOWN_MASK));
+		}
+
+		public void actionPerformed(ActionEvent e) {
+			WorkflowView.importServiceDescription(
+					GenericRESTTemplateService.getServiceDescription(), false, editManager,
+					menuManager, selectionManager, serviceRegistry);
+		}
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setMenuManager(MenuManager menuManager) {
+		this.menuManager = menuManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/GenericRESTTemplateService.java
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/GenericRESTTemplateService.java b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/GenericRESTTemplateService.java
new file mode 100644
index 0000000..69a3b96
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/GenericRESTTemplateService.java
@@ -0,0 +1,76 @@
+package net.sf.taverna.t2.activities.rest.ui.servicedescription;
+
+import java.net.URI;
+
+import javax.swing.Icon;
+
+import net.sf.taverna.t2.activities.rest.RESTActivity;
+import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+/**
+ * @author Sergejs Aleksejevs
+ * @author David Withers
+ */
+public class GenericRESTTemplateService extends AbstractTemplateService {
+
+	public static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/rest");
+
+	private static final String REST = "REST";
+
+	@Override
+	public URI getActivityType() {
+		return ACTIVITY_TYPE;
+	}
+
+	@Override
+	public Configuration getActivityConfiguration() {
+		Configuration configuration = new Configuration();
+		configuration.setType(ACTIVITY_TYPE.resolve("#Config"));
+		ObjectNode json = (ObjectNode) configuration.getJson();
+		ObjectNode requestNode = json.objectNode();
+
+		requestNode.put("httpMethod", RESTActivity.HTTP_METHOD.GET.name());
+		requestNode.put("absoluteURITemplate", "http://www.uniprot.org/uniprot/{id}.xml");
+
+		ArrayNode headersNode = requestNode.arrayNode();
+		headersNode.addObject().put("header", "Accept").put("value", "application/xml");
+		headersNode.addObject().put("header", "Content-Type").put("value", "application/xml");
+
+		requestNode.set("headers", headersNode);
+		json.set("request", requestNode);
+		json.put("outgoingDataFormat", RESTActivity.DATA_FORMAT.String.name());
+		json.put("showRedirectionOutputPort", false);
+		json.put("showActualURLPort", false);
+		json.put("showResponseHeadersPort", false);
+		json.put("escapeParameters", true);
+		return configuration;
+	}
+
+	@Override
+	public Icon getIcon() {
+		return RESTActivityIcon.getRESTActivityIcon();
+	}
+
+	public String getName() {
+		return REST;
+	}
+
+	public String getDescription() {
+		return "A generic REST service that can handle all HTTP methods";
+	}
+
+	public static ServiceDescription getServiceDescription() {
+		GenericRESTTemplateService gts = new GenericRESTTemplateService();
+		return gts.templateService;
+	}
+
+	public String getId() {
+		return "http://www.taverna.org.uk/2010/services/rest";
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/RESTActivityIcon.java
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/RESTActivityIcon.java b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/RESTActivityIcon.java
new file mode 100644
index 0000000..c2309a9
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/servicedescription/RESTActivityIcon.java
@@ -0,0 +1,54 @@
+package net.sf.taverna.t2.activities.rest.ui.servicedescription;
+
+import java.awt.Color;
+import java.net.URI;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+
+/**
+ *
+ * @author Sergejs Aleksejevs
+ * @author David Withers
+ */
+public class RESTActivityIcon implements ActivityIconSPI {
+	private static final Color PROCESSOR_COLOUR = Color.decode("#7AAFFF");
+
+	private static ImageIcon icon;
+
+	public int canProvideIconScore(URI activityType) {
+		if (GenericRESTTemplateService.ACTIVITY_TYPE.equals(activityType))
+			return DEFAULT_ICON + 1;
+		else
+			return NO_ICON;
+	}
+
+	public Icon getIcon(URI activityType) {
+		return getRESTActivityIcon();
+	}
+
+	public static Icon getRESTActivityIcon() {
+		if (icon == null) {
+			synchronized (RESTActivityIcon.class) {
+				if (icon == null) {
+					try {
+						icon = new ImageIcon(
+								RESTActivityIcon.class.getResource("service_type_rest.png"));
+					} catch (NullPointerException e) {
+						/* icon wasn't found - do nothing, but no icon will be available */
+					}
+				}
+			}
+		}
+		return (icon);
+	}
+
+	public void setColourManager(ColourManager colourManager) {
+		// set colour for REST processors in the workflow diagram
+		colourManager.setPreferredColour(GenericRESTTemplateService.ACTIVITY_TYPE.toString(), PROCESSOR_COLOUR);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceDesc.java.bak
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceDesc.java.bak b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceDesc.java.bak
new file mode 100644
index 0000000..5d9848d
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceDesc.java.bak
@@ -0,0 +1,99 @@
+package net.sf.taverna.t2.activities.rest.ui.serviceprovider;
+
+import java.net.URI;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+
+import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
+import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
+
+import net.sf.taverna.t2.activities.rest.RESTActivity;
+import net.sf.taverna.t2.activities.rest.RESTActivityConfigurationBean;
+
+public class ExampleServiceDesc extends ServiceDescription<RESTActivityConfigurationBean>
+{
+	/**
+	 * The subclass of Activity which should be instantiated when adding a service
+	 * for this description 
+	 */
+	@Override
+	public Class<? extends Activity<RESTActivityConfigurationBean>> getActivityClass() {
+		return RESTActivity.class;
+	}
+
+	/**
+	 * The configuration bean which is to be used for configuring the instantiated activity.
+	 * Making this bean will typically require some of the fields set on this service
+	 * description, like an endpoint URL or method name. 
+	 * 
+	 */
+	@Override
+	public RESTActivityConfigurationBean getActivityConfiguration() {
+		RESTActivityConfigurationBean bean = new RESTActivityConfigurationBean();
+		bean.setExampleString(exampleString);
+		bean.setExampleUri(exampleUri);
+		return bean;
+	}
+
+	/**
+	 * An icon to represent this service description in the service palette.
+	 */
+	@Override
+	public Icon getIcon() {
+	  return null;
+	}
+
+	/**
+	 * The display name that will be shown in service palette and will
+	 * be used as a template for processor name when added to workflow.
+	 */
+	@Override
+	public String getName() {
+		return exampleString;
+	}
+
+	/**
+	 * The path to this service description in the service palette. Folders
+	 * will be created for each element of the returned path.
+	 */
+	@Override
+	public List<String> getPath() {
+		// For deeper paths you may return several strings
+		return Arrays.asList("Service templates", "Examples " + exampleUri);
+	}
+
+	/**
+	 * Return a list of data values uniquely identifying this service
+	 * description (to avoid duplicates). Include only primary key like fields,
+	 * ie. ignore descriptions, icons, etc.
+	 */
+	@Override
+	protected List<? extends Object> getIdentifyingData() {
+		// FIXME: Use your fields instead of example fields
+		return Arrays.<Object>asList(exampleString, exampleUri);
+	}
+
+	
+	// FIXME: Replace example fields and getters/setters with any required
+	// and optional fields. (All fields are searchable in the Service palette,
+	// for instance try a search for exampleString:3)
+	private String exampleString;
+	private URI exampleUri;
+	public String getExampleString() {
+		return exampleString;
+	}
+	public URI getExampleUri() {
+		return exampleUri;
+	}
+	public void setExampleString(String exampleString) {
+		this.exampleString = exampleString;
+	}
+	public void setExampleUri(URI exampleUri) {
+		this.exampleUri = exampleUri;
+	}
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProvider.java.bak
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProvider.java.bak b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProvider.java.bak
new file mode 100644
index 0000000..ff11dbe
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProvider.java.bak
@@ -0,0 +1,106 @@
+package net.sf.taverna.t2.activities.rest.ui.serviceprovider;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JOptionPane;
+
+import net.sf.taverna.t2.servicedescriptions.AbstractConfigurableServiceProvider;
+import net.sf.taverna.t2.servicedescriptions.ConfigurableServiceProvider;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider;
+import net.sf.taverna.t2.workflowmodel.ConfigurationException;
+
+public class ExampleServiceProvider extends AbstractConfigurableServiceProvider<ExampleServiceProviderConfig>
+                                    implements ConfigurableServiceProvider<ExampleServiceProviderConfig>
+{
+	public ExampleServiceProvider()
+	{
+    super(new ExampleServiceProviderConfig());
+  }
+
+  /**
+	 * Do the actual search for services. Return using the callBack parameter.
+	 */
+	@SuppressWarnings("unchecked")
+	public void findServiceDescriptionsAsync(
+			FindServiceDescriptionsCallBack callBack) {
+		// Use callback.status() for long-running searches
+		// callBack.status("Resolving example services");
+
+		List<ServiceDescription> results = new ArrayList<ServiceDescription>();
+
+		// FIXME: Implement the actual service search/lookup instead
+		// of dummy for-loop
+		for (int i = 1; i <= getConfiguration().getNumberOfServices(); i++) {
+			ExampleServiceDesc service = new ExampleServiceDesc();
+			// Populate the service description bean
+			service.setExampleString("Example " + i);
+			service.setExampleUri(getConfiguration().getUri());
+
+			// Optional: set description
+			service.setDescription("Service example number " + i);
+			results.add(service);
+		}
+		
+		// partialResults() can also be called several times from inside
+		// for-loop if the full search takes a long time
+		callBack.partialResults(results);
+
+		// No more results will be coming
+		callBack.finished();
+	}
+	
+	
+//	@Override
+//	/**
+//	 * This allows to have a few configured service providers in the Service Panel at startup;
+//	 * useful if there are some prototypical ones that are useful + need to allow users to add their own
+//	 * through manual config.
+//	 */
+//	public List<ExampleServiceProviderConfig> getDefaultConfigurations() {
+//	  ExampleServiceProviderConfig a = new ExampleServiceProviderConfig();
+//	  a.setUri(URI.create("http://localhost:8181/serviceA"));
+//	  ExampleServiceProviderConfig b = new ExampleServiceProviderConfig();
+//	  b.setUri(URI.create("http://fish.com/serviceB"));
+//	  b.setNumberOfServices(2);
+//	  return Arrays.asList(a, b);
+//	}
+
+	
+
+	/**
+	 * Icon for service provider
+	 */
+	public Icon getIcon() {
+		return null;
+	}
+
+	
+	/**
+	 * Appears in "Import new services..." in Service Panel
+	 */
+	public String getName() {
+		return "My example service";
+	}
+	
+	@Override
+	/**
+   * Name of service provider, appears in right click for 'Remove service
+   * provider'
+   */
+	public String toString() {
+		return getName() + " " + getConfiguration().getUri();
+	}
+
+  @Override
+  protected List<? extends Object> getIdentifyingData() {
+    return Arrays.asList(getConfiguration().getUri());
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProviderConfig.java.bak
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProviderConfig.java.bak b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProviderConfig.java.bak
new file mode 100644
index 0000000..22d8546
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/serviceprovider/ExampleServiceProviderConfig.java.bak
@@ -0,0 +1,31 @@
+package net.sf.taverna.t2.activities.rest.ui.serviceprovider;
+
+import java.net.URI;
+
+import net.sf.taverna.t2.lang.beans.PropertyAnnotated;
+import net.sf.taverna.t2.lang.beans.PropertyAnnotation;
+
+public class ExampleServiceProviderConfig extends PropertyAnnotated
+{
+  private URI uri = URI.create("http://www.example.com");
+  private int numberOfServices = 5;
+  
+  @PropertyAnnotation(displayName="Provider URI", preferred=true)
+  public URI getUri() {
+    return uri;
+  }
+  
+  public void setUri(URI uri) {
+    this.uri = uri;
+  }
+  
+  @PropertyAnnotation(displayName="Number of services")
+  public int getNumberOfServices() {
+    return numberOfServices;
+  }
+  
+  public void setNumberOfServices(int numberOfServices) {
+    this.numberOfServices = numberOfServices;
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/ConfigureRESTActivityMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/ConfigureRESTActivityMenuAction.java b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/ConfigureRESTActivityMenuAction.java
new file mode 100644
index 0000000..91e198f
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/ConfigureRESTActivityMenuAction.java
@@ -0,0 +1,66 @@
+package net.sf.taverna.t2.activities.rest.ui.view;
+
+import javax.swing.Action;
+
+import uk.org.taverna.commons.services.ServiceRegistry;
+
+import net.sf.taverna.t2.activities.rest.ui.config.RESTActivityConfigureAction;
+import net.sf.taverna.t2.activities.rest.ui.servicedescription.GenericRESTTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+
+/**
+ * This action is responsible for enabling the contextual menu entry on processors that perform
+ * RESTActivity'ies.
+ * NB! As a side-effect this also enables the pop-up with for configuration of the processor when it
+ * is added to the workflow from the Service Panel.
+ *
+ * @author Sergejs Aleksejevs
+ * @author David Withers
+ */
+public class ConfigureRESTActivityMenuAction extends AbstractConfigureActivityMenuAction {
+
+	private EditManager editManager;
+	private FileManager fileManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ServiceRegistry serviceRegistry;
+
+	public ConfigureRESTActivityMenuAction() {
+		super(GenericRESTTemplateService.ACTIVITY_TYPE);
+	}
+
+	@Override
+	protected Action createAction() {
+		RESTActivityConfigureAction configAction = new RESTActivityConfigureAction(findActivity(),
+				getParentFrame(), editManager, fileManager, activityIconManager,
+				serviceDescriptionRegistry, serviceRegistry);
+		configAction.putValue(Action.NAME, "Configure REST service");
+		addMenuDots(configAction);
+		return configAction;
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextViewFactory.java
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextViewFactory.java b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextViewFactory.java
new file mode 100644
index 0000000..5bea949
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextViewFactory.java
@@ -0,0 +1,62 @@
+package net.sf.taverna.t2.activities.rest.ui.view;
+
+import java.util.Arrays;
+import java.util.List;
+
+import net.sf.taverna.t2.activities.rest.ui.servicedescription.GenericRESTTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+public class RESTActivityMainContextViewFactory implements ContextualViewFactory<Activity> {
+
+	private EditManager editManager;
+	private FileManager fileManager;
+	private ActivityIconManager activityIconManager;
+	private ColourManager colourManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ServiceRegistry serviceRegistry;
+
+	public boolean canHandle(Object selection) {
+		return selection instanceof Activity
+				&& ((Activity) selection).getType()
+						.equals(GenericRESTTemplateService.ACTIVITY_TYPE);
+	}
+
+	public List<ContextualView> getViews(Activity selection) {
+		return Arrays.<ContextualView> asList(new RESTActivityMainContextualView(selection,
+				editManager, fileManager, activityIconManager, colourManager,
+				serviceDescriptionRegistry, serviceRegistry));
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setColourManager(ColourManager colourManager) {
+		this.colourManager = colourManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextualView.java
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextualView.java b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextualView.java
new file mode 100644
index 0000000..f4ffe0f
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/java/net/sf/taverna/t2/activities/rest/ui/view/RESTActivityMainContextualView.java
@@ -0,0 +1,220 @@
+package net.sf.taverna.t2.activities.rest.ui.view;
+
+import java.awt.Font;
+import java.awt.Frame;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+
+import javax.swing.Action;
+import javax.swing.BorderFactory;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+
+import net.sf.taverna.t2.activities.rest.RESTActivity;
+import net.sf.taverna.t2.activities.rest.RESTActivity.HTTP_METHOD;
+import net.sf.taverna.t2.activities.rest.RESTActivityConfigurationBean;
+import net.sf.taverna.t2.activities.rest.ui.config.RESTActivityConfigureAction;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.activity.Activity;
+import uk.org.taverna.scufl2.api.common.Scufl2Tools;
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+
+@SuppressWarnings("serial")
+public class RESTActivityMainContextualView extends ContextualView {
+
+	private final Scufl2Tools scufl2Tools = new Scufl2Tools();
+
+	private final Activity activity;
+
+	private JPanel jpMainPanel;
+	private JTextField tfHTTPMethod;
+	private JTextArea taURLSignature;
+	private JTextField tfAcceptHeader;
+	private JLabel jlContentType;
+	private JTextField tfContentTypeHeader;
+	private JLabel jlSendDataAs;
+	private JTextField tfSendDataAs;
+	private JLabel jlSendHTTPExpectRequestHeader;
+	private JTextField tfSendHTTPExpectRequestHeader;
+
+	private final EditManager editManager;
+	private final FileManager fileManager;
+	private final ActivityIconManager activityIconManager;
+	private final ColourManager colourManager;
+	private final ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private final ServiceRegistry serviceRegistry;
+
+	public RESTActivityMainContextualView(Activity activity, EditManager editManager,
+			FileManager fileManager, ActivityIconManager activityIconManager,
+			ColourManager colourManager, ServiceDescriptionRegistry serviceDescriptionRegistry,
+			ServiceRegistry serviceRegistry) {
+		this.activity = activity;
+		this.editManager = editManager;
+		this.fileManager = fileManager;
+		this.activityIconManager = activityIconManager;
+		this.colourManager = colourManager;
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+		this.serviceRegistry = serviceRegistry;
+		initView();
+	}
+
+	@Override
+	public JComponent getMainFrame() {
+		jpMainPanel = new JPanel(new GridBagLayout());
+		jpMainPanel
+				.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(4, 2,
+						4, 2), BorderFactory.createLineBorder(
+						colourManager.getPreferredColour(RESTActivity.class.getCanonicalName()), 2)));
+
+		GridBagConstraints c = new GridBagConstraints();
+		c.fill = GridBagConstraints.HORIZONTAL;
+		c.anchor = GridBagConstraints.WEST;
+		c.weighty = 0;
+
+		c.gridx = 0;
+		c.gridy = 0;
+		c.insets = new Insets(5, 5, 5, 5);
+		JLabel jlHTTPMethod = new JLabel("HTTP Method:");
+		jlHTTPMethod.setFont(jlHTTPMethod.getFont().deriveFont(Font.BOLD));
+		jpMainPanel.add(jlHTTPMethod, c);
+
+		c.gridx++;
+		c.weightx = 1.0;
+		tfHTTPMethod = new JTextField();
+		tfHTTPMethod.setEditable(false);
+		jpMainPanel.add(tfHTTPMethod, c);
+		c.weightx = 0;
+
+		c.gridx = 0;
+		c.gridy++;
+		JLabel jlURLSignature = new JLabel("URL Template:");
+		jlURLSignature.setFont(jlURLSignature.getFont().deriveFont(Font.BOLD));
+		jpMainPanel.add(jlURLSignature, c);
+
+		c.gridx++;
+		taURLSignature = new JTextArea(3, 30);
+		taURLSignature.setEditable(false);
+		taURLSignature.setLineWrap(true);
+		JScrollPane spURLSignature = new JScrollPane(taURLSignature);
+		jpMainPanel.add(spURLSignature, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		JLabel jlAcceptHeader = new JLabel("'Accept' header:");
+		jlAcceptHeader.setFont(jlAcceptHeader.getFont().deriveFont(Font.BOLD));
+		jpMainPanel.add(jlAcceptHeader, c);
+
+		c.gridx++;
+		tfAcceptHeader = new JTextField();
+		tfAcceptHeader.setEditable(false);
+		jpMainPanel.add(tfAcceptHeader, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		jlContentType = new JLabel("'Content-Type' header:");
+		jlContentType.setFont(jlContentType.getFont().deriveFont(Font.BOLD));
+		jlContentType.setVisible(false);
+		jpMainPanel.add(jlContentType, c);
+
+		c.gridx++;
+		tfContentTypeHeader = new JTextField();
+		tfContentTypeHeader.setEditable(false);
+		tfContentTypeHeader.setVisible(false);
+		jpMainPanel.add(tfContentTypeHeader, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		jlSendDataAs = new JLabel("Send data as:");
+		jlSendDataAs.setFont(jlSendDataAs.getFont().deriveFont(Font.BOLD));
+		jlSendDataAs.setVisible(false);
+		jpMainPanel.add(jlSendDataAs, c);
+
+		c.gridx++;
+		tfSendDataAs = new JTextField();
+		tfSendDataAs.setEditable(false);
+		tfSendDataAs.setVisible(false);
+		jpMainPanel.add(tfSendDataAs, c);
+
+		c.gridx = 0;
+		c.gridy++;
+		jlSendHTTPExpectRequestHeader = new JLabel("Send HTTP 'Expect' header:");
+		jlSendHTTPExpectRequestHeader.setFont(jlSendHTTPExpectRequestHeader.getFont().deriveFont(
+				Font.BOLD));
+		jlSendHTTPExpectRequestHeader.setVisible(false);
+		jpMainPanel.add(jlSendHTTPExpectRequestHeader, c);
+
+		c.gridx++;
+		tfSendHTTPExpectRequestHeader = new JTextField();
+		tfSendHTTPExpectRequestHeader.setEditable(false);
+		tfSendHTTPExpectRequestHeader.setVisible(false);
+		jpMainPanel.add(tfSendHTTPExpectRequestHeader, c);
+
+		// populate the view with values
+		refreshView();
+
+		return jpMainPanel;
+	}
+
+	@Override
+	/**
+	 * This is the title of the contextual view - shown in the list of other available
+	 * views (even when this contextual view is collapsed).
+	 */
+	public String getViewTitle() {
+		return "REST Service Details";
+	}
+
+	/**
+	 * Typically called when the activity configuration has changed.
+	 */
+	@Override
+	public void refreshView() {
+		Configuration configuration = scufl2Tools.configurationFor(activity, activity.getParent());
+		RESTActivityConfigurationBean configurationBean = new RESTActivityConfigurationBean(configuration.getJson());
+
+		// toggle visibility of the elements that do not always appear
+		HTTP_METHOD httpMethod = configurationBean.getHttpMethod();
+		jlContentType.setVisible(httpMethod == HTTP_METHOD.POST || httpMethod == HTTP_METHOD.PUT);
+		tfContentTypeHeader.setVisible(httpMethod == HTTP_METHOD.POST || httpMethod == HTTP_METHOD.PUT);
+		jlSendDataAs.setVisible(httpMethod == HTTP_METHOD.POST || httpMethod == HTTP_METHOD.PUT);
+		tfSendDataAs.setVisible(httpMethod == HTTP_METHOD.POST || httpMethod == HTTP_METHOD.PUT);
+		jlSendHTTPExpectRequestHeader.setVisible(httpMethod == HTTP_METHOD.POST || httpMethod == HTTP_METHOD.PUT);
+		tfSendHTTPExpectRequestHeader.setVisible(httpMethod == HTTP_METHOD.POST || httpMethod == HTTP_METHOD.PUT);
+		jpMainPanel.revalidate();
+
+		tfHTTPMethod.setText("" + configurationBean.getHttpMethod());
+		taURLSignature.setText(configurationBean.getUrlSignature());
+		tfAcceptHeader.setText(configurationBean.getAcceptsHeaderValue());
+		tfContentTypeHeader.setText(configurationBean.getContentTypeForUpdates());
+		tfSendDataAs.setText("" + configurationBean.getOutgoingDataFormat());
+		tfSendHTTPExpectRequestHeader.setText("" + configurationBean.getSendHTTPExpectRequestHeader());
+	}
+
+	/**
+	 * View position hint
+	 */
+	@Override
+	public int getPreferredPosition() {
+		// want to be on top, as it's the main contextual view for this activity
+		return 100;
+	}
+
+	@Override
+	public Action getConfigureAction(final Frame owner) {
+		// "Configure" button appears because of this action being returned
+		return new RESTActivityConfigureAction(activity, owner, editManager, fileManager,
+				activityIconManager, serviceDescriptionRegistry, serviceRegistry);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
new file mode 100644
index 0000000..a7222c4
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.rest.ui.servicedescription.GenericRESTTemplateService
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
new file mode 100644
index 0000000..a1e5390
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
@@ -0,0 +1,3 @@
+net.sf.taverna.t2.activities.rest.ui.view.ConfigureRESTActivityMenuAction
+net.sf.taverna.t2.activities.rest.ui.menu.AddRESTTemplateAction
+net.sf.taverna.t2.activities.rest.ui.menu.AddRESTTemplateMenuAction
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
new file mode 100644
index 0000000..9440d43
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
@@ -0,0 +1 @@
+net.sf.taverna.t2.activities.rest.ui.servicedescription.RESTActivityIcon
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
new file mode 100644
index 0000000..5325bf1
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
@@ -0,0 +1 @@
+ net.sf.taverna.t2.activities.rest.ui.view.RESTActivityMainContextViewFactory

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/resources/META-INF/spring/rest-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/resources/META-INF/spring/rest-activity-ui-context-osgi.xml b/taverna-rest-activity-ui/src/main/resources/META-INF/spring/rest-activity-ui-context-osgi.xml
new file mode 100644
index 0000000..643d5be
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/resources/META-INF/spring/rest-activity-ui-context-osgi.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:beans="http://www.springframework.org/schema/beans"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd
+                      http://www.springframework.org/schema/osgi
+                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+	<service ref="RESTActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
+
+	<service ref="GenericRESTTemplateService" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
+
+	<service ref="ConfigureRESTActivityMenuAction" auto-export="interfaces" />
+	<service ref="AddRESTTemplateAction" auto-export="interfaces" />
+	<service ref="AddRESTTemplateMenuAction" auto-export="interfaces" />
+
+	<service ref="RESTActivityMainContextViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
+
+	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
+	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
+	<reference id="menuManager" interface="net.sf.taverna.t2.ui.menu.MenuManager" />
+	<reference id="selectionManager" interface="net.sf.taverna.t2.workbench.selection.SelectionManager" />
+	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
+	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
+	<reference id="serviceDescriptionRegistry" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry" />
+	<reference id="serviceRegistry" interface="uk.org.taverna.commons.services.ServiceRegistry" />
+
+</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/resources/META-INF/spring/rest-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/resources/META-INF/spring/rest-activity-ui-context.xml b/taverna-rest-activity-ui/src/main/resources/META-INF/spring/rest-activity-ui-context.xml
new file mode 100644
index 0000000..2b699e7
--- /dev/null
+++ b/taverna-rest-activity-ui/src/main/resources/META-INF/spring/rest-activity-ui-context.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+	<bean id="RESTActivityIcon"
+		class="net.sf.taverna.t2.activities.rest.ui.servicedescription.RESTActivityIcon">
+		<property name="colourManager" ref="colourManager" />
+	</bean>
+
+	<bean id="GenericRESTTemplateService"
+		class="net.sf.taverna.t2.activities.rest.ui.servicedescription.GenericRESTTemplateService" />
+
+	<bean id="ConfigureRESTActivityMenuAction"
+		class="net.sf.taverna.t2.activities.rest.ui.view.ConfigureRESTActivityMenuAction">
+		<property name="editManager" ref="editManager" />
+		<property name="fileManager" ref="fileManager" />
+		<property name="activityIconManager" ref="activityIconManager" />
+		<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+		<property name="serviceRegistry" ref="serviceRegistry" />
+	</bean>
+	<bean id="AddRESTTemplateAction"
+		class="net.sf.taverna.t2.activities.rest.ui.menu.AddRESTTemplateAction">
+		<property name="editManager" ref="editManager" />
+		<property name="menuManager" ref="menuManager" />
+		<property name="selectionManager" ref="selectionManager" />
+		<property name="activityIconManager" ref="activityIconManager" />
+		<property name="serviceRegistry" ref="serviceRegistry" />
+	</bean>
+	<bean id="AddRESTTemplateMenuAction"
+		class="net.sf.taverna.t2.activities.rest.ui.menu.AddRESTTemplateMenuAction">
+		<property name="editManager" ref="editManager" />
+		<property name="menuManager" ref="menuManager" />
+		<property name="selectionManager" ref="selectionManager" />
+		<property name="activityIconManager" ref="activityIconManager" />
+		<property name="serviceRegistry" ref="serviceRegistry" />
+	</bean>
+
+	<bean id="RESTActivityMainContextViewFactory"
+		class="net.sf.taverna.t2.activities.rest.ui.view.RESTActivityMainContextViewFactory">
+		<property name="editManager" ref="editManager" />
+		<property name="fileManager" ref="fileManager" />
+		<property name="activityIconManager" ref="activityIconManager" />
+		<property name="colourManager" ref="colourManager" />
+		<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
+		<property name="serviceRegistry" ref="serviceRegistry" />
+	</bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/11c47f2b/taverna-rest-activity-ui/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/information.png
----------------------------------------------------------------------
diff --git a/taverna-rest-activity-ui/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/information.png b/taverna-rest-activity-ui/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/information.png
new file mode 100644
index 0000000..12cd1ae
Binary files /dev/null and b/taverna-rest-activity-ui/src/main/resources/net/sf/taverna/t2/activities/rest/ui/config/information.png differ


[48/50] [abbrv] incubator-taverna-workbench-common-activities git commit: Merge from https://github.com/taverna/taverna-beanshell-activity-ui master

Posted by st...@apache.org.
Merge from https://github.com/taverna/taverna-beanshell-activity-ui master


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/abdaaa6b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/abdaaa6b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/abdaaa6b

Branch: refs/heads/master
Commit: abdaaa6b4b34fcf23cec5c68e846394f08a497d6
Parents: e91cf39 6b54005
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:34:40 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:34:40 2015 +0000

----------------------------------------------------------------------
 taverna-beanshell-activity-ui/pom.xml           | 100 ++++++++
 .../BeanshellActivityConfigurationAction.java   |  71 ++++++
 .../menu/AddBeanshellTemplateAction.java        | 113 +++++++++
 .../menu/AddBeanshellTemplateMenuAction.java    | 121 ++++++++++
 .../menu/ConfigureBeanshellMenuAction.java      |  67 ++++++
 .../BeanshellActivityIcon.java                  |  58 +++++
 .../BeanshellTemplateService.java               |  57 +++++
 .../views/BeanshellActivityViewFactory.java     |  84 +++++++
 .../views/BeanshellConfigurationPanel.java      | 231 +++++++++++++++++++
 .../views/BeanshellContextualView.java          | 104 +++++++++
 ...rvicedescriptions.ServiceDescriptionProvider |   1 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |   3 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |   1 +
 ...ntextualviews.activity.ContextualViewFactory |   1 +
 .../beanshell-activity-ui-context-osgi.xml      |  29 +++
 .../spring/beanshell-activity-ui-context.xml    |  43 ++++
 .../src/main/resources/beanshell.png            | Bin 0 -> 1015 bytes
 .../t2/activities/beanshell/views/keys.txt      |  90 ++++++++
 18 files changed, 1174 insertions(+)
----------------------------------------------------------------------