• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
Build has been canceled!

common-workflow-language / cwljava / #388

30 Oct 2025 04:55PM UTC coverage: 58.693% (-0.8%) from 59.538%
#388

Pull #218

github

web-flow
Merge ab8576a5b into befd7e4b9
Pull Request #218: Populate the extensionFields; add public accessors for LoadingOptions

230 of 569 new or added lines in 67 files covered. (40.42%)

28 existing lines in 27 files now uncovered.

7535 of 12838 relevant lines covered (58.69%)

0.59 hits per line

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

80.49
/src/main/java/org/w3id/cwl/cwl1_2/NetworkAccessImpl.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#NetworkAccess</I><BR> <BLOCKQUOTE>
25
 Indicate whether a process requires outgoing IPv4/IPv6 network
26
 access.  Choice of IPv4 or IPv6 is implementation and site
27
 specific, correct tools must support both.
28
 
29
 If `networkAccess` is false or not specified, tools must not
30
 assume network access, except for localhost (the loopback device).
31
 
32
 If `networkAccess` is true, the tool must be able to make outgoing
33
 connections to network resources.  Resources may be on a private
34
 subnet or the public Internet.  However, implementations and sites
35
 may apply their own security policies to restrict what is
36
 accessible by the tool.
37
 
38
 Enabling network access does not imply a publicly routable IP
39
 address or the ability to accept inbound connections.
40
  </BLOCKQUOTE>
41
 */
42
public class NetworkAccessImpl extends SaveableImpl implements NetworkAccess {
43
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
1✔
44
  private java.util.Map<String, Object> extensionFields_ =
1✔
45
      new java.util.HashMap<String, Object>();
46
  public LoadingOptions getLoadingOptions() {
NEW
47
    return this.loadingOptions_;
×
48
  }
49
  public java.util.Map<String, Object> getExtensionFields() {
50
    return this.extensionFields_;
×
51
  }
52

53
  private NetworkAccess_class class_;
54

55
  /**
56
   * Getter for property <I>https://w3id.org/cwl/cwl#NetworkAccess/class</I><BR>
57
   * <BLOCKQUOTE>
58
   * Always 'NetworkAccess'   * </BLOCKQUOTE>
59
   */
60

61
  public NetworkAccess_class getClass_() {
62
    return this.class_;
×
63
  }
64

65
  private Object networkAccess;
66

67
  /**
68
   * Getter for property <I>https://w3id.org/cwl/cwl#NetworkAccess/networkAccess</I><BR>
69

70
   */
71

72
  public Object getNetworkAccess() {
73
    return this.networkAccess;
×
74
  }
75

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