• 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/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.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#InitialWorkDirRequirement</I><BR> <BLOCKQUOTE>
25
 Define a list of files and subdirectories that must be staged by the workflow platform prior to executing the command line tool.
26
 Normally files are staged within the designated output directory. However, when running inside containers, files may be staged at arbitrary locations, see discussion for [`Dirent.entryname`](#Dirent). Together with `DockerRequirement.dockerOutputDirectory` it is possible to control the locations of both input and output files when running in containers. </BLOCKQUOTE>
27
 */
28
public class InitialWorkDirRequirementImpl extends SaveableImpl implements InitialWorkDirRequirement {
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 java.util.Map<String, Object> getExtensionFields() {
NEW
33
    return this.extensionFields_;
×
34
  }
35

36
  private InitialWorkDirRequirement_class class_;
37

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

44
  public InitialWorkDirRequirement_class getClass_() {
45
    return this.class_;
×
46
  }
47

48
  private Object listing;
49

50
  /**
51
   * Getter for property <I>https://w3id.org/cwl/cwl#listing</I><BR>
52
   * <BLOCKQUOTE>
53
   * The list of files or subdirectories that must be staged prior
54
   * to executing the command line tool.
55
   * 
56
   * Return type of each expression must validate as `["null",
57
   * File, Directory, Dirent, {type: array, items: [File,
58
   * Directory]}]`.
59
   * 
60
   * Each `File` or `Directory` that is returned by an Expression
61
   * must be added to the designated output directory prior to
62
   * executing the tool.
63
   * 
64
   * Each `Dirent` record that is listed or returned by an
65
   * expression specifies a file to be created or staged in the
66
   * designated output directory prior to executing the tool.
67
   * 
68
   * Expressions may return null, in which case they have no effect.
69
   * 
70
   * Files or Directories which are listed in the input parameters
71
   * and appear in the `InitialWorkDirRequirement` listing must
72
   * have their `path` set to their staged location.  If the same
73
   * File or Directory appears more than once in the
74
   * `InitialWorkDirRequirement` listing, the implementation must
75
   * choose exactly one value for `path`; how this value is chosen
76
   * is undefined.
77
   *    * </BLOCKQUOTE>
78
   */
79

80
  public Object getListing() {
81
    return this.listing;
×
82
  }
83

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