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

common-workflow-language / cwljava / #352

07 Apr 2025 10:22AM UTC coverage: 59.538% (-0.6%) from 60.167%
#352

Pull #193

github

web-flow
Merge d636f9333 into 46536cad2
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

0.0
/src/main/java/org/w3id/cwl/cwl1_2/CWLRecordSchemaImpl.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#CWLRecordSchema</I><BR>
25
 */
26
public class CWLRecordSchemaImpl extends SaveableImpl implements CWLRecordSchema {
27
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
×
28
  private java.util.Map<String, Object> extensionFields_ =
×
29
      new java.util.HashMap<String, Object>();
30
  public java.util.Map<String, Object> getExtensionFields() {
NEW
31
    return this.extensionFields_;
×
32
  }
33

34
  private java.util.Optional<java.util.List<Object>> fields;
35

36
  /**
37
   * Getter for property <I>https://w3id.org/cwl/salad#fields</I><BR>
38
   * <BLOCKQUOTE>
39
   * Defines the fields of the record.   * </BLOCKQUOTE>
40
   */
41

42
  public java.util.Optional<java.util.List<Object>> getFields() {
43
    return this.fields;
×
44
  }
45

46
  private Record_name type;
47

48
  /**
49
   * Getter for property <I>https://w3id.org/cwl/salad#type</I><BR>
50
   * <BLOCKQUOTE>
51
   * Must be `record`   * </BLOCKQUOTE>
52
   */
53

54
  public Record_name getType() {
55
    return this.type;
×
56
  }
57

58
  /**
59
   * Used by {@link org.w3id.cwl.cwl1_2.utils.RootLoader} to construct instances of CWLRecordSchemaImpl.
60
   *
61
   * @param __doc_            Document fragment to load this record object from (presumably a
62
                              {@link java.util.Map}).
63
   * @param __baseUri_        Base URI to generate child document IDs against.
64
   * @param __loadingOptions  Context for loading URIs and populating objects.
65
   * @param __docRoot_        ID at this position in the document (if available) (maybe?)
66
   * @throws ValidationException If the document fragment is not a {@link java.util.Map}
67
   *                             or validation of fields fails.
68
   */
69
  public CWLRecordSchemaImpl(
70
      final Object __doc_,
71
      final String __baseUri_,
72
      LoadingOptions __loadingOptions,
73
      final String __docRoot_) {
74
    super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
×
75
    // Prefix plumbing variables with '__' to reduce likelihood of collision with
76
    // generated names.
77
    String __baseUri = __baseUri_;
×
78
    String __docRoot = __docRoot_;
×
79
    if (!(__doc_ instanceof java.util.Map)) {
×
80
      throw new ValidationException("CWLRecordSchemaImpl called on non-map");
×
81
    }
82
    final java.util.Map<String, Object> __doc = (java.util.Map<String, Object>) __doc_;
×
83
    final java.util.List<ValidationException> __errors =
×
84
        new java.util.ArrayList<ValidationException>();
85
    if (__loadingOptions != null) {
×
86
      this.loadingOptions_ = __loadingOptions;
×
87
    }
88
    java.util.Optional<java.util.List<Object>> fields;
89

90
    if (__doc.containsKey("fields")) {
×
91
      try {
92
        fields =
×
93
            LoaderInstances
94
                .idmap_fields_optional_array_of_CWLRecordField
95
                .loadField(__doc.get("fields"), __baseUri, __loadingOptions);
×
96
      } catch (ValidationException e) {
×
97
        fields = null; // won't be used but prevents compiler from complaining.
×
98
        final String __message = "the `fields` field is not valid because:";
×
99
        __errors.add(new ValidationException(__message, e));
×
100
      }
×
101

102
    } else {
103
      fields = null;
×
104
    }
105
    Record_name type;
106
    try {
107
      type =
×
108
          LoaderInstances
109
              .typedsl_Record_name_2
110
              .loadField(__doc.get("type"), __baseUri, __loadingOptions);
×
111
    } catch (ValidationException e) {
×
112
      type = null; // won't be used but prevents compiler from complaining.
×
113
      final String __message = "the `type` field is not valid because:";
×
114
      __errors.add(new ValidationException(__message, e));
×
115
    }
×
116
    if (!__errors.isEmpty()) {
×
117
      throw new ValidationException("Trying 'RecordField'", __errors);
×
118
    }
119
    this.fields = (java.util.Optional<java.util.List<Object>>) fields;
×
120
    this.type = (Record_name) type;
×
121
  }
×
122
}
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