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

common-workflow-language / cwljava / #366

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

push

github

mr-c
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.46
/src/main/java/org/w3id/cwl/cwl1_2/OperationImpl.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#Operation</I><BR> <BLOCKQUOTE>
25
 This record describes an abstract operation.  It is a potential
26
 step of a workflow that has not yet been bound to a concrete
27
 implementation.  It specifies an input and output signature, but
28
 does not provide enough information to be executed.  An
29
 implementation (or other tooling) may provide a means of binding
30
 an Operation to a concrete process (such as Workflow,
31
 CommandLineTool, or ExpressionTool) with a compatible signature.
32
  </BLOCKQUOTE>
33
 */
34
public class OperationImpl extends SaveableImpl implements Operation {
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#Process/id</I><BR>
46
   * <BLOCKQUOTE>
47
   * The unique identifier for this object.
48
   * 
49
   * Only useful for `$graph` at `Process` level. Should not be exposed
50
   * to users in graphical or terminal user interfaces.
51
   *    * </BLOCKQUOTE>
52
   */
53

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

58
  private Operation_class class_;
59

60
  /**
61
   * Getter for property <I>https://w3id.org/cwl/cwl#Operation/class</I><BR>
62

63
   */
64

65
  public Operation_class getClass_() {
66
    return this.class_;
×
67
  }
68

69
  private java.util.Optional<String> label;
70

71
  /**
72
   * Getter for property <I>https://w3id.org/cwl/cwl#Labeled/label</I><BR>
73
   * <BLOCKQUOTE>
74
   * A short, human-readable label of this object.   * </BLOCKQUOTE>
75
   */
76

77
  public java.util.Optional<String> getLabel() {
78
    return this.label;
×
79
  }
80

81
  private Object doc;
82

83
  /**
84
   * Getter for property <I>https://w3id.org/cwl/salad#Documented/doc</I><BR>
85
   * <BLOCKQUOTE>
86
   * A documentation string for this object, or an array of strings which should be concatenated.   * </BLOCKQUOTE>
87
   */
88

89
  public Object getDoc() {
90
    return this.doc;
×
91
  }
92

93
  private java.util.List<Object> inputs;
94

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

112
  public java.util.List<Object> getInputs() {
113
    return this.inputs;
×
114
  }
115

116
  private java.util.List<Object> outputs;
117

118
  /**
119
   * Getter for property <I>https://w3id.org/cwl/cwl#outputs</I><BR>
120
   * <BLOCKQUOTE>
121
   * Defines the parameters representing the output of the process.  May be
122
   * used to generate and/or validate the output object.
123
   *    * </BLOCKQUOTE>
124
   */
125

126
  public java.util.List<Object> getOutputs() {
127
    return this.outputs;
×
128
  }
129

130
  private java.util.Optional<java.util.List<Object>> requirements;
131

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

144
  public java.util.Optional<java.util.List<Object>> getRequirements() {
145
    return this.requirements;
×
146
  }
147

148
  private java.util.Optional<java.util.List<Object>> hints;
149

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

160
  public java.util.Optional<java.util.List<Object>> getHints() {
161
    return this.hints;
×
162
  }
163

164
  private java.util.Optional<CWLVersion> cwlVersion;
165

166
  /**
167
   * Getter for property <I>https://w3id.org/cwl/cwl#cwlVersion</I><BR>
168
   * <BLOCKQUOTE>
169
   * CWL document version. Always required at the document root. Not
170
   * required for a Process embedded inside another Process.
171
   *    * </BLOCKQUOTE>
172
   */
173

174
  public java.util.Optional<CWLVersion> getCwlVersion() {
175
    return this.cwlVersion;
×
176
  }
177

178
  private java.util.Optional<java.util.List<String>> intent;
179

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

200
  public java.util.Optional<java.util.List<String>> getIntent() {
201
    return this.intent;
×
202
  }
203

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

236
    if (__doc.containsKey("id")) {
1✔
237
      try {
238
        id =
1✔
239
            LoaderInstances
240
                .uri_optional_StringInstance_True_False_None_None
241
                .loadField(__doc.get("id"), __baseUri, __loadingOptions);
1✔
242
      } catch (ValidationException e) {
×
243
        id = null; // won't be used but prevents compiler from complaining.
×
244
        final String __message = "the `id` field is not valid because:";
×
245
        __errors.add(new ValidationException(__message, e));
×
246
      }
1✔
247

248
    } else {
249
      id = null;
×
250
    }
251

252
    Boolean __original_is_null = id == null;
1✔
253
    if (id == null) {
1✔
254
      if (__docRoot != null) {
×
255
        id = java.util.Optional.of(__docRoot);
×
256
      } else {
257
        id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
×
258
      }
259
    }
260
    if (__original_is_null) {
1✔
261
        __baseUri = __baseUri_;
×
262
    } else {
263
        __baseUri = (String) id.orElse(null);
1✔
264
    }
265
    Operation_class class_;
266
    try {
267
      class_ =
1✔
268
          LoaderInstances
269
              .uri_Operation_class_False_True_None_None
270
              .loadField(__doc.get("class"), __baseUri, __loadingOptions);
1✔
271
    } catch (ValidationException e) {
×
272
      class_ = null; // won't be used but prevents compiler from complaining.
×
273
      final String __message = "the `class` field is not valid because:";
×
274
      __errors.add(new ValidationException(__message, e));
×
275
    }
1✔
276
    java.util.Optional<String> label;
277

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

290
    } else {
291
      label = null;
1✔
292
    }
293
    Object doc;
294

295
    if (__doc.containsKey("doc")) {
1✔
296
      try {
297
        doc =
1✔
298
            LoaderInstances
299
                .union_of_NullInstance_or_StringInstance_or_array_of_StringInstance
300
                .loadField(__doc.get("doc"), __baseUri, __loadingOptions);
1✔
301
      } catch (ValidationException e) {
×
302
        doc = null; // won't be used but prevents compiler from complaining.
×
303
        final String __message = "the `doc` field is not valid because:";
×
304
        __errors.add(new ValidationException(__message, e));
×
305
      }
1✔
306

307
    } else {
308
      doc = null;
×
309
    }
310
    java.util.List<Object> inputs;
311
    try {
312
      inputs =
1✔
313
          LoaderInstances
314
              .idmap_inputs_array_of_OperationInputParameter
315
              .loadField(__doc.get("inputs"), __baseUri, __loadingOptions);
1✔
316
    } catch (ValidationException e) {
×
317
      inputs = null; // won't be used but prevents compiler from complaining.
×
318
      final String __message = "the `inputs` field is not valid because:";
×
319
      __errors.add(new ValidationException(__message, e));
×
320
    }
1✔
321
    java.util.List<Object> outputs;
322
    try {
323
      outputs =
1✔
324
          LoaderInstances
325
              .idmap_outputs_array_of_OperationOutputParameter
326
              .loadField(__doc.get("outputs"), __baseUri, __loadingOptions);
1✔
327
    } catch (ValidationException e) {
×
328
      outputs = null; // won't be used but prevents compiler from complaining.
×
329
      final String __message = "the `outputs` field is not valid because:";
×
330
      __errors.add(new ValidationException(__message, e));
×
331
    }
1✔
332
    java.util.Optional<java.util.List<Object>> requirements;
333

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

346
    } else {
347
      requirements = null;
1✔
348
    }
349
    java.util.Optional<java.util.List<Object>> hints;
350

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

363
    } else {
364
      hints = null;
1✔
365
    }
366
    java.util.Optional<CWLVersion> cwlVersion;
367

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

380
    } else {
381
      cwlVersion = null;
1✔
382
    }
383
    java.util.Optional<java.util.List<String>> intent;
384

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

397
    } else {
398
      intent = null;
1✔
399
    }
400
    if (!__errors.isEmpty()) {
1✔
401
      throw new ValidationException("Trying 'RecordField'", __errors);
×
402
    }
403
    this.id = (java.util.Optional<String>) id;
1✔
404
    this.label = (java.util.Optional<String>) label;
1✔
405
    this.doc = (Object) doc;
1✔
406
    this.inputs = (java.util.List<Object>) inputs;
1✔
407
    this.outputs = (java.util.List<Object>) outputs;
1✔
408
    this.requirements = (java.util.Optional<java.util.List<Object>>) requirements;
1✔
409
    this.hints = (java.util.Optional<java.util.List<Object>>) hints;
1✔
410
    this.cwlVersion = (java.util.Optional<CWLVersion>) cwlVersion;
1✔
411
    this.intent = (java.util.Optional<java.util.List<String>>) intent;
1✔
412
    this.class_ = (Operation_class) class_;
1✔
413
  }
1✔
414
}
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