• 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

48.59
/src/main/java/org/w3id/cwl/cwl1_2/WorkflowInputParameterImpl.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#WorkflowInputParameter</I><BR>
25
 */
26
public class WorkflowInputParameterImpl extends SaveableImpl implements WorkflowInputParameter {
27
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
1✔
28
  private java.util.Map<String, Object> extensionFields_ =
1✔
29
      new java.util.HashMap<String, Object>();
30
  public java.util.Map<String, Object> getExtensionFields() {
NEW
31
    return this.extensionFields_;
×
32
  }
33

34
  private java.util.Optional<String> id;
35

36
  /**
37
   * Getter for property <I>https://w3id.org/cwl/cwl#Identified/id</I><BR>
38
   * <BLOCKQUOTE>
39
   * The unique identifier for this object.   * </BLOCKQUOTE>
40
   */
41

42
  public java.util.Optional<String> getId() {
43
    return this.id;
1✔
44
  }
45

46
  private java.util.Optional<String> label;
47

48
  /**
49
   * Getter for property <I>https://w3id.org/cwl/cwl#Labeled/label</I><BR>
50
   * <BLOCKQUOTE>
51
   * A short, human-readable label of this object.   * </BLOCKQUOTE>
52
   */
53

54
  public java.util.Optional<String> getLabel() {
55
    return this.label;
×
56
  }
57

58
  private Object secondaryFiles;
59

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

107
  public Object getSecondaryFiles() {
108
    return this.secondaryFiles;
1✔
109
  }
110

111
  private java.util.Optional<Boolean> streamable;
112

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

125
  public java.util.Optional<Boolean> getStreamable() {
126
    return this.streamable;
×
127
  }
128

129
  private Object doc;
130

131
  /**
132
   * Getter for property <I>https://w3id.org/cwl/salad#Documented/doc</I><BR>
133
   * <BLOCKQUOTE>
134
   * A documentation string for this object, or an array of strings which should be concatenated.   * </BLOCKQUOTE>
135
   */
136

137
  public Object getDoc() {
138
    return this.doc;
×
139
  }
140

141
  private Object format;
142

143
  /**
144
   * Getter for property <I>https://w3id.org/cwl/cwl#format</I><BR>
145
   * <BLOCKQUOTE>
146
   * Only valid when `type: File` or is an array of `items: File`.
147
   * 
148
   * This must be one or more IRIs of concept nodes
149
   * that represents file formats which are allowed as input to this
150
   * parameter, preferably defined within an ontology.  If no ontology is
151
   * available, file formats may be tested by exact match.
152
   *    * </BLOCKQUOTE>
153
   */
154

155
  public Object getFormat() {
156
    return this.format;
×
157
  }
158

159
  private java.util.Optional<Boolean> loadContents;
160

161
  /**
162
   * Getter for property <I>https://w3id.org/cwl/cwl#LoadContents/loadContents</I><BR>
163
   * <BLOCKQUOTE>
164
   * Only valid when `type: File` or is an array of `items: File`.
165
   * 
166
   * If true, the file (or each file in the array) must be a UTF-8
167
   * text file 64 KiB or smaller, and the implementation must read
168
   * the entire contents of the file (or file array) and place it
169
   * in the `contents` field of the File object for use by
170
   * expressions.  If the size of the file is greater than 64 KiB,
171
   * the implementation must raise a fatal error.
172
   *    * </BLOCKQUOTE>
173
   */
174

175
  public java.util.Optional<Boolean> getLoadContents() {
176
    return this.loadContents;
×
177
  }
178

179
  private java.util.Optional<LoadListingEnum> loadListing;
180

181
  /**
182
   * Getter for property <I>https://w3id.org/cwl/cwl#LoadContents/loadListing</I><BR>
183
   * <BLOCKQUOTE>
184
   * Only valid when `type: Directory` or is an array of `items: Directory`.
185
   * 
186
   * Specify the desired behavior for loading the `listing` field of
187
   * a Directory object for use by expressions.
188
   * 
189
   * The order of precedence for loadListing is:
190
   * 
191
   *   1. `loadListing` on an individual parameter
192
   *   2. Inherited from `LoadListingRequirement`
193
   *   3. By default: `no_listing`
194
   *    * </BLOCKQUOTE>
195
   */
196

197
  public java.util.Optional<LoadListingEnum> getLoadListing() {
198
    return this.loadListing;
×
199
  }
200

201
  private java.util.Optional<Object> default_;
202

203
  /**
204
   * Getter for property <I>https://w3id.org/cwl/salad#default</I><BR>
205
   * <BLOCKQUOTE>
206
   * The default value to use for this parameter if the parameter is missing
207
   * from the input object, or if the value of the parameter in the input
208
   * object is `null`.  Default values are applied before evaluating expressions
209
   * (e.g. dependent `valueFrom` fields).
210
   *    * </BLOCKQUOTE>
211
   */
212

213
  public java.util.Optional<Object> getDefault() {
214
    return this.default_;
×
215
  }
216

217
  private Object type;
218

219
  /**
220
   * Getter for property <I>https://w3id.org/cwl/salad#type</I><BR>
221
   * <BLOCKQUOTE>
222
   * Specify valid types of data that may be assigned to this parameter.
223
   *    * </BLOCKQUOTE>
224
   */
225

226
  public Object getType() {
227
    return this.type;
×
228
  }
229

230
  private java.util.Optional<InputBinding> inputBinding;
231

232
  /**
233
   * Getter for property <I>https://w3id.org/cwl/cwl#WorkflowInputParameter/inputBinding</I><BR>
234
   * <BLOCKQUOTE>
235
   * Deprecated.  Preserved for v1.0 backwards compatibility.  Will be removed in
236
   * CWL v2.0.  Use `WorkflowInputParameter.loadContents` instead.
237
   *    * </BLOCKQUOTE>
238
   */
239

240
  public java.util.Optional<InputBinding> getInputBinding() {
241
    return this.inputBinding;
×
242
  }
243

244
  /**
245
   * Used by {@link org.w3id.cwl.cwl1_2.utils.RootLoader} to construct instances of WorkflowInputParameterImpl.
246
   *
247
   * @param __doc_            Document fragment to load this record object from (presumably a
248
                              {@link java.util.Map}).
249
   * @param __baseUri_        Base URI to generate child document IDs against.
250
   * @param __loadingOptions  Context for loading URIs and populating objects.
251
   * @param __docRoot_        ID at this position in the document (if available) (maybe?)
252
   * @throws ValidationException If the document fragment is not a {@link java.util.Map}
253
   *                             or validation of fields fails.
254
   */
255
  public WorkflowInputParameterImpl(
256
      final Object __doc_,
257
      final String __baseUri_,
258
      LoadingOptions __loadingOptions,
259
      final String __docRoot_) {
260
    super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
1✔
261
    // Prefix plumbing variables with '__' to reduce likelihood of collision with
262
    // generated names.
263
    String __baseUri = __baseUri_;
1✔
264
    String __docRoot = __docRoot_;
1✔
265
    if (!(__doc_ instanceof java.util.Map)) {
1✔
266
      throw new ValidationException("WorkflowInputParameterImpl called on non-map");
×
267
    }
268
    final java.util.Map<String, Object> __doc = (java.util.Map<String, Object>) __doc_;
1✔
269
    final java.util.List<ValidationException> __errors =
1✔
270
        new java.util.ArrayList<ValidationException>();
271
    if (__loadingOptions != null) {
1✔
272
      this.loadingOptions_ = __loadingOptions;
1✔
273
    }
274
    java.util.Optional<String> id;
275

276
    if (__doc.containsKey("id")) {
1✔
277
      try {
278
        id =
1✔
279
            LoaderInstances
280
                .uri_optional_StringInstance_True_False_None_None
281
                .loadField(__doc.get("id"), __baseUri, __loadingOptions);
1✔
282
      } catch (ValidationException e) {
×
283
        id = null; // won't be used but prevents compiler from complaining.
×
284
        final String __message = "the `id` field is not valid because:";
×
285
        __errors.add(new ValidationException(__message, e));
×
286
      }
1✔
287

288
    } else {
289
      id = null;
×
290
    }
291

292
    Boolean __original_is_null = id == null;
1✔
293
    if (id == null) {
1✔
294
      if (__docRoot != null) {
×
295
        id = java.util.Optional.of(__docRoot);
×
296
      } else {
297
        id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
×
298
      }
299
    }
300
    if (__original_is_null) {
1✔
301
        __baseUri = __baseUri_;
×
302
    } else {
303
        __baseUri = (String) id.orElse(null);
1✔
304
    }
305
    java.util.Optional<String> label;
306

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

319
    } else {
320
      label = null;
1✔
321
    }
322
    Object secondaryFiles;
323

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

336
    } else {
337
      secondaryFiles = null;
1✔
338
    }
339
    java.util.Optional<Boolean> streamable;
340

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

353
    } else {
354
      streamable = null;
1✔
355
    }
356
    Object doc;
357

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

370
    } else {
371
      doc = null;
1✔
372
    }
373
    Object format;
374

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

387
    } else {
388
      format = null;
1✔
389
    }
390
    java.util.Optional<Boolean> loadContents;
391

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

404
    } else {
405
      loadContents = null;
1✔
406
    }
407
    java.util.Optional<LoadListingEnum> loadListing;
408

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

421
    } else {
422
      loadListing = null;
1✔
423
    }
424
    java.util.Optional<Object> default_;
425

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

438
    } else {
439
      default_ = null;
1✔
440
    }
441
    Object type;
442
    try {
443
      type =
1✔
444
          LoaderInstances
445
              .typedsl_union_of_CWLType_or_InputRecordSchema_or_InputEnumSchema_or_InputArraySchema_or_StringInstance_or_array_of_union_of_CWLType_or_InputRecordSchema_or_InputEnumSchema_or_InputArraySchema_or_StringInstance_2
446
              .loadField(__doc.get("type"), __baseUri, __loadingOptions);
1✔
447
    } catch (ValidationException e) {
×
448
      type = null; // won't be used but prevents compiler from complaining.
×
449
      final String __message = "the `type` field is not valid because:";
×
450
      __errors.add(new ValidationException(__message, e));
×
451
    }
1✔
452
    java.util.Optional<InputBinding> inputBinding;
453

454
    if (__doc.containsKey("inputBinding")) {
1✔
455
      try {
456
        inputBinding =
×
457
            LoaderInstances
458
                .optional_InputBinding
459
                .loadField(__doc.get("inputBinding"), __baseUri, __loadingOptions);
×
460
      } catch (ValidationException e) {
×
461
        inputBinding = null; // won't be used but prevents compiler from complaining.
×
462
        final String __message = "the `inputBinding` field is not valid because:";
×
463
        __errors.add(new ValidationException(__message, e));
×
464
      }
×
465

466
    } else {
467
      inputBinding = null;
1✔
468
    }
469
    if (!__errors.isEmpty()) {
1✔
470
      throw new ValidationException("Trying 'RecordField'", __errors);
×
471
    }
472
    this.label = (java.util.Optional<String>) label;
1✔
473
    this.secondaryFiles = (Object) secondaryFiles;
1✔
474
    this.streamable = (java.util.Optional<Boolean>) streamable;
1✔
475
    this.doc = (Object) doc;
1✔
476
    this.id = (java.util.Optional<String>) id;
1✔
477
    this.format = (Object) format;
1✔
478
    this.loadContents = (java.util.Optional<Boolean>) loadContents;
1✔
479
    this.loadListing = (java.util.Optional<LoadListingEnum>) loadListing;
1✔
480
    this.default_ = (java.util.Optional<Object>) default_;
1✔
481
    this.type = (Object) type;
1✔
482
    this.inputBinding = (java.util.Optional<InputBinding>) inputBinding;
1✔
483
  }
1✔
484
}
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