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

common-workflow-language / cwljava / #352

07 Apr 2025 10:22AM UTC coverage: 59.538% (-0.6%) from 60.167%
#352

Pull #193

github

web-flow
Merge d636f9333 into 46536cad2
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

65.38
/src/main/java/org/w3id/cwl/cwl1_1/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_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#InputBinding</I><BR>
25
 */
26
public class InputBindingImpl extends SaveableImpl implements InputBinding {
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<Boolean> loadContents;
35

36
  /**
37
   * Getter for property <I>https://w3id.org/cwl/cwl#InputBinding/loadContents</I><BR>
38
   * <BLOCKQUOTE>
39
   * Use of `loadContents` in `InputBinding` is deprecated.
40
   * Preserved for v1.0 backwards compatability.  Will be removed in
41
   * CWL v2.0.  Use `InputParameter.loadContents` instead.
42
   * 
43
   * Only valid when `type: File` or is an array of `items: File`.
44
   * 
45
   * Read up to the first 64 KiB of text from the file and place it in the
46
   * "contents" field of the file object for use by expressions.
47
   *    * </BLOCKQUOTE>
48
   */
49

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

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

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

98
    } else {
99
      loadContents = null;
×
100
    }
101
    if (!__errors.isEmpty()) {
1✔
102
      throw new ValidationException("Trying 'RecordField'", __errors);
×
103
    }
104
    this.loadContents = (java.util.Optional<Boolean>) loadContents;
1✔
105
  }
1✔
106
}
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