• 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

87.88
/src/main/java/org/w3id/cwl/cwl1_2/WorkReuseImpl.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#WorkReuse</I><BR> <BLOCKQUOTE>
25
 For implementations that support reusing output from past work (on
26
 the assumption that same code and same input produce same
27
 results), control whether to enable or disable the reuse behavior
28
 for a particular tool or step (to accommodate situations where that
29
 assumption is incorrect).  A reused step is not executed but
30
 instead returns the same output as the original execution.
31
 
32
 If `WorkReuse` is not specified, correct tools should assume it
33
 is enabled by default.
34
  </BLOCKQUOTE>
35
 */
36
public class WorkReuseImpl extends SaveableImpl implements WorkReuse {
37
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
1✔
38
  private java.util.Map<String, Object> extensionFields_ =
1✔
39
      new java.util.HashMap<String, Object>();
40
  public java.util.Map<String, Object> getExtensionFields() {
NEW
41
    return this.extensionFields_;
×
42
  }
43

44
  private WorkReuse_class class_;
45

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

52
  public WorkReuse_class getClass_() {
53
    return this.class_;
×
54
  }
55

56
  private Object enableReuse;
57

58
  /**
59
   * Getter for property <I>https://w3id.org/cwl/cwl#WorkReuse/enableReuse</I><BR>
60

61
   */
62

63
  public Object getEnableReuse() {
64
    return this.enableReuse;
×
65
  }
66

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