diff --git a/src/main/java/com/atgenomix/seqslab/piper/plugin/api/Pipeline.java b/src/main/java/com/atgenomix/seqslab/piper/plugin/api/Pipeline.java index 594d9e7..970f2fc 100644 --- a/src/main/java/com/atgenomix/seqslab/piper/plugin/api/Pipeline.java +++ b/src/main/java/com/atgenomix/seqslab/piper/plugin/api/Pipeline.java @@ -30,10 +30,14 @@ public interface Pipeline { /** - * Get the settings of File inputs. - * @return A dictionary containing the FQN-value mappings. + * Get the settings of Task inputs. */ - Map getDatasets(); + Map getInputs(); + + /** + * Get the settings of Task outputs. + */ + Map getOutputs(); /** * Get the settings of a pipeline task. diff --git a/src/main/java/com/atgenomix/seqslab/piper/plugin/api/PipelineTask.java b/src/main/java/com/atgenomix/seqslab/piper/plugin/api/PipelineTask.java index 067c1d4..0d68b65 100644 --- a/src/main/java/com/atgenomix/seqslab/piper/plugin/api/PipelineTask.java +++ b/src/main/java/com/atgenomix/seqslab/piper/plugin/api/PipelineTask.java @@ -18,6 +18,9 @@ import com.atgenomix.seqslab.piper.tags.DeveloperApi; +import com.google.gson.JsonObject; + +import java.util.List; /** * An interface represents the localization, computation, and delocalization workload processes @@ -26,4 +29,10 @@ */ @DeveloperApi public interface PipelineTask { + + /** + * Get the list of Operators applied on given input or output FQN. + * @return a list of JsonObject + */ + public JsonObject[] getOperators(); } diff --git a/src/main/java/com/atgenomix/seqslab/piper/plugin/api/PiperContext.java b/src/main/java/com/atgenomix/seqslab/piper/plugin/api/PiperContext.java index f307ed6..6791ed4 100644 --- a/src/main/java/com/atgenomix/seqslab/piper/plugin/api/PiperContext.java +++ b/src/main/java/com/atgenomix/seqslab/piper/plugin/api/PiperContext.java @@ -69,12 +69,21 @@ public Map getConf() { } /** - * Obtain the dataset object value of an input variable identified by fully-qualified name. + * Obtain the piper value of an input variable identified by fully-qualified name. * @param fqn The fully-qualified name of an input variable, e.g. myworkflow.task.ref. - * @return The dataset object value or null if not found. + * @return The piper value or null if not found. */ - public PiperValue getDataset(String fqn) { - return pipeline.getDatasets().get(fqn); + public PiperValue getInput(String fqn) { + return pipeline.getInputs().get(fqn); + } + + /** + * Obtain the piper value of an output variable identified by fully-qualified name. + * @param fqn The fully-qualified name of an output variable, e.g. myworkflow.task.ref. + * @return The piper value or null if not found. + */ + public PiperValue getOutput(String fqn) { + return pipeline.getOutputs().get(fqn); } /**