common-workflow-language / cwljava

Java SDK for the Common Workflow Language standards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yaml output of the instantiated CommandLineTool Object

pgrosu opened this issue · comments

@mr-c I just did the following (thought I had to use snakeyaml-1.19-android.jar rather than the normal jar - the Program_Context is an instance of CommandLineTool:

      DumperOptions Yaml_Formatter = new DumperOptions();
      Yaml_Formatter.setDefaultFlowStyle(DumperOptions.FlowStyle.FLOW);
      Yaml_Formatter.setPrettyFlow(true);

      Yaml yaml = new Yaml( Yaml_Formatter );
      String YAML_Program_Context = yaml.dump( Program_Context );
      System.out.println( YAML_Program_Context );

Below is the output:

!!org.commonwl.lang.CommandLineTool {
  arguments: null,
  baseCommand: wc,
  class_value: null,
  cwlVersion: null,
  doc: null,
  hints: null,
  id: null,
  inputs: [
    {
      default_value: null,
      doc: null,
      format: null,
      id: example_string,
      inputBinding: {
        itemSeparator: null,
        loadContents: null,
        position: 0,
        prefix: null,
        separate: null,
        shellQuote: null,
        valueFrom: null
      },
      label: null,
      secondaryFiles: null,
      streamable: null,
      type: string
    },
    {
      default_value: null,
      doc: null,
      format: null,
      id: file2,
      inputBinding: {
        itemSeparator: null,
        loadContents: null,
        position: 1,
        prefix: null,
        separate: null,
        shellQuote: null,
        valueFrom: null
      },
      label: null,
      secondaryFiles: null,
      streamable: null,
      type: File
    },
    {
      default_value: null,
      doc: null,
      format: null,
      id: file1,
      inputBinding: {
        itemSeparator: null,
        loadContents: null,
        position: 2,
        prefix: null,
        separate: null,
        shellQuote: null,
        valueFrom: null
      },
      label: null,
      secondaryFiles: null,
      streamable: null,
      type: File
    }]
  ,
  label: null,
  outputs: [
    {
      doc: null,
      format: null,
      id: output,
      label: null,
      outputBinding: {
        glob: output,
        loadContents: null,
        outputEval: null
      },
      secondaryFiles: null,
      streamable: null,
      type: File
    }]
  ,
  permanentFailCodes: null,
  requirements: null,
  stderr: null,
  stdin: whale.txt,
  stdout: output,
  successCodes: null,
  temporaryFailCodes: null
}