Github user stain commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-language/pull/39#discussion_r201983894
--- Diff:
taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/components/CommandLineTool.java
---
@@ -0,0 +1,80 @@
+/*
+ * 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.Set;
+import java.util.Map;
+import java.util.HashMap;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+import org.apache.taverna.scufl2.api.port.InputProcessorPort;
+import org.apache.taverna.scufl2.api.port.OutputProcessorPort;
+
+public class CommandLineTool implements Process {
+
+ private final static String BASE_COMMAND = "baseCommand";
+ private final static String ID = "id";
+ private final static String INPUT_BINDINDGS = "inputBinding";
+
+ private CWLParser cwlParser;
+
+ private JsonNode node;
+
+ private String baseCommand = null;
+ private Map<String, InputProcessorPort> processorInputs;
+ private Map<String, OutputProcessorPort> processorOutputs;
+
+ public CommandLineTool(JsonNode node) {
+ this.node = node;
+ this.cwlParser = new CWLParser(node);
+ this.processorInputs = new HashMap<>();
+ this.processorOutputs = new HashMap<>();
+ this.parse();
+ this.receiverPorts = new HashSet(processorInputs.values());
--- End diff --
`receiverPorts` here is a good example of when the field must be created by
the constructor instead. But `processorInputs` and `processorOutputs` should be
made outside.
---