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

common-workflow-language / cwljava / #422

17 Dec 2025 10:30AM UTC coverage: 56.982% (-1.0%) from 57.972%
#422

Pull #218

github

web-flow
Merge 2f0374175 into 4d3285bc2
Pull Request #218: refresh 2025-12 (including extensions)

185 of 577 new or added lines in 21 files covered. (32.06%)

10 existing lines in 10 files now uncovered.

7892 of 13850 relevant lines covered (56.98%)

0.57 hits per line

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

51.22
/src/main/java/org/commonwl/cwlsdk/cwl1_2/MPIRequirementImpl.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_2;
16

17
import org.commonwl.cwlsdk.cwl1_2.utils.LoaderInstances;
18
import org.commonwl.cwlsdk.cwl1_2.utils.LoadingOptions;
19
import org.commonwl.cwlsdk.cwl1_2.utils.LoadingOptionsBuilder;
20
import org.commonwl.cwlsdk.cwl1_2.utils.SaveableImpl;
21
import org.commonwl.cwlsdk.cwl1_2.utils.ValidationException;
22

23
/**
24
* Auto-generated class implementation for <I>http://commonwl.org/cwltool#MPIRequirement</I><BR> <BLOCKQUOTE>
25
 Indicates that a process requires an MPI runtime.
26
  </BLOCKQUOTE>
27
 */
28
public class MPIRequirementImpl extends SaveableImpl implements MPIRequirement {
29
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
1✔
30
  private java.util.Map<String, Object> extensionFields_ =
1✔
31
      new java.util.HashMap<String, Object>();
32
  public LoadingOptions getLoadingOptions() {
NEW
33
    return this.loadingOptions_;
×
34
  }
35
  public java.util.Map<String, Object> getExtensionFields() {
NEW
36
    return this.extensionFields_;
×
37
  }
38

39
  private String class_;
40

41
  /**
42
   * Getter for property <I>http://commonwl.org/cwltool#MPIRequirement/class</I><BR>
43
   * <BLOCKQUOTE>
44
   * Always &#x27;MPIRequirement&#x27;   * </BLOCKQUOTE>
45
   */
46

47
  public String getClass_() {
NEW
48
    return this.class_;
×
49
  }
50

51
  private Object processes;
52

53
  /**
54
   * Getter for property <I>http://commonwl.org/cwltool#MPIRequirement/processes</I><BR>
55
   * <BLOCKQUOTE>
56
   * The number of MPI processes to start. If you give a string,
57
   * this will be evaluated as a CWL Expression and it must
58
   * evaluate to an integer.
59
   *    * </BLOCKQUOTE>
60
   */
61

62
  public Object getProcesses() {
NEW
63
    return this.processes;
×
64
  }
65

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