You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by re...@apache.org on 2015/03/23 17:38:10 UTC

[26/51] [partial] incubator-taverna-engine git commit:

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-services-api/src/main/java/uk/org/taverna/commons/services/ServiceRegistry.java
----------------------------------------------------------------------
diff --git a/taverna-services-api/src/main/java/uk/org/taverna/commons/services/ServiceRegistry.java b/taverna-services-api/src/main/java/uk/org/taverna/commons/services/ServiceRegistry.java
deleted file mode 100644
index 62e45b4..0000000
--- a/taverna-services-api/src/main/java/uk/org/taverna/commons/services/ServiceRegistry.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2013 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.commons.services;
-
-import java.net.URI;
-import java.util.Set;
-
-import org.apache.taverna.scufl2.api.port.InputActivityPort;
-import org.apache.taverna.scufl2.api.port.OutputActivityPort;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-/**
- * Register of Taverna services.
- *
- * @author David Withers
- */
-public interface ServiceRegistry {
-
-	/**
-	 * Returns the activity types in the registry.
-	 *
-	 * @return the activity types in the registry
-	 */
-	public Set<URI> getActivityTypes();
-
-	/**
-	 * Returns the JSON Schema for the configuration required by an activity.
-	 *
-	 * @param activityType
-	 *            the activity type
-	 * @return the JSON Schema for the configuration required by an activity
-	 * @throws ActivityTypeNotFoundException
-	 *             if the activity type is not in the registry
-	 */
-	public JsonNode getActivityConfigurationSchema(URI activityType)
-			throws InvalidConfigurationException, ActivityTypeNotFoundException;
-
-	/**
-	 * Returns the input ports that the activity type requires to be present in order to execute
-	 * with the specified configuration.
-	 * <p>
-	 * If the activity does not require any input port for the configuration then an empty set is
-	 * returned.
-	 *
-	 * @param configuration
-	 *            the activity configuration
-	 * @throws ActivityTypeNotFoundException
-	 *             if the activity type is not in the registry
-	 * @return the input ports that the activity requires to be present in order to execute
-	 */
-	public Set<InputActivityPort> getActivityInputPorts(URI activityType,
-			JsonNode configuration) throws InvalidConfigurationException, ActivityTypeNotFoundException;
-
-	/**
-	 * Returns the output ports that the activity type requires to be present in order to execute
-	 * with the specified configuration.
-	 * <p>
-	 * If the activity type does not require any output ports for the configuration then an empty
-	 * set is returned.
-	 *
-	 * @param configuration
-	 *            the activity configuration
-	 * @throws ActivityTypeNotFoundException
-	 *             if the activity type is not in the registry
-	 * @return the output ports that the activity requires to be present in order to execute
-	 */
-	public Set<OutputActivityPort> getActivityOutputPorts(URI activityType,
-			JsonNode configuration) throws InvalidConfigurationException, ActivityTypeNotFoundException;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-services-impl/src/main/java/org/apache/taverna/commons/services/impl/ServiceRegistryImpl.java
----------------------------------------------------------------------
diff --git a/taverna-services-impl/src/main/java/org/apache/taverna/commons/services/impl/ServiceRegistryImpl.java b/taverna-services-impl/src/main/java/org/apache/taverna/commons/services/impl/ServiceRegistryImpl.java
new file mode 100644
index 0000000..1aaf1de
--- /dev/null
+++ b/taverna-services-impl/src/main/java/org/apache/taverna/commons/services/impl/ServiceRegistryImpl.java
@@ -0,0 +1,91 @@
+/*
+* 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.commons.services.impl;
+
+import java.net.URI;
+import java.util.Set;
+
+import org.apache.taverna.commons.services.ActivityTypeNotFoundException;
+import org.apache.taverna.commons.services.InvalidConfigurationException;
+import org.apache.taverna.commons.services.ServiceRegistry;
+import org.apache.taverna.platform.capability.api.ActivityConfigurationException;
+import org.apache.taverna.platform.capability.api.ActivityNotFoundException;
+import org.apache.taverna.platform.capability.api.ActivityService;
+import org.apache.taverna.scufl2.api.port.InputActivityPort;
+import org.apache.taverna.scufl2.api.port.OutputActivityPort;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+/**
+ * Simple implementation of a ServiceRegistry that discovers available services from the
+ * ActivityService.
+ *
+ * @author David Withers
+ */
+public class ServiceRegistryImpl implements ServiceRegistry {
+
+	private ActivityService activityService;
+
+	@Override
+	public Set<URI> getActivityTypes() {
+		return activityService.getActivityTypes();
+	}
+
+	@Override
+	public JsonNode getActivityConfigurationSchema(URI activityType)
+			throws InvalidConfigurationException, ActivityTypeNotFoundException {
+		try {
+			return activityService.getActivityConfigurationSchema(activityType);
+		} catch (ActivityConfigurationException e) {
+			throw new InvalidConfigurationException(e);
+		} catch (ActivityNotFoundException e) {
+			throw new ActivityTypeNotFoundException(e);
+		}
+	}
+
+	@Override
+	public Set<InputActivityPort> getActivityInputPorts(URI activityType, JsonNode configuration)
+			throws InvalidConfigurationException, ActivityTypeNotFoundException {
+		try {
+			return activityService.getActivityInputPorts(activityType, configuration);
+		} catch (ActivityConfigurationException e) {
+			throw new InvalidConfigurationException(e);
+		} catch (ActivityNotFoundException e) {
+			throw new ActivityTypeNotFoundException(e);
+		}
+	}
+
+	@Override
+	public Set<OutputActivityPort> getActivityOutputPorts(URI activityType, JsonNode configuration)
+			throws InvalidConfigurationException, ActivityTypeNotFoundException {
+		try {
+			return activityService.getActivityOutputPorts(activityType, configuration);
+		} catch (ActivityConfigurationException e) {
+			throw new InvalidConfigurationException(e);
+		} catch (ActivityNotFoundException e) {
+			throw new ActivityTypeNotFoundException(e);
+		}
+	}
+
+	public void setActivityService(ActivityService activityService) {
+		this.activityService = activityService;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-services-impl/src/main/java/uk/org/taverna/commons/services/impl/ServiceRegistryImpl.java
----------------------------------------------------------------------
diff --git a/taverna-services-impl/src/main/java/uk/org/taverna/commons/services/impl/ServiceRegistryImpl.java b/taverna-services-impl/src/main/java/uk/org/taverna/commons/services/impl/ServiceRegistryImpl.java
deleted file mode 100644
index bb5a0d0..0000000
--- a/taverna-services-impl/src/main/java/uk/org/taverna/commons/services/impl/ServiceRegistryImpl.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2013 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.commons.services.impl;
-
-import java.net.URI;
-import java.util.Set;
-
-import uk.org.taverna.commons.services.ActivityTypeNotFoundException;
-import uk.org.taverna.commons.services.InvalidConfigurationException;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import org.apache.taverna.platform.capability.api.ActivityConfigurationException;
-import org.apache.taverna.platform.capability.api.ActivityNotFoundException;
-import org.apache.taverna.platform.capability.api.ActivityService;
-import org.apache.taverna.scufl2.api.port.InputActivityPort;
-import org.apache.taverna.scufl2.api.port.OutputActivityPort;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-/**
- * Simple implementation of a ServiceRegistry that discovers available services from the
- * ActivityService.
- *
- * @author David Withers
- */
-public class ServiceRegistryImpl implements ServiceRegistry {
-
-	private ActivityService activityService;
-
-	@Override
-	public Set<URI> getActivityTypes() {
-		return activityService.getActivityTypes();
-	}
-
-	@Override
-	public JsonNode getActivityConfigurationSchema(URI activityType)
-			throws InvalidConfigurationException, ActivityTypeNotFoundException {
-		try {
-			return activityService.getActivityConfigurationSchema(activityType);
-		} catch (ActivityConfigurationException e) {
-			throw new InvalidConfigurationException(e);
-		} catch (ActivityNotFoundException e) {
-			throw new ActivityTypeNotFoundException(e);
-		}
-	}
-
-	@Override
-	public Set<InputActivityPort> getActivityInputPorts(URI activityType, JsonNode configuration)
-			throws InvalidConfigurationException, ActivityTypeNotFoundException {
-		try {
-			return activityService.getActivityInputPorts(activityType, configuration);
-		} catch (ActivityConfigurationException e) {
-			throw new InvalidConfigurationException(e);
-		} catch (ActivityNotFoundException e) {
-			throw new ActivityTypeNotFoundException(e);
-		}
-	}
-
-	@Override
-	public Set<OutputActivityPort> getActivityOutputPorts(URI activityType, JsonNode configuration)
-			throws InvalidConfigurationException, ActivityTypeNotFoundException {
-		try {
-			return activityService.getActivityOutputPorts(activityType, configuration);
-		} catch (ActivityConfigurationException e) {
-			throw new InvalidConfigurationException(e);
-		} catch (ActivityNotFoundException e) {
-			throw new ActivityTypeNotFoundException(e);
-		}
-	}
-
-	public void setActivityService(ActivityService activityService) {
-		this.activityService = activityService;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-services-impl/src/main/resources/META-INF/spring/taverna-services-context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-services-impl/src/main/resources/META-INF/spring/taverna-services-context-osgi.xml b/taverna-services-impl/src/main/resources/META-INF/spring/taverna-services-context-osgi.xml
index 70fdfef..b33d451 100644
--- a/taverna-services-impl/src/main/resources/META-INF/spring/taverna-services-context-osgi.xml
+++ b/taverna-services-impl/src/main/resources/META-INF/spring/taverna-services-context-osgi.xml
@@ -6,7 +6,7 @@
                                  http://www.springframework.org/schema/osgi
                                  http://www.springframework.org/schema/osgi/spring-osgi.xsd">
 
-	<service ref="serviceRegistry" interface="uk.org.taverna.commons.services.ServiceRegistry" />
+	<service ref="serviceRegistry" interface="org.apache.taverna.commons.services.ServiceRegistry" />
 
     <reference id="activityService" interface="uk.org.taverna.platform.capability.api.ActivityService" />
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-services-impl/src/main/resources/META-INF/spring/taverna-services-context.xml
----------------------------------------------------------------------
diff --git a/taverna-services-impl/src/main/resources/META-INF/spring/taverna-services-context.xml b/taverna-services-impl/src/main/resources/META-INF/spring/taverna-services-context.xml
index 72c88d1..4ee6119 100644
--- a/taverna-services-impl/src/main/resources/META-INF/spring/taverna-services-context.xml
+++ b/taverna-services-impl/src/main/resources/META-INF/spring/taverna-services-context.xml
@@ -3,7 +3,7 @@
 	xsi:schemaLocation="http://www.springframework.org/schema/beans
                            http://www.springframework.org/schema/beans/spring-beans.xsd">
 
-	<bean id="serviceRegistry" class="uk.org.taverna.commons.services.impl.ServiceRegistryImpl">
+	<bean id="serviceRegistry" class="org.apache.taverna.commons.services.impl.ServiceRegistryImpl">
 		<property name="activityService" ref="activityService" />
 	</bean>
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivity.java
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivity.java b/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivity.java
deleted file mode 100644
index 7248f90..0000000
--- a/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivity.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.stringconstant;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import net.sf.taverna.t2.annotation.annotationbeans.MimeType;
-import net.sf.taverna.t2.reference.ReferenceService;
-import net.sf.taverna.t2.reference.ReferenceServiceException;
-import net.sf.taverna.t2.reference.T2Reference;
-import net.sf.taverna.t2.workflowmodel.EditException;
-import net.sf.taverna.t2.workflowmodel.processor.activity.AbstractAsynchronousActivity;
-import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityConfigurationException;
-import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityOutputPort;
-import net.sf.taverna.t2.workflowmodel.processor.activity.AsynchronousActivityCallback;
-
-import org.apache.log4j.Logger;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-/**
- * An Activity that holds a constant string value.
- * <p>
- * It is automatically configured to have no input ports and only one output port named
- * <em>value</em>.
- *
- * @author Stuart Owen
- * @author David Withers
- */
-public class StringConstantActivity extends AbstractAsynchronousActivity<JsonNode> {
-
-	public static final String URI = "http://ns.taverna.org.uk/2010/activity/constant";
-
-	private static final Logger logger = Logger.getLogger(StringConstantActivity.class);
-
-	private String value;
-
-	private JsonNode json;
-
-	@Override
-	public void configure(JsonNode json) throws ActivityConfigurationException {
-		this.json = json;
-		this.value = json.get("string").asText();
-//		if (outputPorts.size() == 0) {
-//			addOutput("value", 0, "text/plain");
-//		}
-	}
-
-	public String getStringValue() {
-		return json.get("string").asText();
-	}
-
-	@Override
-	public JsonNode getConfiguration() {
-		return json;
-	}
-
-	@Override
-	public void executeAsynch(final Map<String, T2Reference> data,
-			final AsynchronousActivityCallback callback) {
-		callback.requestRun(new Runnable() {
-
-			@Override
-			public void run() {
-				ReferenceService referenceService = callback.getContext().getReferenceService();
-				try {
-					T2Reference id = referenceService.register(value, 0, true,
-							callback.getContext());
-					Map<String, T2Reference> outputData = new HashMap<String, T2Reference>();
-					outputData.put("value", id);
-					callback.receiveResult(outputData, new int[0]);
-				} catch (ReferenceServiceException e) {
-					callback.fail(e.getMessage(), e);
-				}
-			}
-
-		});
-
-	}
-
-//	protected void addOutput(String portName, int portDepth, String type) {
-//		ActivityOutputPort port = edits.createActivityOutputPort(portName, portDepth, portDepth);
-//		MimeType mimeType = new MimeType();
-//		mimeType.setText(type);
-//		try {
-//			edits.getAddAnnotationChainEdit(port, mimeType).doEdit();
-//		} catch (EditException e) {
-//			logger.debug("Error adding MimeType annotation to port", e);
-//		}
-//		outputPorts.add(port);
-//	}
-
-	public String getExtraDescription() {
-		if (value.length() > 60) {
-			return value.substring(0, 60 - 3) + "...";
-		}
-		return value;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityFactory.java
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityFactory.java b/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityFactory.java
deleted file mode 100644
index d11d15e..0000000
--- a/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityFactory.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2010 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.stringconstant;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.HashSet;
-import java.util.Set;
-
-import net.sf.taverna.t2.workflowmodel.Edits;
-import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityFactory;
-import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityInputPort;
-import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityOutputPort;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-/**
- * An {@link ActivityFactory} for creating <code>StringConstantActivity</code>.
- *
- * @author David Withers
- */
-public class StringConstantActivityFactory implements ActivityFactory {
-
-	private Edits edits;
-
-	@Override
-	public StringConstantActivity createActivity() {
-		return new StringConstantActivity();
-	}
-
-	@Override
-	public URI getActivityType() {
-		return URI.create(StringConstantActivity.URI);
-	}
-
-	@Override
-	public JsonNode getActivityConfigurationSchema() {
-		ObjectMapper objectMapper = new ObjectMapper();
-		try {
- 			return objectMapper.readTree(getClass().getResource("/schema.json"));
-		} catch (IOException e) {
-			return objectMapper.createObjectNode();
-		}
-	}
-
-	@Override
-	public Set<ActivityInputPort> getInputPorts(JsonNode configuration) {
-		return new HashSet<>();
-	}
-
-	@Override
-	public Set<ActivityOutputPort> getOutputPorts(JsonNode configuration) {
-		Set<ActivityOutputPort> outputPorts = new HashSet<>();
-		outputPorts.add(edits.createActivityOutputPort("value", 0, 0));
-		return outputPorts;
-	}
-
-	public void setEdits(Edits edits) {
-		this.edits = edits;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityHealthChecker.java
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityHealthChecker.java b/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityHealthChecker.java
deleted file mode 100644
index 27cef3f..0000000
--- a/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityHealthChecker.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.stringconstant;
-
-import java.util.List;
-
-import net.sf.taverna.t2.workflowmodel.Processor;
-import net.sf.taverna.t2.workflowmodel.health.HealthCheck;
-import net.sf.taverna.t2.workflowmodel.health.HealthChecker;
-import net.sf.taverna.t2.visit.VisitReport;
-import net.sf.taverna.t2.visit.VisitReport.Status;
-
-public class StringConstantActivityHealthChecker implements HealthChecker<StringConstantActivity> {
-
-	public boolean canVisit(Object subject) {
-		return subject!=null && subject instanceof StringConstantActivity;
-	}
-
-	public VisitReport visit(StringConstantActivity activity, List<Object> ancestors) {
-		Processor p = (Processor) VisitReport.findAncestor(ancestors, Processor.class);
-		if (p == null) {
-			return null;
-		}
-		String value = activity.getConfiguration().get("string").asText();
-		if (value==null) {
-			return new VisitReport(HealthCheck.getInstance(), p,"No value", HealthCheck.NULL_VALUE, Status.SEVERE);
-		}
-		if ("Add your own value here".equals(value)) {
-			VisitReport vr = new VisitReport(HealthCheck.getInstance(), p, "Default value", HealthCheck.DEFAULT_VALUE, Status.WARNING);
-			vr.setProperty("value", value);
-			return vr;
-		}
-		return new VisitReport(HealthCheck.getInstance(), p, "StringConstant is OK", HealthCheck.NO_PROBLEM, Status.OK);
-	}
-
-	public boolean isTimeConsuming() {
-		return false;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantConfigurationBean.java
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantConfigurationBean.java b/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantConfigurationBean.java
deleted file mode 100644
index f4ae082..0000000
--- a/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/StringConstantConfigurationBean.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.stringconstant;
-
-import net.sf.taverna.t2.workflowmodel.processor.config.ConfigurationBean;
-import net.sf.taverna.t2.workflowmodel.processor.config.ConfigurationProperty;
-
-/**
- * Configuration bean for setting up a StringConstantActivity.<br>
- * The only thing to be configured is the string value, since the ports are fixed.
- * 
- * @author Stuart Owen
- * @see StringConstantActivity
- */
-@ConfigurationBean(uri = StringConstantActivity.URI + "#Config")
-public class StringConstantConfigurationBean {
-	private String value;
-
-	public String getValue() {
-		return value;
-	}
-
-	@ConfigurationProperty(name = "string", label = "Constant String Value", description = "The value of the string constant")
-	public void setValue(String value) {
-		this.value = value;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/package.html
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/package.html b/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/package.html
deleted file mode 100644
index 400b576..0000000
--- a/taverna-stringconstant-activity/src/main/java/net/sf/taverna/t2/activities/stringconstant/package.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<body>
-Contains the activity classes required in the execution of Beanshell scripts.
-</body>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantActivity.java
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantActivity.java b/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantActivity.java
new file mode 100644
index 0000000..28d723d
--- /dev/null
+++ b/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantActivity.java
@@ -0,0 +1,118 @@
+/*
+* 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.stringconstant;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.taverna.annotation.annotationbeans.MimeType;
+import org.apache.taverna.reference.ReferenceService;
+import org.apache.taverna.reference.ReferenceServiceException;
+import org.apache.taverna.reference.T2Reference;
+import org.apache.taverna.workflowmodel.EditException;
+import org.apache.taverna.workflowmodel.processor.activity.AbstractAsynchronousActivity;
+import org.apache.taverna.workflowmodel.processor.activity.ActivityConfigurationException;
+import org.apache.taverna.workflowmodel.processor.activity.ActivityOutputPort;
+import org.apache.taverna.workflowmodel.processor.activity.AsynchronousActivityCallback;
+
+import org.apache.log4j.Logger;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+/**
+ * An Activity that holds a constant string value.
+ * <p>
+ * It is automatically configured to have no input ports and only one output port named
+ * <em>value</em>.
+ *
+ * @author Stuart Owen
+ * @author David Withers
+ */
+public class StringConstantActivity extends AbstractAsynchronousActivity<JsonNode> {
+
+	public static final String URI = "http://ns.taverna.org.uk/2010/activity/constant";
+
+	private static final Logger logger = Logger.getLogger(StringConstantActivity.class);
+
+	private String value;
+
+	private JsonNode json;
+
+	@Override
+	public void configure(JsonNode json) throws ActivityConfigurationException {
+		this.json = json;
+		this.value = json.get("string").asText();
+//		if (outputPorts.size() == 0) {
+//			addOutput("value", 0, "text/plain");
+//		}
+	}
+
+	public String getStringValue() {
+		return json.get("string").asText();
+	}
+
+	@Override
+	public JsonNode getConfiguration() {
+		return json;
+	}
+
+	@Override
+	public void executeAsynch(final Map<String, T2Reference> data,
+			final AsynchronousActivityCallback callback) {
+		callback.requestRun(new Runnable() {
+
+			@Override
+			public void run() {
+				ReferenceService referenceService = callback.getContext().getReferenceService();
+				try {
+					T2Reference id = referenceService.register(value, 0, true,
+							callback.getContext());
+					Map<String, T2Reference> outputData = new HashMap<String, T2Reference>();
+					outputData.put("value", id);
+					callback.receiveResult(outputData, new int[0]);
+				} catch (ReferenceServiceException e) {
+					callback.fail(e.getMessage(), e);
+				}
+			}
+
+		});
+
+	}
+
+//	protected void addOutput(String portName, int portDepth, String type) {
+//		ActivityOutputPort port = edits.createActivityOutputPort(portName, portDepth, portDepth);
+//		MimeType mimeType = new MimeType();
+//		mimeType.setText(type);
+//		try {
+//			edits.getAddAnnotationChainEdit(port, mimeType).doEdit();
+//		} catch (EditException e) {
+//			logger.debug("Error adding MimeType annotation to port", e);
+//		}
+//		outputPorts.add(port);
+//	}
+
+	public String getExtraDescription() {
+		if (value.length() > 60) {
+			return value.substring(0, 60 - 3) + "...";
+		}
+		return value;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantActivityFactory.java
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantActivityFactory.java b/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantActivityFactory.java
new file mode 100644
index 0000000..ceab1b5
--- /dev/null
+++ b/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantActivityFactory.java
@@ -0,0 +1,80 @@
+/*
+* 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.stringconstant;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.taverna.workflowmodel.Edits;
+import org.apache.taverna.workflowmodel.processor.activity.ActivityFactory;
+import org.apache.taverna.workflowmodel.processor.activity.ActivityInputPort;
+import org.apache.taverna.workflowmodel.processor.activity.ActivityOutputPort;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+/**
+ * An {@link ActivityFactory} for creating <code>StringConstantActivity</code>.
+ *
+ * @author David Withers
+ */
+public class StringConstantActivityFactory implements ActivityFactory {
+
+	private Edits edits;
+
+	@Override
+	public StringConstantActivity createActivity() {
+		return new StringConstantActivity();
+	}
+
+	@Override
+	public URI getActivityType() {
+		return URI.create(StringConstantActivity.URI);
+	}
+
+	@Override
+	public JsonNode getActivityConfigurationSchema() {
+		ObjectMapper objectMapper = new ObjectMapper();
+		try {
+ 			return objectMapper.readTree(getClass().getResource("/schema.json"));
+		} catch (IOException e) {
+			return objectMapper.createObjectNode();
+		}
+	}
+
+	@Override
+	public Set<ActivityInputPort> getInputPorts(JsonNode configuration) {
+		return new HashSet<>();
+	}
+
+	@Override
+	public Set<ActivityOutputPort> getOutputPorts(JsonNode configuration) {
+		Set<ActivityOutputPort> outputPorts = new HashSet<>();
+		outputPorts.add(edits.createActivityOutputPort("value", 0, 0));
+		return outputPorts;
+	}
+
+	public void setEdits(Edits edits) {
+		this.edits = edits;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantActivityHealthChecker.java
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantActivityHealthChecker.java b/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantActivityHealthChecker.java
new file mode 100644
index 0000000..3557547
--- /dev/null
+++ b/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantActivityHealthChecker.java
@@ -0,0 +1,57 @@
+/*
+* 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.stringconstant;
+
+import java.util.List;
+
+import org.apache.taverna.workflowmodel.Processor;
+import org.apache.taverna.workflowmodel.health.HealthCheck;
+import org.apache.taverna.workflowmodel.health.HealthChecker;
+import org.apache.taverna.visit.VisitReport;
+import org.apache.taverna.visit.VisitReport.Status;
+
+public class StringConstantActivityHealthChecker implements HealthChecker<StringConstantActivity> {
+
+	public boolean canVisit(Object subject) {
+		return subject!=null && subject instanceof StringConstantActivity;
+	}
+
+	public VisitReport visit(StringConstantActivity activity, List<Object> ancestors) {
+		Processor p = (Processor) VisitReport.findAncestor(ancestors, Processor.class);
+		if (p == null) {
+			return null;
+		}
+		String value = activity.getConfiguration().get("string").asText();
+		if (value==null) {
+			return new VisitReport(HealthCheck.getInstance(), p,"No value", HealthCheck.NULL_VALUE, Status.SEVERE);
+		}
+		if ("Add your own value here".equals(value)) {
+			VisitReport vr = new VisitReport(HealthCheck.getInstance(), p, "Default value", HealthCheck.DEFAULT_VALUE, Status.WARNING);
+			vr.setProperty("value", value);
+			return vr;
+		}
+		return new VisitReport(HealthCheck.getInstance(), p, "StringConstant is OK", HealthCheck.NO_PROBLEM, Status.OK);
+	}
+
+	public boolean isTimeConsuming() {
+		return false;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantConfigurationBean.java
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantConfigurationBean.java b/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantConfigurationBean.java
new file mode 100644
index 0000000..c176aa4
--- /dev/null
+++ b/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/StringConstantConfigurationBean.java
@@ -0,0 +1,44 @@
+/*
+* 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.stringconstant;
+
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationBean;
+import org.apache.taverna.workflowmodel.processor.config.ConfigurationProperty;
+
+/**
+ * Configuration bean for setting up a StringConstantActivity.<br>
+ * The only thing to be configured is the string value, since the ports are fixed.
+ * 
+ * @author Stuart Owen
+ * @see StringConstantActivity
+ */
+@ConfigurationBean(uri = StringConstantActivity.URI + "#Config")
+public class StringConstantConfigurationBean {
+	private String value;
+
+	public String getValue() {
+		return value;
+	}
+
+	@ConfigurationProperty(name = "string", label = "Constant String Value", description = "The value of the string constant")
+	public void setValue(String value) {
+		this.value = value;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/package.html
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/package.html b/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/package.html
new file mode 100644
index 0000000..400b576
--- /dev/null
+++ b/taverna-stringconstant-activity/src/main/java/org/apache/taverna/activities/stringconstant/package.html
@@ -0,0 +1,3 @@
+<body>
+Contains the activity classes required in the execution of Beanshell scripts.
+</body>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/main/resources/META-INF/services/net.sf.taverna.t2.workflowmodel.health.HealthChecker
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/main/resources/META-INF/services/net.sf.taverna.t2.workflowmodel.health.HealthChecker b/taverna-stringconstant-activity/src/main/resources/META-INF/services/net.sf.taverna.t2.workflowmodel.health.HealthChecker
deleted file mode 100644
index ed959fb..0000000
--- a/taverna-stringconstant-activity/src/main/resources/META-INF/services/net.sf.taverna.t2.workflowmodel.health.HealthChecker
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.stringconstant.StringConstantActivityHealthChecker
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/main/resources/META-INF/services/org.apache.taverna.workflowmodel.health.HealthChecker
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/main/resources/META-INF/services/org.apache.taverna.workflowmodel.health.HealthChecker b/taverna-stringconstant-activity/src/main/resources/META-INF/services/org.apache.taverna.workflowmodel.health.HealthChecker
new file mode 100644
index 0000000..11c7f33
--- /dev/null
+++ b/taverna-stringconstant-activity/src/main/resources/META-INF/services/org.apache.taverna.workflowmodel.health.HealthChecker
@@ -0,0 +1 @@
+org.apache.taverna.activities.stringconstant.StringConstantActivityHealthChecker
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/main/resources/META-INF/spring/stringconstant-activity-context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/main/resources/META-INF/spring/stringconstant-activity-context-osgi.xml b/taverna-stringconstant-activity/src/main/resources/META-INF/spring/stringconstant-activity-context-osgi.xml
index d6750b1..098154d 100644
--- a/taverna-stringconstant-activity/src/main/resources/META-INF/spring/stringconstant-activity-context-osgi.xml
+++ b/taverna-stringconstant-activity/src/main/resources/META-INF/spring/stringconstant-activity-context-osgi.xml
@@ -6,10 +6,10 @@
                                  http://www.springframework.org/schema/osgi
                                  http://www.springframework.org/schema/osgi/spring-osgi.xsd">
 
-	<service ref="stringconstantActivityHealthChecker" interface="net.sf.taverna.t2.workflowmodel.health.HealthChecker" />
+	<service ref="stringconstantActivityHealthChecker" interface="org.apache.taverna.workflowmodel.health.HealthChecker" />
 
-	<service ref="stringconstantActivityFactory" interface="net.sf.taverna.t2.workflowmodel.processor.activity.ActivityFactory" />
+	<service ref="stringconstantActivityFactory" interface="org.apache.taverna.workflowmodel.processor.activity.ActivityFactory" />
 
-	<reference id="edits" interface="net.sf.taverna.t2.workflowmodel.Edits" />
+	<reference id="edits" interface="org.apache.taverna.workflowmodel.Edits" />
 
 </beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/main/resources/META-INF/spring/stringconstant-activity-context.xml
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/main/resources/META-INF/spring/stringconstant-activity-context.xml b/taverna-stringconstant-activity/src/main/resources/META-INF/spring/stringconstant-activity-context.xml
index 4df863a..806bb1f 100644
--- a/taverna-stringconstant-activity/src/main/resources/META-INF/spring/stringconstant-activity-context.xml
+++ b/taverna-stringconstant-activity/src/main/resources/META-INF/spring/stringconstant-activity-context.xml
@@ -3,9 +3,9 @@
 	xsi:schemaLocation="http://www.springframework.org/schema/beans
                            http://www.springframework.org/schema/beans/spring-beans.xsd">
 
-	<bean id="stringconstantActivityHealthChecker" class="net.sf.taverna.t2.activities.stringconstant.StringConstantActivityHealthChecker" />
+	<bean id="stringconstantActivityHealthChecker" class="org.apache.taverna.activities.stringconstant.StringConstantActivityHealthChecker" />
 
-	<bean id="stringconstantActivityFactory" class="net.sf.taverna.t2.activities.stringconstant.StringConstantActivityFactory">
+	<bean id="stringconstantActivityFactory" class="org.apache.taverna.activities.stringconstant.StringConstantActivityFactory">
 		<property name="edits" ref="edits" />
 	</bean>
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/test/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityFactoryTest.java
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/test/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityFactoryTest.java b/taverna-stringconstant-activity/src/test/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityFactoryTest.java
deleted file mode 100644
index 61560f2..0000000
--- a/taverna-stringconstant-activity/src/test/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityFactoryTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2010 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.stringconstant;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.net.URI;
-
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * 
- * @author David Withers
- */
-public class StringConstantActivityFactoryTest {
-
-	private StringConstantActivityFactory factory;
-	
-	/**
-	 * @throws java.lang.Exception
-	 */
-	@Before
-	public void setUp() throws Exception {
-		factory = new StringConstantActivityFactory();
-	}
-
-	/**
-	 * Test method for {@link net.sf.taverna.t2.activities.beanshell.BeanshellActivityFactory#createActivity()}.
-	 */
-	@Test
-	public void testCreateActivity() {
-		StringConstantActivity createActivity = factory.createActivity();
-		assertNotNull(createActivity);
-	}
-
-	/**
-	 * Test method for {@link net.sf.taverna.t2.activities.beanshell.BeanshellActivityFactory#getActivityType()}.
-	 */
-	@Test
-	public void testGetActivityURI() {
-		assertEquals(URI.create(StringConstantActivity.URI), factory.getActivityType());
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/test/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityTest.java
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/test/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityTest.java b/taverna-stringconstant-activity/src/test/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityTest.java
deleted file mode 100644
index a191e8e..0000000
--- a/taverna-stringconstant-activity/src/test/java/net/sf/taverna/t2/activities/stringconstant/StringConstantActivityTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.stringconstant;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import net.sf.taverna.t2.activities.testutils.ActivityInvoker;
-import net.sf.taverna.t2.workflowmodel.AbstractPort;
-
-import org.junit.Test;
-
-/**
- * Tests the StringConstantActivity
- * @author Stuart Owen
- *
- */
-public class StringConstantActivityTest {
-
-	/**
-	 * Simple invocation test. Also tests Activity.configure sets up the correct output port.
-	 * @throws Exception
-	 */
-	@Test
-	public void testInvoke() throws Exception {
-		return;
-//		StringConstantConfigurationBean bean = new StringConstantConfigurationBean();
-//		bean.setValue("this_is_a_string");
-//		StringConstantActivity activity = new StringConstantActivity();
-//		activity.configure(bean);
-//		
-//		assertEquals("there should be no inputs",0,activity.getInputPorts().size());
-//		assertEquals("there should be 1 output",1,activity.getOutputPorts().size());
-//		assertEquals("the output port name should be value","value",((AbstractPort)activity.getOutputPorts().toArray()[0]).getName());
-//		
-//		Map<String, Class<?>> expectedOutputs = new HashMap<String, Class<?>>();
-//		expectedOutputs.put("value", String.class);
-//
-//		Map<String,Object> outputs = ActivityInvoker.invokeAsyncActivity(activity, new HashMap<String, Object>(), expectedOutputs);
-//		
-//		assertEquals("there should be 1 output",1,outputs.size());
-//		assertTrue("there should be an output named value",outputs.containsKey("value"));
-//		assertEquals("The value of the output should be 'this_is_a_string'","this_is_a_string",outputs.get("value"));
-//		assertTrue("The output type should be String",outputs.get("value") instanceof String);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/test/java/org/apache/taverna/activities/stringconstant/StringConstantActivityFactoryTest.java
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/test/java/org/apache/taverna/activities/stringconstant/StringConstantActivityFactoryTest.java b/taverna-stringconstant-activity/src/test/java/org/apache/taverna/activities/stringconstant/StringConstantActivityFactoryTest.java
new file mode 100644
index 0000000..f3d6a2c
--- /dev/null
+++ b/taverna-stringconstant-activity/src/test/java/org/apache/taverna/activities/stringconstant/StringConstantActivityFactoryTest.java
@@ -0,0 +1,63 @@
+/*
+* 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.stringconstant;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.net.URI;
+
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * 
+ * @author David Withers
+ */
+public class StringConstantActivityFactoryTest {
+
+	private StringConstantActivityFactory factory;
+	
+	/**
+	 * @throws java.lang.Exception
+	 */
+	@Before
+	public void setUp() throws Exception {
+		factory = new StringConstantActivityFactory();
+	}
+
+	/**
+	 * Test method for {@link org.apache.taverna.activities.beanshell.BeanshellActivityFactory#createActivity()}.
+	 */
+	@Test
+	public void testCreateActivity() {
+		StringConstantActivity createActivity = factory.createActivity();
+		assertNotNull(createActivity);
+	}
+
+	/**
+	 * Test method for {@link org.apache.taverna.activities.beanshell.BeanshellActivityFactory#getActivityType()}.
+	 */
+	@Test
+	public void testGetActivityURI() {
+		assertEquals(URI.create(StringConstantActivity.URI), factory.getActivityType());
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-stringconstant-activity/src/test/java/org/apache/taverna/activities/stringconstant/StringConstantActivityTest.java
----------------------------------------------------------------------
diff --git a/taverna-stringconstant-activity/src/test/java/org/apache/taverna/activities/stringconstant/StringConstantActivityTest.java b/taverna-stringconstant-activity/src/test/java/org/apache/taverna/activities/stringconstant/StringConstantActivityTest.java
new file mode 100644
index 0000000..d42058a
--- /dev/null
+++ b/taverna-stringconstant-activity/src/test/java/org/apache/taverna/activities/stringconstant/StringConstantActivityTest.java
@@ -0,0 +1,58 @@
+/*
+* 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.stringconstant;
+
+
+import org.junit.Test;
+
+/**
+ * Tests the StringConstantActivity
+ * @author Stuart Owen
+ *
+ */
+public class StringConstantActivityTest {
+
+	/**
+	 * Simple invocation test. Also tests Activity.configure sets up the correct output port.
+	 * @throws Exception
+	 */
+	@Test
+	public void testInvoke() throws Exception {
+		return;
+//		StringConstantConfigurationBean bean = new StringConstantConfigurationBean();
+//		bean.setValue("this_is_a_string");
+//		StringConstantActivity activity = new StringConstantActivity();
+//		activity.configure(bean);
+//		
+//		assertEquals("there should be no inputs",0,activity.getInputPorts().size());
+//		assertEquals("there should be 1 output",1,activity.getOutputPorts().size());
+//		assertEquals("the output port name should be value","value",((AbstractPort)activity.getOutputPorts().toArray()[0]).getName());
+//		
+//		Map<String, Class<?>> expectedOutputs = new HashMap<String, Class<?>>();
+//		expectedOutputs.put("value", String.class);
+//
+//		Map<String,Object> outputs = ActivityInvoker.invokeAsyncActivity(activity, new HashMap<String, Object>(), expectedOutputs);
+//		
+//		assertEquals("there should be 1 output",1,outputs.size());
+//		assertTrue("there should be an output named value",outputs.containsKey("value"));
+//		assertEquals("The value of the output should be 'this_is_a_string'","this_is_a_string",outputs.get("value"));
+//		assertTrue("The output type should be String",outputs.get("value") instanceof String);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AbstractAnnotatedThing.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AbstractAnnotatedThing.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AbstractAnnotatedThing.java
deleted file mode 100644
index e9dda93..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AbstractAnnotatedThing.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.annotation;
-
-import static java.util.Collections.unmodifiableSet;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import net.sf.taverna.t2.workflowmodel.Edit;
-import net.sf.taverna.t2.workflowmodel.EditException;
-
-/**
- * Convenient abstract superclass for annotated things, manages edits.
- * Subclasses of this must implement the Annotated interface with their own
- * interface type as the parameter, so for example Processor subclasses would
- * implement Annotated&lt;Processor&gt;
- * 
- * @author Tom Oinn
- * @author Alan R Williams
- */
-public abstract class AbstractAnnotatedThing<T> implements Annotated<T> {
-	private Set<AnnotationChain> annotations = new HashSet<>();
-
-	/**
-	 * Return the set of annotations bound to this annotated object, the set
-	 * returned is an unmodifiable copy of the internal annotation set, if you
-	 * need to modify the annotations you should use the get methods for Edit
-	 * objects to do so.
-	 * 
-	 * @see net.sf.taverna.t2.annotation.Annotated#getAnnotations()
-	 */
-	@Override
-	public final Set<AnnotationChain> getAnnotations() {
-		return unmodifiableSet(annotations);
-	}
-
-	/**
-	 * Set the annotation chains associated with this annotated object. This is
-	 * only needed for deserialization and could almost certainly be done in a
-	 * better way.
-	 * 
-	 * @param annotations
-	 */
-	@Override
-	public final void setAnnotations(Set<AnnotationChain> annotations) {
-		this.annotations = annotations;
-	}
-
-	/**
-	 * Superclass of edits to remove, add and replace annotations on instances
-	 * of the enclosing AbstractAnnotatedThing class
-	 * 
-	 * @author Tom
-	 * @param <TargetType>
-	 */
-	private static abstract class AbstractAnnotationEdit<TargetType> implements
-			Edit<TargetType> {
-		private AbstractAnnotatedThing<TargetType> subject;
-		private boolean applied = false;
-
-		protected AbstractAnnotationEdit(
-				AbstractAnnotatedThing<TargetType> subject) {
-			this.subject = subject;
-		}
-
-		@Override
-		@SuppressWarnings("unchecked")
-		public final TargetType doEdit() throws EditException {
-			synchronized (subject) {
-				if (applied)
-					throw new EditException("Edit already applied!");
-				doEditAction(subject);
-				this.applied = true;
-				return (TargetType) subject;
-			}
-		}
-
-		protected abstract void doEditAction(AbstractAnnotatedThing<?> subject)
-				throws EditException;
-
-		protected abstract void undoEditAction(AbstractAnnotatedThing<?> subject);
-
-		@Override
-		@SuppressWarnings("unchecked")
-		public final TargetType getSubject() {
-			return (TargetType) subject;
-		}
-
-		@Override
-		public final boolean isApplied() {
-			return this.applied;
-		}
-
-		@Override
-		public final void undo() {
-			synchronized (subject) {
-				if (!applied)
-					throw new RuntimeException(
-							"Attempt to undo edit that was never applied");
-				undoEditAction(subject);
-				applied = false;
-			}
-		}
-	}
-
-	/**
-	 * @see net.sf.taverna.t2.annotation.Annotated#getAddAnnotationEdit(net.sf.taverna.t2.annotation.WorkflowAnnotation)
-	 */
-	@Override
-	public final Edit<T> getAddAnnotationEdit(
-			final AnnotationChain newAnnotation) {
-		return new AbstractAnnotationEdit<T>(this) {
-			@Override
-			protected void doEditAction(AbstractAnnotatedThing<?> subject)
-					throws EditException {
-				annotations.add(newAnnotation);
-			}
-
-			@Override
-			protected void undoEditAction(AbstractAnnotatedThing<?> subject) {
-				annotations.remove(newAnnotation);
-			}
-		};
-	}
-
-	/**
-	 * @see net.sf.taverna.t2.annotation.Annotated#getRemoveAnnotationEdit(net.sf.taverna.t2.annotation.WorkflowAnnotation)
-	 */
-	@Override
-	public final Edit<T> getRemoveAnnotationEdit(
-			final AnnotationChain annotationToRemove) {
-		return new AbstractAnnotationEdit<T>(this) {
-			@Override
-			protected void doEditAction(AbstractAnnotatedThing<?> subject)
-					throws EditException {
-				annotations.remove(annotationToRemove);
-			}
-
-			@Override
-			protected void undoEditAction(AbstractAnnotatedThing<?> subject) {
-				annotations.add(annotationToRemove);
-			}
-		};
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/Annotated.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/Annotated.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/Annotated.java
deleted file mode 100644
index ab7ed2c..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/Annotated.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.annotation;
-
-import java.util.Set;
-
-import net.sf.taverna.t2.workflowmodel.Edit;
-
-/**
- * Denotes that the object carries workflow object level annotation. Rather than
- * defining specific annotation types for each workflow entity we work on the
- * basis that multiple annotations of different types may apply, so free text
- * description is one example, semantic annotation of the internal function of a
- * processor might be another.
- * <p>
- * Where annotations are conceptually editable such as free text descriptions
- * the editing framework should internally remove the original annotation and
- * add the replacement rather than modifying the previous annotation in place.
- * 
- * @author Tom Oinn
- * 
- */
-public interface Annotated<TargetType> {
-
-	/**
-	 * Each annotated object contains a bag of metadata object instances
-	 * 
-	 * @return set of metadata objects that apply to the annotated object
-	 */
-	Set<? extends AnnotationChain> getAnnotations();
-	
-	void setAnnotations(Set<AnnotationChain> annotations);
-
-	/**
-	 * Add new workflow object metadata to this annotated entity
-	 * 
-	 * @param <TargetType>
-	 *            the type of the object being annotated
-	 * @param newAnnotation
-	 *            metadata object to add to the annotated object
-	 * @return edit object to perform and undo the metadata assignment
-	 */
-	public Edit<? extends TargetType> getAddAnnotationEdit(
-			AnnotationChain newAnnotation);
-
-	/**
-	 * Remove an annotation object from the this annotated entity
-	 * 
-	 * @param <TargetType>
-	 *            type of the workflow object from which the annotation is
-	 *            removed
-	 * @param annotationToRemove
-	 *            metadata object to remove
-	 * @param objectToAnnotate
-	 *            object from which the metadata is removed
-	 * @return edit object to perform and undo the metadata removal
-	 */
-	public Edit<? extends TargetType> getRemoveAnnotationEdit(
-			AnnotationChain annotationToRemove);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationAssertion.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationAssertion.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationAssertion.java
deleted file mode 100644
index 6f68c35..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationAssertion.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.annotation;
-
-/**
- * Represents a single assertion of information, providing access to a bean
- * containing the information in the assertion and one specifying the source of
- * the information contained.
- * 
- * @author Tom Oinn
- * 
- */
-public interface AnnotationAssertion<AnnotationBeanType extends AnnotationBeanSPI>
-		extends Curateable {
-
-	/**
-	 * Each annotation assertion contains a bean specifying the actual
-	 * annotation, varying from a simple string for a free text description to
-	 * more sophisticated semantic annotations or controlled vocabularies.
-	 * 
-	 * @return the annotation bean specifying this annotation assertion
-	 */
-	public AnnotationBeanType getDetail();
-
-	/**
-	 * The annotation assertion plays one of several roles within the annotation
-	 * chain, either an initial assertion, a refinement of a previous assertion
-	 * or a replacement of a previous assertion.
-	 * 
-	 * @return the annotation role of this annotation
-	 */
-	public AnnotationRole getRole();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationBeanSPI.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationBeanSPI.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationBeanSPI.java
deleted file mode 100644
index a754148..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationBeanSPI.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.annotation;
-
-/**
- * Marker interface to denote that a bean class is a container for the
- * information encapsulated by an InformationAssertion object
- * 
- * @author Tom Oinn
- * 
- */
-public interface AnnotationBeanSPI {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationChain.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationChain.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationChain.java
deleted file mode 100644
index 6f70faa..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationChain.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.annotation;
-
-import java.util.List;
-
-/**
- * A fact about an annotated entity is expressed in terms of an annotation
- * chain. The annotation chain contains one or more information assertions in a
- * list ordered by the creation date of each assertion. Annotation chains are
- * then interpreted by an AnnotationPerspective which is responsible for
- * reasoning over the information in the chain and extracting the set of
- * information assertions that are valid according to the rules in the
- * particular AnnotationPerspective.
- * 
- * @author Tom Oinn
- * 
- */
-public interface AnnotationChain {
-
-	/**
-	 * Returns the ordered list of AnnotationAssertions. This is the 'raw' set
-	 * of annotations in creation order - this order is not necessarily the
-	 * order they were curated, and may include refuted or otherwise wrong
-	 * annotations. Consumers of this API are recommended to use an
-	 * AnnotationPerspective to resolve any such conflicts appropriately.
-	 * 
-	 * @return read only copy of the ordered list of AnnotationAssertion
-	 *         instances
-	 */
-	List<AnnotationAssertion<?>> getAssertions();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationPerspective.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationPerspective.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationPerspective.java
deleted file mode 100644
index 656b026..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationPerspective.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.annotation;
-
-import java.util.List;
-
-/**
- * Responsible for the interpretation of an AnnotationChain (which may contain
- * conflicting or disputed information) into a set of AnnotationAssertion
- * instances from that chain which are valid given the chain and some
- * interpretation rule.
- * 
- * @author Tom Oinn
- * 
- */
-public interface AnnotationPerspective {
-
-	/**
-	 * Evaluate the annotations and their curation events in the specified
-	 * chain, resolve conflicts if possible and return the resultant set of
-	 * annotations
-	 * 
-	 * @param chain
-	 *            the annotation chain to evaluate
-	 * @return the set of annotations which are valid within this chain
-	 */
-	public List<? extends AnnotationAssertion<?>> getAnnotations(
-			AnnotationChain chain);
-
-	/**
-	 * Annotation chains may be in a disputed state if there are conflicting
-	 * mutually exclusive events within them under the interpretation imposed by
-	 * the annotation perspective and the perspective is unable to sensibly
-	 * reconcile them. For example, if the perspective is configured to trust
-	 * two parties equally and they disagree.
-	 * 
-	 * @param chain
-	 *            the annotation chain to check for conflict
-	 * @return true if there are conflicts under the interpretation of this
-	 *         annotation perspective
-	 */
-	public boolean isDisputed(AnnotationChain chain);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationRole.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationRole.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationRole.java
deleted file mode 100644
index 06b37b1..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationRole.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.annotation;
-
-/**
- * Specifies the role of an AnnotationAssertion within an AnnotationChain
- * 
- * @author Tom Oinn
- */
-public enum AnnotationRole {
-
-	/**
-	 * The information assertion is the first in the chain (if this is applied
-	 * to an annotation that isn't the earliest in its chain it should be
-	 * treated as a validation failure)
-	 */
-	INITIAL_ASSERTION,
-
-	/**
-	 * The information assertion was added to the chain to refine the existing
-	 * annotation assertion or assertions, such as cases where a generic
-	 * description exists which can be specialized in a particular instance but
-	 * where the original more generic form is still correct
-	 */
-	REFINEMENT,
-
-	/**
-	 * The information assertion was added to the chain in order to override an
-	 * earlier information assertion which was regarded as incorrect.
-	 */
-	REPLACEMENT;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationSourceSPI.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationSourceSPI.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationSourceSPI.java
deleted file mode 100644
index 1f7a74d..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AnnotationSourceSPI.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.annotation;
-
-/**
- * A marker interface that specified that the implementation is a bean
- * containing information about a source of annotations. These might be
- * publications, web URIs, a free text container, a person (etc). We should be
- * able to use existing schemes for identification of sources, publications etc
- * here.
- * 
- * @author Tom Oinn
- * 
- */
-public interface AnnotationSourceSPI {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AppliesTo.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AppliesTo.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AppliesTo.java
deleted file mode 100644
index 561b48d..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/annotation/AppliesTo.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.annotation;
-
-import java.lang.annotation.*;
-
-/**
- * Annotation to be used on metadata objects to denote which workflow objects
- * they apply to
- * 
- * @author Tom Oinn
- * 
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-@Documented
-public @interface AppliesTo {
-
-	/**
-	 * The class of the metadata object allowed by this annotation
-	 */
-	Class<?>[] targetObjectType();
-
-	/**
-	 * Can you have more than one of these metadata objects in the resolved set?
-	 */
-	boolean many() default true;
-	
-   /**
-     * Should the annotation be pruned, i.e. only most recent kept, when saving?
-     */
-    boolean pruned() default true;
-
-
-}