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/23 11:05:20 UTC
[35/79] [partial] incubator-taverna-language git commit: Revert
"temporarily empty repository"
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-robundle/src/test/resources/combine/DirectoryMadness.omex
----------------------------------------------------------------------
diff --git a/taverna-robundle/src/test/resources/combine/DirectoryMadness.omex b/taverna-robundle/src/test/resources/combine/DirectoryMadness.omex
new file mode 100644
index 0000000..4721646
Binary files /dev/null and b/taverna-robundle/src/test/resources/combine/DirectoryMadness.omex differ
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-robundle/src/test/resources/combine/DirectoryMadnessZipped.omex
----------------------------------------------------------------------
diff --git a/taverna-robundle/src/test/resources/combine/DirectoryMadnessZipped.omex b/taverna-robundle/src/test/resources/combine/DirectoryMadnessZipped.omex
new file mode 100644
index 0000000..3fff30c
Binary files /dev/null and b/taverna-robundle/src/test/resources/combine/DirectoryMadnessZipped.omex differ
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-robundle/src/test/resources/combine/aslanidi_purkinje_model_2009.zip
----------------------------------------------------------------------
diff --git a/taverna-robundle/src/test/resources/combine/aslanidi_purkinje_model_2009.zip b/taverna-robundle/src/test/resources/combine/aslanidi_purkinje_model_2009.zip
new file mode 100644
index 0000000..0ccb776
Binary files /dev/null and b/taverna-robundle/src/test/resources/combine/aslanidi_purkinje_model_2009.zip differ
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-robundle/src/test/resources/document.odt
----------------------------------------------------------------------
diff --git a/taverna-robundle/src/test/resources/document.odt b/taverna-robundle/src/test/resources/document.odt
new file mode 100644
index 0000000..6dc7126
Binary files /dev/null and b/taverna-robundle/src/test/resources/document.odt differ
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-robundle/src/test/resources/helloworld.wfbundle
----------------------------------------------------------------------
diff --git a/taverna-robundle/src/test/resources/helloworld.wfbundle b/taverna-robundle/src/test/resources/helloworld.wfbundle
new file mode 100644
index 0000000..ed4cd76
Binary files /dev/null and b/taverna-robundle/src/test/resources/helloworld.wfbundle differ
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-robundle/src/test/resources/manifest.json
----------------------------------------------------------------------
diff --git a/taverna-robundle/src/test/resources/manifest.json b/taverna-robundle/src/test/resources/manifest.json
new file mode 100644
index 0000000..65b57b0
--- /dev/null
+++ b/taverna-robundle/src/test/resources/manifest.json
@@ -0,0 +1,40 @@
+{
+ "@context": [
+ "https://w3id.org/bundle/context"
+ ],
+ "id": "/",
+ "manifest": "manifest.json",
+ "createdOn": "2013-03-05T17:29:03Z",
+ "createdBy": {
+ "uri": "http://example.com/foaf#alice",
+ "orcid": "http://orcid.org/0000-0002-1825-0097",
+ "name": "Alice W. Land" },
+ "history": "evolution.ttl",
+ "aggregates": [
+ { "uri": "/folder/soup.jpeg" },
+ { "uri": "http://example.com/blog/" },
+ { "uri": "/README.txt",
+ "mediatype": "text/plain",
+ "createdBy": {
+ "uri": "http://example.com/foaf#bob",
+ "name": "Bob Builder" },
+ "createdOn": "2013-02-12T19:37:32.939Z" },
+ { "uri": "http://example.com/comments.txt",
+ "bundledAs": {
+ "uri": "urn:uuid:a0cf8616-bee4-4a71-b21e-c60e6499a644",
+ "folder": "/folder/",
+ "filename": "external.txt" }
+ }
+ ],
+ "annotations": [
+ { "uri": "urn:uuid:d67466b4-3aeb-4855-8203-90febe71abdf",
+ "about": "/folder/soup.jpeg",
+ "content": "annotations/soup-properties.ttl" },
+
+ { "about": "urn:uuid:a0cf8616-bee4-4a71-b21e-c60e6499a644",
+ "content": "http://example.com/blog/they-aggregated-our-file" },
+
+ { "about": [ "/", "urn:uuid:d67466b4-3aeb-4855-8203-90febe71abdf" ],
+ "content": "annotations/a-meta-annotation-in-this-ro.txt" }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-robundle/src/test/resources/motifAnalysis.zip
----------------------------------------------------------------------
diff --git a/taverna-robundle/src/test/resources/motifAnalysis.zip b/taverna-robundle/src/test/resources/motifAnalysis.zip
new file mode 100644
index 0000000..66b59f2
Binary files /dev/null and b/taverna-robundle/src/test/resources/motifAnalysis.zip differ
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-robundle/src/test/resources/win8.url
----------------------------------------------------------------------
diff --git a/taverna-robundle/src/test/resources/win8.url b/taverna-robundle/src/test/resources/win8.url
new file mode 100644
index 0000000..4fbc727
--- /dev/null
+++ b/taverna-robundle/src/test/resources/win8.url
@@ -0,0 +1,5 @@
+[{000214A0-0000-0000-C000-000000000046}]
+Prop3=19,2
+[InternetShortcut]
+IDList=
+URL=http://example.com/made-in-windows-8
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-robundle/src/test/resources/workflowrun.bundle.zip
----------------------------------------------------------------------
diff --git a/taverna-robundle/src/test/resources/workflowrun.bundle.zip b/taverna-robundle/src/test/resources/workflowrun.bundle.zip
new file mode 100644
index 0000000..00b4aec
Binary files /dev/null and b/taverna-robundle/src/test/resources/workflowrun.bundle.zip differ
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-scufl2-annotation/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-scufl2-annotation/pom.xml b/taverna-scufl2-annotation/pom.xml
new file mode 100644
index 0000000..5e25ff0
--- /dev/null
+++ b/taverna-scufl2-annotation/pom.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.taverna.language</groupId>
+ <artifactId>taverna-language</artifactId>
+ <version>0.16.1-incubating-SNAPSHOT</version>
+ </parent>
+ <artifactId>taverna-scufl2-annotation</artifactId>
+ <name>Apache Taverna Scufl 2 annotations</name>
+ <description>Convenience methods for working with SCUFL2 annotations</description>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>taverna-scufl2-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>taverna-scufl2-t2flow</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-arq</artifactId>
+ <version>${jena.version}</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.7</source>
+ <target>1.7</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ </plugin>
+
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-scufl2-annotation/src/main/java/org/apache/taverna/scufl2/annotation/AnnotationTools.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-annotation/src/main/java/org/apache/taverna/scufl2/annotation/AnnotationTools.java b/taverna-scufl2-annotation/src/main/java/org/apache/taverna/scufl2/annotation/AnnotationTools.java
new file mode 100644
index 0000000..ef169c3
--- /dev/null
+++ b/taverna-scufl2-annotation/src/main/java/org/apache/taverna/scufl2/annotation/AnnotationTools.java
@@ -0,0 +1,208 @@
+package org.apache.taverna.scufl2.annotation;
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.Iterator;
+import java.util.logging.Logger;
+
+import org.apache.jena.riot.Lang;
+import org.apache.jena.riot.RDFDataMgr;
+import org.apache.jena.riot.RDFLanguages;
+import org.apache.taverna.scufl2.api.annotation.Annotation;
+import org.apache.taverna.scufl2.api.common.Child;
+import org.apache.taverna.scufl2.api.common.Scufl2Tools;
+import org.apache.taverna.scufl2.api.common.URITools;
+import org.apache.taverna.scufl2.api.container.WorkflowBundle;
+import org.apache.taverna.scufl2.ucfpackage.UCFPackage.ResourceEntry;
+
+
+import com.hp.hpl.jena.graph.Node;
+import com.hp.hpl.jena.graph.NodeFactory;
+import com.hp.hpl.jena.query.Dataset;
+import com.hp.hpl.jena.query.DatasetFactory;
+import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.ModelFactory;
+import com.hp.hpl.jena.sparql.core.Quad;
+
+public class AnnotationTools {
+ private static final String EXAMPLE_DATA_PREDICATE = "http://biocatalogue.org/attribute/exampleData";
+ public static final URI EXAMPLE_DATA = URI.create(EXAMPLE_DATA_PREDICATE);
+ private static final String TITLE_PREDICATE = "http://purl.org/dc/terms/title";
+ public static final URI TITLE = URI.create(TITLE_PREDICATE);
+ private static final String DESCRIPTION_PREDICATE = "http://purl.org/dc/terms/description";
+ public static final URI DESCRIPTION = URI.create(DESCRIPTION_PREDICATE);
+ private static final String CREATOR_PREDICATE = "http://purl.org/dc/elements/1.1/creator";
+ public static final URI CREATOR = URI.create(CREATOR_PREDICATE);
+
+ private static Logger logger = Logger.getLogger(AnnotationTools.class
+ .getCanonicalName());
+
+ private Scufl2Tools scufl2Tools = new Scufl2Tools();
+ private URITools uritools = new URITools();
+
+ public Dataset annotationDatasetFor(Child<?> workflowBean) {
+ Dataset dataset = DatasetFactory.createMem();
+ for (Annotation ann : scufl2Tools.annotationsFor(workflowBean)) {
+ WorkflowBundle bundle = ann.getParent();
+ URI annUri = uritools.uriForBean(ann);
+ String bodyUri = bundle.getGlobalBaseURI().resolve(ann.getBody())
+ .toASCIIString();
+
+ if (ann.getBody().isAbsolute()) {
+ logger.info("Skipping absolute annotation body URI: "
+ + ann.getBody());
+ // TODO: Optional loading of external annotation bodies
+ continue;
+ }
+ String path = ann.getBody().getPath();
+
+ ResourceEntry resourceEntry = bundle.getResources()
+ .getResourceEntry(path);
+ if (resourceEntry == null) {
+ logger.warning("Can't find annotation body: " + path);
+ continue;
+ }
+ String contentType = resourceEntry.getMediaType();
+ Lang lang = RDFLanguages.contentTypeToLang(contentType);
+ if (lang == null) {
+ lang = RDFLanguages.filenameToLang(path);
+ }
+ if (lang == null) {
+ logger.warning("Can't find media type of annotation body: "
+ + ann.getBody());
+ continue;
+ }
+ Model model = ModelFactory.createDefaultModel();
+ try (InputStream inStream = bundle.getResources()
+ .getResourceAsInputStream(path)) {
+ RDFDataMgr.read(model, inStream, bodyUri, lang);
+ } catch (IOException e) {
+ logger.warning("Can't read annotation body: " + path);
+ continue;
+ }
+ dataset.addNamedModel(annUri.toString(), model);
+ }
+
+ return dataset;
+ }
+
+ public String getTitle(Child<?> workflowBean) {
+ return getLiteral(workflowBean, TITLE_PREDICATE);
+ }
+
+ private String getLiteral(Child<?> workflowBean, String propertyUri) {
+ Dataset annotations = annotationDatasetFor(workflowBean);
+ URI beanUri = uritools.uriForBean(workflowBean);
+ Node subject = NodeFactory.createURI(beanUri.toString());
+ Node property = NodeFactory.createURI(propertyUri);
+
+ Iterator<Quad> found = annotations.asDatasetGraph().find(null, subject,
+ property, null);
+ if (!found.hasNext()) {
+ return null;
+ }
+ return found.next().getObject().toString(false);
+ }
+
+ public String getCreator(Child<?> workflowBean) {
+ return getLiteral(workflowBean, CREATOR_PREDICATE);
+ }
+
+ public String getExampleValue(Child<?> workflowBean) {
+ return getLiteral(workflowBean, EXAMPLE_DATA_PREDICATE);
+ }
+
+ public String getDescription(Child<?> workflowBean) {
+ return getLiteral(workflowBean, DESCRIPTION_PREDICATE);
+ }
+
+ /**
+ * Create a new annotation attached to the given
+ * @param workflowBundle
+ * @param subject
+ * @param predicate
+ * @param value
+ * @return
+ * @throws IOException
+ */
+ public Annotation createNewAnnotation(WorkflowBundle workflowBundle,
+ Child<?> subject, URI predicate, String value) throws IOException {
+ Object parent = subject.getParent();
+ while (parent instanceof Child)
+ parent = ((Child<?>) parent).getParent();
+ if (parent != workflowBundle)
+ throw new IllegalStateException(
+ "annotations can only be added to bundles that their subjects are already a member of");
+ if (predicate == null)
+ throw new IllegalArgumentException(
+ "annotation predicate must be non-null");
+ if (value == null)
+ throw new IllegalArgumentException(
+ "annotation value must be non-null");
+
+ // Add the annotation
+ Annotation annotation = new Annotation();
+ Calendar now = new GregorianCalendar();
+ annotation.setParent(workflowBundle);
+
+ String path = "annotation/" + annotation.getName() + ".ttl";
+ URI bodyURI = URI.create(path);
+
+ annotation.setTarget(subject);
+ annotation.setAnnotatedAt(now);
+ // annotation.setAnnotator();//FIXME
+ annotation.setSerializedAt(now);
+ URI annotatedSubject = uritools.relativeUriForBean(subject, annotation);
+ StringBuilder turtle = new StringBuilder();
+ turtle.append("<");
+ turtle.append(annotatedSubject.toASCIIString());
+ turtle.append("> ");
+
+ turtle.append("<");
+ turtle.append(predicate.toASCIIString());
+ turtle.append("> ");
+
+ // A potentially multi-line string
+ turtle.append("\"\"\"");
+ // Escape existing \ to \\
+ String escaped = value.replace("\\", "\\\\");
+ // Escape existing " to \" (beware Java's escaping of \ and " below)
+ escaped = escaped.replace("\"", "\\\"");
+ turtle.append(escaped);
+ turtle.append("\"\"\"");
+ turtle.append(" .");
+ try {
+ workflowBundle.getResources().addResource(turtle.toString(), path,
+ "text/turtle");
+ } catch (IOException e) {
+ workflowBundle.getAnnotations().remove(annotation);
+ throw e;
+ }
+ annotation.setBody(bodyURI);
+ return annotation;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-scufl2-annotation/src/test/java/org/apache/taverna/scufl2/annotation/TestAnnotationTools.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-annotation/src/test/java/org/apache/taverna/scufl2/annotation/TestAnnotationTools.java b/taverna-scufl2-annotation/src/test/java/org/apache/taverna/scufl2/annotation/TestAnnotationTools.java
new file mode 100644
index 0000000..ef5dd94
--- /dev/null
+++ b/taverna-scufl2-annotation/src/test/java/org/apache/taverna/scufl2/annotation/TestAnnotationTools.java
@@ -0,0 +1,111 @@
+package org.apache.taverna.scufl2.annotation;
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.apache.taverna.scufl2.annotation.AnnotationTools;
+import org.apache.taverna.scufl2.api.container.WorkflowBundle;
+import org.apache.taverna.scufl2.api.io.ReaderException;
+import org.apache.taverna.scufl2.api.io.WorkflowBundleIO;
+import org.apache.taverna.scufl2.api.port.InputWorkflowPort;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.hp.hpl.jena.query.Dataset;
+import com.hp.hpl.jena.query.QueryExecutionFactory;
+import com.hp.hpl.jena.query.QuerySolution;
+import com.hp.hpl.jena.query.ResultSet;
+
+
+public class TestAnnotationTools {
+
+ WorkflowBundleIO bundleIO = new WorkflowBundleIO();
+ WorkflowBundle helloanyone;
+ AnnotationTools annotations = new AnnotationTools();
+ private WorkflowBundle component;
+
+ @Before
+ public void loadHelloAnyone() throws ReaderException, IOException {
+ URL url = getClass().getResource("/helloanyone.t2flow");
+ assertNotNull(url);
+ helloanyone = bundleIO.readBundle(url, null);
+ }
+
+ @Before
+ public void loadComponent() throws ReaderException, IOException {
+ URL url = getClass().getResource("/valid_component_imagemagickconvert.t2flow");
+ assertNotNull(url);
+ component = bundleIO.readBundle(url, null);
+ }
+
+
+ @Test
+ public void getTitle() {
+ assertEquals("Hello Anyone", annotations.getTitle(helloanyone.getMainWorkflow()));
+ }
+
+ @Test
+ public void getCreator() {
+ assertEquals("Stian Soiland-Reyes", annotations.getCreator(helloanyone.getMainWorkflow()));
+ }
+
+
+ @Test
+ public void getDescription() {
+ InputWorkflowPort name = helloanyone.getMainWorkflow().getInputPorts().getByName("name");
+ String desc = annotations.getDescription(name);
+ assertEquals("Your name for the greeting", desc);
+ }
+
+ @Test
+ public void getExample() throws Exception {
+ InputWorkflowPort name = helloanyone.getMainWorkflow().getInputPorts().getByName("name");
+ String example = annotations.getExampleValue(name);
+ assertEquals("World!", example);
+ }
+
+ @Test
+ public void componentStuff() throws Exception {
+ Dataset dataset = annotations.annotationDatasetFor(component.getMainWorkflow());
+ String query = "PREFIX comp: <http://purl.org/DP/components#> "
+ + "SELECT ?fits ?from ?to WHERE { "
+ + " GRAPH ?any { "
+ + "?w comp:fits ?fits ; "
+ + " comp:migrates ?path . "
+ + "?path comp:fromMimetype ?from ; "
+ + " comp:toMimetype ?to . "
+ + " }"
+ + "}";
+
+ ResultSet select = QueryExecutionFactory.create(query, dataset).execSelect();
+ assertTrue(select.hasNext());
+ QuerySolution solution = select.next();
+ assertEquals("image/tiff", solution.getLiteral("from").toString());
+ assertEquals("image/tiff", solution.getLiteral("to").toString());
+ assertEquals("MigrationAction", solution.getResource("fits").getLocalName());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-scufl2-annotation/src/test/resources/helloanyone.t2flow
----------------------------------------------------------------------
diff --git a/taverna-scufl2-annotation/src/test/resources/helloanyone.t2flow b/taverna-scufl2-annotation/src/test/resources/helloanyone.t2flow
new file mode 100644
index 0000000..9fb9f52
--- /dev/null
+++ b/taverna-scufl2-annotation/src/test/resources/helloanyone.t2flow
@@ -0,0 +1,195 @@
+<workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-2.2.0"><dataflow id="01348671-5aaa-4cc2-84cc-477329b70b0d" role="top"><name>Hello_Anyone</name><inputPorts><port><name>name</name><depth>0</depth><granularDepth>0</granularDepth><annotations><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.ExampleValue">
+ <text>World!</text>
+ </annotationBean>
+ <date>2012-01-03 15:13:04.106 GMT</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
+ <text>Your name for the greeting</text>
+ </annotationBean>
+ <date>2012-01-03 15:13:12.530 GMT</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain></annotations></port></inputPorts><outputPorts><port><name>greeting</name><annotations /></port></outputPorts><processors><processor><name>hello</name><inputPorts /><outputPorts><port><name>value</name><depth>0</depth><granularDepth>0</granularDepth></port></outputPorts><annotations /><activities><activity><raven><group>net.sf.taverna.t2.activities</group><artifact>stringconstant-activity</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.activities.stringconstant.StringConstantActivity</class><inputMap /><outputMap><map from="value" to="value" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.stringconstant.StringConstantConfigurationBean xmlns="">
+ <value>Hello, </value>
+</net.sf.taverna.t2.activities.stringconstant.StringConstantConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns="">
+ <maxJobs>1</maxJobs>
+</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig xmlns="
">
+ <backoffFactor>1.0</backoffFactor>
+ <initialDelay>1000</initialDelay>
+ <maxDelay>5000</maxDelay>
+ <maxRetries>0</maxRetries>
+</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy /></iteration></iterationStrategyStack></processor><processor><name>Concatenate_two_strings</name><inputPorts><port><name>string1</name><depth>0</depth></port><port><name>string2</name><depth>0</depth></port></inputPorts><outputPorts><port><name>output</name><depth>0</depth><granularDepth>0</granularDepth></port></outputPorts><annotations /><activities><activity><raven><group>net.sf.taverna.t2.activities</group><artifact>localworker-activity</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivi
ty</class><inputMap><map from="string2" to="string2" /><map from="string1" to="string1" /></inputMap><outputMap><map from="output" to="output" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns="">
+ <localworkerName>org.embl.ebi.escience.scuflworkers.java.StringConcat</localworkerName>
+ <script>output = string1 + string2;</script>
+ <dependencies />
+ <classLoaderSharing>workflow</classLoaderSharing>
+ <localDependencies />
+ <artifactDependencies />
+ <inputs>
+ <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+ <handledReferenceSchemes />
+ <translatedElementType>java.lang.String</translatedElementType>
+ <allowsLiteralValues>true</allowsLiteralValues>
+ <name>string1</name>
+ <depth>0</depth>
+ <mimeTypes>
+ <string>'text/plain'</string>
+ </mimeTypes>
+ </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+ <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+ <handledReferenceSchemes />
+ <translatedElementType>java.lang.String</translatedElementType>
+ <allowsLiteralValues>true</allowsLiteralValues>
+ <name>string2</name>
+ <depth>0</depth>
+ <mimeTypes>
+ <string>'text/plain'</string>
+ </mimeTypes>
+ </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+ </inputs>
+ <outputs>
+ <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+ <granularDepth>0</granularDepth>
+ <name>output</name>
+ <depth>0</depth>
+ <mimeTypes>
+ <string>'text/plain'</string>
+ </mimeTypes>
+ </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+ </outputs>
+</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns="">
+ <maxJobs>1</maxJobs>
+</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig xmlns="
">
+ <backoffFactor>1.0</backoffFactor>
+ <initialDelay>1000</initialDelay>
+ <maxDelay>5000</maxDelay>
+ <maxRetries>0</maxRetries>
+</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy><cross><port name="string1" depth="0" /><port name="string2" depth="0" /></cross></strategy></iteration></iterationStrategyStack></processor></processors><conditions /><datalinks><datalink><sink type="processor"><processor>Concatenate_two_strings</processor><port>string1</port></sink><source type="processor"><processor>hello</processor><port>value</port></source></datalink><datalink><sink type="processor"><processor>Concatenate_two_strings</processor><port>string2</port></sink><source type="dataflow"><port>name</port></source></datalink><datalin
k><sink type="dataflow"><port>greeting</port></sink><source type="processor"><processor>Concatenate_two_strings</processor><port>output</port></source></datalink></datalinks><annotations><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+ <identification>8781d5f4-d0ba-48a8-a1d1-14281bd8a917</identification>
+ </annotationBean>
+ <date>2012-01-03 15:12:21.684 GMT</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+ <identification>ca7dba1d-1fdf-476f-b911-714d09227d70</identification>
+ </annotationBean>
+ <date>2012-01-03 15:14:18.734 GMT</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.Author">
+ <text>Stian Soiland-Reyes</text>
+ </annotationBean>
+ <date>2012-01-03 15:10:48.73 GMT</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.DescriptiveTitle">
+ <text>Hello Anyone</text>
+ </annotationBean>
+ <date>2012-01-03 15:14:25.703 GMT</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.DescriptiveTitle">
+ <text>Hello World</text>
+ </annotationBean>
+ <date>2012-01-03 15:10:54.167 GMT</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
+ <text>One of the simplest workflows possible, outputting the String Constant "Hello world!"</text>
+ </annotationBean>
+ <date>2012-01-03 15:11:14.557 GMT</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
+ <text>An extension to helloworld.t2flow - this workflow takes a workflow input "name" which is combined with the string constant "Hello, " using the local worker "Concatenate two strings", and outputs the produced string to the workflow output "greeting".</text>
+ </annotationBean>
+ <date>2012-01-03 15:14:13.847 GMT</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
+ <text>One of the simplest workflows possible. No workflow input ports, a single workflow output port "greeting", outputting "Hello, world!" as produced by the String Constant "hello".</text>
+ </annotationBean>
+ <date>2012-01-03 15:12:15.643 GMT</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+ <identification>01348671-5aaa-4cc2-84cc-477329b70b0d</identification>
+ </annotationBean>
+ <date>2012-01-03 15:14:30.45 GMT</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2></annotations></dataflow></workflow>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-scufl2-annotation/src/test/resources/valid_component_imagemagickconvert.t2flow
----------------------------------------------------------------------
diff --git a/taverna-scufl2-annotation/src/test/resources/valid_component_imagemagickconvert.t2flow b/taverna-scufl2-annotation/src/test/resources/valid_component_imagemagickconvert.t2flow
new file mode 100644
index 0000000..89489cf
--- /dev/null
+++ b/taverna-scufl2-annotation/src/test/resources/valid_component_imagemagickconvert.t2flow
@@ -0,0 +1,394 @@
+<workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-2.4.0"><dataflow id="8d2f9ef0-09ca-4103-b4fd-0ee0a40d8263" role="top"><name>Imagemagick_convert_</name><inputPorts><port><name>from_uri</name><depth>0</depth><granularDepth>0</granularDepth><annotations><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.ExampleValue">
+ <text>in.tiff</text>
+ </annotationBean>
+ <date>2013-03-06 15:58:34.431 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
+ <text>URI to the input object</text>
+ </annotationBean>
+ <date>2013-03-06 15:58:35.192 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.SemanticAnnotation">
+ <mimeType>text/rdf+n3</mimeType>
+ <content><> <http://purl.org/DP/components#portType>
+ <http://purl.org/DP/components#FromURIPort> .
+</content>
+ </annotationBean>
+ <date>2013-03-06 15:36:17.856 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2></annotations></port><port><name>to_uri</name><depth>0</depth><granularDepth>0</granularDepth><annotations><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.ExampleValue">
+ <text>out.tiff</text>
+ </annotationBean>
+ <date>2013-03-06 15:58:28.756 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.SemanticAnnotation">
+ <mimeType>text/rdf+n3</mimeType>
+ <content><> <http://purl.org/DP/components#portType>
+ <http://purl.org/DP/components#ToURIPort> .
+</content>
+ </annotationBean>
+ <date>2013-03-06 15:36:10.390 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
+ <text>URI to the input object</text>
+ </annotationBean>
+ <date>2013-03-06 15:58:27.713 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain></annotations></port><port><name>compression</name><depth>0</depth><granularDepth>0</granularDepth><annotations><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.SemanticAnnotation">
+ <mimeType>text/rdf+n3</mimeType>
+ <content><> <http://purl.org/DP/components#acceptsPredefinedParameter>
+ [ a <http://purl.org/DP/components#PredefinedParameter> ;
+ <http://purl.org/DP/components#parameterValue>
+ "none" ;
+ <http://purl.org/DP/components#parameterDescription>
+ "no compression"
+ ] .
+
+ <> <http://purl.org/DP/components#acceptsPredefinedParameter>
+ [ a <http://purl.org/DP/components#PredefinedParameter> ;
+ <http://purl.org/DP/components#parameterValue>
+ "Group4" ;
+ <http://purl.org/DP/components#parameterDescription>
+ "CCITT Group 4"
+ ] .
+
+ <> <http://purl.org/DP/components#acceptsPredefinedParameter>
+ [ a <http://purl.org/DP/components#PredefinedParameter> ;
+ <http://purl.org/DP/components#parameterValue>
+ "RLE" ;
+ <http://purl.org/DP/components#parameterDescription>
+ "run length encoding"
+ ] .
+</content>
+ </annotationBean>
+ <date>2013-03-06 16:09:38.742 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
+ <text>Imagemagick convert compress parameter</text>
+ </annotationBean>
+ <date>2013-03-06 15:57:39.167 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.ExampleValue">
+ <text>none</text>
+ </annotationBean>
+ <date>2013-03-06 15:57:42.109 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain></annotations></port></inputPorts><outputPorts><port><name>status</name><annotations><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
+ <text>STDOUT and STDERR of the action</text>
+ </annotationBean>
+ <date>2013-03-06 15:59:16.363 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.SemanticAnnotation">
+ <mimeType>text/rdf+n3</mimeType>
+ <content><> <http://purl.org/DP/components#portType>
+ <http://purl.org/DP/components#ActionStatusPort> .
+</content>
+ </annotationBean>
+ <date>2013-03-06 15:35:48.882 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2></annotations></port></outputPorts><processors><processor><name>convert</name><inputPorts><port><name>from_uri</name><depth>0</depth></port><port><name>to_uri</name><depth>0</depth></port><port><name>compression</name><depth>0</depth></port></inputPorts><outputPorts><port><name>STDOUT</name><depth>0</depth><granularDepth>0</granularDepth></port><port><name>STDERR</name><depth>0</depth><granularDepth>0</granularDepth></port></outputPorts><annotations><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.SemanticAnnotation">
+ <mimeType>text/rdf+n3</mimeType>
+ <content><> <http://purl.org/DP/components#hasDependency>
+ <http://scape.keep.pt/vocab/dependencies#digital-preservation-migration-image-imagemagick-image2tiff> .
+</content>
+ </annotationBean>
+ <date>2013-03-06 19:59:47.611 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2></annotations><activities><activity><raven><group>net.sf.taverna.t2.activities</group><artifact>external-tool-activity</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.activities.externaltool.ExternalToolActivity</class><inputMap><map from="to_uri" to="to_uri" /><map from="compression" to="compression" /><map from="from_uri" to="from_uri" /></inputMap><outputMap><map from="STDERR" to="STDERR" /><map from="STDOUT" to="STDOUT" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean xmlns="">
+ <mechanismType>789663B8-DA91-428A-9F7D-B3F3DA185FD4</mechanismType>
+ <mechanismName>default local</mechanismName>
+ <mechanismXML><?xml version="1.0" encoding="UTF-8"?>
+<localInvocation><shellPrefix>/bin/sh -c</shellPrefix><linkCommand>/bin/ln -s %%PATH_TO_ORIGINAL%% %%TARGET_NAME%%</linkCommand></localInvocation>
+</mechanismXML>
+ <externaltoolid>a69089e9-f0e9-4ca8-b151-3aa93621a97b</externaltoolid>
+ <useCaseDescription>
+ <usecaseid />
+ <description />
+ <command>convert -compress "%%compression%%" "%%from_uri%%" tiff:"%%to_uri%%"</command>
+ <preparingTimeoutInSeconds>1200</preparingTimeoutInSeconds>
+ <executionTimeoutInSeconds>1800</executionTimeoutInSeconds>
+ <tags>
+ <string>compression</string>
+ <string>from_uri</string>
+ <string>to_uri</string>
+ </tags>
+ <REs />
+ <queue__preferred />
+ <queue__deny />
+ <static__inputs />
+ <inputs>
+ <entry>
+ <string>to_uri</string>
+ <de.uni__luebeck.inb.knowarc.usecases.ScriptInputUser>
+ <tag>to_uri</tag>
+ <file>false</file>
+ <tempFile>false</tempFile>
+ <binary>false</binary>
+ <charsetName>UTF-8</charsetName>
+ <forceCopy>false</forceCopy>
+ <list>false</list>
+ <concatenate>false</concatenate>
+ <mime />
+ </de.uni__luebeck.inb.knowarc.usecases.ScriptInputUser>
+ </entry>
+ <entry>
+ <string>compression</string>
+ <de.uni__luebeck.inb.knowarc.usecases.ScriptInputUser>
+ <tag>compression</tag>
+ <file>false</file>
+ <tempFile>false</tempFile>
+ <binary>false</binary>
+ <charsetName>UTF-8</charsetName>
+ <forceCopy>false</forceCopy>
+ <list>false</list>
+ <concatenate>false</concatenate>
+ <mime />
+ </de.uni__luebeck.inb.knowarc.usecases.ScriptInputUser>
+ </entry>
+ <entry>
+ <string>from_uri</string>
+ <de.uni__luebeck.inb.knowarc.usecases.ScriptInputUser>
+ <tag>from_uri</tag>
+ <file>false</file>
+ <tempFile>false</tempFile>
+ <binary>false</binary>
+ <charsetName>UTF-8</charsetName>
+ <forceCopy>false</forceCopy>
+ <list>false</list>
+ <concatenate>false</concatenate>
+ <mime />
+ </de.uni__luebeck.inb.knowarc.usecases.ScriptInputUser>
+ </entry>
+ </inputs>
+ <outputs />
+ <includeStdIn>false</includeStdIn>
+ <includeStdOut>true</includeStdOut>
+ <includeStdErr>true</includeStdErr>
+ <validReturnCodes>
+ <int>0</int>
+ </validReturnCodes>
+ </useCaseDescription>
+ <edited>false</edited>
+</net.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns="">
+ <maxJobs>1</maxJobs>
+</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig xmlns="
">
+ <backoffFactor>1.0</backoffFactor>
+ <initialDelay>1000</initialDelay>
+ <maxDelay>5000</maxDelay>
+ <maxRetries>0</maxRetries>
+</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy><cross><port name="from_uri" depth="0" /><port name="to_uri" depth="0" /><port name="compression" depth="0" /></cross></strategy></iteration></iterationStrategyStack></processor></processors><conditions /><datalinks><datalink><sink type="processor"><processor>convert</processor><port>from_uri</port></sink><source type="dataflow"><port>from_uri</port></source></datalink><datalink><sink type="processor"><processor>convert</processor><port>to_uri</port></sink><source type="dataflow"><port>to_uri</port></source></datalink><datalink><sink type="proce
ssor"><processor>convert</processor><port>compression</port></sink><source type="dataflow"><port>compression</port></source></datalink><datalink><sink type="merge"><port>status</port></sink><source type="processor"><processor>convert</processor><port>STDOUT</port></source></datalink><datalink><sink type="merge"><port>status</port></sink><source type="processor"><processor>convert</processor><port>STDERR</port></source></datalink></datalinks><annotations><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+ <identification>8d2f9ef0-09ca-4103-b4fd-0ee0a40d8263</identification>
+ </annotationBean>
+ <date>2013-03-06 21:41:51.284 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.SemanticAnnotation">
+ <mimeType>text/rdf+n3</mimeType>
+ <content><> <http://purl.org/DP/components#fits>
+ <http://purl.org/DP/components#MigrationAction> .
+
+<> <http://purl.org/DP/components#migrates>
+ [ a <http://purl.org/DP/components#MigrationPath> ;
+ <http://purl.org/DP/components#fromMimetype>
+ "image/tiff" ;
+ <http://purl.org/DP/components#toMimetype>
+ "image/tiff"
+ ] .
+</content>
+ </annotationBean>
+ <date>2013-03-06 21:41:35.890 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.Author">
+ <text>Markus</text>
+ </annotationBean>
+ <date>2013-03-06 15:56:07.430 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+ <identification>890bb055-628d-42ad-bcee-61077e3e763c</identification>
+ </annotationBean>
+ <date>2013-03-06 16:10:40.753 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
+ <text>Converts tiff to tiff using imagemagick convert with the provided compression</text>
+ </annotationBean>
+ <date>2013-03-06 15:56:46.924 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+ <identification>8c741630-ac74-42f2-827a-501fa7e53bd7</identification>
+ </annotationBean>
+ <date>2013-03-06 15:44:03.459 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+ <identification>472b15c2-0b16-4ebd-b865-0c268d5f42b4</identification>
+ </annotationBean>
+ <date>2013-03-06 15:59:49.673 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+ <identification>dfc4edbb-582f-4853-bb47-02b43abd82ee</identification>
+ </annotationBean>
+ <date>2013-03-06 15:49:55.477 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+ <identification>49d15e90-99a8-4970-84b3-5d26d77a1a58</identification>
+ </annotationBean>
+ <date>2013-03-06 19:59:59.809 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+ <identification>6190a4fa-5178-43cf-9b43-dbbc6476ee00</identification>
+ </annotationBean>
+ <date>2013-03-06 15:48:57.814 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+ <identification>58fc3bb3-9020-4fe5-83db-19fa2e1017e1</identification>
+ </annotationBean>
+ <date>2013-03-06 15:48:25.73 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+ <annotationAssertions>
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.DescriptiveTitle">
+ <text>Imagemagick convert - tiff2tiff - compression</text>
+ </annotationBean>
+ <date>2013-03-06 15:56:22.628 UTC</date>
+ <creators />
+ <curationEventList />
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+ </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain></annotations></dataflow></workflow>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-scufl2-api/.gitignore
----------------------------------------------------------------------
diff --git a/taverna-scufl2-api/.gitignore b/taverna-scufl2-api/.gitignore
new file mode 100644
index 0000000..054ea92
--- /dev/null
+++ b/taverna-scufl2-api/.gitignore
@@ -0,0 +1,3 @@
+target
+.settings
+.project
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-scufl2-api/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-scufl2-api/pom.xml b/taverna-scufl2-api/pom.xml
new file mode 100644
index 0000000..d315341
--- /dev/null
+++ b/taverna-scufl2-api/pom.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.taverna.language</groupId>
+ <artifactId>taverna-language</artifactId>
+ <version>0.16.1-incubating-SNAPSHOT</version>
+ </parent>
+ <artifactId>taverna-scufl2-api</artifactId>
+ <packaging>bundle</packaging>
+ <name>Apache Taverna Scufl 2 API</name>
+ <description>Taverna workflow language API</description>
+ <dependencies>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>taverna-scufl2-ucfpackage</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.7</source>
+ <target>1.7</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.3.7</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-scufl2-api/src/main/java/org/apache/taverna/scufl2/api/activity/Activity.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-api/src/main/java/org/apache/taverna/scufl2/api/activity/Activity.java b/taverna-scufl2-api/src/main/java/org/apache/taverna/scufl2/api/activity/Activity.java
new file mode 100644
index 0000000..6d70d23
--- /dev/null
+++ b/taverna-scufl2-api/src/main/java/org/apache/taverna/scufl2/api/activity/Activity.java
@@ -0,0 +1,270 @@
+package org.apache.taverna.scufl2.api.activity;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.taverna.scufl2.api.common.AbstractNamed;
+import org.apache.taverna.scufl2.api.common.Child;
+import org.apache.taverna.scufl2.api.common.Configurable;
+import org.apache.taverna.scufl2.api.common.NamedSet;
+import org.apache.taverna.scufl2.api.common.Ported;
+import org.apache.taverna.scufl2.api.common.Scufl2Tools;
+import org.apache.taverna.scufl2.api.common.Typed;
+import org.apache.taverna.scufl2.api.common.Visitor;
+import org.apache.taverna.scufl2.api.common.WorkflowBean;
+import org.apache.taverna.scufl2.api.configurations.Configuration;
+import org.apache.taverna.scufl2.api.core.Processor;
+import org.apache.taverna.scufl2.api.core.Workflow;
+import org.apache.taverna.scufl2.api.port.InputActivityPort;
+import org.apache.taverna.scufl2.api.port.OutputActivityPort;
+import org.apache.taverna.scufl2.api.profiles.ProcessorBinding;
+import org.apache.taverna.scufl2.api.profiles.Profile;
+
+
+/**
+ * An Activity specifies a way of implementing a {@link Processor Processor}
+ * within a {@link Workflow Workflow}.
+ * <p>
+ * When the Workflow is run, a particular Activity will be specified as bound to
+ * the Processor and {@link Configuration Configuration} information will be
+ * specified for the Activity.
+ *
+ * @author Alan R Williams
+ * @author Stian Soiland-Reyes
+ */
+public class Activity extends AbstractNamed implements Configurable,
+ Child<Profile>, Typed, Ported {
+ private final NamedSet<InputActivityPort> inputPorts = new NamedSet<>();
+ private final NamedSet<OutputActivityPort> outputPorts = new NamedSet<>();
+
+ private URI type;
+ private Profile parent;
+
+ /**
+ * Constructs an <code>Activity</code> with a random UUID as the name.
+ */
+ public Activity() {
+ super();
+ }
+
+ /**
+ * Constructs an <code>Activity</code> with the specified name.
+ *
+ * @param name
+ * the name of the Activity. <strong>Must not</strong> be
+ * <code>null</code> or an empty String.
+ */
+ public Activity(String name) {
+ super(name);
+ }
+
+ @Override
+ public boolean accept(Visitor visitor) {
+ if (visitor.visitEnter(this)) {
+ List<Iterable<? extends WorkflowBean>> children = new ArrayList<>();
+ children.add(getInputPorts());
+ children.add(getOutputPorts());
+ outer: for (Iterable<? extends WorkflowBean> child : children)
+ for (WorkflowBean bean : child)
+ if (!bean.accept(visitor))
+ break outer;
+ }
+ return visitor.visitLeave(this);
+ }
+
+ /**
+ * Returns the type of the <code>Activity</code>.
+ *
+ * @return the type of the <code>Activity</code>
+ */
+ @Override
+ public URI getType() {
+ return type;
+ }
+
+ /**
+ * Returns the <code>InputActivityPort</code>s.
+ *
+ * If there are no <code>InputActivityPort</code>s an empty set is returned.
+ *
+ * @return the <code>InputActivityPort</code>s.
+ */
+ @Override
+ public NamedSet<InputActivityPort> getInputPorts() {
+ return inputPorts;
+ }
+
+ /**
+ * Returns the <code>OutputActivityPort</code>s.
+ *
+ * If there are no <code>OutputActivityPort</code>s an empty set is
+ * returned.
+ *
+ * @return the <code>OutputActivityPort</code>s.
+ */
+ @Override
+ public NamedSet<OutputActivityPort> getOutputPorts() {
+ return outputPorts;
+ }
+
+ @Override
+ public Profile getParent() {
+ return parent;
+ }
+
+ /**
+ * Sets the type of the <code>Activity</code>.
+ *
+ * @param type
+ * the type of the <code>Activity</code>
+ */
+ @Override
+ public void setType(URI type) {
+ this.type = type;
+ }
+
+ /**
+ * Set the <code>InputActivityPort</code>s to be the contents of the
+ * specified set.
+ * <p>
+ * <code>InputActivityPort</code>s can be added by using
+ * {@link #getInputPorts()}.add(inputPort).
+ *
+ * @param inputPorts
+ * the <code>InputActivityPort</code>s. <strong>Must not</strong>
+ * be null
+ */
+ public void setInputPorts(Set<InputActivityPort> inputPorts) {
+ this.inputPorts.clear();
+ this.inputPorts.addAll(inputPorts);
+ }
+
+ /**
+ * Set the <code>OutputActivityPort</code>s to be the contents of the
+ * specified set.
+ * <p>
+ * <code>OutputActivityPort</code>s can be added by using
+ * {@link #getOutputPorts()}.add(outputPort).
+ *
+ * @param outputPorts
+ * the <code>OutputActivityPort</code>s. <strong>Must
+ * not</strong> be null
+ */
+ public void setOutputPorts(Set<OutputActivityPort> outputPorts) {
+ this.outputPorts.clear();
+ this.outputPorts.addAll(outputPorts);
+ }
+
+ @Override
+ public void setParent(Profile parent) {
+ if (this.parent != null && this.parent != parent)
+ this.parent.getActivities().remove(this);
+ this.parent = parent;
+ if (parent != null)
+ parent.getActivities().add(this);
+ }
+
+ @Override
+ public String toString() {
+ return "Activity " + getType() + " \"" + getName() + '"';
+ }
+
+ @Override
+ protected void cloneInto(WorkflowBean clone, Cloning cloning) {
+ super.cloneInto(clone, cloning);
+ Activity cloneActivity = (Activity) clone;
+ cloneActivity.setType(getType());
+ }
+
+ // Derived operations, implemented via Scufl2Tools
+
+ /**
+ * Get all the configurations that are associated with this activity.
+ * Assumes that {@link #setParent(Profile)} has already been called.
+ *
+ * @see Scufl2Tools#configurationsFor(Activity,Profile)
+ */
+ public List<Configuration> getConfigurations() {
+ return getTools().configurationsFor(this, getParent());
+ }
+
+ /**
+ * Get the configuration for this activity. Assumes that
+ * {@link #setParent(Profile)} has already been called.
+ *
+ * @throws IllegalStateException
+ * If there are more than one configuration for the activity.
+ * @throws IndexOutOfBoundsException
+ * If there aren't any configurations for the activity.
+ * @see Scufl2Tools#configurationFor(Activity,Profile)
+ */
+ public Configuration getConfiguration() {
+ return getTools().configurationFor(this, getParent());
+ }
+
+ /**
+ * Creates a configuration for this activity. Note that much code may assume
+ * that there is only one configuration per activity; this method does
+ * <i>not</i> enforce that and the underlying workflow model does not
+ * require that.
+ *
+ * @param configType
+ * The URI of the type of the configuration (i.e., the type of
+ * the Activity: Beanshell, WSDL, REST, Component, etc.)
+ * @see Scufl2Tools#createConfigurationFor(Activity,URI)
+ */
+ public Configuration createConfiguration(URI configType) {
+ return getTools().createConfigurationFor(this, configType);
+ }
+
+ /**
+ * Create the ports on this activity to match the given processor.
+ *
+ * @see Scufl2Tools#createActivityPortsFromProcessor(Activity,Processor)
+ */
+ public void createPorts(Processor processor) {
+ getTools().createActivityPortsFromProcessor(this, processor);
+ }
+
+ /**
+ * Get all processors that have a binding to this activity.
+ *
+ * @return a list of processor bindings (which can be queried for the
+ * processors themselves).
+ * @see Scufl2Tools#processorBindingsToActivity(Activity)
+ */
+ public List<ProcessorBinding> getBoundProcessors() {
+ return getTools().processorBindingsToActivity(this);
+ }
+
+ /**
+ * Create a processor and binding to match the given activity.
+ *
+ * @see Scufl2Tools#createProcessorAndBindingFromActivity(Activity)
+ */
+ public ProcessorBinding createProcessorAndBinding() {
+ return getTools().createProcessorAndBindingFromActivity(this);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-scufl2-api/src/main/java/org/apache/taverna/scufl2/api/activity/package-info.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-api/src/main/java/org/apache/taverna/scufl2/api/activity/package-info.java b/taverna-scufl2-api/src/main/java/org/apache/taverna/scufl2/api/activity/package-info.java
new file mode 100644
index 0000000..c1d9112
--- /dev/null
+++ b/taverna-scufl2-api/src/main/java/org/apache/taverna/scufl2/api/activity/package-info.java
@@ -0,0 +1,24 @@
+
+package org.apache.taverna.scufl2.api.activity;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c08405cb/taverna-scufl2-api/src/main/java/org/apache/taverna/scufl2/api/annotation/Annotation.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-api/src/main/java/org/apache/taverna/scufl2/api/annotation/Annotation.java b/taverna-scufl2-api/src/main/java/org/apache/taverna/scufl2/api/annotation/Annotation.java
new file mode 100644
index 0000000..fe4de98
--- /dev/null
+++ b/taverna-scufl2-api/src/main/java/org/apache/taverna/scufl2/api/annotation/Annotation.java
@@ -0,0 +1,169 @@
+package org.apache.taverna.scufl2.api.annotation;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+
+import org.apache.taverna.scufl2.api.common.AbstractNamed;
+import org.apache.taverna.scufl2.api.common.Child;
+import org.apache.taverna.scufl2.api.common.Named;
+import org.apache.taverna.scufl2.api.common.Visitor;
+import org.apache.taverna.scufl2.api.common.WorkflowBean;
+import org.apache.taverna.scufl2.api.container.WorkflowBundle;
+
+
+/**
+ * An annotation of a WorkflowBean.
+ * <p>
+ * Modelled after http://openannotation.org/spec/core/20120509
+ *
+ * @author Stian Soiland-Reyes
+ */
+public class Annotation extends AbstractNamed implements Named,
+ Child<WorkflowBundle> {
+ private Calendar annotatedAt;
+ private URI annotatedBy;
+ private Calendar serializedAt = new GregorianCalendar();
+ private URI serializedBy;
+ private WorkflowBean target;
+ private WorkflowBundle parent;
+ private URI body;
+
+ public Annotation(WorkflowBean target) {
+ setTarget(target);
+ }
+
+ public Annotation() {
+ }
+
+ @Override
+ public boolean accept(Visitor visitor) {
+ return visitor.visit(this);
+ }
+
+ public Calendar getAnnotatedAt() {
+ return annotatedAt;
+ }
+
+ public URI getAnnotatedBy() {
+ return annotatedBy;
+ }
+
+ public Calendar getSerializedAt() {
+ return serializedAt;
+ }
+
+ public URI getSerializedBy() {
+ return serializedBy;
+ }
+
+ public WorkflowBean getTarget() {
+ if (target == null)
+ return this;
+ return target;
+ }
+
+ public void setAnnotatedAt(Calendar annotatedAt) {
+ this.annotatedAt = annotatedAt;
+ }
+
+ public void setAnnotatedBy(URI annotatedBy) {
+ this.annotatedBy = annotatedBy;
+ }
+
+ public void setSerializedAt(Calendar serializedAt) {
+ this.serializedAt = serializedAt;
+ }
+
+ public void setSerializedBy(URI serializedBy) {
+ this.serializedBy = serializedBy;
+ }
+
+ public void setTarget(WorkflowBean target) {
+ if (target == null)
+ throw new NullPointerException("Target can't be null");
+ this.target = target;
+ }
+
+ @Override
+ public WorkflowBundle getParent() {
+ return this.parent;
+ }
+
+ @Override
+ public void setParent(WorkflowBundle parent) {
+ if (this.parent != null && this.parent != parent)
+ this.parent.getAnnotations().remove(this);
+ this.parent = parent;
+ if (parent != null)
+ parent.getAnnotations().add(this);
+ }
+
+ public URI getBody() {
+ return body;
+ }
+
+ public void setBody(URI body) {
+ this.body = body;
+ }
+
+ @Override
+ protected void cloneInto(WorkflowBean clone, Cloning cloning) {
+ super.cloneInto(clone, cloning);
+ Annotation cloneAnnotation = (Annotation) clone;
+ if (getAnnotatedAt() != null)
+ cloneAnnotation.setAnnotatedAt((Calendar) getAnnotatedAt().clone());
+ cloneAnnotation.setAnnotatedBy(getAnnotatedBy());
+ cloneAnnotation.setBody(getBody());
+ if (getSerializedAt() != null)
+ cloneAnnotation.setSerializedAt((Calendar) getSerializedAt()
+ .clone());
+ cloneAnnotation.setSerializedBy(getSerializedBy());
+ cloneAnnotation.setTarget(cloning.cloneOrOriginal(getTarget()));
+ }
+
+ /**
+ * Gets the standard path for the resource in the bundle associated with
+ * this annotation. The resource will be expected to contain a TTL-encoded
+ * RDF model.
+ *
+ * @return a resource path.
+ */
+ public String getResourcePath() {
+ return "annotation/" + getName() + ".ttl";
+ }
+
+ /**
+ * Gets the content of this annotation. Note that this method does not cache
+ * the value it reads.
+ *
+ * @return a TTL-encoded RDF model.
+ * @throws IOException
+ * If anything goes wrong reading the resource
+ */
+ public String getRDFContent() throws IOException {
+ return getParent().getResources()
+ .getResourceAsString(getResourcePath());
+ }
+}