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 2018/07/05 10:45:54 UTC

[04/13] incubator-taverna-language git commit: Add CWL components

Add CWL components


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

Branch: refs/heads/cwlparser
Commit: ecc3b6729c0dccfe0943475b3207c255b1bb3cb1
Parents: 4d32489
Author: Majdi Haouech <m....@criteo.com>
Authored: Mon Jun 4 10:33:03 2018 +0100
Committer: Majdi Haouech <m....@criteo.com>
Committed: Mon Jun 4 10:33:03 2018 +0100

----------------------------------------------------------------------
 .../scufl2/cwl/components/PortDetail.java       | 62 ++++++++++++++
 .../taverna/scufl2/cwl/components/Step.java     | 85 ++++++++++++++++++++
 .../scufl2/cwl/components/StepInput.java        | 54 +++++++++++++
 .../scufl2/cwl/components/StepOutput.java       | 41 ++++++++++
 4 files changed, 242 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/ecc3b672/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/PortDetail.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/PortDetail.java b/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/PortDetail.java
new file mode 100644
index 0000000..563c76f
--- /dev/null
+++ b/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/PortDetail.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.taverna.scufl2.cwl;
+
+
+import java.util.ArrayList;
+
+public class PortDetail {
+
+
+    private String label;
+
+    private int depth;
+    private String description;
+    private ArrayList<String> format;
+    public int getDepth() {
+        return depth;
+    }
+    public void setDepth(int depth) {
+        this.depth = depth;
+    }
+    public String getDescription() {
+        return description;
+    }
+    public void setDescription(String description) {
+        this.description = description;
+    }
+    public String getLabel() {
+        return label;
+    }
+    public void setLabel(String label) {
+        this.label = label;
+    }
+    public ArrayList<String> getFormat() {
+        return format;
+    }
+    public void setFormat(ArrayList<String> format) {
+        this.format = format;
+    }
+
+    public void addFormat(String format){
+        this.format.add(format);
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/ecc3b672/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/Step.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/Step.java b/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/Step.java
new file mode 100644
index 0000000..3f3d653
--- /dev/null
+++ b/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/Step.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.taverna.scufl2.cwl;
+
+
+import java.util.ArrayList;
+import java.util.Set;
+import java.util.HashSet;
+
+public class Step {
+
+
+    private String id;
+    private String run;
+
+    private Set<StepInput> inputs;
+    private Set<StepOutput> outputs;
+
+    public Step() {
+        inputs = new HashSet<>();
+        outputs = new HashSet<>();
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getRun() {
+        return run;
+    }
+
+    public void setRun(String run) {
+        this.run = run;
+    }
+
+    public void addInput(String id, String source) {
+        inputs.add(new StepInput(id, source));
+    }
+
+    public void setInputs(Set<StepInput> inputs) {
+        this.inputs = inputs;
+    }
+
+    public Set<StepInput> getInputs() {
+        return inputs;
+    }
+
+    public void addOutput(String id) {
+        outputs.add(new StepOutput(id));
+    }
+
+    public void setOutputs(Set<StepOutput> outputs) {
+        this.outputs = outputs;
+    }
+
+    public Set<StepOutput> getOutputs() {
+        return outputs;
+    }
+
+    public String toString() {
+        return "Step " + id + ": run = " + run;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/ecc3b672/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/StepInput.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/StepInput.java b/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/StepInput.java
new file mode 100644
index 0000000..0432272
--- /dev/null
+++ b/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/StepInput.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.taverna.scufl2.cwl;
+
+import java.util.*;
+
+public class StepInput {
+
+    private String id;
+    private String source;
+
+    public StepInput() {
+        this.id = null;
+        this.source = null;
+    }
+
+    public StepInput(String id, String source) {
+        this.id = id;
+        this.source = source;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setSource(String source) {
+        this.source = source;
+    }
+
+    public String getSource() {
+        return source;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/ecc3b672/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/StepOutput.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/StepOutput.java b/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/StepOutput.java
new file mode 100644
index 0000000..145fa2d
--- /dev/null
+++ b/taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/StepOutput.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.taverna.scufl2.cwl;
+
+public class StepOutput {
+
+    private String id;
+
+    public StepOutput() {
+        this.id = null;
+    }
+
+    public StepOutput(String id) {
+        this.id = id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getId() {
+        return id;
+    }
+}
\ No newline at end of file