• 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

87.88
/src/main/java/org/w3id/cwl/cwl1_1/ToolTimeLimitImpl.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#ToolTimeLimit</I><BR> <BLOCKQUOTE>
25
 Set an upper limit on the execution time of a CommandLineTool.
26
 A CommandLineTool whose execution duration exceeds the time
27
 limit may be preemptively terminated and considered failed.
28
 May also be used by batch systems to make scheduling decisions.
29
 The execution duration excludes external operations, such as
30
 staging of files, pulling a docker image etc, and only counts
31
 wall-time for the execution of the command line itself.
32
  </BLOCKQUOTE>
33
 */
34
public class ToolTimeLimitImpl extends SaveableImpl implements ToolTimeLimit {
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 java.util.Map<String, Object> getExtensionFields() {
NEW
39
    return this.extensionFields_;
×
40
  }
41

42
  private ToolTimeLimit_class class_;
43

44
  /**
45
   * Getter for property <I>https://w3id.org/cwl/cwl#ToolTimeLimit/class</I><BR>
46
   * <BLOCKQUOTE>
47
   * Always 'ToolTimeLimit'   * </BLOCKQUOTE>
48
   */
49

50
  public ToolTimeLimit_class getClass_() {
51
    return this.class_;
×
52
  }
53

54
  private Object timelimit;
55

56
  /**
57
   * Getter for property <I>https://w3id.org/cwl/cwl#ToolTimeLimit/timelimit</I><BR>
58
   * <BLOCKQUOTE>
59
   * The time limit, in seconds.  A time limit of zero means no
60
   * time limit.  Negative time limits are an error.
61
   *    * </BLOCKQUOTE>
62
   */
63

64
  public Object getTimelimit() {
65
    return this.timelimit;
×
66
  }
67

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