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

common-workflow-language / cwljava / #388

30 Oct 2025 04:55PM UTC coverage: 58.693% (-0.8%) from 59.538%
#388

Pull #218

github

web-flow
Merge ab8576a5b into befd7e4b9
Pull Request #218: Populate the extensionFields; add public accessors for LoadingOptions

230 of 569 new or added lines in 67 files covered. (40.42%)

28 existing lines in 27 files now uncovered.

7535 of 12838 relevant lines covered (58.69%)

0.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

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

37
  private java.util.Optional<Boolean> loadContents;
38

39
  /**
40
   * Getter for property <I>https://w3id.org/cwl/cwl#InputBinding/loadContents</I><BR>
41
   * <BLOCKQUOTE>
42
   * Use of `loadContents` in `InputBinding` is deprecated.
43
   * Preserved for v1.0 backwards compatibility.  Will be removed in
44
   * CWL v2.0.  Use `InputParameter.loadContents` instead.
45
   *    * </BLOCKQUOTE>
46
   */
47

48
  public java.util.Optional<Boolean> getLoadContents() {
49
    return this.loadContents;
×
50
  }
51

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

84
    if (__doc.containsKey("loadContents")) {
×
85
      try {
86
        loadContents =
×
87
            LoaderInstances
88
                .optional_BooleanInstance
89
                .loadField(__doc.get("loadContents"), __baseUri, __loadingOptions);
×
90
      } catch (ValidationException e) {
×
91
        loadContents = null; // won't be used but prevents compiler from complaining.
×
92
        final String __message = "the `loadContents` field is not valid because:";
×
93
        __errors.add(new ValidationException(__message, e));
×
94
      }
×
95

96
    } else {
97
      loadContents = null;
×
98
    }
99
    if (!__errors.isEmpty()) {
×
100
      throw new ValidationException("Trying 'RecordField'", __errors);
×
101
    }
102
    this.loadContents = (java.util.Optional<Boolean>) loadContents;
×
NEW
103
    for (String field:__doc.keySet()) {
×
NEW
104
      if (!attrs.contains(field)) {
×
NEW
105
        if (field.contains(":")) {
×
NEW
106
          String expanded_field = __loadingOptions.expandUrl(field, "", false, false, null);
×
NEW
107
          extensionFields_.put(expanded_field, __doc.get(field));
×
108
        }
109
      }
NEW
110
    }
×
UNCOV
111
  }
×
NEW
112
  private java.util.List<String> attrs = java.util.Arrays.asList("loadContents");
×
113
}
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