Class OperatorContext

java.lang.Object
com.atgenomix.seqslab.piper.plugin.api.OperatorContext
All Implemented Interfaces:
Serializable

public abstract class OperatorContext extends Object implements Serializable
An object used in pipeline operations to represent a persistent set of properties, inputs, and outputs. An operator context object contains a list of properties in the form of NamedValue objects. These properties represent information about the operator configuration, the environment, or the states of pipeline operations. An operator context object is created first from the task pipeline configuration of an input or output data file and then calling each operator in the pipeline execution on the default and updated context. The property keys might be fully qualified by prefixing the operator name, ex: name:key.
See Also:
  • Field Details

    • properties

      protected Map<String,Object> properties
      A property map that contains NamedValue objects including those specific to the operator and other properties set by upstream pipeline operators. The keys might be fully qualified by prefixing the operator name, ex: name:key.
    • inputs

      public Map<String,PiperValue> inputs
      An immutable map that contains NamedValue task input variables and files.
    • outputs

      public Map<String,PiperValue> outputs
      An immutable map that contains NamedValue task output variables and files.
  • Constructor Details

    • OperatorContext

      protected OperatorContext(Map<String,Object> properties)
      Creates an operator context with the specified defaults.
      Parameters:
      properties - default properties
    • OperatorContext

      protected OperatorContext(Map<String,Object> properties, Map<String,PiperValue> inputs)
      Creates an operator context with the specified defaults and task inputs.
      Parameters:
      properties - default properties
      inputs - task input variables and files
    • OperatorContext

      protected OperatorContext(Map<String,Object> properties, Map<String,PiperValue> inputs, Map<String,PiperValue> outputs)
      Creates an operator context with the specified defaults and task inputs and outputs.
      Parameters:
      properties - default properties
      inputs - task input variables and files
      outputs - task output variables and files
  • Method Details

    • get

      public Object get(String key)
      Get the property value
      Parameters:
      key - the property key
      Returns:
      the property object. return null if the key is not found.
    • getProperties

      public Map<String,Object> getProperties()
      Get the properties
      Returns:
      the property map
    • setProperties

      public void setProperties(Map<String,Object> properties)
      Set new properties