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

common-workflow-language / cwljava / #339

29 Jan 2025 01:23PM UTC coverage: 59.538% (-0.6%) from 60.167%
#339

Pull #193

github

web-flow
Merge 94c260498 into 0978523bc
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.24
/src/main/java/org/w3id/cwl/cwl1_1/CommandInputArraySchemaImpl.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_1;
16

17
import org.w3id.cwl.cwl1_1.utils.LoaderInstances;
18
import org.w3id.cwl.cwl1_1.utils.LoadingOptions;
19
import org.w3id.cwl.cwl1_1.utils.LoadingOptionsBuilder;
20
import org.w3id.cwl.cwl1_1.utils.SaveableImpl;
21
import org.w3id.cwl.cwl1_1.utils.ValidationException;
22

23
/**
24
* Auto-generated class implementation for <I>https://w3id.org/cwl/cwl#CommandInputArraySchema</I><BR>
25
 */
26
public class CommandInputArraySchemaImpl extends SaveableImpl implements CommandInputArraySchema {
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> name;
35

36
  /**
37
   * Getter for property <I>https://w3id.org/cwl/cwl#IOSchema/name</I><BR>
38
   * <BLOCKQUOTE>
39
   * The identifier for this type   * </BLOCKQUOTE>
40
   */
41

42
  public java.util.Optional<String> getName() {
43
    return this.name;
×
44
  }
45

46
  private Object items;
47

48
  /**
49
   * Getter for property <I>https://w3id.org/cwl/salad#items</I><BR>
50
   * <BLOCKQUOTE>
51
   * Defines the type of the array elements.   * </BLOCKQUOTE>
52
   */
53

54
  public Object getItems() {
55
    return this.items;
×
56
  }
57

58
  private Array_name type;
59

60
  /**
61
   * Getter for property <I>https://w3id.org/cwl/salad#type</I><BR>
62
   * <BLOCKQUOTE>
63
   * Must be `array`   * </BLOCKQUOTE>
64
   */
65

66
  public Array_name getType() {
67
    return this.type;
×
68
  }
69

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

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

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

82
  private Object doc;
83

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

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

94
  private java.util.Optional<CommandLineBinding> inputBinding;
95

96
  /**
97
   * Getter for property <I>https://w3id.org/cwl/cwl#CommandLineBindable/inputBinding</I><BR>
98
   * <BLOCKQUOTE>
99
   * Describes how to turn this object into command line arguments.   * </BLOCKQUOTE>
100
   */
101

102
  public java.util.Optional<CommandLineBinding> getInputBinding() {
103
    return this.inputBinding;
×
104
  }
105

106
  /**
107
   * Used by {@link org.w3id.cwl.cwl1_1.utils.RootLoader} to construct instances of CommandInputArraySchemaImpl.
108
   *
109
   * @param __doc_            Document fragment to load this record object from (presumably a
110
                              {@link java.util.Map}).
111
   * @param __baseUri_        Base URI to generate child document IDs against.
112
   * @param __loadingOptions  Context for loading URIs and populating objects.
113
   * @param __docRoot_        ID at this position in the document (if available) (maybe?)
114
   * @throws ValidationException If the document fragment is not a {@link java.util.Map}
115
   *                             or validation of fields fails.
116
   */
117
  public CommandInputArraySchemaImpl(
118
      final Object __doc_,
119
      final String __baseUri_,
120
      LoadingOptions __loadingOptions,
121
      final String __docRoot_) {
122
    super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
1✔
123
    // Prefix plumbing variables with '__' to reduce likelihood of collision with
124
    // generated names.
125
    String __baseUri = __baseUri_;
1✔
126
    String __docRoot = __docRoot_;
1✔
127
    if (!(__doc_ instanceof java.util.Map)) {
1✔
128
      throw new ValidationException("CommandInputArraySchemaImpl called on non-map");
×
129
    }
130
    final java.util.Map<String, Object> __doc = (java.util.Map<String, Object>) __doc_;
1✔
131
    final java.util.List<ValidationException> __errors =
1✔
132
        new java.util.ArrayList<ValidationException>();
133
    if (__loadingOptions != null) {
1✔
134
      this.loadingOptions_ = __loadingOptions;
1✔
135
    }
136
    java.util.Optional<String> name;
137

138
    if (__doc.containsKey("name")) {
1✔
139
      try {
140
        name =
×
141
            LoaderInstances
142
                .uri_optional_StringInstance_True_False_None_None
143
                .loadField(__doc.get("name"), __baseUri, __loadingOptions);
×
144
      } catch (ValidationException e) {
×
145
        name = null; // won't be used but prevents compiler from complaining.
×
146
        final String __message = "the `name` field is not valid because:";
×
147
        __errors.add(new ValidationException(__message, e));
×
148
      }
×
149

150
    } else {
151
      name = null;
1✔
152
    }
153

154
    Boolean __original_is_null = name == null;
1✔
155
    if (name == null) {
1✔
156
      if (__docRoot != null) {
1✔
157
        name = java.util.Optional.of(__docRoot);
×
158
      } else {
159
        name = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
1✔
160
      }
161
    }
162
    if (__original_is_null) {
1✔
163
        __baseUri = __baseUri_;
1✔
164
    } else {
165
        __baseUri = (String) name.orElse(null);
×
166
    }
167
    Object items;
168
    try {
169
      items =
1✔
170
          LoaderInstances
171
              .uri_union_of_CWLType_or_CommandInputRecordSchema_or_CommandInputEnumSchema_or_CommandInputArraySchema_or_StringInstance_or_array_of_union_of_CWLType_or_CommandInputRecordSchema_or_CommandInputEnumSchema_or_CommandInputArraySchema_or_StringInstance_False_True_2_None
172
              .loadField(__doc.get("items"), __baseUri, __loadingOptions);
1✔
173
    } catch (ValidationException e) {
×
174
      items = null; // won't be used but prevents compiler from complaining.
×
175
      final String __message = "the `items` field is not valid because:";
×
176
      __errors.add(new ValidationException(__message, e));
×
177
    }
1✔
178
    Array_name type;
179
    try {
180
      type =
1✔
181
          LoaderInstances
182
              .typedsl_Array_name_2
183
              .loadField(__doc.get("type"), __baseUri, __loadingOptions);
1✔
184
    } catch (ValidationException e) {
×
185
      type = null; // won't be used but prevents compiler from complaining.
×
186
      final String __message = "the `type` field is not valid because:";
×
187
      __errors.add(new ValidationException(__message, e));
×
188
    }
1✔
189
    java.util.Optional<String> label;
190

191
    if (__doc.containsKey("label")) {
1✔
192
      try {
193
        label =
×
194
            LoaderInstances
195
                .optional_StringInstance
196
                .loadField(__doc.get("label"), __baseUri, __loadingOptions);
×
197
      } catch (ValidationException e) {
×
198
        label = null; // won't be used but prevents compiler from complaining.
×
199
        final String __message = "the `label` field is not valid because:";
×
200
        __errors.add(new ValidationException(__message, e));
×
201
      }
×
202

203
    } else {
204
      label = null;
1✔
205
    }
206
    Object doc;
207

208
    if (__doc.containsKey("doc")) {
1✔
209
      try {
210
        doc =
×
211
            LoaderInstances
212
                .union_of_NullInstance_or_StringInstance_or_array_of_StringInstance
213
                .loadField(__doc.get("doc"), __baseUri, __loadingOptions);
×
214
      } catch (ValidationException e) {
×
215
        doc = null; // won't be used but prevents compiler from complaining.
×
216
        final String __message = "the `doc` field is not valid because:";
×
217
        __errors.add(new ValidationException(__message, e));
×
218
      }
×
219

220
    } else {
221
      doc = null;
1✔
222
    }
223
    java.util.Optional<CommandLineBinding> inputBinding;
224

225
    if (__doc.containsKey("inputBinding")) {
1✔
226
      try {
227
        inputBinding =
1✔
228
            LoaderInstances
229
                .optional_CommandLineBinding
230
                .loadField(__doc.get("inputBinding"), __baseUri, __loadingOptions);
1✔
231
      } catch (ValidationException e) {
×
232
        inputBinding = null; // won't be used but prevents compiler from complaining.
×
233
        final String __message = "the `inputBinding` field is not valid because:";
×
234
        __errors.add(new ValidationException(__message, e));
×
235
      }
1✔
236

237
    } else {
238
      inputBinding = null;
1✔
239
    }
240
    if (!__errors.isEmpty()) {
1✔
241
      throw new ValidationException("Trying 'RecordField'", __errors);
×
242
    }
243
    this.items = (Object) items;
1✔
244
    this.type = (Array_name) type;
1✔
245
    this.label = (java.util.Optional<String>) label;
1✔
246
    this.doc = (Object) doc;
1✔
247
    this.name = (java.util.Optional<String>) name;
1✔
248
    this.inputBinding = (java.util.Optional<CommandLineBinding>) inputBinding;
1✔
249
  }
1✔
250
}
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