• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

common-workflow-language / cwljava / #332

09 Dec 2024 02:59AM CUT coverage: 62.203%. Remained the same
#332

Pull #190

github

web-flow
Merge dd2a2c071 into 11fff259d
Pull Request #190: Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.1 to 3.11.2

7182 of 11546 relevant lines covered (62.2%)

0.62 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/org/w3id/cwl/cwl1_1/SoftwarePackageImpl.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#SoftwarePackage</I><BR>
25
 */
26
public class SoftwarePackageImpl extends SaveableImpl implements SoftwarePackage {
27
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
×
28
  private java.util.Map<String, Object> extensionFields_ =
×
29
      new java.util.HashMap<String, Object>();
30

31
  private String package_;
32

33
  /**
34
   * Getter for property <I>https://w3id.org/cwl/cwl#SoftwarePackage/package</I><BR>
35
   * <BLOCKQUOTE>
36
   * The name of the software to be made available. If the name is
37
   * common, inconsistent, or otherwise ambiguous it should be combined with
38
   * one or more identifiers in the `specs` field.
39
   *    * </BLOCKQUOTE>
40
   */
41

42
  public String getPackage() {
43
    return this.package_;
×
44
  }
45

46
  private java.util.Optional<java.util.List<String>> version;
47

48
  /**
49
   * Getter for property <I>https://w3id.org/cwl/cwl#SoftwarePackage/version</I><BR>
50
   * <BLOCKQUOTE>
51
   * The (optional) versions of the software that are known to be
52
   * compatible.
53
   *    * </BLOCKQUOTE>
54
   */
55

56
  public java.util.Optional<java.util.List<String>> getVersion() {
57
    return this.version;
×
58
  }
59

60
  private java.util.Optional<java.util.List<String>> specs;
61

62
  /**
63
   * Getter for property <I>https://w3id.org/cwl/cwl#SoftwarePackage/specs</I><BR>
64
   * <BLOCKQUOTE>
65
   * One or more [IRI](https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier)s
66
   * identifying resources for installing or enabling the software named in
67
   * the `package` field. Implementations may provide resolvers which map
68
   * these software identifer IRIs to some configuration action; or they can
69
   * use only the name from the `package` field on a best effort basis.
70
   * 
71
   * For example, the IRI https://packages.debian.org/bowtie could
72
   * be resolved with `apt-get install bowtie`. The IRI
73
   * https://anaconda.org/bioconda/bowtie could be resolved with `conda
74
   * install -c bioconda bowtie`.
75
   * 
76
   * IRIs can also be system independent and used to map to a specific
77
   * software installation or selection mechanism.
78
   * Using [RRID](https://www.identifiers.org/rrid/) as an example:
79
   * https://identifiers.org/rrid/RRID:SCR_005476
80
   * could be fulfilled using the above mentioned Debian or bioconda
81
   * package, a local installation managed by [Environement Modules](http://modules.sourceforge.net/),
82
   * or any other mechanism the platform chooses. IRIs can also be from
83
   * identifer sources that are discipline specific yet still system
84
   * independent. As an example, the equivalent [ELIXIR Tools and Data
85
   * Service Registry](https://bio.tools) IRI to the previous RRID example is
86
   * https://bio.tools/tool/bowtie2/version/2.2.8.
87
   * If supported by a given registry, implementations are encouraged to
88
   * query these system independent sofware identifier IRIs directly for
89
   * links to packaging systems.
90
   * 
91
   * A site specific IRI can be listed as well. For example, an academic
92
   * computing cluster using Environement Modules could list the IRI
93
   * `https://hpc.example.edu/modules/bowtie-tbb/1.22` to indicate that
94
   * `module load bowtie-tbb/1.1.2` should be executed to make available
95
   * `bowtie` version 1.1.2 compiled with the TBB library prior to running
96
   * the accompanying Workflow or CommandLineTool. Note that the example IRI
97
   * is specific to a particular institution and computing environment as
98
   * the Environment Modules system does not have a common namespace or
99
   * standardized naming convention.
100
   * 
101
   * This last example is the least portable and should only be used if
102
   * mechanisms based off of the `package` field or more generic IRIs are
103
   * unavailable or unsuitable. While harmless to other sites, site specific
104
   * software IRIs should be left out of shared CWL descriptions to avoid
105
   * clutter.
106
   *    * </BLOCKQUOTE>
107
   */
108

109
  public java.util.Optional<java.util.List<String>> getSpecs() {
110
    return this.specs;
×
111
  }
112

113
  /**
114
   * Used by {@link org.w3id.cwl.cwl1_1.utils.RootLoader} to construct instances of SoftwarePackageImpl.
115
   *
116
   * @param __doc_            Document fragment to load this record object from (presumably a
117
                              {@link java.util.Map}).
118
   * @param __baseUri_        Base URI to generate child document IDs against.
119
   * @param __loadingOptions  Context for loading URIs and populating objects.
120
   * @param __docRoot_        ID at this position in the document (if available) (maybe?)
121
   * @throws ValidationException If the document fragment is not a {@link java.util.Map}
122
   *                             or validation of fields fails.
123
   */
124
  public SoftwarePackageImpl(
125
      final Object __doc_,
126
      final String __baseUri_,
127
      LoadingOptions __loadingOptions,
128
      final String __docRoot_) {
129
    super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
×
130
    // Prefix plumbing variables with '__' to reduce likelihood of collision with
131
    // generated names.
132
    String __baseUri = __baseUri_;
×
133
    String __docRoot = __docRoot_;
×
134
    if (!(__doc_ instanceof java.util.Map)) {
×
135
      throw new ValidationException("SoftwarePackageImpl called on non-map");
×
136
    }
137
    final java.util.Map<String, Object> __doc = (java.util.Map<String, Object>) __doc_;
×
138
    final java.util.List<ValidationException> __errors =
×
139
        new java.util.ArrayList<ValidationException>();
140
    if (__loadingOptions != null) {
×
141
      this.loadingOptions_ = __loadingOptions;
×
142
    }
143
    String package_;
144
    try {
145
      package_ =
×
146
          LoaderInstances
147
              .StringInstance
148
              .loadField(__doc.get("package"), __baseUri, __loadingOptions);
×
149
    } catch (ValidationException e) {
×
150
      package_ = null; // won't be used but prevents compiler from complaining.
×
151
      final String __message = "the `package` field is not valid because:";
×
152
      __errors.add(new ValidationException(__message, e));
×
153
    }
×
154
    java.util.Optional<java.util.List<String>> version;
155

156
    if (__doc.containsKey("version")) {
×
157
      try {
158
        version =
×
159
            LoaderInstances
160
                .optional_array_of_StringInstance
161
                .loadField(__doc.get("version"), __baseUri, __loadingOptions);
×
162
      } catch (ValidationException e) {
×
163
        version = null; // won't be used but prevents compiler from complaining.
×
164
        final String __message = "the `version` field is not valid because:";
×
165
        __errors.add(new ValidationException(__message, e));
×
166
      }
×
167

168
    } else {
169
      version = null;
×
170
    }
171
    java.util.Optional<java.util.List<String>> specs;
172

173
    if (__doc.containsKey("specs")) {
×
174
      try {
175
        specs =
×
176
            LoaderInstances
177
                .uri_optional_array_of_StringInstance_False_False_None
178
                .loadField(__doc.get("specs"), __baseUri, __loadingOptions);
×
179
      } catch (ValidationException e) {
×
180
        specs = null; // won't be used but prevents compiler from complaining.
×
181
        final String __message = "the `specs` field is not valid because:";
×
182
        __errors.add(new ValidationException(__message, e));
×
183
      }
×
184

185
    } else {
186
      specs = null;
×
187
    }
188
    if (!__errors.isEmpty()) {
×
189
      throw new ValidationException("Trying 'RecordField'", __errors);
×
190
    }
191
    this.package_ = (String) package_;
×
192
    this.version = (java.util.Optional<java.util.List<String>>) version;
×
193
    this.specs = (java.util.Optional<java.util.List<String>>) specs;
×
194
  }
×
195
}
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

© 2025 Coveralls, Inc