• 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

82.93
/src/main/java/org/commonwl/cwlsdk/cwl1_1/SchemaDefRequirementImpl.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#SchemaDefRequirement</I><BR> <BLOCKQUOTE>
25
 This field consists of an array of type definitions which must be used when
26
 interpreting the `inputs` and `outputs` fields.  When a `type` field
27
 contain a IRI, the implementation must check if the type is defined in
28
 `schemaDefs` and use that definition.  If the type is not found in
29
 `schemaDefs`, it is an error.  The entries in `schemaDefs` must be
30
 processed in the order listed such that later schema definitions may refer
31
 to earlier schema definitions.
32
  </BLOCKQUOTE>
33
 */
34
public class SchemaDefRequirementImpl extends SaveableImpl implements SchemaDefRequirement {
35
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
1✔
36
  private java.util.Map<String, Object> extensionFields_ =
1✔
37
      new java.util.HashMap<String, Object>();
38
  public LoadingOptions getLoadingOptions() {
NEW
39
    return this.loadingOptions_;
×
40
  }
41
  public java.util.Map<String, Object> getExtensionFields() {
NEW
42
    return this.extensionFields_;
×
43
  }
44

45
  private SchemaDefRequirement_class class_;
46

47
  /**
48
   * Getter for property <I>https://w3id.org/cwl/cwl#SchemaDefRequirement/class</I><BR>
49
   * <BLOCKQUOTE>
50
   * Always 'SchemaDefRequirement'   * </BLOCKQUOTE>
51
   */
52

53
  public SchemaDefRequirement_class getClass_() {
NEW
54
    return this.class_;
×
55
  }
56

57
  private java.util.List<Object> types;
58

59
  /**
60
   * Getter for property <I>https://w3id.org/cwl/cwl#SchemaDefRequirement/types</I><BR>
61
   * <BLOCKQUOTE>
62
   * The list of type definitions.   * </BLOCKQUOTE>
63
   */
64

65
  public java.util.List<Object> getTypes() {
66
    return this.types;
1✔
67
  }
68

69
  /**
70
   * Used by {@link org.commonwl.cwlsdk.cwl1_1.utils.RootLoader} to construct instances of SchemaDefRequirementImpl.
71
   *
72
   * @param __doc_            Document fragment to load this record object from (presumably a
73
                              {@link java.util.Map}).
74
   * @param __baseUri_        Base URI to generate child document IDs against.
75
   * @param __loadingOptions  Context for loading URIs and populating objects.
76
   * @param __docRoot_        ID at this position in the document (if available) (maybe?)
77
   * @throws ValidationException If the document fragment is not a {@link java.util.Map}
78
   *                             or validation of fields fails.
79
   */
80
  public SchemaDefRequirementImpl(
81
      final Object __doc_,
82
      final String __baseUri_,
83
      LoadingOptions __loadingOptions,
84
      final String __docRoot_) {
85
    super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
1✔
86
    // Prefix plumbing variables with '__' to reduce likelihood of collision with
87
    // generated names.
88
    String __baseUri = __baseUri_;
1✔
89
    String __docRoot = __docRoot_;
1✔
90
    if (!(__doc_ instanceof java.util.Map)) {
1✔
NEW
91
      throw new ValidationException("SchemaDefRequirementImpl called on non-map");
×
92
    }
93
    final java.util.Map<String, Object> __doc = (java.util.Map<String, Object>) __doc_;
1✔
94
    final java.util.List<ValidationException> __errors =
1✔
95
        new java.util.ArrayList<ValidationException>();
96
    if (__loadingOptions != null) {
1✔
97
      this.loadingOptions_ = __loadingOptions;
1✔
98
    }
99
    SchemaDefRequirement_class class_;
100
    try {
101
      class_ =
1✔
102
          LoaderInstances
103
              .uri_SchemaDefRequirement_class_False_True_None_None
104
              .loadField(__doc.get("class"), __baseUri, __loadingOptions);
1✔
105
    } catch (ValidationException e) {
1✔
106
      class_ = null; // won't be used but prevents compiler from complaining.
1✔
107
      final String __message = "the `class` field is not valid because:";
1✔
108
      __errors.add(new ValidationException(__message, e));
1✔
109
    }
1✔
110
    java.util.List<Object> types;
111
    try {
112
      types =
1✔
113
          LoaderInstances
114
              .array_of_union_of_CommandInputRecordSchema_or_CommandInputEnumSchema_or_CommandInputArraySchema
115
              .loadField(__doc.get("types"), __baseUri, __loadingOptions);
1✔
116
    } catch (ValidationException e) {
1✔
117
      types = null; // won't be used but prevents compiler from complaining.
1✔
118
      final String __message = "the `types` field is not valid because:";
1✔
119
      __errors.add(new ValidationException(__message, e));
1✔
120
    }
1✔
121
    if (!__errors.isEmpty()) {
1✔
122
      throw new ValidationException("Trying 'RecordField'", __errors);
1✔
123
    }
124
    this.class_ = (SchemaDefRequirement_class) class_;
1✔
125
    this.types = (java.util.List<Object>) types;
1✔
126
    for (String field:__doc.keySet()) {
1✔
127
      if (!attrs.contains(field)) {
1✔
NEW
128
        if (field.contains(":")) {
×
NEW
129
          String expanded_field = __loadingOptions.expandUrl(field, "", false, false, null);
×
NEW
130
          extensionFields_.put(expanded_field, __doc.get(field));
×
131
        }
132
      }
133
    }
1✔
134
  }
1✔
135
  private java.util.List<String> attrs = java.util.Arrays.asList("class", "types");
1✔
136
}
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