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/26 19:52:08 UTC

[19/51] [partial] incubator-taverna-workbench git commit: all packages are moved to org.apache.taverna.*

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/FileManager.java
----------------------------------------------------------------------
diff --git a/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/FileManager.java b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/FileManager.java
new file mode 100644
index 0000000..7626de5
--- /dev/null
+++ b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/FileManager.java
@@ -0,0 +1,573 @@
+/*******************************************************************************
+ * 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 org.apache.taverna.workbench.file;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.List;
+
+import javax.swing.filechooser.FileFilter;
+
+import org.apache.taverna.lang.observer.Observable;
+import org.apache.taverna.lang.observer.Observer;
+import org.apache.taverna.workbench.file.events.ClosedDataflowEvent;
+import org.apache.taverna.workbench.file.events.FileManagerEvent;
+import org.apache.taverna.workbench.file.events.OpenedDataflowEvent;
+import org.apache.taverna.workbench.file.events.SavedDataflowEvent;
+import org.apache.taverna.workbench.file.exceptions.OpenException;
+import org.apache.taverna.workbench.file.exceptions.OverwriteException;
+import org.apache.taverna.workbench.file.exceptions.SaveException;
+import org.apache.taverna.workbench.file.exceptions.UnsavedException;
+import org.apache.taverna.scufl2.api.container.WorkflowBundle;
+
+/**
+ * Manager of open files (WorkflowBundleBundles) in the workbench.
+ * <p>
+ * A {@link WorkflowBundle} can be opened for the workbench using
+ * {@link #openDataflow(FileType, Object)} or {@link #openDataflow(WorkflowBundle)}.
+ * {@link Observer}s of the FileManager gets notified with an
+ * {@link OpenedDataflowEvent}. The opened workflow is also
+ * {@link #setCurrentDataflow(WorkflowBundle) made the current dataflow}, available
+ * through {@link #getCurrentDataflow()} or by observing the
+ * {@link net.sf.taverna.t2.lang.ui.ModelMap} for the model name
+ * {@link net.sf.taverna.t2.workbench.ModelMapConstants#CURRENT_DATAFLOW}.
+ * <p>
+ * A dataflow can be saved using
+ * {@link #saveDataflow(WorkflowBundle, FileType, Object, boolean)}. Observers will be
+ * presented a {@link SavedDataflowEvent}.
+ * <p>
+ * If a dataflow was previously opened from a saveable destination or previously
+ * saved using {@link #saveDataflow(WorkflowBundle, FileType, Object, boolean)},
+ * {@link #saveDataflow(WorkflowBundle, boolean)} can be used to resave to that
+ * destination.
+ * <p>
+ * You can get the last opened/saved source and type using
+ * {@link #getDataflowSource(WorkflowBundle)} and {@link #getDataflowType(WorkflowBundle)}.
+ * <p>
+ * If the save methods are used with failOnOverwrite=true, an
+ * {@link OverwriteException} will be thrown if the destination file already
+ * exists and was not last written by a previous save on that dataflow. (This is
+ * typically checked using timestamps on the file).
+ * <p>
+ * A dataflow can be closed using {@link #closeDataflow(WorkflowBundle, boolean)}. A
+ * closed dataflow is no longer monitored for changes and can no longer be used
+ * with the other operations, except {@link #openDataflow(WorkflowBundle)}.
+ * <p>
+ * If a dataflow has been changed using the {@link EditManager},
+ * {@link #isDataflowChanged(WorkflowBundle)} will return true until the next save. If
+ * the close methods are used with failOnUnsaved=true, an
+ * {@link UnsavedException} will be thrown if the dataflow has been changed.
+ * <p>
+ * The implementation of this interface is an OSGi Service.
+ *
+ * @author Stian Soiland-Reyes
+ */
+public interface FileManager extends Observable<FileManagerEvent> {
+	/**
+	 * True if {@link #saveDataflow(WorkflowBundle, boolean)} can save the
+	 * workflow, i.e., that there exists an SPI implementation of
+	 * {@link DataflowPersistenceHandler} that can save to
+	 * {@link #getDataflowSource(WorkflowBundle)} using
+	 * {@link #getDataflowType(WorkflowBundle)}.
+	 * 
+	 * @see #saveDataflow(WorkflowBundle, boolean)
+	 * @param dataflow
+	 *            The dataflow to check
+	 * @return <code>true</code> if the given dataflow can be saved without
+	 *         providing a destination and filetype
+	 */
+	boolean canSaveWithoutDestination(WorkflowBundle dataflow);
+
+	/**
+	 * Close the specified dataflow.
+	 * <p>
+	 * A closed dataflow can no longer be used with the save methods, and will
+	 * disappear from the UI's list of open dataflows.
+	 * <p>
+	 * If no more dataflows would be open after the close, a new empty dataflow
+	 * is opened as through {@link #newDataflow()}.
+	 * <p>
+	 * If the failOnUnsaved parameters is <code>true</code>, and
+	 * {@link #isDataflowChanged(WorkflowBundle)} is <code>true</code>, an
+	 * {@link UnsavedException} will be thrown, typically because the workflow
+	 * has been changed using the {@link EditManager} since the last change.
+	 * <p>
+	 * Listeners registered using {@link Observable#addObserver(Observer)} will
+	 * be notified with an {@link ClosedDataflowEvent}.
+	 *
+	 * @param dataflow
+	 *            {@link WorkflowBundle} to close
+	 * @param failOnUnsaved
+	 *            If <code>true</code>, fail on unsaved changes
+	 * @throws UnsavedException
+	 *             If failOnUnsaved was <code>true</code> and there has been
+	 *             changes to the dataflow since the last save
+	 */
+	boolean closeDataflow(WorkflowBundle dataflow, boolean failOnUnsaved)
+			throws UnsavedException;
+
+	/**
+	 * Get the current dataflow.
+	 * <p>
+	 * The current workflow is typically the one currently showed on the screen,
+	 * and is also in {@link #getOpenDataflows()}.
+	 * <p>
+	 * The current dataflow is set through {@link #setCurrentDataflow(WorkflowBundle)}
+	 * or the {@link net.sf.taverna.t2.lang.ui.ModelMap} using the key
+	 * {@link net.sf.taverna.t2.workbench.ModelMapConstants#CURRENT_DATAFLOW}.
+	 *
+	 * @return The current dataflow, or <code>null</code> if no dataflow is
+	 *         current
+	 */
+	WorkflowBundle getCurrentDataflow();
+
+	/**
+	 * Get the dataflow that was opened from or last saved to the given source.
+	 *
+	 * @param source
+	 *            The source as opened with or saved to
+	 *            {@link #openDataflow(FileType, Object)}
+	 * @return The opened {@link WorkflowBundle} or <code>null</code> if no matching
+	 *         dataflow found.
+	 */
+	WorkflowBundle getDataflowBySource(Object source);
+
+	/**
+	 * Get a name to represent this dataflow.
+	 * <p>
+	 * The name will primarily be deduced from the source of where the workflow
+	 * is opened from, unless {@link Object#toString()} is not overridden (for
+	 * instance opened from an InputStream) or if the source is unknown, in
+	 * which case the dataflow's internal name {@link WorkflowBundle#getName()}
+	 * is returned.
+	 * <p>
+	 * The returned name can be used in listings like the WorkflowBundles menu, but is
+	 * not guaranteed to be unique. (For instance a workflow could be opened
+	 * twice from the same source).
+	 *
+	 * @param dataflow
+	 *            WorkflowBundle to get the name for
+	 * @return The deduced workflow name
+	 */
+	String getDataflowName(WorkflowBundle dataflow);
+
+	/**
+	 * Returns the default name to use when creating new workflows.
+	 *
+	 * @return the default name to use when creating new workflows
+	 */
+	String getDefaultWorkflowName();
+
+	/**
+	 * Get the last opened/saved source/destination for the given dataflow.
+	 * <p>
+	 * The source is the last source used with
+	 * {@link #saveDataflow(WorkflowBundle, FileType, Object, boolean)} for the given
+	 * dataflow, or {@link #openDataflow(FileType, Object)} if it has not yet
+	 * been saved.
+	 * <p>
+	 * If the given dataflow's last opened/saved location was unknown (opened
+	 * with {@link #newDataflow()} or {@link #openDataflow(WorkflowBundle)}), return
+	 * <code>null</code>.
+	 *
+	 * @param dataflow
+	 *            {@link WorkflowBundle} which file is to be returned
+	 * @return The last opened/saved source for the given dataflow, or
+	 *         <code>null</code> if unknown.
+	 */
+	Object getDataflowSource(WorkflowBundle dataflow);
+
+	/**
+	 * Get the last opened/saved source/destination FileType for the given
+	 * dataflow.
+	 * <p>
+	 * The type is the last {@link FileType} used with
+	 * {@link #saveDataflow(WorkflowBundle, FileType, Object, boolean)} for the given
+	 * dataflow, or {@link #openDataflow(FileType, Object)} if it has not yet
+	 * been saved.
+	 * <p>
+	 * If the given dataflow's last opened/saved file type was unknown (opened
+	 * with {@link #newDataflow()} or {@link #openDataflow(WorkflowBundle)}), return
+	 * <code>null</code>.
+	 *
+	 * @param dataflow
+	 *            {@link WorkflowBundle} which file is to be returned
+	 * @return The last opened/saved {@link FileType} for the given dataflow, or
+	 *         <code>null</code> if unknown.
+	 */
+	FileType getDataflowType(WorkflowBundle dataflow);
+
+	/**
+	 * Get the list of currently open dataflows. This list of dataflows are
+	 * typically displayed in the UI in the "WorkflowBundles" menu to allow switching
+	 * the {@link #getCurrentDataflow() current dataflow}.
+	 *
+	 * @return A copy of the {@link List} of open {@link WorkflowBundle}s
+	 */
+	List<WorkflowBundle> getOpenDataflows();
+
+	/**
+	 * Get a list of {@link FileFilter}s for supported {@link FileType}s that
+	 * can be opened with any source class.
+	 *
+	 * @return A {@link List} of {@link FileFilter}s supported by
+	 *         {@link #openDataflow(FileType, Object)}
+	 */
+	List<FileFilter> getOpenFileFilters();
+
+	/**
+	 * Get a list of {@link FileFilter}s for supported {@link FileType}s that
+	 * can be opened with given source class.
+	 *
+	 * @param sourceClass
+	 *            Source class that can be opened from
+	 * @return A {@link List} of {@link FileFilter}s supported by
+	 *         {@link #openDataflow(FileType, Object)}
+	 */
+	List<FileFilter> getOpenFileFilters(Class<?> sourceClass);
+
+	/**
+	 * Get a list of {@link FileFilter}s for supported {@link FileType}s that
+	 * can be saved to any destination class.
+	 *
+	 * @return A {@link List} of {@link FileFilter}s supported by
+	 *         {@link #saveDataflow(WorkflowBundle, FileType, Object, boolean)}
+	 */
+	List<FileFilter> getSaveFileFilters();
+
+	/**
+	 * Get a list of {@link FileFilter}s for supported {@link FileType}s that
+	 * can be saved to the given destination class.
+	 *
+	 * @param destinationClass
+	 *            Destination class that can be saved to
+	 * @return A {@link List} of {@link FileFilter}s supported by
+	 *         {@link #saveDataflow(WorkflowBundle, FileType, Object, boolean)}
+	 */
+	List<FileFilter> getSaveFileFilters(Class<?> destinationClass);
+
+	/**
+	 * Return <code>true</code> if the dataflow has been changed (through the
+	 * {@link EditManager} or {@link #setDataflowChanged(WorkflowBundle, boolean)})
+	 * since last save.
+	 *
+	 * @param dataflow
+	 *            WorkflowBundle which changed status is to be checked
+	 * @return <code>true</code> if the dataflow has been changed since last
+	 *         save.
+	 */
+	boolean isDataflowChanged(WorkflowBundle dataflow);
+
+	/**
+	 * True if the given dataflow has been opened and is in
+	 * {@link #getOpenDataflows()}.
+	 *
+	 * @param dataflow
+	 *            Dataflow to check
+	 * @return <code>true</code> if dataflow is open
+	 */
+	boolean isDataflowOpen(WorkflowBundle dataflow);
+
+	/**
+	 * Create and open a new, blank dataflow. The dataflow will not initially be
+	 * marked as changed.
+	 * <p>
+	 * Listeners registered using {@link Observable#addObserver(Observer)} will
+	 * be notified with an {@link OpenedDataflowEvent}.
+	 * <p>
+	 * Note, if the dataflow is later changed, it will not be possible to save
+	 * it to any original location using
+	 * {@link #saveDataflow(WorkflowBundle, boolean)}, only
+	 * {@link #saveDataflow(WorkflowBundle, FileType, Object, boolean)}.
+	 *
+	 * @return The newly opened blank {@link WorkflowBundle}
+	 */
+	WorkflowBundle newDataflow();
+
+	/**
+	 * Open a {@link WorkflowBundle} instance that has been created outside the
+	 * {@link FileManager}. The dataflow will not initially be marked as
+	 * changed.
+	 * <p>
+	 * Listeners registered using {@link Observable#addObserver(Observer)} will
+	 * be notified with an {@link OpenedDataflowEvent}.
+	 * <p>
+	 * Note, if the dataflow is later changed, it will not be possible to save
+	 * it to its original location using
+	 * {@link #saveDataflow(WorkflowBundle, boolean)}, only
+	 * {@link #saveDataflow(WorkflowBundle, FileType, Object, boolean)}.
+	 * <p>
+	 * Instead of using this option it is recommended to create your own
+	 * {@link FileType} and/or source type and a
+	 * {@link DataflowPersistenceHandler} to implement save and/or reopen
+	 * (revert).
+	 * <p>
+	 * If there is only one workflow open before opening this workflow, and it
+	 * is an unchanged blank workflow, the blank workflow will be closed.
+	 *
+	 * @param dataflow
+	 *            {@link WorkflowBundle} instance that is to be added as an open
+	 *            dataflow
+	 */
+	void openDataflow(WorkflowBundle dataflow);
+
+	/**
+	 * Open a dataflow from a source. The dataflow will not initially be marked
+	 * as changed, and will be set as the new current workflow.
+	 * <p>
+	 * The file manager will find implementations of the SPI
+	 * {@link DataflowPersistenceHandler} to perform the opening for the given file
+	 * type and destination class.
+	 * <p>
+	 * Listeners registered using {@link Observable#addObserver(Observer)} will
+	 * be notified with an {@link OpenedDataflowEvent}.
+	 * <p>
+	 * If there is only one workflow open before opening this workflow, and it
+	 * is an unchanged blank workflow, the blank workflow will be closed.
+	 *
+	 * @param fileType
+	 *            The filetype, for instance
+	 *            {@link net.sf.taverna.t2.workbench.file.impl.T2FlowFileType}.
+	 *            The file type must be supported by an implementation of the
+	 *            SPI DataflowPersistenceHandler.
+	 * @param source
+	 *            The source, for instance a {@link File} or {@link URL}. The
+	 *            source type must be supported by an implementation of
+	 *            DataflowPersistenceHandler.
+	 * @return The opened {@link WorkflowBundle}.
+	 * @throws OpenException
+	 *             If there was no matching DataflowPersistenceHandler found or
+	 *             the source could not be opened for any other reason, such as
+	 *             IO errors or syntax errors.
+	 */
+	WorkflowBundle openDataflow(FileType fileType, Object source)
+			throws OpenException;
+
+	/**
+	 * Open a dataflow from a source silently. The dataflow will not be listed
+	 * as open, and will not be made the current workflow.
+	 * <p>
+	 * The file manager will find implementations of the SPI
+	 * {@link DataflowPersistenceHandler} to perform the opening for the given file
+	 * type and destination class.
+	 * <p>
+	 * Listeners will <strong>not</strong> be notified.
+	 *
+	 * @param fileType
+	 *            The filetype, for instance
+	 *            {@link net.sf.taverna.t2.workbench.file.impl.T2FlowFileType}.
+	 *            The file type must be supported by an implementation of the
+	 *            SPI DataflowPersistenceHandler.
+	 * @param source
+	 *            The source, for instance a {@link File} or {@link URL}. The
+	 *            source type must be supported by an implementation of
+	 *            DataflowPersistenceHandler.
+	 * @return The {@link DataflowInfo} describing the opened dataflow.
+	 * @throws OpenException
+	 *             If there was no matching DataflowPersistenceHandler found or
+	 *             the source could not be opened for any other reason, such as
+	 *             IO errors or syntax errors.
+	 */
+	DataflowInfo openDataflowSilently(FileType fileType, Object source)
+			throws OpenException;
+
+	/**
+	 * Save the dataflow to the last saved destination and FileType from
+	 * {@link #saveDataflow(WorkflowBundle, FileType, Object, boolean)} or the last
+	 * opened source and FileType from {@link #openDataflow(FileType, Object)}.
+	 * <p>
+	 * Listeners registered using {@link Observable#addObserver(Observer)} will
+	 * be notified with an {@link SavedDataflowEvent}.
+	 *
+	 * @param dataflow
+	 *            Dataflow to save. Dataflow must have been opened with
+	 *            {@link #openDataflow(FileType, Object)} or saved using
+	 *            {@link #saveDataflow(WorkflowBundle, FileType, Object, boolean)}.
+	 * @param failOnOverwrite
+	 *            If <code>true</code>, an {@link OverwriteException} is thrown
+	 *            if a save would overwrite the destination because it has been
+	 *            changed since last open/save.
+	 * @throws OverwriteException
+	 *             if failOnOverwrite was true, and a save would overwrite the
+	 *             destination because it has been changed since last open/save.
+	 *             The save was not performed.
+	 * @throws SaveException
+	 *             If any other error occurs during saving, including the case
+	 *             that a dataflow is not connected to a source or destination,
+	 *             that there are no handlers (some source types can't be saved
+	 *             to, such as HTTP URLs), or any other IO error occurring while
+	 *             saving.
+	 */
+	void saveDataflow(WorkflowBundle dataflow, boolean failOnOverwrite)
+			throws SaveException, OverwriteException;
+
+	/**
+	 * Save the dataflow to the given destination using the given filetype.
+	 * <p>
+	 * The file manager will find implementations of the SPI
+	 * {@link DataflowPersistenceHandler} to perform the save for the given file
+	 * type and destination class.
+	 * <p>
+	 * Listeners registered using {@link Observable#addObserver(Observer)} will
+	 * be notified with an {@link SavedDataflowEvent}.
+	 *
+	 * @param dataflow
+	 *            {@link Dataflow} to be saved
+	 * @param fileType
+	 *            {@link FileType} to save dataflow as, for instance
+	 *            {@link net.sf.taverna.t2.workbench.file.impl.T2FlowFileType}.
+	 *            The file type must be supported by an SPI implementation of
+	 *            {@link DataflowPersistenceHandler}.
+	 * @param destination
+	 *            Destination to save dataflow to, for instance a {@link File}
+	 * @param failOnOverwrite
+	 *            If <code>true</code>, an {@link OverwriteException} is thrown
+	 *            if a save would overwrite the destination because it already
+	 *            exists, but was not opened or save to using the file manager
+	 *            for the given dataflow. (ie. a repeated call to this function
+	 *            should not throw an OverwriteException unless someone outside
+	 *            has modified the file)
+	 * @throws OverwriteException
+	 *             if failOnOverwrite was true, and a save would overwrite the
+	 *             destination because it already existed, and was not last
+	 *             written to by a previous save. The save was not performed.
+	 * @throws SaveException
+	 *             If any other error occurs during saving, including the case
+	 *             that a dataflow is not connected to a source or destination,
+	 *             that there are no handlers (some source types can't be saved
+	 *             to, such as HTTP URLs), or any other IO error occurring while
+	 *             saving.
+	 */
+	void saveDataflow(WorkflowBundle dataflow, FileType fileType,
+			Object destination, boolean failOnOverwrite) throws SaveException,
+			OverwriteException;
+
+	/**
+	 * Silently save the dataflow to the given destination using the given
+	 * filetype.
+	 * <p>
+	 * The file manager will find implementations of the SPI
+	 * {@link DataflowPersistenceHandler} to perform the save for the given file
+	 * type and destination class.
+	 * <p>
+	 * Listeners will <strong>not</strong> be notified, and the dataflow does
+	 * not previously have to be opened. getDataflowSource(),
+	 * isDataflowChanged() etc will not be affected - as if the silent save
+	 * never happened.
+	 * 
+	 * @param dataflow
+	 *            {@link WorkflowBundle} to be saved
+	 * @param fileType
+	 *            {@link FileType} to save dataflow as, for instance
+	 *            {@link net.sf.taverna.t2.workbench.file.impl.T2FlowFileType}.
+	 *            The file type must be supported by an SPI implementation of
+	 *            {@link DataflowPersistenceHandler}.
+	 * @param destination
+	 *            Destination to save dataflow to, for instance a {@link File}
+	 * @param failOnOverwrite
+	 *            If <code>true</code>, an {@link OverwriteException} is thrown
+	 *            if a save would overwrite the destination because it already
+	 *            exists, but was not opened or save to using the file manager
+	 *            for the given dataflow. (ie. a repeated call to this function
+	 *            should not throw an OverwriteException unless someone outside
+	 *            has modified the file)
+	 * @return The {@link DataflowInfo} describing where the workflow was saved
+	 * @throws OverwriteException
+	 *             if failOnOverwrite was true, and a save would overwrite the
+	 *             destination because it already existed, and was not last
+	 *             written to by a previous save. The save was not performed.
+	 * @throws SaveException
+	 *             If any other error occurs during saving, including the case
+	 *             that a dataflow is not connected to a source or destination,
+	 *             that there are no handlers (some source types can't be saved
+	 *             to, such as HTTP URLs), or any other IO error occurring while
+	 *             saving.
+	 */
+	DataflowInfo saveDataflowSilently(WorkflowBundle dataflow, FileType fileType,
+			Object destination, boolean failOnOverwrite) throws SaveException,
+			OverwriteException;
+
+	/**
+	 * Set the current dataflow to the one provided.
+	 * <p>
+	 * The current dataflow can be retrieved using {@link #getCurrentDataflow()}
+	 * . Note that opening a dataflow will normally also set it as the current
+	 * dataflow.
+	 * <p>
+	 * Listeners registered using {@link Observable#addObserver(Observer)} will
+	 * be notified with an {@link SetCurrentDataflowEvent}.
+	 * <p>
+	 * Note, the dataflow must already be open. If this is not the case, use one
+	 * of the openDataflow() methods or
+	 * {@link #setCurrentDataflow(WorkflowBundle, boolean)}.
+	 *
+	 * @see #setCurrentDataflow(WorkflowBundle, boolean)
+	 * @param dataflow
+	 *            {@link WorkflowBundle} to be made current
+	 */
+	void setCurrentDataflow(WorkflowBundle dataflow);
+
+	/**
+	 * Set the current dataflow to the one provided.
+	 * <p>
+	 * The current dataflow can be retrieved using {@link #getCurrentDataflow()}
+	 * . Note that opening a dataflow will normally also set it as the current
+	 * dataflow.
+	 * <p>
+	 * Listeners registered using {@link Observable#addObserver(Observer)} will
+	 * be notified with an {@link SetCurrentDataflowEvent}.
+	 * <p>
+	 * Unless <code>openIfNeeded</code> is <code>true</code>, the dataflow must
+	 * already be open.
+	 *
+	 * @see #setCurrentDataflow(WorkflowBundle, boolean)
+	 * @param dataflow
+	 *            {@link WorkflowBundle} to be made current
+	 * @param openIfNeeded
+	 *            If <code>true</code>, open the dataflow if needed
+	 */
+	void setCurrentDataflow(WorkflowBundle dataflow, boolean openIfNeeded);
+
+	/**
+	 * Set a dataflow as changed or not. This changes the value returned by
+	 * {@link #isDataflowChanged(WorkflowBundle)}.
+	 * <p>
+	 * This method can be used if the dataflow has been changed outside the
+	 * {@link EditManager}.
+	 *
+	 * @param dataflow
+	 *            Dataflow which is to be marked
+	 * @param isChanged
+	 *            <code>true</code> if the dataflow is to be marked as changed,
+	 *            <code>false</code> if it is to be marked as not changed.
+	 */
+	void setDataflowChanged(WorkflowBundle dataflow, boolean isChanged);
+
+	/**
+	 * Returns the canonical form of the source where the dataflow was opened
+	 * from or saved to. The code for this method was devised based on
+	 * {@link net.sf.taverna.t2.workbench.file.impl.T2DataflowOpener#openDataflow(FileType fileType, Object source)}.
+	 */
+	Object getCanonical(Object source) throws IllegalArgumentException,
+			URISyntaxException, IOException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/FileType.java
----------------------------------------------------------------------
diff --git a/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/FileType.java b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/FileType.java
new file mode 100644
index 0000000..ef2d53c
--- /dev/null
+++ b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/FileType.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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 org.apache.taverna.workbench.file;
+
+/**
+ * A filetype to identify a way to (de)serialise a {@link WorkflowBundle} with
+ * the {@link FileManager}.
+ * <p>
+ * Two filetypes are considered equal if they share an extension or mime type or
+ * are the same instance.
+ * 
+ * @see net.sf.taverna.t2.workbench.file.impl.WorkflowBundleFileType
+ * @author Stian Soiland-Reyes
+ */
+public abstract class FileType {
+	public abstract String getExtension();
+
+	public abstract String getMimeType();
+
+	public abstract String getDescription();
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public boolean equals(Object obj) {
+		if (obj == this)
+			return true;
+		if (!(obj instanceof FileType))
+			return false;
+		FileType other = (FileType) obj;
+		if (getMimeType() != null && other.getMimeType() != null)
+			return getMimeType().equalsIgnoreCase(other.getMimeType());
+		if (getExtension() != null && other.getExtension() != null)
+			return getExtension().equalsIgnoreCase(other.getExtension());
+		return false;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public int hashCode() {
+		int hash = 7;
+		hash = 31 * hash + getExtension().hashCode();
+		hash = 31 * hash + getMimeType().hashCode();
+		return hash;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/AbstractDataflowEvent.java
----------------------------------------------------------------------
diff --git a/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/AbstractDataflowEvent.java b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/AbstractDataflowEvent.java
new file mode 100644
index 0000000..fa97fe0
--- /dev/null
+++ b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/AbstractDataflowEvent.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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 org.apache.taverna.workbench.file.events;
+
+import org.apache.taverna.scufl2.api.container.WorkflowBundle;
+
+/**
+ * Abstract FileManagerEvent that relates to a {@link WorkflowBundle}
+ * 
+ * @see AbstractDataflowEvent
+ * @see ClosedDataflowEvent
+ * @see OpenedDataflowEvent
+ * @see SavedDataflowEvent
+ * @see SetCurrentDataflowEvent
+ * @author Stian Soiland-Reyes
+ */
+public abstract class AbstractDataflowEvent extends FileManagerEvent {
+	private final WorkflowBundle workflowBundle;
+
+	public AbstractDataflowEvent(WorkflowBundle workflowBundle) {
+		this.workflowBundle = workflowBundle;
+	}
+
+	public WorkflowBundle getDataflow() {
+		return workflowBundle;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/ClosedDataflowEvent.java
----------------------------------------------------------------------
diff --git a/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/ClosedDataflowEvent.java b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/ClosedDataflowEvent.java
new file mode 100644
index 0000000..ac69c89
--- /dev/null
+++ b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/ClosedDataflowEvent.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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 org.apache.taverna.workbench.file.events;
+
+import org.apache.taverna.scufl2.api.container.WorkflowBundle;
+
+/**
+ * {@link FileManagerEvent} that means a {@link WorkflowBundle} has been closed.
+ * 
+ * @author Stian Soiland-Reyes
+ */
+public class ClosedDataflowEvent extends AbstractDataflowEvent {
+	public ClosedDataflowEvent(WorkflowBundle workflowBundle) {
+		super(workflowBundle);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/ClosingDataflowEvent.java
----------------------------------------------------------------------
diff --git a/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/ClosingDataflowEvent.java b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/ClosingDataflowEvent.java
new file mode 100644
index 0000000..26142b5
--- /dev/null
+++ b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/ClosingDataflowEvent.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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 org.apache.taverna.workbench.file.events;
+
+import org.apache.taverna.scufl2.api.container.WorkflowBundle;
+
+/**
+ * {@link FileManagerEvent} that means a {@link WorkflowBundle} is being closed.
+ * <i>This event is abortable;</i> if aborted, the close will not occur.
+ * 
+ * @author Alan R Williams
+ */
+public class ClosingDataflowEvent extends AbstractDataflowEvent {
+	private boolean abortClose = false;
+
+	public boolean isAbortClose() {
+		return abortClose;
+	}
+
+	public void setAbortClose(boolean abortClose) {
+		this.abortClose = abortClose;
+	}
+
+	public ClosingDataflowEvent(WorkflowBundle workflowBundle) {
+		super(workflowBundle);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/FileManagerEvent.java
----------------------------------------------------------------------
diff --git a/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/FileManagerEvent.java b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/FileManagerEvent.java
new file mode 100644
index 0000000..025ea97
--- /dev/null
+++ b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/FileManagerEvent.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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 org.apache.taverna.workbench.file.events;
+
+import org.apache.taverna.lang.observer.Observable;
+import org.apache.taverna.workbench.file.FileManager;
+
+/**
+ * An event given to {@link FileManager} observers registered using
+ * {@link Observable#addObserver(net.sf.taverna.t2.lang.observer.Observer)}.
+ * 
+ * @see AbstractDataflowEvent
+ * @see ClosedDataflowEvent
+ * @see OpenedDataflowEvent
+ * @see SavedDataflowEvent
+ * @see SetCurrentDataflowEvent
+ * @author Stian Soiland-Reyes
+ */
+public class FileManagerEvent {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/OpenedDataflowEvent.java
----------------------------------------------------------------------
diff --git a/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/OpenedDataflowEvent.java b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/OpenedDataflowEvent.java
new file mode 100644
index 0000000..31f8222
--- /dev/null
+++ b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/OpenedDataflowEvent.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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 org.apache.taverna.workbench.file.events;
+
+import org.apache.taverna.scufl2.api.container.WorkflowBundle;
+
+/**
+ * {@link FileManagerEvent} that means a dataflow has been opened
+ * 
+ * @author Stian Soiland-Reyes
+ */
+public class OpenedDataflowEvent extends AbstractDataflowEvent {
+	public OpenedDataflowEvent(WorkflowBundle workflowBundle) {
+		super(workflowBundle);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/SavedDataflowEvent.java
----------------------------------------------------------------------
diff --git a/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/SavedDataflowEvent.java b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/SavedDataflowEvent.java
new file mode 100644
index 0000000..70fc778
--- /dev/null
+++ b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/SavedDataflowEvent.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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 org.apache.taverna.workbench.file.events;
+
+import org.apache.taverna.scufl2.api.container.WorkflowBundle;
+
+/**
+ * {@link FileManagerEvent} that means a {@link WorkflowBundle} has been saved.
+ * 
+ * @author Stian Soiland-Reyes
+ */
+public class SavedDataflowEvent extends AbstractDataflowEvent {
+	public SavedDataflowEvent(WorkflowBundle workflowBundle) {
+		super(workflowBundle);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/SetCurrentDataflowEvent.java
----------------------------------------------------------------------
diff --git a/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/SetCurrentDataflowEvent.java b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/SetCurrentDataflowEvent.java
new file mode 100644
index 0000000..cd27705
--- /dev/null
+++ b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/events/SetCurrentDataflowEvent.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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 org.apache.taverna.workbench.file.events;
+
+import org.apache.taverna.scufl2.api.container.WorkflowBundle;
+
+/**
+ * {@link FileManagerEvent} that means a {@link WorkflowBundle} has been made
+ * current.
+ * 
+ * @author Stian Soiland-Reyes
+ */
+public class SetCurrentDataflowEvent extends AbstractDataflowEvent {
+	public SetCurrentDataflowEvent(WorkflowBundle workflowBundle) {
+		super(workflowBundle);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/FileException.java
----------------------------------------------------------------------
diff --git a/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/FileException.java b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/FileException.java
new file mode 100644
index 0000000..67e17ac
--- /dev/null
+++ b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/FileException.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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 org.apache.taverna.workbench.file.exceptions;
+
+import org.apache.taverna.workbench.file.FileManager;
+
+/**
+ * Superclass of exceptions thrown by the {@link FileManager}.
+ */
+@SuppressWarnings("serial")
+public class FileException extends Exception {
+	public FileException() {
+	}
+
+	public FileException(String message) {
+		super(message);
+	}
+
+	public FileException(Throwable cause) {
+		super(cause);
+	}
+
+	public FileException(String message, Throwable cause) {
+		super(message, cause);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/OpenException.java
----------------------------------------------------------------------
diff --git a/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/OpenException.java b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/OpenException.java
new file mode 100644
index 0000000..e687c94
--- /dev/null
+++ b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/OpenException.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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 org.apache.taverna.workbench.file.exceptions;
+
+/** Indicate that something went wrong during opening a file */
+@SuppressWarnings("serial")
+public class OpenException extends FileException {
+	public OpenException() {
+	}
+
+	public OpenException(String message) {
+		super(message);
+	}
+
+	public OpenException(Throwable cause) {
+		super(cause);
+	}
+
+	public OpenException(String message, Throwable cause) {
+		super(message, cause);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/OverwriteException.java
----------------------------------------------------------------------
diff --git a/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/OverwriteException.java b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/OverwriteException.java
new file mode 100644
index 0000000..fff8aa0
--- /dev/null
+++ b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/OverwriteException.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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 org.apache.taverna.workbench.file.exceptions;
+
+/** Indicate that something could not be overwritten. */
+@SuppressWarnings("serial")
+public class OverwriteException extends SaveException {
+	private final Object destination;
+
+	public OverwriteException(Object destination) {
+		super("Save would overwrite existing destination " + destination);
+		this.destination = destination;
+	}
+
+	public Object getDestination() {
+		return destination;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/SaveException.java
----------------------------------------------------------------------
diff --git a/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/SaveException.java b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/SaveException.java
new file mode 100644
index 0000000..4d2866f
--- /dev/null
+++ b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/SaveException.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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 org.apache.taverna.workbench.file.exceptions;
+
+/** Indicate that a workflow could not be saved. */
+@SuppressWarnings("serial")
+public class SaveException extends FileException {
+	public SaveException() {
+	}
+
+	public SaveException(String message) {
+		super(message);
+	}
+
+	public SaveException(Throwable cause) {
+		super(cause);
+	}
+
+	public SaveException(String message, Throwable cause) {
+		super(message, cause);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/UnsavedException.java
----------------------------------------------------------------------
diff --git a/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/UnsavedException.java b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/UnsavedException.java
new file mode 100644
index 0000000..a72606d
--- /dev/null
+++ b/taverna-file-api/src/main/java/org/apache/taverna/workbench/file/exceptions/UnsavedException.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * 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 org.apache.taverna.workbench.file.exceptions;
+
+import org.apache.taverna.scufl2.api.container.WorkflowBundle;
+
+/** Indicate that a workflow bundle is not saved. */
+@SuppressWarnings("serial")
+public class UnsavedException extends FileException {
+	private final WorkflowBundle workflowBundle;
+
+	public UnsavedException(WorkflowBundle workflowBundle) {
+		super("WorkflowBundle was not saved: " + workflowBundle);
+		this.workflowBundle = workflowBundle;
+	}
+
+	public WorkflowBundle getDataflow() {
+		return workflowBundle;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/DataflowFromDataflowPersistenceHandler.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/DataflowFromDataflowPersistenceHandler.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/DataflowFromDataflowPersistenceHandler.java
index 5776c78..0c498bc 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/DataflowFromDataflowPersistenceHandler.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/DataflowFromDataflowPersistenceHandler.java
@@ -7,11 +7,11 @@ import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 
-import net.sf.taverna.t2.workbench.file.AbstractDataflowPersistenceHandler;
-import net.sf.taverna.t2.workbench.file.DataflowInfo;
-import net.sf.taverna.t2.workbench.file.DataflowPersistenceHandler;
-import net.sf.taverna.t2.workbench.file.FileType;
-import net.sf.taverna.t2.workbench.file.exceptions.OpenException;
+import org.apache.taverna.workbench.file.AbstractDataflowPersistenceHandler;
+import org.apache.taverna.workbench.file.DataflowInfo;
+import org.apache.taverna.workbench.file.DataflowPersistenceHandler;
+import org.apache.taverna.workbench.file.FileType;
+import org.apache.taverna.workbench.file.exceptions.OpenException;
 import org.apache.taverna.scufl2.api.container.WorkflowBundle;
 import org.apache.taverna.scufl2.api.core.Workflow;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/DataflowPersistenceHandlerRegistry.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/DataflowPersistenceHandlerRegistry.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/DataflowPersistenceHandlerRegistry.java
index 39117e9..c33119d 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/DataflowPersistenceHandlerRegistry.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/DataflowPersistenceHandlerRegistry.java
@@ -31,8 +31,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import net.sf.taverna.t2.workbench.file.DataflowPersistenceHandler;
-import net.sf.taverna.t2.workbench.file.FileType;
+import org.apache.taverna.workbench.file.DataflowPersistenceHandler;
+import org.apache.taverna.workbench.file.FileType;
 
 import org.apache.commons.collections.Factory;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileDataflowInfo.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileDataflowInfo.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileDataflowInfo.java
index 1e9080b..b7377e9 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileDataflowInfo.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileDataflowInfo.java
@@ -24,9 +24,9 @@ import java.io.File;
 import java.io.IOException;
 import java.util.Date;
 
-import net.sf.taverna.t2.workbench.file.DataflowInfo;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.file.FileType;
+import org.apache.taverna.workbench.file.DataflowInfo;
+import org.apache.taverna.workbench.file.FileManager;
+import org.apache.taverna.workbench.file.FileType;
 
 import org.apache.log4j.Logger;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileManagerImpl.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileManagerImpl.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileManagerImpl.java
index c587caa..eed7d51 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileManagerImpl.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileManagerImpl.java
@@ -43,23 +43,23 @@ import javax.swing.filechooser.FileFilter;
 import org.apache.taverna.lang.observer.MultiCaster;
 import org.apache.taverna.lang.observer.Observable;
 import org.apache.taverna.lang.observer.Observer;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.edits.EditManager.AbstractDataflowEditEvent;
-import net.sf.taverna.t2.workbench.edits.EditManager.EditManagerEvent;
-import net.sf.taverna.t2.workbench.file.DataflowInfo;
-import net.sf.taverna.t2.workbench.file.DataflowPersistenceHandler;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.file.FileType;
-import net.sf.taverna.t2.workbench.file.events.ClosedDataflowEvent;
-import net.sf.taverna.t2.workbench.file.events.ClosingDataflowEvent;
-import net.sf.taverna.t2.workbench.file.events.FileManagerEvent;
-import net.sf.taverna.t2.workbench.file.events.OpenedDataflowEvent;
-import net.sf.taverna.t2.workbench.file.events.SavedDataflowEvent;
-import net.sf.taverna.t2.workbench.file.events.SetCurrentDataflowEvent;
-import net.sf.taverna.t2.workbench.file.exceptions.OpenException;
-import net.sf.taverna.t2.workbench.file.exceptions.OverwriteException;
-import net.sf.taverna.t2.workbench.file.exceptions.SaveException;
-import net.sf.taverna.t2.workbench.file.exceptions.UnsavedException;
+import org.apache.taverna.workbench.edits.EditManager;
+import org.apache.taverna.workbench.edits.EditManager.AbstractDataflowEditEvent;
+import org.apache.taverna.workbench.edits.EditManager.EditManagerEvent;
+import org.apache.taverna.workbench.file.DataflowInfo;
+import org.apache.taverna.workbench.file.DataflowPersistenceHandler;
+import org.apache.taverna.workbench.file.FileManager;
+import org.apache.taverna.workbench.file.FileType;
+import org.apache.taverna.workbench.file.events.ClosedDataflowEvent;
+import org.apache.taverna.workbench.file.events.ClosingDataflowEvent;
+import org.apache.taverna.workbench.file.events.FileManagerEvent;
+import org.apache.taverna.workbench.file.events.OpenedDataflowEvent;
+import org.apache.taverna.workbench.file.events.SavedDataflowEvent;
+import org.apache.taverna.workbench.file.events.SetCurrentDataflowEvent;
+import org.apache.taverna.workbench.file.exceptions.OpenException;
+import org.apache.taverna.workbench.file.exceptions.OverwriteException;
+import org.apache.taverna.workbench.file.exceptions.SaveException;
+import org.apache.taverna.workbench.file.exceptions.UnsavedException;
 
 import org.apache.log4j.Logger;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileTypeFileFilter.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileTypeFileFilter.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileTypeFileFilter.java
index 6416163..6383295 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileTypeFileFilter.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/FileTypeFileFilter.java
@@ -24,7 +24,7 @@ import java.io.File;
 
 import javax.swing.filechooser.FileFilter;
 
-import net.sf.taverna.t2.workbench.file.FileType;
+import org.apache.taverna.workbench.file.FileType;
 
 public class FileTypeFileFilter extends FileFilter {
 	private final FileType fileType;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/MultipleFileTypes.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/MultipleFileTypes.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/MultipleFileTypes.java
index c398805..0205d86 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/MultipleFileTypes.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/MultipleFileTypes.java
@@ -25,7 +25,7 @@ import java.util.Set;
 
 import javax.swing.filechooser.FileFilter;
 
-import net.sf.taverna.t2.workbench.file.FileType;
+import org.apache.taverna.workbench.file.FileType;
 
 public class MultipleFileTypes extends FileFilter {
 	private String description;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowInProgressDialog.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowInProgressDialog.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowInProgressDialog.java
index dc08cff..021a1b2 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowInProgressDialog.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowInProgressDialog.java
@@ -22,8 +22,8 @@
 package net.sf.taverna.t2.workbench.file.impl;
 
 import static java.awt.BorderLayout.CENTER;
-import static net.sf.taverna.t2.workbench.MainWindow.getMainWindow;
-import static net.sf.taverna.t2.workbench.icons.WorkbenchIcons.workingIcon;
+import static org.apache.taverna.workbench.MainWindow.getMainWindow;
+import static org.apache.taverna.workbench.icons.WorkbenchIcons.workingIcon;
 
 import java.awt.BorderLayout;
 import java.awt.Dimension;
@@ -32,7 +32,7 @@ import javax.swing.JLabel;
 import javax.swing.JPanel;
 import javax.swing.border.EmptyBorder;
 
-import net.sf.taverna.t2.workbench.helper.HelpEnabledDialog;
+import org.apache.taverna.workbench.helper.HelpEnabledDialog;
 
 /**
  * Dialog that is popped up while we are opening a workflow.

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowInfo.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowInfo.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowInfo.java
index 4a4a1e3..00245f1 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowInfo.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowInfo.java
@@ -22,8 +22,8 @@ package net.sf.taverna.t2.workbench.file.impl;
 
 import java.util.Date;
 
-import net.sf.taverna.t2.workbench.file.DataflowInfo;
-import net.sf.taverna.t2.workbench.file.FileType;
+import org.apache.taverna.workbench.file.DataflowInfo;
+import org.apache.taverna.workbench.file.FileType;
 
 /**
  * Information about an open dataflow.

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowRunnable.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowRunnable.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowRunnable.java
index 7cb1c57..504c2a9 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowRunnable.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowRunnable.java
@@ -4,9 +4,9 @@
 package net.sf.taverna.t2.workbench.file.impl;
 
 import static java.lang.Thread.sleep;
-import net.sf.taverna.t2.workbench.file.FileType;
-import net.sf.taverna.t2.workbench.file.exceptions.OpenException;
-import net.sf.taverna.t2.workbench.ui.SwingWorkerCompletionWaiter;
+import org.apache.taverna.workbench.file.FileType;
+import org.apache.taverna.workbench.file.exceptions.OpenException;
+import org.apache.taverna.workbench.ui.SwingWorkerCompletionWaiter;
 import org.apache.taverna.scufl2.api.container.WorkflowBundle;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowSwingWorker.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowSwingWorker.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowSwingWorker.java
index c8a78db..ba74b03 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowSwingWorker.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/OpenDataflowSwingWorker.java
@@ -22,8 +22,8 @@ package net.sf.taverna.t2.workbench.file.impl;
 
 import javax.swing.SwingWorker;
 
-import net.sf.taverna.t2.workbench.file.FileType;
-import net.sf.taverna.t2.workbench.file.exceptions.OpenException;
+import org.apache.taverna.workbench.file.FileType;
+import org.apache.taverna.workbench.file.exceptions.OpenException;
 
 import org.apache.log4j.Logger;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/T2DataflowOpener.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/T2DataflowOpener.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/T2DataflowOpener.java
index 79f3e6f..d6e0db2 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/T2DataflowOpener.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/T2DataflowOpener.java
@@ -32,11 +32,11 @@ import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 
-import net.sf.taverna.t2.workbench.file.AbstractDataflowPersistenceHandler;
-import net.sf.taverna.t2.workbench.file.DataflowInfo;
-import net.sf.taverna.t2.workbench.file.DataflowPersistenceHandler;
-import net.sf.taverna.t2.workbench.file.FileType;
-import net.sf.taverna.t2.workbench.file.exceptions.OpenException;
+import org.apache.taverna.workbench.file.AbstractDataflowPersistenceHandler;
+import org.apache.taverna.workbench.file.DataflowInfo;
+import org.apache.taverna.workbench.file.DataflowPersistenceHandler;
+import org.apache.taverna.workbench.file.FileType;
+import org.apache.taverna.workbench.file.exceptions.OpenException;
 
 import org.apache.log4j.Logger;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/T2FlowFileType.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/T2FlowFileType.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/T2FlowFileType.java
index a2774e4..cb2b399 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/T2FlowFileType.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/T2FlowFileType.java
@@ -20,7 +20,7 @@
  ******************************************************************************/
 package net.sf.taverna.t2.workbench.file.impl;
 
-import net.sf.taverna.t2.workbench.file.FileType;
+import org.apache.taverna.workbench.file.FileType;
 
 public class T2FlowFileType extends FileType {
 	public static final String APPLICATION_VND_TAVERNA_T2FLOW_XML = "application/vnd.taverna.t2flow+xml";

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleFileType.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleFileType.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleFileType.java
index 09b30b0..ad50f79 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleFileType.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleFileType.java
@@ -20,7 +20,7 @@
  ******************************************************************************/
 package net.sf.taverna.t2.workbench.file.impl;
 
-import net.sf.taverna.t2.workbench.file.FileType;
+import org.apache.taverna.workbench.file.FileType;
 
 public class WorkflowBundleFileType extends FileType {
 	public static final String APPLICATION_VND_TAVERNA_SCUFL2_WORKFLOW_BUNDLE = "application/vnd.taverna.scufl2.workflow-bundle";

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleOpener.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleOpener.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleOpener.java
index 8d13438..6092dad 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleOpener.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleOpener.java
@@ -32,11 +32,11 @@ import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 
-import net.sf.taverna.t2.workbench.file.AbstractDataflowPersistenceHandler;
-import net.sf.taverna.t2.workbench.file.DataflowInfo;
-import net.sf.taverna.t2.workbench.file.DataflowPersistenceHandler;
-import net.sf.taverna.t2.workbench.file.FileType;
-import net.sf.taverna.t2.workbench.file.exceptions.OpenException;
+import org.apache.taverna.workbench.file.AbstractDataflowPersistenceHandler;
+import org.apache.taverna.workbench.file.DataflowInfo;
+import org.apache.taverna.workbench.file.DataflowPersistenceHandler;
+import org.apache.taverna.workbench.file.FileType;
+import org.apache.taverna.workbench.file.exceptions.OpenException;
 
 import org.apache.log4j.Logger;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleSaver.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleSaver.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleSaver.java
index c534a8d..3933e67 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleSaver.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/WorkflowBundleSaver.java
@@ -31,11 +31,11 @@ import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 
-import net.sf.taverna.t2.workbench.file.AbstractDataflowPersistenceHandler;
-import net.sf.taverna.t2.workbench.file.DataflowInfo;
-import net.sf.taverna.t2.workbench.file.DataflowPersistenceHandler;
-import net.sf.taverna.t2.workbench.file.FileType;
-import net.sf.taverna.t2.workbench.file.exceptions.SaveException;
+import org.apache.taverna.workbench.file.AbstractDataflowPersistenceHandler;
+import org.apache.taverna.workbench.file.DataflowInfo;
+import org.apache.taverna.workbench.file.DataflowPersistenceHandler;
+import org.apache.taverna.workbench.file.FileType;
+import org.apache.taverna.workbench.file.exceptions.SaveException;
 
 import org.apache.log4j.Logger;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/CloseAllWorkflowsAction.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/CloseAllWorkflowsAction.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/CloseAllWorkflowsAction.java
index 8a39c06..337d9a3 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/CloseAllWorkflowsAction.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/CloseAllWorkflowsAction.java
@@ -25,7 +25,7 @@ import static java.awt.event.InputEvent.SHIFT_DOWN_MASK;
 import static java.awt.event.KeyEvent.VK_L;
 import static java.awt.event.KeyEvent.VK_W;
 import static javax.swing.KeyStroke.getKeyStroke;
-import static net.sf.taverna.t2.workbench.icons.WorkbenchIcons.closeAllIcon;
+import static org.apache.taverna.workbench.icons.WorkbenchIcons.closeAllIcon;
 
 import java.awt.Component;
 import java.awt.event.ActionEvent;
@@ -34,8 +34,8 @@ import java.util.List;
 
 import javax.swing.AbstractAction;
 
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
+import org.apache.taverna.workbench.edits.EditManager;
+import org.apache.taverna.workbench.file.FileManager;
 
 import org.apache.log4j.Logger;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/CloseWorkflowAction.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/CloseWorkflowAction.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/CloseWorkflowAction.java
index f4c07ac..b696fae 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/CloseWorkflowAction.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/CloseWorkflowAction.java
@@ -29,16 +29,16 @@ import static javax.swing.JOptionPane.YES_NO_CANCEL_OPTION;
 import static javax.swing.JOptionPane.YES_OPTION;
 import static javax.swing.JOptionPane.showConfirmDialog;
 import static javax.swing.KeyStroke.getKeyStroke;
-import static net.sf.taverna.t2.workbench.icons.WorkbenchIcons.closeIcon;
+import static org.apache.taverna.workbench.icons.WorkbenchIcons.closeIcon;
 
 import java.awt.Component;
 import java.awt.event.ActionEvent;
 
 import javax.swing.AbstractAction;
 
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.file.exceptions.UnsavedException;
+import org.apache.taverna.workbench.edits.EditManager;
+import org.apache.taverna.workbench.file.FileManager;
+import org.apache.taverna.workbench.file.exceptions.UnsavedException;
 
 import org.apache.log4j.Logger;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/NewWorkflowAction.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/NewWorkflowAction.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/NewWorkflowAction.java
index 3b9256a..3497d77 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/NewWorkflowAction.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/NewWorkflowAction.java
@@ -23,14 +23,14 @@ package net.sf.taverna.t2.workbench.file.impl.actions;
 import static java.awt.Toolkit.getDefaultToolkit;
 import static java.awt.event.KeyEvent.VK_N;
 import static javax.swing.KeyStroke.getKeyStroke;
-import static net.sf.taverna.t2.workbench.icons.WorkbenchIcons.newIcon;
+import static org.apache.taverna.workbench.icons.WorkbenchIcons.newIcon;
 
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
 
 import javax.swing.AbstractAction;
 
-import net.sf.taverna.t2.workbench.file.FileManager;
+import org.apache.taverna.workbench.file.FileManager;
 
 import org.apache.log4j.Logger;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenNestedWorkflowAction.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenNestedWorkflowAction.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenNestedWorkflowAction.java
index f647833..91c9caa 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenNestedWorkflowAction.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenNestedWorkflowAction.java
@@ -23,9 +23,9 @@ package net.sf.taverna.t2.workbench.file.impl.actions;
 import java.awt.Component;
 import java.io.File;
 
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.file.FileType;
-import net.sf.taverna.t2.workbench.file.exceptions.OpenException;
+import org.apache.taverna.workbench.file.FileManager;
+import org.apache.taverna.workbench.file.FileType;
+import org.apache.taverna.workbench.file.exceptions.OpenException;
 
 import org.apache.log4j.Logger;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenWorkflowAction.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenWorkflowAction.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenWorkflowAction.java
index e51bb7a..39f0e97 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenWorkflowAction.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenWorkflowAction.java
@@ -34,7 +34,7 @@ import static javax.swing.JOptionPane.showMessageDialog;
 import static javax.swing.JOptionPane.showOptionDialog;
 import static javax.swing.KeyStroke.getKeyStroke;
 import static javax.swing.SwingUtilities.invokeLater;
-import static net.sf.taverna.t2.workbench.icons.WorkbenchIcons.openIcon;
+import static org.apache.taverna.workbench.icons.WorkbenchIcons.openIcon;
 
 import java.awt.Component;
 import java.awt.event.ActionEvent;
@@ -47,9 +47,9 @@ import javax.swing.AbstractAction;
 import javax.swing.JFileChooser;
 import javax.swing.filechooser.FileFilter;
 
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.file.FileType;
-import net.sf.taverna.t2.workbench.file.exceptions.OpenException;
+import org.apache.taverna.workbench.file.FileManager;
+import org.apache.taverna.workbench.file.FileType;
+import org.apache.taverna.workbench.file.exceptions.OpenException;
 import net.sf.taverna.t2.workbench.file.impl.FileTypeFileFilter;
 
 import org.apache.log4j.Logger;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenWorkflowFromURLAction.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenWorkflowFromURLAction.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenWorkflowFromURLAction.java
index 7ae20e9..83efa74 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenWorkflowFromURLAction.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/OpenWorkflowFromURLAction.java
@@ -31,7 +31,7 @@ import static javax.swing.JOptionPane.showInputDialog;
 import static javax.swing.JOptionPane.showMessageDialog;
 import static javax.swing.JOptionPane.showOptionDialog;
 import static javax.swing.KeyStroke.getKeyStroke;
-import static net.sf.taverna.t2.workbench.icons.WorkbenchIcons.openurlIcon;
+import static org.apache.taverna.workbench.icons.WorkbenchIcons.openurlIcon;
 
 import java.awt.Component;
 import java.awt.event.ActionEvent;
@@ -40,7 +40,7 @@ import java.util.prefs.Preferences;
 
 import javax.swing.AbstractAction;
 
-import net.sf.taverna.t2.workbench.file.FileManager;
+import org.apache.taverna.workbench.file.FileManager;
 
 import org.apache.log4j.Logger;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/PasswordInput.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/PasswordInput.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/PasswordInput.java
index 401a232..c4fdc0f 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/PasswordInput.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/PasswordInput.java
@@ -36,7 +36,7 @@ import javax.swing.JLabel;
 import javax.swing.JPasswordField;
 import javax.swing.JTextField;
 
-import net.sf.taverna.t2.workbench.helper.HelpEnabledDialog;
+import org.apache.taverna.workbench.helper.HelpEnabledDialog;
 
 import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Logger;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench/blob/a9a52bd5/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/SaveAllWorkflowsAction.java
----------------------------------------------------------------------
diff --git a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/SaveAllWorkflowsAction.java b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/SaveAllWorkflowsAction.java
index a1e7eef..1bd8a7a 100644
--- a/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/SaveAllWorkflowsAction.java
+++ b/taverna-file-impl/src/main/java/net/sf/taverna/t2/workbench/file/impl/actions/SaveAllWorkflowsAction.java
@@ -25,7 +25,7 @@ import static java.awt.event.InputEvent.SHIFT_DOWN_MASK;
 import static java.awt.event.KeyEvent.VK_A;
 import static java.awt.event.KeyEvent.VK_S;
 import static javax.swing.KeyStroke.getKeyStroke;
-import static net.sf.taverna.t2.workbench.icons.WorkbenchIcons.saveAllIcon;
+import static org.apache.taverna.workbench.icons.WorkbenchIcons.saveAllIcon;
 
 import java.awt.Component;
 import java.awt.event.ActionEvent;
@@ -36,9 +36,9 @@ import javax.swing.AbstractAction;
 
 import org.apache.taverna.lang.observer.Observable;
 import org.apache.taverna.lang.observer.Observer;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.file.events.FileManagerEvent;
+import org.apache.taverna.workbench.edits.EditManager;
+import org.apache.taverna.workbench.file.FileManager;
+import org.apache.taverna.workbench.file.events.FileManagerEvent;
 
 import org.apache.log4j.Logger;