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

common-workflow-language / cwljava / #365

15 Jul 2025 10:44AM UTC coverage: 59.538% (-0.6%) from 60.167%
#365

Pull #193

github

web-flow
Merge dddcd65fe into f35b0bad8
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

46.56
/src/main/java/org/w3id/cwl/cwl1_2/WorkflowOutputParameterImpl.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#WorkflowOutputParameter</I><BR> <BLOCKQUOTE>
25
 Describe an output parameter of a workflow.  The parameter must be
26
 connected to one or more parameters defined in the workflow that
27
 will provide the value of the output parameter. It is legal to
28
 connect a WorkflowInputParameter to a WorkflowOutputParameter.
29
 
30
 See [WorkflowStepInput](#WorkflowStepInput) for discussion of
31
 `linkMerge` and `pickValue`.
32
  </BLOCKQUOTE>
33
 */
34
public class WorkflowOutputParameterImpl extends SaveableImpl implements WorkflowOutputParameter {
35
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
1✔
36
  private java.util.Map<String, Object> extensionFields_ =
1✔
37
      new java.util.HashMap<String, Object>();
38
  public java.util.Map<String, Object> getExtensionFields() {
NEW
39
    return this.extensionFields_;
×
40
  }
41

42
  private java.util.Optional<String> id;
43

44
  /**
45
   * Getter for property <I>https://w3id.org/cwl/cwl#Identified/id</I><BR>
46
   * <BLOCKQUOTE>
47
   * The unique identifier for this object.   * </BLOCKQUOTE>
48
   */
49

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

54
  private java.util.Optional<String> label;
55

56
  /**
57
   * Getter for property <I>https://w3id.org/cwl/cwl#Labeled/label</I><BR>
58
   * <BLOCKQUOTE>
59
   * A short, human-readable label of this object.   * </BLOCKQUOTE>
60
   */
61

62
  public java.util.Optional<String> getLabel() {
63
    return this.label;
×
64
  }
65

66
  private Object secondaryFiles;
67

68
  /**
69
   * Getter for property <I>https://w3id.org/cwl/cwl#secondaryFiles</I><BR>
70
   * <BLOCKQUOTE>
71
   * Only valid when `type: File` or is an array of `items: File`.
72
   * 
73
   * Provides a pattern or expression specifying files or
74
   * directories that should be included alongside the primary
75
   * file.  Secondary files may be required or optional.  When not
76
   * explicitly specified, secondary files specified for `inputs`
77
   * are required and `outputs` are optional.  An implementation
78
   * must include matching Files and Directories in the
79
   * `secondaryFiles` property of the primary file.  These Files
80
   * and Directories must be transferred and staged alongside the
81
   * primary file.  An implementation may fail workflow execution
82
   * if a required secondary file does not exist.
83
   * 
84
   * If the value is an expression, the value of `self` in the expression
85
   * must be the primary input or output File object to which this binding
86
   * applies.  The `basename`, `nameroot` and `nameext` fields must be
87
   * present in `self`.  For `CommandLineTool` outputs the `path` field must
88
   * also be present.  The expression must return a filename string relative
89
   * to the path to the primary File, a File or Directory object with either
90
   * `path` or `location` and `basename` fields set, or an array consisting
91
   * of strings or File or Directory objects.  It is legal to reference an
92
   * unchanged File or Directory object taken from input as a secondaryFile.
93
   * The expression may return "null" in which case there is no secondaryFile
94
   * from that expression.
95
   * 
96
   * To work on non-filename-preserving storage systems, portable tool
97
   * descriptions should avoid constructing new values from `location`, but
98
   * should construct relative references using `basename` or `nameroot`
99
   * instead.
100
   * 
101
   * If a value in `secondaryFiles` is a string that is not an expression,
102
   * it specifies that the following pattern should be applied to the path
103
   * of the primary file to yield a filename relative to the primary File:
104
   * 
105
   *   1. If string ends with `?` character, remove the last `?` and mark
106
   *     the resulting secondary file as optional.
107
   *   2. If string begins with one or more caret `^` characters, for each
108
   *     caret, remove the last file extension from the path (the last
109
   *     period `.` and all following characters).  If there are no file
110
   *     extensions, the path is unchanged.
111
   *   3. Append the remainder of the string to the end of the file path.
112
   *    * </BLOCKQUOTE>
113
   */
114

115
  public Object getSecondaryFiles() {
116
    return this.secondaryFiles;
×
117
  }
118

119
  private java.util.Optional<Boolean> streamable;
120

121
  /**
122
   * Getter for property <I>https://w3id.org/cwl/cwl#FieldBase/streamable</I><BR>
123
   * <BLOCKQUOTE>
124
   * Only valid when `type: File` or is an array of `items: File`.
125
   * 
126
   * A value of `true` indicates that the file is read or written
127
   * sequentially without seeking.  An implementation may use this flag to
128
   * indicate whether it is valid to stream file contents using a named
129
   * pipe.  Default: `false`.
130
   *    * </BLOCKQUOTE>
131
   */
132

133
  public java.util.Optional<Boolean> getStreamable() {
134
    return this.streamable;
×
135
  }
136

137
  private Object doc;
138

139
  /**
140
   * Getter for property <I>https://w3id.org/cwl/salad#Documented/doc</I><BR>
141
   * <BLOCKQUOTE>
142
   * A documentation string for this object, or an array of strings which should be concatenated.   * </BLOCKQUOTE>
143
   */
144

145
  public Object getDoc() {
146
    return this.doc;
×
147
  }
148

149
  private Object format;
150

151
  /**
152
   * Getter for property <I>https://w3id.org/cwl/cwl#format</I><BR>
153
   * <BLOCKQUOTE>
154
   * Only valid when `type: File` or is an array of `items: File`.
155
   * 
156
   * This is the file format that will be assigned to the output
157
   * File object.
158
   *    * </BLOCKQUOTE>
159
   */
160

161
  public Object getFormat() {
162
    return this.format;
×
163
  }
164

165
  private Object outputSource;
166

167
  /**
168
   * Getter for property <I>https://w3id.org/cwl/cwl#outputSource</I><BR>
169
   * <BLOCKQUOTE>
170
   * Specifies one or more names of an output from a workflow step (in the form
171
   * `step_name/output_name` with a `/` separator`), or a workflow input name,
172
   * that supply their value(s) to the output parameter.
173
   * the output parameter.  It is valid to reference workflow level inputs
174
   * here.
175
   *    * </BLOCKQUOTE>
176
   */
177

178
  public Object getOutputSource() {
179
    return this.outputSource;
×
180
  }
181

182
  private java.util.Optional<LinkMergeMethod> linkMerge;
183

184
  /**
185
   * Getter for property <I>https://w3id.org/cwl/cwl#WorkflowOutputParameter/linkMerge</I><BR>
186
   * <BLOCKQUOTE>
187
   * The method to use to merge multiple sources into a single array.
188
   * If not specified, the default method is "merge_nested".
189
   *    * </BLOCKQUOTE>
190
   */
191

192
  public java.util.Optional<LinkMergeMethod> getLinkMerge() {
193
    return this.linkMerge;
×
194
  }
195

196
  private java.util.Optional<PickValueMethod> pickValue;
197

198
  /**
199
   * Getter for property <I>https://w3id.org/cwl/cwl#WorkflowOutputParameter/pickValue</I><BR>
200
   * <BLOCKQUOTE>
201
   * The method to use to choose non-null elements among multiple sources.
202
   *    * </BLOCKQUOTE>
203
   */
204

205
  public java.util.Optional<PickValueMethod> getPickValue() {
206
    return this.pickValue;
×
207
  }
208

209
  private Object type;
210

211
  /**
212
   * Getter for property <I>https://w3id.org/cwl/salad#type</I><BR>
213
   * <BLOCKQUOTE>
214
   * Specify valid types of data that may be assigned to this parameter.
215
   *    * </BLOCKQUOTE>
216
   */
217

218
  public Object getType() {
219
    return this.type;
×
220
  }
221

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

254
    if (__doc.containsKey("id")) {
1✔
255
      try {
256
        id =
1✔
257
            LoaderInstances
258
                .uri_optional_StringInstance_True_False_None_None
259
                .loadField(__doc.get("id"), __baseUri, __loadingOptions);
1✔
260
      } catch (ValidationException e) {
×
261
        id = null; // won't be used but prevents compiler from complaining.
×
262
        final String __message = "the `id` field is not valid because:";
×
263
        __errors.add(new ValidationException(__message, e));
×
264
      }
1✔
265

266
    } else {
267
      id = null;
×
268
    }
269

270
    Boolean __original_is_null = id == null;
1✔
271
    if (id == null) {
1✔
272
      if (__docRoot != null) {
×
273
        id = java.util.Optional.of(__docRoot);
×
274
      } else {
275
        id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
×
276
      }
277
    }
278
    if (__original_is_null) {
1✔
279
        __baseUri = __baseUri_;
×
280
    } else {
281
        __baseUri = (String) id.orElse(null);
1✔
282
    }
283
    java.util.Optional<String> label;
284

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

297
    } else {
298
      label = null;
1✔
299
    }
300
    Object secondaryFiles;
301

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

314
    } else {
315
      secondaryFiles = null;
1✔
316
    }
317
    java.util.Optional<Boolean> streamable;
318

319
    if (__doc.containsKey("streamable")) {
1✔
320
      try {
321
        streamable =
×
322
            LoaderInstances
323
                .optional_BooleanInstance
324
                .loadField(__doc.get("streamable"), __baseUri, __loadingOptions);
×
325
      } catch (ValidationException e) {
×
326
        streamable = null; // won't be used but prevents compiler from complaining.
×
327
        final String __message = "the `streamable` field is not valid because:";
×
328
        __errors.add(new ValidationException(__message, e));
×
329
      }
×
330

331
    } else {
332
      streamable = null;
1✔
333
    }
334
    Object doc;
335

336
    if (__doc.containsKey("doc")) {
1✔
337
      try {
338
        doc =
1✔
339
            LoaderInstances
340
                .union_of_NullInstance_or_StringInstance_or_array_of_StringInstance
341
                .loadField(__doc.get("doc"), __baseUri, __loadingOptions);
1✔
342
      } catch (ValidationException e) {
×
343
        doc = null; // won't be used but prevents compiler from complaining.
×
344
        final String __message = "the `doc` field is not valid because:";
×
345
        __errors.add(new ValidationException(__message, e));
×
346
      }
1✔
347

348
    } else {
349
      doc = null;
1✔
350
    }
351
    Object format;
352

353
    if (__doc.containsKey("format")) {
1✔
354
      try {
355
        format =
×
356
            LoaderInstances
357
                .uri_union_of_NullInstance_or_StringInstance_or_ExpressionLoader_True_False_None_True
358
                .loadField(__doc.get("format"), __baseUri, __loadingOptions);
×
359
      } catch (ValidationException e) {
×
360
        format = null; // won't be used but prevents compiler from complaining.
×
361
        final String __message = "the `format` field is not valid because:";
×
362
        __errors.add(new ValidationException(__message, e));
×
363
      }
×
364

365
    } else {
366
      format = null;
1✔
367
    }
368
    Object outputSource;
369

370
    if (__doc.containsKey("outputSource")) {
1✔
371
      try {
372
        outputSource =
1✔
373
            LoaderInstances
374
                .uri_union_of_NullInstance_or_StringInstance_or_array_of_StringInstance_False_False_1_None
375
                .loadField(__doc.get("outputSource"), __baseUri, __loadingOptions);
1✔
376
      } catch (ValidationException e) {
×
377
        outputSource = null; // won't be used but prevents compiler from complaining.
×
378
        final String __message = "the `outputSource` field is not valid because:";
×
379
        __errors.add(new ValidationException(__message, e));
×
380
      }
1✔
381

382
    } else {
383
      outputSource = null;
1✔
384
    }
385
    java.util.Optional<LinkMergeMethod> linkMerge;
386

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

399
    } else {
400
      linkMerge = null;
1✔
401
    }
402
    java.util.Optional<PickValueMethod> pickValue;
403

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

416
    } else {
417
      pickValue = null;
1✔
418
    }
419
    Object type;
420
    try {
421
      type =
1✔
422
          LoaderInstances
423
              .typedsl_union_of_CWLType_or_OutputRecordSchema_or_OutputEnumSchema_or_OutputArraySchema_or_StringInstance_or_array_of_union_of_CWLType_or_OutputRecordSchema_or_OutputEnumSchema_or_OutputArraySchema_or_StringInstance_2
424
              .loadField(__doc.get("type"), __baseUri, __loadingOptions);
1✔
425
    } catch (ValidationException e) {
×
426
      type = null; // won't be used but prevents compiler from complaining.
×
427
      final String __message = "the `type` field is not valid because:";
×
428
      __errors.add(new ValidationException(__message, e));
×
429
    }
1✔
430
    if (!__errors.isEmpty()) {
1✔
431
      throw new ValidationException("Trying 'RecordField'", __errors);
×
432
    }
433
    this.label = (java.util.Optional<String>) label;
1✔
434
    this.secondaryFiles = (Object) secondaryFiles;
1✔
435
    this.streamable = (java.util.Optional<Boolean>) streamable;
1✔
436
    this.doc = (Object) doc;
1✔
437
    this.id = (java.util.Optional<String>) id;
1✔
438
    this.format = (Object) format;
1✔
439
    this.outputSource = (Object) outputSource;
1✔
440
    this.linkMerge = (java.util.Optional<LinkMergeMethod>) linkMerge;
1✔
441
    this.pickValue = (java.util.Optional<PickValueMethod>) pickValue;
1✔
442
    this.type = (Object) type;
1✔
443
  }
1✔
444
}
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