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

[01/50] [abbrv] incubator-taverna-common-activities git commit: ASF headers

Repository: incubator-taverna-common-activities
Updated Branches:
  refs/heads/docker 048639d00 -> 1806041ca


ASF headers


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

Branch: refs/heads/docker
Commit: aff32dbb955dbe005a052169ec15d2e23dab3023
Parents: bb25b36
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Apr 28 16:57:41 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Apr 28 16:57:41 2016 +0100

----------------------------------------------------------------------
 .../main/resources/abdera/adapter/feed.properties   | 14 ++++++++++++++
 .../src/main/resources/index                        | 14 ++++++++++++++
 .../src/main/resources/interaction.css              | 16 ++++++++++++++++
 3 files changed, 44 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/aff32dbb/taverna-interaction-activity/src/main/resources/abdera/adapter/feed.properties
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/abdera/adapter/feed.properties b/taverna-interaction-activity/src/main/resources/abdera/adapter/feed.properties
index 3371f38..b031968 100644
--- a/taverna-interaction-activity/src/main/resources/abdera/adapter/feed.properties
+++ b/taverna-interaction-activity/src/main/resources/abdera/adapter/feed.properties
@@ -1,3 +1,17 @@
+##  Licensed to the Apache Software Foundation (ASF) under one or more
+##  contributor license agreements.  See the NOTICE file distributed with
+##  this work for additional information regarding copyright ownership.
+##  The ASF licenses this file to You under the Apache License, Version 2.0
+##  (the "License"); you may not use this file except in compliance with
+##  the License.  You may obtain a copy of the License at
+##
+##  http://www.apache.org/licenses/LICENSE-2.0
+##
+##  Unless required by applicable law or agreed to in writing, software
+##  distributed under the License is distributed on an "AS IS" BASIS,
+##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##  See the License for the specific language governing permissions and
+##  limitations under the License.
 subUri=feed
 adapterClassName=net.sf.taverna.t2.activities.interaction.jetty.HackedFilesystemAdapter
 title=Taverna interaction

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/aff32dbb/taverna-interaction-activity/src/main/resources/index
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/index b/taverna-interaction-activity/src/main/resources/index
index 8d3d1bc..6aecd49 100644
--- a/taverna-interaction-activity/src/main/resources/index
+++ b/taverna-interaction-activity/src/main/resources/index
@@ -1,3 +1,17 @@
+##  Licensed to the Apache Software Foundation (ASF) under one or more
+##  contributor license agreements.  See the NOTICE file distributed with
+##  this work for additional information regarding copyright ownership.
+##  The ASF licenses this file to You under the Apache License, Version 2.0
+##  (the "License"); you may not use this file except in compliance with
+##  the License.  You may obtain a copy of the License at
+##
+##  http://www.apache.org/licenses/LICENSE-2.0
+##
+##  Unless required by applicable law or agreed to in writing, software
+##  distributed under the License is distributed on an "AS IS" BASIS,
+##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##  See the License for the specific language governing permissions and
+##  limitations under the License.
 ask
 choose
 notify

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/aff32dbb/taverna-interaction-activity/src/main/resources/interaction.css
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/interaction.css b/taverna-interaction-activity/src/main/resources/interaction.css
index a6e3301..3c64d17 100644
--- a/taverna-interaction-activity/src/main/resources/interaction.css
+++ b/taverna-interaction-activity/src/main/resources/interaction.css
@@ -1,3 +1,19 @@
+/*
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*/
       	html, body { height: 100%; width: 100%; margin: 0; border:0; }
       	#presentationFrame, #presentationDiv { height: 90%; width: 95%; margin: 0; border:0; frameborder:0; }
      	#acknowledgment { width: 95%; margin: 0; border:0; frameborder:0; background-color: #eeeb99; color: #555555; text-align:center; }


[47/50] [abbrv] incubator-taverna-common-activities git commit: Use taverna-engine 3.1.0-incubating

Posted by st...@apache.org.
Use taverna-engine 3.1.0-incubating


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

Branch: refs/heads/docker
Commit: e83cd59bf56dd8c0c2bf61cafcaf5dd9e7e334d4
Parents: ac02074
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jun 30 12:34:16 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jun 30 12:34:16 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/e83cd59b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7f1c439..89a9fbf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
         <!-- Taverna dependency versions -->
         <taverna.language.version>0.15.0-incubating</taverna.language.version>
         <taverna.osgi.version>0.2.1-incubating</taverna.osgi.version>
-        <taverna.engine.version>3.1.0-incubating-SNAPSHOT</taverna.engine.version>
+        <taverna.engine.version>3.1.0-incubating</taverna.engine.version>
 
         <!-- Third-party dependency versios -->
         <abdera.version>1.1.3</abdera.version>


[12/50] [abbrv] incubator-taverna-common-activities git commit: TAVERNA-963 Remove unused GUI code

Posted by st...@apache.org.
TAVERNA-963 Remove unused GUI code


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

Branch: refs/heads/docker
Commit: 5bce4cb650ae5d389e3082e959c65fca76e47ffd
Parents: 71352f2
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed May 4 01:03:36 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed May 4 01:03:36 2016 +0100

----------------------------------------------------------------------
 .../externaltool/gui/AskUserForPwPopup.java     | 74 --------------------
 .../externaltool/gui/PleaseWaitDialog.java      | 73 -------------------
 2 files changed, 147 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/5bce4cb6/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/AskUserForPwPopup.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/AskUserForPwPopup.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/AskUserForPwPopup.java
deleted file mode 100644
index 9dbe959..0000000
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/AskUserForPwPopup.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.taverna.activities.externaltool.gui;
-
-import javax.swing.JOptionPane;
-
-import org.apache.taverna.activities.externaltool.invocation.AskUserForPw;
-import org.apache.taverna.activities.externaltool.ssh.SshNode;
-
-public final class AskUserForPwPopup implements AskUserForPw {
-	private SshNode ret;
-	private String pw, pp, kf, us;
-
-	public static String ask(String message, String title) {
-		return (String) JOptionPane.showInputDialog(null, message, title, JOptionPane.QUESTION_MESSAGE, null, null, "");
-	}
-
-	public static boolean askYN(String message, String title) {
-		return JOptionPane.showConfirmDialog(null, message, title, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION;
-	}
-
-	public String getPassword() {
-		getUsername();
-		if (pw != null)
-			return pw;
-		pw = ask("Please enter your password for " + us + " @ " + ret.getHost(), us + " @ " + ret.getHost());
-		return pw;
-	}
-
-	public String getPassphrase() {
-		getUsername();
-		if (pp != null)
-			return pp;
-		pp = ask("Please enter your passphrase for " + kf + " used for " + us + " @ " + ret.getHost(), us + " @ " + ret.getHost());
-		return pp;
-	}
-
-	public String getKeyfile() {
-		getUsername();
-		if (kf != null)
-			return kf;
-		kf = ask("Please enter the keyfile for " + us + " @ " + ret.getHost(), us + " @ " + ret.getHost());
-		return kf;
-	}
-
-	public String getUsername() {
-		if (us != null)
-			return us;
-		us = ask("Please enter the username for " + ret.getHost(), "Username for " + ret.getHost());
-		return us;
-	}
-
-	public void setSshNode(SshNode sshNode) {
-		this.ret = sshNode;
-	}
-
-	public void authenticationSucceeded() {
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/5bce4cb6/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/PleaseWaitDialog.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/PleaseWaitDialog.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/PleaseWaitDialog.java
deleted file mode 100755
index 9e265c8..0000000
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/PleaseWaitDialog.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.taverna.activities.externaltool.gui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.swing.JDialog;
-import javax.swing.JLabel;
-
-public class PleaseWaitDialog extends JDialog {
-	private static final long serialVersionUID = 1L;
-
-	static PleaseWaitDialog instance = new PleaseWaitDialog();
-
-	public class WaitMessage{
-		public WaitMessage() {
-		}
-		
-		String str;
-		public void set(String newstr) {
-			synchronized (PleaseWaitDialog.instance) {
-				if(this.str != null && this.str.equals(newstr)) return;
-				if(this.str != null) messages.remove(this.str);
-				this.str = newstr;
-				if(this.str != null) messages.add(this.str);
-			}
-			updateDialog();
-		}
-		public void done() {
-			set(null);
-		}
-	}
-
-	private void updateDialog() {
-		synchronized (PleaseWaitDialog.instance) {
-			if(messages.size() > 0) this.setVisible(true);
-			else this.setVisible(false);
-			String t = "";
-			for (String  cur : messages) {
-				t += cur + "<br>";
-			}
-			l.setText("<html>"+t+"</html>");
-		}
-	}
-	
-	List<String> messages = new ArrayList<String>();
-	
-	JLabel l;
-	private PleaseWaitDialog() {
-		this.setAlwaysOnTop(true);
-		this.setTitle("Please wait");
-		l = new JLabel("");
-		this.add(l);
-		this.setSize(400, 100);
-	}
-}


[36/50] [abbrv] incubator-taverna-common-activities git commit: [maven-release-plugin] prepare for next development iteration

Posted by st...@apache.org.
[maven-release-plugin] prepare for next development iteration


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

Branch: refs/heads/docker
Commit: fcc228ba0e98a87296535651b4c070000e96e8ba
Parents: faa8927
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed Jun 1 00:17:48 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed Jun 1 00:17:48 2016 +0100

----------------------------------------------------------------------
 pom.xml                                     | 4 ++--
 taverna-beanshell-activity/pom.xml          | 2 +-
 taverna-external-tool-activity/pom.xml      | 2 +-
 taverna-interaction-activity/pom.xml        | 2 +-
 taverna-rest-activity/pom.xml               | 2 +-
 taverna-spreadsheet-import-activity/pom.xml | 2 +-
 taverna-wsdl-activity/pom.xml               | 2 +-
 taverna-wsdl-generic/pom.xml                | 2 +-
 taverna-xpath-activity/pom.xml              | 2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fcc228ba/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 38bcf00..89a9fbf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
     </parent>
     <groupId>org.apache.taverna.commonactivities</groupId>
     <artifactId>apache-taverna-common-activities</artifactId>
-    <version>2.1.0-incubating</version>
+    <version>2.1.0-incubating-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>Apache Taverna Common Activities</name>
     <properties>
@@ -90,7 +90,7 @@
         <connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</developerConnection>
         <url>https://github.com/apache/incubator-taverna-common-activities</url>
-        <tag>2.1.0-incubating-RC2</tag>
+        <tag>HEAD</tag>
     </scm>
     <repositories>
         <repository>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fcc228ba/taverna-beanshell-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity/pom.xml b/taverna-beanshell-activity/pom.xml
index 79079d7..67a5a52 100644
--- a/taverna-beanshell-activity/pom.xml
+++ b/taverna-beanshell-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-beanshell-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fcc228ba/taverna-external-tool-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/pom.xml b/taverna-external-tool-activity/pom.xml
index 4a36065..da54d10 100644
--- a/taverna-external-tool-activity/pom.xml
+++ b/taverna-external-tool-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-external-tool-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fcc228ba/taverna-interaction-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/pom.xml b/taverna-interaction-activity/pom.xml
index 9a1d736..0b2a947 100644
--- a/taverna-interaction-activity/pom.xml
+++ b/taverna-interaction-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-interaction-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fcc228ba/taverna-rest-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-rest-activity/pom.xml b/taverna-rest-activity/pom.xml
index e9b6fd1..3f49704 100644
--- a/taverna-rest-activity/pom.xml
+++ b/taverna-rest-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-rest-activity</artifactId>
 	<name>Apache Taverna REST Activity</name>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fcc228ba/taverna-spreadsheet-import-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity/pom.xml b/taverna-spreadsheet-import-activity/pom.xml
index 6fdf508..b47a723 100644
--- a/taverna-spreadsheet-import-activity/pom.xml
+++ b/taverna-spreadsheet-import-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-spreadsheet-import-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fcc228ba/taverna-wsdl-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity/pom.xml b/taverna-wsdl-activity/pom.xml
index f82539b..9078ac3 100644
--- a/taverna-wsdl-activity/pom.xml
+++ b/taverna-wsdl-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-wsdl-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fcc228ba/taverna-wsdl-generic/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/pom.xml b/taverna-wsdl-generic/pom.xml
index 6c78be3..dedbcda 100644
--- a/taverna-wsdl-generic/pom.xml
+++ b/taverna-wsdl-generic/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>taverna-wsdl-generic</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fcc228ba/taverna-xpath-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity/pom.xml b/taverna-xpath-activity/pom.xml
index b637f7e..3854940 100644
--- a/taverna-xpath-activity/pom.xml
+++ b/taverna-xpath-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-xpath-activity</artifactId>
 	<name>Apache Taverna XPath Activity</name>


[20/50] [abbrv] incubator-taverna-common-activities git commit: taverna-credential-manager-api

Posted by st...@apache.org.
taverna-credential-manager-api


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

Branch: refs/heads/docker
Commit: 74d6b85b8b6312edb2f614404260404f3ad60d14
Parents: 736b923
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu May 5 17:01:35 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu May 5 17:01:35 2016 +0100

----------------------------------------------------------------------
 taverna-external-tool-activity/pom.xml | 2 +-
 taverna-interaction-activity/pom.xml   | 2 +-
 taverna-rest-activity/pom.xml          | 2 +-
 taverna-wsdl-activity/pom.xml          | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/74d6b85b/taverna-external-tool-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/pom.xml b/taverna-external-tool-activity/pom.xml
index e48cefd..2bb053e 100644
--- a/taverna-external-tool-activity/pom.xml
+++ b/taverna-external-tool-activity/pom.xml
@@ -42,7 +42,7 @@
 		</dependency>
 		<dependency>
 			<groupId>org.apache.taverna.engine</groupId>
-			<artifactId>taverna-credential-manager</artifactId>
+			<artifactId>taverna-credential-manager-api</artifactId>
 			<version>${taverna.engine.version}</version>
 		</dependency>
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/74d6b85b/taverna-interaction-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/pom.xml b/taverna-interaction-activity/pom.xml
index 176854d..cfde90f 100644
--- a/taverna-interaction-activity/pom.xml
+++ b/taverna-interaction-activity/pom.xml
@@ -60,7 +60,7 @@
 		</dependency>
 		<dependency>
 			<groupId>org.apache.taverna.engine</groupId>
-			<artifactId>taverna-credential-manager</artifactId>
+			<artifactId>taverna-credential-manager-api</artifactId>
 			<version>${taverna.engine.version}</version>
 		</dependency>
 		<dependency>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/74d6b85b/taverna-rest-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-rest-activity/pom.xml b/taverna-rest-activity/pom.xml
index ec730ca..14cc298 100644
--- a/taverna-rest-activity/pom.xml
+++ b/taverna-rest-activity/pom.xml
@@ -42,7 +42,7 @@
 		</dependency>
 		<dependency>
 			<groupId>org.apache.taverna.engine</groupId>
-			<artifactId>taverna-credential-manager</artifactId>
+			<artifactId>taverna-credential-manager-api</artifactId>
 			<version>${taverna.engine.version}</version>
 		</dependency>
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/74d6b85b/taverna-wsdl-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity/pom.xml b/taverna-wsdl-activity/pom.xml
index 4902b62..cbee926 100644
--- a/taverna-wsdl-activity/pom.xml
+++ b/taverna-wsdl-activity/pom.xml
@@ -69,7 +69,7 @@
 		</dependency>
 		<dependency>
 			<groupId>org.apache.taverna.engine</groupId>
-			<artifactId>taverna-credential-manager</artifactId>
+			<artifactId>taverna-credential-manager-api</artifactId>
 			<version>${taverna.engine.version}</version>
 		</dependency>
 		<dependency>


[33/50] [abbrv] incubator-taverna-common-activities git commit: use engine 3.1.0-incubating-SNAPSHOT while RC is under vote

Posted by st...@apache.org.
use engine 3.1.0-incubating-SNAPSHOT while RC is under vote


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

Branch: refs/heads/docker
Commit: 9de426628f69e70e759a6b98407a2be996f8d163
Parents: ec31511
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue May 31 15:07:12 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue May 31 15:07:12 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/9de42662/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 89a9fbf..7f1c439 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
         <!-- Taverna dependency versions -->
         <taverna.language.version>0.15.0-incubating</taverna.language.version>
         <taverna.osgi.version>0.2.1-incubating</taverna.osgi.version>
-        <taverna.engine.version>3.1.0-incubating</taverna.engine.version>
+        <taverna.engine.version>3.1.0-incubating-SNAPSHOT</taverna.engine.version>
 
         <!-- Third-party dependency versios -->
         <abdera.version>1.1.3</abdera.version>


[04/50] [abbrv] incubator-taverna-common-activities git commit: Details about Jetty

Posted by st...@apache.org.
Details about Jetty


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

Branch: refs/heads/docker
Commit: c49ce8523735bfcc564ca42425bb494f7130cd72
Parents: 8e6553f
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon May 2 01:24:22 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon May 2 01:28:31 2016 +0100

----------------------------------------------------------------------
 README.md | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/c49ce852/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index f139215..5213e04 100644
--- a/README.md
+++ b/README.md
@@ -142,7 +142,6 @@ The following provides more details on the included cryptographic software:
   (JSSE) and depend on
   [Apache WSS4J](https://ws.apache.org/wss4j/),
   [Apache XML Security for Java](https://santuario.apache.org/javaindex.html)
-  and [Open SAML Java](https://shibboleth.net/products/opensaml-java.html))
   for accessing secure SOAP Web Services.
 * Apache Taverna Common Activities depends on the
   [Apache Taverna Engine](http://taverna.incubator.apache.org/download/engine/)
@@ -150,4 +149,6 @@ The following provides more details on the included cryptographic software:
   management of username/password and client/server SSL certificates.
 * [taverna-interaction-activity](taverna-interaction-activity) depend on
   [Jetty](http://www.eclipse.org/jetty/),
-  which includes UnixCrypt.java for one way cryptography.
+  which includes UnixCrypt.java for one way cryptography, and can be
+  configured for SSL encryption using
+  [Java Secure Socket Extension](https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html)


[40/50] [abbrv] incubator-taverna-common-activities git commit: code build order

Posted by st...@apache.org.
code build order


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

Branch: refs/heads/docker
Commit: 02280733154415785e34fa833385e1a5da2865ef
Parents: 0912b76
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Jun 20 15:22:12 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Jun 20 15:22:12 2016 +0100

----------------------------------------------------------------------
 README.md | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/02280733/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index b306753..e0712fa 100644
--- a/README.md
+++ b/README.md
@@ -84,6 +84,21 @@ fully endorsed by the ASF.
   versions probably also work)
 
 
+This code relies on other
+[Apache Taverna modules](https://taverna.incubator.apache.org/download/code/),
+which Maven shuold automatically
+download from
+[Apache's Maven repository](https://taverna.incubator.apache.org/download/maven/);
+however you might want to compile these yourself in the below order:
+
+* [taverna-language](https://taverna.incubator.apache.org/download/language/)
+* [taverna-osgi](https://taverna.incubator.apache.org/download/osgi/)
+* [taverna-engine](https://taverna.incubator.apache.org/download/engine/
+
+Please see the `<properties>` of this [pom.xml](pom.xml) to find the
+correct versions to build.
+
+
 # Building
 
 To build, use


[29/50] [abbrv] incubator-taverna-common-activities git commit: Note about building on Windows

Posted by st...@apache.org.
Note about building on Windows


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

Branch: refs/heads/docker
Commit: 2be7cd540fc19cfccadd5fd99eebbd754f022cc0
Parents: 0943f33
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon May 30 23:57:45 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon May 30 23:57:45 2016 +0100

----------------------------------------------------------------------
 README.md | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/2be7cd54/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 089ffdd..b306753 100644
--- a/README.md
+++ b/README.md
@@ -93,6 +93,16 @@ To build, use
 This will build each module and run their tests.
 
 
+## Building on Windows
+
+If you are building on Windows, ensure you unpack this source code
+to a folder with a [short path name](http://stackoverflow.com/questions/1880321/why-does-the-260-character-path-length-limit-exist-in-windows) 
+lenght, e.g. `C:\src` - as 
+Windows has a [limitation on the total path length](https://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx#maxpath) 
+which might otherwise
+prevent this code from building successfully.
+
+
 ## Skipping tests
 
 To skip the tests (these can be time-consuming), use:


[48/50] [abbrv] incubator-taverna-common-activities git commit: 2.1.1-incubating-SNAPSHOT

Posted by st...@apache.org.
2.1.1-incubating-SNAPSHOT


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

Branch: refs/heads/docker
Commit: 9d7ec5d11b54677dcf22e07b80df92b079eb7b75
Parents: e83cd59
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jun 30 12:34:56 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jun 30 12:34:56 2016 +0100

----------------------------------------------------------------------
 pom.xml                                     | 2 +-
 taverna-beanshell-activity/pom.xml          | 2 +-
 taverna-external-tool-activity/pom.xml      | 2 +-
 taverna-interaction-activity/pom.xml        | 2 +-
 taverna-rest-activity/pom.xml               | 2 +-
 taverna-spreadsheet-import-activity/pom.xml | 2 +-
 taverna-wsdl-activity/pom.xml               | 2 +-
 taverna-wsdl-generic/pom.xml                | 2 +-
 taverna-xpath-activity/pom.xml              | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/9d7ec5d1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 89a9fbf..4a4545c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
     </parent>
     <groupId>org.apache.taverna.commonactivities</groupId>
     <artifactId>apache-taverna-common-activities</artifactId>
-    <version>2.1.0-incubating-SNAPSHOT</version>
+    <version>2.1.1-incubating-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>Apache Taverna Common Activities</name>
     <properties>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/9d7ec5d1/taverna-beanshell-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity/pom.xml b/taverna-beanshell-activity/pom.xml
index 67a5a52..3ed5d5e 100644
--- a/taverna-beanshell-activity/pom.xml
+++ b/taverna-beanshell-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.1-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-beanshell-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/9d7ec5d1/taverna-external-tool-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/pom.xml b/taverna-external-tool-activity/pom.xml
index da54d10..a122e82 100644
--- a/taverna-external-tool-activity/pom.xml
+++ b/taverna-external-tool-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.1-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-external-tool-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/9d7ec5d1/taverna-interaction-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/pom.xml b/taverna-interaction-activity/pom.xml
index 0b2a947..cf4fa03 100644
--- a/taverna-interaction-activity/pom.xml
+++ b/taverna-interaction-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.1-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-interaction-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/9d7ec5d1/taverna-rest-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-rest-activity/pom.xml b/taverna-rest-activity/pom.xml
index 3f49704..f32ad7b 100644
--- a/taverna-rest-activity/pom.xml
+++ b/taverna-rest-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.1-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-rest-activity</artifactId>
 	<name>Apache Taverna REST Activity</name>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/9d7ec5d1/taverna-spreadsheet-import-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity/pom.xml b/taverna-spreadsheet-import-activity/pom.xml
index b47a723..45999d7 100644
--- a/taverna-spreadsheet-import-activity/pom.xml
+++ b/taverna-spreadsheet-import-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.1-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-spreadsheet-import-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/9d7ec5d1/taverna-wsdl-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity/pom.xml b/taverna-wsdl-activity/pom.xml
index 9078ac3..9d57cd0 100644
--- a/taverna-wsdl-activity/pom.xml
+++ b/taverna-wsdl-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.1-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-wsdl-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/9d7ec5d1/taverna-wsdl-generic/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/pom.xml b/taverna-wsdl-generic/pom.xml
index dedbcda..8d4adc8 100644
--- a/taverna-wsdl-generic/pom.xml
+++ b/taverna-wsdl-generic/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.1-incubating-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>taverna-wsdl-generic</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/9d7ec5d1/taverna-xpath-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity/pom.xml b/taverna-xpath-activity/pom.xml
index 3854940..c63b479 100644
--- a/taverna-xpath-activity/pom.xml
+++ b/taverna-xpath-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.1-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-xpath-activity</artifactId>
 	<name>Apache Taverna XPath Activity</name>


[17/50] [abbrv] incubator-taverna-common-activities git commit: ToolDescriptionParser

Posted by st...@apache.org.
ToolDescriptionParser


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

Branch: refs/heads/docker
Commit: f9363a98aebd26ca88e9bf9ffd46a9999c3ba054
Parents: 59a0dc1
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed May 4 01:08:42 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed May 4 01:08:42 2016 +0100

----------------------------------------------------------------------
 .../desc/ToolDescriptionParser.java             | 111 +++++++++++++++++++
 .../externaltool/desc/UseCaseEnumeration.java   | 111 -------------------
 2 files changed, 111 insertions(+), 111 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/f9363a98/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ToolDescriptionParser.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ToolDescriptionParser.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ToolDescriptionParser.java
new file mode 100644
index 0000000..cc48973
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ToolDescriptionParser.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.desc;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.taverna.workflowmodel.serialization.DeserializationException;
+
+import org.apache.log4j.Logger;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.SAXBuilder;
+
+public class ToolDescriptionParser {
+
+	private static Logger logger = Logger.getLogger(ToolDescriptionParser.class);
+
+	public static List<ToolDescription> readDescriptionsFromUrl(String xmlFileUrl) throws IOException {
+
+		List<ToolDescription> ret = new ArrayList<ToolDescription>();
+		URLConnection con = null;
+		try {
+			URL url = new URL(xmlFileUrl);
+
+			con = url.openConnection();
+			con.setConnectTimeout(4000);
+			ret = readDescriptionsFromStream(con.getInputStream());
+			
+		} catch (IOException ioe) {
+			logger.error("Problem retrieving from " + xmlFileUrl);
+			logger.error(ioe);
+			throw ioe;
+		}
+		finally {
+
+		}
+
+		return ret;
+
+	}
+	
+	public static List<ToolDescription> readDescriptionsFromStream(InputStream is) {
+		
+		List<ToolDescription> ret = new ArrayList<ToolDescription>();
+
+		SAXBuilder builder = new SAXBuilder();
+		Document doc = null;
+		try {
+			doc = builder.build(is);
+			is.close();
+		} catch (JDOMException e1) {
+			logger.error(e1);
+			return ret;
+		} catch (IOException e1) {
+			logger.error(e1);
+			return ret;
+		} finally {
+			try {
+				is.close();
+			} catch (IOException e) {
+				logger.error(e);
+			}
+		}
+
+		Element usecases = doc.getRootElement();
+		for (Object ochild : usecases.getChildren()) {
+			Element child = (Element) ochild;
+			if (child.getName().equalsIgnoreCase("program")) {
+					try {
+						ret.add(new ToolDescription(child));
+					} catch (DeserializationException e) {
+						logger.error(e);
+					}
+			}
+		}
+		return ret;
+	}
+
+	public static ToolDescription readDescriptionFromUrl(
+			String repositoryUrl, String id) throws IOException {
+		List<ToolDescription> descriptions = readDescriptionsFromUrl(repositoryUrl);
+		for (ToolDescription usecase : descriptions) {
+			if (usecase.getUsecaseid().equals(id)) {
+				return usecase;
+			}
+		}
+		return null;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/f9363a98/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseEnumeration.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseEnumeration.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseEnumeration.java
deleted file mode 100644
index 949ae93..0000000
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseEnumeration.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.taverna.activities.externaltool.desc;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.taverna.workflowmodel.serialization.DeserializationException;
-
-import org.apache.log4j.Logger;
-import org.jdom.Document;
-import org.jdom.Element;
-import org.jdom.JDOMException;
-import org.jdom.input.SAXBuilder;
-
-public class UseCaseEnumeration {
-
-	private static Logger logger = Logger.getLogger(UseCaseEnumeration.class);
-
-	public static List<ToolDescription> readDescriptionsFromUrl(String xmlFileUrl) throws IOException {
-
-		List<ToolDescription> ret = new ArrayList<ToolDescription>();
-		URLConnection con = null;
-		try {
-			URL url = new URL(xmlFileUrl);
-
-			con = url.openConnection();
-			con.setConnectTimeout(4000);
-			ret = readDescriptionsFromStream(con.getInputStream());
-			
-		} catch (IOException ioe) {
-			logger.error("Problem retrieving from " + xmlFileUrl);
-			logger.error(ioe);
-			throw ioe;
-		}
-		finally {
-
-		}
-
-		return ret;
-
-	}
-	
-	public static List<ToolDescription> readDescriptionsFromStream(InputStream is) {
-		
-		List<ToolDescription> ret = new ArrayList<ToolDescription>();
-
-		SAXBuilder builder = new SAXBuilder();
-		Document doc = null;
-		try {
-			doc = builder.build(is);
-			is.close();
-		} catch (JDOMException e1) {
-			logger.error(e1);
-			return ret;
-		} catch (IOException e1) {
-			logger.error(e1);
-			return ret;
-		} finally {
-			try {
-				is.close();
-			} catch (IOException e) {
-				logger.error(e);
-			}
-		}
-
-		Element usecases = doc.getRootElement();
-		for (Object ochild : usecases.getChildren()) {
-			Element child = (Element) ochild;
-			if (child.getName().equalsIgnoreCase("program")) {
-					try {
-						ret.add(new ToolDescription(child));
-					} catch (DeserializationException e) {
-						logger.error(e);
-					}
-			}
-		}
-		return ret;
-	}
-
-	public static ToolDescription readDescriptionFromUrl(
-			String repositoryUrl, String id) throws IOException {
-		List<ToolDescription> descriptions = readDescriptionsFromUrl(repositoryUrl);
-		for (ToolDescription usecase : descriptions) {
-			if (usecase.getUsecaseid().equals(id)) {
-				return usecase;
-			}
-		}
-		return null;
-	}
-}


[23/50] [abbrv] incubator-taverna-common-activities git commit: READMEL: About common activities modules

Posted by st...@apache.org.
READMEL: About common activities modules


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

Branch: refs/heads/docker
Commit: e78c3ee2400aed350f7c745d42cdcd77765e2499
Parents: fe0d4c4
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon May 9 14:28:11 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon May 9 14:28:11 2016 +0100

----------------------------------------------------------------------
 README.md | 33 +++++++++++++++++++++++++++------
 1 file changed, 27 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/e78c3ee2/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index a90ae3e..089ffdd 100644
--- a/README.md
+++ b/README.md
@@ -18,18 +18,17 @@
 # Apache Taverna Common Activities
 
 Common Activities to be invoked as part of 
-[Apache Taverna](http://taverna.incubator.apache.org/) workflows.
+[Apache Taverna](https://taverna.incubator.apache.org/) workflows.
 
 Note that this module relies on other
-[Apache Taverna modules](http://taverna.incubator.apache.org/code) for
+[Apache Taverna modules](https://taverna.incubator.apache.org/code) for
 the actual workflow execution.
 
 
 ## License
 
-(c) 2007-2014 University of Manchester
-
-(c) 2014-2016 Apache Software Foundation
+* (c) 2007-2014 University of Manchester
+* (c) 2014-2016 Apache Software Foundation
 
 This product includes software developed at The
 [Apache Software Foundation](http://www.apache.org/).
@@ -45,7 +44,7 @@ details about embedded third-party libraries and source code.
 # Contribute
 
 Please subscribe to and contact the
-[dev@taverna](http://taverna.incubator.apache.org/community/lists#dev mailing list)
+[dev@taverna](https://taverna.incubator.apache.org/community/lists#dev mailing list)
 mailing list for any questions, suggestions and discussions about
 Apache Taverna.
 
@@ -108,6 +107,28 @@ that enforces Apache headers in every source file - to disable it, try:
 
     mvn clean install -Drat.skip=true
 
+# Modules
+
+Each module implement a particular type of 
+Taverna [Activity](https://taverna.incubator.apache.org/javadoc/taverna-engine/org/apache/taverna/workflowmodel/processor/activity/Activity.html).
+
+* [taverna-beanshell-activity](taverna-beanshell-activity/): Apache Taverna Beanshell Activity, 
+  runs [Beanshell](https://github.com/beanshell/beanshell/) scripts.
+* [taverna-external-tool-activity](taverna-external-tool-activity/): Apache Taverna External Tool Activity, 
+  run command line locally or over SSH
+* [taverna-interaction-activity](taverna-interaction-activity/): Apache Taverna Interaction Activity, 
+  ask questions to the user through a browser
+* [taverna-rest-activity](taverna-rest-activity/): Apache Taverna REST Activity, 
+  invoke [RESTful](https://en.wikipedia.org/wiki/Representational_state_transfer) HTTP(S) web services based on a URI template.
+* [taverna-spreadsheet-import-activity](taverna-spreadsheet-import-activity/): Apache Taverna Spreadsheet Import Activity, 
+  imports from CSV, Excel and OpenOffice.
+* [taverna-wsdl-activity](taverna-wsdl-activity/): Apache Taverna WSDL Activity, 
+  invoke [WSDL](https://en.wikipedia.org/wiki/Web_Services_Description_Language)-described SOAP services.
+* [taverna-wsdl-generic](taverna-wsdl-generic/): Apache Taverna WSDL-generic Library, 
+  library for parsing WSDL and calling SOAP services
+* [taverna-xpath-activity](taverna-xpath-activity/): Apache Taverna XPath Activity, 
+  select XML fragments using [XPath](https://www.w3.org/TR/xpath/) expressions
+
 
 # Export restrictions
 


[46/50] [abbrv] incubator-taverna-common-activities git commit: Dummy commit for GitHub management.

Posted by st...@apache.org.
Dummy commit for GitHub management.

This closes #3


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

Branch: refs/heads/docker
Commit: ac02074d46c432f5ca9685db6c3f5d9789d9397a
Parents: 9b5ea8a
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Jun 27 17:21:05 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Jun 27 17:21:05 2016 +0100

----------------------------------------------------------------------
 README.md | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/ac02074d/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 3f14027..531daf5 100644
--- a/README.md
+++ b/README.md
@@ -83,7 +83,6 @@ fully endorsed by the ASF.
 * [Apache Maven](https://maven.apache.org/download.html) 3.2.5 or newer (older
   versions probably also work)
 
-
 This code relies on other
 [Apache Taverna modules](https://taverna.incubator.apache.org/download/code/),
 which Maven shuold automatically


[38/50] [abbrv] incubator-taverna-common-activities git commit: [maven-release-plugin] prepare for next development iteration

Posted by st...@apache.org.
[maven-release-plugin] prepare for next development iteration


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

Branch: refs/heads/docker
Commit: fe3c9efb54340a2be1a62c4ef39e37497b38c3d8
Parents: a192c85
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Jun 6 13:59:42 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Jun 6 13:59:42 2016 +0100

----------------------------------------------------------------------
 pom.xml                                     | 4 ++--
 taverna-beanshell-activity/pom.xml          | 2 +-
 taverna-external-tool-activity/pom.xml      | 2 +-
 taverna-interaction-activity/pom.xml        | 2 +-
 taverna-rest-activity/pom.xml               | 2 +-
 taverna-spreadsheet-import-activity/pom.xml | 2 +-
 taverna-wsdl-activity/pom.xml               | 2 +-
 taverna-wsdl-generic/pom.xml                | 2 +-
 taverna-xpath-activity/pom.xml              | 2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fe3c9efb/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d619bbe..89a9fbf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
     </parent>
     <groupId>org.apache.taverna.commonactivities</groupId>
     <artifactId>apache-taverna-common-activities</artifactId>
-    <version>2.1.0-incubating</version>
+    <version>2.1.0-incubating-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>Apache Taverna Common Activities</name>
     <properties>
@@ -90,7 +90,7 @@
         <connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</developerConnection>
         <url>https://github.com/apache/incubator-taverna-common-activities</url>
-        <tag>2.1.0-incubating-RC3</tag>
+        <tag>HEAD</tag>
     </scm>
     <repositories>
         <repository>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fe3c9efb/taverna-beanshell-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity/pom.xml b/taverna-beanshell-activity/pom.xml
index 79079d7..67a5a52 100644
--- a/taverna-beanshell-activity/pom.xml
+++ b/taverna-beanshell-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-beanshell-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fe3c9efb/taverna-external-tool-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/pom.xml b/taverna-external-tool-activity/pom.xml
index 4a36065..da54d10 100644
--- a/taverna-external-tool-activity/pom.xml
+++ b/taverna-external-tool-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-external-tool-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fe3c9efb/taverna-interaction-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/pom.xml b/taverna-interaction-activity/pom.xml
index 9a1d736..0b2a947 100644
--- a/taverna-interaction-activity/pom.xml
+++ b/taverna-interaction-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-interaction-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fe3c9efb/taverna-rest-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-rest-activity/pom.xml b/taverna-rest-activity/pom.xml
index e9b6fd1..3f49704 100644
--- a/taverna-rest-activity/pom.xml
+++ b/taverna-rest-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-rest-activity</artifactId>
 	<name>Apache Taverna REST Activity</name>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fe3c9efb/taverna-spreadsheet-import-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity/pom.xml b/taverna-spreadsheet-import-activity/pom.xml
index 6fdf508..b47a723 100644
--- a/taverna-spreadsheet-import-activity/pom.xml
+++ b/taverna-spreadsheet-import-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-spreadsheet-import-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fe3c9efb/taverna-wsdl-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity/pom.xml b/taverna-wsdl-activity/pom.xml
index f82539b..9078ac3 100644
--- a/taverna-wsdl-activity/pom.xml
+++ b/taverna-wsdl-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-wsdl-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fe3c9efb/taverna-wsdl-generic/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/pom.xml b/taverna-wsdl-generic/pom.xml
index 6c78be3..dedbcda 100644
--- a/taverna-wsdl-generic/pom.xml
+++ b/taverna-wsdl-generic/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>taverna-wsdl-generic</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fe3c9efb/taverna-xpath-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity/pom.xml b/taverna-xpath-activity/pom.xml
index b637f7e..3854940 100644
--- a/taverna-xpath-activity/pom.xml
+++ b/taverna-xpath-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-xpath-activity</artifactId>
 	<name>Apache Taverna XPath Activity</name>


[21/50] [abbrv] incubator-taverna-common-activities git commit: Update common-activities README.md - Minor edits

Posted by st...@apache.org.
Update common-activities README.md - Minor edits

NOT FIXED:
Line 147 has broken link to Taverna Engine Download

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

Branch: refs/heads/docker
Commit: 473641a6e095cdd3e9dc542c8d52be90c5b8e265
Parents: 74d6b85
Author: galejwnaylor <ga...@noventussolutions.com>
Authored: Fri May 6 17:02:40 2016 -0700
Committer: galejwnaylor <ga...@noventussolutions.com>
Committed: Fri May 6 17:02:40 2016 -0700

----------------------------------------------------------------------
 README.md | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/473641a6/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index b7fdc03..6e204b1 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@ Licensed under the
 [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), see the file
 [LICENSE](LICENSE) for details.
 
-The file [NOTICE](NOTICE) contain any additional attributions and
+The file [NOTICE](NOTICE) contains any additional attributions and
 details about embedded third-party libraries and source code.
 
 
@@ -46,10 +46,10 @@ details about embedded third-party libraries and source code.
 
 Please subscribe to and contact the
 [dev@taverna](http://taverna.incubator.apache.org/community/lists#dev mailing list)
-for any questions, suggestions and discussions about
+mailing list for any questions, suggestions and discussions about
 Apache Taverna.
 
-Bugs and feature plannings are tracked in the Jira
+Bugs and planned features are tracked in the Jira
 [Issue tracker](https://issues.apache.org/jira/browse/TAVERNA/component/12326811)
 under the `TAVERNA` component _Taverna Common Activities._ Feel free
 to add an issue!
@@ -69,7 +69,7 @@ sponsored by the [Apache Incubator PMC](http://incubator.apache.org/).
 
 [Incubation](http://incubator.apache.org/incubation/Process_Description.html)
 is required of all newly accepted projects until a further review
-indicates that the infrastructure, communications, and decision making process
+indicates that the infrastructure, communications, and decision-making process
 have stabilized in a manner consistent with other successful ASF projects.
 
 While incubation status is not necessarily a reflection of the completeness
@@ -80,7 +80,7 @@ fully endorsed by the ASF.
 
 ## Prerequisites
 
-* Java 1.7 or newer (tested with OpenJDK 1.8)
+* Java 1.8 or newer (tested with OpenJDK 1.8)
 * [Apache Maven](https://maven.apache.org/download.html) 3.2.5 or newer (older
   versions probably also work)
 
@@ -96,7 +96,7 @@ This will build each module and run their tests.
 
 ## Skipping tests
 
-To skip the tests (these can be timeconsuming), use:
+To skip the tests (these can be time-consuming), use:
 
     mvn clean install -DskipTests
 
@@ -132,12 +132,12 @@ for both object code and source code.
 The following provides more details on the included cryptographic software:
 
 * [taverna-rest-activity](taverna-rest-activity)
-  depend on
+  depends on
   [Apache HttpComponents](https://hc.apache.org/) Client,
   and can be configured to initiate
   `https://` connections.
 * [taverna-wsdl-generic](taverna-wsdl-generic)
-  and [taverna-wsdl-activity](taverna-wsdl-activity) uses
+  and [taverna-wsdl-activity](taverna-wsdl-activity) use
   [Java Secure Socket Extension](https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html)
   (JSSE) and depend on
   [Apache WSS4J](https://ws.apache.org/wss4j/),
@@ -147,9 +147,9 @@ The following provides more details on the included cryptographic software:
   [Apache Taverna Engine](http://taverna.incubator.apache.org/download/engine/)
   Credential Manager API for
   management of username/password and client/server SSL certificates.
-* [taverna-interaction-activity](taverna-interaction-activity) depend on
+* [taverna-interaction-activity](taverna-interaction-activity) depends on
   [Jetty](http://www.eclipse.org/jetty/),
   which includes UnixCrypt.java for one way cryptography, and can be
   configured for SSL encryption using
-  [Java Secure Socket Extension](https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html)
+  [Java Secure Socket Extension](https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html).
 


[18/50] [abbrv] incubator-taverna-common-activities git commit: Depend on both wsdl-generic tests and jar

Posted by st...@apache.org.
Depend on both wsdl-generic tests and jar


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

Branch: refs/heads/docker
Commit: aed86a8ce034b5cf4777b95002d7c5605017973b
Parents: f9363a9
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed May 4 09:04:01 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed May 4 09:04:01 2016 +0100

----------------------------------------------------------------------
 taverna-wsdl-activity/pom.xml | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/aed86a8c/taverna-wsdl-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity/pom.xml b/taverna-wsdl-activity/pom.xml
index 89d10ae..4902b62 100644
--- a/taverna-wsdl-activity/pom.xml
+++ b/taverna-wsdl-activity/pom.xml
@@ -66,7 +66,6 @@
 			<groupId>${project.parent.groupId}</groupId>
 			<artifactId>taverna-wsdl-generic</artifactId>
 			<version>${project.parent.version}</version>			
-			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.taverna.engine</groupId>


[14/50] [abbrv] incubator-taverna-common-activities git commit: SshToolInvocation

Posted by st...@apache.org.
SshToolInvocation


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

Branch: refs/heads/docker
Commit: 7d28decd969c7d0bd3da6bd9825dde03b735ea7b
Parents: 3c48b20
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed May 4 01:06:14 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed May 4 01:06:14 2016 +0100

----------------------------------------------------------------------
 .../ssh/ExternalToolSshInvocationMechanism.java |   2 +-
 .../externaltool/ssh/SshInvocationCreator.java  |   6 +-
 .../ssh/SshInvocationPersister.java             |   6 +-
 .../externaltool/ssh/SshMechanismCreator.java   |   2 +-
 .../externaltool/ssh/SshToolInvocation.java     | 560 +++++++++++++++++++
 .../externaltool/ssh/SshUseCaseInvocation.java  | 560 -------------------
 6 files changed, 568 insertions(+), 568 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/7d28decd/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/ExternalToolSshInvocationMechanism.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/ExternalToolSshInvocationMechanism.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/ExternalToolSshInvocationMechanism.java
index 94cc466..b92c62b 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/ExternalToolSshInvocationMechanism.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/ExternalToolSshInvocationMechanism.java
@@ -39,7 +39,7 @@ public class ExternalToolSshInvocationMechanism extends InvocationMechanism {
 	 */
 	@Override
 	public String getType() {
-		return SshUseCaseInvocation.SSH_USE_CASE_INVOCATION_TYPE;
+		return SshToolInvocation.SSH_USE_CASE_INVOCATION_TYPE;
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/7d28decd/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
index f0b1e83..8f1950e 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
@@ -54,16 +54,16 @@ public final class SshInvocationCreator implements InvocationCreator {
 
 	@Override
 	public boolean canHandle(String mechanismType) {
-		return mechanismType.equals(SshUseCaseInvocation.SSH_USE_CASE_INVOCATION_TYPE);
+		return mechanismType.equals(SshToolInvocation.SSH_USE_CASE_INVOCATION_TYPE);
 	}
 
 	@Override
 	public ToolInvocation convert(InvocationMechanism m, UseCaseDescription description, Map<String, T2Reference> data, ReferenceService referenceService) {
 	    ExternalToolSshInvocationMechanism mechanism = (ExternalToolSshInvocationMechanism) m;
-		SshUseCaseInvocation result = null;
+		SshToolInvocation result = null;
 		try {
 		    SshNode chosenNode = chooseNode(mechanism.getNodes(), data, referenceService);
-		    result = new SshUseCaseInvocation(description, chosenNode, new RetrieveLoginFromTaverna(new SshUrl(chosenNode).toString(), credentialManager), credentialManager);
+		    result = new SshToolInvocation(description, chosenNode, new RetrieveLoginFromTaverna(new SshUrl(chosenNode).toString(), credentialManager), credentialManager);
 		} catch (JSchException e) {
 			logger.error("Null invocation", e);
 		} catch (SftpException e) {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/7d28decd/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationPersister.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationPersister.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationPersister.java
index bad5c2e..93bb3e9 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationPersister.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationPersister.java
@@ -62,7 +62,7 @@ public class SshInvocationPersister extends InvocationPersister {
 	 */
 	@Override
 	public void load(File directory) {
-		SshUseCaseInvocation.load(directory);
+		SshToolInvocation.load(directory);
 	}
 
 	/* (non-Javadoc)
@@ -70,13 +70,13 @@ public class SshInvocationPersister extends InvocationPersister {
 	 */
 	@Override
 	public void persist(File directory) {
-		SshUseCaseInvocation.persist(directory);
+		SshToolInvocation.persist(directory);
 	}
 
 	@Override
 	public void deleteRun(String runId) {
 		try {
-			SshUseCaseInvocation.cleanup(runId, credentialManager);
+			SshToolInvocation.cleanup(runId, credentialManager);
 		} catch (InvocationException e) {
 			logger.error(e);
 		}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/7d28decd/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshMechanismCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshMechanismCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshMechanismCreator.java
index 097f8db..c064947 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshMechanismCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshMechanismCreator.java
@@ -41,7 +41,7 @@ public class SshMechanismCreator extends MechanismCreator {
 	 */
 	@Override
 	public boolean canHandle(String mechanismType) {
-		return mechanismType.equals(SshUseCaseInvocation.SSH_USE_CASE_INVOCATION_TYPE);
+		return mechanismType.equals(SshToolInvocation.SSH_USE_CASE_INVOCATION_TYPE);
 	}
 
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/7d28decd/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshToolInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshToolInvocation.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshToolInvocation.java
new file mode 100755
index 0000000..edf9698
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshToolInvocation.java
@@ -0,0 +1,560 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.ssh;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+import java.util.Set;
+import java.util.Vector;
+import java.util.regex.Matcher;
+
+import org.apache.taverna.activities.externaltool.RetrieveLoginFromTaverna;
+import org.apache.taverna.activities.externaltool.desc.ScriptInput;
+import org.apache.taverna.activities.externaltool.desc.ScriptOutput;
+import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.invocation.AskUserForPw;
+import org.apache.taverna.activities.externaltool.invocation.InvocationException;
+import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
+import org.apache.taverna.reference.AbstractExternalReference;
+import org.apache.taverna.reference.ErrorDocument;
+import org.apache.taverna.reference.ErrorDocumentServiceException;
+import org.apache.taverna.reference.ExternalReferenceSPI;
+import org.apache.taverna.reference.Identified;
+import org.apache.taverna.reference.ReferenceService;
+import org.apache.taverna.reference.ReferenceSet;
+import org.apache.taverna.reference.ReferencedDataNature;
+import org.apache.taverna.reference.T2Reference;
+import org.apache.taverna.security.credentialmanager.CredentialManager;
+
+import org.apache.log4j.Logger;
+
+import com.jcraft.jsch.ChannelExec;
+import com.jcraft.jsch.ChannelSftp;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import com.jcraft.jsch.SftpException;
+import com.jcraft.jsch.ChannelSftp.LsEntry;
+
+/**
+ * The job is executed by connecting to a worker pc using ssh, i.e. not via the
+ * grid.
+ * 
+ * @author Hajo Krabbenhoeft
+ */
+public class SshToolInvocation extends ToolInvocation {
+
+	private static Logger logger = Logger.getLogger(SshToolInvocation.class);
+
+	private SshUrl location = null;
+
+	private InputStream stdInputStream = null;
+
+	public static final String SSH_USE_CASE_INVOCATION_TYPE = "D0A4CDEB-DD10-4A8E-A49C-8871003083D8";
+	private String tmpname;
+	private final SshNode workerNode;
+	private final AskUserForPw askUserForPw;
+
+	private ChannelExec running;
+
+	private List<String> precedingCommands = new ArrayList<String>();
+
+	private final ByteArrayOutputStream stdout_buf = new ByteArrayOutputStream();
+	private final ByteArrayOutputStream stderr_buf = new ByteArrayOutputStream();
+
+	private static Map<String, Object> nodeLock = Collections
+			.synchronizedMap(new HashMap<String, Object>());
+
+	private static Map<String, Set<SshUrl>> runIdToTempDir = Collections
+			.synchronizedMap(new HashMap<String, Set<SshUrl>>());
+
+	private static String SSH_INVOCATION_FILE = "sshInvocations";
+
+	private final CredentialManager credentialManager;
+
+	public static String test(final SshNode workerNode,
+			final AskUserForPw askUserForPw) {
+		try {
+			Session sshSession = SshPool
+					.getSshSession(workerNode, askUserForPw);
+
+			ChannelSftp sftpTest = (ChannelSftp) sshSession.openChannel("sftp");
+			sftpTest.connect();
+			sftpTest.cd(workerNode.getDirectory());
+			sftpTest.disconnect();
+			sshSession.disconnect();
+		} catch (JSchException e) {
+			return e.toString();
+		} catch (SftpException e) {
+			return e.toString();
+		}
+		return null;
+	}
+
+	public SshToolInvocation(UseCaseDescription desc, SshNode workerNodeA,
+			AskUserForPw askUserForPwA, CredentialManager credentialManager)
+			throws JSchException, SftpException {
+		this.workerNode = workerNodeA;
+		this.credentialManager = credentialManager;
+
+		setRetrieveData(workerNodeA.isRetrieveData());
+		this.askUserForPw = askUserForPwA;
+		usecase = desc;
+
+		ChannelSftp sftp = SshPool.getSftpPutChannel(workerNode, askUserForPw);
+		synchronized (getNodeLock(workerNode)) {
+
+			logger.info("Changing remote directory to "
+					+ workerNode.getDirectory());
+			sftp.cd(workerNode.getDirectory());
+			Random rnd = new Random();
+			while (true) {
+				tmpname = "usecase" + rnd.nextLong();
+				try {
+					sftp.lstat(workerNode.getDirectory() + tmpname);
+					continue;
+				} catch (Exception e) {
+					// file seems to not exist :)
+				}
+				sftp.mkdir(workerNode.getDirectory() + tmpname);
+				sftp.cd(workerNode.getDirectory() + tmpname);
+				break;
+			}
+		}
+	}
+
+	private static void recursiveDelete(ChannelSftp sftp, String path)
+			throws SftpException, JSchException {
+		Vector<?> entries = sftp.ls(path);
+		for (Object object : entries) {
+			LsEntry entry = (LsEntry) object;
+			if (entry.getFilename().equals(".")
+					|| entry.getFilename().equals("..")) {
+				continue;
+			}
+			if (entry.getAttrs().isDir()) {
+				recursiveDelete(sftp, path + entry.getFilename() + "/");
+			} else {
+				sftp.rm(path + entry.getFilename());
+			}
+		}
+		sftp.rmdir(path);
+	}
+
+	private static void deleteDirectory(SshUrl directory,
+			CredentialManager credentialManager) throws InvocationException {
+		URI uri;
+		try {
+			uri = new URI(directory.toString());
+
+			ChannelSftp sftp;
+			SshNode workerNode;
+			String fullPath = uri.getPath();
+			String path = fullPath.substring(0, fullPath.lastIndexOf("/"));
+			String tempDir = fullPath.substring(fullPath.lastIndexOf("/"));
+			try {
+				workerNode = SshNodeFactory.getInstance().getSshNode(
+						uri.getHost(), uri.getPort(), path);
+
+				sftp = SshPool.getSftpPutChannel(workerNode,
+						new RetrieveLoginFromTaverna(workerNode.getUrl()
+								.toString(), credentialManager));
+			} catch (JSchException e) {
+				throw new InvocationException(e);
+			}
+			synchronized (getNodeLock(workerNode)) {
+				try {
+					sftp.cd(path);
+					recursiveDelete(sftp, path + "/" + tempDir + "/");
+				} catch (SftpException e) {
+					throw new InvocationException(e);
+				} catch (JSchException e) {
+					throw new InvocationException(e);
+				}
+			}
+		} catch (URISyntaxException e1) {
+			throw new InvocationException(e1);
+		}
+	}
+
+	public static void cleanup(String runId, CredentialManager credentialManager)
+			throws InvocationException {
+		Set<SshUrl> tempDirectories = runIdToTempDir.get(runId);
+		if (tempDirectories != null) {
+			for (SshUrl tempUrl : tempDirectories) {
+				deleteDirectory(tempUrl, credentialManager);
+			}
+			runIdToTempDir.remove(runId);
+		}
+	}
+
+	@Override
+	protected void submit_generate_job_inner() throws InvocationException {
+		tags.put("uniqueID", "" + getSubmissionID());
+		String command = usecase.getCommand();
+		for (String cur : tags.keySet()) {
+			command = command.replaceAll("\\Q%%" + cur + "%%\\E",
+					Matcher.quoteReplacement(tags.get(cur)));
+		}
+		String fullCommand = "cd " + workerNode.getDirectory() + tmpname;
+		for (String preceding : precedingCommands) {
+			fullCommand += " && " + preceding;
+		}
+		fullCommand += " && " + command;
+
+		logger.info("Full command is " + fullCommand);
+
+		try {
+			running = SshPool.openExecChannel(workerNode, askUserForPw);
+			running.setCommand(fullCommand);
+			running.setOutputStream(stdout_buf);
+			running.setErrStream(stderr_buf);
+			if (stdInputStream != null) {
+				running.setInputStream(stdInputStream);
+			}
+			running.connect();
+		} catch (JSchException e) {
+			throw new InvocationException(e);
+		}
+
+	}
+
+	@Override
+	public HashMap<String, Object> submit_wait_fetch_results(
+			ReferenceService referenceService) throws InvocationException {
+		while (!running.isClosed()) {
+			try {
+				Thread.sleep(1000);
+			} catch (InterruptedException e) {
+				throw new InvocationException("Invocation interrupted:"
+						+ e.getMessage());
+			}
+		}
+
+		int exitcode = running.getExitStatus();
+		if (!usecase.getValidReturnCodes().contains(exitcode)) {
+			try {
+				throw new InvocationException("Invalid exit code " + exitcode
+						+ ":" + stderr_buf.toString("US-ASCII"));
+			} catch (UnsupportedEncodingException e) {
+				throw new InvocationException("Invalid exit code " + exitcode
+						+ ":" + stderr_buf.toString());
+			}
+		}
+
+		HashMap<String, Object> results = new HashMap<String, Object>();
+
+		results.put("STDOUT", stdout_buf.toByteArray());
+		results.put("STDERR", stderr_buf.toByteArray());
+		try {
+			stdout_buf.close();
+			stderr_buf.close();
+		} catch (IOException e2) {
+			throw new InvocationException(e2);
+		}
+
+		try {
+			ChannelSftp sftp = SshPool.getSftpPutChannel(workerNode,
+					askUserForPw);
+			synchronized (getNodeLock(workerNode)) {
+				for (Map.Entry<String, ScriptOutput> cur : usecase.getOutputs()
+						.entrySet()) {
+					ScriptOutput scriptOutput = cur.getValue();
+					String fullPath = workerNode.getDirectory() + tmpname + "/"
+							+ scriptOutput.getPath();
+					try {
+						if (sftp.stat(fullPath) != null) {
+							SshUrl url = new SshUrl(workerNode);
+							url.setSubDirectory(tmpname);
+							url.setFileName(scriptOutput.getPath());
+							if (scriptOutput.isBinary()) {
+								url.setDataNature(ReferencedDataNature.BINARY);
+							} else {
+								url.setDataNature(ReferencedDataNature.TEXT);
+								url.setCharset("UTF-8");
+							}
+							if (isRetrieveData()) {
+								SshReference urlRef = new SshReference(url);
+								InputStream is = urlRef.openStream(null);
+								AbstractExternalReference ref;
+								if (scriptOutput.isBinary()) {
+									ref = inlineByteArrayReferenceBuilder
+											.createReference(is, null);
+								} else {
+									ref = inlineStringReferenceBuilder
+											.createReference(is, null);
+								}
+								try {
+									is.close();
+								} catch (IOException e) {
+									throw new InvocationException(e);
+								}
+								results.put(cur.getKey(), ref);
+							} else {
+								results.put(cur.getKey(), url);
+							}
+						} else {
+							ErrorDocument ed = referenceService
+									.getErrorDocumentService().registerError(
+											"No result for " + cur.getKey(), 0,
+											getContext());
+							results.put(cur.getKey(), ed);
+						}
+					} catch (SftpException e) {
+						ErrorDocument ed = referenceService
+								.getErrorDocumentService().registerError(
+										"No result for " + cur.getKey(), 0,
+										getContext());
+						results.put(cur.getKey(), ed);
+
+					}
+				}
+			}
+		} catch (JSchException e1) {
+			throw new InvocationException(e1);
+		} catch (ErrorDocumentServiceException e) {
+			throw new InvocationException(e);
+		}
+
+		if (running != null) {
+			running.disconnect();
+		}
+		if (stdInputStream != null) {
+			try {
+				stdInputStream.close();
+			} catch (IOException e) {
+				throw new InvocationException(e);
+			}
+		}
+
+		if (isRetrieveData()) {
+			forgetRun();
+			deleteDirectory(location, credentialManager);
+
+		}
+		return results;
+	}
+
+	@Override
+	public String setOneInput(ReferenceService referenceService,
+			T2Reference t2Reference, ScriptInput input)
+			throws InvocationException {
+		String target = null;
+		String remoteName = null;
+		if (input.isFile()) {
+			remoteName = input.getTag();
+		} else if (input.isTempFile()) {
+			remoteName = "tempfile." + (nTempFiles++) + ".tmp";
+
+		}
+		if (input.isFile() || input.isTempFile()) {
+			SshReference sshRef = getAsSshReference(referenceService,
+					t2Reference, workerNode);
+			target = workerNode.getDirectory() + tmpname + "/" + remoteName;
+			logger.info("Target is " + target);
+			if (sshRef != null) {
+				if (!input.isForceCopy()) {
+					String linkCommand = workerNode.getLinkCommand();
+					if (linkCommand != null) {
+						String actualLinkCommand = getActualOsCommand(
+								linkCommand, sshRef.getFullPath(), remoteName,
+								target);
+						precedingCommands.add(actualLinkCommand);
+						return target;
+
+					}
+				}
+				String copyCommand = workerNode.getCopyCommand();
+				if (copyCommand != null) {
+					String actualCopyCommand = getActualOsCommand(copyCommand,
+							sshRef.getFullPath(), remoteName, target);
+					precedingCommands.add(actualCopyCommand);
+					return target;
+				}
+			}
+			try {
+				ChannelSftp sftp = SshPool.getSftpPutChannel(workerNode,
+						askUserForPw);
+				synchronized (getNodeLock(workerNode)) {
+					InputStream r = getAsStream(referenceService, t2Reference);
+					sftp.put(r, target);
+					r.close();
+				}
+			} catch (SftpException e) {
+				throw new InvocationException(e);
+			} catch (JSchException e) {
+				throw new InvocationException(e);
+			} catch (IOException e) {
+				throw new InvocationException(e);
+			}
+			return target;
+		} else {
+			String value = (String) referenceService.renderIdentifier(
+					t2Reference, String.class, this.getContext());
+			return value;
+
+		}
+	}
+
+	public SshReference getAsSshReference(ReferenceService referenceService,
+			T2Reference t2Reference, SshNode workerNode) {
+		Identified identified = referenceService.resolveIdentifier(t2Reference,
+				null, null);
+		if (identified instanceof ReferenceSet) {
+			for (ExternalReferenceSPI ref : ((ReferenceSet) identified)
+					.getExternalReferences()) {
+				if (ref instanceof SshReference) {
+					SshReference sshRef = (SshReference) ref;
+					if (sshRef.getHost().equals(workerNode.getHost())) {
+						return sshRef;
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	private static Object getNodeLock(final SshNode node) {
+		return getNodeLock(node.getHost());
+	}
+
+	private static synchronized Object getNodeLock(String hostName) {
+		if (!nodeLock.containsKey(hostName)) {
+			nodeLock.put(hostName, new Object());
+		}
+		return nodeLock.get(hostName);
+	}
+
+	@Override
+	public void setStdIn(ReferenceService referenceService,
+			T2Reference t2Reference) {
+		stdInputStream = new BufferedInputStream(getAsStream(referenceService,
+				t2Reference));
+	}
+
+	@Override
+	public void rememberRun(String runId) {
+		this.setRunId(runId);
+		Set<SshUrl> directories = runIdToTempDir.get(runId);
+		if (directories == null) {
+			directories = Collections.synchronizedSet(new HashSet<SshUrl>());
+			runIdToTempDir.put(runId, directories);
+		}
+		location = new SshUrl(workerNode);
+		location.setSubDirectory(tmpname);
+		directories.add(location);
+	}
+
+	private void forgetRun() {
+		Set<SshUrl> directories = runIdToTempDir.get(getRunId());
+		directories.remove(location);
+	}
+
+	public static void load(File directory) {
+		File invocationsFile = new File(directory, SSH_INVOCATION_FILE);
+		if (!invocationsFile.exists()) {
+			return;
+		}
+		BufferedReader reader = null;
+		try {
+			reader = new BufferedReader(new FileReader(invocationsFile));
+			String line = reader.readLine();
+			while (line != null) {
+				String[] parts = line.split(" ");
+				if (parts.length != 2) {
+					break;
+				}
+				String runId = parts[0];
+				String urlString = parts[1];
+				Set<SshUrl> urls = runIdToTempDir.get(runId);
+				if (urls == null) {
+					urls = new HashSet<SshUrl>();
+					runIdToTempDir.put(runId, urls);
+				}
+				URI uri = new URI(urlString);
+				String fullPath = uri.getPath();
+				String path = fullPath.substring(0, fullPath.lastIndexOf("/"));
+				String tempDir = fullPath.substring(fullPath.lastIndexOf("/"));
+				SshNode node = SshNodeFactory.getInstance().getSshNode(
+						uri.getHost(), uri.getPort(), path);
+				SshUrl newUrl = new SshUrl(node);
+				newUrl.setSubDirectory(tempDir);
+				urls.add(newUrl);
+				line = reader.readLine();
+			}
+		} catch (FileNotFoundException e) {
+			logger.error(e);
+		} catch (URISyntaxException e) {
+			logger.error(e);
+		} catch (IOException e) {
+			logger.error(e);
+		} finally {
+			if (reader != null) {
+				try {
+					reader.close();
+				} catch (IOException e) {
+					logger.error(e);
+				}
+			}
+		}
+	}
+
+	public static void persist(File directory) {
+		File invocationsFile = new File(directory, SSH_INVOCATION_FILE);
+		BufferedWriter writer = null;
+		try {
+			writer = new BufferedWriter(new FileWriter(invocationsFile));
+			for (String runId : runIdToTempDir.keySet()) {
+				for (SshUrl url : runIdToTempDir.get(runId)) {
+					writer.write(runId);
+					writer.write(" ");
+					writer.write(url.toString());
+					writer.newLine();
+				}
+			}
+		} catch (IOException e) {
+			logger.error(e);
+		} finally {
+			if (writer != null) {
+				try {
+					writer.close();
+				} catch (IOException e) {
+					logger.error(e);
+				}
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/7d28decd/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUseCaseInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUseCaseInvocation.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUseCaseInvocation.java
deleted file mode 100755
index 06300a8..0000000
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUseCaseInvocation.java
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.taverna.activities.externaltool.ssh;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.Set;
-import java.util.Vector;
-import java.util.regex.Matcher;
-
-import org.apache.taverna.activities.externaltool.RetrieveLoginFromTaverna;
-import org.apache.taverna.activities.externaltool.desc.ScriptInput;
-import org.apache.taverna.activities.externaltool.desc.ScriptOutput;
-import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
-import org.apache.taverna.activities.externaltool.invocation.AskUserForPw;
-import org.apache.taverna.activities.externaltool.invocation.InvocationException;
-import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
-import org.apache.taverna.reference.AbstractExternalReference;
-import org.apache.taverna.reference.ErrorDocument;
-import org.apache.taverna.reference.ErrorDocumentServiceException;
-import org.apache.taverna.reference.ExternalReferenceSPI;
-import org.apache.taverna.reference.Identified;
-import org.apache.taverna.reference.ReferenceService;
-import org.apache.taverna.reference.ReferenceSet;
-import org.apache.taverna.reference.ReferencedDataNature;
-import org.apache.taverna.reference.T2Reference;
-import org.apache.taverna.security.credentialmanager.CredentialManager;
-
-import org.apache.log4j.Logger;
-
-import com.jcraft.jsch.ChannelExec;
-import com.jcraft.jsch.ChannelSftp;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Session;
-import com.jcraft.jsch.SftpException;
-import com.jcraft.jsch.ChannelSftp.LsEntry;
-
-/**
- * The job is executed by connecting to a worker pc using ssh, i.e. not via the
- * grid.
- * 
- * @author Hajo Krabbenhoeft
- */
-public class SshUseCaseInvocation extends ToolInvocation {
-
-	private static Logger logger = Logger.getLogger(SshUseCaseInvocation.class);
-
-	private SshUrl location = null;
-
-	private InputStream stdInputStream = null;
-
-	public static final String SSH_USE_CASE_INVOCATION_TYPE = "D0A4CDEB-DD10-4A8E-A49C-8871003083D8";
-	private String tmpname;
-	private final SshNode workerNode;
-	private final AskUserForPw askUserForPw;
-
-	private ChannelExec running;
-
-	private List<String> precedingCommands = new ArrayList<String>();
-
-	private final ByteArrayOutputStream stdout_buf = new ByteArrayOutputStream();
-	private final ByteArrayOutputStream stderr_buf = new ByteArrayOutputStream();
-
-	private static Map<String, Object> nodeLock = Collections
-			.synchronizedMap(new HashMap<String, Object>());
-
-	private static Map<String, Set<SshUrl>> runIdToTempDir = Collections
-			.synchronizedMap(new HashMap<String, Set<SshUrl>>());
-
-	private static String SSH_INVOCATION_FILE = "sshInvocations";
-
-	private final CredentialManager credentialManager;
-
-	public static String test(final SshNode workerNode,
-			final AskUserForPw askUserForPw) {
-		try {
-			Session sshSession = SshPool
-					.getSshSession(workerNode, askUserForPw);
-
-			ChannelSftp sftpTest = (ChannelSftp) sshSession.openChannel("sftp");
-			sftpTest.connect();
-			sftpTest.cd(workerNode.getDirectory());
-			sftpTest.disconnect();
-			sshSession.disconnect();
-		} catch (JSchException e) {
-			return e.toString();
-		} catch (SftpException e) {
-			return e.toString();
-		}
-		return null;
-	}
-
-	public SshUseCaseInvocation(UseCaseDescription desc, SshNode workerNodeA,
-			AskUserForPw askUserForPwA, CredentialManager credentialManager)
-			throws JSchException, SftpException {
-		this.workerNode = workerNodeA;
-		this.credentialManager = credentialManager;
-
-		setRetrieveData(workerNodeA.isRetrieveData());
-		this.askUserForPw = askUserForPwA;
-		usecase = desc;
-
-		ChannelSftp sftp = SshPool.getSftpPutChannel(workerNode, askUserForPw);
-		synchronized (getNodeLock(workerNode)) {
-
-			logger.info("Changing remote directory to "
-					+ workerNode.getDirectory());
-			sftp.cd(workerNode.getDirectory());
-			Random rnd = new Random();
-			while (true) {
-				tmpname = "usecase" + rnd.nextLong();
-				try {
-					sftp.lstat(workerNode.getDirectory() + tmpname);
-					continue;
-				} catch (Exception e) {
-					// file seems to not exist :)
-				}
-				sftp.mkdir(workerNode.getDirectory() + tmpname);
-				sftp.cd(workerNode.getDirectory() + tmpname);
-				break;
-			}
-		}
-	}
-
-	private static void recursiveDelete(ChannelSftp sftp, String path)
-			throws SftpException, JSchException {
-		Vector<?> entries = sftp.ls(path);
-		for (Object object : entries) {
-			LsEntry entry = (LsEntry) object;
-			if (entry.getFilename().equals(".")
-					|| entry.getFilename().equals("..")) {
-				continue;
-			}
-			if (entry.getAttrs().isDir()) {
-				recursiveDelete(sftp, path + entry.getFilename() + "/");
-			} else {
-				sftp.rm(path + entry.getFilename());
-			}
-		}
-		sftp.rmdir(path);
-	}
-
-	private static void deleteDirectory(SshUrl directory,
-			CredentialManager credentialManager) throws InvocationException {
-		URI uri;
-		try {
-			uri = new URI(directory.toString());
-
-			ChannelSftp sftp;
-			SshNode workerNode;
-			String fullPath = uri.getPath();
-			String path = fullPath.substring(0, fullPath.lastIndexOf("/"));
-			String tempDir = fullPath.substring(fullPath.lastIndexOf("/"));
-			try {
-				workerNode = SshNodeFactory.getInstance().getSshNode(
-						uri.getHost(), uri.getPort(), path);
-
-				sftp = SshPool.getSftpPutChannel(workerNode,
-						new RetrieveLoginFromTaverna(workerNode.getUrl()
-								.toString(), credentialManager));
-			} catch (JSchException e) {
-				throw new InvocationException(e);
-			}
-			synchronized (getNodeLock(workerNode)) {
-				try {
-					sftp.cd(path);
-					recursiveDelete(sftp, path + "/" + tempDir + "/");
-				} catch (SftpException e) {
-					throw new InvocationException(e);
-				} catch (JSchException e) {
-					throw new InvocationException(e);
-				}
-			}
-		} catch (URISyntaxException e1) {
-			throw new InvocationException(e1);
-		}
-	}
-
-	public static void cleanup(String runId, CredentialManager credentialManager)
-			throws InvocationException {
-		Set<SshUrl> tempDirectories = runIdToTempDir.get(runId);
-		if (tempDirectories != null) {
-			for (SshUrl tempUrl : tempDirectories) {
-				deleteDirectory(tempUrl, credentialManager);
-			}
-			runIdToTempDir.remove(runId);
-		}
-	}
-
-	@Override
-	protected void submit_generate_job_inner() throws InvocationException {
-		tags.put("uniqueID", "" + getSubmissionID());
-		String command = usecase.getCommand();
-		for (String cur : tags.keySet()) {
-			command = command.replaceAll("\\Q%%" + cur + "%%\\E",
-					Matcher.quoteReplacement(tags.get(cur)));
-		}
-		String fullCommand = "cd " + workerNode.getDirectory() + tmpname;
-		for (String preceding : precedingCommands) {
-			fullCommand += " && " + preceding;
-		}
-		fullCommand += " && " + command;
-
-		logger.info("Full command is " + fullCommand);
-
-		try {
-			running = SshPool.openExecChannel(workerNode, askUserForPw);
-			running.setCommand(fullCommand);
-			running.setOutputStream(stdout_buf);
-			running.setErrStream(stderr_buf);
-			if (stdInputStream != null) {
-				running.setInputStream(stdInputStream);
-			}
-			running.connect();
-		} catch (JSchException e) {
-			throw new InvocationException(e);
-		}
-
-	}
-
-	@Override
-	public HashMap<String, Object> submit_wait_fetch_results(
-			ReferenceService referenceService) throws InvocationException {
-		while (!running.isClosed()) {
-			try {
-				Thread.sleep(1000);
-			} catch (InterruptedException e) {
-				throw new InvocationException("Invocation interrupted:"
-						+ e.getMessage());
-			}
-		}
-
-		int exitcode = running.getExitStatus();
-		if (!usecase.getValidReturnCodes().contains(exitcode)) {
-			try {
-				throw new InvocationException("Invalid exit code " + exitcode
-						+ ":" + stderr_buf.toString("US-ASCII"));
-			} catch (UnsupportedEncodingException e) {
-				throw new InvocationException("Invalid exit code " + exitcode
-						+ ":" + stderr_buf.toString());
-			}
-		}
-
-		HashMap<String, Object> results = new HashMap<String, Object>();
-
-		results.put("STDOUT", stdout_buf.toByteArray());
-		results.put("STDERR", stderr_buf.toByteArray());
-		try {
-			stdout_buf.close();
-			stderr_buf.close();
-		} catch (IOException e2) {
-			throw new InvocationException(e2);
-		}
-
-		try {
-			ChannelSftp sftp = SshPool.getSftpPutChannel(workerNode,
-					askUserForPw);
-			synchronized (getNodeLock(workerNode)) {
-				for (Map.Entry<String, ScriptOutput> cur : usecase.getOutputs()
-						.entrySet()) {
-					ScriptOutput scriptOutput = cur.getValue();
-					String fullPath = workerNode.getDirectory() + tmpname + "/"
-							+ scriptOutput.getPath();
-					try {
-						if (sftp.stat(fullPath) != null) {
-							SshUrl url = new SshUrl(workerNode);
-							url.setSubDirectory(tmpname);
-							url.setFileName(scriptOutput.getPath());
-							if (scriptOutput.isBinary()) {
-								url.setDataNature(ReferencedDataNature.BINARY);
-							} else {
-								url.setDataNature(ReferencedDataNature.TEXT);
-								url.setCharset("UTF-8");
-							}
-							if (isRetrieveData()) {
-								SshReference urlRef = new SshReference(url);
-								InputStream is = urlRef.openStream(null);
-								AbstractExternalReference ref;
-								if (scriptOutput.isBinary()) {
-									ref = inlineByteArrayReferenceBuilder
-											.createReference(is, null);
-								} else {
-									ref = inlineStringReferenceBuilder
-											.createReference(is, null);
-								}
-								try {
-									is.close();
-								} catch (IOException e) {
-									throw new InvocationException(e);
-								}
-								results.put(cur.getKey(), ref);
-							} else {
-								results.put(cur.getKey(), url);
-							}
-						} else {
-							ErrorDocument ed = referenceService
-									.getErrorDocumentService().registerError(
-											"No result for " + cur.getKey(), 0,
-											getContext());
-							results.put(cur.getKey(), ed);
-						}
-					} catch (SftpException e) {
-						ErrorDocument ed = referenceService
-								.getErrorDocumentService().registerError(
-										"No result for " + cur.getKey(), 0,
-										getContext());
-						results.put(cur.getKey(), ed);
-
-					}
-				}
-			}
-		} catch (JSchException e1) {
-			throw new InvocationException(e1);
-		} catch (ErrorDocumentServiceException e) {
-			throw new InvocationException(e);
-		}
-
-		if (running != null) {
-			running.disconnect();
-		}
-		if (stdInputStream != null) {
-			try {
-				stdInputStream.close();
-			} catch (IOException e) {
-				throw new InvocationException(e);
-			}
-		}
-
-		if (isRetrieveData()) {
-			forgetRun();
-			deleteDirectory(location, credentialManager);
-
-		}
-		return results;
-	}
-
-	@Override
-	public String setOneInput(ReferenceService referenceService,
-			T2Reference t2Reference, ScriptInput input)
-			throws InvocationException {
-		String target = null;
-		String remoteName = null;
-		if (input.isFile()) {
-			remoteName = input.getTag();
-		} else if (input.isTempFile()) {
-			remoteName = "tempfile." + (nTempFiles++) + ".tmp";
-
-		}
-		if (input.isFile() || input.isTempFile()) {
-			SshReference sshRef = getAsSshReference(referenceService,
-					t2Reference, workerNode);
-			target = workerNode.getDirectory() + tmpname + "/" + remoteName;
-			logger.info("Target is " + target);
-			if (sshRef != null) {
-				if (!input.isForceCopy()) {
-					String linkCommand = workerNode.getLinkCommand();
-					if (linkCommand != null) {
-						String actualLinkCommand = getActualOsCommand(
-								linkCommand, sshRef.getFullPath(), remoteName,
-								target);
-						precedingCommands.add(actualLinkCommand);
-						return target;
-
-					}
-				}
-				String copyCommand = workerNode.getCopyCommand();
-				if (copyCommand != null) {
-					String actualCopyCommand = getActualOsCommand(copyCommand,
-							sshRef.getFullPath(), remoteName, target);
-					precedingCommands.add(actualCopyCommand);
-					return target;
-				}
-			}
-			try {
-				ChannelSftp sftp = SshPool.getSftpPutChannel(workerNode,
-						askUserForPw);
-				synchronized (getNodeLock(workerNode)) {
-					InputStream r = getAsStream(referenceService, t2Reference);
-					sftp.put(r, target);
-					r.close();
-				}
-			} catch (SftpException e) {
-				throw new InvocationException(e);
-			} catch (JSchException e) {
-				throw new InvocationException(e);
-			} catch (IOException e) {
-				throw new InvocationException(e);
-			}
-			return target;
-		} else {
-			String value = (String) referenceService.renderIdentifier(
-					t2Reference, String.class, this.getContext());
-			return value;
-
-		}
-	}
-
-	public SshReference getAsSshReference(ReferenceService referenceService,
-			T2Reference t2Reference, SshNode workerNode) {
-		Identified identified = referenceService.resolveIdentifier(t2Reference,
-				null, null);
-		if (identified instanceof ReferenceSet) {
-			for (ExternalReferenceSPI ref : ((ReferenceSet) identified)
-					.getExternalReferences()) {
-				if (ref instanceof SshReference) {
-					SshReference sshRef = (SshReference) ref;
-					if (sshRef.getHost().equals(workerNode.getHost())) {
-						return sshRef;
-					}
-				}
-			}
-		}
-		return null;
-	}
-
-	private static Object getNodeLock(final SshNode node) {
-		return getNodeLock(node.getHost());
-	}
-
-	private static synchronized Object getNodeLock(String hostName) {
-		if (!nodeLock.containsKey(hostName)) {
-			nodeLock.put(hostName, new Object());
-		}
-		return nodeLock.get(hostName);
-	}
-
-	@Override
-	public void setStdIn(ReferenceService referenceService,
-			T2Reference t2Reference) {
-		stdInputStream = new BufferedInputStream(getAsStream(referenceService,
-				t2Reference));
-	}
-
-	@Override
-	public void rememberRun(String runId) {
-		this.setRunId(runId);
-		Set<SshUrl> directories = runIdToTempDir.get(runId);
-		if (directories == null) {
-			directories = Collections.synchronizedSet(new HashSet<SshUrl>());
-			runIdToTempDir.put(runId, directories);
-		}
-		location = new SshUrl(workerNode);
-		location.setSubDirectory(tmpname);
-		directories.add(location);
-	}
-
-	private void forgetRun() {
-		Set<SshUrl> directories = runIdToTempDir.get(getRunId());
-		directories.remove(location);
-	}
-
-	public static void load(File directory) {
-		File invocationsFile = new File(directory, SSH_INVOCATION_FILE);
-		if (!invocationsFile.exists()) {
-			return;
-		}
-		BufferedReader reader = null;
-		try {
-			reader = new BufferedReader(new FileReader(invocationsFile));
-			String line = reader.readLine();
-			while (line != null) {
-				String[] parts = line.split(" ");
-				if (parts.length != 2) {
-					break;
-				}
-				String runId = parts[0];
-				String urlString = parts[1];
-				Set<SshUrl> urls = runIdToTempDir.get(runId);
-				if (urls == null) {
-					urls = new HashSet<SshUrl>();
-					runIdToTempDir.put(runId, urls);
-				}
-				URI uri = new URI(urlString);
-				String fullPath = uri.getPath();
-				String path = fullPath.substring(0, fullPath.lastIndexOf("/"));
-				String tempDir = fullPath.substring(fullPath.lastIndexOf("/"));
-				SshNode node = SshNodeFactory.getInstance().getSshNode(
-						uri.getHost(), uri.getPort(), path);
-				SshUrl newUrl = new SshUrl(node);
-				newUrl.setSubDirectory(tempDir);
-				urls.add(newUrl);
-				line = reader.readLine();
-			}
-		} catch (FileNotFoundException e) {
-			logger.error(e);
-		} catch (URISyntaxException e) {
-			logger.error(e);
-		} catch (IOException e) {
-			logger.error(e);
-		} finally {
-			if (reader != null) {
-				try {
-					reader.close();
-				} catch (IOException e) {
-					logger.error(e);
-				}
-			}
-		}
-	}
-
-	public static void persist(File directory) {
-		File invocationsFile = new File(directory, SSH_INVOCATION_FILE);
-		BufferedWriter writer = null;
-		try {
-			writer = new BufferedWriter(new FileWriter(invocationsFile));
-			for (String runId : runIdToTempDir.keySet()) {
-				for (SshUrl url : runIdToTempDir.get(runId)) {
-					writer.write(runId);
-					writer.write(" ");
-					writer.write(url.toString());
-					writer.newLine();
-				}
-			}
-		} catch (IOException e) {
-			logger.error(e);
-		} finally {
-			if (writer != null) {
-				try {
-					writer.close();
-				} catch (IOException e) {
-					logger.error(e);
-				}
-			}
-		}
-	}
-}



[16/50] [abbrv] incubator-taverna-common-activities git commit: ToolDescription

Posted by st...@apache.org.
ToolDescription


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

Branch: refs/heads/docker
Commit: 59a0dc12ca2e3c5fe11e0889b4b50c3aa4b57c43
Parents: b13a0fe
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed May 4 01:08:03 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed May 4 01:08:03 2016 +0100

----------------------------------------------------------------------
 .../externaltool/ExternalToolActivity.java      |   6 +-
 .../ExternalToolActivityConfigurationBean.java  |   8 +-
 .../externaltool/InvocationCreator.java         |   4 +-
 .../externaltool/desc/ToolDescription.java      | 897 +++++++++++++++++++
 .../externaltool/desc/UseCaseDescription.java   | 897 -------------------
 .../externaltool/desc/UseCaseEnumeration.java   |  16 +-
 .../externaltool/invocation/ToolInvocation.java |   4 +-
 .../local/LocalInvocationCreator.java           |   4 +-
 .../externaltool/local/LocalToolInvocation.java |   4 +-
 .../externaltool/ssh/SshInvocationCreator.java  |   4 +-
 .../externaltool/ssh/SshToolInvocation.java     |   4 +-
 11 files changed, 924 insertions(+), 924 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/59a0dc12/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java
index b2fae4e..99a3c7c 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java
@@ -27,7 +27,7 @@ import java.util.Map;
 import org.apache.taverna.activities.externaltool.desc.ScriptInput;
 import org.apache.taverna.activities.externaltool.desc.ScriptInputUser;
 import org.apache.taverna.activities.externaltool.desc.ScriptOutput;
-import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.desc.ToolDescription;
 import org.apache.taverna.activities.externaltool.invocation.InvocationException;
 import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
 import org.apache.taverna.activities.externaltool.manager.InvocationGroup;
@@ -67,7 +67,7 @@ public class ExternalToolActivity extends AbstractAsynchronousActivity<ExternalT
 	private static Logger logger = Logger.getLogger(ExternalToolActivity.class);
 
 	private ExternalToolActivityConfigurationBean configurationBean;
-	private UseCaseDescription mydesc;
+	private ToolDescription mydesc;
 
 	private List<InvocationCreator> invocationCreators;
 
@@ -280,7 +280,7 @@ public class ExternalToolActivity extends AbstractAsynchronousActivity<ExternalT
 		this.invocationCreators = invocationCreators;
 	}
 
-	private ToolInvocation getInvocation(InvocationMechanism mechanism, UseCaseDescription description, Map<String, T2Reference> data, ReferenceService referenceService) {
+	private ToolInvocation getInvocation(InvocationMechanism mechanism, ToolDescription description, Map<String, T2Reference> data, ReferenceService referenceService) {
 		ToolInvocation result = null;
 		InvocationCreator creator = null;
 		for (InvocationCreator c : invocationCreators) {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/59a0dc12/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityConfigurationBean.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityConfigurationBean.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityConfigurationBean.java
index 74c9070..7c4f479 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityConfigurationBean.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityConfigurationBean.java
@@ -21,7 +21,7 @@ package org.apache.taverna.activities.externaltool;
 
 import java.util.List;
 
-import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.desc.ToolDescription;
 import org.apache.taverna.activities.externaltool.manager.InvocationGroup;
 import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
 import org.apache.taverna.activities.externaltool.manager.MechanismCreator;
@@ -43,7 +43,7 @@ public final class ExternalToolActivityConfigurationBean {
 
 	protected String repositoryUrl;
 	protected String externaltoolid;
-	protected UseCaseDescription useCaseDescription = null;
+	protected ToolDescription useCaseDescription = null;
 	private boolean edited = false;
 
 	private List<MechanismCreator> mechanismCreators;
@@ -106,7 +106,7 @@ public final class ExternalToolActivityConfigurationBean {
 	/**
 	 * @return the useCaseDescription
 	 */
-	public UseCaseDescription getUseCaseDescription() {
+	public ToolDescription getUseCaseDescription() {
 		return useCaseDescription;
 	}
 
@@ -114,7 +114,7 @@ public final class ExternalToolActivityConfigurationBean {
 	 * @param useCaseDescription the useCaseDescription to set
 	 */
 	@ConfigurationProperty(name = "toolDescription", label = "Tool Description")
-	public void setUseCaseDescription(UseCaseDescription useCaseDescription) {
+	public void setUseCaseDescription(ToolDescription useCaseDescription) {
 		this.useCaseDescription = useCaseDescription;
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/59a0dc12/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java
index b5394c4..9893728 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java
@@ -21,7 +21,7 @@ package org.apache.taverna.activities.externaltool;
 
 import java.util.Map;
 
-import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.desc.ToolDescription;
 import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
 import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
 import org.apache.taverna.reference.ReferenceService;
@@ -35,6 +35,6 @@ public interface InvocationCreator {
 	
 	public boolean canHandle(String mechanismType);
 	
-	public ToolInvocation convert(InvocationMechanism mechanism, UseCaseDescription description, Map<String, T2Reference> data, ReferenceService referenceService);
+	public ToolInvocation convert(InvocationMechanism mechanism, ToolDescription description, Map<String, T2Reference> data, ReferenceService referenceService);
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/59a0dc12/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ToolDescription.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ToolDescription.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ToolDescription.java
new file mode 100644
index 0000000..5e2dde0
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ToolDescription.java
@@ -0,0 +1,897 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.desc;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+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 java.util.Set;
+
+import javax.swing.ImageIcon;
+
+import org.apache.taverna.activities.externaltool.ExternalToolActivity;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationBean;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty.OrderPolicy;
+import org.apache.taverna.workflowmodel.serialization.DeserializationException;
+import org.apache.taverna.workflowmodel.utils.Tools;
+
+import org.apache.log4j.Logger;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.SAXBuilder;
+
+import org.apache.commons.lang.StringUtils;
+
+/**
+ * Class representation of XML-description of UseCases
+ */
+@ConfigurationBean(uri = ExternalToolActivity.URI + "#ToolDescription")
+public class ToolDescription {
+
+	private static Logger logger = Logger.getLogger(ToolDescription.class);
+
+	/**
+	 * Identifier for the retrieval of this UseCase in the sharedRepository
+	 * database, respectively its XML export.
+	 */
+	private String usecaseid = "";
+	/**
+	 * Workflow Elements now can get a group identifier. There may be subgroups
+	 * divided by :
+	 */
+	private String group = "";
+	/**
+	 * Textual description of the use case itself. This description is very
+	 * short to fit on the single line that is prepared for such descriptions in
+	 * the Taverna workflow element list.
+	 */
+	private String description = "";
+	/**
+	 * What is actually executed on the shell.
+	 */
+	private String command = "";
+
+	/**
+	 * Accessor function of command
+	 *
+	 * @return shell-executable series of commands
+	 */
+	public String getCommand() {
+		if (null == command) {
+			// FIXME: Is this possible?
+			return "";
+		} else {
+			return command;
+		}
+	}
+
+	/**
+	 * Routine that may be executed as a first check if the program is indeed
+	 * installed.
+	 */
+	private String test_local = null;
+
+	/**
+	 * URL of an icon that would help users to recognise the use case
+	 */
+	private String icon_url = null;
+
+	private int preparingTimeoutInSeconds = 20 * 60; // 20 minutes
+	private int executionTimeoutInSeconds = 30 * 60; // 30 minutes
+
+	private List<String> tags = new ArrayList<String>();
+	private List<RuntimeEnvironmentConstraint> REs = new ArrayList<RuntimeEnvironmentConstraint>();
+	private ArrayList<String> queue_preferred = new ArrayList<String>();
+	private ArrayList<String> queue_deny = new ArrayList<String>();
+
+	private List<ScriptInputStatic> static_inputs = new ArrayList<ScriptInputStatic>();
+	private Map<String, ScriptInput> inputs = new HashMap<String, ScriptInput>();
+	private Map<String, ScriptOutput> outputs = new HashMap<String, ScriptOutput>();
+
+	private boolean includeStdIn = false;
+	private boolean includeStdOut = true;
+	private boolean includeStdErr = true;
+
+	private List<Integer> validReturnCodes = new ArrayList<Integer>();
+	
+	/**
+	 * Default constructor to make xstream happy
+	 */
+	public ToolDescription() {
+		
+	}
+
+	/**
+	 * Constructor, for special purpose usecases.
+	 *
+	 * @param usecaseid
+	 */
+	public ToolDescription(String usecaseid) {
+		this.setUsecaseid(usecaseid);
+	}
+
+	/**
+	 * Constructor, expects an input stream containing the xml. for example, use
+	 * getClass().getClassLoader().getResourceAsStream("..") to load a usecase
+	 * from your program jar
+	 */
+	public ToolDescription(InputStream programAsStream) throws DeserializationException {
+		SAXBuilder builder = new SAXBuilder();
+		Document doc;
+		try {
+			doc = builder.build(programAsStream);
+			programAsStream.close();
+		} catch (JDOMException e) {
+			throw new DeserializationException("Error deserializing usecase", e);
+		} catch (IOException e) {
+			throw new DeserializationException("Error deserializing usecase", e);
+		}
+		readFromXmlElement(doc.getRootElement());
+	}
+
+	/**
+	 * Constructor, expects an XML-root to dissect.
+	 */
+	public ToolDescription(Element programNode) throws DeserializationException {
+		readFromXmlElement(programNode);
+	}
+
+/**
+ * Produce an XML description of the ToolDescription
+ */
+	public Element writeToXMLElement() {
+		Element programNode = new Element("program");
+		programNode.setAttribute("name", getUsecaseid());
+		programNode.setAttribute("description", getDescription());
+		// Always use element version of command
+//		programNode.setAttribute("command", getCommand());
+		Element commandNode = new Element("command");
+		commandNode.addContent(getCommand());
+		programNode.addContent(commandNode);
+		programNode.setAttribute("timeout", Integer.toString(getExecutionTimeoutInSeconds()));
+		programNode.setAttribute("preparing_timeout", Integer.toString(getPreparingTimeoutInSeconds()));
+		programNode.setAttribute("includeStdIn", Boolean.toString(isIncludeStdIn()));
+		programNode.setAttribute("includeStdOut", Boolean.toString(isIncludeStdOut()));
+		programNode.setAttribute("includeStdErr", Boolean.toString(isIncludeStdErr()));
+		for (ScriptInputStatic si : getStatic_inputs()) {
+			Element staticNode = new Element("static");
+			if (si.isBinary()) {
+				staticNode.setAttribute("binary", "true");
+			}
+			if (si.isForceCopy()) {
+				staticNode.setAttribute("forceCopy", "true");
+			}
+			if (si.isFile()) {
+				Element fileNode = new Element("file");
+				fileNode.setAttribute("path", si.getTag());
+				staticNode.addContent(fileNode);
+			} else if (si.isTempFile()) {
+				Element tempfileNode = new Element("tempfile");
+				tempfileNode.setAttribute("tag", si.getTag());
+				staticNode.addContent(tempfileNode);
+			} else {
+				Element replaceNode = new Element("replace");
+				replaceNode.setAttribute("tag", si.getTag());
+				staticNode.addContent(replaceNode);
+			}
+			if (si.getUrl() != null) {
+				Element contentNode = new Element("content");
+				contentNode.setAttribute("url", si.getUrl());
+				staticNode.addContent(contentNode);
+			} else {
+				Element contentNode = new Element("content");
+				contentNode.addContent((String) si.getContent());
+				staticNode.addContent(contentNode);
+			}
+			programNode.addContent(staticNode);
+		}
+		for (Entry<String, ScriptInput> entry : getInputs().entrySet()) {
+			String name = entry.getKey();
+			ScriptInputUser si = (ScriptInputUser) entry.getValue();
+			Element inputNode = new Element("input");
+			inputNode.setAttribute("name", name);
+			if (si.isBinary()) {
+				inputNode.setAttribute("binary", "true");
+			}
+			if (si.isForceCopy()) {
+				inputNode.setAttribute("forceCopy", "true");
+			}
+			if (si.isConcatenate()) {
+				inputNode.setAttribute("concatenate", "true");
+			}
+			if (si.isList()) {
+				inputNode.setAttribute("list", "true");
+			}
+			if (si.isFile()) {
+				Element fileNode = new Element("file");
+				fileNode.setAttribute("path", si.getTag());
+				inputNode.addContent(fileNode);
+			} else if (si.isTempFile()) {
+				Element tempfileNode = new Element("tempfile");
+				tempfileNode.setAttribute("tag", si.getTag());
+				inputNode.addContent(tempfileNode);
+			} else {
+				Element replaceNode = new Element("replace");
+				replaceNode.setAttribute("tag", si.getTag());
+				inputNode.addContent(replaceNode);
+			}
+			for (String mime : si.getMime()) {
+				Element mimeNode = new Element("mime");
+				mimeNode.setAttribute("type", mime);
+				inputNode.addContent(mimeNode);
+			}
+			programNode.addContent(inputNode);
+		}
+		for (Entry<String, ScriptOutput> entry : getOutputs().entrySet()) {
+			String name = entry.getKey();
+			ScriptOutput so = entry.getValue();
+			Element outputNode = new Element("output");
+			outputNode.setAttribute("name", name);
+			if (so.isBinary()) {
+				outputNode.setAttribute("binary", "true");
+			}
+			Element fromfileNode = new Element("fromfile");
+			fromfileNode.setAttribute("path", so.getPath());
+			outputNode.addContent(fromfileNode);
+			for (String mime : so.getMime()) {
+				Element mimeNode = new Element("mime");
+				mimeNode.setAttribute("type", mime);
+				outputNode.addContent(mimeNode);
+			}
+			programNode.addContent(outputNode);
+		}
+		for (RuntimeEnvironmentConstraint rec : getREs()) {
+			Element rteNode = new Element("rte");
+			rteNode.setAttribute("name", rec.getID());
+			rteNode.setAttribute("relation", rec.getRelation());
+			programNode.addContent(rteNode);
+		}
+		if ((group != null) && !group.isEmpty()) {
+			Element groupNode = new Element("group");
+			groupNode.setAttribute("name", group);
+			programNode.addContent(groupNode);
+		}
+		if ((test_local != null) && !test_local.isEmpty()) {
+			Element testNode = new Element("test");
+			testNode.setAttribute("local", test_local);
+			programNode.addContent(testNode);
+		}
+		if ((icon_url != null) && !icon_url.isEmpty()) {
+			Element iconNode = new Element("icon");
+			iconNode.setAttribute("url", icon_url);
+			programNode.addContent(iconNode);
+		}
+		if (!getQueue_preferred().isEmpty() || !getQueue_deny().isEmpty()) {
+			Element queueNode = new Element("queue");
+			for (String url : getQueue_preferred()) {
+				Element preferredNode = new Element("prefer");
+				preferredNode.setAttribute("url", url);
+				queueNode.addContent(preferredNode);
+			}
+			for (String url : getQueue_deny()) {
+				Element denyNode = new Element("deny");
+				denyNode.setAttribute("url", url);
+				queueNode.addContent(denyNode);
+			}
+			programNode.addContent(queueNode);
+		}
+			Element validReturnCodesNode = new Element("validReturnCodes");
+			validReturnCodesNode.setAttribute("codes", getReturnCodesAsText());
+			programNode.addContent(validReturnCodesNode);
+
+		return programNode;
+	}
+	/**
+	 * Specifies the ToolDescription from the root of an XML description
+	 * which is accessible online.
+	 *
+	 * @param programNode
+	 * @throws DeserializationException
+	 */
+	private void readFromXmlElement(Element programNode) throws DeserializationException {
+		if (programNode.getName().compareToIgnoreCase("program") != 0)
+			throw new DeserializationException("Expected <program>, read '" + programNode.getName() + "'");
+
+		setUsecaseid(programNode.getAttributeValue("name"));
+		setDescription(programNode.getAttributeValue("description"));
+		setCommand(programNode.getAttributeValue("command"));
+		String timeoutStr = programNode.getAttributeValue("timeout");
+		if (timeoutStr != null)
+			setExecutionTimeoutInSeconds(Integer.parseInt(timeoutStr));
+		timeoutStr = programNode.getAttributeValue("preparing_timeout");
+		if (timeoutStr != null)
+			setPreparingTimeoutInSeconds(Integer.parseInt(timeoutStr));
+
+		String includeStdInStr = programNode.getAttributeValue("includeStdIn");
+		if (includeStdInStr != null && !includeStdInStr.isEmpty()) {
+			setIncludeStdIn(includeStdInStr.equals("true"));
+		}
+
+		String includeStdOutStr = programNode.getAttributeValue("includeStdOut");
+		if (includeStdOutStr != null && !includeStdOutStr.isEmpty()) {
+			setIncludeStdOut(includeStdOutStr.equals("true"));
+		}
+
+		String includeStdErrStr = programNode.getAttributeValue("includeStdErr");
+		if (includeStdErrStr != null && !includeStdErrStr.isEmpty()) {
+			setIncludeStdErr(includeStdErrStr.equals("true"));
+		}
+
+		for (Object cur_ob : programNode.getChildren()) {
+			Element cur = (Element) cur_ob;
+
+			String name = cur.getAttributeValue("name");
+
+			String type = cur.getName();
+			boolean binary = false;
+			if (null != cur.getAttributeValue("binary") && cur.getAttributeValue("binary").equalsIgnoreCase("true")) {
+				binary = true;
+			}
+			boolean list = false;
+			if (null != cur.getAttributeValue("list") && cur.getAttributeValue("list").equalsIgnoreCase("true")) {
+				list = true;
+			}
+			boolean concatenate = false;
+			if (null != cur.getAttributeValue("concatenate") && cur.getAttributeValue("concatenate").equalsIgnoreCase("true")) {
+				concatenate = true;
+			}
+			boolean forceCopy = false;
+			if (null != cur.getAttributeValue("forceCopy") && cur.getAttributeValue("forceCopy").equalsIgnoreCase("true")) {
+				forceCopy = true;
+			}
+
+			Element inner = null;
+			String innerType = null, tag = null, path = null;
+			if (cur.getChildren().size() > 0) {
+				inner = (Element) cur.getChildren().get(0);
+				innerType = inner.getName();
+				tag = inner.getAttributeValue("tag");
+				path = inner.getAttributeValue("path");
+			}
+			// build mime type declaration list
+			ArrayList<String> mime = new ArrayList<String>();
+			for (Object child : cur.getChildren()) {
+				Element curChild = (Element) child;
+				if (curChild.getName().equalsIgnoreCase("mime")) {
+					mime.add(curChild.getAttributeValue("type"));
+				}
+			}
+			if (type.equalsIgnoreCase("static")) {
+				ScriptInputStatic si = new ScriptInputStatic();
+				Element content = cur.getChild("content");
+				if (content == null)
+					throw new DeserializationException("FIXME: script tag without embedded content tag");
+				si.setUrl(content.getAttributeValue("url"));
+				if (si.getUrl() == null)
+					si.setContent(content.getText());
+				fillInputDescription(si, binary, forceCopy, innerType, tag, path);
+				getStatic_inputs().add(si);
+			} else if (type.equalsIgnoreCase("input")) {
+				ScriptInputUser indesc = new ScriptInputUser();
+				indesc.setList(list);
+				indesc.setMime(mime);
+				indesc.setConcatenate(concatenate);
+				fillInputDescription(indesc, binary, forceCopy, innerType, tag, path);
+				getInputs().put(Tools.sanitiseName(name), indesc);
+			} else if (type.equalsIgnoreCase("output")) {
+				ScriptOutput outdesc = new ScriptOutput();
+				outdesc.setMime(mime);
+
+				boolean ok = true;
+				if (null == innerType) {
+					// don't know what to do
+					throw new DeserializationException("FIXME: Found null == innerType for output, is this the bug?");
+				} else if (innerType.equalsIgnoreCase("fromfile")) {
+					outdesc.setPath(path);
+					outdesc.setBinary(binary);
+				} else {
+					throw new DeserializationException("Problem reading output port: unknown innerType '" + innerType + "'");
+				}
+				if (ok) {
+					getOutputs().put(Tools.sanitiseName(name), outdesc);
+				}
+			} else if (type.equalsIgnoreCase("rte") || type.equalsIgnoreCase("re")) {
+				getREs().add(new RuntimeEnvironmentConstraint(name, cur.getAttributeValue("relation")));
+			} else if (type.equalsIgnoreCase("group")) {
+				group = name;
+			} else if (type.equalsIgnoreCase("test")) {
+				test_local = cur.getAttributeValue("local");
+			} else if (type.equalsIgnoreCase("icon")) {
+				icon_url = cur.getAttributeValue("url");
+			} else if (type.equalsIgnoreCase("queue")) {
+				for (Object child_ob : cur.getChildren()) {
+					Element child = (Element) child_ob;
+					if (child.getName().equalsIgnoreCase("prefer"))
+						getQueue_preferred().add(child.getAttributeValue("url"));
+					else if (child.getName().equalsIgnoreCase("deny"))
+						getQueue_deny().add(child.getAttributeValue("url"));
+					else
+						throw new DeserializationException("Error while reading usecase " + this.getUsecaseid() + ": invalid queue entry");
+				}
+			} else if (type.equalsIgnoreCase("command")) {
+				// i like to have the ability to inject complete shell script
+				// fragments into the use case,
+				// so this should be replace and should allow multiple lines
+				if ((getCommand() != null) && !getCommand().isEmpty()) {
+					throw new DeserializationException("You have specified both command attribute and command tag.");
+				}
+				setCommand(cur.getText());
+			} else if (type.equalsIgnoreCase("validReturnCodes")) {
+					String codeString = cur.getAttributeValue("codes");
+					if (codeString != null) {
+						setReturnCodesAsText(codeString);
+					}
+			}
+			else {
+				throw new DeserializationException("Unexpected and uninterpreted attribute " + type);
+			}
+		}
+	}
+
+	private void fillInputDescription(ScriptInput fillMe, boolean binary, boolean forceCopy, String innerType, String tag, String path) throws DeserializationException {
+		fillMe.setBinary(binary);
+		fillMe.setForceCopy(forceCopy);
+		if (null == innerType) {
+			// don't know what to do
+			throw new DeserializationException("FIXME: Found null == innerType for input, is this the bug?");
+		} else if (innerType.equalsIgnoreCase("replace")) {
+			fillMe.setTag(tag);
+			fillMe.setTempFile(false);
+			fillMe.setFile(false);
+			getTags().add(tag);
+		} else if (innerType.equalsIgnoreCase("tempfile")) {
+			fillMe.setTag(tag);
+			fillMe.setTempFile(true);
+			fillMe.setFile(false);
+			getTags().add(tag);
+		} else if (innerType.equalsIgnoreCase("file")) {
+			fillMe.setTag(path);
+			fillMe.setTempFile(false);
+			fillMe.setFile(true);
+		} else {
+			throw new DeserializationException("Problem reading input port: unknown innerType '" + innerType + "'");
+		}
+	}
+
+	/**
+	 * returns icon that is referenced in use case description
+	 */
+	public ImageIcon getImageIcon() {
+		if (null == icon_url) return null;
+		try {
+			URL u = new URL(icon_url);
+			return new ImageIcon(u, getUsecaseid());
+		} catch (Exception e) {
+			logger.error(e);
+			return null;
+		}
+	}
+
+	/**
+	 * String representation of the use case. It also contains interesting
+	 * information on the availability of resources in the grid to actually
+	 * execute that workflow element.
+	 *
+	 * @return String
+	 */
+	@Override
+	public String toString() {
+		List<String> hlp = new ArrayList<String>();
+		hlp.add("usecaseid: " + getUsecaseid());
+		hlp.add("description: " + getDescription());
+		hlp.add("group: " + group);
+		hlp.add("test: " + test_local);
+		hlp.add("tags: " + getTags());
+		for (Map.Entry<String, ScriptInput> cur : getInputs().entrySet()) {
+			hlp.add(">" + cur.getKey() + ">: " + cur.getValue().toString());
+		}
+		for (Map.Entry<String, ScriptOutput> cur : getOutputs().entrySet()) {
+			hlp.add("<" + cur.getKey() + "<: " + cur.getValue().toString());
+		}
+		hlp.add("RE: " + getREs().toString());
+		hlp.add("preferred queues: " + getQueue_preferred());
+		hlp.add("denied queues: " + getQueue_deny());
+		String tos = super.toString() + "[";
+		for (int i = 0; i < hlp.size(); i++) {
+			if (i != 0)
+				tos += ", ";
+			tos += hlp.get(i);
+		}
+		return tos + " ]";
+	}
+
+	/**
+	 * hajo's test just pass an url or file url to an xml file
+	 *
+	 * @throws IOException
+	 * @throws MalformedURLException
+	 * @throws DeserializationException
+	 */
+	public static void main(String[] argv) throws MalformedURLException, IOException, DeserializationException {
+		ToolDescription d = new ToolDescription(new URL(argv[0]).openStream());
+		logger.info(d.getCommand());
+	}
+
+	/**
+	 * @param command the command to set
+	 */
+	@ConfigurationProperty(name = "command", label = "Command", description="What is actually executed on the shell")
+	public void setCommand(String command) {
+		this.command = command;
+	}
+
+	/**
+	 * @param description the description to set
+	 */
+	@ConfigurationProperty(name = "description", label = "Description", description="Textual description of the tool", required=false, uri="http://purl.org/dc/elements/1.1/description")
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	/**
+	 * @return the description
+	 */
+	public String getDescription() {
+		return description;
+	}
+
+	/**
+	 * @param executionTimeoutInSeconds the executionTimeoutInSeconds to set
+	 */
+	@ConfigurationProperty(name = "executionTimeoutInSeconds", label = "Execution Timeout In Seconds")
+	public void setExecutionTimeoutInSeconds(int executionTimeoutInSeconds) {
+		this.executionTimeoutInSeconds = executionTimeoutInSeconds;
+	}
+
+	/**
+	 * @return the executionTimeoutInSeconds
+	 */
+	public int getExecutionTimeoutInSeconds() {
+		return executionTimeoutInSeconds;
+	}
+
+	/**
+	 * @param inputs the inputs to set
+	 */
+	public void setInputs(Map<String, ScriptInput> inputs) {
+		this.inputs = inputs;
+	}
+
+	@ConfigurationProperty(name = "inputs", label = "Inputs", required=false)
+	public void setInputs(Set<InputMap> inputs) {
+		if (inputs != null) {
+			this.inputs = new HashMap<String, ScriptInput>();
+			for (InputMap inputMap : inputs) {
+				this.inputs.put(inputMap.getPort(), inputMap.getInput());
+			}
+		} else {
+			this.inputs = null;
+		}
+	}
+
+	/**
+	 * @return the inputs
+	 */
+	public Map<String, ScriptInput> getInputs() {
+		if (inputs == null) {
+			inputs = new HashMap<String, ScriptInput>();
+		}
+		return inputs;
+	}
+
+	/**
+	 * @param outputs the outputs to set
+	 */
+	public void setOutputs(Map<String, ScriptOutput> outputs) {
+		this.outputs = outputs;
+	}
+
+	@ConfigurationProperty(name = "outputs", label = "Outputs", required=false)
+	public void setOutputs(Set<OutputMap> outputs) {
+		if (outputs != null) {
+			this.outputs = new HashMap<String, ScriptOutput>();
+			for (OutputMap outputMap : outputs) {
+				this.outputs.put(outputMap.getPort(), outputMap.getOutput());
+			}
+		} else {
+			this.outputs = null;
+		}
+	}
+
+	/**
+	 * @return the outputs
+	 */
+	public Map<String, ScriptOutput> getOutputs() {
+		if (outputs == null) {
+			outputs = new HashMap<String, ScriptOutput>();
+		}
+		return outputs;
+	}
+
+	/**
+	 * @param preparingTimeoutInSeconds the preparingTimeoutInSeconds to set
+	 */
+	@ConfigurationProperty(name = "preparingTimeoutInSeconds", label = "Preparing Timeout In Seconds")
+	public void setPreparingTimeoutInSeconds(int preparingTimeoutInSeconds) {
+		this.preparingTimeoutInSeconds = preparingTimeoutInSeconds;
+	}
+
+	/**
+	 * @return the preparingTimeoutInSeconds
+	 */
+	public int getPreparingTimeoutInSeconds() {
+		return preparingTimeoutInSeconds;
+	}
+
+	/**
+	 * @param queue_deny the queue_deny to set
+	 */
+	public void setQueue_deny(ArrayList<String> queue_deny) {
+		this.queue_deny = queue_deny;
+	}
+
+	/**
+	 * @return the queue_deny
+	 */
+	public ArrayList<String> getQueue_deny() {
+		if (queue_deny == null) {
+			queue_deny = new ArrayList<String>();
+		}
+		return queue_deny;
+	}
+
+	/**
+	 * @param queue_preferred the queue_preferred to set
+	 */
+	public void setQueue_preferred(ArrayList<String> queue_preferred) {
+		this.queue_preferred = queue_preferred;
+	}
+
+	/**
+	 * @return the queue_preferred
+	 */
+	public ArrayList<String> getQueue_preferred() {
+		if (queue_preferred == null) {
+			queue_preferred = new ArrayList<String>();
+		}
+		return queue_preferred;
+	}
+
+	/**
+	 * @param rEs the rEs to set
+	 */
+	public void setREs(List<RuntimeEnvironmentConstraint> rEs) {
+		REs = rEs;
+	}
+
+	/**
+	 * @return the rEs
+	 */
+	public List<RuntimeEnvironmentConstraint> getREs() {
+		if (REs == null) {
+			REs = new ArrayList<RuntimeEnvironmentConstraint>();
+		}
+		return REs;
+	}
+
+	/**
+	 * @param static_inputs the static_inputs to set
+	 */
+	@ConfigurationProperty(name = "staticInputs", label = "Static Inputs", ordering=OrderPolicy.NON_ORDERED, required=false)
+	public void setStatic_inputs(List<ScriptInputStatic> static_inputs) {
+		this.static_inputs = static_inputs;
+	}
+
+	/**
+	 * @return the static_inputs
+	 */
+	public List<ScriptInputStatic> getStatic_inputs() {
+		if (static_inputs == null) {
+			static_inputs = new ArrayList<ScriptInputStatic>();
+		}
+		return static_inputs;
+	}
+
+	/**
+	 * @param tags the tags to set
+	 */
+	public void setTags(List<String> tags) {
+		this.tags = tags;
+	}
+
+	/**
+	 * @return the tags
+	 */
+	public List<String> getTags() {
+		if (tags == null) {
+			tags = new ArrayList<String>();
+		}
+		return tags;
+	}
+
+	/**
+	 * @param usecaseid the usecaseid to set
+	 */
+	@ConfigurationProperty(name = "usecaseid", label = "Title", uri="http://purl.org/dc/elements/1.1/title", required=false)
+	public void setUsecaseid(String usecaseid) {
+		this.usecaseid = usecaseid;
+	}
+
+	/**
+	 * @return the usecaseid
+	 */
+	public String getUsecaseid() {
+		return usecaseid;
+	}
+
+	public boolean isIncludeStdIn() {
+		return includeStdIn;
+	}
+
+	@ConfigurationProperty(name = "includeStdIn", label = "Include STDIN")
+	public void setIncludeStdIn(boolean includeStdIn) {
+		this.includeStdIn = includeStdIn;
+	}
+
+	public boolean isIncludeStdOut() {
+		return includeStdOut;
+	}
+
+	@ConfigurationProperty(name = "includeStdOut", label = "Include STDOUT")
+	public void setIncludeStdOut(boolean includeStdOut) {
+		this.includeStdOut = includeStdOut;
+	}
+
+	public boolean isIncludeStdErr() {
+		return includeStdErr;
+	}
+
+	@ConfigurationProperty(name = "includeStdErr", label = "Include STDERR")
+	public void setIncludeStdErr(boolean includeStdErr) {
+		this.includeStdErr = includeStdErr;
+	}
+
+	/**
+	 * @return the validReturnCodes
+	 */
+	public List<Integer> getValidReturnCodes() {
+		if (validReturnCodes == null) {
+			validReturnCodes = new ArrayList<Integer>();
+		}
+		if (validReturnCodes.isEmpty()) {
+			validReturnCodes.add(0);
+		}
+		return validReturnCodes;
+	}
+
+	/**
+	 * @param validReturnCodes the validReturnCodes to set
+	 */
+	public void setValidReturnCodes(List<Integer> validReturnCodes) {
+		this.validReturnCodes = validReturnCodes;
+	}
+
+	public String getReturnCodesAsText() {
+		return StringUtils.join(getValidReturnCodes(), ",");
+	}
+
+	public void setReturnCodesAsText(String text) {
+		if (getValidReturnCodes() == null) {
+			validReturnCodes = new ArrayList<Integer>();
+		}
+		validReturnCodes.clear();
+		String[] codes = text.split(",");
+		for (String code : codes) {
+			try {
+				Integer codeInt = new Integer(code);
+				if (!validReturnCodes.contains(codeInt)) {
+					validReturnCodes.add(codeInt);
+				}
+			}
+			catch (NumberFormatException e) {
+				logger.error(e);
+			}
+		}
+		if (validReturnCodes.isEmpty()) {
+			validReturnCodes.add(0);
+		}
+		Collections.sort(validReturnCodes);
+	}
+
+	/**
+	 * @return the group
+	 */
+	public String getGroup() {
+		return group;
+	}
+
+	/**
+	 * @param group the group to set
+	 */
+	public void setGroup(String group) {
+		this.group = group;
+	}
+
+	/**
+	 * @return the icon_url
+	 */
+	public String getIcon_url() {
+		return icon_url;
+	}
+
+	@ConfigurationBean(uri = ExternalToolActivity.URI + "#OutputMap")
+	public static class OutputMap {
+		private String port;
+
+		private ScriptOutput output;
+
+		public String getPort() {
+			return port;
+		}
+
+		@ConfigurationProperty(name = "port", label = "Port")
+		public void setPort(String port) {
+			this.port = port;
+		}
+
+		public ScriptOutput getOutput() {
+			return output;
+		}
+
+		@ConfigurationProperty(name = "output", label = "Output")
+		public void setOutput(ScriptOutput output) {
+			this.output = output;
+		}
+	}
+
+	@ConfigurationBean(uri = ExternalToolActivity.URI + "#InputMap")
+	public static class InputMap {
+		private String port;
+
+		private ScriptInputUser input;
+
+		public String getPort() {
+			return port;
+		}
+
+		@ConfigurationProperty(name = "port", label = "Port")
+		public void setPort(String port) {
+			this.port = port;
+		}
+
+		public ScriptInputUser getInput() {
+			return input;
+		}
+
+		@ConfigurationProperty(name = "input", label = "Input")
+		public void setInput(ScriptInputUser input) {
+			this.input = input;
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/59a0dc12/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseDescription.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseDescription.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseDescription.java
deleted file mode 100644
index 934330f..0000000
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseDescription.java
+++ /dev/null
@@ -1,897 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.taverna.activities.externaltool.desc;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-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 java.util.Set;
-
-import javax.swing.ImageIcon;
-
-import org.apache.taverna.activities.externaltool.ExternalToolActivity;
-import org.apache.taverna.workflowmodel.processor.config.ConfigurationBean;
-import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty;
-import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty.OrderPolicy;
-import org.apache.taverna.workflowmodel.serialization.DeserializationException;
-import org.apache.taverna.workflowmodel.utils.Tools;
-
-import org.apache.log4j.Logger;
-import org.jdom.Document;
-import org.jdom.Element;
-import org.jdom.JDOMException;
-import org.jdom.input.SAXBuilder;
-
-import org.apache.commons.lang.StringUtils;
-
-/**
- * Class representation of XML-description of UseCases
- */
-@ConfigurationBean(uri = ExternalToolActivity.URI + "#ToolDescription")
-public class UseCaseDescription {
-
-	private static Logger logger = Logger.getLogger(UseCaseDescription.class);
-
-	/**
-	 * Identifier for the retrieval of this UseCase in the sharedRepository
-	 * database, respectively its XML export.
-	 */
-	private String usecaseid = "";
-	/**
-	 * Workflow Elements now can get a group identifier. There may be subgroups
-	 * divided by :
-	 */
-	private String group = "";
-	/**
-	 * Textual description of the use case itself. This description is very
-	 * short to fit on the single line that is prepared for such descriptions in
-	 * the Taverna workflow element list.
-	 */
-	private String description = "";
-	/**
-	 * What is actually executed on the shell.
-	 */
-	private String command = "";
-
-	/**
-	 * Accessor function of command
-	 *
-	 * @return shell-executable series of commands
-	 */
-	public String getCommand() {
-		if (null == command) {
-			// FIXME: Is this possible?
-			return "";
-		} else {
-			return command;
-		}
-	}
-
-	/**
-	 * Routine that may be executed as a first check if the program is indeed
-	 * installed.
-	 */
-	private String test_local = null;
-
-	/**
-	 * URL of an icon that would help users to recognise the use case
-	 */
-	private String icon_url = null;
-
-	private int preparingTimeoutInSeconds = 20 * 60; // 20 minutes
-	private int executionTimeoutInSeconds = 30 * 60; // 30 minutes
-
-	private List<String> tags = new ArrayList<String>();
-	private List<RuntimeEnvironmentConstraint> REs = new ArrayList<RuntimeEnvironmentConstraint>();
-	private ArrayList<String> queue_preferred = new ArrayList<String>();
-	private ArrayList<String> queue_deny = new ArrayList<String>();
-
-	private List<ScriptInputStatic> static_inputs = new ArrayList<ScriptInputStatic>();
-	private Map<String, ScriptInput> inputs = new HashMap<String, ScriptInput>();
-	private Map<String, ScriptOutput> outputs = new HashMap<String, ScriptOutput>();
-
-	private boolean includeStdIn = false;
-	private boolean includeStdOut = true;
-	private boolean includeStdErr = true;
-
-	private List<Integer> validReturnCodes = new ArrayList<Integer>();
-	
-	/**
-	 * Default constructor to make xstream happy
-	 */
-	public UseCaseDescription() {
-		
-	}
-
-	/**
-	 * Constructor, for special purpose usecases.
-	 *
-	 * @param usecaseid
-	 */
-	public UseCaseDescription(String usecaseid) {
-		this.setUsecaseid(usecaseid);
-	}
-
-	/**
-	 * Constructor, expects an input stream containing the xml. for example, use
-	 * getClass().getClassLoader().getResourceAsStream("..") to load a usecase
-	 * from your program jar
-	 */
-	public UseCaseDescription(InputStream programAsStream) throws DeserializationException {
-		SAXBuilder builder = new SAXBuilder();
-		Document doc;
-		try {
-			doc = builder.build(programAsStream);
-			programAsStream.close();
-		} catch (JDOMException e) {
-			throw new DeserializationException("Error deserializing usecase", e);
-		} catch (IOException e) {
-			throw new DeserializationException("Error deserializing usecase", e);
-		}
-		readFromXmlElement(doc.getRootElement());
-	}
-
-	/**
-	 * Constructor, expects an XML-root to dissect.
-	 */
-	public UseCaseDescription(Element programNode) throws DeserializationException {
-		readFromXmlElement(programNode);
-	}
-
-/**
- * Produce an XML description of the UseCaseDescription
- */
-	public Element writeToXMLElement() {
-		Element programNode = new Element("program");
-		programNode.setAttribute("name", getUsecaseid());
-		programNode.setAttribute("description", getDescription());
-		// Always use element version of command
-//		programNode.setAttribute("command", getCommand());
-		Element commandNode = new Element("command");
-		commandNode.addContent(getCommand());
-		programNode.addContent(commandNode);
-		programNode.setAttribute("timeout", Integer.toString(getExecutionTimeoutInSeconds()));
-		programNode.setAttribute("preparing_timeout", Integer.toString(getPreparingTimeoutInSeconds()));
-		programNode.setAttribute("includeStdIn", Boolean.toString(isIncludeStdIn()));
-		programNode.setAttribute("includeStdOut", Boolean.toString(isIncludeStdOut()));
-		programNode.setAttribute("includeStdErr", Boolean.toString(isIncludeStdErr()));
-		for (ScriptInputStatic si : getStatic_inputs()) {
-			Element staticNode = new Element("static");
-			if (si.isBinary()) {
-				staticNode.setAttribute("binary", "true");
-			}
-			if (si.isForceCopy()) {
-				staticNode.setAttribute("forceCopy", "true");
-			}
-			if (si.isFile()) {
-				Element fileNode = new Element("file");
-				fileNode.setAttribute("path", si.getTag());
-				staticNode.addContent(fileNode);
-			} else if (si.isTempFile()) {
-				Element tempfileNode = new Element("tempfile");
-				tempfileNode.setAttribute("tag", si.getTag());
-				staticNode.addContent(tempfileNode);
-			} else {
-				Element replaceNode = new Element("replace");
-				replaceNode.setAttribute("tag", si.getTag());
-				staticNode.addContent(replaceNode);
-			}
-			if (si.getUrl() != null) {
-				Element contentNode = new Element("content");
-				contentNode.setAttribute("url", si.getUrl());
-				staticNode.addContent(contentNode);
-			} else {
-				Element contentNode = new Element("content");
-				contentNode.addContent((String) si.getContent());
-				staticNode.addContent(contentNode);
-			}
-			programNode.addContent(staticNode);
-		}
-		for (Entry<String, ScriptInput> entry : getInputs().entrySet()) {
-			String name = entry.getKey();
-			ScriptInputUser si = (ScriptInputUser) entry.getValue();
-			Element inputNode = new Element("input");
-			inputNode.setAttribute("name", name);
-			if (si.isBinary()) {
-				inputNode.setAttribute("binary", "true");
-			}
-			if (si.isForceCopy()) {
-				inputNode.setAttribute("forceCopy", "true");
-			}
-			if (si.isConcatenate()) {
-				inputNode.setAttribute("concatenate", "true");
-			}
-			if (si.isList()) {
-				inputNode.setAttribute("list", "true");
-			}
-			if (si.isFile()) {
-				Element fileNode = new Element("file");
-				fileNode.setAttribute("path", si.getTag());
-				inputNode.addContent(fileNode);
-			} else if (si.isTempFile()) {
-				Element tempfileNode = new Element("tempfile");
-				tempfileNode.setAttribute("tag", si.getTag());
-				inputNode.addContent(tempfileNode);
-			} else {
-				Element replaceNode = new Element("replace");
-				replaceNode.setAttribute("tag", si.getTag());
-				inputNode.addContent(replaceNode);
-			}
-			for (String mime : si.getMime()) {
-				Element mimeNode = new Element("mime");
-				mimeNode.setAttribute("type", mime);
-				inputNode.addContent(mimeNode);
-			}
-			programNode.addContent(inputNode);
-		}
-		for (Entry<String, ScriptOutput> entry : getOutputs().entrySet()) {
-			String name = entry.getKey();
-			ScriptOutput so = entry.getValue();
-			Element outputNode = new Element("output");
-			outputNode.setAttribute("name", name);
-			if (so.isBinary()) {
-				outputNode.setAttribute("binary", "true");
-			}
-			Element fromfileNode = new Element("fromfile");
-			fromfileNode.setAttribute("path", so.getPath());
-			outputNode.addContent(fromfileNode);
-			for (String mime : so.getMime()) {
-				Element mimeNode = new Element("mime");
-				mimeNode.setAttribute("type", mime);
-				outputNode.addContent(mimeNode);
-			}
-			programNode.addContent(outputNode);
-		}
-		for (RuntimeEnvironmentConstraint rec : getREs()) {
-			Element rteNode = new Element("rte");
-			rteNode.setAttribute("name", rec.getID());
-			rteNode.setAttribute("relation", rec.getRelation());
-			programNode.addContent(rteNode);
-		}
-		if ((group != null) && !group.isEmpty()) {
-			Element groupNode = new Element("group");
-			groupNode.setAttribute("name", group);
-			programNode.addContent(groupNode);
-		}
-		if ((test_local != null) && !test_local.isEmpty()) {
-			Element testNode = new Element("test");
-			testNode.setAttribute("local", test_local);
-			programNode.addContent(testNode);
-		}
-		if ((icon_url != null) && !icon_url.isEmpty()) {
-			Element iconNode = new Element("icon");
-			iconNode.setAttribute("url", icon_url);
-			programNode.addContent(iconNode);
-		}
-		if (!getQueue_preferred().isEmpty() || !getQueue_deny().isEmpty()) {
-			Element queueNode = new Element("queue");
-			for (String url : getQueue_preferred()) {
-				Element preferredNode = new Element("prefer");
-				preferredNode.setAttribute("url", url);
-				queueNode.addContent(preferredNode);
-			}
-			for (String url : getQueue_deny()) {
-				Element denyNode = new Element("deny");
-				denyNode.setAttribute("url", url);
-				queueNode.addContent(denyNode);
-			}
-			programNode.addContent(queueNode);
-		}
-			Element validReturnCodesNode = new Element("validReturnCodes");
-			validReturnCodesNode.setAttribute("codes", getReturnCodesAsText());
-			programNode.addContent(validReturnCodesNode);
-
-		return programNode;
-	}
-	/**
-	 * Specifies the UseCaseDescription from the root of an XML description
-	 * which is accessible online.
-	 *
-	 * @param programNode
-	 * @throws DeserializationException
-	 */
-	private void readFromXmlElement(Element programNode) throws DeserializationException {
-		if (programNode.getName().compareToIgnoreCase("program") != 0)
-			throw new DeserializationException("Expected <program>, read '" + programNode.getName() + "'");
-
-		setUsecaseid(programNode.getAttributeValue("name"));
-		setDescription(programNode.getAttributeValue("description"));
-		setCommand(programNode.getAttributeValue("command"));
-		String timeoutStr = programNode.getAttributeValue("timeout");
-		if (timeoutStr != null)
-			setExecutionTimeoutInSeconds(Integer.parseInt(timeoutStr));
-		timeoutStr = programNode.getAttributeValue("preparing_timeout");
-		if (timeoutStr != null)
-			setPreparingTimeoutInSeconds(Integer.parseInt(timeoutStr));
-
-		String includeStdInStr = programNode.getAttributeValue("includeStdIn");
-		if (includeStdInStr != null && !includeStdInStr.isEmpty()) {
-			setIncludeStdIn(includeStdInStr.equals("true"));
-		}
-
-		String includeStdOutStr = programNode.getAttributeValue("includeStdOut");
-		if (includeStdOutStr != null && !includeStdOutStr.isEmpty()) {
-			setIncludeStdOut(includeStdOutStr.equals("true"));
-		}
-
-		String includeStdErrStr = programNode.getAttributeValue("includeStdErr");
-		if (includeStdErrStr != null && !includeStdErrStr.isEmpty()) {
-			setIncludeStdErr(includeStdErrStr.equals("true"));
-		}
-
-		for (Object cur_ob : programNode.getChildren()) {
-			Element cur = (Element) cur_ob;
-
-			String name = cur.getAttributeValue("name");
-
-			String type = cur.getName();
-			boolean binary = false;
-			if (null != cur.getAttributeValue("binary") && cur.getAttributeValue("binary").equalsIgnoreCase("true")) {
-				binary = true;
-			}
-			boolean list = false;
-			if (null != cur.getAttributeValue("list") && cur.getAttributeValue("list").equalsIgnoreCase("true")) {
-				list = true;
-			}
-			boolean concatenate = false;
-			if (null != cur.getAttributeValue("concatenate") && cur.getAttributeValue("concatenate").equalsIgnoreCase("true")) {
-				concatenate = true;
-			}
-			boolean forceCopy = false;
-			if (null != cur.getAttributeValue("forceCopy") && cur.getAttributeValue("forceCopy").equalsIgnoreCase("true")) {
-				forceCopy = true;
-			}
-
-			Element inner = null;
-			String innerType = null, tag = null, path = null;
-			if (cur.getChildren().size() > 0) {
-				inner = (Element) cur.getChildren().get(0);
-				innerType = inner.getName();
-				tag = inner.getAttributeValue("tag");
-				path = inner.getAttributeValue("path");
-			}
-			// build mime type declaration list
-			ArrayList<String> mime = new ArrayList<String>();
-			for (Object child : cur.getChildren()) {
-				Element curChild = (Element) child;
-				if (curChild.getName().equalsIgnoreCase("mime")) {
-					mime.add(curChild.getAttributeValue("type"));
-				}
-			}
-			if (type.equalsIgnoreCase("static")) {
-				ScriptInputStatic si = new ScriptInputStatic();
-				Element content = cur.getChild("content");
-				if (content == null)
-					throw new DeserializationException("FIXME: script tag without embedded content tag");
-				si.setUrl(content.getAttributeValue("url"));
-				if (si.getUrl() == null)
-					si.setContent(content.getText());
-				fillInputDescription(si, binary, forceCopy, innerType, tag, path);
-				getStatic_inputs().add(si);
-			} else if (type.equalsIgnoreCase("input")) {
-				ScriptInputUser indesc = new ScriptInputUser();
-				indesc.setList(list);
-				indesc.setMime(mime);
-				indesc.setConcatenate(concatenate);
-				fillInputDescription(indesc, binary, forceCopy, innerType, tag, path);
-				getInputs().put(Tools.sanitiseName(name), indesc);
-			} else if (type.equalsIgnoreCase("output")) {
-				ScriptOutput outdesc = new ScriptOutput();
-				outdesc.setMime(mime);
-
-				boolean ok = true;
-				if (null == innerType) {
-					// don't know what to do
-					throw new DeserializationException("FIXME: Found null == innerType for output, is this the bug?");
-				} else if (innerType.equalsIgnoreCase("fromfile")) {
-					outdesc.setPath(path);
-					outdesc.setBinary(binary);
-				} else {
-					throw new DeserializationException("Problem reading output port: unknown innerType '" + innerType + "'");
-				}
-				if (ok) {
-					getOutputs().put(Tools.sanitiseName(name), outdesc);
-				}
-			} else if (type.equalsIgnoreCase("rte") || type.equalsIgnoreCase("re")) {
-				getREs().add(new RuntimeEnvironmentConstraint(name, cur.getAttributeValue("relation")));
-			} else if (type.equalsIgnoreCase("group")) {
-				group = name;
-			} else if (type.equalsIgnoreCase("test")) {
-				test_local = cur.getAttributeValue("local");
-			} else if (type.equalsIgnoreCase("icon")) {
-				icon_url = cur.getAttributeValue("url");
-			} else if (type.equalsIgnoreCase("queue")) {
-				for (Object child_ob : cur.getChildren()) {
-					Element child = (Element) child_ob;
-					if (child.getName().equalsIgnoreCase("prefer"))
-						getQueue_preferred().add(child.getAttributeValue("url"));
-					else if (child.getName().equalsIgnoreCase("deny"))
-						getQueue_deny().add(child.getAttributeValue("url"));
-					else
-						throw new DeserializationException("Error while reading usecase " + this.getUsecaseid() + ": invalid queue entry");
-				}
-			} else if (type.equalsIgnoreCase("command")) {
-				// i like to have the ability to inject complete shell script
-				// fragments into the use case,
-				// so this should be replace and should allow multiple lines
-				if ((getCommand() != null) && !getCommand().isEmpty()) {
-					throw new DeserializationException("You have specified both command attribute and command tag.");
-				}
-				setCommand(cur.getText());
-			} else if (type.equalsIgnoreCase("validReturnCodes")) {
-					String codeString = cur.getAttributeValue("codes");
-					if (codeString != null) {
-						setReturnCodesAsText(codeString);
-					}
-			}
-			else {
-				throw new DeserializationException("Unexpected and uninterpreted attribute " + type);
-			}
-		}
-	}
-
-	private void fillInputDescription(ScriptInput fillMe, boolean binary, boolean forceCopy, String innerType, String tag, String path) throws DeserializationException {
-		fillMe.setBinary(binary);
-		fillMe.setForceCopy(forceCopy);
-		if (null == innerType) {
-			// don't know what to do
-			throw new DeserializationException("FIXME: Found null == innerType for input, is this the bug?");
-		} else if (innerType.equalsIgnoreCase("replace")) {
-			fillMe.setTag(tag);
-			fillMe.setTempFile(false);
-			fillMe.setFile(false);
-			getTags().add(tag);
-		} else if (innerType.equalsIgnoreCase("tempfile")) {
-			fillMe.setTag(tag);
-			fillMe.setTempFile(true);
-			fillMe.setFile(false);
-			getTags().add(tag);
-		} else if (innerType.equalsIgnoreCase("file")) {
-			fillMe.setTag(path);
-			fillMe.setTempFile(false);
-			fillMe.setFile(true);
-		} else {
-			throw new DeserializationException("Problem reading input port: unknown innerType '" + innerType + "'");
-		}
-	}
-
-	/**
-	 * returns icon that is referenced in use case description
-	 */
-	public ImageIcon getImageIcon() {
-		if (null == icon_url) return null;
-		try {
-			URL u = new URL(icon_url);
-			return new ImageIcon(u, getUsecaseid());
-		} catch (Exception e) {
-			logger.error(e);
-			return null;
-		}
-	}
-
-	/**
-	 * String representation of the use case. It also contains interesting
-	 * information on the availability of resources in the grid to actually
-	 * execute that workflow element.
-	 *
-	 * @return String
-	 */
-	@Override
-	public String toString() {
-		List<String> hlp = new ArrayList<String>();
-		hlp.add("usecaseid: " + getUsecaseid());
-		hlp.add("description: " + getDescription());
-		hlp.add("group: " + group);
-		hlp.add("test: " + test_local);
-		hlp.add("tags: " + getTags());
-		for (Map.Entry<String, ScriptInput> cur : getInputs().entrySet()) {
-			hlp.add(">" + cur.getKey() + ">: " + cur.getValue().toString());
-		}
-		for (Map.Entry<String, ScriptOutput> cur : getOutputs().entrySet()) {
-			hlp.add("<" + cur.getKey() + "<: " + cur.getValue().toString());
-		}
-		hlp.add("RE: " + getREs().toString());
-		hlp.add("preferred queues: " + getQueue_preferred());
-		hlp.add("denied queues: " + getQueue_deny());
-		String tos = super.toString() + "[";
-		for (int i = 0; i < hlp.size(); i++) {
-			if (i != 0)
-				tos += ", ";
-			tos += hlp.get(i);
-		}
-		return tos + " ]";
-	}
-
-	/**
-	 * hajo's test just pass an url or file url to an xml file
-	 *
-	 * @throws IOException
-	 * @throws MalformedURLException
-	 * @throws DeserializationException
-	 */
-	public static void main(String[] argv) throws MalformedURLException, IOException, DeserializationException {
-		UseCaseDescription d = new UseCaseDescription(new URL(argv[0]).openStream());
-		logger.info(d.getCommand());
-	}
-
-	/**
-	 * @param command the command to set
-	 */
-	@ConfigurationProperty(name = "command", label = "Command", description="What is actually executed on the shell")
-	public void setCommand(String command) {
-		this.command = command;
-	}
-
-	/**
-	 * @param description the description to set
-	 */
-	@ConfigurationProperty(name = "description", label = "Description", description="Textual description of the tool", required=false, uri="http://purl.org/dc/elements/1.1/description")
-	public void setDescription(String description) {
-		this.description = description;
-	}
-
-	/**
-	 * @return the description
-	 */
-	public String getDescription() {
-		return description;
-	}
-
-	/**
-	 * @param executionTimeoutInSeconds the executionTimeoutInSeconds to set
-	 */
-	@ConfigurationProperty(name = "executionTimeoutInSeconds", label = "Execution Timeout In Seconds")
-	public void setExecutionTimeoutInSeconds(int executionTimeoutInSeconds) {
-		this.executionTimeoutInSeconds = executionTimeoutInSeconds;
-	}
-
-	/**
-	 * @return the executionTimeoutInSeconds
-	 */
-	public int getExecutionTimeoutInSeconds() {
-		return executionTimeoutInSeconds;
-	}
-
-	/**
-	 * @param inputs the inputs to set
-	 */
-	public void setInputs(Map<String, ScriptInput> inputs) {
-		this.inputs = inputs;
-	}
-
-	@ConfigurationProperty(name = "inputs", label = "Inputs", required=false)
-	public void setInputs(Set<InputMap> inputs) {
-		if (inputs != null) {
-			this.inputs = new HashMap<String, ScriptInput>();
-			for (InputMap inputMap : inputs) {
-				this.inputs.put(inputMap.getPort(), inputMap.getInput());
-			}
-		} else {
-			this.inputs = null;
-		}
-	}
-
-	/**
-	 * @return the inputs
-	 */
-	public Map<String, ScriptInput> getInputs() {
-		if (inputs == null) {
-			inputs = new HashMap<String, ScriptInput>();
-		}
-		return inputs;
-	}
-
-	/**
-	 * @param outputs the outputs to set
-	 */
-	public void setOutputs(Map<String, ScriptOutput> outputs) {
-		this.outputs = outputs;
-	}
-
-	@ConfigurationProperty(name = "outputs", label = "Outputs", required=false)
-	public void setOutputs(Set<OutputMap> outputs) {
-		if (outputs != null) {
-			this.outputs = new HashMap<String, ScriptOutput>();
-			for (OutputMap outputMap : outputs) {
-				this.outputs.put(outputMap.getPort(), outputMap.getOutput());
-			}
-		} else {
-			this.outputs = null;
-		}
-	}
-
-	/**
-	 * @return the outputs
-	 */
-	public Map<String, ScriptOutput> getOutputs() {
-		if (outputs == null) {
-			outputs = new HashMap<String, ScriptOutput>();
-		}
-		return outputs;
-	}
-
-	/**
-	 * @param preparingTimeoutInSeconds the preparingTimeoutInSeconds to set
-	 */
-	@ConfigurationProperty(name = "preparingTimeoutInSeconds", label = "Preparing Timeout In Seconds")
-	public void setPreparingTimeoutInSeconds(int preparingTimeoutInSeconds) {
-		this.preparingTimeoutInSeconds = preparingTimeoutInSeconds;
-	}
-
-	/**
-	 * @return the preparingTimeoutInSeconds
-	 */
-	public int getPreparingTimeoutInSeconds() {
-		return preparingTimeoutInSeconds;
-	}
-
-	/**
-	 * @param queue_deny the queue_deny to set
-	 */
-	public void setQueue_deny(ArrayList<String> queue_deny) {
-		this.queue_deny = queue_deny;
-	}
-
-	/**
-	 * @return the queue_deny
-	 */
-	public ArrayList<String> getQueue_deny() {
-		if (queue_deny == null) {
-			queue_deny = new ArrayList<String>();
-		}
-		return queue_deny;
-	}
-
-	/**
-	 * @param queue_preferred the queue_preferred to set
-	 */
-	public void setQueue_preferred(ArrayList<String> queue_preferred) {
-		this.queue_preferred = queue_preferred;
-	}
-
-	/**
-	 * @return the queue_preferred
-	 */
-	public ArrayList<String> getQueue_preferred() {
-		if (queue_preferred == null) {
-			queue_preferred = new ArrayList<String>();
-		}
-		return queue_preferred;
-	}
-
-	/**
-	 * @param rEs the rEs to set
-	 */
-	public void setREs(List<RuntimeEnvironmentConstraint> rEs) {
-		REs = rEs;
-	}
-
-	/**
-	 * @return the rEs
-	 */
-	public List<RuntimeEnvironmentConstraint> getREs() {
-		if (REs == null) {
-			REs = new ArrayList<RuntimeEnvironmentConstraint>();
-		}
-		return REs;
-	}
-
-	/**
-	 * @param static_inputs the static_inputs to set
-	 */
-	@ConfigurationProperty(name = "staticInputs", label = "Static Inputs", ordering=OrderPolicy.NON_ORDERED, required=false)
-	public void setStatic_inputs(List<ScriptInputStatic> static_inputs) {
-		this.static_inputs = static_inputs;
-	}
-
-	/**
-	 * @return the static_inputs
-	 */
-	public List<ScriptInputStatic> getStatic_inputs() {
-		if (static_inputs == null) {
-			static_inputs = new ArrayList<ScriptInputStatic>();
-		}
-		return static_inputs;
-	}
-
-	/**
-	 * @param tags the tags to set
-	 */
-	public void setTags(List<String> tags) {
-		this.tags = tags;
-	}
-
-	/**
-	 * @return the tags
-	 */
-	public List<String> getTags() {
-		if (tags == null) {
-			tags = new ArrayList<String>();
-		}
-		return tags;
-	}
-
-	/**
-	 * @param usecaseid the usecaseid to set
-	 */
-	@ConfigurationProperty(name = "usecaseid", label = "Title", uri="http://purl.org/dc/elements/1.1/title", required=false)
-	public void setUsecaseid(String usecaseid) {
-		this.usecaseid = usecaseid;
-	}
-
-	/**
-	 * @return the usecaseid
-	 */
-	public String getUsecaseid() {
-		return usecaseid;
-	}
-
-	public boolean isIncludeStdIn() {
-		return includeStdIn;
-	}
-
-	@ConfigurationProperty(name = "includeStdIn", label = "Include STDIN")
-	public void setIncludeStdIn(boolean includeStdIn) {
-		this.includeStdIn = includeStdIn;
-	}
-
-	public boolean isIncludeStdOut() {
-		return includeStdOut;
-	}
-
-	@ConfigurationProperty(name = "includeStdOut", label = "Include STDOUT")
-	public void setIncludeStdOut(boolean includeStdOut) {
-		this.includeStdOut = includeStdOut;
-	}
-
-	public boolean isIncludeStdErr() {
-		return includeStdErr;
-	}
-
-	@ConfigurationProperty(name = "includeStdErr", label = "Include STDERR")
-	public void setIncludeStdErr(boolean includeStdErr) {
-		this.includeStdErr = includeStdErr;
-	}
-
-	/**
-	 * @return the validReturnCodes
-	 */
-	public List<Integer> getValidReturnCodes() {
-		if (validReturnCodes == null) {
-			validReturnCodes = new ArrayList<Integer>();
-		}
-		if (validReturnCodes.isEmpty()) {
-			validReturnCodes.add(0);
-		}
-		return validReturnCodes;
-	}
-
-	/**
-	 * @param validReturnCodes the validReturnCodes to set
-	 */
-	public void setValidReturnCodes(List<Integer> validReturnCodes) {
-		this.validReturnCodes = validReturnCodes;
-	}
-
-	public String getReturnCodesAsText() {
-		return StringUtils.join(getValidReturnCodes(), ",");
-	}
-
-	public void setReturnCodesAsText(String text) {
-		if (getValidReturnCodes() == null) {
-			validReturnCodes = new ArrayList<Integer>();
-		}
-		validReturnCodes.clear();
-		String[] codes = text.split(",");
-		for (String code : codes) {
-			try {
-				Integer codeInt = new Integer(code);
-				if (!validReturnCodes.contains(codeInt)) {
-					validReturnCodes.add(codeInt);
-				}
-			}
-			catch (NumberFormatException e) {
-				logger.error(e);
-			}
-		}
-		if (validReturnCodes.isEmpty()) {
-			validReturnCodes.add(0);
-		}
-		Collections.sort(validReturnCodes);
-	}
-
-	/**
-	 * @return the group
-	 */
-	public String getGroup() {
-		return group;
-	}
-
-	/**
-	 * @param group the group to set
-	 */
-	public void setGroup(String group) {
-		this.group = group;
-	}
-
-	/**
-	 * @return the icon_url
-	 */
-	public String getIcon_url() {
-		return icon_url;
-	}
-
-	@ConfigurationBean(uri = ExternalToolActivity.URI + "#OutputMap")
-	public static class OutputMap {
-		private String port;
-
-		private ScriptOutput output;
-
-		public String getPort() {
-			return port;
-		}
-
-		@ConfigurationProperty(name = "port", label = "Port")
-		public void setPort(String port) {
-			this.port = port;
-		}
-
-		public ScriptOutput getOutput() {
-			return output;
-		}
-
-		@ConfigurationProperty(name = "output", label = "Output")
-		public void setOutput(ScriptOutput output) {
-			this.output = output;
-		}
-	}
-
-	@ConfigurationBean(uri = ExternalToolActivity.URI + "#InputMap")
-	public static class InputMap {
-		private String port;
-
-		private ScriptInputUser input;
-
-		public String getPort() {
-			return port;
-		}
-
-		@ConfigurationProperty(name = "port", label = "Port")
-		public void setPort(String port) {
-			this.port = port;
-		}
-
-		public ScriptInputUser getInput() {
-			return input;
-		}
-
-		@ConfigurationProperty(name = "input", label = "Input")
-		public void setInput(ScriptInputUser input) {
-			this.input = input;
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/59a0dc12/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseEnumeration.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseEnumeration.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseEnumeration.java
index 1a43461..949ae93 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseEnumeration.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseEnumeration.java
@@ -37,9 +37,9 @@ public class UseCaseEnumeration {
 
 	private static Logger logger = Logger.getLogger(UseCaseEnumeration.class);
 
-	public static List<UseCaseDescription> readDescriptionsFromUrl(String xmlFileUrl) throws IOException {
+	public static List<ToolDescription> readDescriptionsFromUrl(String xmlFileUrl) throws IOException {
 
-		List<UseCaseDescription> ret = new ArrayList<UseCaseDescription>();
+		List<ToolDescription> ret = new ArrayList<ToolDescription>();
 		URLConnection con = null;
 		try {
 			URL url = new URL(xmlFileUrl);
@@ -61,9 +61,9 @@ public class UseCaseEnumeration {
 
 	}
 	
-	public static List<UseCaseDescription> readDescriptionsFromStream(InputStream is) {
+	public static List<ToolDescription> readDescriptionsFromStream(InputStream is) {
 		
-		List<UseCaseDescription> ret = new ArrayList<UseCaseDescription>();
+		List<ToolDescription> ret = new ArrayList<ToolDescription>();
 
 		SAXBuilder builder = new SAXBuilder();
 		Document doc = null;
@@ -89,7 +89,7 @@ public class UseCaseEnumeration {
 			Element child = (Element) ochild;
 			if (child.getName().equalsIgnoreCase("program")) {
 					try {
-						ret.add(new UseCaseDescription(child));
+						ret.add(new ToolDescription(child));
 					} catch (DeserializationException e) {
 						logger.error(e);
 					}
@@ -98,10 +98,10 @@ public class UseCaseEnumeration {
 		return ret;
 	}
 
-	public static UseCaseDescription readDescriptionFromUrl(
+	public static ToolDescription readDescriptionFromUrl(
 			String repositoryUrl, String id) throws IOException {
-		List<UseCaseDescription> descriptions = readDescriptionsFromUrl(repositoryUrl);
-		for (UseCaseDescription usecase : descriptions) {
+		List<ToolDescription> descriptions = readDescriptionsFromUrl(repositoryUrl);
+		for (ToolDescription usecase : descriptions) {
 			if (usecase.getUsecaseid().equals(id)) {
 				return usecase;
 			}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/59a0dc12/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/ToolInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/ToolInvocation.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/ToolInvocation.java
index 485f613..2fc56a9 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/ToolInvocation.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/ToolInvocation.java
@@ -34,7 +34,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.taverna.activities.externaltool.desc.ScriptInput;
 import org.apache.taverna.activities.externaltool.desc.ScriptInputStatic;
 import org.apache.taverna.activities.externaltool.desc.ScriptInputUser;
-import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.desc.ToolDescription;
 import org.apache.taverna.invocation.InvocationContext;
 import org.apache.taverna.reference.ExternalReferenceSPI;
 import org.apache.taverna.reference.Identified;
@@ -67,7 +67,7 @@ public abstract class ToolInvocation {
 				return actualOsCommand;
 			}
 
-	protected UseCaseDescription usecase;
+	protected ToolDescription usecase;
 	protected final HashMap<String, String> tags = new HashMap<String, String>();
 	protected int nTempFiles = 0;
 	private static int submissionID = 0;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/59a0dc12/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
index 13154d9..f127049 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
@@ -23,7 +23,7 @@ import java.io.IOException;
 import java.util.Map;
 
 import org.apache.taverna.activities.externaltool.InvocationCreator;
-import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.desc.ToolDescription;
 import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
 import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
 import org.apache.taverna.reference.ReferenceService;
@@ -50,7 +50,7 @@ public final class LocalInvocationCreator implements
 	}
 
 	@Override
-	public ToolInvocation convert(InvocationMechanism m, UseCaseDescription description, Map<String, T2Reference> data, ReferenceService referenceService) {
+	public ToolInvocation convert(InvocationMechanism m, ToolDescription description, Map<String, T2Reference> data, ReferenceService referenceService) {
 	    ExternalToolLocalInvocationMechanism mechanism = (ExternalToolLocalInvocationMechanism) m;
 		ToolInvocation result = null;
 		try {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/59a0dc12/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalToolInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalToolInvocation.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalToolInvocation.java
index c88f7c8..a6a8d47 100755
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalToolInvocation.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalToolInvocation.java
@@ -49,7 +49,7 @@ import java.util.regex.Matcher;
 
 import org.apache.taverna.activities.externaltool.desc.ScriptInput;
 import org.apache.taverna.activities.externaltool.desc.ScriptOutput;
-import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.desc.ToolDescription;
 import org.apache.taverna.activities.externaltool.invocation.InvocationException;
 import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
 import org.apache.taverna.activities.externaltool.ssh.SshNode;
@@ -93,7 +93,7 @@ public class LocalToolInvocation extends ToolInvocation {
 	
 	private static String LOCAL_INVOCATION_FILE = "localInvocations";
 
-	public LocalToolInvocation(UseCaseDescription desc, boolean retrieveData, String mainTempDirectory, String shellPrefix, String linkCommand) throws IOException {
+	public LocalToolInvocation(ToolDescription desc, boolean retrieveData, String mainTempDirectory, String shellPrefix, String linkCommand) throws IOException {
 
 		usecase = desc;
 		setRetrieveData(retrieveData);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/59a0dc12/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
index 8f1950e..8ebc656 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
@@ -25,7 +25,7 @@ import java.util.Map;
 
 import org.apache.taverna.activities.externaltool.InvocationCreator;
 import org.apache.taverna.activities.externaltool.RetrieveLoginFromTaverna;
-import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.desc.ToolDescription;
 import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
 import org.apache.log4j.Logger;
 
@@ -58,7 +58,7 @@ public final class SshInvocationCreator implements InvocationCreator {
 	}
 
 	@Override
-	public ToolInvocation convert(InvocationMechanism m, UseCaseDescription description, Map<String, T2Reference> data, ReferenceService referenceService) {
+	public ToolInvocation convert(InvocationMechanism m, ToolDescription description, Map<String, T2Reference> data, ReferenceService referenceService) {
 	    ExternalToolSshInvocationMechanism mechanism = (ExternalToolSshInvocationMechanism) m;
 		SshToolInvocation result = null;
 		try {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/59a0dc12/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshToolInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshToolInvocation.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshToolInvocation.java
index edf9698..a363f8d 100755
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshToolInvocation.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshToolInvocation.java
@@ -45,7 +45,7 @@ import java.util.regex.Matcher;
 import org.apache.taverna.activities.externaltool.RetrieveLoginFromTaverna;
 import org.apache.taverna.activities.externaltool.desc.ScriptInput;
 import org.apache.taverna.activities.externaltool.desc.ScriptOutput;
-import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.desc.ToolDescription;
 import org.apache.taverna.activities.externaltool.invocation.AskUserForPw;
 import org.apache.taverna.activities.externaltool.invocation.InvocationException;
 import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
@@ -124,7 +124,7 @@ public class SshToolInvocation extends ToolInvocation {
 		return null;
 	}
 
-	public SshToolInvocation(UseCaseDescription desc, SshNode workerNodeA,
+	public SshToolInvocation(ToolDescription desc, SshNode workerNodeA,
 			AskUserForPw askUserForPwA, CredentialManager credentialManager)
 			throws JSchException, SftpException {
 		this.workerNode = workerNodeA;


[05/50] [abbrv] incubator-taverna-common-activities git commit: TAVERNA-963 ASF license header

Posted by st...@apache.org.
TAVERNA-963 ASF license header

> Hajo Krabbenhoeft and Steffen Moelller have both signed ICLAs for pre-Apache
> Taverna. That licensed their work to Manchester University and should be
> covered by the University's transfer to Apache.


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

Branch: refs/heads/docker
Commit: 142667c2ea73ba09a2e50c9169ec7943e22dbd3e
Parents: c49ce85
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed May 4 00:47:12 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed May 4 01:00:23 2016 +0100

----------------------------------------------------------------------
 .../inb/knowarc/gui/AskUserForPwPopup.java      | 31 +++++++++-----------
 .../inb/knowarc/gui/PleaseWaitDialog.java       | 30 +++++++++----------
 .../knowarc/usecases/RuntimeEnvironment.java    | 30 +++++++++----------
 .../usecases/RuntimeEnvironmentConstraint.java  | 30 +++++++++----------
 .../inb/knowarc/usecases/ScriptInput.java       | 30 +++++++++----------
 .../inb/knowarc/usecases/ScriptInputStatic.java | 30 +++++++++----------
 .../inb/knowarc/usecases/ScriptInputUser.java   | 30 +++++++++----------
 .../inb/knowarc/usecases/ScriptOutput.java      | 30 +++++++++----------
 .../knowarc/usecases/UseCaseDescription.java    | 30 +++++++++----------
 .../knowarc/usecases/UseCaseEnumeration.java    | 30 +++++++++----------
 .../usecases/invocation/AskUserForPw.java       | 30 +++++++++----------
 .../invocation/InvocationException.java         | 23 +++++++++++----
 .../usecases/invocation/UseCaseInvocation.java  | 30 +++++++++----------
 .../local/LocalUseCaseInvocation.java           | 30 +++++++++----------
 .../ssh/SshAutoLoginTrustEveryone.java          | 30 +++++++++----------
 .../usecases/invocation/ssh/SshNode.java        | 30 +++++++++----------
 .../usecases/invocation/ssh/SshNodeFactory.java | 22 ++++++++++----
 .../usecases/invocation/ssh/SshPool.java        | 22 ++++++++++----
 .../usecases/invocation/ssh/SshReference.java   | 16 +++++++++-
 .../knowarc/usecases/invocation/ssh/SshUrl.java | 22 ++++++++++----
 .../invocation/ssh/SshUrlToSshReference.java    | 21 +++++++++----
 .../invocation/ssh/SshUseCaseInvocation.java    | 30 +++++++++----------
 22 files changed, 320 insertions(+), 287 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/AskUserForPwPopup.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/AskUserForPwPopup.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/AskUserForPwPopup.java
index e2ae7e1..0ce0460 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/AskUserForPwPopup.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/AskUserForPwPopup.java
@@ -1,23 +1,20 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package de.uni_luebeck.inb.knowarc.gui;
 
 import javax.swing.JOptionPane;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/PleaseWaitDialog.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/PleaseWaitDialog.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/PleaseWaitDialog.java
index a6bf707..2a643eb 100755
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/PleaseWaitDialog.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/PleaseWaitDialog.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.gui;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironment.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironment.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironment.java
index ea49079..c7fd889 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironment.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironment.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.usecases;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironmentConstraint.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironmentConstraint.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironmentConstraint.java
index baa68d2..ce7e055 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironmentConstraint.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironmentConstraint.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.usecases;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInput.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInput.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInput.java
index 305564c..50747b5 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInput.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInput.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.usecases;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputStatic.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputStatic.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputStatic.java
index 989c59a..749e104 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputStatic.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputStatic.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.usecases;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputUser.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputUser.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputUser.java
index 59ead67..715c13e 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputUser.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputUser.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.usecases;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptOutput.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptOutput.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptOutput.java
index 066c88a..d824ad4 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptOutput.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptOutput.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.usecases;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseDescription.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseDescription.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseDescription.java
index 58bfa93..1c5914e 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseDescription.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseDescription.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.usecases;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseEnumeration.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseEnumeration.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseEnumeration.java
index 08069e5..d5c5d2c 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseEnumeration.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseEnumeration.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.usecases;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/AskUserForPw.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/AskUserForPw.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/AskUserForPw.java
index 9c54b1d..e912db1 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/AskUserForPw.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/AskUserForPw.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.usecases.invocation;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/InvocationException.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/InvocationException.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/InvocationException.java
index d714ab1..2f4485f 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/InvocationException.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/InvocationException.java
@@ -1,12 +1,23 @@
-/**
- * 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
+
 package de.uni_luebeck.inb.knowarc.usecases.invocation;
 
-/**
- * @author alanrw
- *
- */
 public class InvocationException extends Exception {
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/UseCaseInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/UseCaseInvocation.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/UseCaseInvocation.java
index 17b90c3..d6b2502 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/UseCaseInvocation.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/UseCaseInvocation.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.usecases.invocation;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/local/LocalUseCaseInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/local/LocalUseCaseInvocation.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/local/LocalUseCaseInvocation.java
index f4ae273..612a487 100755
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/local/LocalUseCaseInvocation.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/local/LocalUseCaseInvocation.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.usecases.invocation.local;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshAutoLoginTrustEveryone.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshAutoLoginTrustEveryone.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshAutoLoginTrustEveryone.java
index 60d3bec..ec9c15c 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshAutoLoginTrustEveryone.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshAutoLoginTrustEveryone.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNode.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNode.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNode.java
index 7cd0f90..6bc122a 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNode.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNode.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNodeFactory.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNodeFactory.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNodeFactory.java
index 2d8f4bb..bb9a16e 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNodeFactory.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNodeFactory.java
@@ -1,5 +1,19 @@
-/**
- * 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;
 
@@ -7,10 +21,6 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
-/**
- * @author alanrw
- *
- */
 public class SshNodeFactory {
 	
 	private Map<String, SshNode> nodeMap = Collections.synchronizedMap(new HashMap<String, SshNode> ());

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshPool.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshPool.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshPool.java
index c6a5851..3eac767 100755
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshPool.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshPool.java
@@ -1,5 +1,19 @@
-/**
- * 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;
 
@@ -18,10 +32,6 @@ import com.jcraft.jsch.Session;
 import de.uni_luebeck.inb.knowarc.usecases.RuntimeEnvironmentConstraint;
 import de.uni_luebeck.inb.knowarc.usecases.invocation.AskUserForPw;
 
-/**
- * @author alanrw
- *
- */
 public class SshPool {
 	
 	private static Logger logger = Logger.getLogger(SshPool.class);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.java
index c226e8a..b401c0f 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.java
@@ -1,5 +1,19 @@
-/**
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrl.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrl.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrl.java
index 601735b..ae40ead 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrl.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrl.java
@@ -1,14 +1,24 @@
-/**
- * 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;
 
 import org.apache.taverna.reference.ReferencedDataNature;
 
-/**
- * @author alanrw
- *
- */
 public class SshUrl {
 	
 	private SshNode sshNode;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrlToSshReference.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrlToSshReference.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrlToSshReference.java
index 3e89f38..7ab4cc6 100644
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrlToSshReference.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrlToSshReference.java
@@ -1,6 +1,21 @@
-/**
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
+
 package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;
 
 import org.apache.taverna.reference.ExternalReferenceSPI;
@@ -9,10 +24,6 @@ import org.apache.taverna.reference.ValueToReferenceConversionException;
 import org.apache.taverna.reference.ValueToReferenceConverterSPI;
 import org.apache.taverna.security.credentialmanager.CredentialManager;
 
-/**
- * @author alanrw
- *
- */
 public class SshUrlToSshReference implements ValueToReferenceConverterSPI {
 
 	private CredentialManager credentialManager;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/142667c2/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUseCaseInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUseCaseInvocation.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUseCaseInvocation.java
index 9d01e08..5f77364 100755
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUseCaseInvocation.java
+++ b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUseCaseInvocation.java
@@ -1,21 +1,19 @@
-/* Part of the KnowARC Janitor Use-case processor for taverna
- *  written 2007-2010 by Hajo Nils Krabbenhoeft and Steffen Moeller
- *  University of Luebeck, Institute for Neuro- and Bioinformatics
- *  University of Luebeck, Institute for Dermatolgy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  This package 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 3 of the License, or
- *  (at your option) any later version.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- *  This package 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 package; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;


[11/50] [abbrv] incubator-taverna-common-activities git commit: TAVERNA-963 package taverna.externaltool.ssh

Posted by st...@apache.org.
TAVERNA-963 package taverna.externaltool.ssh


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

Branch: refs/heads/docker
Commit: 71352f29f89aae9e486484b77295d189a229363d
Parents: 963a4b6
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed May 4 00:58:00 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed May 4 01:00:37 2016 +0100

----------------------------------------------------------------------
 .../invocation/ssh/SshReference.hbm.xml         | 41 --------------------
 .../externaltool/ssh/SshReference.hbm.xml       | 41 ++++++++++++++++++++
 2 files changed, 41 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/71352f29/taverna-external-tool-activity/src/main/resources/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.hbm.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/resources/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.hbm.xml b/taverna-external-tool-activity/src/main/resources/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.hbm.xml
deleted file mode 100644
index b67f6be..0000000
--- a/taverna-external-tool-activity/src/main/resources/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.hbm.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<!DOCTYPE hibernate-mapping PUBLIC
-                "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-                "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<!-- Hibernate mapping for ssh reference bean -->
-<hibernate-mapping>
-	<joined-subclass
-		name="org.apache.taverna.activities.externaltool.invocation.ssh.SshReference"
-		extends="org.apache.taverna.reference.AbstractExternalReference">
-		<!-- Link to primary key from abstract superclass -->
-		<key column="bean_id" />
-		<!-- SshReference specific properties below here -->
-		<property name="host" type="string" />
-		<property name="port" type="integer"/>
-		<property name="directory" type="string" />
-		<property name="subDirectory" type="string" />
-		<property name="fileName" type="string" />
-		<property name="dataNatureInteger" type="integer"/> 
- 
-		<property name="charset" type="string" />
-	</joined-subclass>
-</hibernate-mapping>
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/71352f29/taverna-external-tool-activity/src/main/resources/org/apache/taverna/activities/externaltool/ssh/SshReference.hbm.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/resources/org/apache/taverna/activities/externaltool/ssh/SshReference.hbm.xml b/taverna-external-tool-activity/src/main/resources/org/apache/taverna/activities/externaltool/ssh/SshReference.hbm.xml
new file mode 100644
index 0000000..b67f6be
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/resources/org/apache/taverna/activities/externaltool/ssh/SshReference.hbm.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<!DOCTYPE hibernate-mapping PUBLIC
+                "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+                "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<!-- Hibernate mapping for ssh reference bean -->
+<hibernate-mapping>
+	<joined-subclass
+		name="org.apache.taverna.activities.externaltool.invocation.ssh.SshReference"
+		extends="org.apache.taverna.reference.AbstractExternalReference">
+		<!-- Link to primary key from abstract superclass -->
+		<key column="bean_id" />
+		<!-- SshReference specific properties below here -->
+		<property name="host" type="string" />
+		<property name="port" type="integer"/>
+		<property name="directory" type="string" />
+		<property name="subDirectory" type="string" />
+		<property name="fileName" type="string" />
+		<property name="dataNatureInteger" type="integer"/> 
+ 
+		<property name="charset" type="string" />
+	</joined-subclass>
+</hibernate-mapping>
+


[44/50] [abbrv] incubator-taverna-common-activities git commit: TAVERNA-987 json2.js is Public Domain

Posted by st...@apache.org.
TAVERNA-987 json2.js is Public Domain


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

Branch: refs/heads/docker
Commit: fe188dad622b2bf2cd87082e19ea7968e5a0ef10
Parents: 3d534c2
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Jun 20 16:02:34 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Jun 20 16:02:34 2016 +0100

----------------------------------------------------------------------
 LICENSE | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fe188dad/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 9844251..0b73e97 100644
--- a/LICENSE
+++ b/LICENSE
@@ -206,4 +206,7 @@ taverna-wsdl-generic/src/main/resources/META-INF/soap-encoding.xsd
 is licensed by the W3C Software License
 http://www.w3.org/Consortium/Legal/copyright-software-19980720
 ---------------------------------------------------------
-
+./taverna-interaction-activity/src/main/resources/json2.js
+is Public Domain, see https://github.com/douglascrockford/JSON-js/
+and http://www.json.org/js.html
+---------------------------------------------------------


[45/50] [abbrv] incubator-taverna-common-activities git commit: markdown typo

Posted by st...@apache.org.
markdown typo


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

Branch: refs/heads/docker
Commit: 9b5ea8a7706bded9fdea2e6979f90a40787363ec
Parents: fe188da
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Jun 20 17:43:41 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Jun 20 17:43:41 2016 +0100

----------------------------------------------------------------------
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/9b5ea8a7/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index e0712fa..3f14027 100644
--- a/README.md
+++ b/README.md
@@ -93,7 +93,7 @@ however you might want to compile these yourself in the below order:
 
 * [taverna-language](https://taverna.incubator.apache.org/download/language/)
 * [taverna-osgi](https://taverna.incubator.apache.org/download/osgi/)
-* [taverna-engine](https://taverna.incubator.apache.org/download/engine/
+* [taverna-engine](https://taverna.incubator.apache.org/download/engine/)
 
 Please see the `<properties>` of this [pom.xml](pom.xml) to find the
 correct versions to build.


[37/50] [abbrv] incubator-taverna-common-activities git commit: [maven-release-plugin] prepare release 2.1.0-incubating-RC3

Posted by st...@apache.org.
[maven-release-plugin] prepare release 2.1.0-incubating-RC3


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

Branch: refs/heads/docker
Commit: a192c858c65441f33043aeeaa0889e0159a5a4e8
Parents: fcc228b
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Jun 6 13:59:22 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Jun 6 13:59:22 2016 +0100

----------------------------------------------------------------------
 pom.xml                                     | 4 ++--
 taverna-beanshell-activity/pom.xml          | 2 +-
 taverna-external-tool-activity/pom.xml      | 2 +-
 taverna-interaction-activity/pom.xml        | 2 +-
 taverna-rest-activity/pom.xml               | 2 +-
 taverna-spreadsheet-import-activity/pom.xml | 2 +-
 taverna-wsdl-activity/pom.xml               | 2 +-
 taverna-wsdl-generic/pom.xml                | 2 +-
 taverna-xpath-activity/pom.xml              | 2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/a192c858/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 89a9fbf..d619bbe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
     </parent>
     <groupId>org.apache.taverna.commonactivities</groupId>
     <artifactId>apache-taverna-common-activities</artifactId>
-    <version>2.1.0-incubating-SNAPSHOT</version>
+    <version>2.1.0-incubating</version>
     <packaging>pom</packaging>
     <name>Apache Taverna Common Activities</name>
     <properties>
@@ -90,7 +90,7 @@
         <connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</developerConnection>
         <url>https://github.com/apache/incubator-taverna-common-activities</url>
-        <tag>HEAD</tag>
+        <tag>2.1.0-incubating-RC3</tag>
     </scm>
     <repositories>
         <repository>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/a192c858/taverna-beanshell-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity/pom.xml b/taverna-beanshell-activity/pom.xml
index 67a5a52..79079d7 100644
--- a/taverna-beanshell-activity/pom.xml
+++ b/taverna-beanshell-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-beanshell-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/a192c858/taverna-external-tool-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/pom.xml b/taverna-external-tool-activity/pom.xml
index da54d10..4a36065 100644
--- a/taverna-external-tool-activity/pom.xml
+++ b/taverna-external-tool-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-external-tool-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/a192c858/taverna-interaction-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/pom.xml b/taverna-interaction-activity/pom.xml
index 0b2a947..9a1d736 100644
--- a/taverna-interaction-activity/pom.xml
+++ b/taverna-interaction-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-interaction-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/a192c858/taverna-rest-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-rest-activity/pom.xml b/taverna-rest-activity/pom.xml
index 3f49704..e9b6fd1 100644
--- a/taverna-rest-activity/pom.xml
+++ b/taverna-rest-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-rest-activity</artifactId>
 	<name>Apache Taverna REST Activity</name>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/a192c858/taverna-spreadsheet-import-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity/pom.xml b/taverna-spreadsheet-import-activity/pom.xml
index b47a723..6fdf508 100644
--- a/taverna-spreadsheet-import-activity/pom.xml
+++ b/taverna-spreadsheet-import-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-spreadsheet-import-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/a192c858/taverna-wsdl-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity/pom.xml b/taverna-wsdl-activity/pom.xml
index 9078ac3..f82539b 100644
--- a/taverna-wsdl-activity/pom.xml
+++ b/taverna-wsdl-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-wsdl-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/a192c858/taverna-wsdl-generic/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/pom.xml b/taverna-wsdl-generic/pom.xml
index dedbcda..6c78be3 100644
--- a/taverna-wsdl-generic/pom.xml
+++ b/taverna-wsdl-generic/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 
 	<artifactId>taverna-wsdl-generic</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/a192c858/taverna-xpath-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity/pom.xml b/taverna-xpath-activity/pom.xml
index 3854940..b637f7e 100644
--- a/taverna-xpath-activity/pom.xml
+++ b/taverna-xpath-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-xpath-activity</artifactId>
 	<name>Apache Taverna XPath Activity</name>


[25/50] [abbrv] incubator-taverna-common-activities git commit: javadoc crossreferences

Posted by st...@apache.org.
javadoc crossreferences


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

Branch: refs/heads/docker
Commit: 386cf486222ba614882b3ed577ff0db5ec9e99cb
Parents: 4dee9ae
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon May 9 15:01:05 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon May 9 15:01:05 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/386cf486/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index aa358ef..3d29968 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,6 +75,16 @@
                     </excludes>
                 </configuration>
             </plugin>
+            <plugin>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <configuration>
+                    <links>
+                        <link>https://taverna.incubator.apache.org/javadoc/taverna-language/</link>
+                        <link>https://taverna.incubator.apache.org/javadoc/taverna-osgi/</link>
+                        <link>https://taverna.incubator.apache.org/javadoc/taverna-engine/</link>
+                    </links>
+                </configuration>
+            </plugin>
         </plugins>
     </build>    
     <scm>


[35/50] [abbrv] incubator-taverna-common-activities git commit: [maven-release-plugin] prepare release 2.1.0-incubating-RC2

Posted by st...@apache.org.
[maven-release-plugin] prepare release 2.1.0-incubating-RC2


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

Branch: refs/heads/docker
Commit: faa8927eff68a50a2b200ce17a54bb2234538b4f
Parents: e75d5b3
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed Jun 1 00:17:29 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed Jun 1 00:17:29 2016 +0100

----------------------------------------------------------------------
 pom.xml                                     | 4 ++--
 taverna-beanshell-activity/pom.xml          | 2 +-
 taverna-external-tool-activity/pom.xml      | 2 +-
 taverna-interaction-activity/pom.xml        | 2 +-
 taverna-rest-activity/pom.xml               | 2 +-
 taverna-spreadsheet-import-activity/pom.xml | 2 +-
 taverna-wsdl-activity/pom.xml               | 2 +-
 taverna-wsdl-generic/pom.xml                | 2 +-
 taverna-xpath-activity/pom.xml              | 2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/faa8927e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 89a9fbf..38bcf00 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
     </parent>
     <groupId>org.apache.taverna.commonactivities</groupId>
     <artifactId>apache-taverna-common-activities</artifactId>
-    <version>2.1.0-incubating-SNAPSHOT</version>
+    <version>2.1.0-incubating</version>
     <packaging>pom</packaging>
     <name>Apache Taverna Common Activities</name>
     <properties>
@@ -90,7 +90,7 @@
         <connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</developerConnection>
         <url>https://github.com/apache/incubator-taverna-common-activities</url>
-        <tag>HEAD</tag>
+        <tag>2.1.0-incubating-RC2</tag>
     </scm>
     <repositories>
         <repository>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/faa8927e/taverna-beanshell-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity/pom.xml b/taverna-beanshell-activity/pom.xml
index 67a5a52..79079d7 100644
--- a/taverna-beanshell-activity/pom.xml
+++ b/taverna-beanshell-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-beanshell-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/faa8927e/taverna-external-tool-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/pom.xml b/taverna-external-tool-activity/pom.xml
index da54d10..4a36065 100644
--- a/taverna-external-tool-activity/pom.xml
+++ b/taverna-external-tool-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-external-tool-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/faa8927e/taverna-interaction-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/pom.xml b/taverna-interaction-activity/pom.xml
index 0b2a947..9a1d736 100644
--- a/taverna-interaction-activity/pom.xml
+++ b/taverna-interaction-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-interaction-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/faa8927e/taverna-rest-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-rest-activity/pom.xml b/taverna-rest-activity/pom.xml
index 3f49704..e9b6fd1 100644
--- a/taverna-rest-activity/pom.xml
+++ b/taverna-rest-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-rest-activity</artifactId>
 	<name>Apache Taverna REST Activity</name>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/faa8927e/taverna-spreadsheet-import-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity/pom.xml b/taverna-spreadsheet-import-activity/pom.xml
index b47a723..6fdf508 100644
--- a/taverna-spreadsheet-import-activity/pom.xml
+++ b/taverna-spreadsheet-import-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-spreadsheet-import-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/faa8927e/taverna-wsdl-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity/pom.xml b/taverna-wsdl-activity/pom.xml
index 9078ac3..f82539b 100644
--- a/taverna-wsdl-activity/pom.xml
+++ b/taverna-wsdl-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-wsdl-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/faa8927e/taverna-wsdl-generic/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/pom.xml b/taverna-wsdl-generic/pom.xml
index dedbcda..6c78be3 100644
--- a/taverna-wsdl-generic/pom.xml
+++ b/taverna-wsdl-generic/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 
 	<artifactId>taverna-wsdl-generic</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/faa8927e/taverna-xpath-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity/pom.xml b/taverna-xpath-activity/pom.xml
index 3854940..b637f7e 100644
--- a/taverna-xpath-activity/pom.xml
+++ b/taverna-xpath-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-xpath-activity</artifactId>
 	<name>Apache Taverna XPath Activity</name>


[49/50] [abbrv] incubator-taverna-common-activities git commit: no tabs

Posted by st...@apache.org.
no tabs


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

Branch: refs/heads/docker
Commit: df96dcecf771f5b1153341509244a6006a1ec1a8
Parents: 048639d
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jun 30 14:51:19 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jun 30 14:51:19 2016 +0100

----------------------------------------------------------------------
 pom.xml | 118 +++++++++++++++++++++++++++++------------------------------
 1 file changed, 59 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/df96dcec/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 354f4cc..c461863 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,66 +18,66 @@
 
 -->
 <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>apache-taverna-parent</artifactId>
-		<version>2-incubating</version>
-	</parent>
-	<groupId>org.apache.taverna.commonactivities</groupId>
-	<artifactId>apache-taverna-common-activities</artifactId>
-	<version>2.1.0-incubating-SNAPSHOT</version>
-	<packaging>pom</packaging>
-	<name>Apache Taverna Common Activities</name>
-	<properties>
+    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>apache-taverna-parent</artifactId>
+        <version>2-incubating</version>
+    </parent>
+    <groupId>org.apache.taverna.commonactivities</groupId>
+    <artifactId>apache-taverna-common-activities</artifactId>
+    <version>2.1.0-incubating-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>Apache Taverna Common Activities</name>
+    <properties>
 
-		<!-- Taverna dependency versions -->
-		<taverna.language.version>0.15.0-incubating</taverna.language.version>
-		<taverna.osgi.version>0.2.1-incubating</taverna.osgi.version>
-		<taverna.engine.version>3.1.0-incubating-SNAPSHOT</taverna.engine.version>
+        <!-- Taverna dependency versions -->
+        <taverna.language.version>0.15.0-incubating</taverna.language.version>
+        <taverna.osgi.version>0.2.1-incubating</taverna.osgi.version>
+        <taverna.engine.version>3.1.0-incubating-SNAPSHOT</taverna.engine.version>
 
-		<!-- Third-party dependency versios -->
-		<abdera.version>1.1.3</abdera.version>
-		<bsh.version>2.0b6</bsh.version>
-		<javax.wsdl.version>1.6.1</javax.wsdl.version>
-		<javacsv.version>2.0</javacsv.version>
-		<jsch.version>1.0.6.RELEASE</jsch.version>
-		<odfdom.version>0.7</odfdom.version>
-		<!-- <odfdom.version>0.8.8-incubating</odfdom.version> -->
-		<santuario.xmlsec.version>1.5.7</santuario.xmlsec.version>
-		<xmlschema.version>2.2.1</xmlschema.version>
-		<velocity.version>1.7</velocity.version>
-		<webdavservlet.version>2.0</webdavservlet.version>
-		<woden.version>1.0M10</woden.version>
-		<wss4j.version>1.6.18</wss4j.version>
-	</properties>
-	<modules>
-		<module>taverna-docker-activity</module>
-		<module>taverna-beanshell-activity</module>
-		<module>taverna-external-tool-activity</module>
-		<module>taverna-interaction-activity</module>
-		<module>taverna-rest-activity</module>
-		<module>taverna-spreadsheet-import-activity</module>
-		<module>taverna-wsdl-activity</module>
-		<module>taverna-wsdl-generic</module>
-		<module>taverna-xpath-activity</module>
-	</modules>
-	<scm>
-		<connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</connection>
-		<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</developerConnection>
-		<url>https://github.com/apache/incubator-taverna-common-activities</url>
-		<tag>HEAD</tag>
-	</scm>
-	<repositories>
-		<repository>
-			<id>apache.snapshots</id>
-			<name>Apache Snapshot Repository</name>
-			<url>http://repository.apache.org/snapshots</url>
-			<releases>
-				<enabled>false</enabled>
-			</releases>
-		</repository>
-	</repositories>
+        <!-- Third-party dependency versios -->
+        <abdera.version>1.1.3</abdera.version>
+        <bsh.version>2.0b6</bsh.version>
+        <javax.wsdl.version>1.6.1</javax.wsdl.version>
+        <javacsv.version>2.0</javacsv.version>
+        <jsch.version>1.0.6.RELEASE</jsch.version>
+        <odfdom.version>0.7</odfdom.version>
+        <!-- <odfdom.version>0.8.8-incubating</odfdom.version> -->
+        <santuario.xmlsec.version>1.5.7</santuario.xmlsec.version>
+        <xmlschema.version>2.2.1</xmlschema.version>
+        <velocity.version>1.7</velocity.version>
+        <webdavservlet.version>2.0</webdavservlet.version>
+        <woden.version>1.0M10</woden.version>
+        <wss4j.version>1.6.18</wss4j.version>
+    </properties>
+    <modules>
+        <module>taverna-docker-activity</module>
+        <module>taverna-beanshell-activity</module>
+        <module>taverna-external-tool-activity</module>
+        <module>taverna-interaction-activity</module>
+        <module>taverna-rest-activity</module>
+        <module>taverna-spreadsheet-import-activity</module>
+        <module>taverna-wsdl-activity</module>
+        <module>taverna-wsdl-generic</module>
+        <module>taverna-xpath-activity</module>
+    </modules>
+    <scm>
+        <connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</connection>
+        <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</developerConnection>
+        <url>https://github.com/apache/incubator-taverna-common-activities</url>
+        <tag>HEAD</tag>
+    </scm>
+    <repositories>
+        <repository>
+            <id>apache.snapshots</id>
+            <name>Apache Snapshot Repository</name>
+            <url>http://repository.apache.org/snapshots</url>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+        </repository>
+    </repositories>
 
 </project>


[32/50] [abbrv] incubator-taverna-common-activities git commit: [maven-release-plugin] prepare for next development iteration

Posted by st...@apache.org.
[maven-release-plugin] prepare for next development iteration


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

Branch: refs/heads/docker
Commit: ec3151143e70cada2fc9546ade2c039f1c87d282
Parents: c604cc7
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue May 31 14:25:24 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue May 31 14:25:24 2016 +0100

----------------------------------------------------------------------
 pom.xml                                     | 4 ++--
 taverna-beanshell-activity/pom.xml          | 2 +-
 taverna-external-tool-activity/pom.xml      | 2 +-
 taverna-interaction-activity/pom.xml        | 2 +-
 taverna-rest-activity/pom.xml               | 2 +-
 taverna-spreadsheet-import-activity/pom.xml | 2 +-
 taverna-wsdl-activity/pom.xml               | 2 +-
 taverna-wsdl-generic/pom.xml                | 2 +-
 taverna-xpath-activity/pom.xml              | 2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/ec315114/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 33de8ce..89a9fbf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
     </parent>
     <groupId>org.apache.taverna.commonactivities</groupId>
     <artifactId>apache-taverna-common-activities</artifactId>
-    <version>2.1.0-incubating</version>
+    <version>2.1.0-incubating-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>Apache Taverna Common Activities</name>
     <properties>
@@ -90,7 +90,7 @@
         <connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</developerConnection>
         <url>https://github.com/apache/incubator-taverna-common-activities</url>
-        <tag>2.1.0-incubating-RC1</tag>
+        <tag>HEAD</tag>
     </scm>
     <repositories>
         <repository>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/ec315114/taverna-beanshell-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity/pom.xml b/taverna-beanshell-activity/pom.xml
index 79079d7..67a5a52 100644
--- a/taverna-beanshell-activity/pom.xml
+++ b/taverna-beanshell-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-beanshell-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/ec315114/taverna-external-tool-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/pom.xml b/taverna-external-tool-activity/pom.xml
index 4a36065..da54d10 100644
--- a/taverna-external-tool-activity/pom.xml
+++ b/taverna-external-tool-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-external-tool-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/ec315114/taverna-interaction-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/pom.xml b/taverna-interaction-activity/pom.xml
index 9a1d736..0b2a947 100644
--- a/taverna-interaction-activity/pom.xml
+++ b/taverna-interaction-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-interaction-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/ec315114/taverna-rest-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-rest-activity/pom.xml b/taverna-rest-activity/pom.xml
index e9b6fd1..3f49704 100644
--- a/taverna-rest-activity/pom.xml
+++ b/taverna-rest-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-rest-activity</artifactId>
 	<name>Apache Taverna REST Activity</name>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/ec315114/taverna-spreadsheet-import-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity/pom.xml b/taverna-spreadsheet-import-activity/pom.xml
index 6fdf508..b47a723 100644
--- a/taverna-spreadsheet-import-activity/pom.xml
+++ b/taverna-spreadsheet-import-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-spreadsheet-import-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/ec315114/taverna-wsdl-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity/pom.xml b/taverna-wsdl-activity/pom.xml
index f82539b..9078ac3 100644
--- a/taverna-wsdl-activity/pom.xml
+++ b/taverna-wsdl-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-wsdl-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/ec315114/taverna-wsdl-generic/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/pom.xml b/taverna-wsdl-generic/pom.xml
index 6c78be3..dedbcda 100644
--- a/taverna-wsdl-generic/pom.xml
+++ b/taverna-wsdl-generic/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>taverna-wsdl-generic</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/ec315114/taverna-xpath-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity/pom.xml b/taverna-xpath-activity/pom.xml
index b637f7e..3854940 100644
--- a/taverna-xpath-activity/pom.xml
+++ b/taverna-xpath-activity/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating</version>
+		<version>2.1.0-incubating-SNAPSHOT</version>
 	</parent>
 	<artifactId>taverna-xpath-activity</artifactId>
 	<name>Apache Taverna XPath Activity</name>


[27/50] [abbrv] incubator-taverna-common-activities git commit: Remove javax.activation - duplicate with Felix

Posted by st...@apache.org.
Remove javax.activation - duplicate with Felix


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

Branch: refs/heads/docker
Commit: cdde6c581c30248fa2e39289cf6002694affa469
Parents: b29c4cb
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Fri May 13 17:04:59 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Fri May 13 17:04:59 2016 +0100

----------------------------------------------------------------------
 taverna-wsdl-generic/pom.xml | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/cdde6c58/taverna-wsdl-generic/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/pom.xml b/taverna-wsdl-generic/pom.xml
index feb31dd..6229580 100644
--- a/taverna-wsdl-generic/pom.xml
+++ b/taverna-wsdl-generic/pom.xml
@@ -84,11 +84,6 @@
 		<version>${jdom.version}</version>
 	</dependency>
 	<dependency>
-		<groupId>javax.activation</groupId>
-		<artifactId>com.springsource.javax.activation</artifactId>
-		<version>${activation.version}</version>
-	</dependency>
-	<dependency>
 		<groupId>org.apache.servicemix.bundles</groupId>
 		<artifactId>org.apache.servicemix.bundles.wsdl4j</artifactId>
 		<version>${servicemix.javax.wsdl.version}</version>


[39/50] [abbrv] incubator-taverna-common-activities git commit: Keep using 3.1.0-incubating-SNAPSHOT

Posted by st...@apache.org.
Keep using 3.1.0-incubating-SNAPSHOT


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

Branch: refs/heads/docker
Commit: 0912b7628f4f64fcb424d06a1379792f40745ce8
Parents: fe3c9ef
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Jun 13 16:28:09 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Jun 13 16:28:09 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/0912b762/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 89a9fbf..7f1c439 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
         <!-- Taverna dependency versions -->
         <taverna.language.version>0.15.0-incubating</taverna.language.version>
         <taverna.osgi.version>0.2.1-incubating</taverna.osgi.version>
-        <taverna.engine.version>3.1.0-incubating</taverna.engine.version>
+        <taverna.engine.version>3.1.0-incubating-SNAPSHOT</taverna.engine.version>
 
         <!-- Third-party dependency versios -->
         <abdera.version>1.1.3</abdera.version>


[09/50] [abbrv] incubator-taverna-common-activities git commit: TAVERNA-963 package taverna.externaltool.*

Posted by st...@apache.org.
TAVERNA-963 package taverna.externaltool.*


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

Branch: refs/heads/docker
Commit: 98468d304f297b53fc73e80befba8787adabdf53
Parents: 142667c
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed May 4 00:53:18 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed May 4 01:00:29 2016 +0100

----------------------------------------------------------------------
 .../inb/knowarc/gui/AskUserForPwPopup.java      |  74 --
 .../inb/knowarc/gui/PleaseWaitDialog.java       |  73 --
 .../knowarc/usecases/RuntimeEnvironment.java    | 251 ------
 .../usecases/RuntimeEnvironmentConstraint.java  | 160 ----
 .../inb/knowarc/usecases/ScriptInput.java       | 134 ---
 .../inb/knowarc/usecases/ScriptInputStatic.java |  73 --
 .../inb/knowarc/usecases/ScriptInputUser.java   |  99 --
 .../inb/knowarc/usecases/ScriptOutput.java      |  88 --
 .../knowarc/usecases/UseCaseDescription.java    | 897 -------------------
 .../knowarc/usecases/UseCaseEnumeration.java    | 111 ---
 .../usecases/invocation/AskUserForPw.java       |  32 -
 .../invocation/InvocationException.java         |  36 -
 .../usecases/invocation/UseCaseInvocation.java  | 322 -------
 .../local/LocalUseCaseInvocation.java           | 561 ------------
 .../ssh/SshAutoLoginTrustEveryone.java          |  70 --
 .../usecases/invocation/ssh/SshNode.java        | 157 ----
 .../usecases/invocation/ssh/SshNodeFactory.java |  66 --
 .../usecases/invocation/ssh/SshPool.java        | 158 ----
 .../usecases/invocation/ssh/SshReference.java   | 222 -----
 .../knowarc/usecases/invocation/ssh/SshUrl.java | 163 ----
 .../invocation/ssh/SshUrlToSshReference.java    |  54 --
 .../invocation/ssh/SshUseCaseInvocation.java    | 561 ------------
 .../externaltool/ExternalToolActivity.java      |  13 +-
 .../ExternalToolActivityConfigurationBean.java  |   2 +-
 .../ExternalToolActivityMimeTypeChecker.java    |   5 +-
 .../externaltool/InvocationCreator.java         |   5 +-
 .../externaltool/RetrieveLoginFromTaverna.java  |   2 +-
 .../externaltool/desc/RuntimeEnvironment.java   | 251 ++++++
 .../desc/RuntimeEnvironmentConstraint.java      | 160 ++++
 .../externaltool/desc/ScriptInput.java          | 134 +++
 .../externaltool/desc/ScriptInputStatic.java    |  73 ++
 .../externaltool/desc/ScriptInputUser.java      |  99 ++
 .../externaltool/desc/ScriptOutput.java         |  88 ++
 .../externaltool/desc/UseCaseDescription.java   | 897 +++++++++++++++++++
 .../externaltool/desc/UseCaseEnumeration.java   | 111 +++
 .../externaltool/gui/AskUserForPwPopup.java     |  74 ++
 .../externaltool/gui/PleaseWaitDialog.java      |  73 ++
 .../externaltool/invocation/AskUserForPw.java   |  32 +
 .../invocation/InvocationException.java         |  36 +
 .../invocation/UseCaseInvocation.java           | 321 +++++++
 .../ExternalToolLocalInvocationMechanism.java   |   2 -
 .../local/LocalInvocationCreator.java           |   6 +-
 .../local/LocalInvocationPersister.java         |   2 -
 .../local/LocalMechanismCreator.java            |   2 -
 .../local/LocalUseCaseInvocation.java           | 560 ++++++++++++
 .../ssh/ExternalToolSshInvocationMechanism.java |   5 -
 .../ssh/SshAutoLoginTrustEveryone.java          |  69 ++
 .../externaltool/ssh/SshInvocationCreator.java  |  11 +-
 .../ssh/SshInvocationPersister.java             |   4 +-
 .../externaltool/ssh/SshMechanismCreator.java   |   4 -
 .../activities/externaltool/ssh/SshNode.java    | 157 ++++
 .../externaltool/ssh/SshNodeFactory.java        |  66 ++
 .../activities/externaltool/ssh/SshPool.java    | 157 ++++
 .../externaltool/ssh/SshReference.java          | 222 +++++
 .../activities/externaltool/ssh/SshUrl.java     | 163 ++++
 .../externaltool/ssh/SshUrlToSshReference.java  |  54 ++
 .../externaltool/ssh/SshUseCaseInvocation.java  | 560 ++++++++++++
 ...pache.taverna.reference.ExternalReferenceSPI |   2 +-
 ...verna.reference.ValueToReferenceConverterSPI |   2 +-
 .../spring/external-tool-activity-context.xml   |   4 +-
 .../invocation/ssh/SshReference.hbm.xml         |   2 +-
 61 files changed, 4379 insertions(+), 4413 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/AskUserForPwPopup.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/AskUserForPwPopup.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/AskUserForPwPopup.java
deleted file mode 100644
index 0ce0460..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/AskUserForPwPopup.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.uni_luebeck.inb.knowarc.gui;
-
-import javax.swing.JOptionPane;
-
-import de.uni_luebeck.inb.knowarc.usecases.invocation.AskUserForPw;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNode;
-
-public final class AskUserForPwPopup implements AskUserForPw {
-	private SshNode ret;
-	private String pw, pp, kf, us;
-
-	public static String ask(String message, String title) {
-		return (String) JOptionPane.showInputDialog(null, message, title, JOptionPane.QUESTION_MESSAGE, null, null, "");
-	}
-
-	public static boolean askYN(String message, String title) {
-		return JOptionPane.showConfirmDialog(null, message, title, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION;
-	}
-
-	public String getPassword() {
-		getUsername();
-		if (pw != null)
-			return pw;
-		pw = ask("Please enter your password for " + us + " @ " + ret.getHost(), us + " @ " + ret.getHost());
-		return pw;
-	}
-
-	public String getPassphrase() {
-		getUsername();
-		if (pp != null)
-			return pp;
-		pp = ask("Please enter your passphrase for " + kf + " used for " + us + " @ " + ret.getHost(), us + " @ " + ret.getHost());
-		return pp;
-	}
-
-	public String getKeyfile() {
-		getUsername();
-		if (kf != null)
-			return kf;
-		kf = ask("Please enter the keyfile for " + us + " @ " + ret.getHost(), us + " @ " + ret.getHost());
-		return kf;
-	}
-
-	public String getUsername() {
-		if (us != null)
-			return us;
-		us = ask("Please enter the username for " + ret.getHost(), "Username for " + ret.getHost());
-		return us;
-	}
-
-	public void setSshNode(SshNode sshNode) {
-		this.ret = sshNode;
-	}
-
-	public void authenticationSucceeded() {
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/PleaseWaitDialog.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/PleaseWaitDialog.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/PleaseWaitDialog.java
deleted file mode 100755
index 2a643eb..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/gui/PleaseWaitDialog.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.gui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.swing.JDialog;
-import javax.swing.JLabel;
-
-public class PleaseWaitDialog extends JDialog {
-	private static final long serialVersionUID = 1L;
-
-	static PleaseWaitDialog instance = new PleaseWaitDialog();
-
-	public class WaitMessage{
-		public WaitMessage() {
-		}
-		
-		String str;
-		public void set(String newstr) {
-			synchronized (PleaseWaitDialog.instance) {
-				if(this.str != null && this.str.equals(newstr)) return;
-				if(this.str != null) messages.remove(this.str);
-				this.str = newstr;
-				if(this.str != null) messages.add(this.str);
-			}
-			updateDialog();
-		}
-		public void done() {
-			set(null);
-		}
-	}
-
-	private void updateDialog() {
-		synchronized (PleaseWaitDialog.instance) {
-			if(messages.size() > 0) this.setVisible(true);
-			else this.setVisible(false);
-			String t = "";
-			for (String  cur : messages) {
-				t += cur + "<br>";
-			}
-			l.setText("<html>"+t+"</html>");
-		}
-	}
-	
-	List<String> messages = new ArrayList<String>();
-	
-	JLabel l;
-	private PleaseWaitDialog() {
-		this.setAlwaysOnTop(true);
-		this.setTitle("Please wait");
-		l = new JLabel("");
-		this.add(l);
-		this.setSize(400, 100);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironment.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironment.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironment.java
deleted file mode 100644
index c7fd889..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironment.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases;
-
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-
-/**
- * Representation of information about a single runtime environment. It is used
- * to decide if one runtime environment is possibly compatible with another one
- * for the selection of queues to commit to.
- * 
- * To experiment/test these functions, run the following java -cp
- * target/taverna-knowarc-processor-0.1.7.jar
- * de.uni_luebeck.janitor.ldap.RuntimeEnvironment compare bla-1 foo-1 java -cp
- * target/taverna-knowarc-processor-0.1.7.jar
- * de.uni_luebeck.janitor.ldap.RuntimeEnvironment compare bla-1 bla-2 java -cp
- * target/taverna-knowarc-processor-0.1.7.jar
- * de.uni_luebeck.janitor.ldap.RuntimeEnvironment compare bla-1.2 bla-1
- * 
- * @author Steffen Moeller
- */
-@SuppressWarnings("unchecked")
-public class RuntimeEnvironment implements Comparable {
-	
-	private static Logger logger = Logger.getLogger(RuntimeEnvironment.class);
-
-
-	/**
-	 * Unique identification of the runtime environment - the full name
-	 */
-	protected String id;
-
-	/**
-	 * Accessor function for the complete identifier of the runtime environment
-	 */
-	public String getID() {
-		return id;
-	}
-
-	protected String name;
-
-	/**
-	 * Accessor function for the RE's name
-	 */
-	public String getName() {
-		return name;
-	}
-
-	protected String version;
-
-	/**
-	 * Accessfor function for the version
-	 */
-	public String getVersion() {
-		return version;
-	}
-
-	/**
-	 * for those busy fellows who don't have the time to convert the String into
-	 * a RuntimeEnvironment object.
-	 * 
-	 * @author Steffen Moeller
-	 */
-	public boolean atLeastAsCapableAs(String s) {
-		RuntimeEnvironment tmpRE = new RuntimeEnvironment(s);
-		return this.atLeastAsCapableAs(tmpRE);
-	}
-
-	/**
-	 * Indicates if a runtime environment has the same name, and if so, if the
-	 * given RE has the same or a later version.
-	 * 
-	 * @author Steffen Moeller
-	 */
-	public boolean atLeastAsCapableAs(RuntimeEnvironment re) {
-		if (!name.equals(re.name))
-			return false;
-		int c = compareVersions(getVersion(), re.getVersion());
-		if (c >= 0) {
-			return true;
-		} else {
-			return false;
-		}
-	}
-
-	/**
-	 * Indicates if this runtimeEnvironment is the same version or later as any
-	 * in that list.
-	 * 
-	 * @author Steffen Moeller
-	 */
-	public boolean atLeastAsCapableAsAnyOf(Iterable<RuntimeEnvironment> res) {
-		boolean compatibleOneFound = false;
-		Iterator<RuntimeEnvironment> i = res.iterator();
-		while (i.hasNext() && !compatibleOneFound) {
-			RuntimeEnvironment r = i.next();
-			compatibleOneFound = atLeastAsCapableAs(r);
-		}
-		return compatibleOneFound;
-	}
-
-	/**
-	 * Indicates if any of the runtime environments listed is the same version
-	 * as this or later.
-	 * 
-	 * @author Steffen Moeller
-	 */
-	public boolean isInferiorToAtLeastOneIn(Iterable<RuntimeEnvironment> res) {
-		boolean compatibleOneFound = false;
-		Iterator<RuntimeEnvironment> i = res.iterator();
-		while (i.hasNext() && !compatibleOneFound) {
-			RuntimeEnvironment r = i.next();
-			compatibleOneFound = r.atLeastAsCapableAs(this);
-		}
-		return compatibleOneFound;
-	}
-
-	/**
-	 * Parses a string as commonly presented by the infosystem
-	 * 
-	 * @author Steffen Moeller
-	 */
-	public RuntimeEnvironment(String raw) {
-		id = raw;
-		int dashpos = raw.indexOf("-");
-		if (-1 == dashpos) {
-			version = "";
-			name = raw;
-		} else {
-			name = raw.substring(0, dashpos);
-			if (dashpos + 1 <= raw.length()) {
-				version = raw.substring(dashpos + 1, raw.length());
-			} else {
-				version = "";
-			}
-		}
-	}
-
-	/**
-	 * to make it behave like a string at time, as it was originally implemented
-	 */
-	@Override
-	public String toString() {
-		return id;
-	}
-
-	/**
-	 * Implementation of Comparable interface. It comes handy albeit this
-	 * function says nothing about the compatibility of two runtime environments
-	 * unless their names are identical and the relation of the constraint was
-	 * taken into account. It just sorts them in lists.
-	 */
-	public int compareTo(Object o) throws ClassCastException {
-		RuntimeEnvironment r = (RuntimeEnvironment) o;
-		if (getName().equals(r.getName())) {
-			return RuntimeEnvironment.compareVersions(getVersion(), r.getVersion());
-		} else {
-			return id.compareTo(r.getID());
-		}
-	}
-
-	/**
-	 * FIXME: For the sake of simplicity, this implementation makes an error in
-	 * treating . and - in the versions equally. Versions, if numerical, are
-	 * treated numerically. Otherwise it is lexicographical, which is error
-	 * prone, though. Should the 'Scanner' class should be tapped into?
-	 * 
-	 * @author Steffen Moeller
-	 */
-	public static int compareVersions(String a, String b) {
-
-		// null pointer exceptions are not risked .. we are nice
-		if (null == a)
-			a = "";
-		if (null == b)
-			b = "";
-
-		// catching the dumb case first
-		if (a.equals(b))
-			return 0;
-
-		List as = Arrays.asList(a.split("[.-]"));
-		List bs = Arrays.asList(b.split("[.-]"));
-
-		// both lists have the empty element as members at least
-		Iterator aIterator = as.iterator();
-		Iterator bIterator = bs.iterator();
-
-		while (aIterator.hasNext()) {
-			String aa = (String) aIterator.next();
-			if (!bIterator.hasNext()) {
-				// a is longer while equal so far
-				return 1; // a > b
-			}
-			String bb = (String) bIterator.next();
-			if (!aa.equals(bb)) {
-				// a and b differ
-				try {
-					Integer aInt = Integer.parseInt(aa);
-					Integer bInt = Integer.parseInt(bb);
-					return aInt.compareTo(bInt);
-				} catch (Exception e) {
-					return aa.compareTo(bb);
-				}
-			}
-		}
-		if (bIterator.hasNext()) {
-			// b is longer while equal so far
-			return -1; // a < b
-		}
-		return 0; // a == b
-	}
-
-	/**
-	 * For testing purposes
-	 */
-	public static void main(String argv[]) {
-		if ("compare".equals(argv[0])) {
-			RuntimeEnvironment r1 = new RuntimeEnvironment(argv[1]);
-			RuntimeEnvironment r2 = new RuntimeEnvironment(argv[2]);
-			logger.info("r1.getName(): " + r1.getName());
-			logger.info("r1.getVersion(): " + r1.getVersion());
-			logger.info("r2.getName(): " + r2.getName());
-			logger.info("r2.getVersion(): " + r2.getVersion());
-			logger.info("r1.atLeastAsCapableAs(r2): " + String.valueOf(r1.atLeastAsCapableAs(r2)));
-		} else {
-			logger.info("Don't know how to '" + argv[0] + "'");
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironmentConstraint.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironmentConstraint.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironmentConstraint.java
deleted file mode 100644
index ce7e055..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/RuntimeEnvironmentConstraint.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases;
- 
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.apache.log4j.Logger;
-
-
-/**
- * When use cases present a runtime environment, then they don't want to express
- * that these would provide such, but that these request such, i.e. they constrain
- * lists of potentially eligible queues. 
- * @author Steffen Moeller
- * @since 2008
- */
-public class RuntimeEnvironmentConstraint extends RuntimeEnvironment {
-	
-	private static Logger logger = Logger.getLogger(RuntimeEnvironmentConstraint.class);
-
-	private static String[] ACCEPTED_RELATIONS = new String[] {"=", ">=", "<=", ">", "<"};
-	/**
-	 * If there is no relation specified, presume >=
-	 */
-	private static String DEFAULT_RELATION = ">=";
-	
-	public static String[] getAcceptedRelations() {
-		return ACCEPTED_RELATIONS;
-	}
-
-	public static String getDefaultRelation() {
-		return DEFAULT_RELATION;
-	}
-
-	/**
-	 *  Identifies the relation between runtime environments to be tested
-	 */
-	protected String relation;
-	
-	/**
-	 * Accessor function for relation
-	 */
-	public String getRelation() {
-		return this.relation;
-	}
-	
-	/**
-	 * Tests of a relation is supported
-	 * @param relation
-	 * @return true iff in <, > , <=, >=, =
-	 */
-	public static boolean acceptedRelation(String relation) {
-		if ((null == relation) || relation.equals("")) {
-			return false;
-		}
-		return relation.equals("=")||relation.equals(">=")||relation.equals("<=")||relation.equals(">")||relation.equals("<");
-	}
-	
-	/**
-	 * Constructor
-	 * @param id - expects the name of the runtime environment together with the version to which the
-	 * @param relation - relates to (">","<","=",">=","<=")
-	 */
-	public RuntimeEnvironmentConstraint(String id, String relation) {
-		super(id);
-		if (null == relation || relation.equals("")) {
-			relation=RuntimeEnvironmentConstraint.getDefaultRelation();
-		}
-		if (relation.equals("==")) {
-			relation="=";
-		}
-		else if (relation.equals("=<")) {
-			relation="<=";
-		}
-		else if (!RuntimeEnvironmentConstraint.acceptedRelation(relation)) {
-			logger.warn("Unknown relation '"+relation+"', presuming '"+RuntimeEnvironmentConstraint.getDefaultRelation()+"'");
-			relation=RuntimeEnvironmentConstraint.getDefaultRelation();
-		}
-		this.relation=relation;
-	}
-	
-	/**
-	 * Perfoms test if the RuntimeEnvironment (RE) passed as argument fulfills the requirements set by the constraint.
-	 * @param re - RE to test
-	 * @return true iff the RE fulfills this REconstraint.
-	 */
-	public boolean isFulfilledBy(RuntimeEnvironment re) {
-		logger.info(re.getID()+" " + this.getRelation() + " "+this.getID() + " ?");
-		if (this.getRelation().equals("=")) {
-			logger.info("=");
-			return re.getID().equals(this.getID());
-		}
-		if (!re.getName().equals(this.getName())) {
-			logger.warn("Name match failed");
-			return false;
-		}
-		int c = RuntimeEnvironment.compareVersions(re.getVersion(),this.getVersion());
-		logger.info("c="+c);
-		if (this.getRelation().equals(">")) return c>0;
-		if (this.getRelation().equals(">=")) return c>=0;
-		if (this.getRelation().equals("<=")) return c<=0;
-		if (this.getRelation().equals("<")) return c<0;
-		throw new RuntimeException("Unknown/untreated releation '"+this.getRelation()+"'");
-	}
-	
-	/**
-	 * Iterates over all the RuntimeEnvironments passed as argument.
-	 * @param REs - list of RuntimeEnvironments, mostly those offered at a particular queue
-	 * @return true iff any RE among the REs passed as argument are fulfilling the constraint
-	 */
-	public boolean isFulfilledByAtLeastOneIn(Collection<RuntimeEnvironment> REs) {
-		boolean fulfilled = false;
-		Iterator<RuntimeEnvironment> i = REs.iterator();
-		while(i.hasNext() && !fulfilled) {
-			RuntimeEnvironment r = i.next();
-			fulfilled = this.isFulfilledBy(r);
-		}
-		return fulfilled;
-	}
-	/**
-	 * For testing purposes
-	 */
-	public static void main(String argv[]) {
-		try {
-			if (argv[0].equals("--help") || argv.length != 3) {
-				logger.error("Expecting arguments (<|>|=|<=|>=) runtime1-version runtime2-version");
-			}
-			else {
-				RuntimeEnvironmentConstraint r1 = new RuntimeEnvironmentConstraint(argv[1], argv[0]);
-				RuntimeEnvironment r2 = new RuntimeEnvironment(argv[2]);
-				logger.info("r1.getName(): "+r1.getName());
-				logger.info("r1.getVersion(): "+r1.getVersion());
-				logger.info("r1.getRelation(): "+r1.getRelation());
-				logger.info("r2.getName(): "+r2.getName());
-				logger.info("r2.getVersion(): "+r2.getVersion());
-				logger.info("r1.isFulfilledBy(r2): "+String.valueOf(r1.isFulfilledBy(r2)));
-			}
-		}
-		catch (Exception e) {
-			logger.error(e);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInput.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInput.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInput.java
deleted file mode 100644
index 50747b5..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInput.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases;
-
-import java.nio.charset.Charset;
-
-import org.apache.taverna.activities.externaltool.ExternalToolActivity;
-import org.apache.taverna.workflowmodel.processor.config.ConfigurationBean;
-import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty;
-
-/**
- * Integrates inputs to the grid that come from the use case descriptions
- * with those that are fed through the workflow.
- *
- * this class controls name and data storage of one input,
- * no matter where the data comes from
- */
-@ConfigurationBean(uri = ExternalToolActivity.URI + "#AbstractScriptInput")
-public abstract class ScriptInput {
-	/**
-	 * This input can be referenced under the name 'tag'.
-	 */
-	private String tag = null;
-	/**
-	 * In most cases, the data will be stored under a specific
-	 * filename.
-	 */
-	private boolean file = false;
-	/**
-	 * Set, if the name of the file to be executed is not
-	 * explicitly set but prepared by some automatism and referenced
-	 * via the tagging principle.
-	 */
-	private boolean tempFile = false;
-	/**
-	 * True if (!) the data is binary. (Text otherwise)
-	 */
-	private boolean binary = false;
-
-	private String charsetName = Charset.defaultCharset().name();
-	private boolean forceCopy = false;
-
-	/**
-	 * @return the tag
-	 */
-	public final String getTag() {
-		return tag;
-	}
-	/**
-	 * @param tag the tag to set
-	 */
-	@ConfigurationProperty(name = "tag", label = "Tag")
-	public final void setTag(String tag) {
-		this.tag = tag;
-	}
-	/**
-	 * @return the file
-	 */
-	public final boolean isFile() {
-		return file;
-	}
-	/**
-	 * @param file the file to set
-	 */
-	@ConfigurationProperty(name = "file", label = "File")
-	public final void setFile(boolean file) {
-		this.file = file;
-	}
-	/**
-	 * @return the tempFile
-	 */
-	public final boolean isTempFile() {
-		return tempFile;
-	}
-	/**
-	 * @param tempFile the tempFile to set
-	 */
-	@ConfigurationProperty(name = "tempFile", label = "Temporary File")
-	public final void setTempFile(boolean tempFile) {
-		this.tempFile = tempFile;
-	}
-	/**
-	 * @return the binary
-	 */
-	public final boolean isBinary() {
-		return binary;
-	}
-	/**
-	 * @param binary the binary to set
-	 */
-	@ConfigurationProperty(name = "binary", label = "Binary")
-	public final void setBinary(boolean binary) {
-		this.binary = binary;
-	}
-
-	public String getCharsetName() {
-		return this.charsetName;
-	}
-	/**
-	 * @param charsetName the charsetName to set
-	 */
-	@ConfigurationProperty(name = "charsetName", label = "Chararter Set")
-	public void setCharsetName(String charsetName) {
-		this.charsetName = charsetName;
-	}
-
-	@ConfigurationProperty(name = "forceCopy", label = "Force Copy")
-	public final void setForceCopy(boolean forceCopy) {
-		this.forceCopy = forceCopy;
-
-	}
-	/**
-	 * @return the forceCopy
-	 */
-	public boolean isForceCopy() {
-		return forceCopy;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputStatic.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputStatic.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputStatic.java
deleted file mode 100644
index 749e104..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputStatic.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases;
-
-import org.apache.taverna.activities.externaltool.ExternalToolActivity;
-import org.apache.taverna.workflowmodel.processor.config.ConfigurationBean;
-import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty;
-
-/**
- * This subclass of script input is used to manage static content
- * which is embedded into the use case description.
- */
-@ConfigurationBean(uri = ExternalToolActivity.URI + "#ScriptInputStatic")
-public class ScriptInputStatic extends ScriptInput {
-
-	public ScriptInputStatic() {
-	}
-
-	private String url = null;  //if this is set, load content from remote URL
-	private String content = null;
-
-	@Override
-	public String toString() {
-		return "InputStatic[tag: " +
-			getTag() + (isFile() ? ", file" : "") + (isTempFile() ? ", tempfile" : "") + (isBinary() ? ", binary" : "") + ", content: " + content + "]";
-	}
-
-	/**
-	 * @return the url
-	 */
-	public final String getUrl() {
-		return url;
-	}
-
-	/**
-	 * @param url the url to set
-	 */
-	@ConfigurationProperty(name = "url", label = "URL", required=false)
-	public final void setUrl(String url) {
-		this.url = url;
-	}
-
-	/**
-	 * @return the content
-	 */
-	public final String getContent() {
-		return content;
-	}
-
-	/**
-	 * @param content the content to set
-	 */
-	@ConfigurationProperty(name = "content", label = "Content", required=false)
-	public final void setContent(String content) {
-		this.content = content;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputUser.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputUser.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputUser.java
deleted file mode 100644
index 715c13e..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptInputUser.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases;
-import java.util.ArrayList;
-
-import org.apache.taverna.activities.externaltool.ExternalToolActivity;
-import org.apache.taverna.workflowmodel.processor.config.ConfigurationBean;
-import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty;
-
-/**
- * Internal description of output
- */
-@ConfigurationBean(uri = ExternalToolActivity.URI + "#ScriptInput")
-public class ScriptInputUser extends ScriptInput {
-
-	/**
-	 * This input may be fed from multiple ouputs.
-	 */
-	private boolean list = false;
-	/**
-	 * True if the data from a list input in taverna is concatenated into one single input file.
-	 */
-	private boolean concatenate = false;
-
-	private ArrayList<String> mime = new ArrayList<String>();
-
-	@Override
-	public String toString() {
-		return "Input[tag: " + getTag() + (isFile() ? ", file" : "")
-				+ (isTempFile() ? ", tempfile" : "")
-				+ (isBinary() ? ", binary" : "") + (list ? ", list" : "")
-				+ (concatenate ? ", concatenate" : "")
-				+ " mime: " + mime.toString() + "]";
-	}
-
-	/**
-	 * @return the list
-	 */
-	public final boolean isList() {
-		return list;
-	}
-
-	/**
-	 * @param list the list to set
-	 */
-	@ConfigurationProperty(name = "list", label = "List")
-	public final void setList(boolean list) {
-		this.list = list;
-	}
-
-	/**
-	 * @return the concatenate
-	 */
-	public final boolean isConcatenate() {
-		return concatenate;
-	}
-
-	/**
-	 * @param concatenate the concatenate to set
-	 */
-	@ConfigurationProperty(name = "concatenate", label = "Concatenate")
-	public final void setConcatenate(boolean concatenate) {
-		this.concatenate = concatenate;
-	}
-
-	/**
-	 * @return the mime
-	 */
-	public final ArrayList<String> getMime() {
-		if (mime == null) {
-			mime = new ArrayList<String>();
-		}
-		return mime;
-	}
-
-	/**
-	 * @param mime the mime to set
-	 */
-	@ConfigurationProperty(name = "mime", label = "Mime Types", required=false)
-	public final void setMime(ArrayList<String> mime) {
-		this.mime = mime;
-	}
-};

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptOutput.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptOutput.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptOutput.java
deleted file mode 100644
index d824ad4..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/ScriptOutput.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases;
-import java.util.ArrayList;
-
-import org.apache.taverna.activities.externaltool.ExternalToolActivity;
-import org.apache.taverna.workflowmodel.processor.config.ConfigurationBean;
-import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty;
-
-/**
- * Internal description of input
- */
-@ConfigurationBean(uri = ExternalToolActivity.URI + "#ScriptOutput")
-public class ScriptOutput {
-	private String path;
-	private boolean binary;
-	private ArrayList<String> mime = new ArrayList<String>();
-
-	@Override
-	public String toString() {
-		return "Output[path: " + path + (binary ? ", binary" : "")
-				+ " mime: " + mime.toString() + "]";
-	}
-
-	/**
-	 * @return the path
-	 */
-	public final String getPath() {
-		return path;
-	}
-
-	/**
-	 * @param path the path to set
-	 */
-	@ConfigurationProperty(name = "path", label = "Path")
-	public final void setPath(String path) {
-		this.path = path;
-	}
-
-	/**
-	 * @return the binary
-	 */
-	public final boolean isBinary() {
-		return binary;
-	}
-
-	/**
-	 * @param binary the binary to set
-	 */
-	@ConfigurationProperty(name = "binary", label = "Binary")
-	public final void setBinary(boolean binary) {
-		this.binary = binary;
-	}
-
-	/**
-	 * @return the mime
-	 */
-	public final ArrayList<String> getMime() {
-		if (mime == null) {
-			mime = new ArrayList<String>();
-		}
-		return mime;
-	}
-
-	/**
-	 * @param mime the mime to set
-	 */
-	@ConfigurationProperty(name = "mime", label = "Mime Types", required=false)
-	public final void setMime(ArrayList<String> mime) {
-		this.mime = mime;
-	}
-};

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseDescription.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseDescription.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseDescription.java
deleted file mode 100644
index 1c5914e..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseDescription.java
+++ /dev/null
@@ -1,897 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-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 java.util.Set;
-
-import javax.swing.ImageIcon;
-
-import org.apache.taverna.activities.externaltool.ExternalToolActivity;
-import org.apache.taverna.workflowmodel.processor.config.ConfigurationBean;
-import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty;
-import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty.OrderPolicy;
-import org.apache.taverna.workflowmodel.serialization.DeserializationException;
-import org.apache.taverna.workflowmodel.utils.Tools;
-
-import org.apache.log4j.Logger;
-import org.jdom.Document;
-import org.jdom.Element;
-import org.jdom.JDOMException;
-import org.jdom.input.SAXBuilder;
-
-import org.apache.commons.lang.StringUtils;
-
-/**
- * Class representation of XML-description of UseCases
- */
-@ConfigurationBean(uri = ExternalToolActivity.URI + "#ToolDescription")
-public class UseCaseDescription {
-
-	private static Logger logger = Logger.getLogger(UseCaseDescription.class);
-
-	/**
-	 * Identifier for the retrieval of this UseCase in the sharedRepository
-	 * database, respectively its XML export.
-	 */
-	private String usecaseid = "";
-	/**
-	 * Workflow Elements now can get a group identifier. There may be subgroups
-	 * divided by :
-	 */
-	private String group = "";
-	/**
-	 * Textual description of the use case itself. This description is very
-	 * short to fit on the single line that is prepared for such descriptions in
-	 * the Taverna workflow element list.
-	 */
-	private String description = "";
-	/**
-	 * What is actually executed on the shell.
-	 */
-	private String command = "";
-
-	/**
-	 * Accessor function of command
-	 *
-	 * @return shell-executable series of commands
-	 */
-	public String getCommand() {
-		if (null == command) {
-			// FIXME: Is this possible?
-			return "";
-		} else {
-			return command;
-		}
-	}
-
-	/**
-	 * Routine that may be executed as a first check if the program is indeed
-	 * installed.
-	 */
-	private String test_local = null;
-
-	/**
-	 * URL of an icon that would help users to recognise the use case
-	 */
-	private String icon_url = null;
-
-	private int preparingTimeoutInSeconds = 20 * 60; // 20 minutes
-	private int executionTimeoutInSeconds = 30 * 60; // 30 minutes
-
-	private List<String> tags = new ArrayList<String>();
-	private List<RuntimeEnvironmentConstraint> REs = new ArrayList<RuntimeEnvironmentConstraint>();
-	private ArrayList<String> queue_preferred = new ArrayList<String>();
-	private ArrayList<String> queue_deny = new ArrayList<String>();
-
-	private List<ScriptInputStatic> static_inputs = new ArrayList<ScriptInputStatic>();
-	private Map<String, ScriptInput> inputs = new HashMap<String, ScriptInput>();
-	private Map<String, ScriptOutput> outputs = new HashMap<String, ScriptOutput>();
-
-	private boolean includeStdIn = false;
-	private boolean includeStdOut = true;
-	private boolean includeStdErr = true;
-
-	private List<Integer> validReturnCodes = new ArrayList<Integer>();
-	
-	/**
-	 * Default constructor to make xstream happy
-	 */
-	public UseCaseDescription() {
-		
-	}
-
-	/**
-	 * Constructor, for special purpose usecases.
-	 *
-	 * @param usecaseid
-	 */
-	public UseCaseDescription(String usecaseid) {
-		this.setUsecaseid(usecaseid);
-	}
-
-	/**
-	 * Constructor, expects an input stream containing the xml. for example, use
-	 * getClass().getClassLoader().getResourceAsStream("..") to load a usecase
-	 * from your program jar
-	 */
-	public UseCaseDescription(InputStream programAsStream) throws DeserializationException {
-		SAXBuilder builder = new SAXBuilder();
-		Document doc;
-		try {
-			doc = builder.build(programAsStream);
-			programAsStream.close();
-		} catch (JDOMException e) {
-			throw new DeserializationException("Error deserializing usecase", e);
-		} catch (IOException e) {
-			throw new DeserializationException("Error deserializing usecase", e);
-		}
-		readFromXmlElement(doc.getRootElement());
-	}
-
-	/**
-	 * Constructor, expects an XML-root to dissect.
-	 */
-	public UseCaseDescription(Element programNode) throws DeserializationException {
-		readFromXmlElement(programNode);
-	}
-
-/**
- * Produce an XML description of the UseCaseDescription
- */
-	public Element writeToXMLElement() {
-		Element programNode = new Element("program");
-		programNode.setAttribute("name", getUsecaseid());
-		programNode.setAttribute("description", getDescription());
-		// Always use element version of command
-//		programNode.setAttribute("command", getCommand());
-		Element commandNode = new Element("command");
-		commandNode.addContent(getCommand());
-		programNode.addContent(commandNode);
-		programNode.setAttribute("timeout", Integer.toString(getExecutionTimeoutInSeconds()));
-		programNode.setAttribute("preparing_timeout", Integer.toString(getPreparingTimeoutInSeconds()));
-		programNode.setAttribute("includeStdIn", Boolean.toString(isIncludeStdIn()));
-		programNode.setAttribute("includeStdOut", Boolean.toString(isIncludeStdOut()));
-		programNode.setAttribute("includeStdErr", Boolean.toString(isIncludeStdErr()));
-		for (ScriptInputStatic si : getStatic_inputs()) {
-			Element staticNode = new Element("static");
-			if (si.isBinary()) {
-				staticNode.setAttribute("binary", "true");
-			}
-			if (si.isForceCopy()) {
-				staticNode.setAttribute("forceCopy", "true");
-			}
-			if (si.isFile()) {
-				Element fileNode = new Element("file");
-				fileNode.setAttribute("path", si.getTag());
-				staticNode.addContent(fileNode);
-			} else if (si.isTempFile()) {
-				Element tempfileNode = new Element("tempfile");
-				tempfileNode.setAttribute("tag", si.getTag());
-				staticNode.addContent(tempfileNode);
-			} else {
-				Element replaceNode = new Element("replace");
-				replaceNode.setAttribute("tag", si.getTag());
-				staticNode.addContent(replaceNode);
-			}
-			if (si.getUrl() != null) {
-				Element contentNode = new Element("content");
-				contentNode.setAttribute("url", si.getUrl());
-				staticNode.addContent(contentNode);
-			} else {
-				Element contentNode = new Element("content");
-				contentNode.addContent((String) si.getContent());
-				staticNode.addContent(contentNode);
-			}
-			programNode.addContent(staticNode);
-		}
-		for (Entry<String, ScriptInput> entry : getInputs().entrySet()) {
-			String name = entry.getKey();
-			ScriptInputUser si = (ScriptInputUser) entry.getValue();
-			Element inputNode = new Element("input");
-			inputNode.setAttribute("name", name);
-			if (si.isBinary()) {
-				inputNode.setAttribute("binary", "true");
-			}
-			if (si.isForceCopy()) {
-				inputNode.setAttribute("forceCopy", "true");
-			}
-			if (si.isConcatenate()) {
-				inputNode.setAttribute("concatenate", "true");
-			}
-			if (si.isList()) {
-				inputNode.setAttribute("list", "true");
-			}
-			if (si.isFile()) {
-				Element fileNode = new Element("file");
-				fileNode.setAttribute("path", si.getTag());
-				inputNode.addContent(fileNode);
-			} else if (si.isTempFile()) {
-				Element tempfileNode = new Element("tempfile");
-				tempfileNode.setAttribute("tag", si.getTag());
-				inputNode.addContent(tempfileNode);
-			} else {
-				Element replaceNode = new Element("replace");
-				replaceNode.setAttribute("tag", si.getTag());
-				inputNode.addContent(replaceNode);
-			}
-			for (String mime : si.getMime()) {
-				Element mimeNode = new Element("mime");
-				mimeNode.setAttribute("type", mime);
-				inputNode.addContent(mimeNode);
-			}
-			programNode.addContent(inputNode);
-		}
-		for (Entry<String, ScriptOutput> entry : getOutputs().entrySet()) {
-			String name = entry.getKey();
-			ScriptOutput so = entry.getValue();
-			Element outputNode = new Element("output");
-			outputNode.setAttribute("name", name);
-			if (so.isBinary()) {
-				outputNode.setAttribute("binary", "true");
-			}
-			Element fromfileNode = new Element("fromfile");
-			fromfileNode.setAttribute("path", so.getPath());
-			outputNode.addContent(fromfileNode);
-			for (String mime : so.getMime()) {
-				Element mimeNode = new Element("mime");
-				mimeNode.setAttribute("type", mime);
-				outputNode.addContent(mimeNode);
-			}
-			programNode.addContent(outputNode);
-		}
-		for (RuntimeEnvironmentConstraint rec : getREs()) {
-			Element rteNode = new Element("rte");
-			rteNode.setAttribute("name", rec.getID());
-			rteNode.setAttribute("relation", rec.getRelation());
-			programNode.addContent(rteNode);
-		}
-		if ((group != null) && !group.isEmpty()) {
-			Element groupNode = new Element("group");
-			groupNode.setAttribute("name", group);
-			programNode.addContent(groupNode);
-		}
-		if ((test_local != null) && !test_local.isEmpty()) {
-			Element testNode = new Element("test");
-			testNode.setAttribute("local", test_local);
-			programNode.addContent(testNode);
-		}
-		if ((icon_url != null) && !icon_url.isEmpty()) {
-			Element iconNode = new Element("icon");
-			iconNode.setAttribute("url", icon_url);
-			programNode.addContent(iconNode);
-		}
-		if (!getQueue_preferred().isEmpty() || !getQueue_deny().isEmpty()) {
-			Element queueNode = new Element("queue");
-			for (String url : getQueue_preferred()) {
-				Element preferredNode = new Element("prefer");
-				preferredNode.setAttribute("url", url);
-				queueNode.addContent(preferredNode);
-			}
-			for (String url : getQueue_deny()) {
-				Element denyNode = new Element("deny");
-				denyNode.setAttribute("url", url);
-				queueNode.addContent(denyNode);
-			}
-			programNode.addContent(queueNode);
-		}
-			Element validReturnCodesNode = new Element("validReturnCodes");
-			validReturnCodesNode.setAttribute("codes", getReturnCodesAsText());
-			programNode.addContent(validReturnCodesNode);
-
-		return programNode;
-	}
-	/**
-	 * Specifies the UseCaseDescription from the root of an XML description
-	 * which is accessible online.
-	 *
-	 * @param programNode
-	 * @throws DeserializationException
-	 */
-	private void readFromXmlElement(Element programNode) throws DeserializationException {
-		if (programNode.getName().compareToIgnoreCase("program") != 0)
-			throw new DeserializationException("Expected <program>, read '" + programNode.getName() + "'");
-
-		setUsecaseid(programNode.getAttributeValue("name"));
-		setDescription(programNode.getAttributeValue("description"));
-		setCommand(programNode.getAttributeValue("command"));
-		String timeoutStr = programNode.getAttributeValue("timeout");
-		if (timeoutStr != null)
-			setExecutionTimeoutInSeconds(Integer.parseInt(timeoutStr));
-		timeoutStr = programNode.getAttributeValue("preparing_timeout");
-		if (timeoutStr != null)
-			setPreparingTimeoutInSeconds(Integer.parseInt(timeoutStr));
-
-		String includeStdInStr = programNode.getAttributeValue("includeStdIn");
-		if (includeStdInStr != null && !includeStdInStr.isEmpty()) {
-			setIncludeStdIn(includeStdInStr.equals("true"));
-		}
-
-		String includeStdOutStr = programNode.getAttributeValue("includeStdOut");
-		if (includeStdOutStr != null && !includeStdOutStr.isEmpty()) {
-			setIncludeStdOut(includeStdOutStr.equals("true"));
-		}
-
-		String includeStdErrStr = programNode.getAttributeValue("includeStdErr");
-		if (includeStdErrStr != null && !includeStdErrStr.isEmpty()) {
-			setIncludeStdErr(includeStdErrStr.equals("true"));
-		}
-
-		for (Object cur_ob : programNode.getChildren()) {
-			Element cur = (Element) cur_ob;
-
-			String name = cur.getAttributeValue("name");
-
-			String type = cur.getName();
-			boolean binary = false;
-			if (null != cur.getAttributeValue("binary") && cur.getAttributeValue("binary").equalsIgnoreCase("true")) {
-				binary = true;
-			}
-			boolean list = false;
-			if (null != cur.getAttributeValue("list") && cur.getAttributeValue("list").equalsIgnoreCase("true")) {
-				list = true;
-			}
-			boolean concatenate = false;
-			if (null != cur.getAttributeValue("concatenate") && cur.getAttributeValue("concatenate").equalsIgnoreCase("true")) {
-				concatenate = true;
-			}
-			boolean forceCopy = false;
-			if (null != cur.getAttributeValue("forceCopy") && cur.getAttributeValue("forceCopy").equalsIgnoreCase("true")) {
-				forceCopy = true;
-			}
-
-			Element inner = null;
-			String innerType = null, tag = null, path = null;
-			if (cur.getChildren().size() > 0) {
-				inner = (Element) cur.getChildren().get(0);
-				innerType = inner.getName();
-				tag = inner.getAttributeValue("tag");
-				path = inner.getAttributeValue("path");
-			}
-			// build mime type declaration list
-			ArrayList<String> mime = new ArrayList<String>();
-			for (Object child : cur.getChildren()) {
-				Element curChild = (Element) child;
-				if (curChild.getName().equalsIgnoreCase("mime")) {
-					mime.add(curChild.getAttributeValue("type"));
-				}
-			}
-			if (type.equalsIgnoreCase("static")) {
-				ScriptInputStatic si = new ScriptInputStatic();
-				Element content = cur.getChild("content");
-				if (content == null)
-					throw new DeserializationException("FIXME: script tag without embedded content tag");
-				si.setUrl(content.getAttributeValue("url"));
-				if (si.getUrl() == null)
-					si.setContent(content.getText());
-				fillInputDescription(si, binary, forceCopy, innerType, tag, path);
-				getStatic_inputs().add(si);
-			} else if (type.equalsIgnoreCase("input")) {
-				ScriptInputUser indesc = new ScriptInputUser();
-				indesc.setList(list);
-				indesc.setMime(mime);
-				indesc.setConcatenate(concatenate);
-				fillInputDescription(indesc, binary, forceCopy, innerType, tag, path);
-				getInputs().put(Tools.sanitiseName(name), indesc);
-			} else if (type.equalsIgnoreCase("output")) {
-				ScriptOutput outdesc = new ScriptOutput();
-				outdesc.setMime(mime);
-
-				boolean ok = true;
-				if (null == innerType) {
-					// don't know what to do
-					throw new DeserializationException("FIXME: Found null == innerType for output, is this the bug?");
-				} else if (innerType.equalsIgnoreCase("fromfile")) {
-					outdesc.setPath(path);
-					outdesc.setBinary(binary);
-				} else {
-					throw new DeserializationException("Problem reading output port: unknown innerType '" + innerType + "'");
-				}
-				if (ok) {
-					getOutputs().put(Tools.sanitiseName(name), outdesc);
-				}
-			} else if (type.equalsIgnoreCase("rte") || type.equalsIgnoreCase("re")) {
-				getREs().add(new RuntimeEnvironmentConstraint(name, cur.getAttributeValue("relation")));
-			} else if (type.equalsIgnoreCase("group")) {
-				group = name;
-			} else if (type.equalsIgnoreCase("test")) {
-				test_local = cur.getAttributeValue("local");
-			} else if (type.equalsIgnoreCase("icon")) {
-				icon_url = cur.getAttributeValue("url");
-			} else if (type.equalsIgnoreCase("queue")) {
-				for (Object child_ob : cur.getChildren()) {
-					Element child = (Element) child_ob;
-					if (child.getName().equalsIgnoreCase("prefer"))
-						getQueue_preferred().add(child.getAttributeValue("url"));
-					else if (child.getName().equalsIgnoreCase("deny"))
-						getQueue_deny().add(child.getAttributeValue("url"));
-					else
-						throw new DeserializationException("Error while reading usecase " + this.getUsecaseid() + ": invalid queue entry");
-				}
-			} else if (type.equalsIgnoreCase("command")) {
-				// i like to have the ability to inject complete shell script
-				// fragments into the use case,
-				// so this should be replace and should allow multiple lines
-				if ((getCommand() != null) && !getCommand().isEmpty()) {
-					throw new DeserializationException("You have specified both command attribute and command tag.");
-				}
-				setCommand(cur.getText());
-			} else if (type.equalsIgnoreCase("validReturnCodes")) {
-					String codeString = cur.getAttributeValue("codes");
-					if (codeString != null) {
-						setReturnCodesAsText(codeString);
-					}
-			}
-			else {
-				throw new DeserializationException("Unexpected and uninterpreted attribute " + type);
-			}
-		}
-	}
-
-	private void fillInputDescription(ScriptInput fillMe, boolean binary, boolean forceCopy, String innerType, String tag, String path) throws DeserializationException {
-		fillMe.setBinary(binary);
-		fillMe.setForceCopy(forceCopy);
-		if (null == innerType) {
-			// don't know what to do
-			throw new DeserializationException("FIXME: Found null == innerType for input, is this the bug?");
-		} else if (innerType.equalsIgnoreCase("replace")) {
-			fillMe.setTag(tag);
-			fillMe.setTempFile(false);
-			fillMe.setFile(false);
-			getTags().add(tag);
-		} else if (innerType.equalsIgnoreCase("tempfile")) {
-			fillMe.setTag(tag);
-			fillMe.setTempFile(true);
-			fillMe.setFile(false);
-			getTags().add(tag);
-		} else if (innerType.equalsIgnoreCase("file")) {
-			fillMe.setTag(path);
-			fillMe.setTempFile(false);
-			fillMe.setFile(true);
-		} else {
-			throw new DeserializationException("Problem reading input port: unknown innerType '" + innerType + "'");
-		}
-	}
-
-	/**
-	 * returns icon that is referenced in use case description
-	 */
-	public ImageIcon getImageIcon() {
-		if (null == icon_url) return null;
-		try {
-			URL u = new URL(icon_url);
-			return new ImageIcon(u, getUsecaseid());
-		} catch (Exception e) {
-			logger.error(e);
-			return null;
-		}
-	}
-
-	/**
-	 * String representation of the use case. It also contains interesting
-	 * information on the availability of resources in the grid to actually
-	 * execute that workflow element.
-	 *
-	 * @return String
-	 */
-	@Override
-	public String toString() {
-		List<String> hlp = new ArrayList<String>();
-		hlp.add("usecaseid: " + getUsecaseid());
-		hlp.add("description: " + getDescription());
-		hlp.add("group: " + group);
-		hlp.add("test: " + test_local);
-		hlp.add("tags: " + getTags());
-		for (Map.Entry<String, ScriptInput> cur : getInputs().entrySet()) {
-			hlp.add(">" + cur.getKey() + ">: " + cur.getValue().toString());
-		}
-		for (Map.Entry<String, ScriptOutput> cur : getOutputs().entrySet()) {
-			hlp.add("<" + cur.getKey() + "<: " + cur.getValue().toString());
-		}
-		hlp.add("RE: " + getREs().toString());
-		hlp.add("preferred queues: " + getQueue_preferred());
-		hlp.add("denied queues: " + getQueue_deny());
-		String tos = super.toString() + "[";
-		for (int i = 0; i < hlp.size(); i++) {
-			if (i != 0)
-				tos += ", ";
-			tos += hlp.get(i);
-		}
-		return tos + " ]";
-	}
-
-	/**
-	 * hajo's test just pass an url or file url to an xml file
-	 *
-	 * @throws IOException
-	 * @throws MalformedURLException
-	 * @throws DeserializationException
-	 */
-	public static void main(String[] argv) throws MalformedURLException, IOException, DeserializationException {
-		UseCaseDescription d = new UseCaseDescription(new URL(argv[0]).openStream());
-		logger.info(d.getCommand());
-	}
-
-	/**
-	 * @param command the command to set
-	 */
-	@ConfigurationProperty(name = "command", label = "Command", description="What is actually executed on the shell")
-	public void setCommand(String command) {
-		this.command = command;
-	}
-
-	/**
-	 * @param description the description to set
-	 */
-	@ConfigurationProperty(name = "description", label = "Description", description="Textual description of the tool", required=false, uri="http://purl.org/dc/elements/1.1/description")
-	public void setDescription(String description) {
-		this.description = description;
-	}
-
-	/**
-	 * @return the description
-	 */
-	public String getDescription() {
-		return description;
-	}
-
-	/**
-	 * @param executionTimeoutInSeconds the executionTimeoutInSeconds to set
-	 */
-	@ConfigurationProperty(name = "executionTimeoutInSeconds", label = "Execution Timeout In Seconds")
-	public void setExecutionTimeoutInSeconds(int executionTimeoutInSeconds) {
-		this.executionTimeoutInSeconds = executionTimeoutInSeconds;
-	}
-
-	/**
-	 * @return the executionTimeoutInSeconds
-	 */
-	public int getExecutionTimeoutInSeconds() {
-		return executionTimeoutInSeconds;
-	}
-
-	/**
-	 * @param inputs the inputs to set
-	 */
-	public void setInputs(Map<String, ScriptInput> inputs) {
-		this.inputs = inputs;
-	}
-
-	@ConfigurationProperty(name = "inputs", label = "Inputs", required=false)
-	public void setInputs(Set<InputMap> inputs) {
-		if (inputs != null) {
-			this.inputs = new HashMap<String, ScriptInput>();
-			for (InputMap inputMap : inputs) {
-				this.inputs.put(inputMap.getPort(), inputMap.getInput());
-			}
-		} else {
-			this.inputs = null;
-		}
-	}
-
-	/**
-	 * @return the inputs
-	 */
-	public Map<String, ScriptInput> getInputs() {
-		if (inputs == null) {
-			inputs = new HashMap<String, ScriptInput>();
-		}
-		return inputs;
-	}
-
-	/**
-	 * @param outputs the outputs to set
-	 */
-	public void setOutputs(Map<String, ScriptOutput> outputs) {
-		this.outputs = outputs;
-	}
-
-	@ConfigurationProperty(name = "outputs", label = "Outputs", required=false)
-	public void setOutputs(Set<OutputMap> outputs) {
-		if (outputs != null) {
-			this.outputs = new HashMap<String, ScriptOutput>();
-			for (OutputMap outputMap : outputs) {
-				this.outputs.put(outputMap.getPort(), outputMap.getOutput());
-			}
-		} else {
-			this.outputs = null;
-		}
-	}
-
-	/**
-	 * @return the outputs
-	 */
-	public Map<String, ScriptOutput> getOutputs() {
-		if (outputs == null) {
-			outputs = new HashMap<String, ScriptOutput>();
-		}
-		return outputs;
-	}
-
-	/**
-	 * @param preparingTimeoutInSeconds the preparingTimeoutInSeconds to set
-	 */
-	@ConfigurationProperty(name = "preparingTimeoutInSeconds", label = "Preparing Timeout In Seconds")
-	public void setPreparingTimeoutInSeconds(int preparingTimeoutInSeconds) {
-		this.preparingTimeoutInSeconds = preparingTimeoutInSeconds;
-	}
-
-	/**
-	 * @return the preparingTimeoutInSeconds
-	 */
-	public int getPreparingTimeoutInSeconds() {
-		return preparingTimeoutInSeconds;
-	}
-
-	/**
-	 * @param queue_deny the queue_deny to set
-	 */
-	public void setQueue_deny(ArrayList<String> queue_deny) {
-		this.queue_deny = queue_deny;
-	}
-
-	/**
-	 * @return the queue_deny
-	 */
-	public ArrayList<String> getQueue_deny() {
-		if (queue_deny == null) {
-			queue_deny = new ArrayList<String>();
-		}
-		return queue_deny;
-	}
-
-	/**
-	 * @param queue_preferred the queue_preferred to set
-	 */
-	public void setQueue_preferred(ArrayList<String> queue_preferred) {
-		this.queue_preferred = queue_preferred;
-	}
-
-	/**
-	 * @return the queue_preferred
-	 */
-	public ArrayList<String> getQueue_preferred() {
-		if (queue_preferred == null) {
-			queue_preferred = new ArrayList<String>();
-		}
-		return queue_preferred;
-	}
-
-	/**
-	 * @param rEs the rEs to set
-	 */
-	public void setREs(List<RuntimeEnvironmentConstraint> rEs) {
-		REs = rEs;
-	}
-
-	/**
-	 * @return the rEs
-	 */
-	public List<RuntimeEnvironmentConstraint> getREs() {
-		if (REs == null) {
-			REs = new ArrayList<RuntimeEnvironmentConstraint>();
-		}
-		return REs;
-	}
-
-	/**
-	 * @param static_inputs the static_inputs to set
-	 */
-	@ConfigurationProperty(name = "staticInputs", label = "Static Inputs", ordering=OrderPolicy.NON_ORDERED, required=false)
-	public void setStatic_inputs(List<ScriptInputStatic> static_inputs) {
-		this.static_inputs = static_inputs;
-	}
-
-	/**
-	 * @return the static_inputs
-	 */
-	public List<ScriptInputStatic> getStatic_inputs() {
-		if (static_inputs == null) {
-			static_inputs = new ArrayList<ScriptInputStatic>();
-		}
-		return static_inputs;
-	}
-
-	/**
-	 * @param tags the tags to set
-	 */
-	public void setTags(List<String> tags) {
-		this.tags = tags;
-	}
-
-	/**
-	 * @return the tags
-	 */
-	public List<String> getTags() {
-		if (tags == null) {
-			tags = new ArrayList<String>();
-		}
-		return tags;
-	}
-
-	/**
-	 * @param usecaseid the usecaseid to set
-	 */
-	@ConfigurationProperty(name = "usecaseid", label = "Title", uri="http://purl.org/dc/elements/1.1/title", required=false)
-	public void setUsecaseid(String usecaseid) {
-		this.usecaseid = usecaseid;
-	}
-
-	/**
-	 * @return the usecaseid
-	 */
-	public String getUsecaseid() {
-		return usecaseid;
-	}
-
-	public boolean isIncludeStdIn() {
-		return includeStdIn;
-	}
-
-	@ConfigurationProperty(name = "includeStdIn", label = "Include STDIN")
-	public void setIncludeStdIn(boolean includeStdIn) {
-		this.includeStdIn = includeStdIn;
-	}
-
-	public boolean isIncludeStdOut() {
-		return includeStdOut;
-	}
-
-	@ConfigurationProperty(name = "includeStdOut", label = "Include STDOUT")
-	public void setIncludeStdOut(boolean includeStdOut) {
-		this.includeStdOut = includeStdOut;
-	}
-
-	public boolean isIncludeStdErr() {
-		return includeStdErr;
-	}
-
-	@ConfigurationProperty(name = "includeStdErr", label = "Include STDERR")
-	public void setIncludeStdErr(boolean includeStdErr) {
-		this.includeStdErr = includeStdErr;
-	}
-
-	/**
-	 * @return the validReturnCodes
-	 */
-	public List<Integer> getValidReturnCodes() {
-		if (validReturnCodes == null) {
-			validReturnCodes = new ArrayList<Integer>();
-		}
-		if (validReturnCodes.isEmpty()) {
-			validReturnCodes.add(0);
-		}
-		return validReturnCodes;
-	}
-
-	/**
-	 * @param validReturnCodes the validReturnCodes to set
-	 */
-	public void setValidReturnCodes(List<Integer> validReturnCodes) {
-		this.validReturnCodes = validReturnCodes;
-	}
-
-	public String getReturnCodesAsText() {
-		return StringUtils.join(getValidReturnCodes(), ",");
-	}
-
-	public void setReturnCodesAsText(String text) {
-		if (getValidReturnCodes() == null) {
-			validReturnCodes = new ArrayList<Integer>();
-		}
-		validReturnCodes.clear();
-		String[] codes = text.split(",");
-		for (String code : codes) {
-			try {
-				Integer codeInt = new Integer(code);
-				if (!validReturnCodes.contains(codeInt)) {
-					validReturnCodes.add(codeInt);
-				}
-			}
-			catch (NumberFormatException e) {
-				logger.error(e);
-			}
-		}
-		if (validReturnCodes.isEmpty()) {
-			validReturnCodes.add(0);
-		}
-		Collections.sort(validReturnCodes);
-	}
-
-	/**
-	 * @return the group
-	 */
-	public String getGroup() {
-		return group;
-	}
-
-	/**
-	 * @param group the group to set
-	 */
-	public void setGroup(String group) {
-		this.group = group;
-	}
-
-	/**
-	 * @return the icon_url
-	 */
-	public String getIcon_url() {
-		return icon_url;
-	}
-
-	@ConfigurationBean(uri = ExternalToolActivity.URI + "#OutputMap")
-	public static class OutputMap {
-		private String port;
-
-		private ScriptOutput output;
-
-		public String getPort() {
-			return port;
-		}
-
-		@ConfigurationProperty(name = "port", label = "Port")
-		public void setPort(String port) {
-			this.port = port;
-		}
-
-		public ScriptOutput getOutput() {
-			return output;
-		}
-
-		@ConfigurationProperty(name = "output", label = "Output")
-		public void setOutput(ScriptOutput output) {
-			this.output = output;
-		}
-	}
-
-	@ConfigurationBean(uri = ExternalToolActivity.URI + "#InputMap")
-	public static class InputMap {
-		private String port;
-
-		private ScriptInputUser input;
-
-		public String getPort() {
-			return port;
-		}
-
-		@ConfigurationProperty(name = "port", label = "Port")
-		public void setPort(String port) {
-			this.port = port;
-		}
-
-		public ScriptInputUser getInput() {
-			return input;
-		}
-
-		@ConfigurationProperty(name = "input", label = "Input")
-		public void setInput(ScriptInputUser input) {
-			this.input = input;
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseEnumeration.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseEnumeration.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseEnumeration.java
deleted file mode 100644
index d5c5d2c..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/UseCaseEnumeration.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.taverna.workflowmodel.serialization.DeserializationException;
-
-import org.apache.log4j.Logger;
-import org.jdom.Document;
-import org.jdom.Element;
-import org.jdom.JDOMException;
-import org.jdom.input.SAXBuilder;
-
-public class UseCaseEnumeration {
-
-	private static Logger logger = Logger.getLogger(UseCaseEnumeration.class);
-
-	public static List<UseCaseDescription> readDescriptionsFromUrl(String xmlFileUrl) throws IOException {
-
-		List<UseCaseDescription> ret = new ArrayList<UseCaseDescription>();
-		URLConnection con = null;
-		try {
-			URL url = new URL(xmlFileUrl);
-
-			con = url.openConnection();
-			con.setConnectTimeout(4000);
-			ret = readDescriptionsFromStream(con.getInputStream());
-			
-		} catch (IOException ioe) {
-			logger.error("Problem retrieving from " + xmlFileUrl);
-			logger.error(ioe);
-			throw ioe;
-		}
-		finally {
-
-		}
-
-		return ret;
-
-	}
-	
-	public static List<UseCaseDescription> readDescriptionsFromStream(InputStream is) {
-		
-		List<UseCaseDescription> ret = new ArrayList<UseCaseDescription>();
-
-		SAXBuilder builder = new SAXBuilder();
-		Document doc = null;
-		try {
-			doc = builder.build(is);
-			is.close();
-		} catch (JDOMException e1) {
-			logger.error(e1);
-			return ret;
-		} catch (IOException e1) {
-			logger.error(e1);
-			return ret;
-		} finally {
-			try {
-				is.close();
-			} catch (IOException e) {
-				logger.error(e);
-			}
-		}
-
-		Element usecases = doc.getRootElement();
-		for (Object ochild : usecases.getChildren()) {
-			Element child = (Element) ochild;
-			if (child.getName().equalsIgnoreCase("program")) {
-					try {
-						ret.add(new UseCaseDescription(child));
-					} catch (DeserializationException e) {
-						logger.error(e);
-					}
-			}
-		}
-		return ret;
-	}
-
-	public static UseCaseDescription readDescriptionFromUrl(
-			String repositoryUrl, String id) throws IOException {
-		List<UseCaseDescription> descriptions = readDescriptionsFromUrl(repositoryUrl);
-		for (UseCaseDescription usecase : descriptions) {
-			if (usecase.getUsecaseid().equals(id)) {
-				return usecase;
-			}
-		}
-		return null;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/AskUserForPw.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/AskUserForPw.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/AskUserForPw.java
deleted file mode 100644
index e912db1..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/AskUserForPw.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases.invocation;
-
-public interface AskUserForPw {
-
-	// we will try keyfile first
-	public String getKeyfile();
-	public String getPassphrase();
-
-	// then username+password
-	public String getUsername();
-	public String getPassword();
-
-	public void authenticationSucceeded();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/InvocationException.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/InvocationException.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/InvocationException.java
deleted file mode 100644
index 2f4485f..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/InvocationException.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases.invocation;
-
-public class InvocationException extends Exception {
-
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 437316164959631591L;
-
-	public InvocationException(String string) {
-		super(string);
-	}
-	
-	public InvocationException(Exception e) {
-		super(e);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/UseCaseInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/UseCaseInvocation.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/UseCaseInvocation.java
deleted file mode 100644
index d6b2502..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/UseCaseInvocation.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases.invocation;
-
-import java.io.BufferedWriter;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.io.IOUtils;
-
-import org.apache.taverna.invocation.InvocationContext;
-import org.apache.taverna.reference.ExternalReferenceSPI;
-import org.apache.taverna.reference.Identified;
-import org.apache.taverna.reference.IdentifiedList;
-import org.apache.taverna.reference.ReferenceService;
-import org.apache.taverna.reference.ReferenceServiceException;
-import org.apache.taverna.reference.ReferenceSet;
-import org.apache.taverna.reference.T2Reference;
-import org.apache.taverna.reference.impl.external.object.InlineByteArrayReferenceBuilder;
-import org.apache.taverna.reference.impl.external.object.InlineStringReferenceBuilder;
-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.UseCaseDescription;
-
-/**
- * An abstraction of various forms to bring job using the software that is
- * referenced as a use case towards their execution.
- * 
- * @author Hajo Nils Krabbenhoeft with some contribution by
- * @author Steffen Moeller
- */
-public abstract class UseCaseInvocation {
-	
-	private String runId;
-	
-	
-	protected static String getActualOsCommand(String osCommand, String pathToOriginal,
-			String targetName, String pathTarget) {
-				String actualOsCommand = osCommand;
-				actualOsCommand = actualOsCommand.replace("%%PATH_TO_ORIGINAL%%", pathToOriginal);
-				actualOsCommand = actualOsCommand.replace("%%TARGET_NAME%%", targetName);
-				actualOsCommand = actualOsCommand.replace("%%PATH_TO_TARGET%%", pathTarget);
-				return actualOsCommand;
-			}
-
-	protected UseCaseDescription usecase;
-	protected final HashMap<String, String> tags = new HashMap<String, String>();
-	protected int nTempFiles = 0;
-	private static int submissionID = 0;
-	protected static InlineByteArrayReferenceBuilder inlineByteArrayReferenceBuilder = new InlineByteArrayReferenceBuilder();
-	protected static InlineStringReferenceBuilder inlineStringReferenceBuilder = new InlineStringReferenceBuilder();
-	private InvocationContext invocationContext;
-	private boolean retrieveData;
-	
-	/*
-	 * get the class of the data we expect for a given input
-	 */
-	@SuppressWarnings("unchecked")
-	public Class getType(String inputName) {
-		if (!usecase.getInputs().containsKey(inputName))
-			return null;
-		ScriptInputUser input = (ScriptInputUser) usecase.getInputs().get(inputName);
-		if (input.isList()) {
-			if (input.isBinary())
-				return List.class;
-			else
-				return List.class;
-		} else {
-			if (input.isBinary())
-				return byte[].class;
-			else
-				return String.class;
-		}
-	}
-
-	/*
-	 * get a list of all the input port names
-	 */
-	public Set<String> getInputs() {
-		return usecase.getInputs().keySet();
-	}
-
-
-	/*
-	 * get a id, incremented with each job. thus, this should be thread-wide
-	 * unique
-	 */
-	public synchronized int getSubmissionID() {
-		return submissionID++;
-	}
-
-	/*
-	 * set the data for the input port with given name
-	 */
-	@SuppressWarnings("unchecked")
-	public void setInput(String inputName, ReferenceService referenceService, T2Reference t2Reference) throws InvocationException {
-		if (t2Reference == null) {
-			throw new InvocationException("No input specified for " + inputName);
-		}
-		ScriptInputUser input = (ScriptInputUser) usecase.getInputs().get(inputName);
-		if (input.isList()) {
-			IdentifiedList<T2Reference> listOfReferences = (IdentifiedList<T2Reference>) referenceService
-					.getListService().getList(t2Reference);
-
-			if (!input.isConcatenate()) {
-				// this is a list input (not concatenated)
-				// so write every element to its own temporary file
-				// and create a filelist file
-
-				// we need to write the list elements to temporary files
-				ScriptInputUser listElementTemp = new ScriptInputUser();
-				listElementTemp.setBinary(input.isBinary());
-				listElementTemp.setTempFile(true);
-
-				String lineEndChar = "\n";
-				if (!input.isFile() && !input.isTempFile()) {
-					lineEndChar = " ";
-				}
-
-				String listFileContent = "";
-				String filenamesFileContent = "";
-				// create a list of all temp file names
-				for (T2Reference cur : listOfReferences) {
-					String tmp = setOneInput(referenceService, cur,
-							listElementTemp);
-					listFileContent += tmp + lineEndChar;
-					int ind = tmp.lastIndexOf('/');
-					if (ind == -1) {
-						ind = tmp.lastIndexOf('\\');
-					}
-					if (ind != -1) {
-						tmp = tmp.substring(ind + 1);
-					}
-					filenamesFileContent += tmp + lineEndChar;
-				}
-
-				// how do we want the listfile to be stored?
-				ScriptInputUser listFile = new ScriptInputUser();
-				listFile.setBinary(false); // since its a list file
-				listFile.setFile(input.isFile());
-				listFile.setTempFile(input.isTempFile());
-				listFile.setTag(input.getTag());
-				T2Reference listFileContentReference = referenceService
-						.register(listFileContent, 0, true, invocationContext);
-
-				tags.put(listFile.getTag(), setOneInput(referenceService,
-						listFileContentReference, listFile));
-
-				listFile.setTag(input.getTag() + "_NAMES");
-				T2Reference filenamesFileContentReference = referenceService
-						.register(filenamesFileContent, 0, true, null);
-				tags.put(listFile.getTag(), setOneInput(referenceService,
-						filenamesFileContentReference, listFile));
-			} else {
-				try {
-					// first, concatenate all data
-					if (input.isBinary()) {
-						ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-						BufferedWriter outputWriter = new BufferedWriter(
-								new OutputStreamWriter(outputStream));
-						for (T2Reference cur : listOfReferences) {
-							InputStreamReader inputReader = new InputStreamReader(
-									getAsStream(referenceService, cur));
-							IOUtils.copyLarge(inputReader, outputWriter);
-							inputReader.close();
-						}
-						outputWriter.close();
-						T2Reference binaryReference = referenceService
-								.register(outputStream.toByteArray(), 0, true,
-										invocationContext);
-						tags.put(input.getTag(), setOneInput(referenceService,
-								binaryReference, input));
-					} else {
-						ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-						BufferedWriter outputWriter = new BufferedWriter(
-								new OutputStreamWriter(outputStream));
-						for (T2Reference cur : listOfReferences) {
-							InputStreamReader inputReader = new InputStreamReader(
-									getAsStream(referenceService, cur));
-							IOUtils.copyLarge(inputReader, outputWriter);
-							outputWriter.write(" ");
-							inputReader.close();
-						}
-						outputWriter.close();
-						T2Reference binaryReference = referenceService
-								.register(outputStream.toByteArray(), 0, true,
-										invocationContext);
-						tags.put(input.getTag(), setOneInput(referenceService,
-								binaryReference, input));
-					}
-				} catch (IOException e) {
-					throw new InvocationException(e);
-				}
-			}
-		} else {
-			tags.put(input.getTag(), setOneInput(referenceService, t2Reference,
-					input));
-		}
-	}
-
-	/*
-	 * submit a grid job and wait for it to finish, then get the result as
-	 * on-demand downloads or directly as data (in case of local execution)
-	 */
-	public HashMap<String, Object> Submit(ReferenceService referenceService) throws InvocationException {
-		submit_generate_job(referenceService);
-		return submit_wait_fetch_results(referenceService);
-	}
-
-	/*
-	 * just submit the job. useful if you want to wait for it to finish later on
-	 * 
-	 * Can the statics be made more static?
-	 */
-	public void submit_generate_job(ReferenceService referenceService) throws InvocationException {
-		for (ScriptInputStatic input : usecase.getStatic_inputs()) {
-			T2Reference ref;
-			if (input.getUrl() != null) {
-				// Does this work OK with binary
-				try {
-					ref = referenceService.register(new URL(input.getUrl()), 0, true, null);
-				} catch (ReferenceServiceException e) {
-					throw new InvocationException(e);
-				} catch (MalformedURLException e) {
-					throw new InvocationException(e);
-				}
-			} else {
-				ref = referenceService.register((String) input.getContent(), 0, true, null);
-			}
-				tags.put(input.getTag(), setOneInput(referenceService, ref, input));
-			
-		}
-		submit_generate_job_inner();
-	}
-
-	protected abstract void submit_generate_job_inner() throws InvocationException;
-
-	/*
-	 * wait for a submitted job to finish and fetch the results
-	 */
-	public abstract HashMap<String, Object> submit_wait_fetch_results(ReferenceService referenceService) throws InvocationException;
-
-	public abstract String setOneInput(ReferenceService referenceService, T2Reference t2Reference, ScriptInput input) throws InvocationException;
-
-	protected InputStream getAsStream(ReferenceService referenceService, T2Reference t2Reference) {
-		Identified identified = referenceService.resolveIdentifier(t2Reference, null, null);
-		if (identified instanceof ReferenceSet) {
-			ExternalReferenceSPI ref = ((ReferenceSet) identified).getExternalReferences().iterator().next();
-			return ref.openStream(invocationContext);
-		}
-		return null;
-	}
-
-	public void setContext(InvocationContext context) {
-		this.invocationContext = context;
-		
-	}
-	
-	public InvocationContext getContext() {
-		return this.invocationContext;
-	}
-
-	public abstract void setStdIn(ReferenceService referenceService,
-			T2Reference t2Reference);
-
-	public abstract void rememberRun(String runId);
-
-	/**
-	 * @return the runId
-	 */
-	protected String getRunId() {
-		return runId;
-	}
-
-	/**
-	 * @param runId the runId to set
-	 */
-	protected void setRunId(String runId) {
-		this.runId = runId;
-	}
-
-	/**
-	 * @return the retrieveData
-	 */
-	protected boolean isRetrieveData() {
-		return retrieveData;
-	}
-
-	/**
-	 * @param retrieveData the retrieveData to set
-	 */
-	protected void setRetrieveData(boolean retrieveData) {
-		this.retrieveData = retrieveData;
-	}
-	
-
-}


[42/50] [abbrv] incubator-taverna-common-activities git commit: TAVERNA-986 Simplify LICENSE note

Posted by st...@apache.org.
TAVERNA-986 Simplify LICENSE note


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

Branch: refs/heads/docker
Commit: 778f564b2670fb1ab1daae54212c594a83cca5fe
Parents: 055a7ac
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Jun 20 15:39:01 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Jun 20 15:39:01 2016 +0100

----------------------------------------------------------------------
 LICENSE | 32 +++-----------------------------
 1 file changed, 3 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/778f564b/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 15a6ca7..9844251 100644
--- a/LICENSE
+++ b/LICENSE
@@ -203,33 +203,7 @@
 
 ---------------------------------------------------------
 taverna-wsdl-generic/src/main/resources/META-INF/soap-encoding.xsd
-Schema for the SOAP/1.1 encoding
-
-Portions � 2001 DevelopMentor. 
-� 2001 W3C (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.  
- 
-This document is governed by the W3C Software License [1] as described in the FAQ [2].
-[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
-[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD 
-By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:
-
-Permission to use, copy, modify, and distribute this software and its documentation, with or without modification,  for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications, that you make:
-
-1.  The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. 
-
-2.  Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright � 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/" 
-
-3.  Notice of any changes or modifications to the W3C files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)   
-
-Original W3C files; http://www.w3.org/2001/06/soap-encoding
-Changes made: 
-     - reverted namespace to http://schemas.xmlsoap.org/soap/encoding/
-     - reverted root to only allow 0 and 1 as lexical values
-	 - removed default value from root attribute declaration
-
-THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
-
-The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
+is licensed by the W3C Software License
+http://www.w3.org/Consortium/Legal/copyright-software-19980720
 ---------------------------------------------------------
+


[50/50] [abbrv] incubator-taverna-common-activities git commit: Merge branch 'master' into docker

Posted by st...@apache.org.
Merge branch 'master' into docker


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

Branch: refs/heads/docker
Commit: 1806041cad04d0b5f5812f09e2755559f75b71f9
Parents: df96dce 9d7ec5d
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jun 30 14:52:56 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jun 30 14:52:56 2016 +0100

----------------------------------------------------------------------
 .travis.yml                                     |    15 +
 LICENSE                                         |    10 +
 README.md                                       |   120 +-
 pom.xml                                         |    33 +-
 taverna-beanshell-activity/pom.xml              |     5 +-
 .../src/main/resources/schema.json              |     3 +
 taverna-external-tool-activity/pom.xml          |     7 +-
 .../inb/knowarc/gui/AskUserForPwPopup.java      |    77 -
 .../inb/knowarc/gui/PleaseWaitDialog.java       |    75 -
 .../knowarc/usecases/RuntimeEnvironment.java    |   253 -
 .../usecases/RuntimeEnvironmentConstraint.java  |   162 -
 .../inb/knowarc/usecases/ScriptInput.java       |   136 -
 .../inb/knowarc/usecases/ScriptInputStatic.java |    75 -
 .../inb/knowarc/usecases/ScriptInputUser.java   |   101 -
 .../inb/knowarc/usecases/ScriptOutput.java      |    90 -
 .../knowarc/usecases/UseCaseDescription.java    |   899 -
 .../knowarc/usecases/UseCaseEnumeration.java    |   113 -
 .../usecases/invocation/AskUserForPw.java       |    34 -
 .../invocation/InvocationException.java         |    25 -
 .../usecases/invocation/UseCaseInvocation.java  |   324 -
 .../local/LocalUseCaseInvocation.java           |   563 -
 .../ssh/SshAutoLoginTrustEveryone.java          |    72 -
 .../usecases/invocation/ssh/SshNode.java        |   159 -
 .../usecases/invocation/ssh/SshNodeFactory.java |    56 -
 .../usecases/invocation/ssh/SshPool.java        |   148 -
 .../usecases/invocation/ssh/SshReference.java   |   208 -
 .../knowarc/usecases/invocation/ssh/SshUrl.java |   153 -
 .../invocation/ssh/SshUrlToSshReference.java    |    43 -
 .../invocation/ssh/SshUseCaseInvocation.java    |   563 -
 .../externaltool/ExternalToolActivity.java      |    21 +-
 .../ExternalToolActivityConfigurationBean.java  |     8 +-
 .../ExternalToolActivityMimeTypeChecker.java    |     5 +-
 .../externaltool/InvocationCreator.java         |     7 +-
 .../externaltool/RetrieveLoginFromTaverna.java  |     2 +-
 .../externaltool/desc/RuntimeEnvironment.java   |   250 +
 .../desc/RuntimeEnvironmentConstraint.java      |   160 +
 .../externaltool/desc/ScriptInput.java          |   134 +
 .../externaltool/desc/ScriptInputStatic.java    |    73 +
 .../externaltool/desc/ScriptInputUser.java      |    99 +
 .../externaltool/desc/ScriptOutput.java         |    88 +
 .../externaltool/desc/ToolDescription.java      |   897 +
 .../desc/ToolDescriptionParser.java             |   111 +
 .../externaltool/invocation/AskUserForPw.java   |    32 +
 .../invocation/InvocationException.java         |    36 +
 .../externaltool/invocation/ToolInvocation.java |   321 +
 .../ExternalToolLocalInvocationMechanism.java   |     4 +-
 .../local/LocalInvocationCreator.java           |    14 +-
 .../local/LocalInvocationPersister.java         |     8 +-
 .../local/LocalMechanismCreator.java            |     4 +-
 .../externaltool/local/LocalToolInvocation.java |   560 +
 .../activities/externaltool/package.html        |    17 +
 .../ssh/ExternalToolSshInvocationMechanism.java |     7 +-
 .../ssh/SshAutoLoginTrustEveryone.java          |    69 +
 .../externaltool/ssh/SshInvocationCreator.java  |    19 +-
 .../ssh/SshInvocationPersister.java             |    10 +-
 .../externaltool/ssh/SshMechanismCreator.java   |     6 +-
 .../activities/externaltool/ssh/SshNode.java    |   157 +
 .../externaltool/ssh/SshNodeFactory.java        |    66 +
 .../activities/externaltool/ssh/SshPool.java    |   157 +
 .../externaltool/ssh/SshReference.java          |   222 +
 .../externaltool/ssh/SshToolInvocation.java     |   560 +
 .../activities/externaltool/ssh/SshUrl.java     |   163 +
 .../externaltool/ssh/SshUrlToSshReference.java  |    54 +
 ...pache.taverna.reference.ExternalReferenceSPI |     2 +-
 ...verna.reference.ValueToReferenceConverterSPI |     2 +-
 .../spring/external-tool-activity-context.xml   |     4 +-
 .../invocation/ssh/SshReference.hbm.xml         |    41 -
 .../externaltool/ssh/SshReference.hbm.xml       |    41 +
 taverna-interaction-activity/pom.xml            |     9 +-
 .../src/main/resources/Authorize.vm             |    17 +
 .../src/main/resources/MasterPassword.vm        |    17 +
 .../src/main/resources/TrustedCertificate.vm    |    17 +
 .../src/main/resources/TruststorePassword.vm    |    17 +
 .../src/main/resources/UsernamePassword.vm      |    17 +
 .../resources/abdera/adapter/feed.properties    |    14 +
 .../src/main/resources/ask.vm                   |    17 +
 .../src/main/resources/choose.vm                |    17 +
 .../src/main/resources/index                    |    14 +
 .../src/main/resources/interaction.css          |    16 +
 .../src/main/resources/interaction.vm           |    17 +
 .../src/main/resources/notify.vm                |    17 +
 .../src/main/resources/schema.json              |     5 +-
 .../src/main/resources/select.vm                |    17 +
 .../src/main/resources/tell.vm                  |    17 +
 .../src/main/resources/warn.vm                  |    17 +
 taverna-rest-activity/pom.xml                   |   189 +-
 .../src/main/resources/schema.json              |     3 +
 .../rest/ApacheHttpClientUsageTest.java.bak     |   215 -
 .../rest/ExampleActivityTest.java.bak           |   153 -
 taverna-spreadsheet-import-activity/pom.xml     |     5 +-
 .../taverna/activities/spreadsheet/package.html |    17 +
 .../src/main/resources/schema.json              |     3 +
 taverna-wsdl-activity/pom.xml                   |    14 +-
 .../apache/taverna/activities/wsdl/package.html |    17 +
 .../src/main/resources/schema.json              |     3 +
 .../src/main/resources/xml-splitter.schema.json |     2 +
 .../activities/wsdl/WSRFActivityTest.java       |    16 +-
 ...XMLSplitterConfigurationBeanBuilderTest.java |    18 +
 .../src/test/resources/log4j.properties         |    15 +
 .../wsrf/counterService/CounterService_.wsdl    |     9 -
 .../wsdl/wsrf/counterService/WS-Addressing.xsd  |   121 -
 .../wsdl/wsrf/counterService/WS-BaseFaults.xsd  |    47 -
 .../wsdl/wsrf/counterService/WS-BaseN.wsdl      |   298 -
 .../wsdl/wsrf/counterService/WS-BaseN.xsd       |    50 -
 .../counterService/WS-ResourceLifetime.wsdl     |   117 -
 .../wsrf/counterService/WS-ResourceLifetime.xsd |    26 -
 .../counterService/WS-ResourceProperties.wsdl   |   240 -
 .../counterService/WS-ResourceProperties.xsd    |    42 -
 .../wsrf/counterService/counter_bindings.wsdl   |   157 -
 .../wsrf/counterService/counter_flattened.wsdl  |   111 -
 .../activities/wsdl/wsrf/counterService/xml.xsd |   105 -
 taverna-wsdl-generic/pom.xml                    |    90 +-
 .../org/apache/taverna/wsdl/parser/package.html |    17 +
 .../org/apache/taverna/wsdl/soap/package.html   |    17 +
 .../src/main/resources/META-INF/LICENSE         |   235 +
 .../taverna/wsdl/parser/WSDLParserTest.java     |     8 +-
 .../taverna/wsdl/parser/WSRFParserTest.java     |     7 +-
 .../wsdl/soap/LiteralBodyBuilderTest.java       |    10 +-
 .../wsdl/testutils/LocationConstants.java       |     2 +-
 .../taverna/wsdl/testutils/WSDLTestHelper.java  |    89 +-
 .../wsdl/xmlsplitter/XMLInputSplitterTest.java  |     8 +-
 .../wsdl/xmlsplitter/XMLOutputSplitterTest.java |     4 +-
 .../getComplexWithInternalListResponse.xml      |    20 -
 .../src/test/resources/jws-splitter-input.xml   |    95 -
 .../src/test/resources/log4j.properties         |    15 +
 .../TAV-744/InstrumentServiceContextTypes.xsd   |    12 -
 .../parser/TAV-744/InstrumentServiceTypes.xsd   |    12 -
 .../wsdl/parser/TAV-744/InstrumentService_.wsdl |   129 -
 .../parser/TAV-744/InstrumentService__.wsdl     |     9 -
 .../TAV-744/InstrumentService_bindings.wsdl     |    97 -
 .../wsdl/parser/TAV-744/ServiceSecurity.wsdl    |    72 -
 .../wsdl/parser/TAV-744/WS-Addressing.xsd       |   121 -
 .../wsdl/parser/TAV-744/WS-BaseFaults.wsdl      |    22 -
 .../wsdl/parser/TAV-744/WS-BaseFaults.xsd       |    47 -
 .../taverna/wsdl/parser/TAV-744/WS-BaseN.wsdl   |   298 -
 .../taverna/wsdl/parser/TAV-744/WS-BaseN.xsd    |    50 -
 .../parser/TAV-744/WS-ResourceLifetime.wsdl     |   117 -
 .../wsdl/parser/TAV-744/WS-ResourceLifetime.xsd |    26 -
 .../parser/TAV-744/WS-ResourceProperties.wsdl   |   240 -
 .../parser/TAV-744/WS-ResourceProperties.xsd    |    42 -
 .../taverna/wsdl/parser/TAV-744/security.xsd    |    78 -
 .../apache/taverna/wsdl/parser/TAV-744/xml.xsd  |   105 -
 .../wsrf/counterService/CounterService_.wsdl    |     9 -
 .../wsrf/counterService/WS-Addressing.xsd       |   121 -
 .../wsrf/counterService/WS-BaseFaults.xsd       |    47 -
 .../parser/wsrf/counterService/WS-BaseN.wsdl    |   298 -
 .../parser/wsrf/counterService/WS-BaseN.xsd     |    50 -
 .../counterService/WS-ResourceLifetime.wsdl     |   117 -
 .../wsrf/counterService/WS-ResourceLifetime.xsd |    26 -
 .../counterService/WS-ResourceProperties.wsdl   |   240 -
 .../counterService/WS-ResourceProperties.xsd    |    42 -
 .../wsrf/counterService/counter_bindings.wsdl   |   157 -
 .../wsrf/counterService/counter_flattened.wsdl  |   111 -
 .../wsdl/parser/wsrf/counterService/xml.xsd     |   105 -
 .../testwsdls/CurrencyExchangeService.wsdl      |    37 -
 .../src/test/resources/testwsdls/GoViz.wsdl     |   202 -
 .../testwsdls/MyService-rpc-literal.wsdl        |   392 -
 .../src/test/resources/testwsdls/SBWReader.wsdl |   602 -
 .../testwsdls/TestServices-rpcencoded.wsdl      |   396 -
 .../testwsdls/TestServices-unwrapped.wsdl       |   434 -
 .../src/test/resources/testwsdls/VSOi.wsdl      |   305 -
 .../src/test/resources/testwsdls/bind.wsdl      |   354 -
 .../test/resources/testwsdls/eutils/efetch.xsd  |   118 -
 .../resources/testwsdls/eutils/efetch_bio.xsd   | 18079 -----------------
 .../resources/testwsdls/eutils/efetch_nlmc.xsd  |  1021 -
 .../resources/testwsdls/eutils/efetch_pmc.xsd   |  5910 ------
 .../testwsdls/eutils/efetch_pubmed.xsd          |   359 -
 .../resources/testwsdls/eutils/efetch_taxon.xsd |   150 -
 .../test/resources/testwsdls/eutils/egquery.xsd |    60 -
 .../test/resources/testwsdls/eutils/einfo.xsd   |    95 -
 .../test/resources/testwsdls/eutils/elink.xsd   |   188 -
 .../test/resources/testwsdls/eutils/esearch.xsd |   165 -
 .../test/resources/testwsdls/eutils/espell.xsd  |    60 -
 .../resources/testwsdls/eutils/esummary.xsd     |    85 -
 .../test/resources/testwsdls/eutils/eutils.wsdl |   333 -
 .../resources/testwsdls/eutils/eutils_lite.wsdl |   289 -
 .../test/resources/testwsdls/jws-online.wsdl    |  1001 -
 .../test/resources/testwsdls/jws_online.wsdl    |  1001 -
 .../src/test/resources/testwsdls/ma.wsdl        |  1901 --
 .../testwsdls/menagerie-complex-rpc.wsdl        |   208 -
 .../src/test/resources/testwsdls/prodoric.wsdl  |   360 -
 .../src/test/resources/testwsdls/whatizit.wsdl  |   233 -
 taverna-xpath-activity/pom.xml                  |    95 +-
 .../src/main/resources/schema.json              |     3 +
 184 files changed, 5397 insertions(+), 43664 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/1806041c/pom.xml
----------------------------------------------------------------------


[26/50] [abbrv] incubator-taverna-common-activities git commit: Correct package name ssh.SshReference, not invocation.ssh

Posted by st...@apache.org.
Correct package name ssh.SshReference, not invocation.ssh


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

Branch: refs/heads/docker
Commit: b29c4cb65464f752ef4307324e37dd83ab8f3fdc
Parents: 386cf48
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Fri May 13 16:58:35 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Fri May 13 16:58:35 2016 +0100

----------------------------------------------------------------------
 .../services/org.apache.taverna.reference.ExternalReferenceSPI   | 2 +-
 .../org.apache.taverna.reference.ValueToReferenceConverterSPI    | 2 +-
 .../resources/META-INF/spring/external-tool-activity-context.xml | 4 ++--
 .../taverna/activities/externaltool/ssh/SshReference.hbm.xml     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/b29c4cb6/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ExternalReferenceSPI
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ExternalReferenceSPI b/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ExternalReferenceSPI
index d63d896..c03d774 100644
--- a/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ExternalReferenceSPI
+++ b/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ExternalReferenceSPI
@@ -1,2 +1,2 @@
 # Implementation classes of ExternalReferenceSPI go here, one per line
-org.apache.taverna.activities.externaltool.invocation.ssh.SshReference
+org.apache.taverna.activities.externaltool.ssh.SshReference

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/b29c4cb6/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ValueToReferenceConverterSPI
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ValueToReferenceConverterSPI b/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ValueToReferenceConverterSPI
index 50c5a16..717b390 100644
--- a/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ValueToReferenceConverterSPI
+++ b/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ValueToReferenceConverterSPI
@@ -1,3 +1,3 @@
 # Implementation classes of ValueToReferenceConverterSPI go here, one per line
-org.apache.taverna.activities.externaltool.invocation.ssh.SshUrlToSshReference
+org.apache.taverna.activities.externaltool.ssh.SshUrlToSshReference
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/b29c4cb6/taverna-external-tool-activity/src/main/resources/META-INF/spring/external-tool-activity-context.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/resources/META-INF/spring/external-tool-activity-context.xml b/taverna-external-tool-activity/src/main/resources/META-INF/spring/external-tool-activity-context.xml
index 297fc8d..d5fc3bf 100644
--- a/taverna-external-tool-activity/src/main/resources/META-INF/spring/external-tool-activity-context.xml
+++ b/taverna-external-tool-activity/src/main/resources/META-INF/spring/external-tool-activity-context.xml
@@ -21,7 +21,7 @@
 	xsi:schemaLocation="http://www.springframework.org/schema/beans
                       http://www.springframework.org/schema/beans/spring-beans.xsd">
 
-	<bean id="SshReference" class="org.apache.taverna.activities.externaltool.invocation.ssh.SshReference">
+	<bean id="SshReference" class="org.apache.taverna.activities.externaltool.ssh.SshReference">
 		<property name="credentialManager" ref="credentialManager" />
 	</bean>
 
@@ -37,7 +37,7 @@
 		<property name="invocationGroupManager" ref="invocationGroupManager" />
 	</bean>
 
-	<bean id="SshUrlToSshReference" class="org.apache.taverna.activities.externaltool.invocation.ssh.SshUrlToSshReference">
+	<bean id="SshUrlToSshReference" class="org.apache.taverna.activities.externaltool.ssh.SshUrlToSshReference">
 		<property name="credentialManager" ref="credentialManager" />
 	</bean>
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/b29c4cb6/taverna-external-tool-activity/src/main/resources/org/apache/taverna/activities/externaltool/ssh/SshReference.hbm.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/resources/org/apache/taverna/activities/externaltool/ssh/SshReference.hbm.xml b/taverna-external-tool-activity/src/main/resources/org/apache/taverna/activities/externaltool/ssh/SshReference.hbm.xml
index b67f6be..e66c590 100644
--- a/taverna-external-tool-activity/src/main/resources/org/apache/taverna/activities/externaltool/ssh/SshReference.hbm.xml
+++ b/taverna-external-tool-activity/src/main/resources/org/apache/taverna/activities/externaltool/ssh/SshReference.hbm.xml
@@ -23,7 +23,7 @@
 <!-- Hibernate mapping for ssh reference bean -->
 <hibernate-mapping>
 	<joined-subclass
-		name="org.apache.taverna.activities.externaltool.invocation.ssh.SshReference"
+		name="org.apache.taverna.activities.externaltool.ssh.SshReference"
 		extends="org.apache.taverna.reference.AbstractExternalReference">
 		<!-- Link to primary key from abstract superclass -->
 		<key column="bean_id" />


[10/50] [abbrv] incubator-taverna-common-activities git commit: classnames

Posted by st...@apache.org.
classnames


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

Branch: refs/heads/docker
Commit: 963a4b602d0c9f33e0a0b0d69c8a8231649da5f7
Parents: 98468d3
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed May 4 00:56:19 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed May 4 01:00:31 2016 +0100

----------------------------------------------------------------------
 .../externaltool/desc/RuntimeEnvironment.java        | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/963a4b60/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/RuntimeEnvironment.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/RuntimeEnvironment.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/RuntimeEnvironment.java
index ad58eea..97e946c 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/RuntimeEnvironment.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/RuntimeEnvironment.java
@@ -29,15 +29,14 @@ import org.apache.log4j.Logger;
  * to decide if one runtime environment is possibly compatible with another one
  * for the selection of queues to commit to.
  * 
- * To experiment/test these functions, run the following java -cp
- * target/taverna-knowarc-processor-0.1.7.jar
- * de.uni_luebeck.janitor.ldap.RuntimeEnvironment compare bla-1 foo-1 java -cp
- * target/taverna-knowarc-processor-0.1.7.jar
- * de.uni_luebeck.janitor.ldap.RuntimeEnvironment compare bla-1 bla-2 java -cp
- * target/taverna-knowarc-processor-0.1.7.jar
- * de.uni_luebeck.janitor.ldap.RuntimeEnvironment compare bla-1.2 bla-1
+ * To experiment/test these functions, run the following:
+ * <pre>
+ * java -cp target/taverna-external-tool-activity-2.1.0-incubating-SNAPSHOT.jar org.apache.taverna.activities.externaltool.desc.RuntimeEnvironment compare bla-1 foo-1 
  * 
- * @author Steffen Moeller
+ * java -cp target/taverna-external-tool-activity-2.1.0-incubating-SNAPSHOT.jar org.apache.taverna.activities.externaltool.desc.RuntimeEnvironment compare bla-1 bla-2 
+ * 
+ * java -cp target/taverna-external-tool-activity-2.1.0-incubating-SNAPSHOT.jar org.apache.taverna.activities.externaltool.desc.RuntimeEnvironment compare bla-1.2 bla-1
+ * </pre>
  */
 @SuppressWarnings("unchecked")
 public class RuntimeEnvironment implements Comparable {


[41/50] [abbrv] incubator-taverna-common-activities git commit: TAVERNA-986 move W3C SW license to LICENSE

Posted by st...@apache.org.
TAVERNA-986 move W3C SW license to LICENSE

It still remains in
taverna-wsdl-generic/src/main/resources/META-INF/NOTICE


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

Branch: refs/heads/docker
Commit: 055a7acec52a75e718a4389b685db717ad095a1e
Parents: 0228073
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Jun 20 15:29:29 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Jun 20 15:29:29 2016 +0100

----------------------------------------------------------------------
 LICENSE | 33 +++++++++++++++++++++++++++++++++
 NOTICE  | 31 -------------------------------
 2 files changed, 33 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/055a7ace/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index d645695..15a6ca7 100644
--- a/LICENSE
+++ b/LICENSE
@@ -200,3 +200,36 @@
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
+
+---------------------------------------------------------
+taverna-wsdl-generic/src/main/resources/META-INF/soap-encoding.xsd
+Schema for the SOAP/1.1 encoding
+
+Portions � 2001 DevelopMentor. 
+� 2001 W3C (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.  
+ 
+This document is governed by the W3C Software License [1] as described in the FAQ [2].
+[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
+[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD 
+By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:
+
+Permission to use, copy, modify, and distribute this software and its documentation, with or without modification,  for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications, that you make:
+
+1.  The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. 
+
+2.  Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright � 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/" 
+
+3.  Notice of any changes or modifications to the W3C files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)   
+
+Original W3C files; http://www.w3.org/2001/06/soap-encoding
+Changes made: 
+     - reverted namespace to http://schemas.xmlsoap.org/soap/encoding/
+     - reverted root to only allow 0 and 1 as lexical values
+	 - removed default value from root attribute declaration
+
+THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
+
+The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
+---------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/055a7ace/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
index ae0de68..cc00d25 100644
--- a/NOTICE
+++ b/NOTICE
@@ -9,34 +9,3 @@ Portions of this software were originally based on the following:
 These have been licensed to the Apache Software Foundation under a software grant.
 
 ---------------------------------------------------------
-taverna-wsdl-generic/src/main/resources/META-INF/soap-encoding.xsd
-Schema for the SOAP/1.1 encoding
-
-Portions � 2001 DevelopMentor. 
-� 2001 W3C (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.  
- 
-This document is governed by the W3C Software License [1] as described in the FAQ [2].
-[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
-[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD 
-By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:
-
-Permission to use, copy, modify, and distribute this software and its documentation, with or without modification,  for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications, that you make:
-
-1.  The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. 
-
-2.  Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright � 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/" 
-
-3.  Notice of any changes or modifications to the W3C files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)   
-
-Original W3C files; http://www.w3.org/2001/06/soap-encoding
-Changes made: 
-     - reverted namespace to http://schemas.xmlsoap.org/soap/encoding/
-     - reverted root to only allow 0 and 1 as lexical values
-	 - removed default value from root attribute declaration
-
-THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
-
-The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
----------------------------------------------------------
\ No newline at end of file


[30/50] [abbrv] incubator-taverna-common-activities git commit: taverna.engine 3.1.0-incubating

Posted by st...@apache.org.
taverna.engine 3.1.0-incubating


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

Branch: refs/heads/docker
Commit: a4d453c612a08d841ebbeeb66ddd3c06ec2ce7ca
Parents: 2be7cd5
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue May 31 13:36:53 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue May 31 13:36:53 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/a4d453c6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 78e176a..5d9dd41 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,7 +35,7 @@
         <!-- Taverna dependency versions -->
         <taverna.language.version>0.15.0-incubating</taverna.language.version>
         <taverna.osgi.version>0.2.1-incubating</taverna.osgi.version>
-        <taverna.engine.version>3.1.0-incubating-SNAPSHOT</taverna.engine.version>
+        <taverna.engine.version>3.1.0-incubating</taverna.engine.version>
 
         <!-- Third-party dependency versios -->
         <abdera.version>1.1.3</abdera.version>


[08/50] [abbrv] incubator-taverna-common-activities git commit: TAVERNA-963 package taverna.externaltool.*

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/local/LocalUseCaseInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/local/LocalUseCaseInvocation.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/local/LocalUseCaseInvocation.java
deleted file mode 100755
index 612a487..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/local/LocalUseCaseInvocation.java
+++ /dev/null
@@ -1,561 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases.invocation.local;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-
-import org.apache.taverna.reference.AbstractExternalReference;
-import org.apache.taverna.reference.ErrorDocument;
-import org.apache.taverna.reference.ExternalReferenceSPI;
-import org.apache.taverna.reference.Identified;
-import org.apache.taverna.reference.ReferenceService;
-import org.apache.taverna.reference.ReferenceSet;
-import org.apache.taverna.reference.ReferencedDataNature;
-import org.apache.taverna.reference.T2Reference;
-import org.apache.taverna.reference.impl.external.file.FileReference;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.log4j.Logger;
-
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptOutput;
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.InvocationException;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.UseCaseInvocation;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNode;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNodeFactory;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshUrl;
-
-/**
- * The job is executed locally, i.e. not via the grid.
- * @author Hajo Krabbenhoeft
- */
-public class LocalUseCaseInvocation extends UseCaseInvocation {
-
-	private static Logger logger = Logger.getLogger(LocalUseCaseInvocation.class);
-
-	private final File tempDir;
-	
-	public static String LOCAL_USE_CASE_INVOCATION_TYPE = "789663B8-DA91-428A-9F7D-B3F3DA185FD4";
-	
-	private Process running;
-
-	private final String shellPrefix;
-
-	private final String linkCommand;
-
-	private Reader stdInReader = null;
-	
-	private static Map<String, Set<String>> runIdToTempDir = Collections.synchronizedMap(new HashMap<String, Set<String>> ());
-	
-	private static String LOCAL_INVOCATION_FILE = "localInvocations";
-
-	public LocalUseCaseInvocation(UseCaseDescription desc, boolean retrieveData, String mainTempDirectory, String shellPrefix, String linkCommand) throws IOException {
-
-		usecase = desc;
-		setRetrieveData(retrieveData);
-		this.shellPrefix = shellPrefix;
-		this.linkCommand = linkCommand;
-		
-		if (mainTempDirectory != null) {
-		
-			File mainTempDir = new File(mainTempDirectory);
-
-			tempDir = File.createTempFile("usecase", "dir", mainTempDir);
-		} else {
-			tempDir = File.createTempFile("usecase", "dir");
-		}
-		tempDir.delete();
-		tempDir.mkdir();
-		logger.info("mainTempDirectory is " + mainTempDirectory);
-		logger.info("Using tempDir " + tempDir.getAbsolutePath());
-
-	}
-
-	void recDel(File c) {
-		File[] files = c.listFiles();
-		if (files != null) {
-			for (File cc : files)
-				recDel(cc);
-		}
-		c.delete();
-	}
-	
-	private String setOneBinaryInput(ReferenceService referenceService,
-			T2Reference t2Reference, ScriptInput input, String targetSuffix)
-			throws InvocationException {
-
-		if (input.isFile() || input.isTempFile()) {
-			// Try to get it as a file
-			String target = tempDir.getAbsolutePath() + "/" + targetSuffix;
-			FileReference fileRef = getAsFileReference(referenceService,
-					t2Reference);
-			if (fileRef != null) {
-
-				if (!input.isForceCopy()) {
-					if (linkCommand != null) {
-						String source = fileRef.getFile().getAbsolutePath();
-						String actualLinkCommand = getActualOsCommand(
-								linkCommand, source, targetSuffix, target);
-						logger.info("Link command is " + actualLinkCommand);
-						String[] splitCmds = actualLinkCommand.split(" ");
-						ProcessBuilder builder = new ProcessBuilder(splitCmds);
-						builder.directory(tempDir);
-						try {
-							int code = builder.start().waitFor();
-							if (code == 0) {
-								return target;
-							} else {
-								logger.error("Link command gave errorcode: "
-										+ code);
-							}
-
-						} catch (InterruptedException e) {
-							// go through
-						} catch (IOException e) {
-							// go through
-						}
-
-					}
-				}
-			}
-
-			InputStream is = null;
-			OutputStream os = null;
-			is = getAsStream(referenceService, t2Reference);
-
-			try {
-				os = new FileOutputStream(target);
-			} catch (FileNotFoundException e) {
-				throw new InvocationException(e);
-			}
-
-			try {
-				IOUtils.copyLarge(is, os);
-			} catch (IOException e) {
-				throw new InvocationException(e);
-			}
-			try {
-				is.close();
-				os.close();
-			} catch (IOException e) {
-				throw new InvocationException(e);
-			}
-			return target;
-		} else {
-			String value = (String) referenceService.renderIdentifier(
-					t2Reference, String.class, this.getContext());
-			return value;
-		}
-	}
-	
-	@Override
-	public String setOneInput(ReferenceService referenceService,
-			T2Reference t2Reference, ScriptInput input)
-			throws InvocationException {
-
-		if (input.getCharsetName() == null) {
-			input.setCharsetName(Charset.defaultCharset().name());
-		}
-		String target = null;
-		String targetSuffix = null;
-		if (input.isFile()) {
-			targetSuffix = input.getTag();
-		} else if (input.isTempFile()) {
-			targetSuffix = "tempfile." + (nTempFiles++) + ".tmp";
-		}
-
-		if (input.isBinary()) {
-			return setOneBinaryInput(referenceService, t2Reference, input,
-					targetSuffix);
-		}
-
-		logger.info("Target is " + target);
-		if (input.isFile() || input.isTempFile()) {
-			target = tempDir.getAbsolutePath() + "/" + targetSuffix;
-			// Try to get it as a file
-			Reader r;
-			Writer w;
-			FileReference fileRef = getAsFileReference(referenceService,
-					t2Reference);
-			if (fileRef != null) {
-
-				if (!input.isForceCopy()) {
-					if (linkCommand != null) {
-						String source = fileRef.getFile().getAbsolutePath();
-						String actualLinkCommand = getActualOsCommand(
-								linkCommand, source, targetSuffix, target);
-						logger.info("Link command is " + actualLinkCommand);
-						String[] splitCmds = actualLinkCommand.split(" ");
-						ProcessBuilder builder = new ProcessBuilder(splitCmds);
-						builder.directory(tempDir);
-						try {
-							int code = builder.start().waitFor();
-							if (code == 0) {
-								return target;
-							} else {
-								logger.error("Link command gave errorcode: "
-										+ code);
-							}
-
-						} catch (InterruptedException e) {
-							// go through
-						} catch (IOException e) {
-							// go through
-						}
-
-					}
-				}
-
-				if (fileRef.getDataNature().equals(ReferencedDataNature.TEXT)) {
-					r = new InputStreamReader(fileRef.openStream(this
-							.getContext()), Charset.forName(fileRef
-							.getCharset()));
-				} else {
-					try {
-						r = new FileReader(fileRef.getFile());
-					} catch (FileNotFoundException e) {
-						throw new InvocationException(e);
-					}
-				}
-			} else {
-				r = new InputStreamReader(getAsStream(referenceService,
-						t2Reference));
-			}
-			try {
-				w = new OutputStreamWriter(new FileOutputStream(target), input
-						.getCharsetName());
-			} catch (UnsupportedEncodingException e) {
-				throw new InvocationException(e);
-			} catch (FileNotFoundException e) {
-				throw new InvocationException(e);
-			}
-			try {
-				IOUtils.copyLarge(r, w);
-			} catch (IOException e) {
-				throw new InvocationException(e);
-			}
-			try {
-				r.close();
-				w.close();
-			} catch (IOException e) {
-				throw new InvocationException(e);
-			}
-			return target;
-		} else {
-			String value = (String) referenceService.renderIdentifier(
-					t2Reference, String.class, this.getContext());
-			return value;
-		}
-	}
-	
-	private void forgetRun() {
-		Set<String> directories = runIdToTempDir.get(getRunId());
-		try {
-			directories.remove(tempDir.getCanonicalPath());
-		} catch (IOException e) {
-			logger.error(e);
-		}
-	}
-
-	private static void deleteDirectory(String location) {
-		try {
-			FileUtils.deleteDirectory(new File(location));
-		} catch (IOException e) {
-			logger.error("Problem deleting " + location, e);
-		}
-	}
-	
-	public static void cleanup(String runId) {
-		Set<String> tempDirectories = runIdToTempDir.get(runId);
-		if (tempDirectories != null) {
-			for (String tempDir : tempDirectories) {
-				deleteDirectory(tempDir);
-			}
-			runIdToTempDir.remove(runId);
-		}
-	}
-	
-	@Override
-	protected void submit_generate_job_inner() throws InvocationException {
-		tags.put("uniqueID", "" + getSubmissionID());
-		String command = usecase.getCommand();
-		for (String cur : tags.keySet()) {
-		    command = command.replaceAll("\\Q%%" + cur + "%%\\E", Matcher.quoteReplacement(tags.get(cur)));
-		}
-
-		List<String> cmds = new ArrayList<String>();
-		if ((shellPrefix != null) && !shellPrefix.isEmpty()) {
-			String[] prefixCmds = shellPrefix.split(" ");
-			for (int i = 0; i < prefixCmds.length; i++) {
-				cmds.add(prefixCmds[i]);
-			}
-			cmds.add(command);
-		} else {
-			String[] splitCmds = command.split(" ");
-			for (int i = 0; i < splitCmds.length; i++) {
-				cmds.add(splitCmds[i]);
-			}
-		}
-	
-		ProcessBuilder builder = new ProcessBuilder(cmds);
-		builder.directory(tempDir);
-
-		for (int i = 0; i < cmds.size(); i++) {
-			logger.info("cmds[" + i + "] = " + cmds.get(i));
-		}
-		logger.info("Command is " + command + " in directory " + tempDir);
-		try {
-			running = builder.start();
-			if (stdInReader != null) {
-				BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(running.getOutputStream()));
-				IOUtils.copyLarge(stdInReader, writer);
-				writer.close();
-			}
-		} catch (IOException e) {
-			throw new InvocationException(e);
-		}
-	}
-
-	private void copy_stream(InputStream read, OutputStream write) throws IOException {
-		int a = read.available();
-		if (a > 0) {
-			byte[] buf = new byte[a];
-			read.read(buf);
-			write.write(buf);
-		}
-	}
-
-	@Override
-	public HashMap<String, Object> submit_wait_fetch_results(ReferenceService referenceService) throws InvocationException {
-		ByteArrayOutputStream stdout_buf = new ByteArrayOutputStream();
-		ByteArrayOutputStream stderr_buf = new ByteArrayOutputStream();
-		while (true) {
-			try {
-				copy_stream(running.getInputStream(), stdout_buf);
-				copy_stream(running.getErrorStream(), stderr_buf);
-			} catch (IOException e1) {
-				throw new InvocationException(e1);
-			}
-			try {
-				int exitcode = running.exitValue();
-				if (!usecase.getValidReturnCodes().contains(exitcode)) {
-					try {
-						throw new InvocationException("Invalid exit code " + exitcode + ":" + stderr_buf.toString("US-ASCII"));
-					} catch (UnsupportedEncodingException e) {
-						throw new InvocationException("Invalid exit code " + exitcode + ":" + stderr_buf.toString());
-					}
-				}
-				else
-					break;
-			} catch (IllegalThreadStateException e) {
-
-				try {
-					Thread.sleep(100);
-				} catch (InterruptedException e1) {
-					throw new InvocationException(e);
-				}
-
-			}
-		}
-
-		HashMap<String, Object> results = new HashMap<String, Object>();
-			results.put("STDOUT", stdout_buf.toByteArray());
-			results.put("STDERR", stderr_buf.toByteArray());
-
-		for (Map.Entry<String, ScriptOutput> cur : usecase.getOutputs().entrySet()) {
-			ScriptOutput scriptOutput = cur.getValue();
-			File result = new File(tempDir.getAbsoluteFile() + "/" + cur.getValue().getPath());
-			if (result.exists()) {
-				AbstractExternalReference ref;
-				if (isRetrieveData()) {
-					FileInputStream is;
-					try {
-						is = new FileInputStream(result);
-					} catch (FileNotFoundException e) {
-						throw new InvocationException(e);
-					}
-					if (scriptOutput.isBinary()) {
-						ref = inlineByteArrayReferenceBuilder.createReference(is, null);
-					} else {
-						ref = inlineStringReferenceBuilder.createReference(is, null);
-					}
-					try {
-						is.close();
-					} catch (IOException e) {
-						throw new InvocationException(e);
-					}
-				}
-				else {
-					ref = new FileReference(result);
-					if (scriptOutput.isBinary()) {
-						((FileReference) ref)
-								.setDataNature(ReferencedDataNature.BINARY);
-					} else {
-						((FileReference) ref)
-								.setDataNature(ReferencedDataNature.TEXT);
-						((FileReference) ref).setCharset("UTF-8");
-					}
-				}
-				results.put(cur.getKey(), ref);
-			} else {
-				ErrorDocument ed = referenceService.getErrorDocumentService().registerError("No result for " + cur.getKey(), 0, getContext());
-				results.put(cur.getKey(), ed);
-			}
-		}
-		
-		if (isRetrieveData()) {
-			forgetRun();
-			try {
-				deleteDirectory(tempDir.getCanonicalPath());
-			} catch (IOException e) {
-				throw new InvocationException(e);
-			}
-		}
-
-		return results;
-	}
-
-	private FileReference getAsFileReference(ReferenceService referenceService, T2Reference t2Reference) {
-		Identified identified = referenceService.resolveIdentifier(t2Reference, null, null);
-		if (identified instanceof ReferenceSet) {
-			for (ExternalReferenceSPI ref : ((ReferenceSet) identified).getExternalReferences()) {
-				if (ref instanceof FileReference) {
-					return (FileReference) ref;
-				}
-			}
-		}
-		return null;
-	}
-
-	@Override
-	public void setStdIn(ReferenceService referenceService,
-			T2Reference t2Reference) {
-		stdInReader = new BufferedReader(new InputStreamReader(getAsStream(referenceService, t2Reference)));
-	}
-
-	@Override
-	public void rememberRun(String runId) {
-		this.setRunId(runId);
-		Set<String> directories = runIdToTempDir.get(runId);
-		if (directories == null) {
-			directories = Collections.synchronizedSet(new HashSet<String> ());
-			runIdToTempDir.put(runId, directories);
-		}
-		try {
-			directories.add(tempDir.getCanonicalPath());
-		} catch (IOException e) {
-			logger.error("Unable to record temporary directory: " + tempDir, e);
-		}
-	}
-
-	public static void load(File directory) {
-		File invocationsFile = new File(directory, LOCAL_INVOCATION_FILE);
-		if (!invocationsFile.exists()) {
-			return;
-		}
-		BufferedReader reader = null;
-		try {
-			reader = new BufferedReader(new FileReader(invocationsFile));
-			String line = reader.readLine();
-			while (line != null) {
-				String[] parts = line.split(" ");
-				if (parts.length != 2) {
-					break;
-				}
-				String runId = parts[0];
-				String tempDirString = parts[1];
-				Set<String> tempDirs = runIdToTempDir.get(runId);
-				if (tempDirs == null) {
-					tempDirs = new HashSet<String>();
-					runIdToTempDir.put(runId, tempDirs);
-				}
-				tempDirs.add(tempDirString);
-				line = reader.readLine();
-			}
-		} catch (FileNotFoundException e) {
-			logger.error(e);
-		} catch (IOException e) {
-			logger.error(e);
-		} finally {
-			if (reader != null) {
-				try {
-					reader.close();
-				} catch (IOException e) {
-					logger.error(e);
-				}
-			}
-		}
-	}
-
-	public static void persist(File directory) {
-		File invocationsFile = new File(directory, LOCAL_INVOCATION_FILE);
-		BufferedWriter writer = null;
-		try {
-			writer = new BufferedWriter(new FileWriter(invocationsFile));
-			for (String runId : runIdToTempDir.keySet()) {
-				for (String tempDir : runIdToTempDir.get(runId)) {
-					writer.write(runId);
-					writer.write(" ");
-					writer.write(tempDir);
-					writer.newLine();
-				}
-			}
-		} catch (IOException e) {
-			logger.error(e);
-		} finally {
-			if (writer != null) {
-				try {
-					writer.close();
-				} catch (IOException e) {
-					logger.error(e);
-				}
-			}
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshAutoLoginTrustEveryone.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshAutoLoginTrustEveryone.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshAutoLoginTrustEveryone.java
deleted file mode 100644
index ec9c15c..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshAutoLoginTrustEveryone.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;
-
-import org.apache.log4j.Logger;
-
-import com.jcraft.jsch.UIKeyboardInteractive;
-import com.jcraft.jsch.UserInfo;
-
-import de.uni_luebeck.inb.knowarc.usecases.invocation.AskUserForPw;
-
-final class SshAutoLoginTrustEveryone implements UserInfo, UIKeyboardInteractive {
-	
-	private static Logger logger = Logger.getLogger(SshAutoLoginTrustEveryone.class);
-
-	private final AskUserForPw askUserForPw;
-
-	public SshAutoLoginTrustEveryone(AskUserForPw askUserForPw) {
-		super();
-		this.askUserForPw = askUserForPw;
-	}
-
-	public void showMessage(String arg0) {
-		logger.info(arg0);
-	}
-
-	public boolean promptYesNo(String arg0) {
-		if (arg0.startsWith("The authenticity of host"))
-			return true;
-		return false;
-	}
-
-	public boolean promptPassword(String arg0) {
-		return true;
-	}
-
-	public boolean promptPassphrase(String arg0) {
-		return true;
-	}
-
-	public String getPassword() {
-		return askUserForPw.getPassword();
-	}
-
-	public String getPassphrase() {
-		return askUserForPw.getPassphrase();
-	}
-
-	public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt, boolean[] echo) {
-		if (prompt.length >= 1 && prompt[0].toLowerCase().startsWith("password"))
-			return new String[] { askUserForPw.getPassword() };
-		return null;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNode.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNode.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNode.java
deleted file mode 100644
index 6bc122a..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNode.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;
-
-import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
-
-public class SshNode {
-	
-    public static String DEFAULT_HOST = "127.0.0.1";
-    public static int DEFAULT_PORT = 22;
-    public static String DEFAULT_DIRECTORY = "/tmp/";
-
-    private String host = DEFAULT_HOST;
-    private int port = DEFAULT_PORT;
-    private String directory = DEFAULT_DIRECTORY;
-	
-	private SshUrl url;
-	
-	private String linkCommand = null;
-	private String copyCommand = null;
-	private boolean retrieveData = false;
-
-	/**
-	 * 
-	 */
-	SshNode() {
-		super();
-		linkCommand = InvocationMechanism.UNIX_LINK;
-		copyCommand = InvocationMechanism.UNIX_COPY;
-		
-	}
-	/**
-	 * @param directory the directory to set
-	 */
-	public void setDirectory(String directory) {
-		if ((directory != null) && !directory.isEmpty()) {
-			if (!directory.endsWith("/")) {
-				directory = directory + "/";
-			}
-			this.directory = directory;
-		}
-	}
-
-	/**
-	 * @return the directory
-	 */
-	public String getDirectory() {
-		return directory;
-	}
-
-	/**
-	 * @param host the host to set
-	 */
-	public void setHost(String host) {
-		this.host = host;
-	}
-
-	/**
-	 * @return the host
-	 */
-	public String getHost() {
-		return host;
-	}
-
-	/**
-	 * @param port the port to set
-	 */
-	public void setPort(int port) {
-		this.port = port;
-	}
-
-	/**
-	 * @return the port
-	 */
-	public int getPort() {
-		return port;
-	}
-	
-	SshUrl getUrl() {
-		if (url == null) {
-			url = new SshUrl(this);
-		}
-		return url;
-	}
-	
-	public int hashCode() {
-		return getUrl().hashCode();	
-	}
-
-	public boolean equals(Object obj) {
-		if ((obj == null) || !(obj instanceof SshNode)) {
-			return false;
-		}
-		return (this.hashCode() == obj.hashCode());
-	}
-	/**
-	 * @return the linkCommand
-	 */
-	public String getLinkCommand() {
-		return linkCommand;
-	}
-	/**
-	 * @param linkCommand the linkCommand to set
-	 */
-	public void setLinkCommand(String linkCommand) {
-		if ((linkCommand != null) && linkCommand.isEmpty()) {
-			this.linkCommand = null;
-		} else {
-			this.linkCommand = linkCommand;
-		}	}
-	/**
-	 * @return the copyCommand
-	 */
-	public String getCopyCommand() {
-		return copyCommand;
-	}
-	/**
-	 * @param copyCommand the copyCommand to set
-	 */
-	public void setCopyCommand(String copyCommand) {
-		if ((copyCommand != null) && copyCommand.isEmpty()) {
-			this.copyCommand = null;
-		} else {
-			this.copyCommand = copyCommand;
-		}
-	}
-	
-	/**
-	 * @return the retrieveData
-	 */
-	public boolean isRetrieveData() {
-		return retrieveData;
-	}
-	/**
-	 * @param retrieveData the retrieveData to set
-	 */
-	public void setRetrieveData(boolean retrieveData) {
-		this.retrieveData = retrieveData;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNodeFactory.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNodeFactory.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNodeFactory.java
deleted file mode 100644
index bb9a16e..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshNodeFactory.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-public class SshNodeFactory {
-	
-	private Map<String, SshNode> nodeMap = Collections.synchronizedMap(new HashMap<String, SshNode> ());
-	
-	private static SshNodeFactory INSTANCE = new SshNodeFactory();
-	
-	private SshNode defaultNode;
-	
-	private SshNodeFactory() {
-		defaultNode = getSshNode(SshNode.DEFAULT_HOST, SshNode.DEFAULT_PORT, SshNode.DEFAULT_DIRECTORY);
-	}
-
-	public SshNode getDefaultNode() {
-		return defaultNode;
-	}
-
-	public static SshNodeFactory getInstance() {
-		return INSTANCE;
-	}
-	
-	public SshNode getSshNode(String host, int port, String directory) {
-		String url = makeUrl(host, port, directory);
-		if (nodeMap.containsKey(url)) {
-			return nodeMap.get(url);
-		}
-		else {
-			SshNode newNode = new SshNode();
-			newNode.setHost(host);
-			newNode.setPort(port);
-			newNode.setDirectory(directory);
-			nodeMap.put(url, newNode);
-			return newNode;
-		}
-	}
-	
-	public boolean containsSshNode(String host, int port, String directory) {
-		return nodeMap.containsKey(makeUrl(host, port, directory));
-	}
-	
-	public static String makeUrl(String host, int port, String directory) {
-		return ("ssh://" + host + ":" + port + directory);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshPool.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshPool.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshPool.java
deleted file mode 100755
index 3eac767..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshPool.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-
-import com.jcraft.jsch.ChannelExec;
-import com.jcraft.jsch.ChannelSftp;
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Session;
-
-import de.uni_luebeck.inb.knowarc.usecases.RuntimeEnvironmentConstraint;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.AskUserForPw;
-
-public class SshPool {
-	
-	private static Logger logger = Logger.getLogger(SshPool.class);
-
-	
-	private static JSch jsch = new JSch();
-	
-    private static int CONNECT_TIMEOUT = 10000; // milliseconds
-
-	private static Map<SshNode, Session> sessionMap = Collections.synchronizedMap(new HashMap<SshNode, Session> ());
-	private static Map<Session, ChannelSftp> sftpGetMap = Collections.synchronizedMap(new HashMap<Session, ChannelSftp> ());
-	private static Map<Session, ChannelSftp> sftpPutMap = Collections.synchronizedMap(new HashMap<Session, ChannelSftp> ());
-	
-	public static Session getSshSession(final SshUrl sshUrl, final AskUserForPw askUserForPw) throws JSchException {
-		return getSshSession(sshUrl.getSshNode(), askUserForPw);
-	}
-	
-	public static synchronized Session getSshSession(final SshNode sshNode, final AskUserForPw askUserForPw) throws JSchException {
-
-		Session s = sessionMap.get(sshNode);
-		if ((s != null) && s.isConnected()) {
-			logger.info("Reusing session");
-			return s;
-		}
-		if (s != null) {
-			logger.info("Session was not connected");
-		}
-		if (s == null) {
-			logger.info("No session found for " + sshNode.toString());
-		}
-
-		if (askUserForPw.getKeyfile().length() > 0) {
-			jsch.addIdentity(askUserForPw.getKeyfile());
-		}
-		logger.info("Using host is " + sshNode.getHost() + " and port " + sshNode.getPort());
-		Session sshSession = jsch.getSession(askUserForPw.getUsername(), sshNode.getHost(), sshNode.getPort());
-		sshSession.setUserInfo(new SshAutoLoginTrustEveryone(askUserForPw));
-		sshSession.connect(CONNECT_TIMEOUT);
-		
-		askUserForPw.authenticationSucceeded();
-		sessionMap.put(sshNode, sshSession);
-		if (sshSession == null) {
-			logger.error("Returning a null session");
-		}
-		return sshSession;
-	}
-	
-	public static ChannelSftp getSftpGetChannel(SshNode sshNode, final AskUserForPw askUserForPw) throws JSchException {
-		return getSftpGetChannel(getSshSession(sshNode, askUserForPw));
-	}
-
-	private static synchronized ChannelSftp getSftpGetChannel(Session session) throws JSchException {
-		ChannelSftp result = sftpGetMap.get(session);
-		if (!session.isConnected()) {
-			logger.warn("Session is not connected");
-		}
-		if (result == null) {
-			logger.info("Creating new sftp channel");
-			result = (ChannelSftp) session.openChannel("sftp");
-			sftpGetMap.put(session, result);
-		}
-		else {
-			logger.info("Reusing sftp channel");			
-		}
-		if (!result.isConnected()) {
-			logger.info("Connecting");
-			result.connect();
-		} else {
-			logger.info("Already connected");
-		}
-		return result;
-	}
-	
-	public static ChannelSftp getSftpPutChannel(SshNode sshNode, final AskUserForPw askUserForPw) throws JSchException {
-		return getSftpPutChannel(getSshSession(sshNode, askUserForPw));
-	}
-
-	private static synchronized ChannelSftp getSftpPutChannel(Session session) throws JSchException {
-	    ChannelSftp result = null;
-	    synchronized(sftpPutMap) {
-		result = sftpPutMap.get(session);
-		if (!session.isConnected()) {
-			logger.info("Session is not connected");
-		}
-		if (result == null) {
-			logger.info("Creating new sftp channel");
-			result = (ChannelSftp) session.openChannel("sftp");
-			sftpPutMap.put(session, result);
-		}
-		else {
-			logger.info("Reusing sftp channel");			
-		}
-	    }
-	    if (!result.isConnected()) {
-		logger.info("Connecting");
-		result.connect(CONNECT_TIMEOUT);
-	    } else {
-		logger.info("Already connected");
-	    }
-	    return result;
-	}
-	
-	public static synchronized ChannelExec openExecChannel(SshNode sshNode, final AskUserForPw askUserForPw) throws JSchException {
-		return (ChannelExec) getSshSession(sshNode, askUserForPw).openChannel("exec");
-	}
-
-	private static synchronized ChannelExec openExecChannel(Session session) throws JSchException {
-		return (ChannelExec) session.openChannel("exec");
-	}
-
-}
-
-
-
-
-
-
-
-
-
-
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.java
deleted file mode 100644
index b401c0f..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;
-
-import java.io.InputStream;
-
-import org.apache.taverna.activities.externaltool.RetrieveLoginFromTaverna;
-import org.apache.taverna.reference.AbstractExternalReference;
-import org.apache.taverna.reference.DereferenceException;
-import org.apache.taverna.reference.ExternalReferenceSPI;
-import org.apache.taverna.reference.ReferenceContext;
-import org.apache.taverna.security.credentialmanager.CredentialManager;
-import org.apache.taverna.reference.ReferencedDataNature;
-
-import org.apache.log4j.Logger;
-
-import com.jcraft.jsch.ChannelSftp;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.SftpException;
-
-/**
- * @author alanrw
- *
- */
-public class SshReference extends AbstractExternalReference implements
-	ExternalReferenceSPI {
-
-	private static Logger logger = Logger.getLogger(SshReference.class);
-
-
-	private String host = "127.0.0.1";
-	private int port = 22;
-	private String directory = "/tmp/";
-	private String subDirectory;
-	private String fileName;
-
-	private CredentialManager credentialManager;
-
-	private int dataNatureInteger = ReferencedDataNature.UNKNOWN.ordinal();
-	private String charset = "UTF-8";
-	
-	public SshReference() {
-		super();
-	}
-
-	public SshReference(SshUrl url) {
-		super();
-		this.host = url.getSshNode().getHost();
-		this.port = url.getSshNode().getPort();
-		this.directory = url.getSshNode().getDirectory();
-		this.subDirectory = url.getSubDirectory();
-		this.fileName = url.getFileName();
-		this.setDataNature(url.getDataNature());
-		this.setCharset(url.getCharset());
-	}
-
-	/* (non-Javadoc)
-	 * @see net.sf.taverna.t2.reference.ExternalReferenceSPI#getApproximateSizeInBytes()
-	 */
-	@Override
-	public Long getApproximateSizeInBytes() {
-		return 10000L;
-	}
-
-	/* (non-Javadoc)
-	 * @see net.sf.taverna.t2.reference.ExternalReferenceSPI#openStream(net.sf.taverna.t2.reference.ReferenceContext)
-	 */
-	@Override
-	public InputStream openStream(ReferenceContext context)
-			throws DereferenceException {
-		try {
-			SshNode node = SshNodeFactory.getInstance().getSshNode(this.getHost(), this.getPort(), this.getDirectory());
-			String fullPath = getDirectory() +  getSubDirectory() + "/" + getFileName();
-			ChannelSftp channel = SshPool.getSftpGetChannel(node, new RetrieveLoginFromTaverna(new SshUrl(node).toString(), credentialManager));
-			logger.info("Opening stream on " + fullPath);
-			return (channel.get(fullPath));
-		} catch (JSchException e) {
-			//TODO
-			logger.error(e);
-		} catch (SftpException e) {
-			// TODO Auto-generated catch block
-			logger.error(e);
-		}
-		return null;
-	}
-
-	/**
-	 * @return the host
-	 */
-	public String getHost() {
-		return host;
-	}
-
-	/**
-	 * @param host the host to set
-	 */
-	public void setHost(String host) {
-		this.host = host;
-	}
-
-	/**
-	 * @return the port
-	 */
-	public int getPort() {
-		return port;
-	}
-
-	/**
-	 * @param port the port to set
-	 */
-	public void setPort(int port) {
-		this.port = port;
-	}
-
-	/**
-	 * @return the directory
-	 */
-	public String getDirectory() {
-		return directory;
-	}
-
-	/**
-	 * @param directory the directory to set
-	 */
-	public void setDirectory(String directory) {
-		this.directory = directory;
-	}
-
-	/**
-	 * @return the subDirectory
-	 */
-	public String getSubDirectory() {
-		return subDirectory;
-	}
-
-	/**
-	 * @param subDirectory the subDirectory to set
-	 */
-	public void setSubDirectory(String subDirectory) {
-		this.subDirectory = subDirectory;
-	}
-
-	/**
-	 * @return the fileName
-	 */
-	public String getFileName() {
-		return fileName;
-	}
-
-	/**
-	 * @param fileName the fileName to set
-	 */
-	public void setFileName(String fileName) {
-		this.fileName = fileName;
-	}
-
-	public String getFullPath() {
-		return getDirectory() + "/" + getSubDirectory() + "/" + getFileName();
-	}
-	
-	public ReferencedDataNature getDataNature() {
-		return ReferencedDataNature.values()[dataNatureInteger];
-	}
-
-	public void setDataNature(ReferencedDataNature dataNature) {
-		this.dataNatureInteger = dataNature.ordinal();
-	}
-
-	public String getCharset() {
-		return charset;
-	}
-
-	public void setCredentialManager(CredentialManager credentialManager) {
-		this.credentialManager = credentialManager;
-	}
-
-	public void setCharset(String charset) {
-		this.charset = charset;
-	}
-
-	/**
-	 * @return the dataNatureInteger
-	 */
-	public int getDataNatureInteger() {
-		return dataNatureInteger;
-	}
-
-	/**
-	 * @param dataNatureInteger the dataNatureInteger to set
-	 */
-	public void setDataNatureInteger(int dataNatureInteger) {
-		this.dataNatureInteger = dataNatureInteger;
-	}
-	
-	public SshReference clone() {
-		SshReference result = new SshReference();
-		result.setHost(this.getHost());
-		result.setPort(this.getPort());
-		result.setDirectory(this.getDirectory());
-		result.setSubDirectory(this.getSubDirectory());
-		result.setFileName(this.getFileName());
-		result.setDataNature(this.getDataNature());
-		result.setCharset(this.getCharset());
-		return result;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrl.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrl.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrl.java
deleted file mode 100644
index ae40ead..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrl.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;
-
-import org.apache.taverna.reference.ReferencedDataNature;
-
-public class SshUrl {
-	
-	private SshNode sshNode;
-	private String subDirectory;
-	private String fileName;
-
-	private ReferencedDataNature dataNature = ReferencedDataNature.UNKNOWN;
-	private String charset = "UTF-8";
-	
-
-	public SshUrl(SshNode sshNode) {
-		this.setSshNode(sshNode);
-	}
-	
-
-	/**
-	 * @return the host
-	 */
-	public String getHost() {
-		return getSshNode().getHost();
-	}
-	/**
-	 * @param host the host to set
-	 */
-	public void setHost(String host) {
-		getSshNode().setHost(host);
-	}
-	/**
-	 * @return the port
-	 */
-	public int getPort() {
-		return getSshNode().getPort();
-	}
-	/**
-	 * @param port the port to set
-	 */
-	public void setPort(int port) {
-		getSshNode().setPort(port);
-	}
-	/**
-	 * @return the directory
-	 */
-	public String getDirectory() {
-		return getSshNode().getDirectory();
-	}
-	/**
-	 * @param directory the directory to set
-	 */
-	public void setDirectory(String directory) {
-		getSshNode().setDirectory(directory);
-	}
-	/**
-	 * @return the subDirectory
-	 */
-	public String getSubDirectory() {
-		return subDirectory;
-	}
-	/**
-	 * @param subDirectory the subDirectory to set
-	 */
-	public void setSubDirectory(String subDirectory) {
-		this.subDirectory = subDirectory;
-	}
-	/**
-	 * @return the fileName
-	 */
-	public String getFileName() {
-		return fileName;
-	}
-	/**
-	 * @param fileName the fileName to set
-	 */
-	public void setFileName(String fileName) {
-		this.fileName = fileName;
-	}
-	
-	public String toString() {
-		String result = SshNodeFactory.makeUrl(getHost(), getPort(), getDirectory());
-		if (getSubDirectory() != null) {
-			result += getSubDirectory();
-		}
-		if (getFileName() != null) {
-			result += "/" + getFileName();
-		}
-		return result;
-	}
-	
-	public int hashCode() {
-		return toString().hashCode();
-		
-	}
-	
-	public boolean equals(Object obj) {
-		if ((obj == null) || !(obj instanceof SshUrl)) {
-			return false;
-		}
-		return (this.hashCode() == obj.hashCode());
-	}
-	
-	public SshUrl getBaseUrl() {
-		SshUrl result = new SshUrl(this.getSshNode());
-		return result;
-	}
-
-
-	/**
-	 * @return the sshNode
-	 */
-	public SshNode getSshNode() {
-		return sshNode;
-	}
-
-
-	/**
-	 * @param sshNode the sshNode to set
-	 */
-	public void setSshNode(SshNode sshNode) {
-		this.sshNode = sshNode;
-	}
-	
-	public ReferencedDataNature getDataNature() {
-		return dataNature;
-	}
-
-
-	public void setDataNature(ReferencedDataNature dataNature) {
-		this.dataNature = dataNature;
-	}
-
-
-	public String getCharset() {
-		return charset;
-	}
-
-
-	public void setCharset(String charset) {
-		this.charset = charset;
-	}
-
-
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrlToSshReference.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrlToSshReference.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrlToSshReference.java
deleted file mode 100644
index 7ab4cc6..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUrlToSshReference.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;
-
-import org.apache.taverna.reference.ExternalReferenceSPI;
-import org.apache.taverna.reference.ReferenceContext;
-import org.apache.taverna.reference.ValueToReferenceConversionException;
-import org.apache.taverna.reference.ValueToReferenceConverterSPI;
-import org.apache.taverna.security.credentialmanager.CredentialManager;
-
-public class SshUrlToSshReference implements ValueToReferenceConverterSPI {
-
-	private CredentialManager credentialManager;
-
-	/* (non-Javadoc)
-	 * @see net.sf.taverna.t2.reference.ValueToReferenceConverterSPI#canConvert(java.lang.Object, net.sf.taverna.t2.reference.ReferenceContext)
-	 */
-	@Override
-	public boolean canConvert(Object o, ReferenceContext context) {
-		return (o instanceof SshUrl);
-	}
-
-	/* (non-Javadoc)
-	 * @see net.sf.taverna.t2.reference.ValueToReferenceConverterSPI#convert(java.lang.Object, net.sf.taverna.t2.reference.ReferenceContext)
-	 */
-	@Override
-	public ExternalReferenceSPI convert(Object o, ReferenceContext context)
-			throws ValueToReferenceConversionException {
-		SshReference result = new SshReference((SshUrl) o);
-		result.setCredentialManager(credentialManager);
-		return result;
-	}
-
-	public void setCredentialManager(CredentialManager credentialManager) {
-		this.credentialManager = credentialManager;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUseCaseInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUseCaseInvocation.java b/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUseCaseInvocation.java
deleted file mode 100755
index 5f77364..0000000
--- a/taverna-external-tool-activity/src/main/java/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshUseCaseInvocation.java
+++ /dev/null
@@ -1,561 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package de.uni_luebeck.inb.knowarc.usecases.invocation.ssh;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.Set;
-import java.util.Vector;
-import java.util.regex.Matcher;
-
-import org.apache.taverna.activities.externaltool.RetrieveLoginFromTaverna;
-import org.apache.taverna.reference.AbstractExternalReference;
-import org.apache.taverna.reference.ErrorDocument;
-import org.apache.taverna.reference.ErrorDocumentServiceException;
-import org.apache.taverna.reference.ExternalReferenceSPI;
-import org.apache.taverna.reference.Identified;
-import org.apache.taverna.reference.ReferenceService;
-import org.apache.taverna.reference.ReferenceSet;
-import org.apache.taverna.reference.ReferencedDataNature;
-import org.apache.taverna.reference.T2Reference;
-import org.apache.taverna.security.credentialmanager.CredentialManager;
-
-import org.apache.log4j.Logger;
-
-import com.jcraft.jsch.ChannelExec;
-import com.jcraft.jsch.ChannelSftp;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Session;
-import com.jcraft.jsch.SftpException;
-import com.jcraft.jsch.ChannelSftp.LsEntry;
-
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptOutput;
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.AskUserForPw;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.InvocationException;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.UseCaseInvocation;
-
-/**
- * The job is executed by connecting to a worker pc using ssh, i.e. not via the
- * grid.
- * 
- * @author Hajo Krabbenhoeft
- */
-public class SshUseCaseInvocation extends UseCaseInvocation {
-
-	private static Logger logger = Logger.getLogger(SshUseCaseInvocation.class);
-
-	private SshUrl location = null;
-
-	private InputStream stdInputStream = null;
-
-	public static final String SSH_USE_CASE_INVOCATION_TYPE = "D0A4CDEB-DD10-4A8E-A49C-8871003083D8";
-	private String tmpname;
-	private final SshNode workerNode;
-	private final AskUserForPw askUserForPw;
-
-	private ChannelExec running;
-
-	private List<String> precedingCommands = new ArrayList<String>();
-
-	private final ByteArrayOutputStream stdout_buf = new ByteArrayOutputStream();
-	private final ByteArrayOutputStream stderr_buf = new ByteArrayOutputStream();
-
-	private static Map<String, Object> nodeLock = Collections
-			.synchronizedMap(new HashMap<String, Object>());
-
-	private static Map<String, Set<SshUrl>> runIdToTempDir = Collections
-			.synchronizedMap(new HashMap<String, Set<SshUrl>>());
-
-	private static String SSH_INVOCATION_FILE = "sshInvocations";
-
-	private final CredentialManager credentialManager;
-
-	public static String test(final SshNode workerNode,
-			final AskUserForPw askUserForPw) {
-		try {
-			Session sshSession = SshPool
-					.getSshSession(workerNode, askUserForPw);
-
-			ChannelSftp sftpTest = (ChannelSftp) sshSession.openChannel("sftp");
-			sftpTest.connect();
-			sftpTest.cd(workerNode.getDirectory());
-			sftpTest.disconnect();
-			sshSession.disconnect();
-		} catch (JSchException e) {
-			return e.toString();
-		} catch (SftpException e) {
-			return e.toString();
-		}
-		return null;
-	}
-
-	public SshUseCaseInvocation(UseCaseDescription desc, SshNode workerNodeA,
-			AskUserForPw askUserForPwA, CredentialManager credentialManager)
-			throws JSchException, SftpException {
-		this.workerNode = workerNodeA;
-		this.credentialManager = credentialManager;
-
-		setRetrieveData(workerNodeA.isRetrieveData());
-		this.askUserForPw = askUserForPwA;
-		usecase = desc;
-
-		ChannelSftp sftp = SshPool.getSftpPutChannel(workerNode, askUserForPw);
-		synchronized (getNodeLock(workerNode)) {
-
-			logger.info("Changing remote directory to "
-					+ workerNode.getDirectory());
-			sftp.cd(workerNode.getDirectory());
-			Random rnd = new Random();
-			while (true) {
-				tmpname = "usecase" + rnd.nextLong();
-				try {
-					sftp.lstat(workerNode.getDirectory() + tmpname);
-					continue;
-				} catch (Exception e) {
-					// file seems to not exist :)
-				}
-				sftp.mkdir(workerNode.getDirectory() + tmpname);
-				sftp.cd(workerNode.getDirectory() + tmpname);
-				break;
-			}
-		}
-	}
-
-	private static void recursiveDelete(ChannelSftp sftp, String path)
-			throws SftpException, JSchException {
-		Vector<?> entries = sftp.ls(path);
-		for (Object object : entries) {
-			LsEntry entry = (LsEntry) object;
-			if (entry.getFilename().equals(".")
-					|| entry.getFilename().equals("..")) {
-				continue;
-			}
-			if (entry.getAttrs().isDir()) {
-				recursiveDelete(sftp, path + entry.getFilename() + "/");
-			} else {
-				sftp.rm(path + entry.getFilename());
-			}
-		}
-		sftp.rmdir(path);
-	}
-
-	private static void deleteDirectory(SshUrl directory,
-			CredentialManager credentialManager) throws InvocationException {
-		URI uri;
-		try {
-			uri = new URI(directory.toString());
-
-			ChannelSftp sftp;
-			SshNode workerNode;
-			String fullPath = uri.getPath();
-			String path = fullPath.substring(0, fullPath.lastIndexOf("/"));
-			String tempDir = fullPath.substring(fullPath.lastIndexOf("/"));
-			try {
-				workerNode = SshNodeFactory.getInstance().getSshNode(
-						uri.getHost(), uri.getPort(), path);
-
-				sftp = SshPool.getSftpPutChannel(workerNode,
-						new RetrieveLoginFromTaverna(workerNode.getUrl()
-								.toString(), credentialManager));
-			} catch (JSchException e) {
-				throw new InvocationException(e);
-			}
-			synchronized (getNodeLock(workerNode)) {
-				try {
-					sftp.cd(path);
-					recursiveDelete(sftp, path + "/" + tempDir + "/");
-				} catch (SftpException e) {
-					throw new InvocationException(e);
-				} catch (JSchException e) {
-					throw new InvocationException(e);
-				}
-			}
-		} catch (URISyntaxException e1) {
-			throw new InvocationException(e1);
-		}
-	}
-
-	public static void cleanup(String runId, CredentialManager credentialManager)
-			throws InvocationException {
-		Set<SshUrl> tempDirectories = runIdToTempDir.get(runId);
-		if (tempDirectories != null) {
-			for (SshUrl tempUrl : tempDirectories) {
-				deleteDirectory(tempUrl, credentialManager);
-			}
-			runIdToTempDir.remove(runId);
-		}
-	}
-
-	@Override
-	protected void submit_generate_job_inner() throws InvocationException {
-		tags.put("uniqueID", "" + getSubmissionID());
-		String command = usecase.getCommand();
-		for (String cur : tags.keySet()) {
-			command = command.replaceAll("\\Q%%" + cur + "%%\\E",
-					Matcher.quoteReplacement(tags.get(cur)));
-		}
-		String fullCommand = "cd " + workerNode.getDirectory() + tmpname;
-		for (String preceding : precedingCommands) {
-			fullCommand += " && " + preceding;
-		}
-		fullCommand += " && " + command;
-
-		logger.info("Full command is " + fullCommand);
-
-		try {
-			running = SshPool.openExecChannel(workerNode, askUserForPw);
-			running.setCommand(fullCommand);
-			running.setOutputStream(stdout_buf);
-			running.setErrStream(stderr_buf);
-			if (stdInputStream != null) {
-				running.setInputStream(stdInputStream);
-			}
-			running.connect();
-		} catch (JSchException e) {
-			throw new InvocationException(e);
-		}
-
-	}
-
-	@Override
-	public HashMap<String, Object> submit_wait_fetch_results(
-			ReferenceService referenceService) throws InvocationException {
-		while (!running.isClosed()) {
-			try {
-				Thread.sleep(1000);
-			} catch (InterruptedException e) {
-				throw new InvocationException("Invocation interrupted:"
-						+ e.getMessage());
-			}
-		}
-
-		int exitcode = running.getExitStatus();
-		if (!usecase.getValidReturnCodes().contains(exitcode)) {
-			try {
-				throw new InvocationException("Invalid exit code " + exitcode
-						+ ":" + stderr_buf.toString("US-ASCII"));
-			} catch (UnsupportedEncodingException e) {
-				throw new InvocationException("Invalid exit code " + exitcode
-						+ ":" + stderr_buf.toString());
-			}
-		}
-
-		HashMap<String, Object> results = new HashMap<String, Object>();
-
-		results.put("STDOUT", stdout_buf.toByteArray());
-		results.put("STDERR", stderr_buf.toByteArray());
-		try {
-			stdout_buf.close();
-			stderr_buf.close();
-		} catch (IOException e2) {
-			throw new InvocationException(e2);
-		}
-
-		try {
-			ChannelSftp sftp = SshPool.getSftpPutChannel(workerNode,
-					askUserForPw);
-			synchronized (getNodeLock(workerNode)) {
-				for (Map.Entry<String, ScriptOutput> cur : usecase.getOutputs()
-						.entrySet()) {
-					ScriptOutput scriptOutput = cur.getValue();
-					String fullPath = workerNode.getDirectory() + tmpname + "/"
-							+ scriptOutput.getPath();
-					try {
-						if (sftp.stat(fullPath) != null) {
-							SshUrl url = new SshUrl(workerNode);
-							url.setSubDirectory(tmpname);
-							url.setFileName(scriptOutput.getPath());
-							if (scriptOutput.isBinary()) {
-								url.setDataNature(ReferencedDataNature.BINARY);
-							} else {
-								url.setDataNature(ReferencedDataNature.TEXT);
-								url.setCharset("UTF-8");
-							}
-							if (isRetrieveData()) {
-								SshReference urlRef = new SshReference(url);
-								InputStream is = urlRef.openStream(null);
-								AbstractExternalReference ref;
-								if (scriptOutput.isBinary()) {
-									ref = inlineByteArrayReferenceBuilder
-											.createReference(is, null);
-								} else {
-									ref = inlineStringReferenceBuilder
-											.createReference(is, null);
-								}
-								try {
-									is.close();
-								} catch (IOException e) {
-									throw new InvocationException(e);
-								}
-								results.put(cur.getKey(), ref);
-							} else {
-								results.put(cur.getKey(), url);
-							}
-						} else {
-							ErrorDocument ed = referenceService
-									.getErrorDocumentService().registerError(
-											"No result for " + cur.getKey(), 0,
-											getContext());
-							results.put(cur.getKey(), ed);
-						}
-					} catch (SftpException e) {
-						ErrorDocument ed = referenceService
-								.getErrorDocumentService().registerError(
-										"No result for " + cur.getKey(), 0,
-										getContext());
-						results.put(cur.getKey(), ed);
-
-					}
-				}
-			}
-		} catch (JSchException e1) {
-			throw new InvocationException(e1);
-		} catch (ErrorDocumentServiceException e) {
-			throw new InvocationException(e);
-		}
-
-		if (running != null) {
-			running.disconnect();
-		}
-		if (stdInputStream != null) {
-			try {
-				stdInputStream.close();
-			} catch (IOException e) {
-				throw new InvocationException(e);
-			}
-		}
-
-		if (isRetrieveData()) {
-			forgetRun();
-			deleteDirectory(location, credentialManager);
-
-		}
-		return results;
-	}
-
-	@Override
-	public String setOneInput(ReferenceService referenceService,
-			T2Reference t2Reference, ScriptInput input)
-			throws InvocationException {
-		String target = null;
-		String remoteName = null;
-		if (input.isFile()) {
-			remoteName = input.getTag();
-		} else if (input.isTempFile()) {
-			remoteName = "tempfile." + (nTempFiles++) + ".tmp";
-
-		}
-		if (input.isFile() || input.isTempFile()) {
-			SshReference sshRef = getAsSshReference(referenceService,
-					t2Reference, workerNode);
-			target = workerNode.getDirectory() + tmpname + "/" + remoteName;
-			logger.info("Target is " + target);
-			if (sshRef != null) {
-				if (!input.isForceCopy()) {
-					String linkCommand = workerNode.getLinkCommand();
-					if (linkCommand != null) {
-						String actualLinkCommand = getActualOsCommand(
-								linkCommand, sshRef.getFullPath(), remoteName,
-								target);
-						precedingCommands.add(actualLinkCommand);
-						return target;
-
-					}
-				}
-				String copyCommand = workerNode.getCopyCommand();
-				if (copyCommand != null) {
-					String actualCopyCommand = getActualOsCommand(copyCommand,
-							sshRef.getFullPath(), remoteName, target);
-					precedingCommands.add(actualCopyCommand);
-					return target;
-				}
-			}
-			try {
-				ChannelSftp sftp = SshPool.getSftpPutChannel(workerNode,
-						askUserForPw);
-				synchronized (getNodeLock(workerNode)) {
-					InputStream r = getAsStream(referenceService, t2Reference);
-					sftp.put(r, target);
-					r.close();
-				}
-			} catch (SftpException e) {
-				throw new InvocationException(e);
-			} catch (JSchException e) {
-				throw new InvocationException(e);
-			} catch (IOException e) {
-				throw new InvocationException(e);
-			}
-			return target;
-		} else {
-			String value = (String) referenceService.renderIdentifier(
-					t2Reference, String.class, this.getContext());
-			return value;
-
-		}
-	}
-
-	public SshReference getAsSshReference(ReferenceService referenceService,
-			T2Reference t2Reference, SshNode workerNode) {
-		Identified identified = referenceService.resolveIdentifier(t2Reference,
-				null, null);
-		if (identified instanceof ReferenceSet) {
-			for (ExternalReferenceSPI ref : ((ReferenceSet) identified)
-					.getExternalReferences()) {
-				if (ref instanceof SshReference) {
-					SshReference sshRef = (SshReference) ref;
-					if (sshRef.getHost().equals(workerNode.getHost())) {
-						return sshRef;
-					}
-				}
-			}
-		}
-		return null;
-	}
-
-	private static Object getNodeLock(final SshNode node) {
-		return getNodeLock(node.getHost());
-	}
-
-	private static synchronized Object getNodeLock(String hostName) {
-		if (!nodeLock.containsKey(hostName)) {
-			nodeLock.put(hostName, new Object());
-		}
-		return nodeLock.get(hostName);
-	}
-
-	@Override
-	public void setStdIn(ReferenceService referenceService,
-			T2Reference t2Reference) {
-		stdInputStream = new BufferedInputStream(getAsStream(referenceService,
-				t2Reference));
-	}
-
-	@Override
-	public void rememberRun(String runId) {
-		this.setRunId(runId);
-		Set<SshUrl> directories = runIdToTempDir.get(runId);
-		if (directories == null) {
-			directories = Collections.synchronizedSet(new HashSet<SshUrl>());
-			runIdToTempDir.put(runId, directories);
-		}
-		location = new SshUrl(workerNode);
-		location.setSubDirectory(tmpname);
-		directories.add(location);
-	}
-
-	private void forgetRun() {
-		Set<SshUrl> directories = runIdToTempDir.get(getRunId());
-		directories.remove(location);
-	}
-
-	public static void load(File directory) {
-		File invocationsFile = new File(directory, SSH_INVOCATION_FILE);
-		if (!invocationsFile.exists()) {
-			return;
-		}
-		BufferedReader reader = null;
-		try {
-			reader = new BufferedReader(new FileReader(invocationsFile));
-			String line = reader.readLine();
-			while (line != null) {
-				String[] parts = line.split(" ");
-				if (parts.length != 2) {
-					break;
-				}
-				String runId = parts[0];
-				String urlString = parts[1];
-				Set<SshUrl> urls = runIdToTempDir.get(runId);
-				if (urls == null) {
-					urls = new HashSet<SshUrl>();
-					runIdToTempDir.put(runId, urls);
-				}
-				URI uri = new URI(urlString);
-				String fullPath = uri.getPath();
-				String path = fullPath.substring(0, fullPath.lastIndexOf("/"));
-				String tempDir = fullPath.substring(fullPath.lastIndexOf("/"));
-				SshNode node = SshNodeFactory.getInstance().getSshNode(
-						uri.getHost(), uri.getPort(), path);
-				SshUrl newUrl = new SshUrl(node);
-				newUrl.setSubDirectory(tempDir);
-				urls.add(newUrl);
-				line = reader.readLine();
-			}
-		} catch (FileNotFoundException e) {
-			logger.error(e);
-		} catch (URISyntaxException e) {
-			logger.error(e);
-		} catch (IOException e) {
-			logger.error(e);
-		} finally {
-			if (reader != null) {
-				try {
-					reader.close();
-				} catch (IOException e) {
-					logger.error(e);
-				}
-			}
-		}
-	}
-
-	public static void persist(File directory) {
-		File invocationsFile = new File(directory, SSH_INVOCATION_FILE);
-		BufferedWriter writer = null;
-		try {
-			writer = new BufferedWriter(new FileWriter(invocationsFile));
-			for (String runId : runIdToTempDir.keySet()) {
-				for (SshUrl url : runIdToTempDir.get(runId)) {
-					writer.write(runId);
-					writer.write(" ");
-					writer.write(url.toString());
-					writer.newLine();
-				}
-			}
-		} catch (IOException e) {
-			logger.error(e);
-		} finally {
-			if (writer != null) {
-				try {
-					writer.close();
-				} catch (IOException e) {
-					logger.error(e);
-				}
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java
index fb903c8..167f424 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java
@@ -24,6 +24,12 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.taverna.activities.externaltool.desc.ScriptInput;
+import org.apache.taverna.activities.externaltool.desc.ScriptInputUser;
+import org.apache.taverna.activities.externaltool.desc.ScriptOutput;
+import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.invocation.InvocationException;
+import org.apache.taverna.activities.externaltool.invocation.UseCaseInvocation;
 import org.apache.taverna.activities.externaltool.manager.InvocationGroup;
 import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
 import org.apache.taverna.annotation.Annotated;
@@ -41,13 +47,6 @@ import org.apache.taverna.workflowmodel.processor.activity.AsynchronousActivityC
 
 import org.apache.log4j.Logger;
 
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInput;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInputUser;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptOutput;
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.InvocationException;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.UseCaseInvocation;
-
 /**
  * This is the main class of the use case activity plugin. Here we store the
  * configuration and the description of a use case activity, configure the input

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityConfigurationBean.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityConfigurationBean.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityConfigurationBean.java
index 5e6fd23..74c9070 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityConfigurationBean.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityConfigurationBean.java
@@ -21,12 +21,12 @@ package org.apache.taverna.activities.externaltool;
 
 import java.util.List;
 
+import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
 import org.apache.taverna.activities.externaltool.manager.InvocationGroup;
 import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
 import org.apache.taverna.activities.externaltool.manager.MechanismCreator;
 import org.apache.taverna.workflowmodel.processor.config.ConfigurationBean;
 import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty;
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
 
 @ConfigurationBean(uri = ExternalToolActivity.URI + "#Config")
 public final class ExternalToolActivityConfigurationBean {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityMimeTypeChecker.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityMimeTypeChecker.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityMimeTypeChecker.java
index 641b60d..051b69b 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityMimeTypeChecker.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivityMimeTypeChecker.java
@@ -27,6 +27,8 @@ import java.util.List;
 import java.util.Set;
 import java.util.Map.Entry;
 
+import org.apache.taverna.activities.externaltool.desc.ScriptInputUser;
+import org.apache.taverna.activities.externaltool.desc.ScriptOutput;
 import org.apache.taverna.visit.VisitReport;
 import org.apache.taverna.visit.VisitReport.Status;
 import org.apache.taverna.workflowmodel.Dataflow;
@@ -49,9 +51,6 @@ import org.apache.taverna.workflowmodel.utils.Tools;
 
 import org.apache.log4j.Logger;
 
-import de.uni_luebeck.inb.knowarc.usecases.ScriptInputUser;
-import de.uni_luebeck.inb.knowarc.usecases.ScriptOutput;
-
 /**
  * @author alanrw
  *

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java
index 6697ed6..6bf729c 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java
@@ -21,9 +21,8 @@ package org.apache.taverna.activities.externaltool;
 
 import java.util.Map;
 
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.UseCaseInvocation;
-
+import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.invocation.UseCaseInvocation;
 import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
 import org.apache.taverna.reference.ReferenceService;
 import org.apache.taverna.reference.T2Reference;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/RetrieveLoginFromTaverna.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/RetrieveLoginFromTaverna.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/RetrieveLoginFromTaverna.java
index 3dcfd0f..dff298a 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/RetrieveLoginFromTaverna.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/RetrieveLoginFromTaverna.java
@@ -21,10 +21,10 @@ package org.apache.taverna.activities.externaltool;
 
 import java.net.URI;
 
+import org.apache.taverna.activities.externaltool.invocation.AskUserForPw;
 import org.apache.taverna.security.credentialmanager.CMException;
 import org.apache.taverna.security.credentialmanager.CredentialManager;
 import org.apache.taverna.security.credentialmanager.UsernamePassword;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.AskUserForPw;
 
 public class RetrieveLoginFromTaverna implements AskUserForPw {
 	private final String url;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/RuntimeEnvironment.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/RuntimeEnvironment.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/RuntimeEnvironment.java
new file mode 100644
index 0000000..ad58eea
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/RuntimeEnvironment.java
@@ -0,0 +1,251 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.desc;
+
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+
+/**
+ * Representation of information about a single runtime environment. It is used
+ * to decide if one runtime environment is possibly compatible with another one
+ * for the selection of queues to commit to.
+ * 
+ * To experiment/test these functions, run the following java -cp
+ * target/taverna-knowarc-processor-0.1.7.jar
+ * de.uni_luebeck.janitor.ldap.RuntimeEnvironment compare bla-1 foo-1 java -cp
+ * target/taverna-knowarc-processor-0.1.7.jar
+ * de.uni_luebeck.janitor.ldap.RuntimeEnvironment compare bla-1 bla-2 java -cp
+ * target/taverna-knowarc-processor-0.1.7.jar
+ * de.uni_luebeck.janitor.ldap.RuntimeEnvironment compare bla-1.2 bla-1
+ * 
+ * @author Steffen Moeller
+ */
+@SuppressWarnings("unchecked")
+public class RuntimeEnvironment implements Comparable {
+	
+	private static Logger logger = Logger.getLogger(RuntimeEnvironment.class);
+
+
+	/**
+	 * Unique identification of the runtime environment - the full name
+	 */
+	protected String id;
+
+	/**
+	 * Accessor function for the complete identifier of the runtime environment
+	 */
+	public String getID() {
+		return id;
+	}
+
+	protected String name;
+
+	/**
+	 * Accessor function for the RE's name
+	 */
+	public String getName() {
+		return name;
+	}
+
+	protected String version;
+
+	/**
+	 * Accessfor function for the version
+	 */
+	public String getVersion() {
+		return version;
+	}
+
+	/**
+	 * for those busy fellows who don't have the time to convert the String into
+	 * a RuntimeEnvironment object.
+	 * 
+	 * @author Steffen Moeller
+	 */
+	public boolean atLeastAsCapableAs(String s) {
+		RuntimeEnvironment tmpRE = new RuntimeEnvironment(s);
+		return this.atLeastAsCapableAs(tmpRE);
+	}
+
+	/**
+	 * Indicates if a runtime environment has the same name, and if so, if the
+	 * given RE has the same or a later version.
+	 * 
+	 * @author Steffen Moeller
+	 */
+	public boolean atLeastAsCapableAs(RuntimeEnvironment re) {
+		if (!name.equals(re.name))
+			return false;
+		int c = compareVersions(getVersion(), re.getVersion());
+		if (c >= 0) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	/**
+	 * Indicates if this runtimeEnvironment is the same version or later as any
+	 * in that list.
+	 * 
+	 * @author Steffen Moeller
+	 */
+	public boolean atLeastAsCapableAsAnyOf(Iterable<RuntimeEnvironment> res) {
+		boolean compatibleOneFound = false;
+		Iterator<RuntimeEnvironment> i = res.iterator();
+		while (i.hasNext() && !compatibleOneFound) {
+			RuntimeEnvironment r = i.next();
+			compatibleOneFound = atLeastAsCapableAs(r);
+		}
+		return compatibleOneFound;
+	}
+
+	/**
+	 * Indicates if any of the runtime environments listed is the same version
+	 * as this or later.
+	 * 
+	 * @author Steffen Moeller
+	 */
+	public boolean isInferiorToAtLeastOneIn(Iterable<RuntimeEnvironment> res) {
+		boolean compatibleOneFound = false;
+		Iterator<RuntimeEnvironment> i = res.iterator();
+		while (i.hasNext() && !compatibleOneFound) {
+			RuntimeEnvironment r = i.next();
+			compatibleOneFound = r.atLeastAsCapableAs(this);
+		}
+		return compatibleOneFound;
+	}
+
+	/**
+	 * Parses a string as commonly presented by the infosystem
+	 * 
+	 * @author Steffen Moeller
+	 */
+	public RuntimeEnvironment(String raw) {
+		id = raw;
+		int dashpos = raw.indexOf("-");
+		if (-1 == dashpos) {
+			version = "";
+			name = raw;
+		} else {
+			name = raw.substring(0, dashpos);
+			if (dashpos + 1 <= raw.length()) {
+				version = raw.substring(dashpos + 1, raw.length());
+			} else {
+				version = "";
+			}
+		}
+	}
+
+	/**
+	 * to make it behave like a string at time, as it was originally implemented
+	 */
+	@Override
+	public String toString() {
+		return id;
+	}
+
+	/**
+	 * Implementation of Comparable interface. It comes handy albeit this
+	 * function says nothing about the compatibility of two runtime environments
+	 * unless their names are identical and the relation of the constraint was
+	 * taken into account. It just sorts them in lists.
+	 */
+	public int compareTo(Object o) throws ClassCastException {
+		RuntimeEnvironment r = (RuntimeEnvironment) o;
+		if (getName().equals(r.getName())) {
+			return RuntimeEnvironment.compareVersions(getVersion(), r.getVersion());
+		} else {
+			return id.compareTo(r.getID());
+		}
+	}
+
+	/**
+	 * FIXME: For the sake of simplicity, this implementation makes an error in
+	 * treating . and - in the versions equally. Versions, if numerical, are
+	 * treated numerically. Otherwise it is lexicographical, which is error
+	 * prone, though. Should the 'Scanner' class should be tapped into?
+	 * 
+	 * @author Steffen Moeller
+	 */
+	public static int compareVersions(String a, String b) {
+
+		// null pointer exceptions are not risked .. we are nice
+		if (null == a)
+			a = "";
+		if (null == b)
+			b = "";
+
+		// catching the dumb case first
+		if (a.equals(b))
+			return 0;
+
+		List as = Arrays.asList(a.split("[.-]"));
+		List bs = Arrays.asList(b.split("[.-]"));
+
+		// both lists have the empty element as members at least
+		Iterator aIterator = as.iterator();
+		Iterator bIterator = bs.iterator();
+
+		while (aIterator.hasNext()) {
+			String aa = (String) aIterator.next();
+			if (!bIterator.hasNext()) {
+				// a is longer while equal so far
+				return 1; // a > b
+			}
+			String bb = (String) bIterator.next();
+			if (!aa.equals(bb)) {
+				// a and b differ
+				try {
+					Integer aInt = Integer.parseInt(aa);
+					Integer bInt = Integer.parseInt(bb);
+					return aInt.compareTo(bInt);
+				} catch (Exception e) {
+					return aa.compareTo(bb);
+				}
+			}
+		}
+		if (bIterator.hasNext()) {
+			// b is longer while equal so far
+			return -1; // a < b
+		}
+		return 0; // a == b
+	}
+
+	/**
+	 * For testing purposes
+	 */
+	public static void main(String argv[]) {
+		if ("compare".equals(argv[0])) {
+			RuntimeEnvironment r1 = new RuntimeEnvironment(argv[1]);
+			RuntimeEnvironment r2 = new RuntimeEnvironment(argv[2]);
+			logger.info("r1.getName(): " + r1.getName());
+			logger.info("r1.getVersion(): " + r1.getVersion());
+			logger.info("r2.getName(): " + r2.getName());
+			logger.info("r2.getVersion(): " + r2.getVersion());
+			logger.info("r1.atLeastAsCapableAs(r2): " + String.valueOf(r1.atLeastAsCapableAs(r2)));
+		} else {
+			logger.info("Don't know how to '" + argv[0] + "'");
+		}
+	}
+
+}


[07/50] [abbrv] incubator-taverna-common-activities git commit: TAVERNA-963 package taverna.externaltool.*

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/RuntimeEnvironmentConstraint.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/RuntimeEnvironmentConstraint.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/RuntimeEnvironmentConstraint.java
new file mode 100644
index 0000000..8324d61
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/RuntimeEnvironmentConstraint.java
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.desc;
+ 
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.apache.log4j.Logger;
+
+
+/**
+ * When use cases present a runtime environment, then they don't want to express
+ * that these would provide such, but that these request such, i.e. they constrain
+ * lists of potentially eligible queues. 
+ * @author Steffen Moeller
+ * @since 2008
+ */
+public class RuntimeEnvironmentConstraint extends RuntimeEnvironment {
+	
+	private static Logger logger = Logger.getLogger(RuntimeEnvironmentConstraint.class);
+
+	private static String[] ACCEPTED_RELATIONS = new String[] {"=", ">=", "<=", ">", "<"};
+	/**
+	 * If there is no relation specified, presume >=
+	 */
+	private static String DEFAULT_RELATION = ">=";
+	
+	public static String[] getAcceptedRelations() {
+		return ACCEPTED_RELATIONS;
+	}
+
+	public static String getDefaultRelation() {
+		return DEFAULT_RELATION;
+	}
+
+	/**
+	 *  Identifies the relation between runtime environments to be tested
+	 */
+	protected String relation;
+	
+	/**
+	 * Accessor function for relation
+	 */
+	public String getRelation() {
+		return this.relation;
+	}
+	
+	/**
+	 * Tests of a relation is supported
+	 * @param relation
+	 * @return true iff in <, > , <=, >=, =
+	 */
+	public static boolean acceptedRelation(String relation) {
+		if ((null == relation) || relation.equals("")) {
+			return false;
+		}
+		return relation.equals("=")||relation.equals(">=")||relation.equals("<=")||relation.equals(">")||relation.equals("<");
+	}
+	
+	/**
+	 * Constructor
+	 * @param id - expects the name of the runtime environment together with the version to which the
+	 * @param relation - relates to (">","<","=",">=","<=")
+	 */
+	public RuntimeEnvironmentConstraint(String id, String relation) {
+		super(id);
+		if (null == relation || relation.equals("")) {
+			relation=RuntimeEnvironmentConstraint.getDefaultRelation();
+		}
+		if (relation.equals("==")) {
+			relation="=";
+		}
+		else if (relation.equals("=<")) {
+			relation="<=";
+		}
+		else if (!RuntimeEnvironmentConstraint.acceptedRelation(relation)) {
+			logger.warn("Unknown relation '"+relation+"', presuming '"+RuntimeEnvironmentConstraint.getDefaultRelation()+"'");
+			relation=RuntimeEnvironmentConstraint.getDefaultRelation();
+		}
+		this.relation=relation;
+	}
+	
+	/**
+	 * Perfoms test if the RuntimeEnvironment (RE) passed as argument fulfills the requirements set by the constraint.
+	 * @param re - RE to test
+	 * @return true iff the RE fulfills this REconstraint.
+	 */
+	public boolean isFulfilledBy(RuntimeEnvironment re) {
+		logger.info(re.getID()+" " + this.getRelation() + " "+this.getID() + " ?");
+		if (this.getRelation().equals("=")) {
+			logger.info("=");
+			return re.getID().equals(this.getID());
+		}
+		if (!re.getName().equals(this.getName())) {
+			logger.warn("Name match failed");
+			return false;
+		}
+		int c = RuntimeEnvironment.compareVersions(re.getVersion(),this.getVersion());
+		logger.info("c="+c);
+		if (this.getRelation().equals(">")) return c>0;
+		if (this.getRelation().equals(">=")) return c>=0;
+		if (this.getRelation().equals("<=")) return c<=0;
+		if (this.getRelation().equals("<")) return c<0;
+		throw new RuntimeException("Unknown/untreated releation '"+this.getRelation()+"'");
+	}
+	
+	/**
+	 * Iterates over all the RuntimeEnvironments passed as argument.
+	 * @param REs - list of RuntimeEnvironments, mostly those offered at a particular queue
+	 * @return true iff any RE among the REs passed as argument are fulfilling the constraint
+	 */
+	public boolean isFulfilledByAtLeastOneIn(Collection<RuntimeEnvironment> REs) {
+		boolean fulfilled = false;
+		Iterator<RuntimeEnvironment> i = REs.iterator();
+		while(i.hasNext() && !fulfilled) {
+			RuntimeEnvironment r = i.next();
+			fulfilled = this.isFulfilledBy(r);
+		}
+		return fulfilled;
+	}
+	/**
+	 * For testing purposes
+	 */
+	public static void main(String argv[]) {
+		try {
+			if (argv[0].equals("--help") || argv.length != 3) {
+				logger.error("Expecting arguments (<|>|=|<=|>=) runtime1-version runtime2-version");
+			}
+			else {
+				RuntimeEnvironmentConstraint r1 = new RuntimeEnvironmentConstraint(argv[1], argv[0]);
+				RuntimeEnvironment r2 = new RuntimeEnvironment(argv[2]);
+				logger.info("r1.getName(): "+r1.getName());
+				logger.info("r1.getVersion(): "+r1.getVersion());
+				logger.info("r1.getRelation(): "+r1.getRelation());
+				logger.info("r2.getName(): "+r2.getName());
+				logger.info("r2.getVersion(): "+r2.getVersion());
+				logger.info("r1.isFulfilledBy(r2): "+String.valueOf(r1.isFulfilledBy(r2)));
+			}
+		}
+		catch (Exception e) {
+			logger.error(e);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptInput.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptInput.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptInput.java
new file mode 100644
index 0000000..3d68272
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptInput.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.desc;
+
+import java.nio.charset.Charset;
+
+import org.apache.taverna.activities.externaltool.ExternalToolActivity;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationBean;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty;
+
+/**
+ * Integrates inputs to the grid that come from the use case descriptions
+ * with those that are fed through the workflow.
+ *
+ * this class controls name and data storage of one input,
+ * no matter where the data comes from
+ */
+@ConfigurationBean(uri = ExternalToolActivity.URI + "#AbstractScriptInput")
+public abstract class ScriptInput {
+	/**
+	 * This input can be referenced under the name 'tag'.
+	 */
+	private String tag = null;
+	/**
+	 * In most cases, the data will be stored under a specific
+	 * filename.
+	 */
+	private boolean file = false;
+	/**
+	 * Set, if the name of the file to be executed is not
+	 * explicitly set but prepared by some automatism and referenced
+	 * via the tagging principle.
+	 */
+	private boolean tempFile = false;
+	/**
+	 * True if (!) the data is binary. (Text otherwise)
+	 */
+	private boolean binary = false;
+
+	private String charsetName = Charset.defaultCharset().name();
+	private boolean forceCopy = false;
+
+	/**
+	 * @return the tag
+	 */
+	public final String getTag() {
+		return tag;
+	}
+	/**
+	 * @param tag the tag to set
+	 */
+	@ConfigurationProperty(name = "tag", label = "Tag")
+	public final void setTag(String tag) {
+		this.tag = tag;
+	}
+	/**
+	 * @return the file
+	 */
+	public final boolean isFile() {
+		return file;
+	}
+	/**
+	 * @param file the file to set
+	 */
+	@ConfigurationProperty(name = "file", label = "File")
+	public final void setFile(boolean file) {
+		this.file = file;
+	}
+	/**
+	 * @return the tempFile
+	 */
+	public final boolean isTempFile() {
+		return tempFile;
+	}
+	/**
+	 * @param tempFile the tempFile to set
+	 */
+	@ConfigurationProperty(name = "tempFile", label = "Temporary File")
+	public final void setTempFile(boolean tempFile) {
+		this.tempFile = tempFile;
+	}
+	/**
+	 * @return the binary
+	 */
+	public final boolean isBinary() {
+		return binary;
+	}
+	/**
+	 * @param binary the binary to set
+	 */
+	@ConfigurationProperty(name = "binary", label = "Binary")
+	public final void setBinary(boolean binary) {
+		this.binary = binary;
+	}
+
+	public String getCharsetName() {
+		return this.charsetName;
+	}
+	/**
+	 * @param charsetName the charsetName to set
+	 */
+	@ConfigurationProperty(name = "charsetName", label = "Chararter Set")
+	public void setCharsetName(String charsetName) {
+		this.charsetName = charsetName;
+	}
+
+	@ConfigurationProperty(name = "forceCopy", label = "Force Copy")
+	public final void setForceCopy(boolean forceCopy) {
+		this.forceCopy = forceCopy;
+
+	}
+	/**
+	 * @return the forceCopy
+	 */
+	public boolean isForceCopy() {
+		return forceCopy;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptInputStatic.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptInputStatic.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptInputStatic.java
new file mode 100644
index 0000000..78b6c3b
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptInputStatic.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.desc;
+
+import org.apache.taverna.activities.externaltool.ExternalToolActivity;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationBean;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty;
+
+/**
+ * This subclass of script input is used to manage static content
+ * which is embedded into the use case description.
+ */
+@ConfigurationBean(uri = ExternalToolActivity.URI + "#ScriptInputStatic")
+public class ScriptInputStatic extends ScriptInput {
+
+	public ScriptInputStatic() {
+	}
+
+	private String url = null;  //if this is set, load content from remote URL
+	private String content = null;
+
+	@Override
+	public String toString() {
+		return "InputStatic[tag: " +
+			getTag() + (isFile() ? ", file" : "") + (isTempFile() ? ", tempfile" : "") + (isBinary() ? ", binary" : "") + ", content: " + content + "]";
+	}
+
+	/**
+	 * @return the url
+	 */
+	public final String getUrl() {
+		return url;
+	}
+
+	/**
+	 * @param url the url to set
+	 */
+	@ConfigurationProperty(name = "url", label = "URL", required=false)
+	public final void setUrl(String url) {
+		this.url = url;
+	}
+
+	/**
+	 * @return the content
+	 */
+	public final String getContent() {
+		return content;
+	}
+
+	/**
+	 * @param content the content to set
+	 */
+	@ConfigurationProperty(name = "content", label = "Content", required=false)
+	public final void setContent(String content) {
+		this.content = content;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptInputUser.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptInputUser.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptInputUser.java
new file mode 100644
index 0000000..a74bb5d
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptInputUser.java
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.desc;
+import java.util.ArrayList;
+
+import org.apache.taverna.activities.externaltool.ExternalToolActivity;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationBean;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty;
+
+/**
+ * Internal description of output
+ */
+@ConfigurationBean(uri = ExternalToolActivity.URI + "#ScriptInput")
+public class ScriptInputUser extends ScriptInput {
+
+	/**
+	 * This input may be fed from multiple ouputs.
+	 */
+	private boolean list = false;
+	/**
+	 * True if the data from a list input in taverna is concatenated into one single input file.
+	 */
+	private boolean concatenate = false;
+
+	private ArrayList<String> mime = new ArrayList<String>();
+
+	@Override
+	public String toString() {
+		return "Input[tag: " + getTag() + (isFile() ? ", file" : "")
+				+ (isTempFile() ? ", tempfile" : "")
+				+ (isBinary() ? ", binary" : "") + (list ? ", list" : "")
+				+ (concatenate ? ", concatenate" : "")
+				+ " mime: " + mime.toString() + "]";
+	}
+
+	/**
+	 * @return the list
+	 */
+	public final boolean isList() {
+		return list;
+	}
+
+	/**
+	 * @param list the list to set
+	 */
+	@ConfigurationProperty(name = "list", label = "List")
+	public final void setList(boolean list) {
+		this.list = list;
+	}
+
+	/**
+	 * @return the concatenate
+	 */
+	public final boolean isConcatenate() {
+		return concatenate;
+	}
+
+	/**
+	 * @param concatenate the concatenate to set
+	 */
+	@ConfigurationProperty(name = "concatenate", label = "Concatenate")
+	public final void setConcatenate(boolean concatenate) {
+		this.concatenate = concatenate;
+	}
+
+	/**
+	 * @return the mime
+	 */
+	public final ArrayList<String> getMime() {
+		if (mime == null) {
+			mime = new ArrayList<String>();
+		}
+		return mime;
+	}
+
+	/**
+	 * @param mime the mime to set
+	 */
+	@ConfigurationProperty(name = "mime", label = "Mime Types", required=false)
+	public final void setMime(ArrayList<String> mime) {
+		this.mime = mime;
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptOutput.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptOutput.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptOutput.java
new file mode 100644
index 0000000..77bbc83
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/ScriptOutput.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.desc;
+import java.util.ArrayList;
+
+import org.apache.taverna.activities.externaltool.ExternalToolActivity;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationBean;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty;
+
+/**
+ * Internal description of input
+ */
+@ConfigurationBean(uri = ExternalToolActivity.URI + "#ScriptOutput")
+public class ScriptOutput {
+	private String path;
+	private boolean binary;
+	private ArrayList<String> mime = new ArrayList<String>();
+
+	@Override
+	public String toString() {
+		return "Output[path: " + path + (binary ? ", binary" : "")
+				+ " mime: " + mime.toString() + "]";
+	}
+
+	/**
+	 * @return the path
+	 */
+	public final String getPath() {
+		return path;
+	}
+
+	/**
+	 * @param path the path to set
+	 */
+	@ConfigurationProperty(name = "path", label = "Path")
+	public final void setPath(String path) {
+		this.path = path;
+	}
+
+	/**
+	 * @return the binary
+	 */
+	public final boolean isBinary() {
+		return binary;
+	}
+
+	/**
+	 * @param binary the binary to set
+	 */
+	@ConfigurationProperty(name = "binary", label = "Binary")
+	public final void setBinary(boolean binary) {
+		this.binary = binary;
+	}
+
+	/**
+	 * @return the mime
+	 */
+	public final ArrayList<String> getMime() {
+		if (mime == null) {
+			mime = new ArrayList<String>();
+		}
+		return mime;
+	}
+
+	/**
+	 * @param mime the mime to set
+	 */
+	@ConfigurationProperty(name = "mime", label = "Mime Types", required=false)
+	public final void setMime(ArrayList<String> mime) {
+		this.mime = mime;
+	}
+};

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseDescription.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseDescription.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseDescription.java
new file mode 100644
index 0000000..934330f
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseDescription.java
@@ -0,0 +1,897 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.desc;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+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 java.util.Set;
+
+import javax.swing.ImageIcon;
+
+import org.apache.taverna.activities.externaltool.ExternalToolActivity;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationBean;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty.OrderPolicy;
+import org.apache.taverna.workflowmodel.serialization.DeserializationException;
+import org.apache.taverna.workflowmodel.utils.Tools;
+
+import org.apache.log4j.Logger;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.SAXBuilder;
+
+import org.apache.commons.lang.StringUtils;
+
+/**
+ * Class representation of XML-description of UseCases
+ */
+@ConfigurationBean(uri = ExternalToolActivity.URI + "#ToolDescription")
+public class UseCaseDescription {
+
+	private static Logger logger = Logger.getLogger(UseCaseDescription.class);
+
+	/**
+	 * Identifier for the retrieval of this UseCase in the sharedRepository
+	 * database, respectively its XML export.
+	 */
+	private String usecaseid = "";
+	/**
+	 * Workflow Elements now can get a group identifier. There may be subgroups
+	 * divided by :
+	 */
+	private String group = "";
+	/**
+	 * Textual description of the use case itself. This description is very
+	 * short to fit on the single line that is prepared for such descriptions in
+	 * the Taverna workflow element list.
+	 */
+	private String description = "";
+	/**
+	 * What is actually executed on the shell.
+	 */
+	private String command = "";
+
+	/**
+	 * Accessor function of command
+	 *
+	 * @return shell-executable series of commands
+	 */
+	public String getCommand() {
+		if (null == command) {
+			// FIXME: Is this possible?
+			return "";
+		} else {
+			return command;
+		}
+	}
+
+	/**
+	 * Routine that may be executed as a first check if the program is indeed
+	 * installed.
+	 */
+	private String test_local = null;
+
+	/**
+	 * URL of an icon that would help users to recognise the use case
+	 */
+	private String icon_url = null;
+
+	private int preparingTimeoutInSeconds = 20 * 60; // 20 minutes
+	private int executionTimeoutInSeconds = 30 * 60; // 30 minutes
+
+	private List<String> tags = new ArrayList<String>();
+	private List<RuntimeEnvironmentConstraint> REs = new ArrayList<RuntimeEnvironmentConstraint>();
+	private ArrayList<String> queue_preferred = new ArrayList<String>();
+	private ArrayList<String> queue_deny = new ArrayList<String>();
+
+	private List<ScriptInputStatic> static_inputs = new ArrayList<ScriptInputStatic>();
+	private Map<String, ScriptInput> inputs = new HashMap<String, ScriptInput>();
+	private Map<String, ScriptOutput> outputs = new HashMap<String, ScriptOutput>();
+
+	private boolean includeStdIn = false;
+	private boolean includeStdOut = true;
+	private boolean includeStdErr = true;
+
+	private List<Integer> validReturnCodes = new ArrayList<Integer>();
+	
+	/**
+	 * Default constructor to make xstream happy
+	 */
+	public UseCaseDescription() {
+		
+	}
+
+	/**
+	 * Constructor, for special purpose usecases.
+	 *
+	 * @param usecaseid
+	 */
+	public UseCaseDescription(String usecaseid) {
+		this.setUsecaseid(usecaseid);
+	}
+
+	/**
+	 * Constructor, expects an input stream containing the xml. for example, use
+	 * getClass().getClassLoader().getResourceAsStream("..") to load a usecase
+	 * from your program jar
+	 */
+	public UseCaseDescription(InputStream programAsStream) throws DeserializationException {
+		SAXBuilder builder = new SAXBuilder();
+		Document doc;
+		try {
+			doc = builder.build(programAsStream);
+			programAsStream.close();
+		} catch (JDOMException e) {
+			throw new DeserializationException("Error deserializing usecase", e);
+		} catch (IOException e) {
+			throw new DeserializationException("Error deserializing usecase", e);
+		}
+		readFromXmlElement(doc.getRootElement());
+	}
+
+	/**
+	 * Constructor, expects an XML-root to dissect.
+	 */
+	public UseCaseDescription(Element programNode) throws DeserializationException {
+		readFromXmlElement(programNode);
+	}
+
+/**
+ * Produce an XML description of the UseCaseDescription
+ */
+	public Element writeToXMLElement() {
+		Element programNode = new Element("program");
+		programNode.setAttribute("name", getUsecaseid());
+		programNode.setAttribute("description", getDescription());
+		// Always use element version of command
+//		programNode.setAttribute("command", getCommand());
+		Element commandNode = new Element("command");
+		commandNode.addContent(getCommand());
+		programNode.addContent(commandNode);
+		programNode.setAttribute("timeout", Integer.toString(getExecutionTimeoutInSeconds()));
+		programNode.setAttribute("preparing_timeout", Integer.toString(getPreparingTimeoutInSeconds()));
+		programNode.setAttribute("includeStdIn", Boolean.toString(isIncludeStdIn()));
+		programNode.setAttribute("includeStdOut", Boolean.toString(isIncludeStdOut()));
+		programNode.setAttribute("includeStdErr", Boolean.toString(isIncludeStdErr()));
+		for (ScriptInputStatic si : getStatic_inputs()) {
+			Element staticNode = new Element("static");
+			if (si.isBinary()) {
+				staticNode.setAttribute("binary", "true");
+			}
+			if (si.isForceCopy()) {
+				staticNode.setAttribute("forceCopy", "true");
+			}
+			if (si.isFile()) {
+				Element fileNode = new Element("file");
+				fileNode.setAttribute("path", si.getTag());
+				staticNode.addContent(fileNode);
+			} else if (si.isTempFile()) {
+				Element tempfileNode = new Element("tempfile");
+				tempfileNode.setAttribute("tag", si.getTag());
+				staticNode.addContent(tempfileNode);
+			} else {
+				Element replaceNode = new Element("replace");
+				replaceNode.setAttribute("tag", si.getTag());
+				staticNode.addContent(replaceNode);
+			}
+			if (si.getUrl() != null) {
+				Element contentNode = new Element("content");
+				contentNode.setAttribute("url", si.getUrl());
+				staticNode.addContent(contentNode);
+			} else {
+				Element contentNode = new Element("content");
+				contentNode.addContent((String) si.getContent());
+				staticNode.addContent(contentNode);
+			}
+			programNode.addContent(staticNode);
+		}
+		for (Entry<String, ScriptInput> entry : getInputs().entrySet()) {
+			String name = entry.getKey();
+			ScriptInputUser si = (ScriptInputUser) entry.getValue();
+			Element inputNode = new Element("input");
+			inputNode.setAttribute("name", name);
+			if (si.isBinary()) {
+				inputNode.setAttribute("binary", "true");
+			}
+			if (si.isForceCopy()) {
+				inputNode.setAttribute("forceCopy", "true");
+			}
+			if (si.isConcatenate()) {
+				inputNode.setAttribute("concatenate", "true");
+			}
+			if (si.isList()) {
+				inputNode.setAttribute("list", "true");
+			}
+			if (si.isFile()) {
+				Element fileNode = new Element("file");
+				fileNode.setAttribute("path", si.getTag());
+				inputNode.addContent(fileNode);
+			} else if (si.isTempFile()) {
+				Element tempfileNode = new Element("tempfile");
+				tempfileNode.setAttribute("tag", si.getTag());
+				inputNode.addContent(tempfileNode);
+			} else {
+				Element replaceNode = new Element("replace");
+				replaceNode.setAttribute("tag", si.getTag());
+				inputNode.addContent(replaceNode);
+			}
+			for (String mime : si.getMime()) {
+				Element mimeNode = new Element("mime");
+				mimeNode.setAttribute("type", mime);
+				inputNode.addContent(mimeNode);
+			}
+			programNode.addContent(inputNode);
+		}
+		for (Entry<String, ScriptOutput> entry : getOutputs().entrySet()) {
+			String name = entry.getKey();
+			ScriptOutput so = entry.getValue();
+			Element outputNode = new Element("output");
+			outputNode.setAttribute("name", name);
+			if (so.isBinary()) {
+				outputNode.setAttribute("binary", "true");
+			}
+			Element fromfileNode = new Element("fromfile");
+			fromfileNode.setAttribute("path", so.getPath());
+			outputNode.addContent(fromfileNode);
+			for (String mime : so.getMime()) {
+				Element mimeNode = new Element("mime");
+				mimeNode.setAttribute("type", mime);
+				outputNode.addContent(mimeNode);
+			}
+			programNode.addContent(outputNode);
+		}
+		for (RuntimeEnvironmentConstraint rec : getREs()) {
+			Element rteNode = new Element("rte");
+			rteNode.setAttribute("name", rec.getID());
+			rteNode.setAttribute("relation", rec.getRelation());
+			programNode.addContent(rteNode);
+		}
+		if ((group != null) && !group.isEmpty()) {
+			Element groupNode = new Element("group");
+			groupNode.setAttribute("name", group);
+			programNode.addContent(groupNode);
+		}
+		if ((test_local != null) && !test_local.isEmpty()) {
+			Element testNode = new Element("test");
+			testNode.setAttribute("local", test_local);
+			programNode.addContent(testNode);
+		}
+		if ((icon_url != null) && !icon_url.isEmpty()) {
+			Element iconNode = new Element("icon");
+			iconNode.setAttribute("url", icon_url);
+			programNode.addContent(iconNode);
+		}
+		if (!getQueue_preferred().isEmpty() || !getQueue_deny().isEmpty()) {
+			Element queueNode = new Element("queue");
+			for (String url : getQueue_preferred()) {
+				Element preferredNode = new Element("prefer");
+				preferredNode.setAttribute("url", url);
+				queueNode.addContent(preferredNode);
+			}
+			for (String url : getQueue_deny()) {
+				Element denyNode = new Element("deny");
+				denyNode.setAttribute("url", url);
+				queueNode.addContent(denyNode);
+			}
+			programNode.addContent(queueNode);
+		}
+			Element validReturnCodesNode = new Element("validReturnCodes");
+			validReturnCodesNode.setAttribute("codes", getReturnCodesAsText());
+			programNode.addContent(validReturnCodesNode);
+
+		return programNode;
+	}
+	/**
+	 * Specifies the UseCaseDescription from the root of an XML description
+	 * which is accessible online.
+	 *
+	 * @param programNode
+	 * @throws DeserializationException
+	 */
+	private void readFromXmlElement(Element programNode) throws DeserializationException {
+		if (programNode.getName().compareToIgnoreCase("program") != 0)
+			throw new DeserializationException("Expected <program>, read '" + programNode.getName() + "'");
+
+		setUsecaseid(programNode.getAttributeValue("name"));
+		setDescription(programNode.getAttributeValue("description"));
+		setCommand(programNode.getAttributeValue("command"));
+		String timeoutStr = programNode.getAttributeValue("timeout");
+		if (timeoutStr != null)
+			setExecutionTimeoutInSeconds(Integer.parseInt(timeoutStr));
+		timeoutStr = programNode.getAttributeValue("preparing_timeout");
+		if (timeoutStr != null)
+			setPreparingTimeoutInSeconds(Integer.parseInt(timeoutStr));
+
+		String includeStdInStr = programNode.getAttributeValue("includeStdIn");
+		if (includeStdInStr != null && !includeStdInStr.isEmpty()) {
+			setIncludeStdIn(includeStdInStr.equals("true"));
+		}
+
+		String includeStdOutStr = programNode.getAttributeValue("includeStdOut");
+		if (includeStdOutStr != null && !includeStdOutStr.isEmpty()) {
+			setIncludeStdOut(includeStdOutStr.equals("true"));
+		}
+
+		String includeStdErrStr = programNode.getAttributeValue("includeStdErr");
+		if (includeStdErrStr != null && !includeStdErrStr.isEmpty()) {
+			setIncludeStdErr(includeStdErrStr.equals("true"));
+		}
+
+		for (Object cur_ob : programNode.getChildren()) {
+			Element cur = (Element) cur_ob;
+
+			String name = cur.getAttributeValue("name");
+
+			String type = cur.getName();
+			boolean binary = false;
+			if (null != cur.getAttributeValue("binary") && cur.getAttributeValue("binary").equalsIgnoreCase("true")) {
+				binary = true;
+			}
+			boolean list = false;
+			if (null != cur.getAttributeValue("list") && cur.getAttributeValue("list").equalsIgnoreCase("true")) {
+				list = true;
+			}
+			boolean concatenate = false;
+			if (null != cur.getAttributeValue("concatenate") && cur.getAttributeValue("concatenate").equalsIgnoreCase("true")) {
+				concatenate = true;
+			}
+			boolean forceCopy = false;
+			if (null != cur.getAttributeValue("forceCopy") && cur.getAttributeValue("forceCopy").equalsIgnoreCase("true")) {
+				forceCopy = true;
+			}
+
+			Element inner = null;
+			String innerType = null, tag = null, path = null;
+			if (cur.getChildren().size() > 0) {
+				inner = (Element) cur.getChildren().get(0);
+				innerType = inner.getName();
+				tag = inner.getAttributeValue("tag");
+				path = inner.getAttributeValue("path");
+			}
+			// build mime type declaration list
+			ArrayList<String> mime = new ArrayList<String>();
+			for (Object child : cur.getChildren()) {
+				Element curChild = (Element) child;
+				if (curChild.getName().equalsIgnoreCase("mime")) {
+					mime.add(curChild.getAttributeValue("type"));
+				}
+			}
+			if (type.equalsIgnoreCase("static")) {
+				ScriptInputStatic si = new ScriptInputStatic();
+				Element content = cur.getChild("content");
+				if (content == null)
+					throw new DeserializationException("FIXME: script tag without embedded content tag");
+				si.setUrl(content.getAttributeValue("url"));
+				if (si.getUrl() == null)
+					si.setContent(content.getText());
+				fillInputDescription(si, binary, forceCopy, innerType, tag, path);
+				getStatic_inputs().add(si);
+			} else if (type.equalsIgnoreCase("input")) {
+				ScriptInputUser indesc = new ScriptInputUser();
+				indesc.setList(list);
+				indesc.setMime(mime);
+				indesc.setConcatenate(concatenate);
+				fillInputDescription(indesc, binary, forceCopy, innerType, tag, path);
+				getInputs().put(Tools.sanitiseName(name), indesc);
+			} else if (type.equalsIgnoreCase("output")) {
+				ScriptOutput outdesc = new ScriptOutput();
+				outdesc.setMime(mime);
+
+				boolean ok = true;
+				if (null == innerType) {
+					// don't know what to do
+					throw new DeserializationException("FIXME: Found null == innerType for output, is this the bug?");
+				} else if (innerType.equalsIgnoreCase("fromfile")) {
+					outdesc.setPath(path);
+					outdesc.setBinary(binary);
+				} else {
+					throw new DeserializationException("Problem reading output port: unknown innerType '" + innerType + "'");
+				}
+				if (ok) {
+					getOutputs().put(Tools.sanitiseName(name), outdesc);
+				}
+			} else if (type.equalsIgnoreCase("rte") || type.equalsIgnoreCase("re")) {
+				getREs().add(new RuntimeEnvironmentConstraint(name, cur.getAttributeValue("relation")));
+			} else if (type.equalsIgnoreCase("group")) {
+				group = name;
+			} else if (type.equalsIgnoreCase("test")) {
+				test_local = cur.getAttributeValue("local");
+			} else if (type.equalsIgnoreCase("icon")) {
+				icon_url = cur.getAttributeValue("url");
+			} else if (type.equalsIgnoreCase("queue")) {
+				for (Object child_ob : cur.getChildren()) {
+					Element child = (Element) child_ob;
+					if (child.getName().equalsIgnoreCase("prefer"))
+						getQueue_preferred().add(child.getAttributeValue("url"));
+					else if (child.getName().equalsIgnoreCase("deny"))
+						getQueue_deny().add(child.getAttributeValue("url"));
+					else
+						throw new DeserializationException("Error while reading usecase " + this.getUsecaseid() + ": invalid queue entry");
+				}
+			} else if (type.equalsIgnoreCase("command")) {
+				// i like to have the ability to inject complete shell script
+				// fragments into the use case,
+				// so this should be replace and should allow multiple lines
+				if ((getCommand() != null) && !getCommand().isEmpty()) {
+					throw new DeserializationException("You have specified both command attribute and command tag.");
+				}
+				setCommand(cur.getText());
+			} else if (type.equalsIgnoreCase("validReturnCodes")) {
+					String codeString = cur.getAttributeValue("codes");
+					if (codeString != null) {
+						setReturnCodesAsText(codeString);
+					}
+			}
+			else {
+				throw new DeserializationException("Unexpected and uninterpreted attribute " + type);
+			}
+		}
+	}
+
+	private void fillInputDescription(ScriptInput fillMe, boolean binary, boolean forceCopy, String innerType, String tag, String path) throws DeserializationException {
+		fillMe.setBinary(binary);
+		fillMe.setForceCopy(forceCopy);
+		if (null == innerType) {
+			// don't know what to do
+			throw new DeserializationException("FIXME: Found null == innerType for input, is this the bug?");
+		} else if (innerType.equalsIgnoreCase("replace")) {
+			fillMe.setTag(tag);
+			fillMe.setTempFile(false);
+			fillMe.setFile(false);
+			getTags().add(tag);
+		} else if (innerType.equalsIgnoreCase("tempfile")) {
+			fillMe.setTag(tag);
+			fillMe.setTempFile(true);
+			fillMe.setFile(false);
+			getTags().add(tag);
+		} else if (innerType.equalsIgnoreCase("file")) {
+			fillMe.setTag(path);
+			fillMe.setTempFile(false);
+			fillMe.setFile(true);
+		} else {
+			throw new DeserializationException("Problem reading input port: unknown innerType '" + innerType + "'");
+		}
+	}
+
+	/**
+	 * returns icon that is referenced in use case description
+	 */
+	public ImageIcon getImageIcon() {
+		if (null == icon_url) return null;
+		try {
+			URL u = new URL(icon_url);
+			return new ImageIcon(u, getUsecaseid());
+		} catch (Exception e) {
+			logger.error(e);
+			return null;
+		}
+	}
+
+	/**
+	 * String representation of the use case. It also contains interesting
+	 * information on the availability of resources in the grid to actually
+	 * execute that workflow element.
+	 *
+	 * @return String
+	 */
+	@Override
+	public String toString() {
+		List<String> hlp = new ArrayList<String>();
+		hlp.add("usecaseid: " + getUsecaseid());
+		hlp.add("description: " + getDescription());
+		hlp.add("group: " + group);
+		hlp.add("test: " + test_local);
+		hlp.add("tags: " + getTags());
+		for (Map.Entry<String, ScriptInput> cur : getInputs().entrySet()) {
+			hlp.add(">" + cur.getKey() + ">: " + cur.getValue().toString());
+		}
+		for (Map.Entry<String, ScriptOutput> cur : getOutputs().entrySet()) {
+			hlp.add("<" + cur.getKey() + "<: " + cur.getValue().toString());
+		}
+		hlp.add("RE: " + getREs().toString());
+		hlp.add("preferred queues: " + getQueue_preferred());
+		hlp.add("denied queues: " + getQueue_deny());
+		String tos = super.toString() + "[";
+		for (int i = 0; i < hlp.size(); i++) {
+			if (i != 0)
+				tos += ", ";
+			tos += hlp.get(i);
+		}
+		return tos + " ]";
+	}
+
+	/**
+	 * hajo's test just pass an url or file url to an xml file
+	 *
+	 * @throws IOException
+	 * @throws MalformedURLException
+	 * @throws DeserializationException
+	 */
+	public static void main(String[] argv) throws MalformedURLException, IOException, DeserializationException {
+		UseCaseDescription d = new UseCaseDescription(new URL(argv[0]).openStream());
+		logger.info(d.getCommand());
+	}
+
+	/**
+	 * @param command the command to set
+	 */
+	@ConfigurationProperty(name = "command", label = "Command", description="What is actually executed on the shell")
+	public void setCommand(String command) {
+		this.command = command;
+	}
+
+	/**
+	 * @param description the description to set
+	 */
+	@ConfigurationProperty(name = "description", label = "Description", description="Textual description of the tool", required=false, uri="http://purl.org/dc/elements/1.1/description")
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	/**
+	 * @return the description
+	 */
+	public String getDescription() {
+		return description;
+	}
+
+	/**
+	 * @param executionTimeoutInSeconds the executionTimeoutInSeconds to set
+	 */
+	@ConfigurationProperty(name = "executionTimeoutInSeconds", label = "Execution Timeout In Seconds")
+	public void setExecutionTimeoutInSeconds(int executionTimeoutInSeconds) {
+		this.executionTimeoutInSeconds = executionTimeoutInSeconds;
+	}
+
+	/**
+	 * @return the executionTimeoutInSeconds
+	 */
+	public int getExecutionTimeoutInSeconds() {
+		return executionTimeoutInSeconds;
+	}
+
+	/**
+	 * @param inputs the inputs to set
+	 */
+	public void setInputs(Map<String, ScriptInput> inputs) {
+		this.inputs = inputs;
+	}
+
+	@ConfigurationProperty(name = "inputs", label = "Inputs", required=false)
+	public void setInputs(Set<InputMap> inputs) {
+		if (inputs != null) {
+			this.inputs = new HashMap<String, ScriptInput>();
+			for (InputMap inputMap : inputs) {
+				this.inputs.put(inputMap.getPort(), inputMap.getInput());
+			}
+		} else {
+			this.inputs = null;
+		}
+	}
+
+	/**
+	 * @return the inputs
+	 */
+	public Map<String, ScriptInput> getInputs() {
+		if (inputs == null) {
+			inputs = new HashMap<String, ScriptInput>();
+		}
+		return inputs;
+	}
+
+	/**
+	 * @param outputs the outputs to set
+	 */
+	public void setOutputs(Map<String, ScriptOutput> outputs) {
+		this.outputs = outputs;
+	}
+
+	@ConfigurationProperty(name = "outputs", label = "Outputs", required=false)
+	public void setOutputs(Set<OutputMap> outputs) {
+		if (outputs != null) {
+			this.outputs = new HashMap<String, ScriptOutput>();
+			for (OutputMap outputMap : outputs) {
+				this.outputs.put(outputMap.getPort(), outputMap.getOutput());
+			}
+		} else {
+			this.outputs = null;
+		}
+	}
+
+	/**
+	 * @return the outputs
+	 */
+	public Map<String, ScriptOutput> getOutputs() {
+		if (outputs == null) {
+			outputs = new HashMap<String, ScriptOutput>();
+		}
+		return outputs;
+	}
+
+	/**
+	 * @param preparingTimeoutInSeconds the preparingTimeoutInSeconds to set
+	 */
+	@ConfigurationProperty(name = "preparingTimeoutInSeconds", label = "Preparing Timeout In Seconds")
+	public void setPreparingTimeoutInSeconds(int preparingTimeoutInSeconds) {
+		this.preparingTimeoutInSeconds = preparingTimeoutInSeconds;
+	}
+
+	/**
+	 * @return the preparingTimeoutInSeconds
+	 */
+	public int getPreparingTimeoutInSeconds() {
+		return preparingTimeoutInSeconds;
+	}
+
+	/**
+	 * @param queue_deny the queue_deny to set
+	 */
+	public void setQueue_deny(ArrayList<String> queue_deny) {
+		this.queue_deny = queue_deny;
+	}
+
+	/**
+	 * @return the queue_deny
+	 */
+	public ArrayList<String> getQueue_deny() {
+		if (queue_deny == null) {
+			queue_deny = new ArrayList<String>();
+		}
+		return queue_deny;
+	}
+
+	/**
+	 * @param queue_preferred the queue_preferred to set
+	 */
+	public void setQueue_preferred(ArrayList<String> queue_preferred) {
+		this.queue_preferred = queue_preferred;
+	}
+
+	/**
+	 * @return the queue_preferred
+	 */
+	public ArrayList<String> getQueue_preferred() {
+		if (queue_preferred == null) {
+			queue_preferred = new ArrayList<String>();
+		}
+		return queue_preferred;
+	}
+
+	/**
+	 * @param rEs the rEs to set
+	 */
+	public void setREs(List<RuntimeEnvironmentConstraint> rEs) {
+		REs = rEs;
+	}
+
+	/**
+	 * @return the rEs
+	 */
+	public List<RuntimeEnvironmentConstraint> getREs() {
+		if (REs == null) {
+			REs = new ArrayList<RuntimeEnvironmentConstraint>();
+		}
+		return REs;
+	}
+
+	/**
+	 * @param static_inputs the static_inputs to set
+	 */
+	@ConfigurationProperty(name = "staticInputs", label = "Static Inputs", ordering=OrderPolicy.NON_ORDERED, required=false)
+	public void setStatic_inputs(List<ScriptInputStatic> static_inputs) {
+		this.static_inputs = static_inputs;
+	}
+
+	/**
+	 * @return the static_inputs
+	 */
+	public List<ScriptInputStatic> getStatic_inputs() {
+		if (static_inputs == null) {
+			static_inputs = new ArrayList<ScriptInputStatic>();
+		}
+		return static_inputs;
+	}
+
+	/**
+	 * @param tags the tags to set
+	 */
+	public void setTags(List<String> tags) {
+		this.tags = tags;
+	}
+
+	/**
+	 * @return the tags
+	 */
+	public List<String> getTags() {
+		if (tags == null) {
+			tags = new ArrayList<String>();
+		}
+		return tags;
+	}
+
+	/**
+	 * @param usecaseid the usecaseid to set
+	 */
+	@ConfigurationProperty(name = "usecaseid", label = "Title", uri="http://purl.org/dc/elements/1.1/title", required=false)
+	public void setUsecaseid(String usecaseid) {
+		this.usecaseid = usecaseid;
+	}
+
+	/**
+	 * @return the usecaseid
+	 */
+	public String getUsecaseid() {
+		return usecaseid;
+	}
+
+	public boolean isIncludeStdIn() {
+		return includeStdIn;
+	}
+
+	@ConfigurationProperty(name = "includeStdIn", label = "Include STDIN")
+	public void setIncludeStdIn(boolean includeStdIn) {
+		this.includeStdIn = includeStdIn;
+	}
+
+	public boolean isIncludeStdOut() {
+		return includeStdOut;
+	}
+
+	@ConfigurationProperty(name = "includeStdOut", label = "Include STDOUT")
+	public void setIncludeStdOut(boolean includeStdOut) {
+		this.includeStdOut = includeStdOut;
+	}
+
+	public boolean isIncludeStdErr() {
+		return includeStdErr;
+	}
+
+	@ConfigurationProperty(name = "includeStdErr", label = "Include STDERR")
+	public void setIncludeStdErr(boolean includeStdErr) {
+		this.includeStdErr = includeStdErr;
+	}
+
+	/**
+	 * @return the validReturnCodes
+	 */
+	public List<Integer> getValidReturnCodes() {
+		if (validReturnCodes == null) {
+			validReturnCodes = new ArrayList<Integer>();
+		}
+		if (validReturnCodes.isEmpty()) {
+			validReturnCodes.add(0);
+		}
+		return validReturnCodes;
+	}
+
+	/**
+	 * @param validReturnCodes the validReturnCodes to set
+	 */
+	public void setValidReturnCodes(List<Integer> validReturnCodes) {
+		this.validReturnCodes = validReturnCodes;
+	}
+
+	public String getReturnCodesAsText() {
+		return StringUtils.join(getValidReturnCodes(), ",");
+	}
+
+	public void setReturnCodesAsText(String text) {
+		if (getValidReturnCodes() == null) {
+			validReturnCodes = new ArrayList<Integer>();
+		}
+		validReturnCodes.clear();
+		String[] codes = text.split(",");
+		for (String code : codes) {
+			try {
+				Integer codeInt = new Integer(code);
+				if (!validReturnCodes.contains(codeInt)) {
+					validReturnCodes.add(codeInt);
+				}
+			}
+			catch (NumberFormatException e) {
+				logger.error(e);
+			}
+		}
+		if (validReturnCodes.isEmpty()) {
+			validReturnCodes.add(0);
+		}
+		Collections.sort(validReturnCodes);
+	}
+
+	/**
+	 * @return the group
+	 */
+	public String getGroup() {
+		return group;
+	}
+
+	/**
+	 * @param group the group to set
+	 */
+	public void setGroup(String group) {
+		this.group = group;
+	}
+
+	/**
+	 * @return the icon_url
+	 */
+	public String getIcon_url() {
+		return icon_url;
+	}
+
+	@ConfigurationBean(uri = ExternalToolActivity.URI + "#OutputMap")
+	public static class OutputMap {
+		private String port;
+
+		private ScriptOutput output;
+
+		public String getPort() {
+			return port;
+		}
+
+		@ConfigurationProperty(name = "port", label = "Port")
+		public void setPort(String port) {
+			this.port = port;
+		}
+
+		public ScriptOutput getOutput() {
+			return output;
+		}
+
+		@ConfigurationProperty(name = "output", label = "Output")
+		public void setOutput(ScriptOutput output) {
+			this.output = output;
+		}
+	}
+
+	@ConfigurationBean(uri = ExternalToolActivity.URI + "#InputMap")
+	public static class InputMap {
+		private String port;
+
+		private ScriptInputUser input;
+
+		public String getPort() {
+			return port;
+		}
+
+		@ConfigurationProperty(name = "port", label = "Port")
+		public void setPort(String port) {
+			this.port = port;
+		}
+
+		public ScriptInputUser getInput() {
+			return input;
+		}
+
+		@ConfigurationProperty(name = "input", label = "Input")
+		public void setInput(ScriptInputUser input) {
+			this.input = input;
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseEnumeration.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseEnumeration.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseEnumeration.java
new file mode 100644
index 0000000..1a43461
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/desc/UseCaseEnumeration.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.desc;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.taverna.workflowmodel.serialization.DeserializationException;
+
+import org.apache.log4j.Logger;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.SAXBuilder;
+
+public class UseCaseEnumeration {
+
+	private static Logger logger = Logger.getLogger(UseCaseEnumeration.class);
+
+	public static List<UseCaseDescription> readDescriptionsFromUrl(String xmlFileUrl) throws IOException {
+
+		List<UseCaseDescription> ret = new ArrayList<UseCaseDescription>();
+		URLConnection con = null;
+		try {
+			URL url = new URL(xmlFileUrl);
+
+			con = url.openConnection();
+			con.setConnectTimeout(4000);
+			ret = readDescriptionsFromStream(con.getInputStream());
+			
+		} catch (IOException ioe) {
+			logger.error("Problem retrieving from " + xmlFileUrl);
+			logger.error(ioe);
+			throw ioe;
+		}
+		finally {
+
+		}
+
+		return ret;
+
+	}
+	
+	public static List<UseCaseDescription> readDescriptionsFromStream(InputStream is) {
+		
+		List<UseCaseDescription> ret = new ArrayList<UseCaseDescription>();
+
+		SAXBuilder builder = new SAXBuilder();
+		Document doc = null;
+		try {
+			doc = builder.build(is);
+			is.close();
+		} catch (JDOMException e1) {
+			logger.error(e1);
+			return ret;
+		} catch (IOException e1) {
+			logger.error(e1);
+			return ret;
+		} finally {
+			try {
+				is.close();
+			} catch (IOException e) {
+				logger.error(e);
+			}
+		}
+
+		Element usecases = doc.getRootElement();
+		for (Object ochild : usecases.getChildren()) {
+			Element child = (Element) ochild;
+			if (child.getName().equalsIgnoreCase("program")) {
+					try {
+						ret.add(new UseCaseDescription(child));
+					} catch (DeserializationException e) {
+						logger.error(e);
+					}
+			}
+		}
+		return ret;
+	}
+
+	public static UseCaseDescription readDescriptionFromUrl(
+			String repositoryUrl, String id) throws IOException {
+		List<UseCaseDescription> descriptions = readDescriptionsFromUrl(repositoryUrl);
+		for (UseCaseDescription usecase : descriptions) {
+			if (usecase.getUsecaseid().equals(id)) {
+				return usecase;
+			}
+		}
+		return null;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/AskUserForPwPopup.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/AskUserForPwPopup.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/AskUserForPwPopup.java
new file mode 100644
index 0000000..9dbe959
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/AskUserForPwPopup.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.taverna.activities.externaltool.gui;
+
+import javax.swing.JOptionPane;
+
+import org.apache.taverna.activities.externaltool.invocation.AskUserForPw;
+import org.apache.taverna.activities.externaltool.ssh.SshNode;
+
+public final class AskUserForPwPopup implements AskUserForPw {
+	private SshNode ret;
+	private String pw, pp, kf, us;
+
+	public static String ask(String message, String title) {
+		return (String) JOptionPane.showInputDialog(null, message, title, JOptionPane.QUESTION_MESSAGE, null, null, "");
+	}
+
+	public static boolean askYN(String message, String title) {
+		return JOptionPane.showConfirmDialog(null, message, title, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION;
+	}
+
+	public String getPassword() {
+		getUsername();
+		if (pw != null)
+			return pw;
+		pw = ask("Please enter your password for " + us + " @ " + ret.getHost(), us + " @ " + ret.getHost());
+		return pw;
+	}
+
+	public String getPassphrase() {
+		getUsername();
+		if (pp != null)
+			return pp;
+		pp = ask("Please enter your passphrase for " + kf + " used for " + us + " @ " + ret.getHost(), us + " @ " + ret.getHost());
+		return pp;
+	}
+
+	public String getKeyfile() {
+		getUsername();
+		if (kf != null)
+			return kf;
+		kf = ask("Please enter the keyfile for " + us + " @ " + ret.getHost(), us + " @ " + ret.getHost());
+		return kf;
+	}
+
+	public String getUsername() {
+		if (us != null)
+			return us;
+		us = ask("Please enter the username for " + ret.getHost(), "Username for " + ret.getHost());
+		return us;
+	}
+
+	public void setSshNode(SshNode sshNode) {
+		this.ret = sshNode;
+	}
+
+	public void authenticationSucceeded() {
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/PleaseWaitDialog.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/PleaseWaitDialog.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/PleaseWaitDialog.java
new file mode 100755
index 0000000..9e265c8
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/gui/PleaseWaitDialog.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.gui;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+
+public class PleaseWaitDialog extends JDialog {
+	private static final long serialVersionUID = 1L;
+
+	static PleaseWaitDialog instance = new PleaseWaitDialog();
+
+	public class WaitMessage{
+		public WaitMessage() {
+		}
+		
+		String str;
+		public void set(String newstr) {
+			synchronized (PleaseWaitDialog.instance) {
+				if(this.str != null && this.str.equals(newstr)) return;
+				if(this.str != null) messages.remove(this.str);
+				this.str = newstr;
+				if(this.str != null) messages.add(this.str);
+			}
+			updateDialog();
+		}
+		public void done() {
+			set(null);
+		}
+	}
+
+	private void updateDialog() {
+		synchronized (PleaseWaitDialog.instance) {
+			if(messages.size() > 0) this.setVisible(true);
+			else this.setVisible(false);
+			String t = "";
+			for (String  cur : messages) {
+				t += cur + "<br>";
+			}
+			l.setText("<html>"+t+"</html>");
+		}
+	}
+	
+	List<String> messages = new ArrayList<String>();
+	
+	JLabel l;
+	private PleaseWaitDialog() {
+		this.setAlwaysOnTop(true);
+		this.setTitle("Please wait");
+		l = new JLabel("");
+		this.add(l);
+		this.setSize(400, 100);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/AskUserForPw.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/AskUserForPw.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/AskUserForPw.java
new file mode 100644
index 0000000..04bced0
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/AskUserForPw.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.invocation;
+
+public interface AskUserForPw {
+
+	// we will try keyfile first
+	public String getKeyfile();
+	public String getPassphrase();
+
+	// then username+password
+	public String getUsername();
+	public String getPassword();
+
+	public void authenticationSucceeded();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/InvocationException.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/InvocationException.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/InvocationException.java
new file mode 100644
index 0000000..d9f6bce
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/InvocationException.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.invocation;
+
+public class InvocationException extends Exception {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 437316164959631591L;
+
+	public InvocationException(String string) {
+		super(string);
+	}
+	
+	public InvocationException(Exception e) {
+		super(e);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/UseCaseInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/UseCaseInvocation.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/UseCaseInvocation.java
new file mode 100644
index 0000000..4d97030
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/UseCaseInvocation.java
@@ -0,0 +1,321 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.invocation;
+
+import java.io.BufferedWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.taverna.activities.externaltool.desc.ScriptInput;
+import org.apache.taverna.activities.externaltool.desc.ScriptInputStatic;
+import org.apache.taverna.activities.externaltool.desc.ScriptInputUser;
+import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.invocation.InvocationContext;
+import org.apache.taverna.reference.ExternalReferenceSPI;
+import org.apache.taverna.reference.Identified;
+import org.apache.taverna.reference.IdentifiedList;
+import org.apache.taverna.reference.ReferenceService;
+import org.apache.taverna.reference.ReferenceServiceException;
+import org.apache.taverna.reference.ReferenceSet;
+import org.apache.taverna.reference.T2Reference;
+import org.apache.taverna.reference.impl.external.object.InlineByteArrayReferenceBuilder;
+import org.apache.taverna.reference.impl.external.object.InlineStringReferenceBuilder;
+
+/**
+ * An abstraction of various forms to bring job using the software that is
+ * referenced as a use case towards their execution.
+ * 
+ * @author Hajo Nils Krabbenhoeft with some contribution by
+ * @author Steffen Moeller
+ */
+public abstract class UseCaseInvocation {
+	
+	private String runId;
+	
+	
+	protected static String getActualOsCommand(String osCommand, String pathToOriginal,
+			String targetName, String pathTarget) {
+				String actualOsCommand = osCommand;
+				actualOsCommand = actualOsCommand.replace("%%PATH_TO_ORIGINAL%%", pathToOriginal);
+				actualOsCommand = actualOsCommand.replace("%%TARGET_NAME%%", targetName);
+				actualOsCommand = actualOsCommand.replace("%%PATH_TO_TARGET%%", pathTarget);
+				return actualOsCommand;
+			}
+
+	protected UseCaseDescription usecase;
+	protected final HashMap<String, String> tags = new HashMap<String, String>();
+	protected int nTempFiles = 0;
+	private static int submissionID = 0;
+	protected static InlineByteArrayReferenceBuilder inlineByteArrayReferenceBuilder = new InlineByteArrayReferenceBuilder();
+	protected static InlineStringReferenceBuilder inlineStringReferenceBuilder = new InlineStringReferenceBuilder();
+	private InvocationContext invocationContext;
+	private boolean retrieveData;
+	
+	/*
+	 * get the class of the data we expect for a given input
+	 */
+	@SuppressWarnings("unchecked")
+	public Class getType(String inputName) {
+		if (!usecase.getInputs().containsKey(inputName))
+			return null;
+		ScriptInputUser input = (ScriptInputUser) usecase.getInputs().get(inputName);
+		if (input.isList()) {
+			if (input.isBinary())
+				return List.class;
+			else
+				return List.class;
+		} else {
+			if (input.isBinary())
+				return byte[].class;
+			else
+				return String.class;
+		}
+	}
+
+	/*
+	 * get a list of all the input port names
+	 */
+	public Set<String> getInputs() {
+		return usecase.getInputs().keySet();
+	}
+
+
+	/*
+	 * get a id, incremented with each job. thus, this should be thread-wide
+	 * unique
+	 */
+	public synchronized int getSubmissionID() {
+		return submissionID++;
+	}
+
+	/*
+	 * set the data for the input port with given name
+	 */
+	@SuppressWarnings("unchecked")
+	public void setInput(String inputName, ReferenceService referenceService, T2Reference t2Reference) throws InvocationException {
+		if (t2Reference == null) {
+			throw new InvocationException("No input specified for " + inputName);
+		}
+		ScriptInputUser input = (ScriptInputUser) usecase.getInputs().get(inputName);
+		if (input.isList()) {
+			IdentifiedList<T2Reference> listOfReferences = (IdentifiedList<T2Reference>) referenceService
+					.getListService().getList(t2Reference);
+
+			if (!input.isConcatenate()) {
+				// this is a list input (not concatenated)
+				// so write every element to its own temporary file
+				// and create a filelist file
+
+				// we need to write the list elements to temporary files
+				ScriptInputUser listElementTemp = new ScriptInputUser();
+				listElementTemp.setBinary(input.isBinary());
+				listElementTemp.setTempFile(true);
+
+				String lineEndChar = "\n";
+				if (!input.isFile() && !input.isTempFile()) {
+					lineEndChar = " ";
+				}
+
+				String listFileContent = "";
+				String filenamesFileContent = "";
+				// create a list of all temp file names
+				for (T2Reference cur : listOfReferences) {
+					String tmp = setOneInput(referenceService, cur,
+							listElementTemp);
+					listFileContent += tmp + lineEndChar;
+					int ind = tmp.lastIndexOf('/');
+					if (ind == -1) {
+						ind = tmp.lastIndexOf('\\');
+					}
+					if (ind != -1) {
+						tmp = tmp.substring(ind + 1);
+					}
+					filenamesFileContent += tmp + lineEndChar;
+				}
+
+				// how do we want the listfile to be stored?
+				ScriptInputUser listFile = new ScriptInputUser();
+				listFile.setBinary(false); // since its a list file
+				listFile.setFile(input.isFile());
+				listFile.setTempFile(input.isTempFile());
+				listFile.setTag(input.getTag());
+				T2Reference listFileContentReference = referenceService
+						.register(listFileContent, 0, true, invocationContext);
+
+				tags.put(listFile.getTag(), setOneInput(referenceService,
+						listFileContentReference, listFile));
+
+				listFile.setTag(input.getTag() + "_NAMES");
+				T2Reference filenamesFileContentReference = referenceService
+						.register(filenamesFileContent, 0, true, null);
+				tags.put(listFile.getTag(), setOneInput(referenceService,
+						filenamesFileContentReference, listFile));
+			} else {
+				try {
+					// first, concatenate all data
+					if (input.isBinary()) {
+						ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+						BufferedWriter outputWriter = new BufferedWriter(
+								new OutputStreamWriter(outputStream));
+						for (T2Reference cur : listOfReferences) {
+							InputStreamReader inputReader = new InputStreamReader(
+									getAsStream(referenceService, cur));
+							IOUtils.copyLarge(inputReader, outputWriter);
+							inputReader.close();
+						}
+						outputWriter.close();
+						T2Reference binaryReference = referenceService
+								.register(outputStream.toByteArray(), 0, true,
+										invocationContext);
+						tags.put(input.getTag(), setOneInput(referenceService,
+								binaryReference, input));
+					} else {
+						ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+						BufferedWriter outputWriter = new BufferedWriter(
+								new OutputStreamWriter(outputStream));
+						for (T2Reference cur : listOfReferences) {
+							InputStreamReader inputReader = new InputStreamReader(
+									getAsStream(referenceService, cur));
+							IOUtils.copyLarge(inputReader, outputWriter);
+							outputWriter.write(" ");
+							inputReader.close();
+						}
+						outputWriter.close();
+						T2Reference binaryReference = referenceService
+								.register(outputStream.toByteArray(), 0, true,
+										invocationContext);
+						tags.put(input.getTag(), setOneInput(referenceService,
+								binaryReference, input));
+					}
+				} catch (IOException e) {
+					throw new InvocationException(e);
+				}
+			}
+		} else {
+			tags.put(input.getTag(), setOneInput(referenceService, t2Reference,
+					input));
+		}
+	}
+
+	/*
+	 * submit a grid job and wait for it to finish, then get the result as
+	 * on-demand downloads or directly as data (in case of local execution)
+	 */
+	public HashMap<String, Object> Submit(ReferenceService referenceService) throws InvocationException {
+		submit_generate_job(referenceService);
+		return submit_wait_fetch_results(referenceService);
+	}
+
+	/*
+	 * just submit the job. useful if you want to wait for it to finish later on
+	 * 
+	 * Can the statics be made more static?
+	 */
+	public void submit_generate_job(ReferenceService referenceService) throws InvocationException {
+		for (ScriptInputStatic input : usecase.getStatic_inputs()) {
+			T2Reference ref;
+			if (input.getUrl() != null) {
+				// Does this work OK with binary
+				try {
+					ref = referenceService.register(new URL(input.getUrl()), 0, true, null);
+				} catch (ReferenceServiceException e) {
+					throw new InvocationException(e);
+				} catch (MalformedURLException e) {
+					throw new InvocationException(e);
+				}
+			} else {
+				ref = referenceService.register((String) input.getContent(), 0, true, null);
+			}
+				tags.put(input.getTag(), setOneInput(referenceService, ref, input));
+			
+		}
+		submit_generate_job_inner();
+	}
+
+	protected abstract void submit_generate_job_inner() throws InvocationException;
+
+	/*
+	 * wait for a submitted job to finish and fetch the results
+	 */
+	public abstract HashMap<String, Object> submit_wait_fetch_results(ReferenceService referenceService) throws InvocationException;
+
+	public abstract String setOneInput(ReferenceService referenceService, T2Reference t2Reference, ScriptInput input) throws InvocationException;
+
+	protected InputStream getAsStream(ReferenceService referenceService, T2Reference t2Reference) {
+		Identified identified = referenceService.resolveIdentifier(t2Reference, null, null);
+		if (identified instanceof ReferenceSet) {
+			ExternalReferenceSPI ref = ((ReferenceSet) identified).getExternalReferences().iterator().next();
+			return ref.openStream(invocationContext);
+		}
+		return null;
+	}
+
+	public void setContext(InvocationContext context) {
+		this.invocationContext = context;
+		
+	}
+	
+	public InvocationContext getContext() {
+		return this.invocationContext;
+	}
+
+	public abstract void setStdIn(ReferenceService referenceService,
+			T2Reference t2Reference);
+
+	public abstract void rememberRun(String runId);
+
+	/**
+	 * @return the runId
+	 */
+	protected String getRunId() {
+		return runId;
+	}
+
+	/**
+	 * @param runId the runId to set
+	 */
+	protected void setRunId(String runId) {
+		this.runId = runId;
+	}
+
+	/**
+	 * @return the retrieveData
+	 */
+	protected boolean isRetrieveData() {
+		return retrieveData;
+	}
+
+	/**
+	 * @param retrieveData the retrieveData to set
+	 */
+	protected void setRetrieveData(boolean retrieveData) {
+		this.retrieveData = retrieveData;
+	}
+	
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/ExternalToolLocalInvocationMechanism.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/ExternalToolLocalInvocationMechanism.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/ExternalToolLocalInvocationMechanism.java
index f846d02..e921bc4 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/ExternalToolLocalInvocationMechanism.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/ExternalToolLocalInvocationMechanism.java
@@ -24,8 +24,6 @@ import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
 import org.jdom.Element;
 import org.jdom.Text;
 
-import de.uni_luebeck.inb.knowarc.usecases.invocation.local.LocalUseCaseInvocation;
-
 /**
  * @author alanrw
  *

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
index 8c6234d..c340f0e 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
@@ -23,16 +23,14 @@ import java.io.IOException;
 import java.util.Map;
 
 import org.apache.taverna.activities.externaltool.InvocationCreator;
+import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.invocation.UseCaseInvocation;
 import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
 import org.apache.taverna.reference.ReferenceService;
 import org.apache.taverna.reference.T2Reference;
 
 import org.apache.log4j.Logger;
 
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.UseCaseInvocation;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.local.LocalUseCaseInvocation;
-
 /**
  * @author alanrw
  *

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationPersister.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationPersister.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationPersister.java
index b30a73b..8cc8201 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationPersister.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationPersister.java
@@ -22,8 +22,6 @@ package org.apache.taverna.activities.externaltool.local;
 import java.io.File;
 
 import org.apache.log4j.Logger;
-
-import de.uni_luebeck.inb.knowarc.usecases.invocation.local.LocalUseCaseInvocation;
 import org.apache.taverna.activities.externaltool.manager.InvocationPersister;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalMechanismCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalMechanismCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalMechanismCreator.java
index b92417c..3f95a2b 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalMechanismCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalMechanismCreator.java
@@ -20,8 +20,6 @@
 package org.apache.taverna.activities.externaltool.local;
 
 import org.jdom.Element;
-
-import de.uni_luebeck.inb.knowarc.usecases.invocation.local.LocalUseCaseInvocation;
 import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
 import org.apache.taverna.activities.externaltool.manager.MechanismCreator;
 


[28/50] [abbrv] incubator-taverna-common-activities git commit: https for snapshots

Posted by st...@apache.org.
https for snapshots


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

Branch: refs/heads/docker
Commit: 0943f33084aba3d519a4afd84f329799860b6bbb
Parents: cdde6c5
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Sun May 15 23:12:04 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Sun May 15 23:12:04 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/0943f330/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3d29968..78e176a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -97,7 +97,7 @@
         <repository>
             <id>apache.snapshots</id>
             <name>Apache Snapshot Repository</name>
-            <url>http://repository.apache.org/snapshots</url>
+            <url>https://repository.apache.org/snapshots</url>
             <releases>
                 <enabled>false</enabled>
             </releases>


[06/50] [abbrv] incubator-taverna-common-activities git commit: TAVERNA-963 package taverna.externaltool.*

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalUseCaseInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalUseCaseInvocation.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalUseCaseInvocation.java
new file mode 100755
index 0000000..b57be14
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalUseCaseInvocation.java
@@ -0,0 +1,560 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.local;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+
+import org.apache.taverna.activities.externaltool.desc.ScriptInput;
+import org.apache.taverna.activities.externaltool.desc.ScriptOutput;
+import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.invocation.InvocationException;
+import org.apache.taverna.activities.externaltool.invocation.UseCaseInvocation;
+import org.apache.taverna.activities.externaltool.ssh.SshNode;
+import org.apache.taverna.activities.externaltool.ssh.SshNodeFactory;
+import org.apache.taverna.activities.externaltool.ssh.SshUrl;
+import org.apache.taverna.reference.AbstractExternalReference;
+import org.apache.taverna.reference.ErrorDocument;
+import org.apache.taverna.reference.ExternalReferenceSPI;
+import org.apache.taverna.reference.Identified;
+import org.apache.taverna.reference.ReferenceService;
+import org.apache.taverna.reference.ReferenceSet;
+import org.apache.taverna.reference.ReferencedDataNature;
+import org.apache.taverna.reference.T2Reference;
+import org.apache.taverna.reference.impl.external.file.FileReference;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.log4j.Logger;
+
+/**
+ * The job is executed locally, i.e. not via the grid.
+ * @author Hajo Krabbenhoeft
+ */
+public class LocalUseCaseInvocation extends UseCaseInvocation {
+
+	private static Logger logger = Logger.getLogger(LocalUseCaseInvocation.class);
+
+	private final File tempDir;
+	
+	public static String LOCAL_USE_CASE_INVOCATION_TYPE = "789663B8-DA91-428A-9F7D-B3F3DA185FD4";
+	
+	private Process running;
+
+	private final String shellPrefix;
+
+	private final String linkCommand;
+
+	private Reader stdInReader = null;
+	
+	private static Map<String, Set<String>> runIdToTempDir = Collections.synchronizedMap(new HashMap<String, Set<String>> ());
+	
+	private static String LOCAL_INVOCATION_FILE = "localInvocations";
+
+	public LocalUseCaseInvocation(UseCaseDescription desc, boolean retrieveData, String mainTempDirectory, String shellPrefix, String linkCommand) throws IOException {
+
+		usecase = desc;
+		setRetrieveData(retrieveData);
+		this.shellPrefix = shellPrefix;
+		this.linkCommand = linkCommand;
+		
+		if (mainTempDirectory != null) {
+		
+			File mainTempDir = new File(mainTempDirectory);
+
+			tempDir = File.createTempFile("usecase", "dir", mainTempDir);
+		} else {
+			tempDir = File.createTempFile("usecase", "dir");
+		}
+		tempDir.delete();
+		tempDir.mkdir();
+		logger.info("mainTempDirectory is " + mainTempDirectory);
+		logger.info("Using tempDir " + tempDir.getAbsolutePath());
+
+	}
+
+	void recDel(File c) {
+		File[] files = c.listFiles();
+		if (files != null) {
+			for (File cc : files)
+				recDel(cc);
+		}
+		c.delete();
+	}
+	
+	private String setOneBinaryInput(ReferenceService referenceService,
+			T2Reference t2Reference, ScriptInput input, String targetSuffix)
+			throws InvocationException {
+
+		if (input.isFile() || input.isTempFile()) {
+			// Try to get it as a file
+			String target = tempDir.getAbsolutePath() + "/" + targetSuffix;
+			FileReference fileRef = getAsFileReference(referenceService,
+					t2Reference);
+			if (fileRef != null) {
+
+				if (!input.isForceCopy()) {
+					if (linkCommand != null) {
+						String source = fileRef.getFile().getAbsolutePath();
+						String actualLinkCommand = getActualOsCommand(
+								linkCommand, source, targetSuffix, target);
+						logger.info("Link command is " + actualLinkCommand);
+						String[] splitCmds = actualLinkCommand.split(" ");
+						ProcessBuilder builder = new ProcessBuilder(splitCmds);
+						builder.directory(tempDir);
+						try {
+							int code = builder.start().waitFor();
+							if (code == 0) {
+								return target;
+							} else {
+								logger.error("Link command gave errorcode: "
+										+ code);
+							}
+
+						} catch (InterruptedException e) {
+							// go through
+						} catch (IOException e) {
+							// go through
+						}
+
+					}
+				}
+			}
+
+			InputStream is = null;
+			OutputStream os = null;
+			is = getAsStream(referenceService, t2Reference);
+
+			try {
+				os = new FileOutputStream(target);
+			} catch (FileNotFoundException e) {
+				throw new InvocationException(e);
+			}
+
+			try {
+				IOUtils.copyLarge(is, os);
+			} catch (IOException e) {
+				throw new InvocationException(e);
+			}
+			try {
+				is.close();
+				os.close();
+			} catch (IOException e) {
+				throw new InvocationException(e);
+			}
+			return target;
+		} else {
+			String value = (String) referenceService.renderIdentifier(
+					t2Reference, String.class, this.getContext());
+			return value;
+		}
+	}
+	
+	@Override
+	public String setOneInput(ReferenceService referenceService,
+			T2Reference t2Reference, ScriptInput input)
+			throws InvocationException {
+
+		if (input.getCharsetName() == null) {
+			input.setCharsetName(Charset.defaultCharset().name());
+		}
+		String target = null;
+		String targetSuffix = null;
+		if (input.isFile()) {
+			targetSuffix = input.getTag();
+		} else if (input.isTempFile()) {
+			targetSuffix = "tempfile." + (nTempFiles++) + ".tmp";
+		}
+
+		if (input.isBinary()) {
+			return setOneBinaryInput(referenceService, t2Reference, input,
+					targetSuffix);
+		}
+
+		logger.info("Target is " + target);
+		if (input.isFile() || input.isTempFile()) {
+			target = tempDir.getAbsolutePath() + "/" + targetSuffix;
+			// Try to get it as a file
+			Reader r;
+			Writer w;
+			FileReference fileRef = getAsFileReference(referenceService,
+					t2Reference);
+			if (fileRef != null) {
+
+				if (!input.isForceCopy()) {
+					if (linkCommand != null) {
+						String source = fileRef.getFile().getAbsolutePath();
+						String actualLinkCommand = getActualOsCommand(
+								linkCommand, source, targetSuffix, target);
+						logger.info("Link command is " + actualLinkCommand);
+						String[] splitCmds = actualLinkCommand.split(" ");
+						ProcessBuilder builder = new ProcessBuilder(splitCmds);
+						builder.directory(tempDir);
+						try {
+							int code = builder.start().waitFor();
+							if (code == 0) {
+								return target;
+							} else {
+								logger.error("Link command gave errorcode: "
+										+ code);
+							}
+
+						} catch (InterruptedException e) {
+							// go through
+						} catch (IOException e) {
+							// go through
+						}
+
+					}
+				}
+
+				if (fileRef.getDataNature().equals(ReferencedDataNature.TEXT)) {
+					r = new InputStreamReader(fileRef.openStream(this
+							.getContext()), Charset.forName(fileRef
+							.getCharset()));
+				} else {
+					try {
+						r = new FileReader(fileRef.getFile());
+					} catch (FileNotFoundException e) {
+						throw new InvocationException(e);
+					}
+				}
+			} else {
+				r = new InputStreamReader(getAsStream(referenceService,
+						t2Reference));
+			}
+			try {
+				w = new OutputStreamWriter(new FileOutputStream(target), input
+						.getCharsetName());
+			} catch (UnsupportedEncodingException e) {
+				throw new InvocationException(e);
+			} catch (FileNotFoundException e) {
+				throw new InvocationException(e);
+			}
+			try {
+				IOUtils.copyLarge(r, w);
+			} catch (IOException e) {
+				throw new InvocationException(e);
+			}
+			try {
+				r.close();
+				w.close();
+			} catch (IOException e) {
+				throw new InvocationException(e);
+			}
+			return target;
+		} else {
+			String value = (String) referenceService.renderIdentifier(
+					t2Reference, String.class, this.getContext());
+			return value;
+		}
+	}
+	
+	private void forgetRun() {
+		Set<String> directories = runIdToTempDir.get(getRunId());
+		try {
+			directories.remove(tempDir.getCanonicalPath());
+		} catch (IOException e) {
+			logger.error(e);
+		}
+	}
+
+	private static void deleteDirectory(String location) {
+		try {
+			FileUtils.deleteDirectory(new File(location));
+		} catch (IOException e) {
+			logger.error("Problem deleting " + location, e);
+		}
+	}
+	
+	public static void cleanup(String runId) {
+		Set<String> tempDirectories = runIdToTempDir.get(runId);
+		if (tempDirectories != null) {
+			for (String tempDir : tempDirectories) {
+				deleteDirectory(tempDir);
+			}
+			runIdToTempDir.remove(runId);
+		}
+	}
+	
+	@Override
+	protected void submit_generate_job_inner() throws InvocationException {
+		tags.put("uniqueID", "" + getSubmissionID());
+		String command = usecase.getCommand();
+		for (String cur : tags.keySet()) {
+		    command = command.replaceAll("\\Q%%" + cur + "%%\\E", Matcher.quoteReplacement(tags.get(cur)));
+		}
+
+		List<String> cmds = new ArrayList<String>();
+		if ((shellPrefix != null) && !shellPrefix.isEmpty()) {
+			String[] prefixCmds = shellPrefix.split(" ");
+			for (int i = 0; i < prefixCmds.length; i++) {
+				cmds.add(prefixCmds[i]);
+			}
+			cmds.add(command);
+		} else {
+			String[] splitCmds = command.split(" ");
+			for (int i = 0; i < splitCmds.length; i++) {
+				cmds.add(splitCmds[i]);
+			}
+		}
+	
+		ProcessBuilder builder = new ProcessBuilder(cmds);
+		builder.directory(tempDir);
+
+		for (int i = 0; i < cmds.size(); i++) {
+			logger.info("cmds[" + i + "] = " + cmds.get(i));
+		}
+		logger.info("Command is " + command + " in directory " + tempDir);
+		try {
+			running = builder.start();
+			if (stdInReader != null) {
+				BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(running.getOutputStream()));
+				IOUtils.copyLarge(stdInReader, writer);
+				writer.close();
+			}
+		} catch (IOException e) {
+			throw new InvocationException(e);
+		}
+	}
+
+	private void copy_stream(InputStream read, OutputStream write) throws IOException {
+		int a = read.available();
+		if (a > 0) {
+			byte[] buf = new byte[a];
+			read.read(buf);
+			write.write(buf);
+		}
+	}
+
+	@Override
+	public HashMap<String, Object> submit_wait_fetch_results(ReferenceService referenceService) throws InvocationException {
+		ByteArrayOutputStream stdout_buf = new ByteArrayOutputStream();
+		ByteArrayOutputStream stderr_buf = new ByteArrayOutputStream();
+		while (true) {
+			try {
+				copy_stream(running.getInputStream(), stdout_buf);
+				copy_stream(running.getErrorStream(), stderr_buf);
+			} catch (IOException e1) {
+				throw new InvocationException(e1);
+			}
+			try {
+				int exitcode = running.exitValue();
+				if (!usecase.getValidReturnCodes().contains(exitcode)) {
+					try {
+						throw new InvocationException("Invalid exit code " + exitcode + ":" + stderr_buf.toString("US-ASCII"));
+					} catch (UnsupportedEncodingException e) {
+						throw new InvocationException("Invalid exit code " + exitcode + ":" + stderr_buf.toString());
+					}
+				}
+				else
+					break;
+			} catch (IllegalThreadStateException e) {
+
+				try {
+					Thread.sleep(100);
+				} catch (InterruptedException e1) {
+					throw new InvocationException(e);
+				}
+
+			}
+		}
+
+		HashMap<String, Object> results = new HashMap<String, Object>();
+			results.put("STDOUT", stdout_buf.toByteArray());
+			results.put("STDERR", stderr_buf.toByteArray());
+
+		for (Map.Entry<String, ScriptOutput> cur : usecase.getOutputs().entrySet()) {
+			ScriptOutput scriptOutput = cur.getValue();
+			File result = new File(tempDir.getAbsoluteFile() + "/" + cur.getValue().getPath());
+			if (result.exists()) {
+				AbstractExternalReference ref;
+				if (isRetrieveData()) {
+					FileInputStream is;
+					try {
+						is = new FileInputStream(result);
+					} catch (FileNotFoundException e) {
+						throw new InvocationException(e);
+					}
+					if (scriptOutput.isBinary()) {
+						ref = inlineByteArrayReferenceBuilder.createReference(is, null);
+					} else {
+						ref = inlineStringReferenceBuilder.createReference(is, null);
+					}
+					try {
+						is.close();
+					} catch (IOException e) {
+						throw new InvocationException(e);
+					}
+				}
+				else {
+					ref = new FileReference(result);
+					if (scriptOutput.isBinary()) {
+						((FileReference) ref)
+								.setDataNature(ReferencedDataNature.BINARY);
+					} else {
+						((FileReference) ref)
+								.setDataNature(ReferencedDataNature.TEXT);
+						((FileReference) ref).setCharset("UTF-8");
+					}
+				}
+				results.put(cur.getKey(), ref);
+			} else {
+				ErrorDocument ed = referenceService.getErrorDocumentService().registerError("No result for " + cur.getKey(), 0, getContext());
+				results.put(cur.getKey(), ed);
+			}
+		}
+		
+		if (isRetrieveData()) {
+			forgetRun();
+			try {
+				deleteDirectory(tempDir.getCanonicalPath());
+			} catch (IOException e) {
+				throw new InvocationException(e);
+			}
+		}
+
+		return results;
+	}
+
+	private FileReference getAsFileReference(ReferenceService referenceService, T2Reference t2Reference) {
+		Identified identified = referenceService.resolveIdentifier(t2Reference, null, null);
+		if (identified instanceof ReferenceSet) {
+			for (ExternalReferenceSPI ref : ((ReferenceSet) identified).getExternalReferences()) {
+				if (ref instanceof FileReference) {
+					return (FileReference) ref;
+				}
+			}
+		}
+		return null;
+	}
+
+	@Override
+	public void setStdIn(ReferenceService referenceService,
+			T2Reference t2Reference) {
+		stdInReader = new BufferedReader(new InputStreamReader(getAsStream(referenceService, t2Reference)));
+	}
+
+	@Override
+	public void rememberRun(String runId) {
+		this.setRunId(runId);
+		Set<String> directories = runIdToTempDir.get(runId);
+		if (directories == null) {
+			directories = Collections.synchronizedSet(new HashSet<String> ());
+			runIdToTempDir.put(runId, directories);
+		}
+		try {
+			directories.add(tempDir.getCanonicalPath());
+		} catch (IOException e) {
+			logger.error("Unable to record temporary directory: " + tempDir, e);
+		}
+	}
+
+	public static void load(File directory) {
+		File invocationsFile = new File(directory, LOCAL_INVOCATION_FILE);
+		if (!invocationsFile.exists()) {
+			return;
+		}
+		BufferedReader reader = null;
+		try {
+			reader = new BufferedReader(new FileReader(invocationsFile));
+			String line = reader.readLine();
+			while (line != null) {
+				String[] parts = line.split(" ");
+				if (parts.length != 2) {
+					break;
+				}
+				String runId = parts[0];
+				String tempDirString = parts[1];
+				Set<String> tempDirs = runIdToTempDir.get(runId);
+				if (tempDirs == null) {
+					tempDirs = new HashSet<String>();
+					runIdToTempDir.put(runId, tempDirs);
+				}
+				tempDirs.add(tempDirString);
+				line = reader.readLine();
+			}
+		} catch (FileNotFoundException e) {
+			logger.error(e);
+		} catch (IOException e) {
+			logger.error(e);
+		} finally {
+			if (reader != null) {
+				try {
+					reader.close();
+				} catch (IOException e) {
+					logger.error(e);
+				}
+			}
+		}
+	}
+
+	public static void persist(File directory) {
+		File invocationsFile = new File(directory, LOCAL_INVOCATION_FILE);
+		BufferedWriter writer = null;
+		try {
+			writer = new BufferedWriter(new FileWriter(invocationsFile));
+			for (String runId : runIdToTempDir.keySet()) {
+				for (String tempDir : runIdToTempDir.get(runId)) {
+					writer.write(runId);
+					writer.write(" ");
+					writer.write(tempDir);
+					writer.newLine();
+				}
+			}
+		} catch (IOException e) {
+			logger.error(e);
+		} finally {
+			if (writer != null) {
+				try {
+					writer.close();
+				} catch (IOException e) {
+					logger.error(e);
+				}
+			}
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/ExternalToolSshInvocationMechanism.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/ExternalToolSshInvocationMechanism.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/ExternalToolSshInvocationMechanism.java
index c373879..94cc466 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/ExternalToolSshInvocationMechanism.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/ExternalToolSshInvocationMechanism.java
@@ -24,13 +24,8 @@ import java.util.List;
 
 import org.jdom.Element;
 import org.jdom.Text;
-
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNodeFactory;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshUseCaseInvocation;
 import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
 
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNode;
-
 /**
  * @author alanrw
  *

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshAutoLoginTrustEveryone.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshAutoLoginTrustEveryone.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshAutoLoginTrustEveryone.java
new file mode 100644
index 0000000..dfee8bb
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshAutoLoginTrustEveryone.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.ssh;
+
+import org.apache.log4j.Logger;
+import org.apache.taverna.activities.externaltool.invocation.AskUserForPw;
+
+import com.jcraft.jsch.UIKeyboardInteractive;
+import com.jcraft.jsch.UserInfo;
+
+final class SshAutoLoginTrustEveryone implements UserInfo, UIKeyboardInteractive {
+	
+	private static Logger logger = Logger.getLogger(SshAutoLoginTrustEveryone.class);
+
+	private final AskUserForPw askUserForPw;
+
+	public SshAutoLoginTrustEveryone(AskUserForPw askUserForPw) {
+		super();
+		this.askUserForPw = askUserForPw;
+	}
+
+	public void showMessage(String arg0) {
+		logger.info(arg0);
+	}
+
+	public boolean promptYesNo(String arg0) {
+		if (arg0.startsWith("The authenticity of host"))
+			return true;
+		return false;
+	}
+
+	public boolean promptPassword(String arg0) {
+		return true;
+	}
+
+	public boolean promptPassphrase(String arg0) {
+		return true;
+	}
+
+	public String getPassword() {
+		return askUserForPw.getPassword();
+	}
+
+	public String getPassphrase() {
+		return askUserForPw.getPassphrase();
+	}
+
+	public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt, boolean[] echo) {
+		if (prompt.length >= 1 && prompt[0].toLowerCase().startsWith("password"))
+			return new String[] { askUserForPw.getPassword() };
+		return null;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
index 88f6ceb..b876ec8 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
@@ -25,20 +25,13 @@ import java.util.Map;
 
 import org.apache.taverna.activities.externaltool.InvocationCreator;
 import org.apache.taverna.activities.externaltool.RetrieveLoginFromTaverna;
-
+import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.invocation.UseCaseInvocation;
 import org.apache.log4j.Logger;
 
 import com.jcraft.jsch.JSchException;
 import com.jcraft.jsch.SftpException;
 
-import de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.UseCaseInvocation;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNode;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNodeFactory;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshReference;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshUrl;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshUseCaseInvocation;
-
 import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
 import org.apache.taverna.reference.ExternalReferenceSPI;
 import org.apache.taverna.reference.Identified;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationPersister.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationPersister.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationPersister.java
index 1884cbe..bad5c2e 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationPersister.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationPersister.java
@@ -21,6 +21,7 @@ package org.apache.taverna.activities.externaltool.ssh;
 
 import java.io.File;
 
+import org.apache.taverna.activities.externaltool.invocation.InvocationException;
 import org.apache.taverna.activities.externaltool.manager.InvocationPersister;
 /*
 * Licensed to the Apache Software Foundation (ASF) under one
@@ -45,9 +46,6 @@ import org.apache.taverna.security.credentialmanager.CredentialManager;
 
 import org.apache.log4j.Logger;
 
-import de.uni_luebeck.inb.knowarc.usecases.invocation.InvocationException;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshUseCaseInvocation;
-
 /**
  * @author alanrw
  *

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshMechanismCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshMechanismCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshMechanismCreator.java
index 2a15d38..097f8db 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshMechanismCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshMechanismCreator.java
@@ -27,10 +27,6 @@ import org.apache.taverna.activities.externaltool.manager.MechanismCreator;
 import org.apache.log4j.Logger;
 import org.jdom.Element;
 
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNode;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshNodeFactory;
-import de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshUseCaseInvocation;
-
 /**
  * @author alanrw
  *

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshNode.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshNode.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshNode.java
new file mode 100644
index 0000000..378696f
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshNode.java
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.ssh;
+
+import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
+
+public class SshNode {
+	
+    public static String DEFAULT_HOST = "127.0.0.1";
+    public static int DEFAULT_PORT = 22;
+    public static String DEFAULT_DIRECTORY = "/tmp/";
+
+    private String host = DEFAULT_HOST;
+    private int port = DEFAULT_PORT;
+    private String directory = DEFAULT_DIRECTORY;
+	
+	private SshUrl url;
+	
+	private String linkCommand = null;
+	private String copyCommand = null;
+	private boolean retrieveData = false;
+
+	/**
+	 * 
+	 */
+	SshNode() {
+		super();
+		linkCommand = InvocationMechanism.UNIX_LINK;
+		copyCommand = InvocationMechanism.UNIX_COPY;
+		
+	}
+	/**
+	 * @param directory the directory to set
+	 */
+	public void setDirectory(String directory) {
+		if ((directory != null) && !directory.isEmpty()) {
+			if (!directory.endsWith("/")) {
+				directory = directory + "/";
+			}
+			this.directory = directory;
+		}
+	}
+
+	/**
+	 * @return the directory
+	 */
+	public String getDirectory() {
+		return directory;
+	}
+
+	/**
+	 * @param host the host to set
+	 */
+	public void setHost(String host) {
+		this.host = host;
+	}
+
+	/**
+	 * @return the host
+	 */
+	public String getHost() {
+		return host;
+	}
+
+	/**
+	 * @param port the port to set
+	 */
+	public void setPort(int port) {
+		this.port = port;
+	}
+
+	/**
+	 * @return the port
+	 */
+	public int getPort() {
+		return port;
+	}
+	
+	SshUrl getUrl() {
+		if (url == null) {
+			url = new SshUrl(this);
+		}
+		return url;
+	}
+	
+	public int hashCode() {
+		return getUrl().hashCode();	
+	}
+
+	public boolean equals(Object obj) {
+		if ((obj == null) || !(obj instanceof SshNode)) {
+			return false;
+		}
+		return (this.hashCode() == obj.hashCode());
+	}
+	/**
+	 * @return the linkCommand
+	 */
+	public String getLinkCommand() {
+		return linkCommand;
+	}
+	/**
+	 * @param linkCommand the linkCommand to set
+	 */
+	public void setLinkCommand(String linkCommand) {
+		if ((linkCommand != null) && linkCommand.isEmpty()) {
+			this.linkCommand = null;
+		} else {
+			this.linkCommand = linkCommand;
+		}	}
+	/**
+	 * @return the copyCommand
+	 */
+	public String getCopyCommand() {
+		return copyCommand;
+	}
+	/**
+	 * @param copyCommand the copyCommand to set
+	 */
+	public void setCopyCommand(String copyCommand) {
+		if ((copyCommand != null) && copyCommand.isEmpty()) {
+			this.copyCommand = null;
+		} else {
+			this.copyCommand = copyCommand;
+		}
+	}
+	
+	/**
+	 * @return the retrieveData
+	 */
+	public boolean isRetrieveData() {
+		return retrieveData;
+	}
+	/**
+	 * @param retrieveData the retrieveData to set
+	 */
+	public void setRetrieveData(boolean retrieveData) {
+		this.retrieveData = retrieveData;
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshNodeFactory.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshNodeFactory.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshNodeFactory.java
new file mode 100644
index 0000000..a697bd7
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshNodeFactory.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.taverna.activities.externaltool.ssh;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+public class SshNodeFactory {
+	
+	private Map<String, SshNode> nodeMap = Collections.synchronizedMap(new HashMap<String, SshNode> ());
+	
+	private static SshNodeFactory INSTANCE = new SshNodeFactory();
+	
+	private SshNode defaultNode;
+	
+	private SshNodeFactory() {
+		defaultNode = getSshNode(SshNode.DEFAULT_HOST, SshNode.DEFAULT_PORT, SshNode.DEFAULT_DIRECTORY);
+	}
+
+	public SshNode getDefaultNode() {
+		return defaultNode;
+	}
+
+	public static SshNodeFactory getInstance() {
+		return INSTANCE;
+	}
+	
+	public SshNode getSshNode(String host, int port, String directory) {
+		String url = makeUrl(host, port, directory);
+		if (nodeMap.containsKey(url)) {
+			return nodeMap.get(url);
+		}
+		else {
+			SshNode newNode = new SshNode();
+			newNode.setHost(host);
+			newNode.setPort(port);
+			newNode.setDirectory(directory);
+			nodeMap.put(url, newNode);
+			return newNode;
+		}
+	}
+	
+	public boolean containsSshNode(String host, int port, String directory) {
+		return nodeMap.containsKey(makeUrl(host, port, directory));
+	}
+	
+	public static String makeUrl(String host, int port, String directory) {
+		return ("ssh://" + host + ":" + port + directory);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshPool.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshPool.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshPool.java
new file mode 100755
index 0000000..e7f9787
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshPool.java
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.taverna.activities.externaltool.ssh;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.apache.taverna.activities.externaltool.desc.RuntimeEnvironmentConstraint;
+import org.apache.taverna.activities.externaltool.invocation.AskUserForPw;
+
+import com.jcraft.jsch.ChannelExec;
+import com.jcraft.jsch.ChannelSftp;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+
+public class SshPool {
+	
+	private static Logger logger = Logger.getLogger(SshPool.class);
+
+	
+	private static JSch jsch = new JSch();
+	
+    private static int CONNECT_TIMEOUT = 10000; // milliseconds
+
+	private static Map<SshNode, Session> sessionMap = Collections.synchronizedMap(new HashMap<SshNode, Session> ());
+	private static Map<Session, ChannelSftp> sftpGetMap = Collections.synchronizedMap(new HashMap<Session, ChannelSftp> ());
+	private static Map<Session, ChannelSftp> sftpPutMap = Collections.synchronizedMap(new HashMap<Session, ChannelSftp> ());
+	
+	public static Session getSshSession(final SshUrl sshUrl, final AskUserForPw askUserForPw) throws JSchException {
+		return getSshSession(sshUrl.getSshNode(), askUserForPw);
+	}
+	
+	public static synchronized Session getSshSession(final SshNode sshNode, final AskUserForPw askUserForPw) throws JSchException {
+
+		Session s = sessionMap.get(sshNode);
+		if ((s != null) && s.isConnected()) {
+			logger.info("Reusing session");
+			return s;
+		}
+		if (s != null) {
+			logger.info("Session was not connected");
+		}
+		if (s == null) {
+			logger.info("No session found for " + sshNode.toString());
+		}
+
+		if (askUserForPw.getKeyfile().length() > 0) {
+			jsch.addIdentity(askUserForPw.getKeyfile());
+		}
+		logger.info("Using host is " + sshNode.getHost() + " and port " + sshNode.getPort());
+		Session sshSession = jsch.getSession(askUserForPw.getUsername(), sshNode.getHost(), sshNode.getPort());
+		sshSession.setUserInfo(new SshAutoLoginTrustEveryone(askUserForPw));
+		sshSession.connect(CONNECT_TIMEOUT);
+		
+		askUserForPw.authenticationSucceeded();
+		sessionMap.put(sshNode, sshSession);
+		if (sshSession == null) {
+			logger.error("Returning a null session");
+		}
+		return sshSession;
+	}
+	
+	public static ChannelSftp getSftpGetChannel(SshNode sshNode, final AskUserForPw askUserForPw) throws JSchException {
+		return getSftpGetChannel(getSshSession(sshNode, askUserForPw));
+	}
+
+	private static synchronized ChannelSftp getSftpGetChannel(Session session) throws JSchException {
+		ChannelSftp result = sftpGetMap.get(session);
+		if (!session.isConnected()) {
+			logger.warn("Session is not connected");
+		}
+		if (result == null) {
+			logger.info("Creating new sftp channel");
+			result = (ChannelSftp) session.openChannel("sftp");
+			sftpGetMap.put(session, result);
+		}
+		else {
+			logger.info("Reusing sftp channel");			
+		}
+		if (!result.isConnected()) {
+			logger.info("Connecting");
+			result.connect();
+		} else {
+			logger.info("Already connected");
+		}
+		return result;
+	}
+	
+	public static ChannelSftp getSftpPutChannel(SshNode sshNode, final AskUserForPw askUserForPw) throws JSchException {
+		return getSftpPutChannel(getSshSession(sshNode, askUserForPw));
+	}
+
+	private static synchronized ChannelSftp getSftpPutChannel(Session session) throws JSchException {
+	    ChannelSftp result = null;
+	    synchronized(sftpPutMap) {
+		result = sftpPutMap.get(session);
+		if (!session.isConnected()) {
+			logger.info("Session is not connected");
+		}
+		if (result == null) {
+			logger.info("Creating new sftp channel");
+			result = (ChannelSftp) session.openChannel("sftp");
+			sftpPutMap.put(session, result);
+		}
+		else {
+			logger.info("Reusing sftp channel");			
+		}
+	    }
+	    if (!result.isConnected()) {
+		logger.info("Connecting");
+		result.connect(CONNECT_TIMEOUT);
+	    } else {
+		logger.info("Already connected");
+	    }
+	    return result;
+	}
+	
+	public static synchronized ChannelExec openExecChannel(SshNode sshNode, final AskUserForPw askUserForPw) throws JSchException {
+		return (ChannelExec) getSshSession(sshNode, askUserForPw).openChannel("exec");
+	}
+
+	private static synchronized ChannelExec openExecChannel(Session session) throws JSchException {
+		return (ChannelExec) session.openChannel("exec");
+	}
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshReference.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshReference.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshReference.java
new file mode 100644
index 0000000..091bd0c
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshReference.java
@@ -0,0 +1,222 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.taverna.activities.externaltool.ssh;
+
+import java.io.InputStream;
+
+import org.apache.taverna.activities.externaltool.RetrieveLoginFromTaverna;
+import org.apache.taverna.reference.AbstractExternalReference;
+import org.apache.taverna.reference.DereferenceException;
+import org.apache.taverna.reference.ExternalReferenceSPI;
+import org.apache.taverna.reference.ReferenceContext;
+import org.apache.taverna.security.credentialmanager.CredentialManager;
+import org.apache.taverna.reference.ReferencedDataNature;
+
+import org.apache.log4j.Logger;
+
+import com.jcraft.jsch.ChannelSftp;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.SftpException;
+
+/**
+ * @author alanrw
+ *
+ */
+public class SshReference extends AbstractExternalReference implements
+	ExternalReferenceSPI {
+
+	private static Logger logger = Logger.getLogger(SshReference.class);
+
+
+	private String host = "127.0.0.1";
+	private int port = 22;
+	private String directory = "/tmp/";
+	private String subDirectory;
+	private String fileName;
+
+	private CredentialManager credentialManager;
+
+	private int dataNatureInteger = ReferencedDataNature.UNKNOWN.ordinal();
+	private String charset = "UTF-8";
+	
+	public SshReference() {
+		super();
+	}
+
+	public SshReference(SshUrl url) {
+		super();
+		this.host = url.getSshNode().getHost();
+		this.port = url.getSshNode().getPort();
+		this.directory = url.getSshNode().getDirectory();
+		this.subDirectory = url.getSubDirectory();
+		this.fileName = url.getFileName();
+		this.setDataNature(url.getDataNature());
+		this.setCharset(url.getCharset());
+	}
+
+	/* (non-Javadoc)
+	 * @see net.sf.taverna.t2.reference.ExternalReferenceSPI#getApproximateSizeInBytes()
+	 */
+	@Override
+	public Long getApproximateSizeInBytes() {
+		return 10000L;
+	}
+
+	/* (non-Javadoc)
+	 * @see net.sf.taverna.t2.reference.ExternalReferenceSPI#openStream(net.sf.taverna.t2.reference.ReferenceContext)
+	 */
+	@Override
+	public InputStream openStream(ReferenceContext context)
+			throws DereferenceException {
+		try {
+			SshNode node = SshNodeFactory.getInstance().getSshNode(this.getHost(), this.getPort(), this.getDirectory());
+			String fullPath = getDirectory() +  getSubDirectory() + "/" + getFileName();
+			ChannelSftp channel = SshPool.getSftpGetChannel(node, new RetrieveLoginFromTaverna(new SshUrl(node).toString(), credentialManager));
+			logger.info("Opening stream on " + fullPath);
+			return (channel.get(fullPath));
+		} catch (JSchException e) {
+			//TODO
+			logger.error(e);
+		} catch (SftpException e) {
+			// TODO Auto-generated catch block
+			logger.error(e);
+		}
+		return null;
+	}
+
+	/**
+	 * @return the host
+	 */
+	public String getHost() {
+		return host;
+	}
+
+	/**
+	 * @param host the host to set
+	 */
+	public void setHost(String host) {
+		this.host = host;
+	}
+
+	/**
+	 * @return the port
+	 */
+	public int getPort() {
+		return port;
+	}
+
+	/**
+	 * @param port the port to set
+	 */
+	public void setPort(int port) {
+		this.port = port;
+	}
+
+	/**
+	 * @return the directory
+	 */
+	public String getDirectory() {
+		return directory;
+	}
+
+	/**
+	 * @param directory the directory to set
+	 */
+	public void setDirectory(String directory) {
+		this.directory = directory;
+	}
+
+	/**
+	 * @return the subDirectory
+	 */
+	public String getSubDirectory() {
+		return subDirectory;
+	}
+
+	/**
+	 * @param subDirectory the subDirectory to set
+	 */
+	public void setSubDirectory(String subDirectory) {
+		this.subDirectory = subDirectory;
+	}
+
+	/**
+	 * @return the fileName
+	 */
+	public String getFileName() {
+		return fileName;
+	}
+
+	/**
+	 * @param fileName the fileName to set
+	 */
+	public void setFileName(String fileName) {
+		this.fileName = fileName;
+	}
+
+	public String getFullPath() {
+		return getDirectory() + "/" + getSubDirectory() + "/" + getFileName();
+	}
+	
+	public ReferencedDataNature getDataNature() {
+		return ReferencedDataNature.values()[dataNatureInteger];
+	}
+
+	public void setDataNature(ReferencedDataNature dataNature) {
+		this.dataNatureInteger = dataNature.ordinal();
+	}
+
+	public String getCharset() {
+		return charset;
+	}
+
+	public void setCredentialManager(CredentialManager credentialManager) {
+		this.credentialManager = credentialManager;
+	}
+
+	public void setCharset(String charset) {
+		this.charset = charset;
+	}
+
+	/**
+	 * @return the dataNatureInteger
+	 */
+	public int getDataNatureInteger() {
+		return dataNatureInteger;
+	}
+
+	/**
+	 * @param dataNatureInteger the dataNatureInteger to set
+	 */
+	public void setDataNatureInteger(int dataNatureInteger) {
+		this.dataNatureInteger = dataNatureInteger;
+	}
+	
+	public SshReference clone() {
+		SshReference result = new SshReference();
+		result.setHost(this.getHost());
+		result.setPort(this.getPort());
+		result.setDirectory(this.getDirectory());
+		result.setSubDirectory(this.getSubDirectory());
+		result.setFileName(this.getFileName());
+		result.setDataNature(this.getDataNature());
+		result.setCharset(this.getCharset());
+		return result;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUrl.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUrl.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUrl.java
new file mode 100644
index 0000000..4c39d66
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUrl.java
@@ -0,0 +1,163 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.taverna.activities.externaltool.ssh;
+
+import org.apache.taverna.reference.ReferencedDataNature;
+
+public class SshUrl {
+	
+	private SshNode sshNode;
+	private String subDirectory;
+	private String fileName;
+
+	private ReferencedDataNature dataNature = ReferencedDataNature.UNKNOWN;
+	private String charset = "UTF-8";
+	
+
+	public SshUrl(SshNode sshNode) {
+		this.setSshNode(sshNode);
+	}
+	
+
+	/**
+	 * @return the host
+	 */
+	public String getHost() {
+		return getSshNode().getHost();
+	}
+	/**
+	 * @param host the host to set
+	 */
+	public void setHost(String host) {
+		getSshNode().setHost(host);
+	}
+	/**
+	 * @return the port
+	 */
+	public int getPort() {
+		return getSshNode().getPort();
+	}
+	/**
+	 * @param port the port to set
+	 */
+	public void setPort(int port) {
+		getSshNode().setPort(port);
+	}
+	/**
+	 * @return the directory
+	 */
+	public String getDirectory() {
+		return getSshNode().getDirectory();
+	}
+	/**
+	 * @param directory the directory to set
+	 */
+	public void setDirectory(String directory) {
+		getSshNode().setDirectory(directory);
+	}
+	/**
+	 * @return the subDirectory
+	 */
+	public String getSubDirectory() {
+		return subDirectory;
+	}
+	/**
+	 * @param subDirectory the subDirectory to set
+	 */
+	public void setSubDirectory(String subDirectory) {
+		this.subDirectory = subDirectory;
+	}
+	/**
+	 * @return the fileName
+	 */
+	public String getFileName() {
+		return fileName;
+	}
+	/**
+	 * @param fileName the fileName to set
+	 */
+	public void setFileName(String fileName) {
+		this.fileName = fileName;
+	}
+	
+	public String toString() {
+		String result = SshNodeFactory.makeUrl(getHost(), getPort(), getDirectory());
+		if (getSubDirectory() != null) {
+			result += getSubDirectory();
+		}
+		if (getFileName() != null) {
+			result += "/" + getFileName();
+		}
+		return result;
+	}
+	
+	public int hashCode() {
+		return toString().hashCode();
+		
+	}
+	
+	public boolean equals(Object obj) {
+		if ((obj == null) || !(obj instanceof SshUrl)) {
+			return false;
+		}
+		return (this.hashCode() == obj.hashCode());
+	}
+	
+	public SshUrl getBaseUrl() {
+		SshUrl result = new SshUrl(this.getSshNode());
+		return result;
+	}
+
+
+	/**
+	 * @return the sshNode
+	 */
+	public SshNode getSshNode() {
+		return sshNode;
+	}
+
+
+	/**
+	 * @param sshNode the sshNode to set
+	 */
+	public void setSshNode(SshNode sshNode) {
+		this.sshNode = sshNode;
+	}
+	
+	public ReferencedDataNature getDataNature() {
+		return dataNature;
+	}
+
+
+	public void setDataNature(ReferencedDataNature dataNature) {
+		this.dataNature = dataNature;
+	}
+
+
+	public String getCharset() {
+		return charset;
+	}
+
+
+	public void setCharset(String charset) {
+		this.charset = charset;
+	}
+
+
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUrlToSshReference.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUrlToSshReference.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUrlToSshReference.java
new file mode 100644
index 0000000..74b01e1
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUrlToSshReference.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.ssh;
+
+import org.apache.taverna.reference.ExternalReferenceSPI;
+import org.apache.taverna.reference.ReferenceContext;
+import org.apache.taverna.reference.ValueToReferenceConversionException;
+import org.apache.taverna.reference.ValueToReferenceConverterSPI;
+import org.apache.taverna.security.credentialmanager.CredentialManager;
+
+public class SshUrlToSshReference implements ValueToReferenceConverterSPI {
+
+	private CredentialManager credentialManager;
+
+	/* (non-Javadoc)
+	 * @see net.sf.taverna.t2.reference.ValueToReferenceConverterSPI#canConvert(java.lang.Object, net.sf.taverna.t2.reference.ReferenceContext)
+	 */
+	@Override
+	public boolean canConvert(Object o, ReferenceContext context) {
+		return (o instanceof SshUrl);
+	}
+
+	/* (non-Javadoc)
+	 * @see net.sf.taverna.t2.reference.ValueToReferenceConverterSPI#convert(java.lang.Object, net.sf.taverna.t2.reference.ReferenceContext)
+	 */
+	@Override
+	public ExternalReferenceSPI convert(Object o, ReferenceContext context)
+			throws ValueToReferenceConversionException {
+		SshReference result = new SshReference((SshUrl) o);
+		result.setCredentialManager(credentialManager);
+		return result;
+	}
+
+	public void setCredentialManager(CredentialManager credentialManager) {
+		this.credentialManager = credentialManager;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUseCaseInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUseCaseInvocation.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUseCaseInvocation.java
new file mode 100755
index 0000000..fcbc33f
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUseCaseInvocation.java
@@ -0,0 +1,560 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.ssh;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+import java.util.Set;
+import java.util.Vector;
+import java.util.regex.Matcher;
+
+import org.apache.taverna.activities.externaltool.RetrieveLoginFromTaverna;
+import org.apache.taverna.activities.externaltool.desc.ScriptInput;
+import org.apache.taverna.activities.externaltool.desc.ScriptOutput;
+import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.invocation.AskUserForPw;
+import org.apache.taverna.activities.externaltool.invocation.InvocationException;
+import org.apache.taverna.activities.externaltool.invocation.UseCaseInvocation;
+import org.apache.taverna.reference.AbstractExternalReference;
+import org.apache.taverna.reference.ErrorDocument;
+import org.apache.taverna.reference.ErrorDocumentServiceException;
+import org.apache.taverna.reference.ExternalReferenceSPI;
+import org.apache.taverna.reference.Identified;
+import org.apache.taverna.reference.ReferenceService;
+import org.apache.taverna.reference.ReferenceSet;
+import org.apache.taverna.reference.ReferencedDataNature;
+import org.apache.taverna.reference.T2Reference;
+import org.apache.taverna.security.credentialmanager.CredentialManager;
+
+import org.apache.log4j.Logger;
+
+import com.jcraft.jsch.ChannelExec;
+import com.jcraft.jsch.ChannelSftp;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import com.jcraft.jsch.SftpException;
+import com.jcraft.jsch.ChannelSftp.LsEntry;
+
+/**
+ * The job is executed by connecting to a worker pc using ssh, i.e. not via the
+ * grid.
+ * 
+ * @author Hajo Krabbenhoeft
+ */
+public class SshUseCaseInvocation extends UseCaseInvocation {
+
+	private static Logger logger = Logger.getLogger(SshUseCaseInvocation.class);
+
+	private SshUrl location = null;
+
+	private InputStream stdInputStream = null;
+
+	public static final String SSH_USE_CASE_INVOCATION_TYPE = "D0A4CDEB-DD10-4A8E-A49C-8871003083D8";
+	private String tmpname;
+	private final SshNode workerNode;
+	private final AskUserForPw askUserForPw;
+
+	private ChannelExec running;
+
+	private List<String> precedingCommands = new ArrayList<String>();
+
+	private final ByteArrayOutputStream stdout_buf = new ByteArrayOutputStream();
+	private final ByteArrayOutputStream stderr_buf = new ByteArrayOutputStream();
+
+	private static Map<String, Object> nodeLock = Collections
+			.synchronizedMap(new HashMap<String, Object>());
+
+	private static Map<String, Set<SshUrl>> runIdToTempDir = Collections
+			.synchronizedMap(new HashMap<String, Set<SshUrl>>());
+
+	private static String SSH_INVOCATION_FILE = "sshInvocations";
+
+	private final CredentialManager credentialManager;
+
+	public static String test(final SshNode workerNode,
+			final AskUserForPw askUserForPw) {
+		try {
+			Session sshSession = SshPool
+					.getSshSession(workerNode, askUserForPw);
+
+			ChannelSftp sftpTest = (ChannelSftp) sshSession.openChannel("sftp");
+			sftpTest.connect();
+			sftpTest.cd(workerNode.getDirectory());
+			sftpTest.disconnect();
+			sshSession.disconnect();
+		} catch (JSchException e) {
+			return e.toString();
+		} catch (SftpException e) {
+			return e.toString();
+		}
+		return null;
+	}
+
+	public SshUseCaseInvocation(UseCaseDescription desc, SshNode workerNodeA,
+			AskUserForPw askUserForPwA, CredentialManager credentialManager)
+			throws JSchException, SftpException {
+		this.workerNode = workerNodeA;
+		this.credentialManager = credentialManager;
+
+		setRetrieveData(workerNodeA.isRetrieveData());
+		this.askUserForPw = askUserForPwA;
+		usecase = desc;
+
+		ChannelSftp sftp = SshPool.getSftpPutChannel(workerNode, askUserForPw);
+		synchronized (getNodeLock(workerNode)) {
+
+			logger.info("Changing remote directory to "
+					+ workerNode.getDirectory());
+			sftp.cd(workerNode.getDirectory());
+			Random rnd = new Random();
+			while (true) {
+				tmpname = "usecase" + rnd.nextLong();
+				try {
+					sftp.lstat(workerNode.getDirectory() + tmpname);
+					continue;
+				} catch (Exception e) {
+					// file seems to not exist :)
+				}
+				sftp.mkdir(workerNode.getDirectory() + tmpname);
+				sftp.cd(workerNode.getDirectory() + tmpname);
+				break;
+			}
+		}
+	}
+
+	private static void recursiveDelete(ChannelSftp sftp, String path)
+			throws SftpException, JSchException {
+		Vector<?> entries = sftp.ls(path);
+		for (Object object : entries) {
+			LsEntry entry = (LsEntry) object;
+			if (entry.getFilename().equals(".")
+					|| entry.getFilename().equals("..")) {
+				continue;
+			}
+			if (entry.getAttrs().isDir()) {
+				recursiveDelete(sftp, path + entry.getFilename() + "/");
+			} else {
+				sftp.rm(path + entry.getFilename());
+			}
+		}
+		sftp.rmdir(path);
+	}
+
+	private static void deleteDirectory(SshUrl directory,
+			CredentialManager credentialManager) throws InvocationException {
+		URI uri;
+		try {
+			uri = new URI(directory.toString());
+
+			ChannelSftp sftp;
+			SshNode workerNode;
+			String fullPath = uri.getPath();
+			String path = fullPath.substring(0, fullPath.lastIndexOf("/"));
+			String tempDir = fullPath.substring(fullPath.lastIndexOf("/"));
+			try {
+				workerNode = SshNodeFactory.getInstance().getSshNode(
+						uri.getHost(), uri.getPort(), path);
+
+				sftp = SshPool.getSftpPutChannel(workerNode,
+						new RetrieveLoginFromTaverna(workerNode.getUrl()
+								.toString(), credentialManager));
+			} catch (JSchException e) {
+				throw new InvocationException(e);
+			}
+			synchronized (getNodeLock(workerNode)) {
+				try {
+					sftp.cd(path);
+					recursiveDelete(sftp, path + "/" + tempDir + "/");
+				} catch (SftpException e) {
+					throw new InvocationException(e);
+				} catch (JSchException e) {
+					throw new InvocationException(e);
+				}
+			}
+		} catch (URISyntaxException e1) {
+			throw new InvocationException(e1);
+		}
+	}
+
+	public static void cleanup(String runId, CredentialManager credentialManager)
+			throws InvocationException {
+		Set<SshUrl> tempDirectories = runIdToTempDir.get(runId);
+		if (tempDirectories != null) {
+			for (SshUrl tempUrl : tempDirectories) {
+				deleteDirectory(tempUrl, credentialManager);
+			}
+			runIdToTempDir.remove(runId);
+		}
+	}
+
+	@Override
+	protected void submit_generate_job_inner() throws InvocationException {
+		tags.put("uniqueID", "" + getSubmissionID());
+		String command = usecase.getCommand();
+		for (String cur : tags.keySet()) {
+			command = command.replaceAll("\\Q%%" + cur + "%%\\E",
+					Matcher.quoteReplacement(tags.get(cur)));
+		}
+		String fullCommand = "cd " + workerNode.getDirectory() + tmpname;
+		for (String preceding : precedingCommands) {
+			fullCommand += " && " + preceding;
+		}
+		fullCommand += " && " + command;
+
+		logger.info("Full command is " + fullCommand);
+
+		try {
+			running = SshPool.openExecChannel(workerNode, askUserForPw);
+			running.setCommand(fullCommand);
+			running.setOutputStream(stdout_buf);
+			running.setErrStream(stderr_buf);
+			if (stdInputStream != null) {
+				running.setInputStream(stdInputStream);
+			}
+			running.connect();
+		} catch (JSchException e) {
+			throw new InvocationException(e);
+		}
+
+	}
+
+	@Override
+	public HashMap<String, Object> submit_wait_fetch_results(
+			ReferenceService referenceService) throws InvocationException {
+		while (!running.isClosed()) {
+			try {
+				Thread.sleep(1000);
+			} catch (InterruptedException e) {
+				throw new InvocationException("Invocation interrupted:"
+						+ e.getMessage());
+			}
+		}
+
+		int exitcode = running.getExitStatus();
+		if (!usecase.getValidReturnCodes().contains(exitcode)) {
+			try {
+				throw new InvocationException("Invalid exit code " + exitcode
+						+ ":" + stderr_buf.toString("US-ASCII"));
+			} catch (UnsupportedEncodingException e) {
+				throw new InvocationException("Invalid exit code " + exitcode
+						+ ":" + stderr_buf.toString());
+			}
+		}
+
+		HashMap<String, Object> results = new HashMap<String, Object>();
+
+		results.put("STDOUT", stdout_buf.toByteArray());
+		results.put("STDERR", stderr_buf.toByteArray());
+		try {
+			stdout_buf.close();
+			stderr_buf.close();
+		} catch (IOException e2) {
+			throw new InvocationException(e2);
+		}
+
+		try {
+			ChannelSftp sftp = SshPool.getSftpPutChannel(workerNode,
+					askUserForPw);
+			synchronized (getNodeLock(workerNode)) {
+				for (Map.Entry<String, ScriptOutput> cur : usecase.getOutputs()
+						.entrySet()) {
+					ScriptOutput scriptOutput = cur.getValue();
+					String fullPath = workerNode.getDirectory() + tmpname + "/"
+							+ scriptOutput.getPath();
+					try {
+						if (sftp.stat(fullPath) != null) {
+							SshUrl url = new SshUrl(workerNode);
+							url.setSubDirectory(tmpname);
+							url.setFileName(scriptOutput.getPath());
+							if (scriptOutput.isBinary()) {
+								url.setDataNature(ReferencedDataNature.BINARY);
+							} else {
+								url.setDataNature(ReferencedDataNature.TEXT);
+								url.setCharset("UTF-8");
+							}
+							if (isRetrieveData()) {
+								SshReference urlRef = new SshReference(url);
+								InputStream is = urlRef.openStream(null);
+								AbstractExternalReference ref;
+								if (scriptOutput.isBinary()) {
+									ref = inlineByteArrayReferenceBuilder
+											.createReference(is, null);
+								} else {
+									ref = inlineStringReferenceBuilder
+											.createReference(is, null);
+								}
+								try {
+									is.close();
+								} catch (IOException e) {
+									throw new InvocationException(e);
+								}
+								results.put(cur.getKey(), ref);
+							} else {
+								results.put(cur.getKey(), url);
+							}
+						} else {
+							ErrorDocument ed = referenceService
+									.getErrorDocumentService().registerError(
+											"No result for " + cur.getKey(), 0,
+											getContext());
+							results.put(cur.getKey(), ed);
+						}
+					} catch (SftpException e) {
+						ErrorDocument ed = referenceService
+								.getErrorDocumentService().registerError(
+										"No result for " + cur.getKey(), 0,
+										getContext());
+						results.put(cur.getKey(), ed);
+
+					}
+				}
+			}
+		} catch (JSchException e1) {
+			throw new InvocationException(e1);
+		} catch (ErrorDocumentServiceException e) {
+			throw new InvocationException(e);
+		}
+
+		if (running != null) {
+			running.disconnect();
+		}
+		if (stdInputStream != null) {
+			try {
+				stdInputStream.close();
+			} catch (IOException e) {
+				throw new InvocationException(e);
+			}
+		}
+
+		if (isRetrieveData()) {
+			forgetRun();
+			deleteDirectory(location, credentialManager);
+
+		}
+		return results;
+	}
+
+	@Override
+	public String setOneInput(ReferenceService referenceService,
+			T2Reference t2Reference, ScriptInput input)
+			throws InvocationException {
+		String target = null;
+		String remoteName = null;
+		if (input.isFile()) {
+			remoteName = input.getTag();
+		} else if (input.isTempFile()) {
+			remoteName = "tempfile." + (nTempFiles++) + ".tmp";
+
+		}
+		if (input.isFile() || input.isTempFile()) {
+			SshReference sshRef = getAsSshReference(referenceService,
+					t2Reference, workerNode);
+			target = workerNode.getDirectory() + tmpname + "/" + remoteName;
+			logger.info("Target is " + target);
+			if (sshRef != null) {
+				if (!input.isForceCopy()) {
+					String linkCommand = workerNode.getLinkCommand();
+					if (linkCommand != null) {
+						String actualLinkCommand = getActualOsCommand(
+								linkCommand, sshRef.getFullPath(), remoteName,
+								target);
+						precedingCommands.add(actualLinkCommand);
+						return target;
+
+					}
+				}
+				String copyCommand = workerNode.getCopyCommand();
+				if (copyCommand != null) {
+					String actualCopyCommand = getActualOsCommand(copyCommand,
+							sshRef.getFullPath(), remoteName, target);
+					precedingCommands.add(actualCopyCommand);
+					return target;
+				}
+			}
+			try {
+				ChannelSftp sftp = SshPool.getSftpPutChannel(workerNode,
+						askUserForPw);
+				synchronized (getNodeLock(workerNode)) {
+					InputStream r = getAsStream(referenceService, t2Reference);
+					sftp.put(r, target);
+					r.close();
+				}
+			} catch (SftpException e) {
+				throw new InvocationException(e);
+			} catch (JSchException e) {
+				throw new InvocationException(e);
+			} catch (IOException e) {
+				throw new InvocationException(e);
+			}
+			return target;
+		} else {
+			String value = (String) referenceService.renderIdentifier(
+					t2Reference, String.class, this.getContext());
+			return value;
+
+		}
+	}
+
+	public SshReference getAsSshReference(ReferenceService referenceService,
+			T2Reference t2Reference, SshNode workerNode) {
+		Identified identified = referenceService.resolveIdentifier(t2Reference,
+				null, null);
+		if (identified instanceof ReferenceSet) {
+			for (ExternalReferenceSPI ref : ((ReferenceSet) identified)
+					.getExternalReferences()) {
+				if (ref instanceof SshReference) {
+					SshReference sshRef = (SshReference) ref;
+					if (sshRef.getHost().equals(workerNode.getHost())) {
+						return sshRef;
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	private static Object getNodeLock(final SshNode node) {
+		return getNodeLock(node.getHost());
+	}
+
+	private static synchronized Object getNodeLock(String hostName) {
+		if (!nodeLock.containsKey(hostName)) {
+			nodeLock.put(hostName, new Object());
+		}
+		return nodeLock.get(hostName);
+	}
+
+	@Override
+	public void setStdIn(ReferenceService referenceService,
+			T2Reference t2Reference) {
+		stdInputStream = new BufferedInputStream(getAsStream(referenceService,
+				t2Reference));
+	}
+
+	@Override
+	public void rememberRun(String runId) {
+		this.setRunId(runId);
+		Set<SshUrl> directories = runIdToTempDir.get(runId);
+		if (directories == null) {
+			directories = Collections.synchronizedSet(new HashSet<SshUrl>());
+			runIdToTempDir.put(runId, directories);
+		}
+		location = new SshUrl(workerNode);
+		location.setSubDirectory(tmpname);
+		directories.add(location);
+	}
+
+	private void forgetRun() {
+		Set<SshUrl> directories = runIdToTempDir.get(getRunId());
+		directories.remove(location);
+	}
+
+	public static void load(File directory) {
+		File invocationsFile = new File(directory, SSH_INVOCATION_FILE);
+		if (!invocationsFile.exists()) {
+			return;
+		}
+		BufferedReader reader = null;
+		try {
+			reader = new BufferedReader(new FileReader(invocationsFile));
+			String line = reader.readLine();
+			while (line != null) {
+				String[] parts = line.split(" ");
+				if (parts.length != 2) {
+					break;
+				}
+				String runId = parts[0];
+				String urlString = parts[1];
+				Set<SshUrl> urls = runIdToTempDir.get(runId);
+				if (urls == null) {
+					urls = new HashSet<SshUrl>();
+					runIdToTempDir.put(runId, urls);
+				}
+				URI uri = new URI(urlString);
+				String fullPath = uri.getPath();
+				String path = fullPath.substring(0, fullPath.lastIndexOf("/"));
+				String tempDir = fullPath.substring(fullPath.lastIndexOf("/"));
+				SshNode node = SshNodeFactory.getInstance().getSshNode(
+						uri.getHost(), uri.getPort(), path);
+				SshUrl newUrl = new SshUrl(node);
+				newUrl.setSubDirectory(tempDir);
+				urls.add(newUrl);
+				line = reader.readLine();
+			}
+		} catch (FileNotFoundException e) {
+			logger.error(e);
+		} catch (URISyntaxException e) {
+			logger.error(e);
+		} catch (IOException e) {
+			logger.error(e);
+		} finally {
+			if (reader != null) {
+				try {
+					reader.close();
+				} catch (IOException e) {
+					logger.error(e);
+				}
+			}
+		}
+	}
+
+	public static void persist(File directory) {
+		File invocationsFile = new File(directory, SSH_INVOCATION_FILE);
+		BufferedWriter writer = null;
+		try {
+			writer = new BufferedWriter(new FileWriter(invocationsFile));
+			for (String runId : runIdToTempDir.keySet()) {
+				for (SshUrl url : runIdToTempDir.get(runId)) {
+					writer.write(runId);
+					writer.write(" ");
+					writer.write(url.toString());
+					writer.newLine();
+				}
+			}
+		} catch (IOException e) {
+			logger.error(e);
+		} finally {
+			if (writer != null) {
+				try {
+					writer.close();
+				} catch (IOException e) {
+					logger.error(e);
+				}
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ExternalReferenceSPI
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ExternalReferenceSPI b/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ExternalReferenceSPI
index 6a18935..d63d896 100644
--- a/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ExternalReferenceSPI
+++ b/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ExternalReferenceSPI
@@ -1,2 +1,2 @@
 # Implementation classes of ExternalReferenceSPI go here, one per line
-de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshReference
+org.apache.taverna.activities.externaltool.invocation.ssh.SshReference

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ValueToReferenceConverterSPI
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ValueToReferenceConverterSPI b/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ValueToReferenceConverterSPI
index 53ca06c..50c5a16 100644
--- a/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ValueToReferenceConverterSPI
+++ b/taverna-external-tool-activity/src/main/resources/META-INF/services/org.apache.taverna.reference.ValueToReferenceConverterSPI
@@ -1,3 +1,3 @@
 # Implementation classes of ValueToReferenceConverterSPI go here, one per line
-de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshUrlToSshReference
+org.apache.taverna.activities.externaltool.invocation.ssh.SshUrlToSshReference
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/resources/META-INF/spring/external-tool-activity-context.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/resources/META-INF/spring/external-tool-activity-context.xml b/taverna-external-tool-activity/src/main/resources/META-INF/spring/external-tool-activity-context.xml
index d933de9..297fc8d 100644
--- a/taverna-external-tool-activity/src/main/resources/META-INF/spring/external-tool-activity-context.xml
+++ b/taverna-external-tool-activity/src/main/resources/META-INF/spring/external-tool-activity-context.xml
@@ -21,7 +21,7 @@
 	xsi:schemaLocation="http://www.springframework.org/schema/beans
                       http://www.springframework.org/schema/beans/spring-beans.xsd">
 
-	<bean id="SshReference" class="de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshReference">
+	<bean id="SshReference" class="org.apache.taverna.activities.externaltool.invocation.ssh.SshReference">
 		<property name="credentialManager" ref="credentialManager" />
 	</bean>
 
@@ -37,7 +37,7 @@
 		<property name="invocationGroupManager" ref="invocationGroupManager" />
 	</bean>
 
-	<bean id="SshUrlToSshReference" class="de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshUrlToSshReference">
+	<bean id="SshUrlToSshReference" class="org.apache.taverna.activities.externaltool.invocation.ssh.SshUrlToSshReference">
 		<property name="credentialManager" ref="credentialManager" />
 	</bean>
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/98468d30/taverna-external-tool-activity/src/main/resources/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.hbm.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/resources/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.hbm.xml b/taverna-external-tool-activity/src/main/resources/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.hbm.xml
index 4f0a737..b67f6be 100644
--- a/taverna-external-tool-activity/src/main/resources/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.hbm.xml
+++ b/taverna-external-tool-activity/src/main/resources/de/uni_luebeck/inb/knowarc/usecases/invocation/ssh/SshReference.hbm.xml
@@ -23,7 +23,7 @@
 <!-- Hibernate mapping for ssh reference bean -->
 <hibernate-mapping>
 	<joined-subclass
-		name="de.uni_luebeck.inb.knowarc.usecases.invocation.ssh.SshReference"
+		name="org.apache.taverna.activities.externaltool.invocation.ssh.SshReference"
 		extends="org.apache.taverna.reference.AbstractExternalReference">
 		<!-- Link to primary key from abstract superclass -->
 		<key column="bean_id" />


[22/50] [abbrv] incubator-taverna-common-activities git commit: About Common Activities

Posted by st...@apache.org.
About Common Activities


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

Branch: refs/heads/docker
Commit: fe0d4c4cbf70917bd8e106835e260ee31cd5130f
Parents: 473641a
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon May 9 14:18:13 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon May 9 14:18:13 2016 +0100

----------------------------------------------------------------------
 README.md | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/fe0d4c4c/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 6e204b1..a90ae3e 100644
--- a/README.md
+++ b/README.md
@@ -17,10 +17,10 @@
 
 # Apache Taverna Common Activities
 
-Launcher for running
+Common Activities to be invoked as part of 
 [Apache Taverna](http://taverna.incubator.apache.org/) workflows.
 
-Note that except for command line parsing, this module relies on other
+Note that this module relies on other
 [Apache Taverna modules](http://taverna.incubator.apache.org/code) for
 the actual workflow execution.
 
@@ -108,6 +108,7 @@ that enforces Apache headers in every source file - to disable it, try:
 
     mvn clean install -Drat.skip=true
 
+
 # Export restrictions
 
 This distribution includes cryptographic software.


[02/50] [abbrv] incubator-taverna-common-activities git commit: rat-ignore (public domain)

Posted by st...@apache.org.
rat-ignore (public domain)


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

Branch: refs/heads/docker
Commit: 335831a1285a68f33149ff86a826cf7c58f97fc0
Parents: aff32db
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Apr 28 16:57:49 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Apr 28 19:35:11 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/335831a1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ea4a527..a42d071 100644
--- a/pom.xml
+++ b/pom.xml
@@ -71,6 +71,7 @@
 					<excludes combine.children="append">
 						<exclude>**/src/main/resources/META-INF/soap-encoding.xsd</exclude> <!-- W3C Software License (See NOTICE) -->
 						<exclude>**/src/test/resources/test-spreadsheet*</exclude> <!--  Our own test spreadsheets -->
+						<exclude>**/src/main/resources/json2.js</exclude><!-- public domain -->
 					</excludes>
 				</configuration>
 			</plugin>


[31/50] [abbrv] incubator-taverna-common-activities git commit: [maven-release-plugin] prepare release 2.1.0-incubating-RC1

Posted by st...@apache.org.
[maven-release-plugin] prepare release 2.1.0-incubating-RC1


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

Branch: refs/heads/docker
Commit: c604cc7c93098e93073917ecb57167f879ae6e31
Parents: a4d453c
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue May 31 14:25:05 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue May 31 14:25:05 2016 +0100

----------------------------------------------------------------------
 pom.xml                                     |   7 +-
 taverna-beanshell-activity/pom.xml          |   5 +-
 taverna-external-tool-activity/pom.xml      |   5 +-
 taverna-interaction-activity/pom.xml        |   7 +-
 taverna-rest-activity/pom.xml               | 189 +++++++++++------------
 taverna-spreadsheet-import-activity/pom.xml |   5 +-
 taverna-wsdl-activity/pom.xml               |   5 +-
 taverna-wsdl-generic/pom.xml                |   5 +-
 taverna-xpath-activity/pom.xml              |  95 ++++++------
 9 files changed, 157 insertions(+), 166 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/c604cc7c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5d9dd41..33de8ce 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,8 +17,7 @@
     limitations under the License.
 
 -->
-<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">
+<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>
@@ -27,7 +26,7 @@
     </parent>
     <groupId>org.apache.taverna.commonactivities</groupId>
     <artifactId>apache-taverna-common-activities</artifactId>
-    <version>2.1.0-incubating-SNAPSHOT</version>
+    <version>2.1.0-incubating</version>
     <packaging>pom</packaging>
     <name>Apache Taverna Common Activities</name>
     <properties>
@@ -91,7 +90,7 @@
         <connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</developerConnection>
         <url>https://github.com/apache/incubator-taverna-common-activities</url>
-        <tag>HEAD</tag>
+        <tag>2.1.0-incubating-RC1</tag>
     </scm>
     <repositories>
         <repository>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/c604cc7c/taverna-beanshell-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity/pom.xml b/taverna-beanshell-activity/pom.xml
index 204fa8b..79079d7 100644
--- a/taverna-beanshell-activity/pom.xml
+++ b/taverna-beanshell-activity/pom.xml
@@ -17,13 +17,12 @@
     limitations under the License.
 
 -->
-<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">
+<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>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-beanshell-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/c604cc7c/taverna-external-tool-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/pom.xml b/taverna-external-tool-activity/pom.xml
index 2bb053e..4a36065 100644
--- a/taverna-external-tool-activity/pom.xml
+++ b/taverna-external-tool-activity/pom.xml
@@ -17,13 +17,12 @@
     limitations under the License.
 
 -->
-<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">
+<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>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-external-tool-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/c604cc7c/taverna-interaction-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/pom.xml b/taverna-interaction-activity/pom.xml
index cfde90f..9a1d736 100644
--- a/taverna-interaction-activity/pom.xml
+++ b/taverna-interaction-activity/pom.xml
@@ -17,13 +17,12 @@
     limitations under the License.
 
 -->
-<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">
+<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>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-interaction-activity</artifactId>
 	<packaging>bundle</packaging>
@@ -37,7 +36,7 @@
 				<configuration>
 					<instructions>
 					<!--  Export nothing -->
-						<Export-Package></Export-Package>
+						<Export-Package />
 						<Embed-Transitive>true</Embed-Transitive>
 						<Embed-Dependency>webdav-servlet</Embed-Dependency>
 					</instructions>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/c604cc7c/taverna-rest-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-rest-activity/pom.xml b/taverna-rest-activity/pom.xml
index 14cc298..e9b6fd1 100644
--- a/taverna-rest-activity/pom.xml
+++ b/taverna-rest-activity/pom.xml
@@ -17,98 +17,97 @@
     limitations under the License.
 
 -->
-<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>org.apache.taverna.commonactivities</groupId>
-		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
-	</parent>
-	<artifactId>taverna-rest-activity</artifactId>
-	<name>Apache Taverna REST Activity</name>
-	<packaging>bundle</packaging>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.taverna.engine</groupId>
-			<artifactId>taverna-reference-api</artifactId>
-			<version>${taverna.engine.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.taverna.engine</groupId>
-			<artifactId>taverna-workflowmodel-api</artifactId>
-			<version>${taverna.engine.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.taverna.engine</groupId>
-			<artifactId>taverna-credential-manager-api</artifactId>
-			<version>${taverna.engine.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>commons-codec</groupId>
-			<artifactId>commons-codec</artifactId>
-			<version>${commons.codec.version}</version>
-		</dependency>
-
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient-osgi</artifactId>
-            <version>${apache.httpclient.version}</version>
-            <exclusions>
-              <!-- These are all embedded within httpclient-osgi -->
-              <exclusion>
-                <groupId>org.apache.httpcomponents</groupId>
-                <artifactId>httpclient</artifactId>
-              </exclusion>
-              <exclusion>
-                <groupId>commons-codec</groupId>
-                <artifactId>commons-codec</artifactId>
-              </exclusion>
-              <exclusion>
-                <groupId>org.apache.httpcomponents</groupId>
-                <artifactId>httpmime</artifactId>
-              </exclusion>
-              <exclusion>
-                <groupId>org.apache.httpcomponents</groupId>
-                <artifactId>httpclient-cache</artifactId>
-              </exclusion>
-              <exclusion>
-                <groupId>org.apache.httpcomponents</groupId>
-                <artifactId>fluent-hc</artifactId>
-              </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpcore-osgi</artifactId>
-            <version>${apache.httpcore.version}</version>
-            <exclusions>
-              <exclusion>
-                <groupId>org.apache.httpcomponents</groupId>
-                <artifactId>httpcore</artifactId>
-              </exclusion>
-              <exclusion>
-                <groupId>org.apache.httpcomponents</groupId>
-                <artifactId>httpcore-nio</artifactId>
-              </exclusion>
-            </exclusions>
-        </dependency>
-
-
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>${junit.version}</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.taverna.engine</groupId>
-			<artifactId>taverna-activity-test-utils</artifactId>
-			<version>${taverna.engine.version}</version>
-			<scope>test</scope>
-		</dependency>
-
-	</dependencies>
-</project>
+<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>org.apache.taverna.commonactivities</groupId>
+		<artifactId>apache-taverna-common-activities</artifactId>
+		<version>2.1.0-incubating</version>
+	</parent>
+	<artifactId>taverna-rest-activity</artifactId>
+	<name>Apache Taverna REST Activity</name>
+	<packaging>bundle</packaging>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.taverna.engine</groupId>
+			<artifactId>taverna-reference-api</artifactId>
+			<version>${taverna.engine.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.taverna.engine</groupId>
+			<artifactId>taverna-workflowmodel-api</artifactId>
+			<version>${taverna.engine.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.taverna.engine</groupId>
+			<artifactId>taverna-credential-manager-api</artifactId>
+			<version>${taverna.engine.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-codec</groupId>
+			<artifactId>commons-codec</artifactId>
+			<version>${commons.codec.version}</version>
+		</dependency>
+
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient-osgi</artifactId>
+            <version>${apache.httpclient.version}</version>
+            <exclusions>
+              <!-- These are all embedded within httpclient-osgi -->
+              <exclusion>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpclient</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>commons-codec</groupId>
+                <artifactId>commons-codec</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpmime</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpclient-cache</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>fluent-hc</artifactId>
+              </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore-osgi</artifactId>
+            <version>${apache.httpcore.version}</version>
+            <exclusions>
+              <exclusion>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpcore</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpcore-nio</artifactId>
+              </exclusion>
+            </exclusions>
+        </dependency>
+
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>${junit.version}</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.taverna.engine</groupId>
+			<artifactId>taverna-activity-test-utils</artifactId>
+			<version>${taverna.engine.version}</version>
+			<scope>test</scope>
+		</dependency>
+
+	</dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/c604cc7c/taverna-spreadsheet-import-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-spreadsheet-import-activity/pom.xml b/taverna-spreadsheet-import-activity/pom.xml
index 1256a10..6fdf508 100644
--- a/taverna-spreadsheet-import-activity/pom.xml
+++ b/taverna-spreadsheet-import-activity/pom.xml
@@ -17,13 +17,12 @@
     limitations under the License.
 
 -->
-<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">
+<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>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-spreadsheet-import-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/c604cc7c/taverna-wsdl-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity/pom.xml b/taverna-wsdl-activity/pom.xml
index cbee926..f82539b 100644
--- a/taverna-wsdl-activity/pom.xml
+++ b/taverna-wsdl-activity/pom.xml
@@ -17,13 +17,12 @@
     limitations under the License.
 
 -->
-<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">
+<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>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 	<artifactId>taverna-wsdl-activity</artifactId>
 	<packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/c604cc7c/taverna-wsdl-generic/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/pom.xml b/taverna-wsdl-generic/pom.xml
index 6229580..6c78be3 100644
--- a/taverna-wsdl-generic/pom.xml
+++ b/taverna-wsdl-generic/pom.xml
@@ -17,13 +17,12 @@
     limitations under the License.
 
 -->
-<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">
+<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>org.apache.taverna.commonactivities</groupId>
 		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
+		<version>2.1.0-incubating</version>
 	</parent>
 
 	<artifactId>taverna-wsdl-generic</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/c604cc7c/taverna-xpath-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-xpath-activity/pom.xml b/taverna-xpath-activity/pom.xml
index c15e4ff..b637f7e 100644
--- a/taverna-xpath-activity/pom.xml
+++ b/taverna-xpath-activity/pom.xml
@@ -17,52 +17,51 @@
     limitations under the License.
 
 -->
-<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.commonactivities</groupId>
-		<artifactId>apache-taverna-common-activities</artifactId>
-		<version>2.1.0-incubating-SNAPSHOT</version>
-	</parent>
-	<artifactId>taverna-xpath-activity</artifactId>
+<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.commonactivities</groupId>
+		<artifactId>apache-taverna-common-activities</artifactId>
+		<version>2.1.0-incubating</version>
+	</parent>
+	<artifactId>taverna-xpath-activity</artifactId>
 	<name>Apache Taverna XPath Activity</name>
-	<packaging>bundle</packaging>
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.felix</groupId>
-				<artifactId>maven-bundle-plugin</artifactId>
-				<extensions>true</extensions>
-				<configuration>
-					<instructions>
-						<Import-Package>org.jaxen,*</Import-Package>
-					</instructions>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.taverna.engine</groupId>
-			<artifactId>taverna-reference-api</artifactId>
-			<version>${taverna.engine.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.taverna.engine</groupId>
-			<artifactId>taverna-workflowmodel-api</artifactId>
-			<version>${taverna.engine.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>org.dom4j</groupId>
-			<artifactId>com.springsource.org.dom4j</artifactId>
-			<version>${dom4j.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.jaxen</groupId>
-			<artifactId>com.springsource.org.jaxen</artifactId>
-			<version>${jaxen.version}</version>
-		</dependency>
-	</dependencies>
-</project>
+	<packaging>bundle</packaging>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Import-Package>org.jaxen,*</Import-Package>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.taverna.engine</groupId>
+			<artifactId>taverna-reference-api</artifactId>
+			<version>${taverna.engine.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.taverna.engine</groupId>
+			<artifactId>taverna-workflowmodel-api</artifactId>
+			<version>${taverna.engine.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.dom4j</groupId>
+			<artifactId>com.springsource.org.dom4j</artifactId>
+			<version>${dom4j.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.jaxen</groupId>
+			<artifactId>com.springsource.org.jaxen</artifactId>
+			<version>${jaxen.version}</version>
+		</dependency>
+	</dependencies>
+</project>


[24/50] [abbrv] incubator-taverna-common-activities git commit: tab -> spaces

Posted by st...@apache.org.
tab -> spaces


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

Branch: refs/heads/docker
Commit: 4dee9aee5449071e1d5f44ae4bdfe68c21b88c20
Parents: e78c3ee
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon May 9 15:00:06 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon May 9 15:00:06 2016 +0100

----------------------------------------------------------------------
 pom.xml | 146 +++++++++++++++++++++++++++++------------------------------
 1 file changed, 73 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/4dee9aee/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a42d071..aa358ef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,80 +18,80 @@
 
 -->
 <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>apache-taverna-parent</artifactId>
-		<version>2-incubating</version>
-	</parent>
-	<groupId>org.apache.taverna.commonactivities</groupId>
-	<artifactId>apache-taverna-common-activities</artifactId>
-	<version>2.1.0-incubating-SNAPSHOT</version>
-	<packaging>pom</packaging>
-	<name>Apache Taverna Common Activities</name>
-	<properties>
+    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>apache-taverna-parent</artifactId>
+        <version>2-incubating</version>
+    </parent>
+    <groupId>org.apache.taverna.commonactivities</groupId>
+    <artifactId>apache-taverna-common-activities</artifactId>
+    <version>2.1.0-incubating-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>Apache Taverna Common Activities</name>
+    <properties>
 
-		<!-- Taverna dependency versions -->
-		<taverna.language.version>0.15.0-incubating</taverna.language.version>
-		<taverna.osgi.version>0.2.1-incubating</taverna.osgi.version>
-		<taverna.engine.version>3.1.0-incubating-SNAPSHOT</taverna.engine.version>
+        <!-- Taverna dependency versions -->
+        <taverna.language.version>0.15.0-incubating</taverna.language.version>
+        <taverna.osgi.version>0.2.1-incubating</taverna.osgi.version>
+        <taverna.engine.version>3.1.0-incubating-SNAPSHOT</taverna.engine.version>
 
-		<!-- Third-party dependency versios -->
-		<abdera.version>1.1.3</abdera.version>
-		<bsh.version>2.0b6</bsh.version>
-		<servicemix.javax.wsdl.version>1.6.3_1</servicemix.javax.wsdl.version>
-		<javacsv.version>2.0</javacsv.version>
-		<jsch.version>1.0.6.RELEASE</jsch.version>
-		<odfdom.version>0.7</odfdom.version>
-		<!-- <odfdom.version>0.8.8-incubating</odfdom.version> -->
-		<santuario.xmlsec.version>1.5.7</santuario.xmlsec.version>
-		<xmlschema.version>2.2.1</xmlschema.version>
-		<velocity.version>1.7</velocity.version>
-		<webdavservlet.version>2.0</webdavservlet.version>
-		<woden.version>1.0M10</woden.version>
-		<wss4j.version>1.6.18</wss4j.version>
-	</properties>
-	<modules>
-		<module>taverna-beanshell-activity</module>
-		<module>taverna-external-tool-activity</module>
-		<module>taverna-interaction-activity</module>
-		<module>taverna-rest-activity</module>
-		<module>taverna-spreadsheet-import-activity</module>
-		<module>taverna-wsdl-activity</module>
-		<module>taverna-wsdl-generic</module>
-		<module>taverna-xpath-activity</module>
-	</modules>
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.rat</groupId>
-				<artifactId>apache-rat-plugin</artifactId>
-				<configuration>
-					<excludes combine.children="append">
-						<exclude>**/src/main/resources/META-INF/soap-encoding.xsd</exclude> <!-- W3C Software License (See NOTICE) -->
-						<exclude>**/src/test/resources/test-spreadsheet*</exclude> <!--  Our own test spreadsheets -->
-						<exclude>**/src/main/resources/json2.js</exclude><!-- public domain -->
-					</excludes>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>	
-	<scm>
-		<connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</connection>
-		<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</developerConnection>
-		<url>https://github.com/apache/incubator-taverna-common-activities</url>
-		<tag>HEAD</tag>
-	</scm>
-	<repositories>
-		<repository>
-			<id>apache.snapshots</id>
-			<name>Apache Snapshot Repository</name>
-			<url>http://repository.apache.org/snapshots</url>
-			<releases>
-				<enabled>false</enabled>
-			</releases>
-		</repository>
-	</repositories>
+        <!-- Third-party dependency versios -->
+        <abdera.version>1.1.3</abdera.version>
+        <bsh.version>2.0b6</bsh.version>
+        <servicemix.javax.wsdl.version>1.6.3_1</servicemix.javax.wsdl.version>
+        <javacsv.version>2.0</javacsv.version>
+        <jsch.version>1.0.6.RELEASE</jsch.version>
+        <odfdom.version>0.7</odfdom.version>
+        <!-- <odfdom.version>0.8.8-incubating</odfdom.version> -->
+        <santuario.xmlsec.version>1.5.7</santuario.xmlsec.version>
+        <xmlschema.version>2.2.1</xmlschema.version>
+        <velocity.version>1.7</velocity.version>
+        <webdavservlet.version>2.0</webdavservlet.version>
+        <woden.version>1.0M10</woden.version>
+        <wss4j.version>1.6.18</wss4j.version>
+    </properties>
+    <modules>
+        <module>taverna-beanshell-activity</module>
+        <module>taverna-external-tool-activity</module>
+        <module>taverna-interaction-activity</module>
+        <module>taverna-rest-activity</module>
+        <module>taverna-spreadsheet-import-activity</module>
+        <module>taverna-wsdl-activity</module>
+        <module>taverna-wsdl-generic</module>
+        <module>taverna-xpath-activity</module>
+    </modules>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <configuration>
+                    <excludes combine.children="append">
+                        <exclude>**/src/main/resources/META-INF/soap-encoding.xsd</exclude> <!-- W3C Software License (See NOTICE) -->
+                        <exclude>**/src/test/resources/test-spreadsheet*</exclude> <!--  Our own test spreadsheets -->
+                        <exclude>**/src/main/resources/json2.js</exclude><!-- public domain -->
+                    </excludes>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>    
+    <scm>
+        <connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</connection>
+        <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities.git</developerConnection>
+        <url>https://github.com/apache/incubator-taverna-common-activities</url>
+        <tag>HEAD</tag>
+    </scm>
+    <repositories>
+        <repository>
+            <id>apache.snapshots</id>
+            <name>Apache Snapshot Repository</name>
+            <url>http://repository.apache.org/snapshots</url>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+        </repository>
+    </repositories>
 
 </project>


[34/50] [abbrv] incubator-taverna-common-activities git commit: Use taverna.engine 3.1.0-incubating

Posted by st...@apache.org.
Use taverna.engine 3.1.0-incubating


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

Branch: refs/heads/docker
Commit: e75d5b3cb569bdc10af04e2123784d58df7278d6
Parents: 9de4266
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed Jun 1 00:12:47 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed Jun 1 00:12:47 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/e75d5b3c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7f1c439..89a9fbf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
         <!-- Taverna dependency versions -->
         <taverna.language.version>0.15.0-incubating</taverna.language.version>
         <taverna.osgi.version>0.2.1-incubating</taverna.osgi.version>
-        <taverna.engine.version>3.1.0-incubating-SNAPSHOT</taverna.engine.version>
+        <taverna.engine.version>3.1.0-incubating</taverna.engine.version>
 
         <!-- Third-party dependency versios -->
         <abdera.version>1.1.3</abdera.version>


[19/50] [abbrv] incubator-taverna-common-activities git commit: README typos

Posted by st...@apache.org.
README typos


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

Branch: refs/heads/docker
Commit: 736b923b81301d9577b7d3121ebbf1356e5b00f2
Parents: aed86a8
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu May 5 17:01:21 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu May 5 17:01:21 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/736b923b/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 5213e04..b7fdc03 100644
--- a/README.md
+++ b/README.md
@@ -134,7 +134,7 @@ The following provides more details on the included cryptographic software:
 * [taverna-rest-activity](taverna-rest-activity)
   depend on
   [Apache HttpComponents](https://hc.apache.org/) Client,
-  which can be configured to initiate
+  and can be configured to initiate
   `https://` connections.
 * [taverna-wsdl-generic](taverna-wsdl-generic)
   and [taverna-wsdl-activity](taverna-wsdl-activity) uses
@@ -152,3 +152,4 @@ The following provides more details on the included cryptographic software:
   which includes UnixCrypt.java for one way cryptography, and can be
   configured for SSL encryption using
   [Java Secure Socket Extension](https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html)
+


[03/50] [abbrv] incubator-taverna-common-activities git commit: TAVERNA-959: more Export Restrictions

Posted by st...@apache.org.
TAVERNA-959: more Export Restrictions


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

Branch: refs/heads/docker
Commit: 8e6553fd43cf6e01a75d73adf73bd99c2418494e
Parents: 335831a
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Sun May 1 19:05:21 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Sun May 1 19:05:21 2016 +0100

----------------------------------------------------------------------
 README.md | 29 ++++++++++++++++++++---------
 1 file changed, 20 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/8e6553fd/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index d77d70b..f139215 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ the actual workflow execution.
 
 (c) 2007-2014 University of Manchester
 
-(c) 2014-2015 Apache Software Foundation
+(c) 2014-2016 Apache Software Foundation
 
 This product includes software developed at The
 [Apache Software Foundation](http://www.apache.org/).
@@ -131,12 +131,23 @@ for both object code and source code.
 
 The following provides more details on the included cryptographic software:
 
-* `taverna-rest-activity` uses Apache HttpComponents SSL support if
-  accessing `https://` connections.
-* `taverna-wsdl-generic` and `taverna-wsdl-activity` uses 
-  Java Secure Socket Extension (JSSE),
-  Apache WSS4J and  Apache XML Security for Java if accessing
-  secure SOAP Web Services.
-* This software relies on Apache Taverna Engine's Credential Manager for
+* [taverna-rest-activity](taverna-rest-activity)
+  depend on
+  [Apache HttpComponents](https://hc.apache.org/) Client,
+  which can be configured to initiate
+  `https://` connections.
+* [taverna-wsdl-generic](taverna-wsdl-generic)
+  and [taverna-wsdl-activity](taverna-wsdl-activity) uses
+  [Java Secure Socket Extension](https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html)
+  (JSSE) and depend on
+  [Apache WSS4J](https://ws.apache.org/wss4j/),
+  [Apache XML Security for Java](https://santuario.apache.org/javaindex.html)
+  and [Open SAML Java](https://shibboleth.net/products/opensaml-java.html))
+  for accessing secure SOAP Web Services.
+* Apache Taverna Common Activities depends on the
+  [Apache Taverna Engine](http://taverna.incubator.apache.org/download/engine/)
+  Credential Manager API for
   management of username/password and client/server SSL certificates.
-
+* [taverna-interaction-activity](taverna-interaction-activity) depend on
+  [Jetty](http://www.eclipse.org/jetty/),
+  which includes UnixCrypt.java for one way cryptography.


[13/50] [abbrv] incubator-taverna-common-activities git commit: UseCaseInvocation -> ToolInvocation

Posted by st...@apache.org.
UseCaseInvocation -> ToolInvocation


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

Branch: refs/heads/docker
Commit: 3c48b20aa4e8d6cbfcdee819699a56c63b1927bd
Parents: 5bce4cb
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed May 4 01:05:38 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed May 4 01:05:38 2016 +0100

----------------------------------------------------------------------
 .../externaltool/ExternalToolActivity.java      |   8 +-
 .../externaltool/InvocationCreator.java         |   4 +-
 .../externaltool/invocation/ToolInvocation.java | 321 +++++++++++++++++++
 .../invocation/UseCaseInvocation.java           | 321 -------------------
 .../local/LocalInvocationCreator.java           |   6 +-
 .../local/LocalUseCaseInvocation.java           |   4 +-
 .../externaltool/ssh/SshInvocationCreator.java  |   4 +-
 .../externaltool/ssh/SshUseCaseInvocation.java  |   4 +-
 8 files changed, 336 insertions(+), 336 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/3c48b20a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java
index 167f424..b2fae4e 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ExternalToolActivity.java
@@ -29,7 +29,7 @@ import org.apache.taverna.activities.externaltool.desc.ScriptInputUser;
 import org.apache.taverna.activities.externaltool.desc.ScriptOutput;
 import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
 import org.apache.taverna.activities.externaltool.invocation.InvocationException;
-import org.apache.taverna.activities.externaltool.invocation.UseCaseInvocation;
+import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
 import org.apache.taverna.activities.externaltool.manager.InvocationGroup;
 import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
 import org.apache.taverna.annotation.Annotated;
@@ -215,7 +215,7 @@ public class ExternalToolActivity extends AbstractAsynchronousActivity<ExternalT
 
 			public void run() {
 				ReferenceService referenceService = callback.getContext().getReferenceService();
-				UseCaseInvocation invoke = null;
+				ToolInvocation invoke = null;
 
 				/**
 				 * Note that retrying needs to be either done via Taverna's retry mechanism or as part of the specific invocation
@@ -280,8 +280,8 @@ public class ExternalToolActivity extends AbstractAsynchronousActivity<ExternalT
 		this.invocationCreators = invocationCreators;
 	}
 
-	private UseCaseInvocation getInvocation(InvocationMechanism mechanism, UseCaseDescription description, Map<String, T2Reference> data, ReferenceService referenceService) {
-		UseCaseInvocation result = null;
+	private ToolInvocation getInvocation(InvocationMechanism mechanism, UseCaseDescription description, Map<String, T2Reference> data, ReferenceService referenceService) {
+		ToolInvocation result = null;
 		InvocationCreator creator = null;
 		for (InvocationCreator c : invocationCreators) {
 			if (c.canHandle(mechanism.getType())) {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/3c48b20a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java
index 6bf729c..b5394c4 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/InvocationCreator.java
@@ -22,7 +22,7 @@ package org.apache.taverna.activities.externaltool;
 import java.util.Map;
 
 import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
-import org.apache.taverna.activities.externaltool.invocation.UseCaseInvocation;
+import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
 import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
 import org.apache.taverna.reference.ReferenceService;
 import org.apache.taverna.reference.T2Reference;
@@ -35,6 +35,6 @@ public interface InvocationCreator {
 	
 	public boolean canHandle(String mechanismType);
 	
-	public UseCaseInvocation convert(InvocationMechanism mechanism, UseCaseDescription description, Map<String, T2Reference> data, ReferenceService referenceService);
+	public ToolInvocation convert(InvocationMechanism mechanism, UseCaseDescription description, Map<String, T2Reference> data, ReferenceService referenceService);
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/3c48b20a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/ToolInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/ToolInvocation.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/ToolInvocation.java
new file mode 100644
index 0000000..485f613
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/ToolInvocation.java
@@ -0,0 +1,321 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.invocation;
+
+import java.io.BufferedWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.taverna.activities.externaltool.desc.ScriptInput;
+import org.apache.taverna.activities.externaltool.desc.ScriptInputStatic;
+import org.apache.taverna.activities.externaltool.desc.ScriptInputUser;
+import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.invocation.InvocationContext;
+import org.apache.taverna.reference.ExternalReferenceSPI;
+import org.apache.taverna.reference.Identified;
+import org.apache.taverna.reference.IdentifiedList;
+import org.apache.taverna.reference.ReferenceService;
+import org.apache.taverna.reference.ReferenceServiceException;
+import org.apache.taverna.reference.ReferenceSet;
+import org.apache.taverna.reference.T2Reference;
+import org.apache.taverna.reference.impl.external.object.InlineByteArrayReferenceBuilder;
+import org.apache.taverna.reference.impl.external.object.InlineStringReferenceBuilder;
+
+/**
+ * An abstraction of various forms to bring job using the software that is
+ * referenced as a use case towards their execution.
+ * 
+ * @author Hajo Nils Krabbenhoeft with some contribution by
+ * @author Steffen Moeller
+ */
+public abstract class ToolInvocation {
+	
+	private String runId;
+	
+	
+	protected static String getActualOsCommand(String osCommand, String pathToOriginal,
+			String targetName, String pathTarget) {
+				String actualOsCommand = osCommand;
+				actualOsCommand = actualOsCommand.replace("%%PATH_TO_ORIGINAL%%", pathToOriginal);
+				actualOsCommand = actualOsCommand.replace("%%TARGET_NAME%%", targetName);
+				actualOsCommand = actualOsCommand.replace("%%PATH_TO_TARGET%%", pathTarget);
+				return actualOsCommand;
+			}
+
+	protected UseCaseDescription usecase;
+	protected final HashMap<String, String> tags = new HashMap<String, String>();
+	protected int nTempFiles = 0;
+	private static int submissionID = 0;
+	protected static InlineByteArrayReferenceBuilder inlineByteArrayReferenceBuilder = new InlineByteArrayReferenceBuilder();
+	protected static InlineStringReferenceBuilder inlineStringReferenceBuilder = new InlineStringReferenceBuilder();
+	private InvocationContext invocationContext;
+	private boolean retrieveData;
+	
+	/*
+	 * get the class of the data we expect for a given input
+	 */
+	@SuppressWarnings("unchecked")
+	public Class getType(String inputName) {
+		if (!usecase.getInputs().containsKey(inputName))
+			return null;
+		ScriptInputUser input = (ScriptInputUser) usecase.getInputs().get(inputName);
+		if (input.isList()) {
+			if (input.isBinary())
+				return List.class;
+			else
+				return List.class;
+		} else {
+			if (input.isBinary())
+				return byte[].class;
+			else
+				return String.class;
+		}
+	}
+
+	/*
+	 * get a list of all the input port names
+	 */
+	public Set<String> getInputs() {
+		return usecase.getInputs().keySet();
+	}
+
+
+	/*
+	 * get a id, incremented with each job. thus, this should be thread-wide
+	 * unique
+	 */
+	public synchronized int getSubmissionID() {
+		return submissionID++;
+	}
+
+	/*
+	 * set the data for the input port with given name
+	 */
+	@SuppressWarnings("unchecked")
+	public void setInput(String inputName, ReferenceService referenceService, T2Reference t2Reference) throws InvocationException {
+		if (t2Reference == null) {
+			throw new InvocationException("No input specified for " + inputName);
+		}
+		ScriptInputUser input = (ScriptInputUser) usecase.getInputs().get(inputName);
+		if (input.isList()) {
+			IdentifiedList<T2Reference> listOfReferences = (IdentifiedList<T2Reference>) referenceService
+					.getListService().getList(t2Reference);
+
+			if (!input.isConcatenate()) {
+				// this is a list input (not concatenated)
+				// so write every element to its own temporary file
+				// and create a filelist file
+
+				// we need to write the list elements to temporary files
+				ScriptInputUser listElementTemp = new ScriptInputUser();
+				listElementTemp.setBinary(input.isBinary());
+				listElementTemp.setTempFile(true);
+
+				String lineEndChar = "\n";
+				if (!input.isFile() && !input.isTempFile()) {
+					lineEndChar = " ";
+				}
+
+				String listFileContent = "";
+				String filenamesFileContent = "";
+				// create a list of all temp file names
+				for (T2Reference cur : listOfReferences) {
+					String tmp = setOneInput(referenceService, cur,
+							listElementTemp);
+					listFileContent += tmp + lineEndChar;
+					int ind = tmp.lastIndexOf('/');
+					if (ind == -1) {
+						ind = tmp.lastIndexOf('\\');
+					}
+					if (ind != -1) {
+						tmp = tmp.substring(ind + 1);
+					}
+					filenamesFileContent += tmp + lineEndChar;
+				}
+
+				// how do we want the listfile to be stored?
+				ScriptInputUser listFile = new ScriptInputUser();
+				listFile.setBinary(false); // since its a list file
+				listFile.setFile(input.isFile());
+				listFile.setTempFile(input.isTempFile());
+				listFile.setTag(input.getTag());
+				T2Reference listFileContentReference = referenceService
+						.register(listFileContent, 0, true, invocationContext);
+
+				tags.put(listFile.getTag(), setOneInput(referenceService,
+						listFileContentReference, listFile));
+
+				listFile.setTag(input.getTag() + "_NAMES");
+				T2Reference filenamesFileContentReference = referenceService
+						.register(filenamesFileContent, 0, true, null);
+				tags.put(listFile.getTag(), setOneInput(referenceService,
+						filenamesFileContentReference, listFile));
+			} else {
+				try {
+					// first, concatenate all data
+					if (input.isBinary()) {
+						ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+						BufferedWriter outputWriter = new BufferedWriter(
+								new OutputStreamWriter(outputStream));
+						for (T2Reference cur : listOfReferences) {
+							InputStreamReader inputReader = new InputStreamReader(
+									getAsStream(referenceService, cur));
+							IOUtils.copyLarge(inputReader, outputWriter);
+							inputReader.close();
+						}
+						outputWriter.close();
+						T2Reference binaryReference = referenceService
+								.register(outputStream.toByteArray(), 0, true,
+										invocationContext);
+						tags.put(input.getTag(), setOneInput(referenceService,
+								binaryReference, input));
+					} else {
+						ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+						BufferedWriter outputWriter = new BufferedWriter(
+								new OutputStreamWriter(outputStream));
+						for (T2Reference cur : listOfReferences) {
+							InputStreamReader inputReader = new InputStreamReader(
+									getAsStream(referenceService, cur));
+							IOUtils.copyLarge(inputReader, outputWriter);
+							outputWriter.write(" ");
+							inputReader.close();
+						}
+						outputWriter.close();
+						T2Reference binaryReference = referenceService
+								.register(outputStream.toByteArray(), 0, true,
+										invocationContext);
+						tags.put(input.getTag(), setOneInput(referenceService,
+								binaryReference, input));
+					}
+				} catch (IOException e) {
+					throw new InvocationException(e);
+				}
+			}
+		} else {
+			tags.put(input.getTag(), setOneInput(referenceService, t2Reference,
+					input));
+		}
+	}
+
+	/*
+	 * submit a grid job and wait for it to finish, then get the result as
+	 * on-demand downloads or directly as data (in case of local execution)
+	 */
+	public HashMap<String, Object> Submit(ReferenceService referenceService) throws InvocationException {
+		submit_generate_job(referenceService);
+		return submit_wait_fetch_results(referenceService);
+	}
+
+	/*
+	 * just submit the job. useful if you want to wait for it to finish later on
+	 * 
+	 * Can the statics be made more static?
+	 */
+	public void submit_generate_job(ReferenceService referenceService) throws InvocationException {
+		for (ScriptInputStatic input : usecase.getStatic_inputs()) {
+			T2Reference ref;
+			if (input.getUrl() != null) {
+				// Does this work OK with binary
+				try {
+					ref = referenceService.register(new URL(input.getUrl()), 0, true, null);
+				} catch (ReferenceServiceException e) {
+					throw new InvocationException(e);
+				} catch (MalformedURLException e) {
+					throw new InvocationException(e);
+				}
+			} else {
+				ref = referenceService.register((String) input.getContent(), 0, true, null);
+			}
+				tags.put(input.getTag(), setOneInput(referenceService, ref, input));
+			
+		}
+		submit_generate_job_inner();
+	}
+
+	protected abstract void submit_generate_job_inner() throws InvocationException;
+
+	/*
+	 * wait for a submitted job to finish and fetch the results
+	 */
+	public abstract HashMap<String, Object> submit_wait_fetch_results(ReferenceService referenceService) throws InvocationException;
+
+	public abstract String setOneInput(ReferenceService referenceService, T2Reference t2Reference, ScriptInput input) throws InvocationException;
+
+	protected InputStream getAsStream(ReferenceService referenceService, T2Reference t2Reference) {
+		Identified identified = referenceService.resolveIdentifier(t2Reference, null, null);
+		if (identified instanceof ReferenceSet) {
+			ExternalReferenceSPI ref = ((ReferenceSet) identified).getExternalReferences().iterator().next();
+			return ref.openStream(invocationContext);
+		}
+		return null;
+	}
+
+	public void setContext(InvocationContext context) {
+		this.invocationContext = context;
+		
+	}
+	
+	public InvocationContext getContext() {
+		return this.invocationContext;
+	}
+
+	public abstract void setStdIn(ReferenceService referenceService,
+			T2Reference t2Reference);
+
+	public abstract void rememberRun(String runId);
+
+	/**
+	 * @return the runId
+	 */
+	protected String getRunId() {
+		return runId;
+	}
+
+	/**
+	 * @param runId the runId to set
+	 */
+	protected void setRunId(String runId) {
+		this.runId = runId;
+	}
+
+	/**
+	 * @return the retrieveData
+	 */
+	protected boolean isRetrieveData() {
+		return retrieveData;
+	}
+
+	/**
+	 * @param retrieveData the retrieveData to set
+	 */
+	protected void setRetrieveData(boolean retrieveData) {
+		this.retrieveData = retrieveData;
+	}
+	
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/3c48b20a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/UseCaseInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/UseCaseInvocation.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/UseCaseInvocation.java
deleted file mode 100644
index 4d97030..0000000
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/invocation/UseCaseInvocation.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.taverna.activities.externaltool.invocation;
-
-import java.io.BufferedWriter;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.taverna.activities.externaltool.desc.ScriptInput;
-import org.apache.taverna.activities.externaltool.desc.ScriptInputStatic;
-import org.apache.taverna.activities.externaltool.desc.ScriptInputUser;
-import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
-import org.apache.taverna.invocation.InvocationContext;
-import org.apache.taverna.reference.ExternalReferenceSPI;
-import org.apache.taverna.reference.Identified;
-import org.apache.taverna.reference.IdentifiedList;
-import org.apache.taverna.reference.ReferenceService;
-import org.apache.taverna.reference.ReferenceServiceException;
-import org.apache.taverna.reference.ReferenceSet;
-import org.apache.taverna.reference.T2Reference;
-import org.apache.taverna.reference.impl.external.object.InlineByteArrayReferenceBuilder;
-import org.apache.taverna.reference.impl.external.object.InlineStringReferenceBuilder;
-
-/**
- * An abstraction of various forms to bring job using the software that is
- * referenced as a use case towards their execution.
- * 
- * @author Hajo Nils Krabbenhoeft with some contribution by
- * @author Steffen Moeller
- */
-public abstract class UseCaseInvocation {
-	
-	private String runId;
-	
-	
-	protected static String getActualOsCommand(String osCommand, String pathToOriginal,
-			String targetName, String pathTarget) {
-				String actualOsCommand = osCommand;
-				actualOsCommand = actualOsCommand.replace("%%PATH_TO_ORIGINAL%%", pathToOriginal);
-				actualOsCommand = actualOsCommand.replace("%%TARGET_NAME%%", targetName);
-				actualOsCommand = actualOsCommand.replace("%%PATH_TO_TARGET%%", pathTarget);
-				return actualOsCommand;
-			}
-
-	protected UseCaseDescription usecase;
-	protected final HashMap<String, String> tags = new HashMap<String, String>();
-	protected int nTempFiles = 0;
-	private static int submissionID = 0;
-	protected static InlineByteArrayReferenceBuilder inlineByteArrayReferenceBuilder = new InlineByteArrayReferenceBuilder();
-	protected static InlineStringReferenceBuilder inlineStringReferenceBuilder = new InlineStringReferenceBuilder();
-	private InvocationContext invocationContext;
-	private boolean retrieveData;
-	
-	/*
-	 * get the class of the data we expect for a given input
-	 */
-	@SuppressWarnings("unchecked")
-	public Class getType(String inputName) {
-		if (!usecase.getInputs().containsKey(inputName))
-			return null;
-		ScriptInputUser input = (ScriptInputUser) usecase.getInputs().get(inputName);
-		if (input.isList()) {
-			if (input.isBinary())
-				return List.class;
-			else
-				return List.class;
-		} else {
-			if (input.isBinary())
-				return byte[].class;
-			else
-				return String.class;
-		}
-	}
-
-	/*
-	 * get a list of all the input port names
-	 */
-	public Set<String> getInputs() {
-		return usecase.getInputs().keySet();
-	}
-
-
-	/*
-	 * get a id, incremented with each job. thus, this should be thread-wide
-	 * unique
-	 */
-	public synchronized int getSubmissionID() {
-		return submissionID++;
-	}
-
-	/*
-	 * set the data for the input port with given name
-	 */
-	@SuppressWarnings("unchecked")
-	public void setInput(String inputName, ReferenceService referenceService, T2Reference t2Reference) throws InvocationException {
-		if (t2Reference == null) {
-			throw new InvocationException("No input specified for " + inputName);
-		}
-		ScriptInputUser input = (ScriptInputUser) usecase.getInputs().get(inputName);
-		if (input.isList()) {
-			IdentifiedList<T2Reference> listOfReferences = (IdentifiedList<T2Reference>) referenceService
-					.getListService().getList(t2Reference);
-
-			if (!input.isConcatenate()) {
-				// this is a list input (not concatenated)
-				// so write every element to its own temporary file
-				// and create a filelist file
-
-				// we need to write the list elements to temporary files
-				ScriptInputUser listElementTemp = new ScriptInputUser();
-				listElementTemp.setBinary(input.isBinary());
-				listElementTemp.setTempFile(true);
-
-				String lineEndChar = "\n";
-				if (!input.isFile() && !input.isTempFile()) {
-					lineEndChar = " ";
-				}
-
-				String listFileContent = "";
-				String filenamesFileContent = "";
-				// create a list of all temp file names
-				for (T2Reference cur : listOfReferences) {
-					String tmp = setOneInput(referenceService, cur,
-							listElementTemp);
-					listFileContent += tmp + lineEndChar;
-					int ind = tmp.lastIndexOf('/');
-					if (ind == -1) {
-						ind = tmp.lastIndexOf('\\');
-					}
-					if (ind != -1) {
-						tmp = tmp.substring(ind + 1);
-					}
-					filenamesFileContent += tmp + lineEndChar;
-				}
-
-				// how do we want the listfile to be stored?
-				ScriptInputUser listFile = new ScriptInputUser();
-				listFile.setBinary(false); // since its a list file
-				listFile.setFile(input.isFile());
-				listFile.setTempFile(input.isTempFile());
-				listFile.setTag(input.getTag());
-				T2Reference listFileContentReference = referenceService
-						.register(listFileContent, 0, true, invocationContext);
-
-				tags.put(listFile.getTag(), setOneInput(referenceService,
-						listFileContentReference, listFile));
-
-				listFile.setTag(input.getTag() + "_NAMES");
-				T2Reference filenamesFileContentReference = referenceService
-						.register(filenamesFileContent, 0, true, null);
-				tags.put(listFile.getTag(), setOneInput(referenceService,
-						filenamesFileContentReference, listFile));
-			} else {
-				try {
-					// first, concatenate all data
-					if (input.isBinary()) {
-						ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-						BufferedWriter outputWriter = new BufferedWriter(
-								new OutputStreamWriter(outputStream));
-						for (T2Reference cur : listOfReferences) {
-							InputStreamReader inputReader = new InputStreamReader(
-									getAsStream(referenceService, cur));
-							IOUtils.copyLarge(inputReader, outputWriter);
-							inputReader.close();
-						}
-						outputWriter.close();
-						T2Reference binaryReference = referenceService
-								.register(outputStream.toByteArray(), 0, true,
-										invocationContext);
-						tags.put(input.getTag(), setOneInput(referenceService,
-								binaryReference, input));
-					} else {
-						ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-						BufferedWriter outputWriter = new BufferedWriter(
-								new OutputStreamWriter(outputStream));
-						for (T2Reference cur : listOfReferences) {
-							InputStreamReader inputReader = new InputStreamReader(
-									getAsStream(referenceService, cur));
-							IOUtils.copyLarge(inputReader, outputWriter);
-							outputWriter.write(" ");
-							inputReader.close();
-						}
-						outputWriter.close();
-						T2Reference binaryReference = referenceService
-								.register(outputStream.toByteArray(), 0, true,
-										invocationContext);
-						tags.put(input.getTag(), setOneInput(referenceService,
-								binaryReference, input));
-					}
-				} catch (IOException e) {
-					throw new InvocationException(e);
-				}
-			}
-		} else {
-			tags.put(input.getTag(), setOneInput(referenceService, t2Reference,
-					input));
-		}
-	}
-
-	/*
-	 * submit a grid job and wait for it to finish, then get the result as
-	 * on-demand downloads or directly as data (in case of local execution)
-	 */
-	public HashMap<String, Object> Submit(ReferenceService referenceService) throws InvocationException {
-		submit_generate_job(referenceService);
-		return submit_wait_fetch_results(referenceService);
-	}
-
-	/*
-	 * just submit the job. useful if you want to wait for it to finish later on
-	 * 
-	 * Can the statics be made more static?
-	 */
-	public void submit_generate_job(ReferenceService referenceService) throws InvocationException {
-		for (ScriptInputStatic input : usecase.getStatic_inputs()) {
-			T2Reference ref;
-			if (input.getUrl() != null) {
-				// Does this work OK with binary
-				try {
-					ref = referenceService.register(new URL(input.getUrl()), 0, true, null);
-				} catch (ReferenceServiceException e) {
-					throw new InvocationException(e);
-				} catch (MalformedURLException e) {
-					throw new InvocationException(e);
-				}
-			} else {
-				ref = referenceService.register((String) input.getContent(), 0, true, null);
-			}
-				tags.put(input.getTag(), setOneInput(referenceService, ref, input));
-			
-		}
-		submit_generate_job_inner();
-	}
-
-	protected abstract void submit_generate_job_inner() throws InvocationException;
-
-	/*
-	 * wait for a submitted job to finish and fetch the results
-	 */
-	public abstract HashMap<String, Object> submit_wait_fetch_results(ReferenceService referenceService) throws InvocationException;
-
-	public abstract String setOneInput(ReferenceService referenceService, T2Reference t2Reference, ScriptInput input) throws InvocationException;
-
-	protected InputStream getAsStream(ReferenceService referenceService, T2Reference t2Reference) {
-		Identified identified = referenceService.resolveIdentifier(t2Reference, null, null);
-		if (identified instanceof ReferenceSet) {
-			ExternalReferenceSPI ref = ((ReferenceSet) identified).getExternalReferences().iterator().next();
-			return ref.openStream(invocationContext);
-		}
-		return null;
-	}
-
-	public void setContext(InvocationContext context) {
-		this.invocationContext = context;
-		
-	}
-	
-	public InvocationContext getContext() {
-		return this.invocationContext;
-	}
-
-	public abstract void setStdIn(ReferenceService referenceService,
-			T2Reference t2Reference);
-
-	public abstract void rememberRun(String runId);
-
-	/**
-	 * @return the runId
-	 */
-	protected String getRunId() {
-		return runId;
-	}
-
-	/**
-	 * @param runId the runId to set
-	 */
-	protected void setRunId(String runId) {
-		this.runId = runId;
-	}
-
-	/**
-	 * @return the retrieveData
-	 */
-	protected boolean isRetrieveData() {
-		return retrieveData;
-	}
-
-	/**
-	 * @param retrieveData the retrieveData to set
-	 */
-	protected void setRetrieveData(boolean retrieveData) {
-		this.retrieveData = retrieveData;
-	}
-	
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/3c48b20a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
index c340f0e..cd15a4c 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
@@ -24,7 +24,7 @@ import java.util.Map;
 
 import org.apache.taverna.activities.externaltool.InvocationCreator;
 import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
-import org.apache.taverna.activities.externaltool.invocation.UseCaseInvocation;
+import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
 import org.apache.taverna.activities.externaltool.manager.InvocationMechanism;
 import org.apache.taverna.reference.ReferenceService;
 import org.apache.taverna.reference.T2Reference;
@@ -50,9 +50,9 @@ public final class LocalInvocationCreator implements
 	}
 
 	@Override
-	public UseCaseInvocation convert(InvocationMechanism m, UseCaseDescription description, Map<String, T2Reference> data, ReferenceService referenceService) {
+	public ToolInvocation convert(InvocationMechanism m, UseCaseDescription description, Map<String, T2Reference> data, ReferenceService referenceService) {
 	    ExternalToolLocalInvocationMechanism mechanism = (ExternalToolLocalInvocationMechanism) m;
-		UseCaseInvocation result = null;
+		ToolInvocation result = null;
 		try {
 		    result = new LocalUseCaseInvocation(description, mechanism.isRetrieveData(), mechanism.getDirectory(), mechanism.getShellPrefix(), mechanism.getLinkCommand());
 		} catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/3c48b20a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalUseCaseInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalUseCaseInvocation.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalUseCaseInvocation.java
index b57be14..86406d1 100755
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalUseCaseInvocation.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalUseCaseInvocation.java
@@ -51,7 +51,7 @@ import org.apache.taverna.activities.externaltool.desc.ScriptInput;
 import org.apache.taverna.activities.externaltool.desc.ScriptOutput;
 import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
 import org.apache.taverna.activities.externaltool.invocation.InvocationException;
-import org.apache.taverna.activities.externaltool.invocation.UseCaseInvocation;
+import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
 import org.apache.taverna.activities.externaltool.ssh.SshNode;
 import org.apache.taverna.activities.externaltool.ssh.SshNodeFactory;
 import org.apache.taverna.activities.externaltool.ssh.SshUrl;
@@ -73,7 +73,7 @@ import org.apache.log4j.Logger;
  * The job is executed locally, i.e. not via the grid.
  * @author Hajo Krabbenhoeft
  */
-public class LocalUseCaseInvocation extends UseCaseInvocation {
+public class LocalUseCaseInvocation extends ToolInvocation {
 
 	private static Logger logger = Logger.getLogger(LocalUseCaseInvocation.class);
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/3c48b20a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
index b876ec8..f0b1e83 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshInvocationCreator.java
@@ -26,7 +26,7 @@ import java.util.Map;
 import org.apache.taverna.activities.externaltool.InvocationCreator;
 import org.apache.taverna.activities.externaltool.RetrieveLoginFromTaverna;
 import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
-import org.apache.taverna.activities.externaltool.invocation.UseCaseInvocation;
+import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
 import org.apache.log4j.Logger;
 
 import com.jcraft.jsch.JSchException;
@@ -58,7 +58,7 @@ public final class SshInvocationCreator implements InvocationCreator {
 	}
 
 	@Override
-	public UseCaseInvocation convert(InvocationMechanism m, UseCaseDescription description, Map<String, T2Reference> data, ReferenceService referenceService) {
+	public ToolInvocation convert(InvocationMechanism m, UseCaseDescription description, Map<String, T2Reference> data, ReferenceService referenceService) {
 	    ExternalToolSshInvocationMechanism mechanism = (ExternalToolSshInvocationMechanism) m;
 		SshUseCaseInvocation result = null;
 		try {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/3c48b20a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUseCaseInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUseCaseInvocation.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUseCaseInvocation.java
index fcbc33f..06300a8 100755
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUseCaseInvocation.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/ssh/SshUseCaseInvocation.java
@@ -48,7 +48,7 @@ import org.apache.taverna.activities.externaltool.desc.ScriptOutput;
 import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
 import org.apache.taverna.activities.externaltool.invocation.AskUserForPw;
 import org.apache.taverna.activities.externaltool.invocation.InvocationException;
-import org.apache.taverna.activities.externaltool.invocation.UseCaseInvocation;
+import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
 import org.apache.taverna.reference.AbstractExternalReference;
 import org.apache.taverna.reference.ErrorDocument;
 import org.apache.taverna.reference.ErrorDocumentServiceException;
@@ -75,7 +75,7 @@ import com.jcraft.jsch.ChannelSftp.LsEntry;
  * 
  * @author Hajo Krabbenhoeft
  */
-public class SshUseCaseInvocation extends UseCaseInvocation {
+public class SshUseCaseInvocation extends ToolInvocation {
 
 	private static Logger logger = Logger.getLogger(SshUseCaseInvocation.class);
 



[15/50] [abbrv] incubator-taverna-common-activities git commit: LocalUseCaseInvocation -> LocalToolInvocation

Posted by st...@apache.org.
LocalUseCaseInvocation -> LocalToolInvocation


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

Branch: refs/heads/docker
Commit: b13a0fef11377af40a8a10e9fe7b0e7938fdf748
Parents: 7d28dec
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed May 4 01:07:02 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed May 4 01:07:02 2016 +0100

----------------------------------------------------------------------
 .../ExternalToolLocalInvocationMechanism.java   |   2 +-
 .../local/LocalInvocationCreator.java           |   4 +-
 .../local/LocalInvocationPersister.java         |   6 +-
 .../local/LocalMechanismCreator.java            |   2 +-
 .../externaltool/local/LocalToolInvocation.java | 560 +++++++++++++++++++
 .../local/LocalUseCaseInvocation.java           | 560 -------------------
 6 files changed, 567 insertions(+), 567 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/b13a0fef/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/ExternalToolLocalInvocationMechanism.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/ExternalToolLocalInvocationMechanism.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/ExternalToolLocalInvocationMechanism.java
index e921bc4..10a4465 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/ExternalToolLocalInvocationMechanism.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/ExternalToolLocalInvocationMechanism.java
@@ -53,7 +53,7 @@ public class ExternalToolLocalInvocationMechanism extends
 
 	@Override
 	public String getType() {
-		return LocalUseCaseInvocation.LOCAL_USE_CASE_INVOCATION_TYPE;
+		return LocalToolInvocation.LOCAL_USE_CASE_INVOCATION_TYPE;
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/b13a0fef/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
index cd15a4c..13154d9 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationCreator.java
@@ -46,7 +46,7 @@ public final class LocalInvocationCreator implements
 
 	@Override
 	public boolean canHandle(String mechanismType) {
-		return mechanismType.equals(LocalUseCaseInvocation.LOCAL_USE_CASE_INVOCATION_TYPE);
+		return mechanismType.equals(LocalToolInvocation.LOCAL_USE_CASE_INVOCATION_TYPE);
 	}
 
 	@Override
@@ -54,7 +54,7 @@ public final class LocalInvocationCreator implements
 	    ExternalToolLocalInvocationMechanism mechanism = (ExternalToolLocalInvocationMechanism) m;
 		ToolInvocation result = null;
 		try {
-		    result = new LocalUseCaseInvocation(description, mechanism.isRetrieveData(), mechanism.getDirectory(), mechanism.getShellPrefix(), mechanism.getLinkCommand());
+		    result = new LocalToolInvocation(description, mechanism.isRetrieveData(), mechanism.getDirectory(), mechanism.getShellPrefix(), mechanism.getLinkCommand());
 		} catch (IOException e) {
 			logger.error(e);
 		}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/b13a0fef/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationPersister.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationPersister.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationPersister.java
index 8cc8201..f51b710 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationPersister.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalInvocationPersister.java
@@ -37,7 +37,7 @@ public class LocalInvocationPersister extends InvocationPersister {
 	 */
 	@Override
 	public void load(File directory) {
-		LocalUseCaseInvocation.load(directory);
+		LocalToolInvocation.load(directory);
 	}
 
 	/* (non-Javadoc)
@@ -45,12 +45,12 @@ public class LocalInvocationPersister extends InvocationPersister {
 	 */
 	@Override
 	public void persist(File directory) {
-		LocalUseCaseInvocation.persist(directory);
+		LocalToolInvocation.persist(directory);
 	}
 	
 	@Override
 	public void deleteRun(String runId) {
-			LocalUseCaseInvocation.cleanup(runId);
+			LocalToolInvocation.cleanup(runId);
 	}
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/b13a0fef/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalMechanismCreator.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalMechanismCreator.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalMechanismCreator.java
index 3f95a2b..73b09f2 100644
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalMechanismCreator.java
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalMechanismCreator.java
@@ -34,7 +34,7 @@ public class LocalMechanismCreator extends MechanismCreator {
 	 */
 	@Override
 	public boolean canHandle(String mechanismType) {
-		return mechanismType.equals(LocalUseCaseInvocation.LOCAL_USE_CASE_INVOCATION_TYPE);
+		return mechanismType.equals(LocalToolInvocation.LOCAL_USE_CASE_INVOCATION_TYPE);
 	}
 
 	public InvocationMechanism convert(Element detailsElement,

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/b13a0fef/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalToolInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalToolInvocation.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalToolInvocation.java
new file mode 100755
index 0000000..c88f7c8
--- /dev/null
+++ b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalToolInvocation.java
@@ -0,0 +1,560 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taverna.activities.externaltool.local;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+
+import org.apache.taverna.activities.externaltool.desc.ScriptInput;
+import org.apache.taverna.activities.externaltool.desc.ScriptOutput;
+import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
+import org.apache.taverna.activities.externaltool.invocation.InvocationException;
+import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
+import org.apache.taverna.activities.externaltool.ssh.SshNode;
+import org.apache.taverna.activities.externaltool.ssh.SshNodeFactory;
+import org.apache.taverna.activities.externaltool.ssh.SshUrl;
+import org.apache.taverna.reference.AbstractExternalReference;
+import org.apache.taverna.reference.ErrorDocument;
+import org.apache.taverna.reference.ExternalReferenceSPI;
+import org.apache.taverna.reference.Identified;
+import org.apache.taverna.reference.ReferenceService;
+import org.apache.taverna.reference.ReferenceSet;
+import org.apache.taverna.reference.ReferencedDataNature;
+import org.apache.taverna.reference.T2Reference;
+import org.apache.taverna.reference.impl.external.file.FileReference;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.log4j.Logger;
+
+/**
+ * The job is executed locally, i.e. not via the grid.
+ * @author Hajo Krabbenhoeft
+ */
+public class LocalToolInvocation extends ToolInvocation {
+
+	private static Logger logger = Logger.getLogger(LocalToolInvocation.class);
+
+	private final File tempDir;
+	
+	public static String LOCAL_USE_CASE_INVOCATION_TYPE = "789663B8-DA91-428A-9F7D-B3F3DA185FD4";
+	
+	private Process running;
+
+	private final String shellPrefix;
+
+	private final String linkCommand;
+
+	private Reader stdInReader = null;
+	
+	private static Map<String, Set<String>> runIdToTempDir = Collections.synchronizedMap(new HashMap<String, Set<String>> ());
+	
+	private static String LOCAL_INVOCATION_FILE = "localInvocations";
+
+	public LocalToolInvocation(UseCaseDescription desc, boolean retrieveData, String mainTempDirectory, String shellPrefix, String linkCommand) throws IOException {
+
+		usecase = desc;
+		setRetrieveData(retrieveData);
+		this.shellPrefix = shellPrefix;
+		this.linkCommand = linkCommand;
+		
+		if (mainTempDirectory != null) {
+		
+			File mainTempDir = new File(mainTempDirectory);
+
+			tempDir = File.createTempFile("usecase", "dir", mainTempDir);
+		} else {
+			tempDir = File.createTempFile("usecase", "dir");
+		}
+		tempDir.delete();
+		tempDir.mkdir();
+		logger.info("mainTempDirectory is " + mainTempDirectory);
+		logger.info("Using tempDir " + tempDir.getAbsolutePath());
+
+	}
+
+	void recDel(File c) {
+		File[] files = c.listFiles();
+		if (files != null) {
+			for (File cc : files)
+				recDel(cc);
+		}
+		c.delete();
+	}
+	
+	private String setOneBinaryInput(ReferenceService referenceService,
+			T2Reference t2Reference, ScriptInput input, String targetSuffix)
+			throws InvocationException {
+
+		if (input.isFile() || input.isTempFile()) {
+			// Try to get it as a file
+			String target = tempDir.getAbsolutePath() + "/" + targetSuffix;
+			FileReference fileRef = getAsFileReference(referenceService,
+					t2Reference);
+			if (fileRef != null) {
+
+				if (!input.isForceCopy()) {
+					if (linkCommand != null) {
+						String source = fileRef.getFile().getAbsolutePath();
+						String actualLinkCommand = getActualOsCommand(
+								linkCommand, source, targetSuffix, target);
+						logger.info("Link command is " + actualLinkCommand);
+						String[] splitCmds = actualLinkCommand.split(" ");
+						ProcessBuilder builder = new ProcessBuilder(splitCmds);
+						builder.directory(tempDir);
+						try {
+							int code = builder.start().waitFor();
+							if (code == 0) {
+								return target;
+							} else {
+								logger.error("Link command gave errorcode: "
+										+ code);
+							}
+
+						} catch (InterruptedException e) {
+							// go through
+						} catch (IOException e) {
+							// go through
+						}
+
+					}
+				}
+			}
+
+			InputStream is = null;
+			OutputStream os = null;
+			is = getAsStream(referenceService, t2Reference);
+
+			try {
+				os = new FileOutputStream(target);
+			} catch (FileNotFoundException e) {
+				throw new InvocationException(e);
+			}
+
+			try {
+				IOUtils.copyLarge(is, os);
+			} catch (IOException e) {
+				throw new InvocationException(e);
+			}
+			try {
+				is.close();
+				os.close();
+			} catch (IOException e) {
+				throw new InvocationException(e);
+			}
+			return target;
+		} else {
+			String value = (String) referenceService.renderIdentifier(
+					t2Reference, String.class, this.getContext());
+			return value;
+		}
+	}
+	
+	@Override
+	public String setOneInput(ReferenceService referenceService,
+			T2Reference t2Reference, ScriptInput input)
+			throws InvocationException {
+
+		if (input.getCharsetName() == null) {
+			input.setCharsetName(Charset.defaultCharset().name());
+		}
+		String target = null;
+		String targetSuffix = null;
+		if (input.isFile()) {
+			targetSuffix = input.getTag();
+		} else if (input.isTempFile()) {
+			targetSuffix = "tempfile." + (nTempFiles++) + ".tmp";
+		}
+
+		if (input.isBinary()) {
+			return setOneBinaryInput(referenceService, t2Reference, input,
+					targetSuffix);
+		}
+
+		logger.info("Target is " + target);
+		if (input.isFile() || input.isTempFile()) {
+			target = tempDir.getAbsolutePath() + "/" + targetSuffix;
+			// Try to get it as a file
+			Reader r;
+			Writer w;
+			FileReference fileRef = getAsFileReference(referenceService,
+					t2Reference);
+			if (fileRef != null) {
+
+				if (!input.isForceCopy()) {
+					if (linkCommand != null) {
+						String source = fileRef.getFile().getAbsolutePath();
+						String actualLinkCommand = getActualOsCommand(
+								linkCommand, source, targetSuffix, target);
+						logger.info("Link command is " + actualLinkCommand);
+						String[] splitCmds = actualLinkCommand.split(" ");
+						ProcessBuilder builder = new ProcessBuilder(splitCmds);
+						builder.directory(tempDir);
+						try {
+							int code = builder.start().waitFor();
+							if (code == 0) {
+								return target;
+							} else {
+								logger.error("Link command gave errorcode: "
+										+ code);
+							}
+
+						} catch (InterruptedException e) {
+							// go through
+						} catch (IOException e) {
+							// go through
+						}
+
+					}
+				}
+
+				if (fileRef.getDataNature().equals(ReferencedDataNature.TEXT)) {
+					r = new InputStreamReader(fileRef.openStream(this
+							.getContext()), Charset.forName(fileRef
+							.getCharset()));
+				} else {
+					try {
+						r = new FileReader(fileRef.getFile());
+					} catch (FileNotFoundException e) {
+						throw new InvocationException(e);
+					}
+				}
+			} else {
+				r = new InputStreamReader(getAsStream(referenceService,
+						t2Reference));
+			}
+			try {
+				w = new OutputStreamWriter(new FileOutputStream(target), input
+						.getCharsetName());
+			} catch (UnsupportedEncodingException e) {
+				throw new InvocationException(e);
+			} catch (FileNotFoundException e) {
+				throw new InvocationException(e);
+			}
+			try {
+				IOUtils.copyLarge(r, w);
+			} catch (IOException e) {
+				throw new InvocationException(e);
+			}
+			try {
+				r.close();
+				w.close();
+			} catch (IOException e) {
+				throw new InvocationException(e);
+			}
+			return target;
+		} else {
+			String value = (String) referenceService.renderIdentifier(
+					t2Reference, String.class, this.getContext());
+			return value;
+		}
+	}
+	
+	private void forgetRun() {
+		Set<String> directories = runIdToTempDir.get(getRunId());
+		try {
+			directories.remove(tempDir.getCanonicalPath());
+		} catch (IOException e) {
+			logger.error(e);
+		}
+	}
+
+	private static void deleteDirectory(String location) {
+		try {
+			FileUtils.deleteDirectory(new File(location));
+		} catch (IOException e) {
+			logger.error("Problem deleting " + location, e);
+		}
+	}
+	
+	public static void cleanup(String runId) {
+		Set<String> tempDirectories = runIdToTempDir.get(runId);
+		if (tempDirectories != null) {
+			for (String tempDir : tempDirectories) {
+				deleteDirectory(tempDir);
+			}
+			runIdToTempDir.remove(runId);
+		}
+	}
+	
+	@Override
+	protected void submit_generate_job_inner() throws InvocationException {
+		tags.put("uniqueID", "" + getSubmissionID());
+		String command = usecase.getCommand();
+		for (String cur : tags.keySet()) {
+		    command = command.replaceAll("\\Q%%" + cur + "%%\\E", Matcher.quoteReplacement(tags.get(cur)));
+		}
+
+		List<String> cmds = new ArrayList<String>();
+		if ((shellPrefix != null) && !shellPrefix.isEmpty()) {
+			String[] prefixCmds = shellPrefix.split(" ");
+			for (int i = 0; i < prefixCmds.length; i++) {
+				cmds.add(prefixCmds[i]);
+			}
+			cmds.add(command);
+		} else {
+			String[] splitCmds = command.split(" ");
+			for (int i = 0; i < splitCmds.length; i++) {
+				cmds.add(splitCmds[i]);
+			}
+		}
+	
+		ProcessBuilder builder = new ProcessBuilder(cmds);
+		builder.directory(tempDir);
+
+		for (int i = 0; i < cmds.size(); i++) {
+			logger.info("cmds[" + i + "] = " + cmds.get(i));
+		}
+		logger.info("Command is " + command + " in directory " + tempDir);
+		try {
+			running = builder.start();
+			if (stdInReader != null) {
+				BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(running.getOutputStream()));
+				IOUtils.copyLarge(stdInReader, writer);
+				writer.close();
+			}
+		} catch (IOException e) {
+			throw new InvocationException(e);
+		}
+	}
+
+	private void copy_stream(InputStream read, OutputStream write) throws IOException {
+		int a = read.available();
+		if (a > 0) {
+			byte[] buf = new byte[a];
+			read.read(buf);
+			write.write(buf);
+		}
+	}
+
+	@Override
+	public HashMap<String, Object> submit_wait_fetch_results(ReferenceService referenceService) throws InvocationException {
+		ByteArrayOutputStream stdout_buf = new ByteArrayOutputStream();
+		ByteArrayOutputStream stderr_buf = new ByteArrayOutputStream();
+		while (true) {
+			try {
+				copy_stream(running.getInputStream(), stdout_buf);
+				copy_stream(running.getErrorStream(), stderr_buf);
+			} catch (IOException e1) {
+				throw new InvocationException(e1);
+			}
+			try {
+				int exitcode = running.exitValue();
+				if (!usecase.getValidReturnCodes().contains(exitcode)) {
+					try {
+						throw new InvocationException("Invalid exit code " + exitcode + ":" + stderr_buf.toString("US-ASCII"));
+					} catch (UnsupportedEncodingException e) {
+						throw new InvocationException("Invalid exit code " + exitcode + ":" + stderr_buf.toString());
+					}
+				}
+				else
+					break;
+			} catch (IllegalThreadStateException e) {
+
+				try {
+					Thread.sleep(100);
+				} catch (InterruptedException e1) {
+					throw new InvocationException(e);
+				}
+
+			}
+		}
+
+		HashMap<String, Object> results = new HashMap<String, Object>();
+			results.put("STDOUT", stdout_buf.toByteArray());
+			results.put("STDERR", stderr_buf.toByteArray());
+
+		for (Map.Entry<String, ScriptOutput> cur : usecase.getOutputs().entrySet()) {
+			ScriptOutput scriptOutput = cur.getValue();
+			File result = new File(tempDir.getAbsoluteFile() + "/" + cur.getValue().getPath());
+			if (result.exists()) {
+				AbstractExternalReference ref;
+				if (isRetrieveData()) {
+					FileInputStream is;
+					try {
+						is = new FileInputStream(result);
+					} catch (FileNotFoundException e) {
+						throw new InvocationException(e);
+					}
+					if (scriptOutput.isBinary()) {
+						ref = inlineByteArrayReferenceBuilder.createReference(is, null);
+					} else {
+						ref = inlineStringReferenceBuilder.createReference(is, null);
+					}
+					try {
+						is.close();
+					} catch (IOException e) {
+						throw new InvocationException(e);
+					}
+				}
+				else {
+					ref = new FileReference(result);
+					if (scriptOutput.isBinary()) {
+						((FileReference) ref)
+								.setDataNature(ReferencedDataNature.BINARY);
+					} else {
+						((FileReference) ref)
+								.setDataNature(ReferencedDataNature.TEXT);
+						((FileReference) ref).setCharset("UTF-8");
+					}
+				}
+				results.put(cur.getKey(), ref);
+			} else {
+				ErrorDocument ed = referenceService.getErrorDocumentService().registerError("No result for " + cur.getKey(), 0, getContext());
+				results.put(cur.getKey(), ed);
+			}
+		}
+		
+		if (isRetrieveData()) {
+			forgetRun();
+			try {
+				deleteDirectory(tempDir.getCanonicalPath());
+			} catch (IOException e) {
+				throw new InvocationException(e);
+			}
+		}
+
+		return results;
+	}
+
+	private FileReference getAsFileReference(ReferenceService referenceService, T2Reference t2Reference) {
+		Identified identified = referenceService.resolveIdentifier(t2Reference, null, null);
+		if (identified instanceof ReferenceSet) {
+			for (ExternalReferenceSPI ref : ((ReferenceSet) identified).getExternalReferences()) {
+				if (ref instanceof FileReference) {
+					return (FileReference) ref;
+				}
+			}
+		}
+		return null;
+	}
+
+	@Override
+	public void setStdIn(ReferenceService referenceService,
+			T2Reference t2Reference) {
+		stdInReader = new BufferedReader(new InputStreamReader(getAsStream(referenceService, t2Reference)));
+	}
+
+	@Override
+	public void rememberRun(String runId) {
+		this.setRunId(runId);
+		Set<String> directories = runIdToTempDir.get(runId);
+		if (directories == null) {
+			directories = Collections.synchronizedSet(new HashSet<String> ());
+			runIdToTempDir.put(runId, directories);
+		}
+		try {
+			directories.add(tempDir.getCanonicalPath());
+		} catch (IOException e) {
+			logger.error("Unable to record temporary directory: " + tempDir, e);
+		}
+	}
+
+	public static void load(File directory) {
+		File invocationsFile = new File(directory, LOCAL_INVOCATION_FILE);
+		if (!invocationsFile.exists()) {
+			return;
+		}
+		BufferedReader reader = null;
+		try {
+			reader = new BufferedReader(new FileReader(invocationsFile));
+			String line = reader.readLine();
+			while (line != null) {
+				String[] parts = line.split(" ");
+				if (parts.length != 2) {
+					break;
+				}
+				String runId = parts[0];
+				String tempDirString = parts[1];
+				Set<String> tempDirs = runIdToTempDir.get(runId);
+				if (tempDirs == null) {
+					tempDirs = new HashSet<String>();
+					runIdToTempDir.put(runId, tempDirs);
+				}
+				tempDirs.add(tempDirString);
+				line = reader.readLine();
+			}
+		} catch (FileNotFoundException e) {
+			logger.error(e);
+		} catch (IOException e) {
+			logger.error(e);
+		} finally {
+			if (reader != null) {
+				try {
+					reader.close();
+				} catch (IOException e) {
+					logger.error(e);
+				}
+			}
+		}
+	}
+
+	public static void persist(File directory) {
+		File invocationsFile = new File(directory, LOCAL_INVOCATION_FILE);
+		BufferedWriter writer = null;
+		try {
+			writer = new BufferedWriter(new FileWriter(invocationsFile));
+			for (String runId : runIdToTempDir.keySet()) {
+				for (String tempDir : runIdToTempDir.get(runId)) {
+					writer.write(runId);
+					writer.write(" ");
+					writer.write(tempDir);
+					writer.newLine();
+				}
+			}
+		} catch (IOException e) {
+			logger.error(e);
+		} finally {
+			if (writer != null) {
+				try {
+					writer.close();
+				} catch (IOException e) {
+					logger.error(e);
+				}
+			}
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/b13a0fef/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalUseCaseInvocation.java
----------------------------------------------------------------------
diff --git a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalUseCaseInvocation.java b/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalUseCaseInvocation.java
deleted file mode 100755
index 86406d1..0000000
--- a/taverna-external-tool-activity/src/main/java/org/apache/taverna/activities/externaltool/local/LocalUseCaseInvocation.java
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.taverna.activities.externaltool.local;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-
-import org.apache.taverna.activities.externaltool.desc.ScriptInput;
-import org.apache.taverna.activities.externaltool.desc.ScriptOutput;
-import org.apache.taverna.activities.externaltool.desc.UseCaseDescription;
-import org.apache.taverna.activities.externaltool.invocation.InvocationException;
-import org.apache.taverna.activities.externaltool.invocation.ToolInvocation;
-import org.apache.taverna.activities.externaltool.ssh.SshNode;
-import org.apache.taverna.activities.externaltool.ssh.SshNodeFactory;
-import org.apache.taverna.activities.externaltool.ssh.SshUrl;
-import org.apache.taverna.reference.AbstractExternalReference;
-import org.apache.taverna.reference.ErrorDocument;
-import org.apache.taverna.reference.ExternalReferenceSPI;
-import org.apache.taverna.reference.Identified;
-import org.apache.taverna.reference.ReferenceService;
-import org.apache.taverna.reference.ReferenceSet;
-import org.apache.taverna.reference.ReferencedDataNature;
-import org.apache.taverna.reference.T2Reference;
-import org.apache.taverna.reference.impl.external.file.FileReference;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.log4j.Logger;
-
-/**
- * The job is executed locally, i.e. not via the grid.
- * @author Hajo Krabbenhoeft
- */
-public class LocalUseCaseInvocation extends ToolInvocation {
-
-	private static Logger logger = Logger.getLogger(LocalUseCaseInvocation.class);
-
-	private final File tempDir;
-	
-	public static String LOCAL_USE_CASE_INVOCATION_TYPE = "789663B8-DA91-428A-9F7D-B3F3DA185FD4";
-	
-	private Process running;
-
-	private final String shellPrefix;
-
-	private final String linkCommand;
-
-	private Reader stdInReader = null;
-	
-	private static Map<String, Set<String>> runIdToTempDir = Collections.synchronizedMap(new HashMap<String, Set<String>> ());
-	
-	private static String LOCAL_INVOCATION_FILE = "localInvocations";
-
-	public LocalUseCaseInvocation(UseCaseDescription desc, boolean retrieveData, String mainTempDirectory, String shellPrefix, String linkCommand) throws IOException {
-
-		usecase = desc;
-		setRetrieveData(retrieveData);
-		this.shellPrefix = shellPrefix;
-		this.linkCommand = linkCommand;
-		
-		if (mainTempDirectory != null) {
-		
-			File mainTempDir = new File(mainTempDirectory);
-
-			tempDir = File.createTempFile("usecase", "dir", mainTempDir);
-		} else {
-			tempDir = File.createTempFile("usecase", "dir");
-		}
-		tempDir.delete();
-		tempDir.mkdir();
-		logger.info("mainTempDirectory is " + mainTempDirectory);
-		logger.info("Using tempDir " + tempDir.getAbsolutePath());
-
-	}
-
-	void recDel(File c) {
-		File[] files = c.listFiles();
-		if (files != null) {
-			for (File cc : files)
-				recDel(cc);
-		}
-		c.delete();
-	}
-	
-	private String setOneBinaryInput(ReferenceService referenceService,
-			T2Reference t2Reference, ScriptInput input, String targetSuffix)
-			throws InvocationException {
-
-		if (input.isFile() || input.isTempFile()) {
-			// Try to get it as a file
-			String target = tempDir.getAbsolutePath() + "/" + targetSuffix;
-			FileReference fileRef = getAsFileReference(referenceService,
-					t2Reference);
-			if (fileRef != null) {
-
-				if (!input.isForceCopy()) {
-					if (linkCommand != null) {
-						String source = fileRef.getFile().getAbsolutePath();
-						String actualLinkCommand = getActualOsCommand(
-								linkCommand, source, targetSuffix, target);
-						logger.info("Link command is " + actualLinkCommand);
-						String[] splitCmds = actualLinkCommand.split(" ");
-						ProcessBuilder builder = new ProcessBuilder(splitCmds);
-						builder.directory(tempDir);
-						try {
-							int code = builder.start().waitFor();
-							if (code == 0) {
-								return target;
-							} else {
-								logger.error("Link command gave errorcode: "
-										+ code);
-							}
-
-						} catch (InterruptedException e) {
-							// go through
-						} catch (IOException e) {
-							// go through
-						}
-
-					}
-				}
-			}
-
-			InputStream is = null;
-			OutputStream os = null;
-			is = getAsStream(referenceService, t2Reference);
-
-			try {
-				os = new FileOutputStream(target);
-			} catch (FileNotFoundException e) {
-				throw new InvocationException(e);
-			}
-
-			try {
-				IOUtils.copyLarge(is, os);
-			} catch (IOException e) {
-				throw new InvocationException(e);
-			}
-			try {
-				is.close();
-				os.close();
-			} catch (IOException e) {
-				throw new InvocationException(e);
-			}
-			return target;
-		} else {
-			String value = (String) referenceService.renderIdentifier(
-					t2Reference, String.class, this.getContext());
-			return value;
-		}
-	}
-	
-	@Override
-	public String setOneInput(ReferenceService referenceService,
-			T2Reference t2Reference, ScriptInput input)
-			throws InvocationException {
-
-		if (input.getCharsetName() == null) {
-			input.setCharsetName(Charset.defaultCharset().name());
-		}
-		String target = null;
-		String targetSuffix = null;
-		if (input.isFile()) {
-			targetSuffix = input.getTag();
-		} else if (input.isTempFile()) {
-			targetSuffix = "tempfile." + (nTempFiles++) + ".tmp";
-		}
-
-		if (input.isBinary()) {
-			return setOneBinaryInput(referenceService, t2Reference, input,
-					targetSuffix);
-		}
-
-		logger.info("Target is " + target);
-		if (input.isFile() || input.isTempFile()) {
-			target = tempDir.getAbsolutePath() + "/" + targetSuffix;
-			// Try to get it as a file
-			Reader r;
-			Writer w;
-			FileReference fileRef = getAsFileReference(referenceService,
-					t2Reference);
-			if (fileRef != null) {
-
-				if (!input.isForceCopy()) {
-					if (linkCommand != null) {
-						String source = fileRef.getFile().getAbsolutePath();
-						String actualLinkCommand = getActualOsCommand(
-								linkCommand, source, targetSuffix, target);
-						logger.info("Link command is " + actualLinkCommand);
-						String[] splitCmds = actualLinkCommand.split(" ");
-						ProcessBuilder builder = new ProcessBuilder(splitCmds);
-						builder.directory(tempDir);
-						try {
-							int code = builder.start().waitFor();
-							if (code == 0) {
-								return target;
-							} else {
-								logger.error("Link command gave errorcode: "
-										+ code);
-							}
-
-						} catch (InterruptedException e) {
-							// go through
-						} catch (IOException e) {
-							// go through
-						}
-
-					}
-				}
-
-				if (fileRef.getDataNature().equals(ReferencedDataNature.TEXT)) {
-					r = new InputStreamReader(fileRef.openStream(this
-							.getContext()), Charset.forName(fileRef
-							.getCharset()));
-				} else {
-					try {
-						r = new FileReader(fileRef.getFile());
-					} catch (FileNotFoundException e) {
-						throw new InvocationException(e);
-					}
-				}
-			} else {
-				r = new InputStreamReader(getAsStream(referenceService,
-						t2Reference));
-			}
-			try {
-				w = new OutputStreamWriter(new FileOutputStream(target), input
-						.getCharsetName());
-			} catch (UnsupportedEncodingException e) {
-				throw new InvocationException(e);
-			} catch (FileNotFoundException e) {
-				throw new InvocationException(e);
-			}
-			try {
-				IOUtils.copyLarge(r, w);
-			} catch (IOException e) {
-				throw new InvocationException(e);
-			}
-			try {
-				r.close();
-				w.close();
-			} catch (IOException e) {
-				throw new InvocationException(e);
-			}
-			return target;
-		} else {
-			String value = (String) referenceService.renderIdentifier(
-					t2Reference, String.class, this.getContext());
-			return value;
-		}
-	}
-	
-	private void forgetRun() {
-		Set<String> directories = runIdToTempDir.get(getRunId());
-		try {
-			directories.remove(tempDir.getCanonicalPath());
-		} catch (IOException e) {
-			logger.error(e);
-		}
-	}
-
-	private static void deleteDirectory(String location) {
-		try {
-			FileUtils.deleteDirectory(new File(location));
-		} catch (IOException e) {
-			logger.error("Problem deleting " + location, e);
-		}
-	}
-	
-	public static void cleanup(String runId) {
-		Set<String> tempDirectories = runIdToTempDir.get(runId);
-		if (tempDirectories != null) {
-			for (String tempDir : tempDirectories) {
-				deleteDirectory(tempDir);
-			}
-			runIdToTempDir.remove(runId);
-		}
-	}
-	
-	@Override
-	protected void submit_generate_job_inner() throws InvocationException {
-		tags.put("uniqueID", "" + getSubmissionID());
-		String command = usecase.getCommand();
-		for (String cur : tags.keySet()) {
-		    command = command.replaceAll("\\Q%%" + cur + "%%\\E", Matcher.quoteReplacement(tags.get(cur)));
-		}
-
-		List<String> cmds = new ArrayList<String>();
-		if ((shellPrefix != null) && !shellPrefix.isEmpty()) {
-			String[] prefixCmds = shellPrefix.split(" ");
-			for (int i = 0; i < prefixCmds.length; i++) {
-				cmds.add(prefixCmds[i]);
-			}
-			cmds.add(command);
-		} else {
-			String[] splitCmds = command.split(" ");
-			for (int i = 0; i < splitCmds.length; i++) {
-				cmds.add(splitCmds[i]);
-			}
-		}
-	
-		ProcessBuilder builder = new ProcessBuilder(cmds);
-		builder.directory(tempDir);
-
-		for (int i = 0; i < cmds.size(); i++) {
-			logger.info("cmds[" + i + "] = " + cmds.get(i));
-		}
-		logger.info("Command is " + command + " in directory " + tempDir);
-		try {
-			running = builder.start();
-			if (stdInReader != null) {
-				BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(running.getOutputStream()));
-				IOUtils.copyLarge(stdInReader, writer);
-				writer.close();
-			}
-		} catch (IOException e) {
-			throw new InvocationException(e);
-		}
-	}
-
-	private void copy_stream(InputStream read, OutputStream write) throws IOException {
-		int a = read.available();
-		if (a > 0) {
-			byte[] buf = new byte[a];
-			read.read(buf);
-			write.write(buf);
-		}
-	}
-
-	@Override
-	public HashMap<String, Object> submit_wait_fetch_results(ReferenceService referenceService) throws InvocationException {
-		ByteArrayOutputStream stdout_buf = new ByteArrayOutputStream();
-		ByteArrayOutputStream stderr_buf = new ByteArrayOutputStream();
-		while (true) {
-			try {
-				copy_stream(running.getInputStream(), stdout_buf);
-				copy_stream(running.getErrorStream(), stderr_buf);
-			} catch (IOException e1) {
-				throw new InvocationException(e1);
-			}
-			try {
-				int exitcode = running.exitValue();
-				if (!usecase.getValidReturnCodes().contains(exitcode)) {
-					try {
-						throw new InvocationException("Invalid exit code " + exitcode + ":" + stderr_buf.toString("US-ASCII"));
-					} catch (UnsupportedEncodingException e) {
-						throw new InvocationException("Invalid exit code " + exitcode + ":" + stderr_buf.toString());
-					}
-				}
-				else
-					break;
-			} catch (IllegalThreadStateException e) {
-
-				try {
-					Thread.sleep(100);
-				} catch (InterruptedException e1) {
-					throw new InvocationException(e);
-				}
-
-			}
-		}
-
-		HashMap<String, Object> results = new HashMap<String, Object>();
-			results.put("STDOUT", stdout_buf.toByteArray());
-			results.put("STDERR", stderr_buf.toByteArray());
-
-		for (Map.Entry<String, ScriptOutput> cur : usecase.getOutputs().entrySet()) {
-			ScriptOutput scriptOutput = cur.getValue();
-			File result = new File(tempDir.getAbsoluteFile() + "/" + cur.getValue().getPath());
-			if (result.exists()) {
-				AbstractExternalReference ref;
-				if (isRetrieveData()) {
-					FileInputStream is;
-					try {
-						is = new FileInputStream(result);
-					} catch (FileNotFoundException e) {
-						throw new InvocationException(e);
-					}
-					if (scriptOutput.isBinary()) {
-						ref = inlineByteArrayReferenceBuilder.createReference(is, null);
-					} else {
-						ref = inlineStringReferenceBuilder.createReference(is, null);
-					}
-					try {
-						is.close();
-					} catch (IOException e) {
-						throw new InvocationException(e);
-					}
-				}
-				else {
-					ref = new FileReference(result);
-					if (scriptOutput.isBinary()) {
-						((FileReference) ref)
-								.setDataNature(ReferencedDataNature.BINARY);
-					} else {
-						((FileReference) ref)
-								.setDataNature(ReferencedDataNature.TEXT);
-						((FileReference) ref).setCharset("UTF-8");
-					}
-				}
-				results.put(cur.getKey(), ref);
-			} else {
-				ErrorDocument ed = referenceService.getErrorDocumentService().registerError("No result for " + cur.getKey(), 0, getContext());
-				results.put(cur.getKey(), ed);
-			}
-		}
-		
-		if (isRetrieveData()) {
-			forgetRun();
-			try {
-				deleteDirectory(tempDir.getCanonicalPath());
-			} catch (IOException e) {
-				throw new InvocationException(e);
-			}
-		}
-
-		return results;
-	}
-
-	private FileReference getAsFileReference(ReferenceService referenceService, T2Reference t2Reference) {
-		Identified identified = referenceService.resolveIdentifier(t2Reference, null, null);
-		if (identified instanceof ReferenceSet) {
-			for (ExternalReferenceSPI ref : ((ReferenceSet) identified).getExternalReferences()) {
-				if (ref instanceof FileReference) {
-					return (FileReference) ref;
-				}
-			}
-		}
-		return null;
-	}
-
-	@Override
-	public void setStdIn(ReferenceService referenceService,
-			T2Reference t2Reference) {
-		stdInReader = new BufferedReader(new InputStreamReader(getAsStream(referenceService, t2Reference)));
-	}
-
-	@Override
-	public void rememberRun(String runId) {
-		this.setRunId(runId);
-		Set<String> directories = runIdToTempDir.get(runId);
-		if (directories == null) {
-			directories = Collections.synchronizedSet(new HashSet<String> ());
-			runIdToTempDir.put(runId, directories);
-		}
-		try {
-			directories.add(tempDir.getCanonicalPath());
-		} catch (IOException e) {
-			logger.error("Unable to record temporary directory: " + tempDir, e);
-		}
-	}
-
-	public static void load(File directory) {
-		File invocationsFile = new File(directory, LOCAL_INVOCATION_FILE);
-		if (!invocationsFile.exists()) {
-			return;
-		}
-		BufferedReader reader = null;
-		try {
-			reader = new BufferedReader(new FileReader(invocationsFile));
-			String line = reader.readLine();
-			while (line != null) {
-				String[] parts = line.split(" ");
-				if (parts.length != 2) {
-					break;
-				}
-				String runId = parts[0];
-				String tempDirString = parts[1];
-				Set<String> tempDirs = runIdToTempDir.get(runId);
-				if (tempDirs == null) {
-					tempDirs = new HashSet<String>();
-					runIdToTempDir.put(runId, tempDirs);
-				}
-				tempDirs.add(tempDirString);
-				line = reader.readLine();
-			}
-		} catch (FileNotFoundException e) {
-			logger.error(e);
-		} catch (IOException e) {
-			logger.error(e);
-		} finally {
-			if (reader != null) {
-				try {
-					reader.close();
-				} catch (IOException e) {
-					logger.error(e);
-				}
-			}
-		}
-	}
-
-	public static void persist(File directory) {
-		File invocationsFile = new File(directory, LOCAL_INVOCATION_FILE);
-		BufferedWriter writer = null;
-		try {
-			writer = new BufferedWriter(new FileWriter(invocationsFile));
-			for (String runId : runIdToTempDir.keySet()) {
-				for (String tempDir : runIdToTempDir.get(runId)) {
-					writer.write(runId);
-					writer.write(" ");
-					writer.write(tempDir);
-					writer.newLine();
-				}
-			}
-		} catch (IOException e) {
-			logger.error(e);
-		} finally {
-			if (writer != null) {
-				try {
-					writer.close();
-				} catch (IOException e) {
-					logger.error(e);
-				}
-			}
-		}
-	}
-
-}



[43/50] [abbrv] incubator-taverna-common-activities git commit: TAVERNA-986 W3C license in META-INF/LICENSE

Posted by st...@apache.org.
TAVERNA-986 W3C license in META-INF/LICENSE

.. not required to be in META-INF/NOTICE


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

Branch: refs/heads/docker
Commit: 3d534c25471f7e2fc84ee7e288e179ec36c1900f
Parents: 778f564
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Jun 20 15:55:20 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Jun 20 15:55:20 2016 +0100

----------------------------------------------------------------------
 .../src/main/resources/META-INF/LICENSE         | 235 +++++++++++++++++++
 .../src/main/resources/META-INF/NOTICE          |  42 ----
 2 files changed, 235 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/3d534c25/taverna-wsdl-generic/src/main/resources/META-INF/LICENSE
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/resources/META-INF/LICENSE b/taverna-wsdl-generic/src/main/resources/META-INF/LICENSE
new file mode 100644
index 0000000..15a6ca7
--- /dev/null
+++ b/taverna-wsdl-generic/src/main/resources/META-INF/LICENSE
@@ -0,0 +1,235 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+---------------------------------------------------------
+taverna-wsdl-generic/src/main/resources/META-INF/soap-encoding.xsd
+Schema for the SOAP/1.1 encoding
+
+Portions � 2001 DevelopMentor. 
+� 2001 W3C (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.  
+ 
+This document is governed by the W3C Software License [1] as described in the FAQ [2].
+[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
+[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD 
+By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:
+
+Permission to use, copy, modify, and distribute this software and its documentation, with or without modification,  for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications, that you make:
+
+1.  The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. 
+
+2.  Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright � 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/" 
+
+3.  Notice of any changes or modifications to the W3C files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)   
+
+Original W3C files; http://www.w3.org/2001/06/soap-encoding
+Changes made: 
+     - reverted namespace to http://schemas.xmlsoap.org/soap/encoding/
+     - reverted root to only allow 0 and 1 as lexical values
+	 - removed default value from root attribute declaration
+
+THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
+
+The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
+---------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/3d534c25/taverna-wsdl-generic/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/taverna-wsdl-generic/src/main/resources/META-INF/NOTICE b/taverna-wsdl-generic/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index e05a123..0000000
--- a/taverna-wsdl-generic/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,42 +0,0 @@
-Apache Taverna WSDL Generic
-Copyright 2014-2016 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-Portions of this software were originally based on the following:
-- Copyright 2007-2014 University of Manchester, UK
-These have been licensed to the Apache Software Foundation under a software grant.
-
----------------------------------------------------------
-taverna-wsdl-generic/src/main/resources/META-INF/soap-encoding.xsd
-Schema for the SOAP/1.1 encoding
-
-Portions � 2001 DevelopMentor. 
-� 2001 W3C (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.  
- 
-This document is governed by the W3C Software License [1] as described in the FAQ [2].
-[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
-[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD 
-By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:
-
-Permission to use, copy, modify, and distribute this software and its documentation, with or without modification,  for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications, that you make:
-
-1.  The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. 
-
-2.  Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright � 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/" 
-
-3.  Notice of any changes or modifications to the W3C files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)   
-
-Original W3C files; http://www.w3.org/2001/06/soap-encoding
-Changes made: 
-     - reverted namespace to http://schemas.xmlsoap.org/soap/encoding/
-     - reverted root to only allow 0 and 1 as lexical values
-	 - removed default value from root attribute declaration
-
-THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
-
-The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
----------------------------------------------------------
\ No newline at end of file