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

common-workflow-language / cwljava / #394

31 Oct 2025 04:10PM UTC coverage: 57.972% (-1.6%) from 59.538%
#394

push

github

mr-c
rename package to a namespace that we control

7575 of 12994 new or added lines in 261 files covered. (58.3%)

7752 of 13372 relevant lines covered (57.97%)

0.58 hits per line

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

61.79
/src/main/java/org/commonwl/cwlsdk/cwl1_1/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.commonwl.cwlsdk.cwl1_1;
16

17
import org.commonwl.cwlsdk.cwl1_1.utils.LoaderInstances;
18
import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
19
import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptionsBuilder;
20
import org.commonwl.cwlsdk.cwl1_1.utils.SaveableImpl;
21
import org.commonwl.cwlsdk.cwl1_1.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() {
NEW
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#Identified/id</I><BR>
43
   * <BLOCKQUOTE>
44
   * The unique identifier for this object.   * </BLOCKQUOTE>
45
   */
46

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

51
  private CommandLineTool_class class_;
52

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

56
   */
57

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

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

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

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

74
  private Object doc;
75

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

171
  private Object baseCommand;
172

173
  /**
174
   * Getter for property <I>https://w3id.org/cwl/cwl#baseCommand</I><BR>
175
   * <BLOCKQUOTE>
176
   * Specifies the program to execute.  If an array, the first element of
177
   * the array is the command to execute, and subsequent elements are
178
   * mandatory command line arguments.  The elements in `baseCommand` must
179
   * appear before any command line bindings from `inputBinding` or
180
   * `arguments`.
181
   * 
182
   * If `baseCommand` is not provided or is an empty array, the first
183
   * element of the command line produced after processing `inputBinding` or
184
   * `arguments` must be used as the program to execute.
185
   * 
186
   * If the program includes a path separator character it must
187
   * be an absolute path, otherwise it is an error.  If the program does not
188
   * include a path separator, search the `$PATH` variable in the runtime
189
   * environment of the workflow runner find the absolute path of the
190
   * executable.
191
   *    * </BLOCKQUOTE>
192
   */
193

194
  public Object getBaseCommand() {
NEW
195
    return this.baseCommand;
×
196
  }
197

198
  private java.util.Optional<java.util.List<Object>> arguments;
199

200
  /**
201
   * Getter for property <I>https://w3id.org/cwl/cwl#arguments</I><BR>
202
   * <BLOCKQUOTE>
203
   * Command line bindings which are not directly associated with input
204
   * parameters. If the value is a string, it is used as a string literal
205
   * argument. If it is an Expression, the result of the evaluation is used
206
   * as an argument.
207
   *    * </BLOCKQUOTE>
208
   */
209

210
  public java.util.Optional<java.util.List<Object>> getArguments() {
NEW
211
    return this.arguments;
×
212
  }
213

214
  private Object stdin;
215

216
  /**
217
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineTool/stdin</I><BR>
218
   * <BLOCKQUOTE>
219
   * A path to a file whose contents must be piped into the command's
220
   * standard input stream.
221
   *    * </BLOCKQUOTE>
222
   */
223

224
  public Object getStdin() {
NEW
225
    return this.stdin;
×
226
  }
227

228
  private Object stderr;
229

230
  /**
231
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineTool/stderr</I><BR>
232
   * <BLOCKQUOTE>
233
   * Capture the command's standard error stream to a file written to
234
   * the designated output directory.
235
   * 
236
   * If `stderr` is a string, it specifies the file name to use.
237
   * 
238
   * If `stderr` is an expression, the expression is evaluated and must
239
   * return a string with the file name to use to capture stderr.  If the
240
   * return value is not a string, or the resulting path contains illegal
241
   * characters (such as the path separator `/`) it is an error.
242
   *    * </BLOCKQUOTE>
243
   */
244

245
  public Object getStderr() {
NEW
246
    return this.stderr;
×
247
  }
248

249
  private Object stdout;
250

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

266
  public Object getStdout() {
NEW
267
    return this.stdout;
×
268
  }
269

270
  private java.util.Optional<java.util.List<Object>> successCodes;
271

272
  /**
273
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineTool/successCodes</I><BR>
274
   * <BLOCKQUOTE>
275
   * Exit codes that indicate the process completed successfully.
276
   *    * </BLOCKQUOTE>
277
   */
278

279
  public java.util.Optional<java.util.List<Object>> getSuccessCodes() {
NEW
280
    return this.successCodes;
×
281
  }
282

283
  private java.util.Optional<java.util.List<Object>> temporaryFailCodes;
284

285
  /**
286
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineTool/temporaryFailCodes</I><BR>
287
   * <BLOCKQUOTE>
288
   * Exit codes that indicate the process failed due to a possibly
289
   * temporary condition, where executing the process with the same
290
   * runtime environment and inputs may produce different results.
291
   *    * </BLOCKQUOTE>
292
   */
293

294
  public java.util.Optional<java.util.List<Object>> getTemporaryFailCodes() {
NEW
295
    return this.temporaryFailCodes;
×
296
  }
297

298
  private java.util.Optional<java.util.List<Object>> permanentFailCodes;
299

300
  /**
301
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineTool/permanentFailCodes</I><BR>
302
   * <BLOCKQUOTE>
303
   * 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.   * </BLOCKQUOTE>
304
   */
305

306
  public java.util.Optional<java.util.List<Object>> getPermanentFailCodes() {
NEW
307
    return this.permanentFailCodes;
×
308
  }
309

310
  /**
311
   * Used by {@link org.commonwl.cwlsdk.cwl1_1.utils.RootLoader} to construct instances of CommandLineToolImpl.
312
   *
313
   * @param __doc_            Document fragment to load this record object from (presumably a
314
                              {@link java.util.Map}).
315
   * @param __baseUri_        Base URI to generate child document IDs against.
316
   * @param __loadingOptions  Context for loading URIs and populating objects.
317
   * @param __docRoot_        ID at this position in the document (if available) (maybe?)
318
   * @throws ValidationException If the document fragment is not a {@link java.util.Map}
319
   *                             or validation of fields fails.
320
   */
321
  public CommandLineToolImpl(
322
      final Object __doc_,
323
      final String __baseUri_,
324
      LoadingOptions __loadingOptions,
325
      final String __docRoot_) {
326
    super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
1✔
327
    // Prefix plumbing variables with '__' to reduce likelihood of collision with
328
    // generated names.
329
    String __baseUri = __baseUri_;
1✔
330
    String __docRoot = __docRoot_;
1✔
331
    if (!(__doc_ instanceof java.util.Map)) {
1✔
NEW
332
      throw new ValidationException("CommandLineToolImpl called on non-map");
×
333
    }
334
    final java.util.Map<String, Object> __doc = (java.util.Map<String, Object>) __doc_;
1✔
335
    final java.util.List<ValidationException> __errors =
1✔
336
        new java.util.ArrayList<ValidationException>();
337
    if (__loadingOptions != null) {
1✔
338
      this.loadingOptions_ = __loadingOptions;
1✔
339
    }
340
    java.util.Optional<String> id;
341

342
    if (__doc.containsKey("id")) {
1✔
343
      try {
344
        id =
1✔
345
            LoaderInstances
346
                .uri_optional_StringInstance_True_False_None_None
347
                .loadField(__doc.get("id"), __baseUri, __loadingOptions);
1✔
NEW
348
      } catch (ValidationException e) {
×
NEW
349
        id = null; // won't be used but prevents compiler from complaining.
×
NEW
350
        final String __message = "the `id` field is not valid because:";
×
NEW
351
        __errors.add(new ValidationException(__message, e));
×
352
      }
1✔
353

354
    } else {
355
      id = null;
1✔
356
    }
357

358
    Boolean __original_is_null = id == null;
1✔
359
    if (id == null) {
1✔
360
      if (__docRoot != null) {
1✔
361
        id = java.util.Optional.of(__docRoot);
1✔
362
      } else {
363
        id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
1✔
364
      }
365
    }
366
    if (__original_is_null) {
1✔
367
        __baseUri = __baseUri_;
1✔
368
    } else {
369
        __baseUri = (String) id.orElse(null);
1✔
370
    }
371
    CommandLineTool_class class_;
372
    try {
373
      class_ =
1✔
374
          LoaderInstances
375
              .uri_CommandLineTool_class_False_True_None_None
376
              .loadField(__doc.get("class"), __baseUri, __loadingOptions);
1✔
377
    } catch (ValidationException e) {
1✔
378
      class_ = null; // won't be used but prevents compiler from complaining.
1✔
379
      final String __message = "the `class` field is not valid because:";
1✔
380
      __errors.add(new ValidationException(__message, e));
1✔
381
    }
1✔
382
    java.util.Optional<String> label;
383

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

396
    } else {
397
      label = null;
1✔
398
    }
399
    Object doc;
400

401
    if (__doc.containsKey("doc")) {
1✔
402
      try {
403
        doc =
1✔
404
            LoaderInstances
405
                .union_of_NullInstance_or_StringInstance_or_array_of_StringInstance
406
                .loadField(__doc.get("doc"), __baseUri, __loadingOptions);
1✔
NEW
407
      } catch (ValidationException e) {
×
NEW
408
        doc = null; // won't be used but prevents compiler from complaining.
×
NEW
409
        final String __message = "the `doc` field is not valid because:";
×
NEW
410
        __errors.add(new ValidationException(__message, e));
×
411
      }
1✔
412

413
    } else {
414
      doc = null;
1✔
415
    }
416
    java.util.List<Object> inputs;
417
    try {
418
      inputs =
1✔
419
          LoaderInstances
420
              .idmap_inputs_array_of_CommandInputParameter
421
              .loadField(__doc.get("inputs"), __baseUri, __loadingOptions);
1✔
NEW
422
    } catch (ValidationException e) {
×
NEW
423
      inputs = null; // won't be used but prevents compiler from complaining.
×
NEW
424
      final String __message = "the `inputs` field is not valid because:";
×
NEW
425
      __errors.add(new ValidationException(__message, e));
×
426
    }
1✔
427
    java.util.List<Object> outputs;
428
    try {
429
      outputs =
1✔
430
          LoaderInstances
431
              .idmap_outputs_array_of_CommandOutputParameter
432
              .loadField(__doc.get("outputs"), __baseUri, __loadingOptions);
1✔
NEW
433
    } catch (ValidationException e) {
×
NEW
434
      outputs = null; // won't be used but prevents compiler from complaining.
×
NEW
435
      final String __message = "the `outputs` field is not valid because:";
×
NEW
436
      __errors.add(new ValidationException(__message, e));
×
437
    }
1✔
438
    java.util.Optional<java.util.List<Object>> requirements;
439

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

452
    } else {
453
      requirements = null;
1✔
454
    }
455
    java.util.Optional<java.util.List<Object>> hints;
456

457
    if (__doc.containsKey("hints")) {
1✔
458
      try {
459
        hints =
1✔
460
            LoaderInstances
461
                .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
462
                .loadField(__doc.get("hints"), __baseUri, __loadingOptions);
1✔
NEW
463
      } catch (ValidationException e) {
×
NEW
464
        hints = null; // won't be used but prevents compiler from complaining.
×
NEW
465
        final String __message = "the `hints` field is not valid because:";
×
NEW
466
        __errors.add(new ValidationException(__message, e));
×
467
      }
1✔
468

469
    } else {
470
      hints = null;
1✔
471
    }
472
    java.util.Optional<CWLVersion> cwlVersion;
473

474
    if (__doc.containsKey("cwlVersion")) {
1✔
475
      try {
476
        cwlVersion =
1✔
477
            LoaderInstances
478
                .uri_optional_CWLVersion_False_True_None_None
479
                .loadField(__doc.get("cwlVersion"), __baseUri, __loadingOptions);
1✔
NEW
480
      } catch (ValidationException e) {
×
NEW
481
        cwlVersion = null; // won't be used but prevents compiler from complaining.
×
NEW
482
        final String __message = "the `cwlVersion` field is not valid because:";
×
NEW
483
        __errors.add(new ValidationException(__message, e));
×
484
      }
1✔
485

486
    } else {
487
      cwlVersion = null;
1✔
488
    }
489
    Object baseCommand;
490

491
    if (__doc.containsKey("baseCommand")) {
1✔
492
      try {
493
        baseCommand =
1✔
494
            LoaderInstances
495
                .union_of_NullInstance_or_StringInstance_or_array_of_StringInstance
496
                .loadField(__doc.get("baseCommand"), __baseUri, __loadingOptions);
1✔
NEW
497
      } catch (ValidationException e) {
×
NEW
498
        baseCommand = null; // won't be used but prevents compiler from complaining.
×
NEW
499
        final String __message = "the `baseCommand` field is not valid because:";
×
NEW
500
        __errors.add(new ValidationException(__message, e));
×
501
      }
1✔
502

503
    } else {
504
      baseCommand = null;
1✔
505
    }
506
    java.util.Optional<java.util.List<Object>> arguments;
507

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

520
    } else {
521
      arguments = null;
1✔
522
    }
523
    Object stdin;
524

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

537
    } else {
538
      stdin = null;
1✔
539
    }
540
    Object stderr;
541

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

554
    } else {
555
      stderr = null;
1✔
556
    }
557
    Object stdout;
558

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

571
    } else {
572
      stdout = null;
1✔
573
    }
574
    java.util.Optional<java.util.List<Object>> successCodes;
575

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

588
    } else {
589
      successCodes = null;
1✔
590
    }
591
    java.util.Optional<java.util.List<Object>> temporaryFailCodes;
592

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

605
    } else {
606
      temporaryFailCodes = null;
1✔
607
    }
608
    java.util.Optional<java.util.List<Object>> permanentFailCodes;
609

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

622
    } else {
623
      permanentFailCodes = null;
1✔
624
    }
625
    if (!__errors.isEmpty()) {
1✔
626
      throw new ValidationException("Trying 'RecordField'", __errors);
1✔
627
    }
628
    this.id = (java.util.Optional<String>) id;
1✔
629
    this.label = (java.util.Optional<String>) label;
1✔
630
    this.doc = (Object) doc;
1✔
631
    this.inputs = (java.util.List<Object>) inputs;
1✔
632
    this.outputs = (java.util.List<Object>) outputs;
1✔
633
    this.requirements = (java.util.Optional<java.util.List<Object>>) requirements;
1✔
634
    this.hints = (java.util.Optional<java.util.List<Object>>) hints;
1✔
635
    this.cwlVersion = (java.util.Optional<CWLVersion>) cwlVersion;
1✔
636
    this.class_ = (CommandLineTool_class) class_;
1✔
637
    this.baseCommand = (Object) baseCommand;
1✔
638
    this.arguments = (java.util.Optional<java.util.List<Object>>) arguments;
1✔
639
    this.stdin = (Object) stdin;
1✔
640
    this.stderr = (Object) stderr;
1✔
641
    this.stdout = (Object) stdout;
1✔
642
    this.successCodes = (java.util.Optional<java.util.List<Object>>) successCodes;
1✔
643
    this.temporaryFailCodes = (java.util.Optional<java.util.List<Object>>) temporaryFailCodes;
1✔
644
    this.permanentFailCodes = (java.util.Optional<java.util.List<Object>>) permanentFailCodes;
1✔
645
    for (String field:__doc.keySet()) {
1✔
646
      if (!attrs.contains(field)) {
1✔
647
        if (field.contains(":")) {
1✔
648
          String expanded_field = __loadingOptions.expandUrl(field, "", false, false, null);
1✔
649
          extensionFields_.put(expanded_field, __doc.get(field));
1✔
650
        }
651
      }
652
    }
1✔
653
  }
1✔
654
  private java.util.List<String> attrs = java.util.Arrays.asList("id", "label", "doc", "inputs", "outputs", "requirements", "hints", "cwlVersion", "class", "baseCommand", "arguments", "stdin", "stderr", "stdout", "successCodes", "temporaryFailCodes", "permanentFailCodes");
1✔
655
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc