• 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

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 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 compatibility.  Will be removed in
41
   * CWL v2.0.  Use `InputParameter.loadContents` instead.
42
   *    * </BLOCKQUOTE>
43
   */
44

45
  public java.util.Optional<Boolean> getLoadContents() {
46
    return this.loadContents;
×
47
  }
48

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

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

93
    } else {
94
      loadContents = null;
×
95
    }
96
    if (!__errors.isEmpty()) {
×
97
      throw new ValidationException("Trying 'RecordField'", __errors);
×
98
    }
99
    this.loadContents = (java.util.Optional<Boolean>) loadContents;
×
100
  }
×
101
}
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