• 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

59.52
/src/main/java/org/commonwl/cwlsdk/cwl1_2/WorkflowStepOutputImpl.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#WorkflowStepOutput</I><BR> <BLOCKQUOTE>
25
 Associate an output parameter of the underlying process with a workflow
26
 parameter.  The workflow parameter (given in the `id` field) be may be used
27
 as a `source` to connect with input parameters of other workflow steps, or
28
 with an output parameter of the process.
29
 
30
 A unique identifier for this workflow output parameter.  This is
31
 the identifier to use in the `source` field of `WorkflowStepInput`
32
 to connect the output value to downstream parameters.
33
  </BLOCKQUOTE>
34
 */
35
public class WorkflowStepOutputImpl extends SaveableImpl implements WorkflowStepOutput {
36
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
1✔
37
  private java.util.Map<String, Object> extensionFields_ =
1✔
38
      new java.util.HashMap<String, Object>();
39
  public LoadingOptions getLoadingOptions() {
NEW
40
    return this.loadingOptions_;
×
41
  }
42
  public java.util.Map<String, Object> getExtensionFields() {
NEW
43
    return this.extensionFields_;
×
44
  }
45

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

48
  /**
49
   * Getter for property <I>https://w3id.org/cwl/cwl#Identified/id</I><BR>
50
   * <BLOCKQUOTE>
51
   * The unique identifier for this object.   * </BLOCKQUOTE>
52
   */
53

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

58
  /**
59
   * Used by {@link org.commonwl.cwlsdk.cwl1_1.utils.RootLoader} to construct instances of WorkflowStepOutputImpl.
60
   *
61
   * @param __doc_            Document fragment to load this record object from (presumably a
62
                              {@link java.util.Map}).
63
   * @param __baseUri_        Base URI to generate child document IDs against.
64
   * @param __loadingOptions  Context for loading URIs and populating objects.
65
   * @param __docRoot_        ID at this position in the document (if available) (maybe?)
66
   * @throws ValidationException If the document fragment is not a {@link java.util.Map}
67
   *                             or validation of fields fails.
68
   */
69
  public WorkflowStepOutputImpl(
70
      final Object __doc_,
71
      final String __baseUri_,
72
      LoadingOptions __loadingOptions,
73
      final String __docRoot_) {
74
    super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
1✔
75
    // Prefix plumbing variables with '__' to reduce likelihood of collision with
76
    // generated names.
77
    String __baseUri = __baseUri_;
1✔
78
    String __docRoot = __docRoot_;
1✔
79
    if (!(__doc_ instanceof java.util.Map)) {
1✔
NEW
80
      throw new ValidationException("WorkflowStepOutputImpl called on non-map");
×
81
    }
82
    final java.util.Map<String, Object> __doc = (java.util.Map<String, Object>) __doc_;
1✔
83
    final java.util.List<ValidationException> __errors =
1✔
84
        new java.util.ArrayList<ValidationException>();
85
    if (__loadingOptions != null) {
1✔
86
      this.loadingOptions_ = __loadingOptions;
1✔
87
    }
88
    java.util.Optional<String> id;
89

90
    if (__doc.containsKey("id")) {
1✔
91
      try {
92
        id =
1✔
93
            LoaderInstances
94
                .uri_optional_StringInstance_True_False_None_None
95
                .loadField(__doc.get("id"), __baseUri, __loadingOptions);
1✔
NEW
96
      } catch (ValidationException e) {
×
NEW
97
        id = null; // won't be used but prevents compiler from complaining.
×
NEW
98
        final String __message = "the `id` field is not valid because:";
×
NEW
99
        __errors.add(new ValidationException(__message, e));
×
100
      }
1✔
101

102
    } else {
NEW
103
      id = null;
×
104
    }
105

106
    Boolean __original_is_null = id == null;
1✔
107
    if (id == null) {
1✔
NEW
108
      if (__docRoot != null) {
×
NEW
109
        id = java.util.Optional.of(__docRoot);
×
110
      } else {
NEW
111
        id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
×
112
      }
113
    }
114
    if (__original_is_null) {
1✔
NEW
115
        __baseUri = __baseUri_;
×
116
    } else {
117
        __baseUri = (String) id.orElse(null);
1✔
118
    }
119
    if (!__errors.isEmpty()) {
1✔
NEW
120
      throw new ValidationException("Trying 'RecordField'", __errors);
×
121
    }
122
    this.id = (java.util.Optional<String>) id;
1✔
123
    for (String field:__doc.keySet()) {
1✔
124
      if (!attrs.contains(field)) {
1✔
NEW
125
        if (field.contains(":")) {
×
NEW
126
          String expanded_field = __loadingOptions.expandUrl(field, "", false, false, null);
×
NEW
127
          extensionFields_.put(expanded_field, __doc.get(field));
×
128
        }
129
      }
130
    }
1✔
131
  }
1✔
132
  private java.util.List<String> attrs = java.util.Arrays.asList("id");
1✔
133
}
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