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

common-workflow-language / cwljava / #339

29 Jan 2025 01:23PM UTC coverage: 59.538% (-0.6%) from 60.167%
#339

Pull #193

github

web-flow
Merge 94c260498 into 0978523bc
Pull Request #193: Add accessor for the extension field.

0 of 129 new or added lines in 129 files covered. (0.0%)

7347 of 12340 relevant lines covered (59.54%)

0.6 hits per line

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

59.07
/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 java.util.Map<String, Object> getExtensionFields() {
NEW
33
    return this.extensionFields_;
×
34
  }
35

36
  private java.util.Optional<String> id;
37

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

48
  public java.util.Optional<String> getId() {
49
    return this.id;
×
50
  }
51

52
  private CommandLineTool_class class_;
53

54
  /**
55
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineTool/class</I><BR>
56

57
   */
58

59
  public CommandLineTool_class getClass_() {
60
    return this.class_;
×
61
  }
62

63
  private java.util.Optional<String> label;
64

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

71
  public java.util.Optional<String> getLabel() {
72
    return this.label;
×
73
  }
74

75
  private Object doc;
76

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

83
  public Object getDoc() {
84
    return this.doc;
×
85
  }
86

87
  private java.util.List<Object> inputs;
88

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

106
  public java.util.List<Object> getInputs() {
107
    return this.inputs;
×
108
  }
109

110
  private java.util.List<Object> outputs;
111

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

120
  public java.util.List<Object> getOutputs() {
121
    return this.outputs;
×
122
  }
123

124
  private java.util.Optional<java.util.List<Object>> requirements;
125

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

138
  public java.util.Optional<java.util.List<Object>> getRequirements() {
139
    return this.requirements;
1✔
140
  }
141

142
  private java.util.Optional<java.util.List<Object>> hints;
143

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

154
  public java.util.Optional<java.util.List<Object>> getHints() {
155
    return this.hints;
1✔
156
  }
157

158
  private java.util.Optional<CWLVersion> cwlVersion;
159

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

168
  public java.util.Optional<CWLVersion> getCwlVersion() {
169
    return this.cwlVersion;
1✔
170
  }
171

172
  private java.util.Optional<java.util.List<String>> intent;
173

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

194
  public java.util.Optional<java.util.List<String>> getIntent() {
195
    return this.intent;
×
196
  }
197

198
  private Object baseCommand;
199

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

221
  public Object getBaseCommand() {
222
    return this.baseCommand;
×
223
  }
224

225
  private java.util.Optional<java.util.List<Object>> arguments;
226

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

237
  public java.util.Optional<java.util.List<Object>> getArguments() {
238
    return this.arguments;
×
239
  }
240

241
  private Object stdin;
242

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

251
  public Object getStdin() {
252
    return this.stdin;
×
253
  }
254

255
  private Object stderr;
256

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

272
  public Object getStderr() {
273
    return this.stderr;
×
274
  }
275

276
  private Object stdout;
277

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

297
  public Object getStdout() {
298
    return this.stdout;
×
299
  }
300

301
  private java.util.Optional<java.util.List<Object>> successCodes;
302

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

312
  public java.util.Optional<java.util.List<Object>> getSuccessCodes() {
313
    return this.successCodes;
×
314
  }
315

316
  private java.util.Optional<java.util.List<Object>> temporaryFailCodes;
317

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

329
  public java.util.Optional<java.util.List<Object>> getTemporaryFailCodes() {
330
    return this.temporaryFailCodes;
×
331
  }
332

333
  private java.util.Optional<java.util.List<Object>> permanentFailCodes;
334

335
  /**
336
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineTool/permanentFailCodes</I><BR>
337
   * <BLOCKQUOTE>
338
   * 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.
339
   * If not specified, all exit codes except 0 are considered permanent failure.   * </BLOCKQUOTE>
340
   */
341

342
  public java.util.Optional<java.util.List<Object>> getPermanentFailCodes() {
343
    return this.permanentFailCodes;
×
344
  }
345

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

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

390
    } else {
391
      id = null;
1✔
392
    }
393

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

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

432
    } else {
433
      label = null;
1✔
434
    }
435
    Object doc;
436

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

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

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

488
    } else {
489
      requirements = null;
1✔
490
    }
491
    java.util.Optional<java.util.List<Object>> hints;
492

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

505
    } else {
506
      hints = null;
1✔
507
    }
508
    java.util.Optional<CWLVersion> cwlVersion;
509

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

522
    } else {
523
      cwlVersion = null;
1✔
524
    }
525
    java.util.Optional<java.util.List<String>> intent;
526

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

539
    } else {
540
      intent = null;
1✔
541
    }
542
    Object baseCommand;
543

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

556
    } else {
557
      baseCommand = null;
1✔
558
    }
559
    java.util.Optional<java.util.List<Object>> arguments;
560

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

573
    } else {
574
      arguments = null;
1✔
575
    }
576
    Object stdin;
577

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

590
    } else {
591
      stdin = null;
1✔
592
    }
593
    Object stderr;
594

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

607
    } else {
608
      stderr = null;
1✔
609
    }
610
    Object stdout;
611

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

624
    } else {
625
      stdout = null;
1✔
626
    }
627
    java.util.Optional<java.util.List<Object>> successCodes;
628

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

641
    } else {
642
      successCodes = null;
1✔
643
    }
644
    java.util.Optional<java.util.List<Object>> temporaryFailCodes;
645

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

658
    } else {
659
      temporaryFailCodes = null;
1✔
660
    }
661
    java.util.Optional<java.util.List<Object>> permanentFailCodes;
662

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

675
    } else {
676
      permanentFailCodes = null;
1✔
677
    }
678
    if (!__errors.isEmpty()) {
1✔
679
      throw new ValidationException("Trying 'RecordField'", __errors);
1✔
680
    }
681
    this.id = (java.util.Optional<String>) id;
1✔
682
    this.label = (java.util.Optional<String>) label;
1✔
683
    this.doc = (Object) doc;
1✔
684
    this.inputs = (java.util.List<Object>) inputs;
1✔
685
    this.outputs = (java.util.List<Object>) outputs;
1✔
686
    this.requirements = (java.util.Optional<java.util.List<Object>>) requirements;
1✔
687
    this.hints = (java.util.Optional<java.util.List<Object>>) hints;
1✔
688
    this.cwlVersion = (java.util.Optional<CWLVersion>) cwlVersion;
1✔
689
    this.intent = (java.util.Optional<java.util.List<String>>) intent;
1✔
690
    this.class_ = (CommandLineTool_class) class_;
1✔
691
    this.baseCommand = (Object) baseCommand;
1✔
692
    this.arguments = (java.util.Optional<java.util.List<Object>>) arguments;
1✔
693
    this.stdin = (Object) stdin;
1✔
694
    this.stderr = (Object) stderr;
1✔
695
    this.stdout = (Object) stdout;
1✔
696
    this.successCodes = (java.util.Optional<java.util.List<Object>>) successCodes;
1✔
697
    this.temporaryFailCodes = (java.util.Optional<java.util.List<Object>>) temporaryFailCodes;
1✔
698
    this.permanentFailCodes = (java.util.Optional<java.util.List<Object>>) permanentFailCodes;
1✔
699
  }
1✔
700
}
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