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:07 UTC
[23/51] [partial] incubator-taverna-engine git commit:
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/provenance/reporter/ProvenanceReporter.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/provenance/reporter/ProvenanceReporter.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/provenance/reporter/ProvenanceReporter.java
deleted file mode 100644
index d0a68d4..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/provenance/reporter/ProvenanceReporter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package net.sf.taverna.t2.provenance.reporter;
-
-import java.util.List;
-
-import net.sf.taverna.t2.invocation.InvocationContext;
-import net.sf.taverna.t2.provenance.item.ProvenanceItem;
-import net.sf.taverna.t2.provenance.item.WorkflowProvenanceItem;
-import net.sf.taverna.t2.reference.ReferenceService;
-
-public interface ProvenanceReporter {
- /**
- * Add a {@link ProvenanceItem} to the connector
- *
- * @param provenanceItem
- * @param invocationContext
- */
- void addProvenanceItem(ProvenanceItem provenanceItem);
-
- // FIXME is this reference service really needed since we have the context?
- /**
- * Tell the connector what {@link ReferenceService} it should use when
- * trying to dereference data items inside {@link ProvenanceItem}s
- *
- * @param referenceService
- */
- void setReferenceService(ReferenceService referenceService);
-
- /**
- * Get the {@link ReferenceService} in use by this connector
- *
- * @return
- */
- ReferenceService getReferenceService();
-
- /**
- * Get all the {@link ProvenanceItem}s that the connector currently knows
- * about
- *
- * @return
- */
- List<ProvenanceItem> getProvenanceCollection();
-
- /**
- * Set the {@link InvocationContext} that this reporter should be using
- *
- * @param invocationContext
- */
- void setInvocationContext(InvocationContext invocationContext);
-
- /**
- * Get the {@link InvocationContext} that this reporter should be using if
- * it needs to dereference any data
- *
- * @return
- */
- InvocationContext getInvocationContext();
-
- /**
- * A unique identifier for this run of provenance, should correspond to the
- * initial {@link WorkflowProvenanceItem} idenifier that gets sent through
- *
- * @param identifier
- */
- void setSessionID(String sessionID);
-
- /**
- * What is the unique identifier used by this connector
- *
- * @return
- */
- String getSessionID();
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/provenance/vocabulary/SharedVocabulary.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/provenance/vocabulary/SharedVocabulary.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/provenance/vocabulary/SharedVocabulary.java
deleted file mode 100644
index 3abf92c..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/provenance/vocabulary/SharedVocabulary.java
+++ /dev/null
@@ -1,34 +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.provenance.vocabulary;
-
-import net.sf.taverna.t2.provenance.item.ProvenanceItem;
-
-/**
- * Static strings which identify all the {@link ProvenanceItem}s and
- * {@link ProvenanceEventType}s
- *
- * @author Paolo Missier
- * @author Ian Dunlop
- */
-public enum SharedVocabulary {
- DATAFLOW_EVENT_TYPE, PROCESS_EVENT_TYPE, PROVENANCE_EVENT_TYPE, ACTIVITY_EVENT_TYPE, DATA_EVENT_TYPE, ERROR_EVENT_TYPE, INMEMORY_EVENT_TYPE, INPUTDATA_EVENT_TYPE, ITERATION_EVENT_TYPE, OUTPUTDATA_EVENT_TYPE, PROCESSOR_EVENT_TYPE, WEBSERVICE_EVENT_TYPE, WORKFLOW_DATA_EVENT_TYPE, WORKFLOW_EVENT_TYPE, END_WORKFLOW_EVENT_TYPE, INVOCATION_STARTED_EVENT_TYPE;
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TreeModelAdapter.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TreeModelAdapter.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TreeModelAdapter.java
deleted file mode 100644
index 0355616..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TreeModelAdapter.java
+++ /dev/null
@@ -1,174 +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.utility;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.swing.event.TreeModelEvent;
-import javax.swing.event.TreeModelListener;
-import javax.swing.tree.TreeModel;
-import javax.swing.tree.TreePath;
-
-/**
- * Wraps a typed tree model up in a standard tree model for use with JTree and
- * friends.
- *
- * @author Tom Oinn
- */
-public final class TreeModelAdapter {
- private static class TypedListenerPair<TT> {
- TypedTreeModelListener<TT> typedListener;
-
- TreeModelListener untypedListener;
-
- TypedListenerPair(TypedTreeModelListener<TT> typedListener,
- TreeModelListener untypedListener) {
- this.typedListener = typedListener;
- this.untypedListener = untypedListener;
- }
- }
-
- private static Set<TypedListenerPair<Object>> mapping = new HashSet<>();
-
- private static TreeModelAdapter instance = null;
-
- private TreeModelAdapter() {
- //
- }
-
- private synchronized static TreeModelAdapter getInstance() {
- if (instance == null)
- instance = new TreeModelAdapter();
- return instance;
- }
-
- /**
- * Return an untyped TreeModel wrapper around the specified TypedTreeModel
- *
- * @param <NodeType>
- * the node type of the typed model being wrapped
- * @param typedModel
- * typed model to wrap
- * @return a TreeModel acting as an untyped view of the typed tree model
- */
- public static <NodeType extends Object> TreeModel untypedView(
- TypedTreeModel<NodeType> typedModel) {
- return getInstance().removeType(typedModel);
- }
-
- private <NodeType extends Object> TreeModel removeType(
- final TypedTreeModel<NodeType> typedModel) {
- return new TreeModel() {
- @SuppressWarnings({ "rawtypes", "unchecked" })
- @Override
- public void addTreeModelListener(final TreeModelListener listener) {
- TypedTreeModelListener<NodeType> typedListener = new TypedTreeModelListener<NodeType>() {
- @Override
- public void treeNodesChanged(TypedTreeModelEvent<NodeType> e) {
- listener.treeNodesChanged(unwrapType(e));
- }
-
- @Override
- public void treeNodesInserted(
- TypedTreeModelEvent<NodeType> e) {
- listener.treeNodesInserted(unwrapType(e));
- }
-
- @Override
- public void treeNodesRemoved(TypedTreeModelEvent<NodeType> e) {
- listener.treeNodesRemoved(unwrapType(e));
- }
-
- @Override
- public void treeStructureChanged(
- TypedTreeModelEvent<NodeType> e) {
- listener.treeStructureChanged(unwrapType(e));
- }
-
- private TreeModelEvent unwrapType(
- final TypedTreeModelEvent<NodeType> e) {
- return new TreeModelEvent(e.getSource(),
- e.getTreePath(), e.getChildIndices(),
- e.getChildren());
- }
- };
- synchronized (mapping) {
- typedModel.addTreeModelListener(typedListener);
- mapping.add(new TypedListenerPair(typedListener, listener));
- }
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Object getChild(Object arg0, int arg1) {
- return typedModel.getChild((NodeType) arg0, arg1);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public int getChildCount(Object arg0) {
- return typedModel.getChildCount((NodeType) arg0);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public int getIndexOfChild(Object arg0, Object arg1) {
- return typedModel.getIndexOfChild((NodeType) arg0,
- (NodeType) arg1);
- }
-
- @Override
- public Object getRoot() {
- return typedModel.getRoot();
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public boolean isLeaf(Object arg0) {
- return typedModel.isLeaf((NodeType) arg0);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public void removeTreeModelListener(TreeModelListener arg0) {
- synchronized (mapping) {
- TypedListenerPair<NodeType> toRemove = null;
- for (TypedListenerPair<Object> tpl : mapping)
- if (tpl.untypedListener == arg0) {
- toRemove = (TypedListenerPair<NodeType>) tpl;
- typedModel
- .removeTreeModelListener((TypedTreeModelListener<NodeType>) tpl.typedListener);
- break;
- }
- if (toRemove == null)
- return;
- mapping.remove(toRemove);
- }
- }
-
- @Override
- public void valueForPathChanged(TreePath arg0, Object arg1) {
- typedModel.valueForPathChanged(arg0, arg1);
- }
- };
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TypedTreeModel.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TypedTreeModel.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TypedTreeModel.java
deleted file mode 100644
index 8451c60..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TypedTreeModel.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.utility;
-
-import javax.swing.tree.TreePath;
-
-/**
- * A replacement for TreeModel where nodes are typed rather than being generic
- * objects. Because of the way interfaces and generics work this can't be
- * related in any inheritance heirarchy to the actual javax.swing.TreeModel
- * interface but is very similar (okay, identical) in operation. For cases where
- * you want to use a normal TreeModel such as using this as the backing data
- * model for a JTree you can use the TreeModelAdapter class to create an untyped
- * view over the typed version defined here.
- *
- * @author Tom Oinn
- *
- * @see javax.swing.tree.TreeModel
- *
- * @param <NodeType>
- * Each node in the tree is of this type
- */
-public interface TypedTreeModel<NodeType> {
- /**
- * Adds a listener for the TreeModelEvent posted after the tree changes.
- */
- void addTreeModelListener(TypedTreeModelListener<NodeType> l);
-
- /**
- * Returns the child of parent at index 'index' in the parent's child array.
- *
- * @param parent
- * parent instance of typed node type
- * @param index
- * index within parent
- * @return child node at the specified index
- */
- NodeType getChild(NodeType parent, int index);
-
- /**
- * Returns the number of children of parent.
- *
- * @param parent
- * node to count children for
- * @return number of children
- */
- int getChildCount(NodeType parent);
-
- /**
- * Returns the index of child in parent.
- *
- * @param parent
- * a node in the tree, obtained from this data source
- * @param child
- * the node we are interested in
- * @return the index of the child in the parent, or -1 if either child or
- * parent are null
- */
- int getIndexOfChild(NodeType parent, NodeType child);
-
- /**
- * Returns the root of the tree. Returns null only if the tree has no nodes.
- *
- * @return the root of the tree
- */
- NodeType getRoot();
-
- /**
- * Returns true if node is a leaf. It is possible for this method to return
- * false even if node has no children. A directory in a filesystem, for
- * example, may contain no files; the node representing the directory is not
- * a leaf, but it also has no children.
- *
- * @param node
- * a node in the tree, obtained from this data source
- * @return true if node is a leaf
- */
- boolean isLeaf(NodeType node);
-
- /**
- * Removes a listener previously added with addTreeModelListener.
- *
- * @param l
- * typed tree model listener to remove
- */
- void removeTreeModelListener(TypedTreeModelListener<NodeType> l);
-
- /**
- * Messaged when the user has altered the value for the item identified by
- * path to newValue. If newValue signifies a truly new value the model
- * should post a treeNodesChanged event.
- *
- * @param path
- * path to the node that the user has altered
- * @param newValue
- * the new value from the TreeCellEditor
- */
- void valueForPathChanged(TreePath path, Object newValue);
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TypedTreeModelEvent.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TypedTreeModelEvent.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TypedTreeModelEvent.java
deleted file mode 100644
index f5045d9..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TypedTreeModelEvent.java
+++ /dev/null
@@ -1,151 +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.utility;
-
-import javax.swing.tree.TreePath;
-
-/**
- * Type aware version of TreeModelEvent
- *
- * @author Tom Oinn
- *
- * @see javax.swing.tree.TreeModelEvent
- *
- * @param <NodeType>
- * the node type parameter of the TypedTreeModel to which this event
- * applies
- */
-public class TypedTreeModelEvent<NodeType> {
- protected int[] childIndices;
- protected NodeType[] children;
- protected TreePath path;
- protected Object source;
-
- /**
- * Used to create an event when the node structure has changed in some way,
- * identifying the path to the root of a modified subtree as an array of
- * Objects.
- *
- * @param source
- * @param path
- */
- public TypedTreeModelEvent(Object source, NodeType[] path) {
- this.path = new TreePath(path);
- this.source = source;
- this.childIndices = new int[0];
- }
-
- /**
- * Used to create an event when the node structure has changed in some way,
- * identifying the path to the root of the modified subtree as a TreePath
- * object.
- *
- * @param source
- * @param path
- */
- public TypedTreeModelEvent(Object source, TreePath path) {
- this.path = path;
- this.source = source;
- this.childIndices = new int[0];
- }
-
- /**
- * Used to create an event when nodes have been changed, inserted, or
- * removed, identifying the path to the parent of the modified items as a
- * TreePath object.
- *
- * @param source
- * @param path
- * @param childIndices
- * @param children
- */
- public TypedTreeModelEvent(Object source, TreePath path,
- int[] childIndices, NodeType[] children) {
- this.source = source;
- this.path = path;
- this.childIndices = childIndices;
- this.children = children;
- }
-
- /**
- * Used to create an event when nodes have been changed, inserted, or
- * removed, identifying the path to the parent of the modified items as an
- * array of Objects.
- *
- * @param source
- * @param path
- * @param childIndices
- * @param children
- */
- public TypedTreeModelEvent(Object source, NodeType[] path,
- int[] childIndices, NodeType[] children) {
- this.path = new TreePath(path);
- this.source = source;
- this.childIndices = childIndices;
- this.children = children;
- }
-
- /**
- * Returns the values of the child indexes.
- *
- * @return
- */
- public int[] getChildIndices() {
- return this.childIndices;
- }
-
- /**
- * Returns the objects that are children of the node identified by getPath
- * at the locations specified by getChildIndices.
- *
- * @return
- */
- public NodeType[] getChildren() {
- return this.children;
- }
-
- /**
- * The object on which the Event initially occurred.
- *
- * @return
- */
- public Object getSource() {
- return this.source;
- }
-
- /**
- * For all events, except treeStructureChanged, returns the parent of the
- * changed nodes.
- *
- * @return
- */
- public TreePath getTreePath() {
- return path;
- }
-
- /**
- * Returns a string that displays and identifies this object's properties.
- */
- @Override
- public String toString() {
- return "Typed TreeModelEvent " + super.toString();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TypedTreeModelListener.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TypedTreeModelListener.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TypedTreeModelListener.java
deleted file mode 100644
index 806af01..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/TypedTreeModelListener.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.utility;
-
-/**
- * Equivalent to TreeModelListener for use with the TypedTreeModel
- *
- * @author Tom Oinn
- *
- * @see javax.swing.tree.TreeModelListener
- *
- * @param <NodeType>
- * Type of the node within the TypedTreeModel and used to
- * parameterize the typed version of the tree model event.
- */
-public interface TypedTreeModelListener<NodeType> {
- /**
- * Invoked after a node (or a set of siblings) has changed in some way. The
- * node(s) have not changed locations in the tree or altered their children
- * arrays, but other attributes have changed and may affect presentation.
- * Example: the name of a file has changed, but it is in the same location
- * in the file system.
- * <p>
- * To indicate the root has changed, childIndices and children will be null.
- * <p>
- * Use <code>e.getPath()</code> to get the parent of the changed node(s).
- * <code>e.getChildIndices()</code> returns the index(es) of the changed
- * node(s).
- */
- void treeNodesChanged(TypedTreeModelEvent<NodeType> e);
-
- /**
- * Invoked after nodes have been inserted into the tree.
- * <p>
- * Use <code>e.getPath()</code> to get the parent of the new node(s).
- * <code>e.getChildIndices()</code> returns the index(es) of the new node(s)
- * in ascending order.
- */
- void treeNodesInserted(TypedTreeModelEvent<NodeType> e);
-
- /**
- * Invoked after nodes have been removed from the tree. Note that if a
- * subtree is removed from the tree, this method may only be invoked once
- * for the root of the removed subtree, not once for each individual set of
- * siblings removed.
- * <p>
- * Use <code>e.getPath()</code> to get the former parent of the deleted
- * node(s). <code>e.getChildIndices()</code> returns, in ascending order,
- * the index(es) the node(s) had before being deleted.
- */
- void treeNodesRemoved(TypedTreeModelEvent<NodeType> e);
-
- /**
- * Invoked after the tree has drastically changed structure from a given
- * node down. If the path returned by <code>e.getPath()</code> is of length
- * one and the first element does not identify the current root node the
- * first element should become the new root of the tree.
- * <p>
- * Use
- * <code>e.getPath()<code> to get the path to the node. <code>e.getChildIndices()</code>
- * returns <code>null</code>.
- */
- void treeStructureChanged(TypedTreeModelEvent<NodeType> e);
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/package.html
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/package.html b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/package.html
deleted file mode 100644
index 03fc4c0..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/utility/package.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<body>
-Utility classes, currently consists of a generic type safe alternative
-to TreeModel along with an adapter class to allow it to be used where a
-TreeModel is required (i.e. JTree)
-</body>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/DataflowCollation.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/DataflowCollation.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/DataflowCollation.java
deleted file mode 100644
index fc4c378..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/DataflowCollation.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package net.sf.taverna.t2.visit;
-
-/**
- * This visit kind is a dummy for collecting together the information associated
- * with a nested workflow.
- *
- * @author alanrw
- */
-public class DataflowCollation extends VisitKind {
- public static final int NESTED_ISSUES = 1;
-
- /*
- * (non-Javadoc)
- *
- * There are no visitors that can perform a DataflowCollation visit. This
- * is, instead done within the HierarchyTraverser code iteself.
- *
- * @see net.sf.taverna.t2.visit.VisitKind#getVisitorClass()
- */
- @Override
- public Class<? extends Visitor<?>> getVisitorClass() {
- return null;
- }
-
- private static class Singleton {
- private static DataflowCollation instance = new DataflowCollation();
- }
-
- public static DataflowCollation getInstance() {
- return Singleton.instance;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/HierarchyTraverser.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/HierarchyTraverser.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/HierarchyTraverser.java
deleted file mode 100644
index 2c75030..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/HierarchyTraverser.java
+++ /dev/null
@@ -1,343 +0,0 @@
-package net.sf.taverna.t2.visit;
-
-import static java.lang.System.currentTimeMillis;
-import static java.util.Collections.synchronizedMap;
-import static net.sf.taverna.t2.visit.VisitReport.findAncestor;
-import static net.sf.taverna.t2.visit.VisitReport.getWorstStatus;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.WeakHashMap;
-
-import net.sf.taverna.t2.annotation.HierarchyRole;
-import net.sf.taverna.t2.annotation.HierarchyTraversal;
-import net.sf.taverna.t2.visit.VisitReport.Status;
-import net.sf.taverna.t2.workflowmodel.Dataflow;
-import net.sf.taverna.t2.workflowmodel.Processor;
-import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
-import net.sf.taverna.t2.workflowmodel.processor.activity.NestedDataflow;
-
-import org.apache.log4j.Logger;
-
-/**
- * A HierarchyTraverser allows the traversal of the parent -> child hierarchy
- * (as indicated by annotations) and performs visits conforming to the set of
- * VisitKinds.
- *
- * @author alanrw
- */
-public class HierarchyTraverser {
- private static Logger logger = Logger.getLogger(HierarchyTraverser.class);
-
- /**
- * A mapping from the class of an object to the set of names of methods that
- * will return children of instances of the object. Note that this has to be
- * done by String because of problems with annotations on overridden
- * methods.
- */
- private static Map<Class<?>, Set<String>> childrenMethods = synchronizedMap(new WeakHashMap<Class<?>, Set<String>>());
-
- /**
- * The set of visitors that can perform visits of one or more of a set of
- * VisitKind.
- */
- protected Set<Visitor<?>> visitors;
-
- /**
- * Create a HierarchyTraverser that can perform visits of the specified set
- * of VisitKind.
- *
- * @param descriptions
- */
- public HierarchyTraverser(Set<Visitor<?>> visitors) {
- this.visitors = visitors;
- }
-
- /**
- * Add a new VisitReport to a set of VisitReport. If the VisitReport has
- * sub-reports then, unless the report is about a Dataflow, then the
- * VisitReport itself is ignored and the sub-reports added instead. If the
- * VisiReport has no sub-reports, or it is a report about a Dataflow, then
- * the VisitReport is added to the set.
- *
- * @param reports
- * The set of reports to which to add the useful VisitReports
- * corresponding to the new VisitReport.
- * @param newReport
- * The VisitReport to be added (or whose sub-reports are to be
- * added) to the set of reports.
- */
- private void addReport(Set<VisitReport> reports, VisitReport newReport) {
- if (newReport == null)
- return;
- Collection<VisitReport> subReports = newReport.getSubReports();
- if ((subReports == null) || subReports.size() == 0)
- reports.add(newReport);
- else if (!(newReport.getSubject() instanceof Dataflow))
- for (VisitReport r : subReports)
- addReport(reports, r);
- }
-
- /**
- * Change the subject of a VisitReport. This is currently done to change a
- * VisitReport about an Activity to be about its containing Processor. If
- * the VisitReport has sub-reports then their subject is also patched. It is
- * not obvious that this should be done here.
- *
- * @param vr
- * The VisitReport for which to change the subject
- * @param newSubject
- * The new subject of the VisitReport and its sub-reports
- */
- private void patchSubject(VisitReport vr, Object newSubject) {
- vr.setSubject(newSubject);
- Collection<VisitReport> subReports = vr.getSubReports();
- if (subReports != null)
- for (VisitReport child : subReports)
- patchSubject(child, newSubject);
- }
-
- private void patchCheckTime(VisitReport vr, long time) {
- vr.setCheckTime(time);
- Collection<VisitReport> subReports = vr.getSubReports();
- if (subReports != null)
- for (VisitReport child : subReports)
- patchCheckTime(child, time);
- }
-
- /**
- * Change a VisitReport and its sub-reports (if any) to indicate that the
- * visit was time-consuming. This is done to ensure that the time-consuming
- * indication of the Visitor is used on the VisitReport.
- *
- * @param vr
- * The VisitReport for which to set the time-consuming flag.
- */
- private void patchTimeConsuming(VisitReport vr) {
- vr.setWasTimeConsuming(true);
- Collection<VisitReport> subReports = vr.getSubReports();
- if (subReports != null)
- for (VisitReport child : subReports)
- patchTimeConsuming(child);
- }
-
- /**
- * Carry out the appropriate visits on an object and then traverse down the
- * hierarchy of its children.
- *
- * @param o
- * The object to visit
- * @param ancestry
- * The, possibly empty, list of the ancestors (ordered parents)
- * of the object with the most recent ancestor being the first in
- * the list.
- * @param reports
- * The set to which to add reports generated about the object and
- * its descendents
- * @param includeTimeConsuming
- * Whether to include visits that are time-consuming.
- */
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public void traverse(Object o, List ancestry, Set<VisitReport> reports,
- boolean includeTimeConsuming) {
- /*
- * For each visitor that is able to do visits for the set of VisitKind
- * specified for the HierarchyTraverser
- */
- for (Visitor v : visitors)
- /*
- * If time consuming visits are allowed or the visitor is not time
- * consuming, and the visitor can visit the specified object
- */
-
- if ((includeTimeConsuming || !v.isTimeConsuming()) && v.canVisit(o)) {
- // Make the visitor visit the object
- VisitReport report = null;
- try {
- report = v.visit(o, ancestry);
- } catch (NullPointerException|ClassCastException e) {
- logger.error("Visit threw exception", e);
- }
-
- if (report == null)
- continue;
-
- patchCheckTime(report, currentTimeMillis());
-
- /*
- * If the current object is an Activity then change the report
- * so that its subject is the Processor containing the Activity
- */
- if (o instanceof Activity) {
- Processor p = (Processor) findAncestor(ancestry,
- Processor.class);
- if (p != null)
- patchSubject(report, p);
- }
- /*
- * Note in the VisitReport if it was caused by a time-consuming
- * visitor
- */
- if (v.isTimeConsuming() && (report != null))
- patchTimeConsuming(report);
- /*
- * Add the VisitReport and its sub-reports, if any, to the set
- * of VisitReports
- */
- addReport(reports, report);
- }
-
- /*
- * If the object is a nested dataflow activity then traverse the
- * dataflow that is nested. Take the reports about the sub-dataflow and,
- * if there are problems with it, create a DataflowCollation report
- * about the nested dataflow activity (or to be more precise the
- * Procesor containing it.)
- */
- if (o instanceof NestedDataflow) {
- NestedDataflow nestedDataflow = (NestedDataflow) o;
- Dataflow subFlow = nestedDataflow.getNestedDataflow();
- Set<VisitReport> subReports = new HashSet<>();
- traverse(subFlow, new ArrayList<Object>(), subReports,
- includeTimeConsuming);
- Processor p = (Processor) findAncestor(ancestry, Processor.class);
- if (p != null) {
- Status worstStatus = getWorstStatus(subReports);
- if (!worstStatus.equals(Status.OK)) {
- VisitReport report = new VisitReport(
- DataflowCollation.getInstance(),
- p,
- (worstStatus.equals(Status.WARNING) ? "Warnings in nested workflow"
- : "Errors in nested workflow"),
- DataflowCollation.NESTED_ISSUES, worstStatus,
- subReports);
- report.setProperty("dataflowIdentifier",
- subFlow.getIdentifier());
- report.setWasTimeConsuming(includeTimeConsuming);
- reports.add(report);
- }
- }
- }
-
- // Now move on to traversing the descendents
-
- /*
- * For every child-getting method for this object, try to get the
- * children and add them into a set.
- */
- Set<String> methodNames = getMethods(o);
- Set<Object> children = new HashSet<>();
- for (Method m : o.getClass().getMethods())
- if (methodNames.contains(m.getName())) {
- Object methodResult = null;
- try {
- methodResult = m.invoke(o);
- } catch (IllegalArgumentException | IllegalAccessException
- | InvocationTargetException e) {
- logger.error(e);
- }
- /*
- * If the method did not produce a singleton but instead a List
- * or similar then add the members of the list.
- */
- children.addAll(getLeafs(methodResult));
- }
-
- /*
- * For every child of the current object, traverse that object and get
- * reports about it and its descendents.
- */
- ArrayList<Object> newAncestry = new ArrayList<>();
- newAncestry.add(o);
- newAncestry.addAll(ancestry);
- for (Object c : children)
- traverse(c, newAncestry, reports, includeTimeConsuming);
- }
-
- /**
- * Determine the set of singletons corresponding to an object. If the object
- * is a singleton then a set containing just the object is returned. If the
- * object is iterable then the singletons of the elements of the iteration
- * are returned.
- *
- * @param o
- * The object.
- * @return The set of singletons
- */
- @SuppressWarnings("unchecked")
- private static Set<Object> getLeafs(Object o) {
- Set<Object> result = new HashSet<>();
- if (o instanceof Iterable)
- for (Object element : (Iterable<Object>) o)
- result.addAll(getLeafs(element));
- else
- result.add(o);
- return result;
- }
-
- /**
- * Determine the set of names of child-getting methods for a given object
- *
- * @param o
- * The object to consider.
- * @return The set of names of child-getting methods
- */
- private static Set<String> getMethods(Object o) {
- Class<?> c = o.getClass();
- return getMethodsForClass(c);
- }
-
- /**
- * Determine the set of names of child-getting methods for a given Class.
- * This includes the names of methods from interfaces and super-classes.
- *
- * @param c
- * The class to consider
- * @return The set of names of child-getting methods for the class
- */
- private static synchronized Set<String> getMethodsForClass(Class<?> c) {
- if (!childrenMethods.containsKey(c)) {
- Set<String> result = new HashSet<>();
- result.addAll(getExplicitMethodsForClass(c));
- for (Class<?> i : c.getInterfaces())
- result.addAll(getMethodsForClass(i));
- Class<?> s = c.getSuperclass();
- if (s != null)
- result.addAll(getMethodsForClass(s));
- childrenMethods.put(c, result);
- }
- return childrenMethods.get(c);
- }
-
- /**
- * Determine the set of names of child-getting methods explicitly identified
- * for an Interface or a Class.
- *
- * @param c
- * The Interface or Class to consider
- * @return The set of names of child-getting methods.
- */
- private static Collection<? extends String> getExplicitMethodsForClass(
- Class<?> c) {
- Method[] methods = c.getDeclaredMethods();
- Set<String> result = new HashSet<>();
-
- for (Method m : methods)
- if (m.getParameterTypes().length == 0) {
- HierarchyTraversal ht = m
- .getAnnotation(HierarchyTraversal.class);
- if (ht != null
- && Arrays.asList(ht.role()).contains(
- HierarchyRole.CHILD))
- result.add(m.getName());
- }
- return result;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/VisitKind.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/VisitKind.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/VisitKind.java
deleted file mode 100644
index 4657950..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/VisitKind.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package net.sf.taverna.t2.visit;
-
-/**
- * A type of visit that can be made e.g. a health check.
- *
- * @author alanrw
- */
-public abstract class VisitKind {
- /**
- * The class that all visitors that extend/implement if they make this type
- * of visit.
- *
- * @return
- */
- public abstract Class<? extends Visitor<?>> getVisitorClass();
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/VisitReport.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/VisitReport.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/VisitReport.java
deleted file mode 100644
index 6db2040..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/VisitReport.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/**
- *
- */
-package net.sf.taverna.t2.visit;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author alanrw
- */
-public class VisitReport {
- private static final String INDENTION = " ";
-
- /**
- * Enumeration of the possible status's in increasing severity: OK,
- * WARNING,SEVERE
- */
- public enum Status {
- OK, WARNING, SEVERE
- };
-
- /**
- * A short message describing the state of the report
- */
- private String message;
- /**
- * An integer indicating the outcome of a visit relative to the VisitKind
- */
- private int resultId;
- /**
- *
- */
- private Status status;
- /**
- * The object about which the report is made
- */
- private Object subject;
- /**
- * The sub-reports of the VisitReport
- */
- private Collection<VisitReport> subReports = new ArrayList<>();
- /**
- * The kind of visit that was made e.g. to check the health of a service or
- * examine its up-stream error fragility
- */
- private VisitKind kind;
- /**
- * An indication of whether the visit report was generated by a time
- * consuming visitor. This is used to check whether the VisitReport can be
- * automatically junked.
- */
- private boolean wasTimeConsuming;
- private Map<String, Object> propertyMap = new HashMap<>();
- private long checkTime;
-
- /**
- * @return whether the VisitReport was generated by a time consuming visitor
- */
- public boolean wasTimeConsuming() {
- return wasTimeConsuming;
- }
-
- /**
- * @param wasTimeConsuming whether the VisitReport was generated by a time consuming visitot
- */
- public void setWasTimeConsuming(boolean wasTimeConsuming) {
- this.wasTimeConsuming = wasTimeConsuming;
- }
-
- /**
- * Constructs the Visit Report. The sub reports default to an empty list.
- *
- * @param kind
- * - the type of visit performed
- * @param subject
- * - the thing being tested.
- * @param message
- * - a summary of the result of the test.
- * @param resultId
- * - an identification of the type of result relative to the
- * VisitKind
- * @param status
- * - the overall Status.
- */
- public VisitReport(VisitKind kind, Object subject, String message,
- int resultId, Status status) {
- this(kind, subject, message, resultId, status,
- new ArrayList<VisitReport>());
- }
-
- /**
- * Used internally by {@link #clone()}.
- */
- protected VisitReport() {}
-
- /**
- * Constructs the Visit Report
- *
- * @param kind
- * - the type of visit performed
- * @param subject
- * - the thing being tested.
- * @param message
- * - a summary of the result of the test.
- * @param resultId
- * - an identification of the type of result relative to the
- * VisitKind
- * @param status - the overall Status.
- * @param subReports
- * - a List of sub reports.
- */
- public VisitReport(VisitKind kind, Object subject, String message,
- int resultId, Status status, Collection<VisitReport> subReports) {
- this.kind = kind;
- this.subject = subject;
- this.status = status;
- this.message = message;
- this.resultId = resultId;
- this.subReports = subReports;
- this.wasTimeConsuming = false;
- this.checkTime = 0;
- }
-
- /**
- * @param kind The type of visit performed
- * @param subject The thing that was visited
- * @param message A summary of the result of the test
- * @param resultId An indication of the type of the result relative to the kind of visit
- * @param subReports A list of sub-reports
- */
- public VisitReport(VisitKind kind, Object subject, String message,
- int resultId, Collection<VisitReport> subReports) {
- this(kind, subject, message, resultId, getWorstStatus(subReports),
- subReports);
- }
-
- /**
- * @return An indication of the type of the result relative to the kind of visit
- */
- public int getResultId() {
- return resultId;
- }
-
- /**
- * @param resultId The type of the result of the visit relative to the kind of visit
- */
- public void setResultId(int resultId) {
- this.resultId = resultId;
- }
-
- /**
- * @return a message summarizing the report
- */
- public String getMessage() {
- return message;
- }
-
- /**
- * Sets the message
- *
- * @param message
- * a message summarizing the report
- */
- public void setMessage(String message) {
- this.message = message;
- }
-
- /**
- * Determines the overall Status. This is the most severe status of this
- * report and all its sub reports.
- *
- * @return the overall status
- */
- public Status getStatus() {
- Status result = status;
- for (VisitReport report : subReports)
- if (report.getStatus().compareTo(result) > 0)
- result = report.getStatus();
- return result;
- }
-
- /**
- * Sets the status of this report. Be aware that the overall status of this
- * report may also be affected by its sub reports if they have a more severe
- * Status.
- *
- * @param status
- * @see #getStatus
- */
- public void setStatus(Status status) {
- this.status = status;
- }
-
- /**
- * @return an Object representing the subject of this visit report
- */
- public Object getSubject() {
- return subject;
- }
-
- /**
- * @param subject
- * an Object representing the subject of this visit report
- */
- public void setSubject(Object subject) {
- this.subject = subject;
- }
-
- /**
- * Provides a list of sub reports. This list defaults an empty list, so it
- * is safe to add new reports through this method.
- *
- * @return a list of sub reports associated with this Visit Report
- */
- public Collection<VisitReport> getSubReports() {
- return subReports;
- }
-
- /**
- * Replaces the List of sub reports with those provided.
- *
- * @param subReports
- * a list of sub reports
- */
- public void setSubReports(Collection<VisitReport> subReports) {
- this.subReports = subReports;
- }
-
- /**
- *
- * @return the kind of visit that was made.
- */
- public VisitKind getKind() {
- return kind;
- }
-
- /**
- * @param kind Specify the kind of visit that was made
- */
- public void setKind(VisitKind kind) {
- this.kind = kind;
- }
-
- public void setProperty(String key, Object value) {
- propertyMap.put(key, value);
- }
-
- public Object getProperty(String key) {
- return propertyMap.get(key);
- }
-
- public Map<String, Object> getProperties() {
- return propertyMap;
- }
-
- /**
- * Find the most recent ancestor (earliest in the list) of a given class from the list of ancestors
- *
- * @param ancestors The list of ancestors to examine
- * @param ancestorClass The class to search for
- * @return The most recent ancestor, or null if no suitable ancestor
- */
- public static Object findAncestor(List<Object> ancestors,
- Class<?> ancestorClass) {
- Object result = null;
- for (Object o : ancestors)
- if (ancestorClass.isInstance(o))
- return o;
- return result;
- }
-
- public void setCheckTime(long time) {
- this.checkTime = time;
- }
-
- public long getCheckTime() {
- return this.checkTime;
- }
-
- /**
- * Determine the worst status from a collection of reports
- *
- * @param reports
- * The collection of reports to examine
- * @return The worst status
- */
- public static Status getWorstStatus(Collection<VisitReport> reports) {
- Status currentStatus = Status.OK;
- for (VisitReport report : reports)
- if (currentStatus.compareTo(report.getStatus()) < 0)
- currentStatus = report.getStatus();
- return currentStatus;
- }
-
- @Override
- public String toString() {
- // TODO Use StringBuilder instead
- StringBuffer sb = new StringBuffer();
- visitReportToStringBuffer(sb, "");
- return sb.toString();
- }
-
- protected void visitReportToStringBuffer(
- StringBuffer sb, String indent) {
- sb.append(indent);
- sb.append(getStatus());
- sb.append(' ');
- sb.append(getMessage());
- if (! propertyMap.isEmpty()) {
- sb.append(' ');
- sb.append(propertyMap);
- }
- sb.append('\n');
- indent = indent + INDENTION;
- for (VisitReport subReport : getSubReports())
- subReport.visitReportToStringBuffer(sb, indent);
- }
-
- @Override
- public VisitReport clone() throws CloneNotSupportedException {
- if (!getClass().equals(VisitReport.class))
- throw new CloneNotSupportedException("Can't clone subclass "
- + getClass()
- + ", reimplement clone() and use internalClone()");
- return internalClone(new VisitReport());
- }
-
- protected VisitReport internalClone(VisitReport newReport)
- throws CloneNotSupportedException {
- newReport.checkTime = this.checkTime;
- newReport.kind = this.kind;
- newReport.message = this.message;
- newReport.propertyMap.putAll(this.propertyMap);
- newReport.resultId = this.resultId;
- newReport.status = this.status;
- newReport.subject = this.subject;
- newReport.wasTimeConsuming = this.wasTimeConsuming;
- for (VisitReport childReport : this.subReports)
- newReport.subReports.add(childReport.clone());
- return newReport;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/Visitor.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/Visitor.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/Visitor.java
deleted file mode 100644
index 0c913cc..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/visit/Visitor.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package net.sf.taverna.t2.visit;
-
-import java.util.List;
-
-/**
- * A Visitor can perform a visit of a VisitKind on a object. It can return a
- * VisitReport giving details of the result of the visit, A Visitor may be time
- * consuming, in which case it is only performed upon user request.
- *
- * @author alanrw
- *
- * @param <T> The type of the objects being visited.
- */
-public interface Visitor<T> {
- /**
- * Returns true if the visitor can visit the specified object.
- *
- * @param o
- * The object that might be visited
- * @return true is a visit is possible from this Visitor.
- */
- boolean canVisit(Object o);
-
- /**
- * Visit an object which has the specified ancestry (list of parents) and
- * possibly return a VisitReport detailing the result of the visit.
- *
- * @param o
- * The object to visit
- * @param ancestry
- * A list of the ancestors of the object with the immediate
- * parent at the start of the list.
- * @return A VisitReport detailing the result of the visit.
- */
- VisitReport visit(T o, List<Object> ancestry);
-
- /**
- * An indication if the visit would take sufficient time that it should only
- * be run upon user request
- *
- * @return
- */
- boolean isTimeConsuming();
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/AbstractOutputPort.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/AbstractOutputPort.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/AbstractOutputPort.java
deleted file mode 100644
index 59e0fc2..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/AbstractOutputPort.java
+++ /dev/null
@@ -1,43 +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.workflowmodel;
-
-/**
- * Simple implementation of OutputPort, extends AbstractPort and adds the
- * granular depth bean getter.
- *
- * @author Tom Oinn
- */
-public abstract class AbstractOutputPort extends AbstractPort implements
- OutputPort {
- protected int granularDepth;
-
- protected AbstractOutputPort(String portName, int portDepth,
- int granularDepth) {
- super(portName, portDepth);
- this.granularDepth = granularDepth;
- }
-
- @Override
- public int getGranularDepth() {
- return granularDepth;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/AbstractPort.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/AbstractPort.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/AbstractPort.java
deleted file mode 100644
index 9a00488..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/AbstractPort.java
+++ /dev/null
@@ -1,54 +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.workflowmodel;
-
-import net.sf.taverna.t2.annotation.AbstractAnnotatedThing;
-
-/**
- * Port definition with depth and name
- *
- * @author Tom Oinn
- */
-public abstract class AbstractPort extends AbstractAnnotatedThing<Port>
- implements Port {
- protected String name;
- protected int depth;
-
- protected AbstractPort(String name, int depth) {
- this.name = name;
- this.depth = depth;
- }
-
- @Override
- public int getDepth() {
- return this.depth;
- }
-
- @Override
- public final String getName() {
- return this.name;
- }
-
- @Override
- public String toString() {
- return getClass().getSimpleName() + " " + getName() + " (" + getDepth() + ")";
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/CompoundEdit.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/CompoundEdit.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/CompoundEdit.java
deleted file mode 100644
index 08ff79c..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/CompoundEdit.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.workflowmodel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Implementation of Edit which contains an ordered list of child edits. Child
- * edits are applied collectively and in order, any failure in any child edit
- * causes an undo of previously applied children and a propogation of the edit
- * exception.
- *
- * @author Tom Oinn
- */
-public class CompoundEdit implements Edit<Object> {
- private final transient List<Edit<?>> childEdits;
- private transient boolean applied = false;
-
- /**
- * Create a new compound edit with no existing Edit objects.
- *
- */
- public CompoundEdit() {
- this.childEdits = new ArrayList<>();
- }
-
- /**
- * Create a new compound edit with the specified edits as children.
- */
- public CompoundEdit(List<Edit<?>> edits) {
- this.childEdits = edits;
- }
-
- public List<Edit<?>> getChildEdits() {
- return childEdits;
- }
-
- /**
- * Attempts to call the doEdit method of all child edits. If any of those
- * children throws an EditException any successful edits are rolled back and
- * the exception is rethrown as the cause of a new EditException from the
- * CompoundEdit
- */
- @Override
- @SuppressWarnings("deprecation")
- public synchronized Object doEdit() throws EditException {
- if (isApplied())
- throw new EditException("Cannot apply an edit more than once!");
- List<Edit<?>> doneEdits = new ArrayList<>();
- try {
- for (Edit<?> edit : childEdits) {
- edit.doEdit();
- /*
- * Insert the done edit at position 0 in the list so we can
- * iterate over the list in the normal order if we need to
- * rollback, this ensures that the most recent edit is first.
- */
- doneEdits.add(0, edit);
- }
- applied = true;
- return null;
- } catch (EditException ee) {
- // TODO Remove undo; we can't do that any more
- for (Edit<?> undoMe : doneEdits)
- undoMe.undo();
- applied = false;
- throw new EditException("Failed child of compound edit", ee);
- }
- }
-
- /**
- * There is no explicit subject for a compound edit, so this method always
- * returns null.
- */
- @Override
- public Object getSubject() {
- return null;
- }
-
- /**
- * Rolls back all child edits in reverse order
- */
- @Override
- @SuppressWarnings("deprecation")
- public synchronized void undo() {
- for (int i = (childEdits.size() - 1); i >= 0; i--)
- // Undo child edits in reverse order
- childEdits.get(i).undo();
- applied = false;
- }
-
- @Override
- public boolean isApplied() {
- return applied;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/Condition.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/Condition.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/Condition.java
deleted file mode 100644
index 95006ed..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/Condition.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.workflowmodel;
-
-import net.sf.taverna.t2.annotation.Annotated;
-
-/**
- * Defines the base interface for a condition which must be satisfied before a
- * processor can commence invocation. Conditions are expressed in terms of a
- * relationship between a controlling and a target processor where the target
- * processor may not commence invocation until all conditions for which it is a
- * target are satisfied in the context of a particular owning process
- * identifier.
- *
- * @author Tom Oinn
- */
-public interface Condition extends Annotated<Condition>, WorkflowItem {
- /**
- * @return the Processor constrained by this condition
- */
- Processor getControl();
-
- /**
- * @return the Processor acting as the controller for this condition
- */
- Processor getTarget();
-
- /**
- * @param owningProcess
- * the context in which the condition is to be evaluated
- * @return whether the condition is satisfied
- */
- boolean isSatisfied(String owningProcess);
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/Configurable.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/Configurable.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/Configurable.java
deleted file mode 100644
index c89b47b..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/Configurable.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2008 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.workflowmodel;
-
-import net.sf.taverna.t2.workflowmodel.ConfigurationException;
-import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityConfigurationException;
-
-/**
- * Interface for workflow items that can be configured from a bean.
- *
- * @param <ConfigurationType>
- * the ConfigurationType associated with the workflow item. This is
- * an arbitrary java class that provides details on how the item is
- * configured. To allow successful serialisation it's recommended to
- * keep this configuration as a simple Java bean.
- *
- * @author Tom Oinn
- * @author Stian Soiland-Reyes
- * @see ActivityConfigurationException
- */
-public interface Configurable<ConfigurationType> extends WorkflowItem {
- /**
- * Each item stores configuration within a bean of type ConfigurationType,
- * this method returns the configuration. This is used by the automatic
- * serialisation framework to store the item definition in the workflow XML.
- */
- ConfigurationType getConfiguration();
-
- /**
- * When the item is built from the workflow definition XML the object is
- * first constructed with a default constructor then this method is called,
- * passing in the configuration bean returned by getConfiguration().
- *
- * @throws ConfigurationException
- * if a problem occurs when configuring the item
- */
- void configure(ConfigurationType conf) throws ConfigurationException;
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/ConfigurationException.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/ConfigurationException.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/ConfigurationException.java
deleted file mode 100644
index d815193..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/ConfigurationException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2008 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.workflowmodel;
-
-/**
- * Thrown when attempting to configure a
- * {@link net.sf.taverna.t2.workflowmodel.Configurable} with an invalid
- * configuration. Causes may include actual configuration errors, unavailable
- * implementations etc.
- *
- * @author Stian Soiland-Reyes
- * @author Tom Oinn
- */
-public class ConfigurationException extends Exception {
- private static final long serialVersionUID = -2841928064598107156L;
-
- /**
- * {@inheritDoc}
- */
- public ConfigurationException() {
- super();
- }
-
- /**
- * {@inheritDoc}
- */
- public ConfigurationException(String message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * {@inheritDoc}
- */
- public ConfigurationException(String message) {
- super(message);
- }
-
- /**
- * {@inheritDoc}
- */
- public ConfigurationException(Throwable cause) {
- super(cause);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/ControlBoundary.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/ControlBoundary.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/ControlBoundary.java
deleted file mode 100644
index 2503224..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/ControlBoundary.java
+++ /dev/null
@@ -1,47 +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.workflowmodel;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Denotes that the associated type creates a boundary of control within the
- * dataflow. Types marked with this annotation are those which can modify the
- * owning process of data tokens they consume and generally correspond to cases
- * where the control flow bifurcates in some fashion.
- * <p>
- * This annotation doesn't currently define this behaviour but serves as an easy
- * way for us to track which objects might potentially do this, something we
- * need to be able to do to guarantee that the monitor works correctly.
- *
- * @author Tom Oinn
- *
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-@Documented
-public @interface ControlBoundary {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/Dataflow.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/Dataflow.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/Dataflow.java
deleted file mode 100644
index f55577e..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/Dataflow.java
+++ /dev/null
@@ -1,173 +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.workflowmodel;
-
-import static net.sf.taverna.t2.annotation.HierarchyRole.CHILD;
-
-import java.util.List;
-
-import net.sf.taverna.t2.annotation.Annotated;
-import net.sf.taverna.t2.annotation.HierarchyTraversal;
-import net.sf.taverna.t2.invocation.InvocationContext;
-
-/**
- * Top level definition object for a dataflow workflow. Currently Taverna only
- * supports dataflow workflows, this is equivalent to the Taverna 1 ScuflModel
- * class in role.
- *
- * @author Tom Oinn
- */
-@ControlBoundary
-public interface Dataflow extends Annotated<Dataflow>, TokenProcessingEntity,
- WorkflowItem {
- /**
- * A Dataflow consists of a set of named Processor instances. This method
- * returns an unmodifiable list of these processors. Equivalent to calling
- * getEntities(Processor.class).
- *
- * @return list of all processors in the dataflow
- */
- @HierarchyTraversal(hierarchies = { "workflowStructure" }, role = { CHILD })
- List<? extends Processor> getProcessors();
-
- /**
- * Dataflows also contain a set of merge operations, this method returns an
- * unmodifiable copy of the set. Equivalent to calling
- * getEntities(Merge.class)
- */
- @HierarchyTraversal(hierarchies = { "workflowStructure" }, role = { CHILD })
- List<? extends Merge> getMerges();
-
- /**
- * Dataflows have a list of input ports. These are the input ports the world
- * outside the dataflow sees - each one contains an internal output port
- * which is used to forward events on to entities (mostly processors) within
- * the dataflow.
- *
- * @return list of dataflow input port instances
- */
- @Override
- @HierarchyTraversal(hierarchies = { "workflowStructure" }, role = { CHILD })
- List<? extends DataflowInputPort> getInputPorts();
-
- /**
- * Get all workflow entities with the specified type restriction, this
- * allows retrieval of Processor, Merge, a mix of the two or any other
- * future entity to be added to the workflow model without a significant
- * change in this part of the API.
- *
- * @return an unmodifiable list of entities of the specified type
- * @param entityType
- * a class of the type specified by the type variable T. All
- * entities returned in the list can be cast to this type
- */
- <T extends NamedWorkflowEntity> List<? extends T> getEntities(
- Class<T> entityType);
-
- /**
- * Dataflows have a list of output ports. The output port in a dataflow is
- * the port visible to the outside world and from which the dataflow emits
- * events. Each dataflow output port also contains an instance of event
- * receiving input port which is used by entities within the dataflow to
- * push events to the corresponding external output port.
- *
- * @return list of dataflow output port instances
- */
- @Override
- @HierarchyTraversal(hierarchies = { "workflowStructure" }, role = { CHILD })
- List<? extends DataflowOutputPort> getOutputPorts();
-
- /**
- * The dataflow is largely defined by the links between processors and other
- * entities within its scope. This method returns them.
- *
- * @return list of Datalink implementations
- */
- @HierarchyTraversal(hierarchies = { "workflowStructure" }, role = { CHILD })
- List<? extends Datalink> getLinks();
-
- /**
- * Triggers a check for various basic potential problems with the workflow,
- * in particular ones related to type checking. Returns a report object
- * containing the state of the workflow and any problems found.
- * <p>
- * If the workflow has been set immutable with {@link #setImmutable()},
- * subsequent calls to this method will return the cached
- * DataflowValidationReport.
- *
- * @return validation report
- */
- DataflowValidationReport checkValidity();
-
- /**
- * A dataflow with no inputs cannot be driven by the supply of data tokens
- * as it has nowhere to receive such tokens. This method allows a dataflow
- * to fire on an empty input set, in this case the owning process identifier
- * must be passed explicitly to the dataflow. This method then calls the
- * fire methods of any Processor instances with no input ports.
- */
- void fire(String owningProcess, InvocationContext context);
-
- /**
- * The failure transmitter contains event listeners to be notified of
- * workflow level failures - these occur when an error bubbles up to the top
- * of the dispatch stack in a processor and is not handled by conversion to
- * an error token within the data stream.
- * <p>
- * Listeners are messaged after all clean-up has been performed on the
- * dataflow's internal state and that of any child operations within it,
- * guaranteeing that no tokens will be generated with the id of the failed
- * process after the message has been received by the listener
- */
- FailureTransmitter getFailureTransmitter();
-
- /**
- * An identifier that is unique to this dataflow and its current state. The
- * identifier will change whenever the dataflow is modified.
- *
- * @return a String representing a unique internal identifier.
- */
- String getIdentifier();
-
- String recordIdentifier();
-
- /**
- * Check if the given input port is connected to anything in the workflow.
- *
- * @param inputPort
- * @return true if the given workflow input port is connected, false
- * otherwise.
- */
- boolean isInputPortConnected(DataflowInputPort inputPort);
-
- /**
- * Mark this dataflow as immutable.
- *
- * Subsequent edits to its ports, links, merges, input and output ports will
- * throw a RuntimeException like UnsupportedOperationException.
- *
- * This method should be called before executing a Dataflow with
- * {@link #fire(String, InvocationContext)}, in order to guarantee that
- * datalinks, port depths etc. don't change while the dataflow is running.
- *
- */
- void setImmutable();
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/DataflowInputPort.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/DataflowInputPort.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/DataflowInputPort.java
deleted file mode 100644
index 7125639..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/DataflowInputPort.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.workflowmodel;
-
-/**
- * An input port on a Dataflow contains a nested output port within it. This
- * internal output port is used when connecting an edge from the workflow input
- * to a processor or workflow output (which in turn has a nested input port).
- * The workflow ports are therefore effectively pairs of ports with a relay
- * mechanism between the external and internal in the case of the dataflow
- * input.
- *
- * @author Tom Oinn
- */
-public interface DataflowInputPort extends EventHandlingInputPort, DataflowPort {
- /**
- * Return the internal output port. Output ports have a granular depth
- * property denoting the finest grained output token they can possibly
- * produce, this is used to configure downstream filtering input ports. In
- * this case the finest depth item is determined by the input to the
- * workflow port and must be explicitly set.
- *
- * @return the internal output port
- */
- EventForwardingOutputPort getInternalOutputPort();
-
- /**
- * Define the finest grained item that will be sent to this input port. As
- * all data are relayed through to the internal output port this is used to
- * denote output port granularity as well as to configure any downstream
- * connected filtering input ports.
- */
- int getGranularInputDepth();
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/DataflowOutputPort.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/DataflowOutputPort.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/DataflowOutputPort.java
deleted file mode 100644
index 82eee56..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/DataflowOutputPort.java
+++ /dev/null
@@ -1,61 +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.workflowmodel;
-
-import net.sf.taverna.t2.facade.ResultListener;
-
-/**
- * Output port of a DataFlow, exposes an internal EventHandlingInputPort into
- * which the internal workflow logic pushes data to be exposed outside the
- * workflow boundary.
- *
- * @author Tom Oinn
- */
-public interface DataflowOutputPort extends EventForwardingOutputPort,
- DataflowPort {
- /**
- * Get the internal input port for this workflow output
- *
- * @return port into which the workflow can push data for this output
- */
- EventHandlingInputPort getInternalInputPort();
-
- /**
- * Add a ResultListener, capable of listening to results being received by
- * the output port
- *
- * @param listener
- * the ResultListener
- *
- * @see ResultListener
- */
- void addResultListener(ResultListener listener);
-
- /**
- * Remove a ResultListener
- *
- * @param listener
- * the ResultListener
- *
- * @see ResultListener
- */
- void removeResultListener(ResultListener listener);
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/DataflowPort.java
----------------------------------------------------------------------
diff --git a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/DataflowPort.java b/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/DataflowPort.java
deleted file mode 100644
index bc0fcda..0000000
--- a/taverna-workflowmodel-api/src/main/java/net/sf/taverna/t2/workflowmodel/DataflowPort.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2009 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.workflowmodel;
-
-/**
- * Defines that the implementing port belongs to a Dataflow
- *
- * @author Tom Oinn
- * @author Stian Soiland-Reyes
- */
-public interface DataflowPort extends Port {
- /**
- * Get the parent DataFlow to which this port belongs
- */
- public Dataflow getDataflow();
-}