You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by st...@apache.org on 2015/02/17 12:32:21 UTC

[15/50] [abbrv] incubator-taverna-engine git commit: taverna-reference-types

taverna-reference-types


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

Branch: refs/heads/master
Commit: cb77125abad590c7d413fd8453f266327aa70c36
Parents: ef1bf09
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Sat Dec 27 13:23:19 2014 -0600
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Sat Dec 27 13:23:19 2014 -0600

----------------------------------------------------------------------
 .gitignore                                      |  24 --
 .travis.yml                                     |   1 -
 README.md                                       |   5 -
 pom.xml                                         | 100 ---------
 .../impl/external/file/FileReference.java       | 210 ------------------
 .../impl/external/file/FileToFileReference.java |  61 ------
 .../reference/impl/external/file/package.html   |   4 -
 .../impl/external/http/HttpReference.java       | 217 -------------------
 .../impl/external/http/UrlToHttpReference.java  |  62 ------
 .../reference/impl/external/http/package.html   |   3 -
 .../object/BooleanToStringReference.java        |  53 -----
 .../object/ByteArrayToByteArrayReference.java   |  53 -----
 .../object/CharacterToStringReference.java      |  53 -----
 .../object/InlineByteArrayReference.java        |  93 --------
 .../object/InlineByteArrayReferenceBuilder.java |  67 ------
 .../InlineByteToInlineStringTranslator.java     |  51 -----
 .../external/object/InlineStringReference.java  | 133 ------------
 .../object/InlineStringReferenceBuilder.java    |  76 -------
 .../InlineStringToInlineByteTranslator.java     |  40 ----
 .../object/NumberToStringReference.java         |  52 -----
 .../object/StreamToBooleanConverter.java        |  29 ---
 .../object/StreamToByteArrayConverter.java      |  62 ------
 .../object/StreamToDoubleConverter.java         |  29 ---
 .../object/StreamToIntegerConverter.java        |  29 ---
 .../object/StreamToStringConverter.java         |  80 -------
 .../StreamToVMObjectReferenceConverter.java     |  56 -----
 .../object/StringToStringReference.java         |  52 -----
 .../impl/external/object/VMObjectReference.java | 111 ----------
 .../reference/impl/external/object/package.html |   4 -
 ...rna.t2.reference.ExternalReferenceBuilderSPI |   3 -
 ...sf.taverna.t2.reference.ExternalReferenceSPI |   6 -
 ....t2.reference.ExternalReferenceTranslatorSPI |   3 -
 ...verna.t2.reference.StreamToValueConverterSPI |   7 -
 ...na.t2.reference.ValueToReferenceConverterSPI |   8 -
 .../reference-core-extensions-context-osgi.xml  |  33 ---
 .../reference-core-extensions-context.xml       |  31 ---
 .../impl/external/file/FileReference.hbm.xml    |  18 --
 .../impl/external/http/HttpReference.hbm.xml    |  16 --
 .../object/InlineByteArrayReference.hbm.xml     |  16 --
 .../object/InlineStringReference.hbm.xml        |  16 --
 .../external/object/VMObjectReference.hbm.xml   |  16 --
 .../external/object/ByteArrayToStringTest.java  |  91 --------
 taverna-reference-types/README.md               |   5 +
 taverna-reference-types/pom.xml                 | 100 +++++++++
 .../impl/external/file/FileReference.java       | 210 ++++++++++++++++++
 .../impl/external/file/FileToFileReference.java |  61 ++++++
 .../reference/impl/external/file/package.html   |   4 +
 .../impl/external/http/HttpReference.java       | 217 +++++++++++++++++++
 .../impl/external/http/UrlToHttpReference.java  |  62 ++++++
 .../reference/impl/external/http/package.html   |   3 +
 .../object/BooleanToStringReference.java        |  53 +++++
 .../object/ByteArrayToByteArrayReference.java   |  53 +++++
 .../object/CharacterToStringReference.java      |  53 +++++
 .../object/InlineByteArrayReference.java        |  93 ++++++++
 .../object/InlineByteArrayReferenceBuilder.java |  67 ++++++
 .../InlineByteToInlineStringTranslator.java     |  51 +++++
 .../external/object/InlineStringReference.java  | 133 ++++++++++++
 .../object/InlineStringReferenceBuilder.java    |  76 +++++++
 .../InlineStringToInlineByteTranslator.java     |  40 ++++
 .../object/NumberToStringReference.java         |  52 +++++
 .../object/StreamToBooleanConverter.java        |  29 +++
 .../object/StreamToByteArrayConverter.java      |  62 ++++++
 .../object/StreamToDoubleConverter.java         |  29 +++
 .../object/StreamToIntegerConverter.java        |  29 +++
 .../object/StreamToStringConverter.java         |  80 +++++++
 .../StreamToVMObjectReferenceConverter.java     |  56 +++++
 .../object/StringToStringReference.java         |  52 +++++
 .../impl/external/object/VMObjectReference.java | 111 ++++++++++
 .../reference/impl/external/object/package.html |   4 +
 ...rna.t2.reference.ExternalReferenceBuilderSPI |   3 +
 ...sf.taverna.t2.reference.ExternalReferenceSPI |   6 +
 ....t2.reference.ExternalReferenceTranslatorSPI |   3 +
 ...verna.t2.reference.StreamToValueConverterSPI |   7 +
 ...na.t2.reference.ValueToReferenceConverterSPI |   8 +
 .../reference-core-extensions-context-osgi.xml  |  33 +++
 .../reference-core-extensions-context.xml       |  31 +++
 .../impl/external/file/FileReference.hbm.xml    |  18 ++
 .../impl/external/http/HttpReference.hbm.xml    |  16 ++
 .../object/InlineByteArrayReference.hbm.xml     |  16 ++
 .../object/InlineStringReference.hbm.xml        |  16 ++
 .../external/object/VMObjectReference.hbm.xml   |  16 ++
 .../external/object/ByteArrayToStringTest.java  |  91 ++++++++
 82 files changed, 2049 insertions(+), 2074 deletions(-)
----------------------------------------------------------------------


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

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

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
deleted file mode 100644
index faaf57d..0000000
--- a/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Taverna Workflow system Execution Engine data reference management implementation
-
-Implementations of certain SPIs to provide a core set of functionality for the reference management framework. This includes ExternalReference implementations to reference data held in local files and URLs along with the appropriate translate / publish logic. Implementations in this package are tied only to the API, although certain metadata files such as hibernate mappings are also included where appropriate (these will be silently ignored if using a backing store that is not hibernate based)
-
-This code was previously hosted at http://taverna.googlecode.com/svn/taverna/engine/net.sf.taverna.t2.core.reference-core-extensions

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 8539b9d..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>net.sf.taverna</groupId>
-		<artifactId>taverna-parent</artifactId>
-	    <version>3.0.1-SNAPSHOT</version>
-	</parent>
-	<groupId>net.sf.taverna.t2.core</groupId>
-	<artifactId>reference-core-extensions</artifactId>
-	<version>2.0.1-SNAPSHOT</version>
-	<packaging>bundle</packaging>
-	<name>Taverna engine referencetypes</name>
-	<description>
-		Implementations of certain SPIs to provide a core set of
-		functionality for the reference management framework. This
-		includes ExternalReference implementations to reference data
-		held in local files and URLs along with the appropriate
-		translate / publish logic.
-		Implementations in this package are tied only to the API, although
-		certain metadata files such as hibernate mappings are also included
-		where appropriate (these will be silently ignored if using a backing
-		store that is not hibernate based)
-	</description>
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.felix</groupId>
-				<artifactId>maven-bundle-plugin</artifactId>
-				<extensions>true</extensions>
-				<configuration>
-					<instructions>
-						<Export-Package>net.sf.taverna.t2.reference.impl.external.*</Export-Package>
-					</instructions>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
-	<repositories>
-		<repository>
-			<releases />
-			<snapshots>
-				<enabled>false</enabled>
-			</snapshots>
-			<id>mygrid-repository</id>
-			<name>myGrid Repository</name>
-			<url>http://www.mygrid.org.uk/maven/repository</url>
-		</repository>
-		<repository>
-			<releases>
-				<enabled>false</enabled>
-			</releases>
-			<snapshots />
-			<id>mygrid-snapshot-repository</id>
-			<name>myGrid Snapshot Repository</name>
-			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
-		</repository>
-	</repositories>
-	<dependencies>
-		<dependency>
-			<groupId>net.sf.taverna.t2.core</groupId>
-			<artifactId>reference-api</artifactId>
-			<version>${t2.core.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-codec</groupId>
-			<artifactId>commons-codec</artifactId>
-			<version>${commons.codec.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.commons</groupId>
-			<artifactId>com.springsource.org.apache.commons.httpclient</artifactId>
-			<version>${commons.httpclient.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.core</groupId>
-			<artifactId>reference-testhelpers</artifactId>
-			<version>${t2.core.version}</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.core</groupId>
-			<artifactId>reference-impl</artifactId>
-			<version>${t2.core.version}</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.log4j</groupId>
-			<artifactId>com.springsource.org.apache.log4j</artifactId>
-			<version>${log4j.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>${junit.version}</version>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/file/FileReference.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/file/FileReference.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/file/FileReference.java
deleted file mode 100644
index eeca752..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/file/FileReference.java
+++ /dev/null
@@ -1,210 +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.reference.impl.external.file;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.nio.charset.Charset;
-
-import net.sf.taverna.t2.reference.AbstractExternalReference;
-import net.sf.taverna.t2.reference.ExternalReferenceSPI;
-import net.sf.taverna.t2.reference.ReferenceContext;
-import net.sf.taverna.t2.reference.ReferencedDataNature;
-
-/**
- * Implementation of ExternalReference used to refer to data held in a locally
- * accessible file. Inherits from
- * {@link net.sf.taverna.t2.reference.AbstractExternalReference
- * AbstractExternalReference} to enable hibernate based persistence.
- * 
- * @author Tom Oinn
- */
-public class FileReference extends AbstractExternalReference implements
-		ExternalReferenceSPI {
-	private String filePathString = null;
-	private String charset = null;
-	private File file = null;
-	private String dataNatureName = ReferencedDataNature.UNKNOWN.name();
-
-	/**
-	 * Explicitly declare default constructor, will be used by hibernate when
-	 * constructing instances of this bean from the database.
-	 */
-	public FileReference() {
-		super();
-	}
-
-	/**
-	 * Construct a file reference pointed at the specified file and with no
-	 * character set defined.
-	 */
-	public FileReference(File theFile) {
-		super();
-		this.file = theFile.getAbsoluteFile();
-		this.filePathString = this.file.getPath();
-		this.charset = Charset.defaultCharset().name();
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public InputStream openStream(ReferenceContext context) {
-		try {
-			return new FileInputStream(file);
-		} catch (FileNotFoundException e) {
-			throw new RuntimeException(e);
-		}
-	}
-
-	/**
-	 * Setter used by hibernate to set the charset property of the file
-	 * reference
-	 */
-	public void setCharset(String charset) {
-		this.charset = charset;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public String getCharset() {
-		return this.charset;
-	}
-
-	/**
-	 * Setter used by hibernate to set the file path property of the file
-	 * reference
-	 */
-	public void setFilePath(String filePathString) {
-		this.filePathString = filePathString;
-		this.file = new File(filePathString).getAbsoluteFile();
-	}
-
-	/**
-	 * Getter used by hibernate to retrieve the file path string property
-	 */
-	public String getFilePath() {
-		return this.filePathString;
-	}
-
-	/**
-	 * Human readable string form for debugging, should not be regarded as
-	 * stable.
-	 */
-	@Override
-	public String toString() {
-		return "file{" + file.getAbsolutePath() + "}";
-	}
-
-	@Override
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + ((file == null) ? 0 : file.hashCode());
-		return result;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (obj == null)
-			return false;
-		if (getClass() != obj.getClass())
-			return false;
-		final FileReference other = (FileReference) obj;
-		if (file == null) {
-			if (other.file != null)
-				return false;
-		} else if (!file.equals(other.file))
-			return false;
-		return true;
-	}
-
-	@Override
-	public Long getApproximateSizeInBytes() {
-		return new Long(file.length());
-	}
-
-	/**
-	 * @return the dataNature
-	 */
-	@Override
-	public ReferencedDataNature getDataNature() {
-		return Enum.valueOf(ReferencedDataNature.class, getDataNatureName());
-	}
-
-	/**
-	 * @param dataNature
-	 *            the dataNature to set
-	 */
-	public void setDataNature(ReferencedDataNature dataNature) {
-		setDataNatureName(dataNature.name());
-	}
-
-	/**
-	 * @return the file
-	 */
-	public final File getFile() {
-		return file;
-	}
-
-	@Override
-	public float getResolutionCost() {
-		return (float) 100.0;
-	}
-
-	/**
-	 * @return the dataNatureName
-	 */
-	public String getDataNatureName() {
-		return dataNatureName;
-	}
-
-	/**
-	 * @param dataNatureName
-	 *            the dataNatureName to set
-	 */
-	public void setDataNatureName(String dataNatureName) {
-		this.dataNatureName = dataNatureName;
-	}
-
-	public void deleteData() {
-		try {
-			getFile().delete();
-		} catch (SecurityException e) {
-			// TODO
-		}
-	}
-
-	@Override
-	public FileReference clone() {
-		FileReference result = new FileReference();
-		result.setFilePath(this.getFilePath());
-		result.setCharset(this.getCharset());
-		result.setDataNature(this.getDataNature());
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/file/FileToFileReference.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/file/FileToFileReference.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/file/FileToFileReference.java
deleted file mode 100644
index cde79a5..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/file/FileToFileReference.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.reference.impl.external.file;
-
-import java.io.File;
-import java.io.IOException;
-
-import net.sf.taverna.t2.reference.ExternalReferenceSPI;
-import net.sf.taverna.t2.reference.ReferenceContext;
-import net.sf.taverna.t2.reference.ValueToReferenceConversionException;
-import net.sf.taverna.t2.reference.ValueToReferenceConverterSPI;
-
-/**
- * Converts java.lang.File instances to FileReference reference type
- * 
- * @author Tom Oinn
- */
-public class FileToFileReference implements ValueToReferenceConverterSPI {
-	/*
-	 * TODO - should probably do more sophisticated checks such as whether the
-	 * file is a file or directory etc etc, for now just checks whether the
-	 * specified object is a java.io.File
-	 */
-	@Override
-	public boolean canConvert(Object o, ReferenceContext context) {
-		return (o instanceof File);
-	}
-
-	/**
-	 * Return a FileReference
-	 */
-	@Override
-	public ExternalReferenceSPI convert(Object o, ReferenceContext context)
-			throws ValueToReferenceConversionException {
-		FileReference result = new FileReference();
-		try {
-			result.setFilePath(((File) o).getCanonicalPath());
-		} catch (IOException ioe) {
-			throw new ValueToReferenceConversionException(ioe);
-		}
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/file/package.html
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/file/package.html b/src/main/java/net/sf/taverna/t2/reference/impl/external/file/package.html
deleted file mode 100644
index 8be59b3..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/file/package.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<body>
-Support for references to a file on a local (or otherwise mounted)
-filesystem
-</body>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/http/HttpReference.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/http/HttpReference.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/http/HttpReference.java
deleted file mode 100644
index d72eed6..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/http/HttpReference.java
+++ /dev/null
@@ -1,217 +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.reference.impl.external.http;
-
-import static java.lang.System.currentTimeMillis;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Date;
-
-import net.sf.taverna.t2.reference.AbstractExternalReference;
-import net.sf.taverna.t2.reference.DereferenceException;
-import net.sf.taverna.t2.reference.ExternalReferenceSPI;
-import net.sf.taverna.t2.reference.ExternalReferenceValidationException;
-import net.sf.taverna.t2.reference.ReferenceContext;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.methods.HeadMethod;
-
-/**
- * Implementation of ExternalReference used to refer to data held in a locally
- * accessible file. Inherits from
- * {@link net.sf.taverna.t2.reference.AbstractExternalReference
- * AbstractExternalReference} to enable hibernate based persistence.
- * 
- * @author Tom Oinn
- */
-public class HttpReference extends AbstractExternalReference implements
-		ExternalReferenceSPI {
-	private String httpUrlString = null;
-	private URL httpUrl = null;
-	private String charsetName = null;
-	private boolean charsetFetched = false;
-	private transient Long cachedLength;
-	private transient Date cacheTime;
-
-	/**
-	 * Explicitly declare default constructor, will be used by hibernate when
-	 * constructing instances of this bean from the database.
-	 */
-	public HttpReference() {
-		super();
-	}
-
-	/**
-	 * Return the data at the {@link URL} represented by this external reference
-	 */
-	@Override
-	public InputStream openStream(ReferenceContext context)
-			throws DereferenceException {
-		try {
-			return httpUrl.openStream();
-		} catch (IOException e) {
-			throw new DereferenceException(e);
-		}
-	}
-
-	@Override
-	public String getCharset() throws DereferenceException {
-		if (charsetFetched)
-			return charsetName;
-		charsetFetched = true;
-		if (!httpUrl.getProtocol().equals("http")
-				&& !httpUrl.getProtocol().equals("https")) {
-			charsetName = null;
-			return null;
-		}
-		HeadMethod method = new HeadMethod(httpUrl.toExternalForm());
-		HttpClient httpClient = new HttpClient();
-		try {
-			httpClient.executeMethod(method);
-			charsetName = method.getResponseCharSet();
-			return charsetName;
-		} catch (HttpException e) {
-			// throw new DereferenceException(e);
-		} catch (IOException e) {
-			// throw new DereferenceException(e);
-		} finally {
-			method.releaseConnection();
-		}
-		charsetName = null;
-		return null;
-	}
-
-	/**
-	 * Setter used by hibernate to set the file path property of the file
-	 * reference
-	 * 
-	 * @throws ExternalReferenceValidationException
-	 *             if there is some problem parsing the supplied string as a URL
-	 */
-	public void setHttpUrlString(String httpUrlString) {
-		try {
-			this.httpUrlString = httpUrlString;
-			this.httpUrl = new URL(httpUrlString);
-		} catch (MalformedURLException e) {
-			throw new ExternalReferenceValidationException(e);
-		}
-	}
-
-	/**
-	 * Getter used by hibernate to retrieve the file path string property
-	 */
-	public String getHttpUrlString() {
-		return this.httpUrlString;
-	}
-
-	/**
-	 * Human readable string form for debugging, should not be regarded as
-	 * stable.
-	 */
-	@Override
-	public String toString() {
-		return "http{" + httpUrl.toExternalForm() + "}";
-	}
-
-	@Override
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result
-				+ ((httpUrl == null) ? 0 : httpUrl.toExternalForm().hashCode());
-		return result;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (obj == null)
-			return false;
-		if (!(obj instanceof HttpReference))
-			return false;
-		final HttpReference other = (HttpReference) obj;
-		if (httpUrl == null) {
-			if (other.httpUrl != null)
-				return false;
-		} else if (!httpUrl.toExternalForm().equals(
-				other.httpUrl.toExternalForm()))
-			return false;
-		return true;
-	}
-
-	// One minute
-	private static final int CACHE_TIMEOUT = 60000;
-
-	@Override
-	public Long getApproximateSizeInBytes() {
-		long now = currentTimeMillis();
-		if (cachedLength != null && cacheTime != null
-				&& cacheTime.getTime() + CACHE_TIMEOUT > now)
-			return cachedLength;
-		try {
-			HttpURLConnection c = (HttpURLConnection) httpUrl.openConnection();
-			c.setRequestMethod("HEAD");
-			c.connect();
-			String lenString = c.getHeaderField("Content-Length");
-			if (lenString != null && !lenString.isEmpty()) {
-				cachedLength = new Long(lenString);
-				cacheTime = new Date(now);
-				return cachedLength;
-			}
-			// there is no Content-Length field so we cannot know the size
-		} catch (Exception e) {
-			// something went wrong, but we don't care what
-		}
-		cachedLength = null;
-		cacheTime = null;
-		return new Long(-1);
-	}
-
-	/**
-	 * @return the httpUrl
-	 */
-	public final URL getHttpUrl() {
-		return httpUrl;
-	}
-
-	@Override
-	public float getResolutionCost() {
-		return (float) 200.0;
-	}
-
-	public void deleteData() {
-		throw new UnsupportedOperationException(
-				"Cannot delete data referenced by a URL");
-	}
-
-	@Override
-	public HttpReference clone() {
-		HttpReference result = new HttpReference();
-		result.setHttpUrlString(this.getHttpUrlString());
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/http/UrlToHttpReference.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/http/UrlToHttpReference.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/http/UrlToHttpReference.java
deleted file mode 100644
index 67c3fc8..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/http/UrlToHttpReference.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.reference.impl.external.http;
-
-import java.net.URL;
-
-import net.sf.taverna.t2.reference.ExternalReferenceSPI;
-import net.sf.taverna.t2.reference.ReferenceContext;
-import net.sf.taverna.t2.reference.ValueToReferenceConversionException;
-import net.sf.taverna.t2.reference.ValueToReferenceConverterSPI;
-
-/**
- * Convert a URL with http protocol to a HttpReference reference type
- * 
- * @author Tom Oinn
- * 
- */
-public class UrlToHttpReference implements ValueToReferenceConverterSPI {
-	/**
-	 * Can convert if the object is an instance of java.net.URL and the protocol
-	 * is HTTP
-	 */
-	@Override
-	public boolean canConvert(Object o, ReferenceContext context) {
-		if (o instanceof URL) {
-			String protocol = ((URL) o).getProtocol();
-			if (protocol.equalsIgnoreCase("http") || protocol.equals("https"))
-				return true;
-		}
-		return false;
-	}
-
-	/**
-	 * Return a new HttpReference constructed from
-	 * <code>((URL)o).toExternalForm()</code>
-	 */
-	@Override
-	public ExternalReferenceSPI convert(Object o, ReferenceContext context)
-			throws ValueToReferenceConversionException {
-		HttpReference result = new HttpReference();
-		result.setHttpUrlString(((URL) o).toExternalForm());
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/http/package.html
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/http/package.html b/src/main/java/net/sf/taverna/t2/reference/impl/external/http/package.html
deleted file mode 100644
index 49d1d32..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/http/package.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<body>
-Support for references to a URL with the HTTP protocol
-</body>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/BooleanToStringReference.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/BooleanToStringReference.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/BooleanToStringReference.java
deleted file mode 100644
index 77d54fb..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/BooleanToStringReference.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.reference.impl.external.object;
-
-import net.sf.taverna.t2.reference.ExternalReferenceSPI;
-import net.sf.taverna.t2.reference.ReferenceContext;
-import net.sf.taverna.t2.reference.ValueToReferenceConversionException;
-import net.sf.taverna.t2.reference.ValueToReferenceConverterSPI;
-
-/**
- * Convert a java.lang.Boolean to a StringReference.
- * 
- * @author Alan R Williams
- */
-public class BooleanToStringReference implements ValueToReferenceConverterSPI {
-	/**
-	 * Can convert if the object is an instance of java.lang.Boolean
-	 */
-	@Override
-	public boolean canConvert(Object o, ReferenceContext context) {
-		return o instanceof Boolean;
-	}
-
-	/**
-	 * Return a new InlineStringReference wrapping the supplied String
-	 */
-	@Override
-	public ExternalReferenceSPI convert(Object o, ReferenceContext context)
-			throws ValueToReferenceConversionException {
-		InlineStringReference result = new InlineStringReference();
-		String stringValue = ((Boolean) o).toString();
-		result.setContents(stringValue);
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/ByteArrayToByteArrayReference.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/ByteArrayToByteArrayReference.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/ByteArrayToByteArrayReference.java
deleted file mode 100644
index 41e60ea..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/ByteArrayToByteArrayReference.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.reference.impl.external.object;
-
-import net.sf.taverna.t2.reference.ExternalReferenceSPI;
-import net.sf.taverna.t2.reference.ReferenceContext;
-import net.sf.taverna.t2.reference.ValueToReferenceConversionException;
-import net.sf.taverna.t2.reference.ValueToReferenceConverterSPI;
-
-/**
- * Convert a byte[] to a ByteArrayReference
- * 
- * @author Tom Oinn
- */
-public class ByteArrayToByteArrayReference implements
-		ValueToReferenceConverterSPI {
-	/**
-	 * Can convert if the object is an instance of byte[]
-	 */
-	@Override
-	public boolean canConvert(Object o, ReferenceContext context) {
-		return (o instanceof byte[]);
-	}
-
-	/**
-	 * Return a new InlineByteArrayReference wrapping the supplied byte[]
-	 */
-	@Override
-	public ExternalReferenceSPI convert(Object o, ReferenceContext context)
-			throws ValueToReferenceConversionException {
-		InlineByteArrayReference result = new InlineByteArrayReference();
-		result.setValue((byte[]) o);
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/CharacterToStringReference.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/CharacterToStringReference.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/CharacterToStringReference.java
deleted file mode 100644
index c5d6c66..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/CharacterToStringReference.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.reference.impl.external.object;
-
-import net.sf.taverna.t2.reference.ExternalReferenceSPI;
-import net.sf.taverna.t2.reference.ReferenceContext;
-import net.sf.taverna.t2.reference.ValueToReferenceConversionException;
-import net.sf.taverna.t2.reference.ValueToReferenceConverterSPI;
-
-/**
- * Convert a {@link Character} to a StringReference.
- * 
- * @author Alan R Williams
- */
-public class CharacterToStringReference implements ValueToReferenceConverterSPI {
-	/**
-	 * Can convert if the object is an instance of java.lang.Character
-	 */
-	@Override
-	public boolean canConvert(Object o, ReferenceContext context) {
-		return (o instanceof Character);
-	}
-
-	/**
-	 * Return a new {@link InlineStringReference} wrapping the supplied String
-	 */
-	@Override
-	public ExternalReferenceSPI convert(Object o, ReferenceContext context)
-			throws ValueToReferenceConversionException {
-		InlineStringReference result = new InlineStringReference();
-		String stringValue = ((Character) o).toString();
-		result.setContents(stringValue);
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineByteArrayReference.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineByteArrayReference.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineByteArrayReference.java
deleted file mode 100644
index fac9f02..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineByteArrayReference.java
+++ /dev/null
@@ -1,93 +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.reference.impl.external.object;
-
-import static org.apache.commons.codec.binary.Base64.decodeBase64;
-import static org.apache.commons.codec.binary.Base64.encodeBase64;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.nio.charset.Charset;
-
-import net.sf.taverna.t2.reference.AbstractExternalReference;
-import net.sf.taverna.t2.reference.DereferenceException;
-import net.sf.taverna.t2.reference.ReferenceContext;
-import net.sf.taverna.t2.reference.ValueCarryingExternalReference;
-
-/**
- * A reference implementation that inlines an array of bytes. Rather
- * unpleasantly this currently exposes the byte array to Hibernate through a
- * textual value, as Derby allows long textual values but not long binary ones
- * (yuck). As it uses a fixed character set (UTF-8) to store and load I believe
- * this doesn't break things.
- * <p>
- * Unfortunately this does break things (binaries get corrupted) so I've added
- * base64 encoding of the value as a workaround.
- * 
- * @author Tom Oinn
- * @author David Withers
- */
-public class InlineByteArrayReference extends AbstractExternalReference
-		implements ValueCarryingExternalReference<byte[]> {
-	private byte[] bytes = new byte[0];
-
-	public void setValue(byte[] newBytes) {
-		this.bytes = newBytes;
-	}
-
-	@Override
-	public byte[] getValue() {
-		return bytes;
-	}
-
-	@Override
-	public Class<byte[]> getValueType() {
-		return byte[].class;
-	}
-
-	@Override
-	public InputStream openStream(ReferenceContext context)
-			throws DereferenceException {
-		return new ByteArrayInputStream(bytes);
-	}
-
-	private static final Charset charset = Charset.forName("UTF-8");
-
-	public String getContents() {
-		return new String(encodeBase64(bytes), charset);
-	}
-
-	public void setContents(String contentsAsString) {
-		this.bytes = decodeBase64(contentsAsString.getBytes(charset));
-	}
-
-	@Override
-	public Long getApproximateSizeInBytes() {
-		return new Long(bytes.length);
-	}
-
-	@Override
-	public InlineByteArrayReference clone() {
-		InlineByteArrayReference result = new InlineByteArrayReference();
-		result.setValue(this.getValue().clone());
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineByteArrayReferenceBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineByteArrayReferenceBuilder.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineByteArrayReferenceBuilder.java
deleted file mode 100644
index f58f77b..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineByteArrayReferenceBuilder.java
+++ /dev/null
@@ -1,67 +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.reference.impl.external.object;
-
-import static net.sf.taverna.t2.reference.impl.external.object.StreamToByteArrayConverter.readFile;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import net.sf.taverna.t2.reference.ExternalReferenceBuilderSPI;
-import net.sf.taverna.t2.reference.ExternalReferenceConstructionException;
-import net.sf.taverna.t2.reference.ReferenceContext;
-
-/**
- * Build an InlineByteArrayReference from an InputStream
- * 
- * @author Tom Oinn
- * 
- */
-public class InlineByteArrayReferenceBuilder implements
-		ExternalReferenceBuilderSPI<InlineByteArrayReference> {
-	@Override
-	public InlineByteArrayReference createReference(InputStream byteStream,
-			ReferenceContext context) {
-		try {
-			byte[] contents = readFile(byteStream);
-			InlineByteArrayReference ref = new InlineByteArrayReference();
-			ref.setValue(contents);
-			return ref;
-		} catch (IOException e) {
-			throw new ExternalReferenceConstructionException(e);
-		}
-	}
-
-	@Override
-	public float getConstructionCost() {
-		return 0.1f;
-	}
-
-	@Override
-	public Class<InlineByteArrayReference> getReferenceType() {
-		return InlineByteArrayReference.class;
-	}
-
-	@Override
-	public boolean isEnabled(ReferenceContext context) {
-		return true;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineByteToInlineStringTranslator.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineByteToInlineStringTranslator.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineByteToInlineStringTranslator.java
deleted file mode 100644
index b9aa66c..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineByteToInlineStringTranslator.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package net.sf.taverna.t2.reference.impl.external.object;
-
-import java.io.UnsupportedEncodingException;
-
-import net.sf.taverna.t2.reference.ExternalReferenceConstructionException;
-import net.sf.taverna.t2.reference.ExternalReferenceTranslatorSPI;
-import net.sf.taverna.t2.reference.ReferenceContext;
-
-public class InlineByteToInlineStringTranslator
-		implements
-		ExternalReferenceTranslatorSPI<InlineByteArrayReference, InlineStringReference> {
-	@Override
-	public InlineStringReference createReference(
-			InlineByteArrayReference sourceReference, ReferenceContext context) {
-		String contents;
-		try {
-			String charset = sourceReference.getCharset();
-			if (charset == null)
-				// usual fallback:
-				charset = "UTF-8";
-			contents = new String(sourceReference.getValue(), charset);
-		} catch (UnsupportedEncodingException e) {
-			String msg = "Unknown character set "
-					+ sourceReference.getCharset();
-			throw new ExternalReferenceConstructionException(msg, e);
-		}
-		InlineStringReference ref = new InlineStringReference();
-		ref.setContents(contents);
-		return ref;
-	}
-
-	@Override
-	public Class<InlineByteArrayReference> getSourceReferenceType() {
-		return InlineByteArrayReference.class;
-	}
-
-	@Override
-	public Class<InlineStringReference> getTargetReferenceType() {
-		return InlineStringReference.class;
-	}
-
-	@Override
-	public boolean isEnabled(ReferenceContext context) {
-		return true;
-	}
-
-	@Override
-	public float getTranslationCost() {
-		return 0.001f;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineStringReference.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineStringReference.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineStringReference.java
deleted file mode 100644
index cf3de46..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineStringReference.java
+++ /dev/null
@@ -1,133 +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.reference.impl.external.object;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-
-import net.sf.taverna.t2.reference.AbstractExternalReference;
-import net.sf.taverna.t2.reference.DereferenceException;
-import net.sf.taverna.t2.reference.ReferenceContext;
-import net.sf.taverna.t2.reference.ReferencedDataNature;
-import net.sf.taverna.t2.reference.ValueCarryingExternalReference;
-
-/**
- * Contains and references a String value
- * 
- * @author Tom Oinn
- */
-public class InlineStringReference extends AbstractExternalReference implements
-		ValueCarryingExternalReference<String> {
-	/**
-	 * Hold the 'value' of this reference, probably the simplest backing store
-	 * possible for an ExternalReferenceSPI implementation :)
-	 */
-	private String contents;
-	private transient Long length;
-
-	/**
-	 * Set the 'value' of this reference as a string. It's not really a
-	 * reference type in any true sense of the word, but it'll do for testing
-	 * the augmentation system. This method is really here so you can configure
-	 * test beans from spring.
-	 */
-	public void setContents(String contents) {
-		this.contents = contents;
-	}
-
-	/**
-	 * Get the 'value' of this reference as a string, really just returns the
-	 * internal string representation.
-	 */
-	public String getContents() {
-		return this.contents;
-	}
-
-	/**
-	 * Fakes a de-reference operation, returning a byte stream over the string
-	 * data.
-	 */
-	@Override
-	public InputStream openStream(ReferenceContext arg0) {
-		try {
-			return new ByteArrayInputStream(contents.getBytes(getCharset()));
-		} catch (UnsupportedEncodingException e) {
-			throw new DereferenceException(e);
-		}
-	}
-
-	/**
-	 * Default resolution cost of 0.0f whatever the contents
-	 */
-	@Override
-	public float getResolutionCost() {
-		return 0.0f;
-	}
-
-	/**
-	 * Data nature set to 'ReferencedDataNature.TEXT'
-	 */
-	@Override
-	public ReferencedDataNature getDataNature() {
-		return ReferencedDataNature.TEXT;
-	}
-
-	/**
-	 * Character encoding set to 'UTF-8' by default
-	 */
-	@Override
-	public String getCharset() {
-		return "UTF-8";
-	}
-
-	/**
-	 * String representation for testing, returns <code>string{CONTENTS}</code>
-	 */
-	@Override
-	public String toString() {
-		return "string{" + contents + "}";
-	}
-
-	@Override
-	public String getValue() {
-		return getContents();
-	}
-
-	@Override
-	public Class<String> getValueType() {
-		return String.class;
-	}
-
-	@Override
-	public Long getApproximateSizeInBytes() {
-		if (length == null)
-			length = new Long(contents.getBytes().length);
-		return length;
-	}
-
-	@Override
-	public InlineStringReference clone() {
-		InlineStringReference result = new InlineStringReference();
-		result.setContents(this.getContents());
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineStringReferenceBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineStringReferenceBuilder.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineStringReferenceBuilder.java
deleted file mode 100644
index 66c5512..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineStringReferenceBuilder.java
+++ /dev/null
@@ -1,76 +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.reference.impl.external.object;
-
-import static net.sf.taverna.t2.reference.impl.external.object.StreamToStringConverter.readFile;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.nio.charset.Charset;
-
-import net.sf.taverna.t2.reference.ExternalReferenceBuilderSPI;
-import net.sf.taverna.t2.reference.ExternalReferenceConstructionException;
-import net.sf.taverna.t2.reference.ReferenceContext;
-
-/**
- * Build an InlineStringReference from an InputStream
- * 
- * @author Tom Oinn
- */
-public class InlineStringReferenceBuilder implements
-		ExternalReferenceBuilderSPI<InlineStringReference> {
-	private static final Charset UTF8 = Charset.forName("UTF-8");
-	
-	@Override
-	public InlineStringReference createReference(InputStream byteStream,
-			ReferenceContext context) {
-		try {
-			/*
-			 * UTF8 is a slightly saner default than system default for most
-			 * bytestreams
-			 */
-			String contents = readFile(new BufferedReader(
-					new InputStreamReader(byteStream, UTF8)));
-			InlineStringReference ref = new InlineStringReference();
-			ref.setContents(contents);
-			return ref;
-		} catch (IOException e) {
-			throw new ExternalReferenceConstructionException(e);
-		}
-	}
-
-	@Override
-	public float getConstructionCost() {
-		return 0.1f;
-	}
-
-	@Override
-	public Class<InlineStringReference> getReferenceType() {
-		return InlineStringReference.class;
-	}
-
-	@Override
-	public boolean isEnabled(ReferenceContext context) {
-		return true;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineStringToInlineByteTranslator.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineStringToInlineByteTranslator.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineStringToInlineByteTranslator.java
deleted file mode 100644
index e603a93..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/InlineStringToInlineByteTranslator.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package net.sf.taverna.t2.reference.impl.external.object;
-
-import java.nio.charset.Charset;
-
-import net.sf.taverna.t2.reference.ExternalReferenceTranslatorSPI;
-import net.sf.taverna.t2.reference.ReferenceContext;
-
-public class InlineStringToInlineByteTranslator implements
-		ExternalReferenceTranslatorSPI<InlineStringReference, InlineByteArrayReference> {
-	private static final Charset UTF8 = Charset.forName("UTF-8");
-	
-	@Override
-	public InlineByteArrayReference createReference(
-			InlineStringReference sourceReference, ReferenceContext context) {
-		byte[] bytes = sourceReference.getValue().getBytes(UTF8);
-		InlineByteArrayReference ref = new InlineByteArrayReference();
-		ref.setValue(bytes);	
-		return ref;
-	}
-
-	@Override
-	public Class<InlineStringReference> getSourceReferenceType() {
-		return InlineStringReference.class;
-	}
-
-	@Override
-	public Class<InlineByteArrayReference> getTargetReferenceType() {
-		return InlineByteArrayReference.class;
-	}
-
-	@Override
-	public boolean isEnabled(ReferenceContext context) {
-		return true;
-	}
-
-	@Override
-	public float getTranslationCost() {
-		return 0.001f;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/NumberToStringReference.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/NumberToStringReference.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/NumberToStringReference.java
deleted file mode 100644
index 58fbc09..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/NumberToStringReference.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.reference.impl.external.object;
-
-import net.sf.taverna.t2.reference.ExternalReferenceSPI;
-import net.sf.taverna.t2.reference.ReferenceContext;
-import net.sf.taverna.t2.reference.ValueToReferenceConversionException;
-import net.sf.taverna.t2.reference.ValueToReferenceConverterSPI;
-
-/**
- * Convert a java.lang.Number to a StringReference.
- * 
- * @author Alex Nenadic
- */
-public class NumberToStringReference implements ValueToReferenceConverterSPI {
-	/**
-	 * Can convert if the object is an instance of java.lang.Number
-	 */
-	@Override
-	public boolean canConvert(Object o, ReferenceContext context) {
-		return o instanceof Number;
-	}
-
-	/**
-	 * Return a new InlineStringReference wrapping the supplied String
-	 */
-	@Override
-	public ExternalReferenceSPI convert(Object o, ReferenceContext context)
-			throws ValueToReferenceConversionException {
-		InlineStringReference result = new InlineStringReference();
-		result.setContents(o.toString());
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToBooleanConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToBooleanConverter.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToBooleanConverter.java
deleted file mode 100644
index a26f4df..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToBooleanConverter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.reference.impl.external.object;
-
-import java.io.InputStream;
-
-import net.sf.taverna.t2.reference.ReferencedDataNature;
-import net.sf.taverna.t2.reference.StreamToValueConverterSPI;
-
-/**
- * @author alanrw
- */
-public class StreamToBooleanConverter implements
-		StreamToValueConverterSPI<Boolean> {
-	@Override
-	public Class<Boolean> getPojoClass() {
-		return Boolean.class;
-	}
-
-	@Override
-	public Boolean renderFrom(InputStream stream,
-			ReferencedDataNature dataNature, String charset) {
-		StreamToStringConverter stringConverter = new StreamToStringConverter();
-		String s = stringConverter.renderFrom(stream, dataNature, charset);
-		Boolean result = Boolean.valueOf(s.trim());
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToByteArrayConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToByteArrayConverter.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToByteArrayConverter.java
deleted file mode 100644
index e8c3a5a..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToByteArrayConverter.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.reference.impl.external.object;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import net.sf.taverna.t2.reference.ReferencedDataNature;
-import net.sf.taverna.t2.reference.StreamToValueConverterSPI;
-
-/**
- * Build a byte[] from an InputStream
- * 
- * @author Tom Oinn
- */
-public class StreamToByteArrayConverter implements
-		StreamToValueConverterSPI<byte[]> {
-	private static final int CHUNK_SIZE = 4096;
-
-	static byte[] readFile(InputStream reader) throws IOException {
-		ByteArrayOutputStream bos = new ByteArrayOutputStream();
-		byte[] buf = new byte[CHUNK_SIZE];
-		int len;
-		while ((len = reader.read(buf)) > 0)
-			bos.write(buf, 0, len);
-		return bos.toByteArray();
-	}
-
-	@Override
-	public Class<byte[]> getPojoClass() {
-		return byte[].class;
-	}
-
-	@Override
-	public byte[] renderFrom(InputStream stream,
-			ReferencedDataNature dataNature, String charset) {
-		try {
-			return readFile(stream);
-		} catch (IOException e) {
-			throw new RuntimeException(e);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToDoubleConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToDoubleConverter.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToDoubleConverter.java
deleted file mode 100644
index 835c8cd..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToDoubleConverter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.reference.impl.external.object;
-
-import java.io.InputStream;
-
-import net.sf.taverna.t2.reference.ReferencedDataNature;
-import net.sf.taverna.t2.reference.StreamToValueConverterSPI;
-
-/**
- * @author alanrw
- */
-public class StreamToDoubleConverter implements
-		StreamToValueConverterSPI<Double> {
-	@Override
-	public Class<Double> getPojoClass() {
-		return Double.class;
-	}
-
-	@Override
-	public Double renderFrom(InputStream stream,
-			ReferencedDataNature dataNature, String charset) {
-		StreamToStringConverter stringConverter = new StreamToStringConverter();
-		String s = stringConverter.renderFrom(stream, dataNature, charset);
-		Double result = Double.valueOf(s.trim());
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToIntegerConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToIntegerConverter.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToIntegerConverter.java
deleted file mode 100644
index 2a42a24..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToIntegerConverter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 
- */
-package net.sf.taverna.t2.reference.impl.external.object;
-
-import java.io.InputStream;
-
-import net.sf.taverna.t2.reference.ReferencedDataNature;
-import net.sf.taverna.t2.reference.StreamToValueConverterSPI;
-
-/**
- * @author alanrw
- */
-public class StreamToIntegerConverter implements
-		StreamToValueConverterSPI<Integer> {
-	@Override
-	public Class<Integer> getPojoClass() {
-		return Integer.class;
-	}
-
-	@Override
-	public Integer renderFrom(InputStream stream,
-			ReferencedDataNature dataNature, String charset) {
-		StreamToStringConverter stringConverter = new StreamToStringConverter();
-		String s = stringConverter.renderFrom(stream, dataNature, charset);
-		Integer result = Integer.valueOf(s.trim());
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToStringConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToStringConverter.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToStringConverter.java
deleted file mode 100644
index 03edf56..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToStringConverter.java
+++ /dev/null
@@ -1,80 +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.reference.impl.external.object;
-
-import static net.sf.taverna.t2.reference.ReferencedDataNature.TEXT;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.nio.charset.Charset;
-
-import net.sf.taverna.t2.reference.ReferencedDataNature;
-import net.sf.taverna.t2.reference.StreamToValueConverterSPI;
-
-/**
- * Build a String from an InputStream
- * 
- * @author Tom Oinn
- */
-public class StreamToStringConverter implements
-		StreamToValueConverterSPI<String> {
-	private static final int END_OF_FILE = -1;
-	private static final int CHUNK_SIZE = 4096;
-	private static final Charset UTF8 = Charset.forName("UTF-8");
-
-	/**
-	 * Reads a text file and returns a string.
-	 */
-	static String readFile(Reader reader) throws IOException {
-		BufferedReader br = new BufferedReader(reader);
-		StringBuilder buffer = new StringBuilder();
-		char[] chunk = new char[CHUNK_SIZE];
-		int character;
-		while ((character = br.read(chunk)) != END_OF_FILE)
-			buffer.append(chunk, 0, character);
-		return buffer.toString();
-	}
-
-	@Override
-	public Class<String> getPojoClass() {
-		return String.class;
-	}
-
-	@Override
-	public String renderFrom(InputStream stream,
-			ReferencedDataNature dataNature, String charset) {
-		try {
-			if (charset != null && dataNature.equals(TEXT))
-				try {
-					Charset c = Charset.forName(charset);
-					return readFile(new InputStreamReader(stream, c));
-				} catch (IllegalArgumentException e1) {
-					// Ignore; fallback below is good enough
-				}
-			return readFile(new InputStreamReader(stream, UTF8));
-		} catch (IOException e) {
-			throw new RuntimeException(e);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToVMObjectReferenceConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToVMObjectReferenceConverter.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToVMObjectReferenceConverter.java
deleted file mode 100644
index 45cbb5c..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StreamToVMObjectReferenceConverter.java
+++ /dev/null
@@ -1,56 +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.reference.impl.external.object;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-
-import net.sf.taverna.t2.reference.ReferencedDataNature;
-import net.sf.taverna.t2.reference.StreamToValueConverterSPI;
-
-/**
- * Builds a VMObjectReference from an InputStream.
- * 
- * @author Alex Nenadic
- */
-public class StreamToVMObjectReferenceConverter implements
-		StreamToValueConverterSPI<VMObjectReference> {
-	@Override
-	public Class<VMObjectReference> getPojoClass() {
-		return VMObjectReference.class;
-	}
-
-	@Override
-	public VMObjectReference renderFrom(InputStream stream,
-			ReferencedDataNature dataNature, String charset) {
-		VMObjectReference vmRef = new VMObjectReference();
-		try {
-			ObjectInputStream in = new ObjectInputStream(stream);
-			vmRef = (VMObjectReference) in.readObject();
-			return vmRef;
-		} catch (IOException e) {
-			throw new RuntimeException(e);
-		} catch (ClassNotFoundException e) {
-			throw new RuntimeException(e);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StringToStringReference.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StringToStringReference.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StringToStringReference.java
deleted file mode 100644
index 55b0573..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/StringToStringReference.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.reference.impl.external.object;
-
-import net.sf.taverna.t2.reference.ExternalReferenceSPI;
-import net.sf.taverna.t2.reference.ReferenceContext;
-import net.sf.taverna.t2.reference.ValueToReferenceConversionException;
-import net.sf.taverna.t2.reference.ValueToReferenceConverterSPI;
-
-/**
- * Convert a String to a StringReference
- * 
- * @author Tom Oinn
- */
-public class StringToStringReference implements ValueToReferenceConverterSPI {
-	/**
-	 * Can convert if the object is an instance of java.lang.String
-	 */
-	@Override
-	public boolean canConvert(Object o, ReferenceContext context) {
-		return o instanceof String;
-	}
-
-	/**
-	 * Return a new InlineStringReference wrapping the supplied String
-	 */
-	@Override
-	public ExternalReferenceSPI convert(Object o, ReferenceContext context)
-			throws ValueToReferenceConversionException {
-		InlineStringReference result = new InlineStringReference();
-		result.setContents((String) o);
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/VMObjectReference.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/VMObjectReference.java b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/VMObjectReference.java
deleted file mode 100644
index 18b66f2..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/VMObjectReference.java
+++ /dev/null
@@ -1,111 +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.reference.impl.external.object;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.Serializable;
-import java.nio.charset.Charset;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import net.sf.taverna.t2.reference.AbstractExternalReference;
-import net.sf.taverna.t2.reference.ExternalReferenceSPI;
-import net.sf.taverna.t2.reference.ReferenceContext;
-
-/**
- * Implementation of ExternalReferenceSPI used to refer to objects in the local
- * virtual machine.
- * 
- * @author Stian Soiland-Reyes
- * @author Alex Nenadic
- */
-public class VMObjectReference extends AbstractExternalReference implements
-		ExternalReferenceSPI, Serializable {
-	private static final long serialVersionUID = 6708284419760319684L;
-	private static final Charset UTF8 = Charset.forName("UTF-8");
-
-	/**
-	 * Mapping from objects to their UUIDs.
-	 */
-	private static Map<Object, UUID> objectToUUID = new HashMap<>();
-	/**
-	 * Mapping from UUIDs to objects.
-	 */
-	private static Map<UUID, Object> uuidToObject = new HashMap<>();
-
-	/**
-	 * Unique reference to the object.
-	 */
-	private String uuid;
-
-	@Override
-	public InputStream openStream(ReferenceContext context) {
-		return new ByteArrayInputStream(getObject().toString().getBytes(UTF8));
-	}
-
-	/**
-	 * Getter used by hibernate to retrieve the object uuid property.
-	 */
-	public String getUuid() {
-		return uuid;
-	}
-
-	/**
-	 * Setter used by hibernate to set the object uuid property.
-	 */
-	public void setUuid(String id) {
-		if (uuid != null)
-			throw new IllegalStateException("Can't set UUID of an object twice");
-		this.uuid = id;
-	}
-
-	public void setObject(Object object) {
-		if (uuid != null)
-			throw new IllegalStateException("Can't set UUID an object twice");
-		UUID knownUUID = objectToUUID.get(object);
-		if (knownUUID == null) {
-			// register object
-			knownUUID = UUID.randomUUID();
-			objectToUUID.put(object, knownUUID);
-			uuidToObject.put(knownUUID, object);
-		}
-		setUuid(knownUUID.toString());
-	}
-
-	public Object getObject() {
-		return uuidToObject.get(UUID.fromString(uuid));
-	}
-
-	@Override
-	public Long getApproximateSizeInBytes() {
-		// We do not know the object size
-		return new Long(-1);
-	}
-
-	@Override
-	public VMObjectReference clone() {
-		VMObjectReference result = new VMObjectReference();
-		result.setUuid(this.getUuid());
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/package.html
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/package.html b/src/main/java/net/sf/taverna/t2/reference/impl/external/object/package.html
deleted file mode 100644
index b5b3b72..0000000
--- a/src/main/java/net/sf/taverna/t2/reference/impl/external/object/package.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<body>
-Support for representation of inlined objects as references. Replaces
-the old Literal support
-</body>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ExternalReferenceBuilderSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ExternalReferenceBuilderSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ExternalReferenceBuilderSPI
deleted file mode 100644
index b90bb55..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ExternalReferenceBuilderSPI
+++ /dev/null
@@ -1,3 +0,0 @@
-# Implementation classes of ExternalReferenceBuilderSPI go here, one per line
-net.sf.taverna.t2.reference.impl.external.object.InlineStringReferenceBuilder
-net.sf.taverna.t2.reference.impl.external.object.InlineByteArrayReferenceBuilder
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ExternalReferenceSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ExternalReferenceSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ExternalReferenceSPI
deleted file mode 100644
index d4ad547..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ExternalReferenceSPI
+++ /dev/null
@@ -1,6 +0,0 @@
-# Implementation classes of ExternalReferenceSPI go here, one per line
-net.sf.taverna.t2.reference.impl.external.file.FileReference
-net.sf.taverna.t2.reference.impl.external.http.HttpReference
-net.sf.taverna.t2.reference.impl.external.object.InlineStringReference
-net.sf.taverna.t2.reference.impl.external.object.InlineByteArrayReference
-net.sf.taverna.t2.reference.impl.external.object.VMObjectReference
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ExternalReferenceTranslatorSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ExternalReferenceTranslatorSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ExternalReferenceTranslatorSPI
deleted file mode 100644
index a5547db..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ExternalReferenceTranslatorSPI
+++ /dev/null
@@ -1,3 +0,0 @@
-# Implementation classes of ExternalReferenceTranslatorSPI go here, one per line
-net.sf.taverna.t2.reference.impl.external.object.InlineByteToInlineStringTranslator
-net.sf.taverna.t2.reference.impl.external.object.InlineStringToInlineByteTranslator

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.StreamToValueConverterSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.StreamToValueConverterSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.StreamToValueConverterSPI
deleted file mode 100644
index a433461..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.StreamToValueConverterSPI
+++ /dev/null
@@ -1,7 +0,0 @@
-# Implementation classes of StreamToValueConverterSPI go here, one per line
-net.sf.taverna.t2.reference.impl.external.object.StreamToStringConverter
-net.sf.taverna.t2.reference.impl.external.object.StreamToByteArrayConverter
-net.sf.taverna.t2.reference.impl.external.object.StreamToVMObjectReferenceConverter
-net.sf.taverna.t2.reference.impl.external.object.StreamToDoubleConverter
-net.sf.taverna.t2.reference.impl.external.object.StreamToBooleanConverter
-net.sf.taverna.t2.reference.impl.external.object.StreamToIntegerConverter

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/cb77125a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ValueToReferenceConverterSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ValueToReferenceConverterSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ValueToReferenceConverterSPI
deleted file mode 100644
index e1c3593..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.reference.ValueToReferenceConverterSPI
+++ /dev/null
@@ -1,8 +0,0 @@
-# Implementation classes of ValueToReferenceConverterSPI go here, one per line
-net.sf.taverna.t2.reference.impl.external.file.FileToFileReference
-net.sf.taverna.t2.reference.impl.external.http.UrlToHttpReference
-net.sf.taverna.t2.reference.impl.external.object.StringToStringReference
-net.sf.taverna.t2.reference.impl.external.object.ByteArrayToByteArrayReference
-net.sf.taverna.t2.reference.impl.external.object.NumberToStringReference
-net.sf.taverna.t2.reference.impl.external.object.CharacterToStringReference
-net.sf.taverna.t2.reference.impl.external.object.BooleanToStringReference