• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

common-workflow-language / cwljava / #388

30 Oct 2025 04:55PM UTC coverage: 58.693% (-0.8%) from 59.538%
#388

Pull #218

github

web-flow
Merge ab8576a5b into befd7e4b9
Pull Request #218: Populate the extensionFields; add public accessors for LoadingOptions

230 of 569 new or added lines in 67 files covered. (40.42%)

28 existing lines in 27 files now uncovered.

7535 of 12838 relevant lines covered (58.69%)

0.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

60.09
/src/main/java/org/w3id/cwl/cwl1_2/CommandLineToolImpl.java
1
// Copyright Common Workflow Language project contributors
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
//      http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15
package org.w3id.cwl.cwl1_2;
16

17
import org.w3id.cwl.cwl1_2.utils.LoaderInstances;
18
import org.w3id.cwl.cwl1_2.utils.LoadingOptions;
19
import org.w3id.cwl.cwl1_2.utils.LoadingOptionsBuilder;
20
import org.w3id.cwl.cwl1_2.utils.SaveableImpl;
21
import org.w3id.cwl.cwl1_2.utils.ValidationException;
22

23
/**
24
* Auto-generated class implementation for <I>https://w3id.org/cwl/cwl#CommandLineTool</I><BR> <BLOCKQUOTE>
25
 This defines the schema of the CWL Command Line Tool Description document.
26
  </BLOCKQUOTE>
27
 */
28
public class CommandLineToolImpl extends SaveableImpl implements CommandLineTool {
29
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
1✔
30
  private java.util.Map<String, Object> extensionFields_ =
1✔
31
      new java.util.HashMap<String, Object>();
32
  public LoadingOptions getLoadingOptions() {
NEW
33
    return this.loadingOptions_;
×
34
  }
35
  public java.util.Map<String, Object> getExtensionFields() {
36
    return this.extensionFields_;
×
37
  }
38

39
  private java.util.Optional<String> id;
40

41
  /**
42
   * Getter for property <I>https://w3id.org/cwl/cwl#Process/id</I><BR>
43
   * <BLOCKQUOTE>
44
   * The unique identifier for this object.
45
   * 
46
   * Only useful for `$graph` at `Process` level. Should not be exposed
47
   * to users in graphical or terminal user interfaces.
48
   *    * </BLOCKQUOTE>
49
   */
50

51
  public java.util.Optional<String> getId() {
52
    return this.id;
×
53
  }
54

55
  private CommandLineTool_class class_;
56

57
  /**
58
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineTool/class</I><BR>
59

60
   */
61

62
  public CommandLineTool_class getClass_() {
63
    return this.class_;
×
64
  }
65

66
  private java.util.Optional<String> label;
67

68
  /**
69
   * Getter for property <I>https://w3id.org/cwl/cwl#Labeled/label</I><BR>
70
   * <BLOCKQUOTE>
71
   * A short, human-readable label of this object.   * </BLOCKQUOTE>
72
   */
73

74
  public java.util.Optional<String> getLabel() {
75
    return this.label;
×
76
  }
77

78
  private Object doc;
79

80
  /**
81
   * Getter for property <I>https://w3id.org/cwl/salad#Documented/doc</I><BR>
82
   * <BLOCKQUOTE>
83
   * A documentation string for this object, or an array of strings which should be concatenated.   * </BLOCKQUOTE>
84
   */
85

86
  public Object getDoc() {
87
    return this.doc;
×
88
  }
89

90
  private java.util.List<Object> inputs;
91

92
  /**
93
   * Getter for property <I>https://w3id.org/cwl/cwl#inputs</I><BR>
94
   * <BLOCKQUOTE>
95
   * Defines the input parameters of the process.  The process is ready to
96
   * run when all required input parameters are associated with concrete
97
   * values.  Input parameters include a schema for each parameter which is
98
   * used to validate the input object.  It may also be used to build a user
99
   * interface for constructing the input object.
100
   * 
101
   * When accepting an input object, all input parameters must have a value.
102
   * If an input parameter is missing from the input object, it must be
103
   * assigned a value of `null` (or the value of `default` for that
104
   * parameter, if provided) for the purposes of validation and evaluation
105
   * of expressions.
106
   *    * </BLOCKQUOTE>
107
   */
108

109
  public java.util.List<Object> getInputs() {
110
    return this.inputs;
×
111
  }
112

113
  private java.util.List<Object> outputs;
114

115
  /**
116
   * Getter for property <I>https://w3id.org/cwl/cwl#outputs</I><BR>
117
   * <BLOCKQUOTE>
118
   * Defines the parameters representing the output of the process.  May be
119
   * used to generate and/or validate the output object.
120
   *    * </BLOCKQUOTE>
121
   */
122

123
  public java.util.List<Object> getOutputs() {
124
    return this.outputs;
×
125
  }
126

127
  private java.util.Optional<java.util.List<Object>> requirements;
128

129
  /**
130
   * Getter for property <I>https://w3id.org/cwl/cwl#requirements</I><BR>
131
   * <BLOCKQUOTE>
132
   * Declares requirements that apply to either the runtime environment or the
133
   * workflow engine that must be met in order to execute this process.  If
134
   * an implementation cannot satisfy all requirements, or a requirement is
135
   * listed which is not recognized by the implementation, it is a fatal
136
   * error and the implementation must not attempt to run the process,
137
   * unless overridden at user option.
138
   *    * </BLOCKQUOTE>
139
   */
140

141
  public java.util.Optional<java.util.List<Object>> getRequirements() {
142
    return this.requirements;
1✔
143
  }
144

145
  private java.util.Optional<java.util.List<Object>> hints;
146

147
  /**
148
   * Getter for property <I>https://w3id.org/cwl/cwl#hints</I><BR>
149
   * <BLOCKQUOTE>
150
   * Declares hints applying to either the runtime environment or the
151
   * workflow engine that may be helpful in executing this process.  It is
152
   * not an error if an implementation cannot satisfy all hints, however
153
   * the implementation may report a warning.
154
   *    * </BLOCKQUOTE>
155
   */
156

157
  public java.util.Optional<java.util.List<Object>> getHints() {
158
    return this.hints;
1✔
159
  }
160

161
  private java.util.Optional<CWLVersion> cwlVersion;
162

163
  /**
164
   * Getter for property <I>https://w3id.org/cwl/cwl#cwlVersion</I><BR>
165
   * <BLOCKQUOTE>
166
   * CWL document version. Always required at the document root. Not
167
   * required for a Process embedded inside another Process.
168
   *    * </BLOCKQUOTE>
169
   */
170

171
  public java.util.Optional<CWLVersion> getCwlVersion() {
172
    return this.cwlVersion;
1✔
173
  }
174

175
  private java.util.Optional<java.util.List<String>> intent;
176

177
  /**
178
   * Getter for property <I>https://w3id.org/cwl/cwl#Process/intent</I><BR>
179
   * <BLOCKQUOTE>
180
   * An identifier for the type of computational operation, of this Process.
181
   * Especially useful for [`Operation`](Workflow.html#Operation), but can also be used for
182
   * [`CommandLineTool`](CommandLineTool.html#CommandLineTool),
183
   * [`Workflow`](Workflow.html#Workflow), or [ExpressionTool](Workflow.html#ExpressionTool).
184
   * 
185
   * If provided, then this must be an IRI of a concept node that
186
   * represents the type of operation, preferably defined within an ontology.
187
   * 
188
   * For example, in the domain of bioinformatics, one can use an IRI from
189
   * the EDAM Ontology's [Operation concept nodes](http://edamontology.org/operation_0004),
190
   * like [Alignment](http://edamontology.org/operation_2928),
191
   * or [Clustering](http://edamontology.org/operation_3432); or a more
192
   * specific Operation concept like
193
   * [Split read mapping](http://edamontology.org/operation_3199).
194
   *    * </BLOCKQUOTE>
195
   */
196

197
  public java.util.Optional<java.util.List<String>> getIntent() {
198
    return this.intent;
×
199
  }
200

201
  private Object baseCommand;
202

203
  /**
204
   * Getter for property <I>https://w3id.org/cwl/cwl#baseCommand</I><BR>
205
   * <BLOCKQUOTE>
206
   * Specifies the program to execute.  If an array, the first element of
207
   * the array is the command to execute, and subsequent elements are
208
   * mandatory command line arguments.  The elements in `baseCommand` must
209
   * appear before any command line bindings from `inputBinding` or
210
   * `arguments`.
211
   * 
212
   * If `baseCommand` is not provided or is an empty array, the first
213
   * element of the command line produced after processing `inputBinding` or
214
   * `arguments` must be used as the program to execute.
215
   * 
216
   * If the program includes a path separator character it must
217
   * be an absolute path, otherwise it is an error.  If the program does not
218
   * include a path separator, search the `$PATH` variable in the runtime
219
   * environment of the workflow runner find the absolute path of the
220
   * executable.
221
   *    * </BLOCKQUOTE>
222
   */
223

224
  public Object getBaseCommand() {
225
    return this.baseCommand;
×
226
  }
227

228
  private java.util.Optional<java.util.List<Object>> arguments;
229

230
  /**
231
   * Getter for property <I>https://w3id.org/cwl/cwl#arguments</I><BR>
232
   * <BLOCKQUOTE>
233
   * Command line bindings which are not directly associated with input
234
   * parameters. If the value is a string, it is used as a string literal
235
   * argument. If it is an Expression, the result of the evaluation is used
236
   * as an argument.
237
   *    * </BLOCKQUOTE>
238
   */
239

240
  public java.util.Optional<java.util.List<Object>> getArguments() {
241
    return this.arguments;
×
242
  }
243

244
  private Object stdin;
245

246
  /**
247
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineTool/stdin</I><BR>
248
   * <BLOCKQUOTE>
249
   * A path to a file whose contents must be piped into the command's
250
   * standard input stream.
251
   *    * </BLOCKQUOTE>
252
   */
253

254
  public Object getStdin() {
255
    return this.stdin;
×
256
  }
257

258
  private Object stderr;
259

260
  /**
261
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineTool/stderr</I><BR>
262
   * <BLOCKQUOTE>
263
   * Capture the command's standard error stream to a file written to
264
   * the designated output directory.
265
   * 
266
   * If `stderr` is a string, it specifies the file name to use.
267
   * 
268
   * If `stderr` is an expression, the expression is evaluated and must
269
   * return a string with the file name to use to capture stderr.  If the
270
   * return value is not a string, or the resulting path contains illegal
271
   * characters (such as the path separator `/`) it is an error.
272
   *    * </BLOCKQUOTE>
273
   */
274

275
  public Object getStderr() {
276
    return this.stderr;
×
277
  }
278

279
  private Object stdout;
280

281
  /**
282
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineTool/stdout</I><BR>
283
   * <BLOCKQUOTE>
284
   * Capture the command's standard output stream to a file written to
285
   * the designated output directory.
286
   * 
287
   * If the `CommandLineTool` contains logically chained commands
288
   * (e.g. `echo a && echo b`) `stdout` must include the output of
289
   * every command.
290
   * 
291
   * If `stdout` is a string, it specifies the file name to use.
292
   * 
293
   * If `stdout` is an expression, the expression is evaluated and must
294
   * return a string with the file name to use to capture stdout.  If the
295
   * return value is not a string, or the resulting path contains illegal
296
   * characters (such as the path separator `/`) it is an error.
297
   *    * </BLOCKQUOTE>
298
   */
299

300
  public Object getStdout() {
301
    return this.stdout;
×
302
  }
303

304
  private java.util.Optional<java.util.List<Object>> successCodes;
305

306
  /**
307
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineTool/successCodes</I><BR>
308
   * <BLOCKQUOTE>
309
   * Exit codes that indicate the process completed successfully.
310
   * 
311
   * If not specified, only exit code 0 is considered success.
312
   *    * </BLOCKQUOTE>
313
   */
314

315
  public java.util.Optional<java.util.List<Object>> getSuccessCodes() {
316
    return this.successCodes;
×
317
  }
318

319
  private java.util.Optional<java.util.List<Object>> temporaryFailCodes;
320

321
  /**
322
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineTool/temporaryFailCodes</I><BR>
323
   * <BLOCKQUOTE>
324
   * Exit codes that indicate the process failed due to a possibly
325
   * temporary condition, where executing the process with the same
326
   * runtime environment and inputs may produce different results.
327
   * 
328
   * If not specified, no exit codes are considered temporary failure.
329
   *    * </BLOCKQUOTE>
330
   */
331

332
  public java.util.Optional<java.util.List<Object>> getTemporaryFailCodes() {
333
    return this.temporaryFailCodes;
×
334
  }
335

336
  private java.util.Optional<java.util.List<Object>> permanentFailCodes;
337

338
  /**
339
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineTool/permanentFailCodes</I><BR>
340
   * <BLOCKQUOTE>
341
   * Exit codes that indicate the process failed due to a permanent logic error, where executing the process with the same runtime environment and same inputs is expected to always fail.
342
   * If not specified, all exit codes except 0 are considered permanent failure.   * </BLOCKQUOTE>
343
   */
344

345
  public java.util.Optional<java.util.List<Object>> getPermanentFailCodes() {
346
    return this.permanentFailCodes;
×
347
  }
348

349
  /**
350
   * Used by {@link org.w3id.cwl.cwl1_2.utils.RootLoader} to construct instances of CommandLineToolImpl.
351
   *
352
   * @param __doc_            Document fragment to load this record object from (presumably a
353
                              {@link java.util.Map}).
354
   * @param __baseUri_        Base URI to generate child document IDs against.
355
   * @param __loadingOptions  Context for loading URIs and populating objects.
356
   * @param __docRoot_        ID at this position in the document (if available) (maybe?)
357
   * @throws ValidationException If the document fragment is not a {@link java.util.Map}
358
   *                             or validation of fields fails.
359
   */
360
  public CommandLineToolImpl(
361
      final Object __doc_,
362
      final String __baseUri_,
363
      LoadingOptions __loadingOptions,
364
      final String __docRoot_) {
365
    super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
1✔
366
    // Prefix plumbing variables with '__' to reduce likelihood of collision with
367
    // generated names.
368
    String __baseUri = __baseUri_;
1✔
369
    String __docRoot = __docRoot_;
1✔
370
    if (!(__doc_ instanceof java.util.Map)) {
1✔
371
      throw new ValidationException("CommandLineToolImpl called on non-map");
×
372
    }
373
    final java.util.Map<String, Object> __doc = (java.util.Map<String, Object>) __doc_;
1✔
374
    final java.util.List<ValidationException> __errors =
1✔
375
        new java.util.ArrayList<ValidationException>();
376
    if (__loadingOptions != null) {
1✔
377
      this.loadingOptions_ = __loadingOptions;
1✔
378
    }
379
    java.util.Optional<String> id;
380

381
    if (__doc.containsKey("id")) {
1✔
382
      try {
383
        id =
1✔
384
            LoaderInstances
385
                .uri_optional_StringInstance_True_False_None_None
386
                .loadField(__doc.get("id"), __baseUri, __loadingOptions);
1✔
387
      } catch (ValidationException e) {
×
388
        id = null; // won't be used but prevents compiler from complaining.
×
389
        final String __message = "the `id` field is not valid because:";
×
390
        __errors.add(new ValidationException(__message, e));
×
391
      }
1✔
392

393
    } else {
394
      id = null;
1✔
395
    }
396

397
    Boolean __original_is_null = id == null;
1✔
398
    if (id == null) {
1✔
399
      if (__docRoot != null) {
1✔
400
        id = java.util.Optional.of(__docRoot);
1✔
401
      } else {
402
        id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
1✔
403
      }
404
    }
405
    if (__original_is_null) {
1✔
406
        __baseUri = __baseUri_;
1✔
407
    } else {
408
        __baseUri = (String) id.orElse(null);
1✔
409
    }
410
    CommandLineTool_class class_;
411
    try {
412
      class_ =
1✔
413
          LoaderInstances
414
              .uri_CommandLineTool_class_False_True_None_None
415
              .loadField(__doc.get("class"), __baseUri, __loadingOptions);
1✔
416
    } catch (ValidationException e) {
1✔
417
      class_ = null; // won't be used but prevents compiler from complaining.
1✔
418
      final String __message = "the `class` field is not valid because:";
1✔
419
      __errors.add(new ValidationException(__message, e));
1✔
420
    }
1✔
421
    java.util.Optional<String> label;
422

423
    if (__doc.containsKey("label")) {
1✔
424
      try {
425
        label =
1✔
426
            LoaderInstances
427
                .optional_StringInstance
428
                .loadField(__doc.get("label"), __baseUri, __loadingOptions);
1✔
429
      } catch (ValidationException e) {
×
430
        label = null; // won't be used but prevents compiler from complaining.
×
431
        final String __message = "the `label` field is not valid because:";
×
432
        __errors.add(new ValidationException(__message, e));
×
433
      }
1✔
434

435
    } else {
436
      label = null;
1✔
437
    }
438
    Object doc;
439

440
    if (__doc.containsKey("doc")) {
1✔
441
      try {
442
        doc =
1✔
443
            LoaderInstances
444
                .union_of_NullInstance_or_StringInstance_or_array_of_StringInstance
445
                .loadField(__doc.get("doc"), __baseUri, __loadingOptions);
1✔
446
      } catch (ValidationException e) {
×
447
        doc = null; // won't be used but prevents compiler from complaining.
×
448
        final String __message = "the `doc` field is not valid because:";
×
449
        __errors.add(new ValidationException(__message, e));
×
450
      }
1✔
451

452
    } else {
453
      doc = null;
1✔
454
    }
455
    java.util.List<Object> inputs;
456
    try {
457
      inputs =
1✔
458
          LoaderInstances
459
              .idmap_inputs_array_of_CommandInputParameter
460
              .loadField(__doc.get("inputs"), __baseUri, __loadingOptions);
1✔
461
    } catch (ValidationException e) {
×
462
      inputs = null; // won't be used but prevents compiler from complaining.
×
463
      final String __message = "the `inputs` field is not valid because:";
×
464
      __errors.add(new ValidationException(__message, e));
×
465
    }
1✔
466
    java.util.List<Object> outputs;
467
    try {
468
      outputs =
1✔
469
          LoaderInstances
470
              .idmap_outputs_array_of_CommandOutputParameter
471
              .loadField(__doc.get("outputs"), __baseUri, __loadingOptions);
1✔
472
    } catch (ValidationException e) {
×
473
      outputs = null; // won't be used but prevents compiler from complaining.
×
474
      final String __message = "the `outputs` field is not valid because:";
×
475
      __errors.add(new ValidationException(__message, e));
×
476
    }
1✔
477
    java.util.Optional<java.util.List<Object>> requirements;
478

479
    if (__doc.containsKey("requirements")) {
1✔
480
      try {
481
        requirements =
1✔
482
            LoaderInstances
483
                .idmap_requirements_optional_array_of_union_of_InlineJavascriptRequirement_or_SchemaDefRequirement_or_LoadListingRequirement_or_DockerRequirement_or_SoftwareRequirement_or_InitialWorkDirRequirement_or_EnvVarRequirement_or_ShellCommandRequirement_or_ResourceRequirement_or_WorkReuse_or_NetworkAccess_or_InplaceUpdateRequirement_or_ToolTimeLimit_or_SubworkflowFeatureRequirement_or_ScatterFeatureRequirement_or_MultipleInputFeatureRequirement_or_StepInputExpressionRequirement
484
                .loadField(__doc.get("requirements"), __baseUri, __loadingOptions);
1✔
485
      } catch (ValidationException e) {
×
486
        requirements = null; // won't be used but prevents compiler from complaining.
×
487
        final String __message = "the `requirements` field is not valid because:";
×
488
        __errors.add(new ValidationException(__message, e));
×
489
      }
1✔
490

491
    } else {
492
      requirements = null;
1✔
493
    }
494
    java.util.Optional<java.util.List<Object>> hints;
495

496
    if (__doc.containsKey("hints")) {
1✔
497
      try {
498
        hints =
1✔
499
            LoaderInstances
500
                .idmap_hints_optional_array_of_union_of_InlineJavascriptRequirement_or_SchemaDefRequirement_or_LoadListingRequirement_or_DockerRequirement_or_SoftwareRequirement_or_InitialWorkDirRequirement_or_EnvVarRequirement_or_ShellCommandRequirement_or_ResourceRequirement_or_WorkReuse_or_NetworkAccess_or_InplaceUpdateRequirement_or_ToolTimeLimit_or_SubworkflowFeatureRequirement_or_ScatterFeatureRequirement_or_MultipleInputFeatureRequirement_or_StepInputExpressionRequirement_or_AnyInstance
501
                .loadField(__doc.get("hints"), __baseUri, __loadingOptions);
1✔
502
      } catch (ValidationException e) {
×
503
        hints = null; // won't be used but prevents compiler from complaining.
×
504
        final String __message = "the `hints` field is not valid because:";
×
505
        __errors.add(new ValidationException(__message, e));
×
506
      }
1✔
507

508
    } else {
509
      hints = null;
1✔
510
    }
511
    java.util.Optional<CWLVersion> cwlVersion;
512

513
    if (__doc.containsKey("cwlVersion")) {
1✔
514
      try {
515
        cwlVersion =
1✔
516
            LoaderInstances
517
                .uri_optional_CWLVersion_False_True_None_None
518
                .loadField(__doc.get("cwlVersion"), __baseUri, __loadingOptions);
1✔
519
      } catch (ValidationException e) {
×
520
        cwlVersion = null; // won't be used but prevents compiler from complaining.
×
521
        final String __message = "the `cwlVersion` field is not valid because:";
×
522
        __errors.add(new ValidationException(__message, e));
×
523
      }
1✔
524

525
    } else {
526
      cwlVersion = null;
1✔
527
    }
528
    java.util.Optional<java.util.List<String>> intent;
529

530
    if (__doc.containsKey("intent")) {
1✔
531
      try {
532
        intent =
×
533
            LoaderInstances
534
                .uri_optional_array_of_StringInstance_True_False_None_None
535
                .loadField(__doc.get("intent"), __baseUri, __loadingOptions);
×
536
      } catch (ValidationException e) {
×
537
        intent = null; // won't be used but prevents compiler from complaining.
×
538
        final String __message = "the `intent` field is not valid because:";
×
539
        __errors.add(new ValidationException(__message, e));
×
540
      }
×
541

542
    } else {
543
      intent = null;
1✔
544
    }
545
    Object baseCommand;
546

547
    if (__doc.containsKey("baseCommand")) {
1✔
548
      try {
549
        baseCommand =
1✔
550
            LoaderInstances
551
                .union_of_NullInstance_or_StringInstance_or_array_of_StringInstance
552
                .loadField(__doc.get("baseCommand"), __baseUri, __loadingOptions);
1✔
553
      } catch (ValidationException e) {
×
554
        baseCommand = null; // won't be used but prevents compiler from complaining.
×
555
        final String __message = "the `baseCommand` field is not valid because:";
×
556
        __errors.add(new ValidationException(__message, e));
×
557
      }
1✔
558

559
    } else {
560
      baseCommand = null;
1✔
561
    }
562
    java.util.Optional<java.util.List<Object>> arguments;
563

564
    if (__doc.containsKey("arguments")) {
1✔
565
      try {
566
        arguments =
1✔
567
            LoaderInstances
568
                .optional_array_of_union_of_StringInstance_or_ExpressionLoader_or_CommandLineBinding
569
                .loadField(__doc.get("arguments"), __baseUri, __loadingOptions);
1✔
570
      } catch (ValidationException e) {
×
571
        arguments = null; // won't be used but prevents compiler from complaining.
×
572
        final String __message = "the `arguments` field is not valid because:";
×
573
        __errors.add(new ValidationException(__message, e));
×
574
      }
1✔
575

576
    } else {
577
      arguments = null;
1✔
578
    }
579
    Object stdin;
580

581
    if (__doc.containsKey("stdin")) {
1✔
582
      try {
583
        stdin =
1✔
584
            LoaderInstances
585
                .union_of_NullInstance_or_StringInstance_or_ExpressionLoader
586
                .loadField(__doc.get("stdin"), __baseUri, __loadingOptions);
1✔
587
      } catch (ValidationException e) {
×
588
        stdin = null; // won't be used but prevents compiler from complaining.
×
589
        final String __message = "the `stdin` field is not valid because:";
×
590
        __errors.add(new ValidationException(__message, e));
×
591
      }
1✔
592

593
    } else {
594
      stdin = null;
1✔
595
    }
596
    Object stderr;
597

598
    if (__doc.containsKey("stderr")) {
1✔
599
      try {
600
        stderr =
1✔
601
            LoaderInstances
602
                .union_of_NullInstance_or_StringInstance_or_ExpressionLoader
603
                .loadField(__doc.get("stderr"), __baseUri, __loadingOptions);
1✔
604
      } catch (ValidationException e) {
×
605
        stderr = null; // won't be used but prevents compiler from complaining.
×
606
        final String __message = "the `stderr` field is not valid because:";
×
607
        __errors.add(new ValidationException(__message, e));
×
608
      }
1✔
609

610
    } else {
611
      stderr = null;
1✔
612
    }
613
    Object stdout;
614

615
    if (__doc.containsKey("stdout")) {
1✔
616
      try {
617
        stdout =
1✔
618
            LoaderInstances
619
                .union_of_NullInstance_or_StringInstance_or_ExpressionLoader
620
                .loadField(__doc.get("stdout"), __baseUri, __loadingOptions);
1✔
621
      } catch (ValidationException e) {
×
622
        stdout = null; // won't be used but prevents compiler from complaining.
×
623
        final String __message = "the `stdout` field is not valid because:";
×
624
        __errors.add(new ValidationException(__message, e));
×
625
      }
1✔
626

627
    } else {
628
      stdout = null;
1✔
629
    }
630
    java.util.Optional<java.util.List<Object>> successCodes;
631

632
    if (__doc.containsKey("successCodes")) {
1✔
633
      try {
634
        successCodes =
1✔
635
            LoaderInstances
636
                .optional_array_of_IntegerInstance
637
                .loadField(__doc.get("successCodes"), __baseUri, __loadingOptions);
1✔
638
      } catch (ValidationException e) {
×
639
        successCodes = null; // won't be used but prevents compiler from complaining.
×
640
        final String __message = "the `successCodes` field is not valid because:";
×
641
        __errors.add(new ValidationException(__message, e));
×
642
      }
1✔
643

644
    } else {
645
      successCodes = null;
1✔
646
    }
647
    java.util.Optional<java.util.List<Object>> temporaryFailCodes;
648

649
    if (__doc.containsKey("temporaryFailCodes")) {
1✔
650
      try {
651
        temporaryFailCodes =
1✔
652
            LoaderInstances
653
                .optional_array_of_IntegerInstance
654
                .loadField(__doc.get("temporaryFailCodes"), __baseUri, __loadingOptions);
1✔
655
      } catch (ValidationException e) {
×
656
        temporaryFailCodes = null; // won't be used but prevents compiler from complaining.
×
657
        final String __message = "the `temporaryFailCodes` field is not valid because:";
×
658
        __errors.add(new ValidationException(__message, e));
×
659
      }
1✔
660

661
    } else {
662
      temporaryFailCodes = null;
1✔
663
    }
664
    java.util.Optional<java.util.List<Object>> permanentFailCodes;
665

666
    if (__doc.containsKey("permanentFailCodes")) {
1✔
667
      try {
668
        permanentFailCodes =
1✔
669
            LoaderInstances
670
                .optional_array_of_IntegerInstance
671
                .loadField(__doc.get("permanentFailCodes"), __baseUri, __loadingOptions);
1✔
672
      } catch (ValidationException e) {
×
673
        permanentFailCodes = null; // won't be used but prevents compiler from complaining.
×
674
        final String __message = "the `permanentFailCodes` field is not valid because:";
×
675
        __errors.add(new ValidationException(__message, e));
×
676
      }
1✔
677

678
    } else {
679
      permanentFailCodes = null;
1✔
680
    }
681
    if (!__errors.isEmpty()) {
1✔
682
      throw new ValidationException("Trying 'RecordField'", __errors);
1✔
683
    }
684
    this.id = (java.util.Optional<String>) id;
1✔
685
    this.label = (java.util.Optional<String>) label;
1✔
686
    this.doc = (Object) doc;
1✔
687
    this.inputs = (java.util.List<Object>) inputs;
1✔
688
    this.outputs = (java.util.List<Object>) outputs;
1✔
689
    this.requirements = (java.util.Optional<java.util.List<Object>>) requirements;
1✔
690
    this.hints = (java.util.Optional<java.util.List<Object>>) hints;
1✔
691
    this.cwlVersion = (java.util.Optional<CWLVersion>) cwlVersion;
1✔
692
    this.intent = (java.util.Optional<java.util.List<String>>) intent;
1✔
693
    this.class_ = (CommandLineTool_class) class_;
1✔
694
    this.baseCommand = (Object) baseCommand;
1✔
695
    this.arguments = (java.util.Optional<java.util.List<Object>>) arguments;
1✔
696
    this.stdin = (Object) stdin;
1✔
697
    this.stderr = (Object) stderr;
1✔
698
    this.stdout = (Object) stdout;
1✔
699
    this.successCodes = (java.util.Optional<java.util.List<Object>>) successCodes;
1✔
700
    this.temporaryFailCodes = (java.util.Optional<java.util.List<Object>>) temporaryFailCodes;
1✔
701
    this.permanentFailCodes = (java.util.Optional<java.util.List<Object>>) permanentFailCodes;
1✔
702
    for (String field:__doc.keySet()) {
1✔
703
      if (!attrs.contains(field)) {
1✔
704
        if (field.contains(":")) {
1✔
705
          String expanded_field = __loadingOptions.expandUrl(field, "", false, false, null);
1✔
706
          extensionFields_.put(expanded_field, __doc.get(field));
1✔
707
        }
708
      }
709
    }
1✔
710
  }
1✔
711
  private java.util.List<String> attrs = java.util.Arrays.asList("id", "label", "doc", "inputs", "outputs", "requirements", "hints", "cwlVersion", "intent", "class", "baseCommand", "arguments", "stdin", "stderr", "stdout", "successCodes", "temporaryFailCodes", "permanentFailCodes");
1✔
712
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc