• 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_2/InplaceUpdateRequirementImpl.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#InplaceUpdateRequirement</I><BR> <BLOCKQUOTE>
25
 
26
 If `inplaceUpdate` is true, then an implementation supporting this
27
 feature may permit tools to directly update files with `writable:
28
 true` in InitialWorkDirRequirement.  That is, as an optimization,
29
 files may be destructively modified in place as opposed to copied
30
 and updated.
31
 
32
 An implementation must ensure that only one workflow step may
33
 access a writable file at a time.  It is an error if a file which
34
 is writable by one workflow step file is accessed (for reading or
35
 writing) by any other workflow step running independently.
36
 However, a file which has been updated in a previous completed
37
 step may be used as input to multiple steps, provided it is
38
 read-only in every step.
39
 
40
 Workflow steps which modify a file must produce the modified file
41
 as output.  Downstream steps which further process the file must
42
 use the output of previous steps, and not refer to a common input
43
 (this is necessary for both ordering and correctness).
44
 
45
 Workflow authors should provide this in the `hints` section.  The
46
 intent of this feature is that workflows produce the same results
47
 whether or not InplaceUpdateRequirement is supported by the
48
 implementation, and this feature is primarily available as an
49
 optimization for particular environments.
50
 
51
 Users and implementers should be aware that workflows that
52
 destructively modify inputs may not be repeatable or reproducible.
53
 In particular, enabling this feature implies that WorkReuse should
54
 not be enabled.
55
  </BLOCKQUOTE>
56
 */
57
public class InplaceUpdateRequirementImpl extends SaveableImpl implements InplaceUpdateRequirement {
58
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
1✔
59
  private java.util.Map<String, Object> extensionFields_ =
1✔
60
      new java.util.HashMap<String, Object>();
61
  public java.util.Map<String, Object> getExtensionFields() {
NEW
62
    return this.extensionFields_;
×
63
  }
64

65
  private InplaceUpdateRequirement_class class_;
66

67
  /**
68
   * Getter for property <I>https://w3id.org/cwl/cwl#InplaceUpdateRequirement/class</I><BR>
69
   * <BLOCKQUOTE>
70
   * Always 'InplaceUpdateRequirement'   * </BLOCKQUOTE>
71
   */
72

73
  public InplaceUpdateRequirement_class getClass_() {
74
    return this.class_;
×
75
  }
76

77
  private Boolean inplaceUpdate;
78

79
  /**
80
   * Getter for property <I>https://w3id.org/cwl/cwl#InplaceUpdateRequirement/inplaceUpdate</I><BR>
81

82
   */
83

84
  public Boolean getInplaceUpdate() {
85
    return this.inplaceUpdate;
×
86
  }
87

88
  /**
89
   * Used by {@link org.w3id.cwl.cwl1_2.utils.RootLoader} to construct instances of InplaceUpdateRequirementImpl.
90
   *
91
   * @param __doc_            Document fragment to load this record object from (presumably a
92
                              {@link java.util.Map}).
93
   * @param __baseUri_        Base URI to generate child document IDs against.
94
   * @param __loadingOptions  Context for loading URIs and populating objects.
95
   * @param __docRoot_        ID at this position in the document (if available) (maybe?)
96
   * @throws ValidationException If the document fragment is not a {@link java.util.Map}
97
   *                             or validation of fields fails.
98
   */
99
  public InplaceUpdateRequirementImpl(
100
      final Object __doc_,
101
      final String __baseUri_,
102
      LoadingOptions __loadingOptions,
103
      final String __docRoot_) {
104
    super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
1✔
105
    // Prefix plumbing variables with '__' to reduce likelihood of collision with
106
    // generated names.
107
    String __baseUri = __baseUri_;
1✔
108
    String __docRoot = __docRoot_;
1✔
109
    if (!(__doc_ instanceof java.util.Map)) {
1✔
110
      throw new ValidationException("InplaceUpdateRequirementImpl called on non-map");
×
111
    }
112
    final java.util.Map<String, Object> __doc = (java.util.Map<String, Object>) __doc_;
1✔
113
    final java.util.List<ValidationException> __errors =
1✔
114
        new java.util.ArrayList<ValidationException>();
115
    if (__loadingOptions != null) {
1✔
116
      this.loadingOptions_ = __loadingOptions;
1✔
117
    }
118
    InplaceUpdateRequirement_class class_;
119
    try {
120
      class_ =
1✔
121
          LoaderInstances
122
              .uri_InplaceUpdateRequirement_class_False_True_None_None
123
              .loadField(__doc.get("class"), __baseUri, __loadingOptions);
1✔
124
    } catch (ValidationException e) {
1✔
125
      class_ = null; // won't be used but prevents compiler from complaining.
1✔
126
      final String __message = "the `class` field is not valid because:";
1✔
127
      __errors.add(new ValidationException(__message, e));
1✔
128
    }
1✔
129
    Boolean inplaceUpdate;
130
    try {
131
      inplaceUpdate =
1✔
132
          LoaderInstances
133
              .BooleanInstance
134
              .loadField(__doc.get("inplaceUpdate"), __baseUri, __loadingOptions);
1✔
135
    } catch (ValidationException e) {
1✔
136
      inplaceUpdate = null; // won't be used but prevents compiler from complaining.
1✔
137
      final String __message = "the `inplaceUpdate` field is not valid because:";
1✔
138
      __errors.add(new ValidationException(__message, e));
1✔
139
    }
1✔
140
    if (!__errors.isEmpty()) {
1✔
141
      throw new ValidationException("Trying 'RecordField'", __errors);
1✔
142
    }
143
    this.class_ = (InplaceUpdateRequirement_class) class_;
1✔
144
    this.inplaceUpdate = (Boolean) inplaceUpdate;
1✔
145
  }
1✔
146
}
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