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

common-workflow-language / cwljava / #423

17 Dec 2025 10:33AM UTC coverage: 56.982% (-1.0%) from 57.972%
#423

push

github

web-flow
refresh 2025-12 (including extensions) (#218)

* "id" is a required field in for Parameters and WorkflowSteps
* regen; drop CommandLineBindableImpl; add optional CWL extensions

185 of 577 new or added lines in 21 files covered. (32.06%)

10 existing lines in 10 files now uncovered.

7892 of 13850 relevant lines covered (56.98%)

0.57 hits per line

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

0.0
/src/main/java/org/commonwl/cwlsdk/cwl1_2/ProcessGeneratorImpl.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_2;
16

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

23
/**
24
* Auto-generated class implementation for <I>http://commonwl.org/cwltool#ProcessGenerator</I><BR>
25
 */
26
public class ProcessGeneratorImpl extends SaveableImpl implements ProcessGenerator {
NEW
27
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
×
NEW
28
  private java.util.Map<String, Object> extensionFields_ =
×
29
      new java.util.HashMap<String, Object>();
30
  public LoadingOptions getLoadingOptions() {
NEW
31
    return this.loadingOptions_;
×
32
  }
33
  public java.util.Map<String, Object> getExtensionFields() {
NEW
34
    return this.extensionFields_;
×
35
  }
36

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

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

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

53
  private String class_;
54

55
  /**
56
   * Getter for property <I>http://commonwl.org/cwltool#ProcessGenerator/class</I><BR>
57

58
   */
59

60
  public String getClass_() {
NEW
61
    return this.class_;
×
62
  }
63

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

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

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

76
  private Object doc;
77

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

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

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

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

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

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

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

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

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

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

139
  public java.util.Optional<java.util.List<Object>> getRequirements() {
NEW
140
    return this.requirements;
×
141
  }
142

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

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

155
  public java.util.Optional<java.util.List<Object>> getHints() {
NEW
156
    return this.hints;
×
157
  }
158

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

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

169
  public java.util.Optional<CWLVersion> getCwlVersion() {
NEW
170
    return this.cwlVersion;
×
171
  }
172

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

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

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

199
  private Object run;
200

201
  /**
202
   * Getter for property <I>https://w3id.org/cwl/cwl#run</I><BR>
203
   * <BLOCKQUOTE>
204
   * Specifies the process to run.
205
   *    * </BLOCKQUOTE>
206
   */
207

208
  public Object getRun() {
NEW
209
    return this.run;
×
210
  }
211

212
  /**
213
   * Used by {@link org.commonwl.cwlsdk.cwl1_2.utils.RootLoader} to construct instances of ProcessGeneratorImpl.
214
   *
215
   * @param __doc_            Document fragment to load this record object from (presumably a
216
                              {@link java.util.Map}).
217
   * @param __baseUri_        Base URI to generate child document IDs against.
218
   * @param __loadingOptions  Context for loading URIs and populating objects.
219
   * @param __docRoot_        ID at this position in the document (if available) (maybe?)
220
   * @throws ValidationException If the document fragment is not a {@link java.util.Map}
221
   *                             or validation of fields fails.
222
   */
223
  public ProcessGeneratorImpl(
224
      final Object __doc_,
225
      final String __baseUri_,
226
      LoadingOptions __loadingOptions,
227
      final String __docRoot_) {
NEW
228
    super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
×
229
    // Prefix plumbing variables with '__' to reduce likelihood of collision with
230
    // generated names.
NEW
231
    String __baseUri = __baseUri_;
×
NEW
232
    String __docRoot = __docRoot_;
×
NEW
233
    if (!(__doc_ instanceof java.util.Map)) {
×
NEW
234
      throw new ValidationException("ProcessGeneratorImpl called on non-map");
×
235
    }
NEW
236
    final java.util.Map<String, Object> __doc = (java.util.Map<String, Object>) __doc_;
×
NEW
237
    final java.util.List<ValidationException> __errors =
×
238
        new java.util.ArrayList<ValidationException>();
NEW
239
    if (__loadingOptions != null) {
×
NEW
240
      this.loadingOptions_ = __loadingOptions;
×
241
    }
242
    java.util.Optional<String> id;
243

NEW
244
    if (__doc.containsKey("id")) {
×
245
      try {
NEW
246
        id =
×
247
            LoaderInstances
248
                .uri_optional_StringInstance_True_False_None_None
NEW
249
                .loadField(__doc.get("id"), __baseUri, __loadingOptions);
×
NEW
250
      } catch (ValidationException e) {
×
NEW
251
        id = null; // won't be used but prevents compiler from complaining.
×
NEW
252
        final String __message = "the `id` field is not valid because:";
×
NEW
253
        __errors.add(new ValidationException(__message, e));
×
NEW
254
      }
×
255

256
    } else {
NEW
257
      id = null;
×
258
    }
259

NEW
260
    Boolean __original_is_null = id == null;
×
NEW
261
    if (id == null) {
×
NEW
262
      if (__docRoot != null) {
×
NEW
263
        id = java.util.Optional.of(__docRoot);
×
264
      } else {
NEW
265
        id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
×
266
      }
267
    }
NEW
268
    if (__original_is_null) {
×
NEW
269
        __baseUri = __baseUri_;
×
270
    } else {
NEW
271
        __baseUri = (String) id.orElse(null);
×
272
    }
273
    String class_;
274
    try {
NEW
275
      class_ =
×
276
          LoaderInstances
277
              .uri_StringInstance_False_True_None_None
NEW
278
              .loadField(__doc.get("class"), __baseUri, __loadingOptions);
×
NEW
279
    } catch (ValidationException e) {
×
NEW
280
      class_ = null; // won't be used but prevents compiler from complaining.
×
NEW
281
      final String __message = "the `class` field is not valid because:";
×
NEW
282
      __errors.add(new ValidationException(__message, e));
×
NEW
283
    }
×
284
    java.util.Optional<String> label;
285

NEW
286
    if (__doc.containsKey("label")) {
×
287
      try {
NEW
288
        label =
×
289
            LoaderInstances
290
                .optional_StringInstance
NEW
291
                .loadField(__doc.get("label"), __baseUri, __loadingOptions);
×
NEW
292
      } catch (ValidationException e) {
×
NEW
293
        label = null; // won't be used but prevents compiler from complaining.
×
NEW
294
        final String __message = "the `label` field is not valid because:";
×
NEW
295
        __errors.add(new ValidationException(__message, e));
×
NEW
296
      }
×
297

298
    } else {
NEW
299
      label = null;
×
300
    }
301
    Object doc;
302

NEW
303
    if (__doc.containsKey("doc")) {
×
304
      try {
NEW
305
        doc =
×
306
            LoaderInstances
307
                .union_of_NullInstance_or_StringInstance_or_array_of_StringInstance
NEW
308
                .loadField(__doc.get("doc"), __baseUri, __loadingOptions);
×
NEW
309
      } catch (ValidationException e) {
×
NEW
310
        doc = null; // won't be used but prevents compiler from complaining.
×
NEW
311
        final String __message = "the `doc` field is not valid because:";
×
NEW
312
        __errors.add(new ValidationException(__message, e));
×
NEW
313
      }
×
314

315
    } else {
NEW
316
      doc = null;
×
317
    }
318
    java.util.List<Object> inputs;
319
    try {
NEW
320
      inputs =
×
321
          LoaderInstances
322
              .idmap_inputs_array_of_union_of_CommandInputParameter_or_WorkflowInputParameter_or_OperationInputParameter
NEW
323
              .loadField(__doc.get("inputs"), __baseUri, __loadingOptions);
×
NEW
324
    } catch (ValidationException e) {
×
NEW
325
      inputs = null; // won't be used but prevents compiler from complaining.
×
NEW
326
      final String __message = "the `inputs` field is not valid because:";
×
NEW
327
      __errors.add(new ValidationException(__message, e));
×
NEW
328
    }
×
329
    java.util.List<Object> outputs;
330
    try {
NEW
331
      outputs =
×
332
          LoaderInstances
333
              .idmap_outputs_array_of_union_of_CommandOutputParameter_or_ExpressionToolOutputParameter_or_WorkflowOutputParameter_or_OperationOutputParameter
NEW
334
              .loadField(__doc.get("outputs"), __baseUri, __loadingOptions);
×
NEW
335
    } catch (ValidationException e) {
×
NEW
336
      outputs = null; // won't be used but prevents compiler from complaining.
×
NEW
337
      final String __message = "the `outputs` field is not valid because:";
×
NEW
338
      __errors.add(new ValidationException(__message, e));
×
NEW
339
    }
×
340
    java.util.Optional<java.util.List<Object>> requirements;
341

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

354
    } else {
NEW
355
      requirements = null;
×
356
    }
357
    java.util.Optional<java.util.List<Object>> hints;
358

NEW
359
    if (__doc.containsKey("hints")) {
×
360
      try {
NEW
361
        hints =
×
362
            LoaderInstances
363
                .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_Secrets_or_MPIRequirement_or_CUDARequirement_or_Loop_or_ShmSize_or_AnyInstance
NEW
364
                .loadField(__doc.get("hints"), __baseUri, __loadingOptions);
×
NEW
365
      } catch (ValidationException e) {
×
NEW
366
        hints = null; // won't be used but prevents compiler from complaining.
×
NEW
367
        final String __message = "the `hints` field is not valid because:";
×
NEW
368
        __errors.add(new ValidationException(__message, e));
×
NEW
369
      }
×
370

371
    } else {
NEW
372
      hints = null;
×
373
    }
374
    java.util.Optional<CWLVersion> cwlVersion;
375

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

388
    } else {
NEW
389
      cwlVersion = null;
×
390
    }
391
    java.util.Optional<java.util.List<String>> intent;
392

NEW
393
    if (__doc.containsKey("intent")) {
×
394
      try {
NEW
395
        intent =
×
396
            LoaderInstances
397
                .uri_optional_array_of_StringInstance_True_False_None_None
NEW
398
                .loadField(__doc.get("intent"), __baseUri, __loadingOptions);
×
NEW
399
      } catch (ValidationException e) {
×
NEW
400
        intent = null; // won't be used but prevents compiler from complaining.
×
NEW
401
        final String __message = "the `intent` field is not valid because:";
×
NEW
402
        __errors.add(new ValidationException(__message, e));
×
NEW
403
      }
×
404

405
    } else {
NEW
406
      intent = null;
×
407
    }
408
    Object run;
409
    try {
NEW
410
      run =
×
411
          LoaderInstances
412
              .uri_union_of_StringInstance_or_CommandLineTool_or_ExpressionTool_or_Workflow_or_Operation_or_ProcessGenerator_False_False_None_None
NEW
413
              .loadField(__doc.get("run"), __baseUri, __loadingOptions);
×
NEW
414
    } catch (ValidationException e) {
×
NEW
415
      run = null; // won't be used but prevents compiler from complaining.
×
NEW
416
      final String __message = "the `run` field is not valid because:";
×
NEW
417
      __errors.add(new ValidationException(__message, e));
×
NEW
418
    }
×
NEW
419
    if (!__errors.isEmpty()) {
×
NEW
420
      throw new ValidationException("Trying 'RecordField'", __errors);
×
421
    }
NEW
422
    this.id = (java.util.Optional<String>) id;
×
NEW
423
    this.label = (java.util.Optional<String>) label;
×
NEW
424
    this.doc = (Object) doc;
×
NEW
425
    this.inputs = (java.util.List<Object>) inputs;
×
NEW
426
    this.outputs = (java.util.List<Object>) outputs;
×
NEW
427
    this.requirements = (java.util.Optional<java.util.List<Object>>) requirements;
×
NEW
428
    this.hints = (java.util.Optional<java.util.List<Object>>) hints;
×
NEW
429
    this.cwlVersion = (java.util.Optional<CWLVersion>) cwlVersion;
×
NEW
430
    this.intent = (java.util.Optional<java.util.List<String>>) intent;
×
NEW
431
    this.class_ = (String) class_;
×
NEW
432
    this.run = (Object) run;
×
NEW
433
    for (String field:__doc.keySet()) {
×
NEW
434
      if (!attrs.contains(field)) {
×
NEW
435
        if (field.contains(":")) {
×
NEW
436
          String expanded_field = __loadingOptions.expandUrl(field, "", false, false, null);
×
NEW
437
          extensionFields_.put(expanded_field, __doc.get(field));
×
438
        }
439
      }
NEW
440
    }
×
NEW
441
  }
×
NEW
442
  private java.util.List<String> attrs = java.util.Arrays.asList("id", "label", "doc", "inputs", "outputs", "requirements", "hints", "cwlVersion", "intent", "class", "run");
×
443
}
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

© 2025 Coveralls, Inc