• 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

80.49
/src/main/java/org/commonwl/cwlsdk/cwl1_1/InitialWorkDirRequirementImpl.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#InitialWorkDirRequirement</I><BR> <BLOCKQUOTE>
25
 Define a list of files and subdirectories that must be created by the workflow platform in the designated output directory prior to executing the command line tool. </BLOCKQUOTE>
26
 */
27
public class InitialWorkDirRequirementImpl extends SaveableImpl implements InitialWorkDirRequirement {
28
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
1✔
29
  private java.util.Map<String, Object> extensionFields_ =
1✔
30
      new java.util.HashMap<String, Object>();
31
  public LoadingOptions getLoadingOptions() {
NEW
32
    return this.loadingOptions_;
×
33
  }
34
  public java.util.Map<String, Object> getExtensionFields() {
NEW
35
    return this.extensionFields_;
×
36
  }
37

38
  private InitialWorkDirRequirement_class class_;
39

40
  /**
41
   * Getter for property <I>https://w3id.org/cwl/cwl#InitialWorkDirRequirement/class</I><BR>
42
   * <BLOCKQUOTE>
43
   * InitialWorkDirRequirement   * </BLOCKQUOTE>
44
   */
45

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

50
  private Object listing;
51

52
  /**
53
   * Getter for property <I>https://w3id.org/cwl/cwl#listing</I><BR>
54
   * <BLOCKQUOTE>
55
   * The list of files or subdirectories that must be placed in the
56
   * designated output directory prior to executing the command line tool.
57
   * 
58
   * May be an expression. If so, the expression return value must validate as
59
   * `{type: array, items: ["null", File, File[], Directory, Directory[], Dirent]}`.
60
   * 
61
   * Files or Directories which are listed in the input parameters and
62
   * appear in the `InitialWorkDirRequirement` listing must have their
63
   * `path` set to their staged location in the designated output directory.
64
   * If the same File or Directory appears more than once in the
65
   * `InitialWorkDirRequirement` listing, the implementation must choose
66
   * exactly one value for `path`; how this value is chosen is undefined.
67
   *    * </BLOCKQUOTE>
68
   */
69

70
  public Object getListing() {
NEW
71
    return this.listing;
×
72
  }
73

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

© 2026 Coveralls, Inc