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

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

41.83
/src/main/java/org/w3id/cwl/cwl1_2/FileImpl.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#File</I><BR> <BLOCKQUOTE>
25
 Represents a file (or group of files when `secondaryFiles` is provided) that
26
 will be accessible by tools using standard POSIX file system call API such as
27
 open(2) and read(2).
28
 
29
 Files are represented as objects with `class` of `File`.  File objects have
30
 a number of properties that provide metadata about the file.
31
 
32
 The `location` property of a File is a IRI that uniquely identifies the
33
 file.  Implementations must support the `file://` IRI scheme and may support
34
 other schemes such as `http://` and `https://`.  The value of `location` may also be a
35
 relative reference, in which case it must be resolved relative to the IRI
36
 of the document it appears in.  Alternately to `location`, implementations
37
 must also accept the `path` property on File, which must be a filesystem
38
 path available on the same host as the CWL runner (for inputs) or the
39
 runtime environment of a command line tool execution (for command line tool
40
 outputs).
41
 
42
 If no `location` or `path` is specified, a file object must specify
43
 `contents` with the UTF-8 text content of the file.  This is a "file
44
 literal".  File literals do not correspond to external resources, but are
45
 created on disk with `contents` with when needed for executing a tool.
46
 Where appropriate, expressions can return file literals to define new files
47
 on a runtime.  The maximum size of `contents` is 64 kilobytes.
48
 
49
 The `basename` property defines the filename on disk where the file is
50
 staged.  This may differ from the resource name.  If not provided,
51
 `basename` must be computed from the last path part of `location` and made
52
 available to expressions.
53
 
54
 The `secondaryFiles` property is a list of File or Directory objects that
55
 must be staged in the same directory as the primary file.  It is an error
56
 for file names to be duplicated in `secondaryFiles`.
57
 
58
 The `size` property is the size in bytes of the File.  It must be computed
59
 from the resource and made available to expressions.  The `checksum` field
60
 contains a cryptographic hash of the file content for use it verifying file
61
 contents.  Implementations may, at user option, enable or disable
62
 computation of the `checksum` field for performance or other reasons.
63
 However, the ability to compute output checksums is required to pass the
64
 CWL conformance test suite.
65
 
66
 When executing a CommandLineTool, the files and secondary files may be
67
 staged to an arbitrary directory, but must use the value of `basename` for
68
 the filename.  The `path` property must be file path in the context of the
69
 tool execution runtime (local to the compute node, or within the executing
70
 container).  All computed properties should be available to expressions.
71
 File literals also must be staged and `path` must be set.
72
 
73
 When collecting CommandLineTool outputs, `glob` matching returns file paths
74
 (with the `path` property) and the derived properties. This can all be
75
 modified by `outputEval`.  Alternately, if the file `cwl.output.json` is
76
 present in the output, `outputBinding` is ignored.
77
 
78
 File objects in the output must provide either a `location` IRI or a `path`
79
 property in the context of the tool execution runtime (local to the compute
80
 node, or within the executing container).
81
 
82
 When evaluating an ExpressionTool, file objects must be referenced via
83
 `location` (the expression tool does not have access to files on disk so
84
 `path` is meaningless) or as file literals.  It is legal to return a file
85
 object with an existing `location` but a different `basename`.  The
86
 `loadContents` field of ExpressionTool inputs behaves the same as on
87
 CommandLineTool inputs, however it is not meaningful on the outputs.
88
 
89
 An ExpressionTool may forward file references from input to output by using
90
 the same value for `location`.
91
  </BLOCKQUOTE>
92
 */
93
public class FileImpl extends SaveableImpl implements File {
94
  private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
1✔
95
  private java.util.Map<String, Object> extensionFields_ =
1✔
96
      new java.util.HashMap<String, Object>();
97
  public LoadingOptions getLoadingOptions() {
NEW
98
    return this.loadingOptions_;
×
99
  }
100
  public java.util.Map<String, Object> getExtensionFields() {
101
    return this.extensionFields_;
×
102
  }
103

104
  private File_class class_;
105

106
  /**
107
   * Getter for property <I>https://w3id.org/cwl/cwl#File/class</I><BR>
108
   * <BLOCKQUOTE>
109
   * Must be `File` to indicate this object describes a file.   * </BLOCKQUOTE>
110
   */
111

112
  public File_class getClass_() {
113
    return this.class_;
×
114
  }
115

116
  private java.util.Optional<String> location;
117

118
  /**
119
   * Getter for property <I>https://w3id.org/cwl/cwl#File/location</I><BR>
120
   * <BLOCKQUOTE>
121
   * An IRI that identifies the file resource.  This may be a relative
122
   * reference, in which case it must be resolved using the base IRI of the
123
   * document.  The location may refer to a local or remote resource; the
124
   * implementation must use the IRI to retrieve file content.  If an
125
   * implementation is unable to retrieve the file content stored at a
126
   * remote resource (due to unsupported protocol, access denied, or other
127
   * issue) it must signal an error.
128
   * 
129
   * If the `location` field is not provided, the `contents` field must be
130
   * provided.  The implementation must assign a unique identifier for
131
   * the `location` field.
132
   * 
133
   * If the `path` field is provided but the `location` field is not, an
134
   * implementation may assign the value of the `path` field to `location`,
135
   * then follow the rules above.
136
   *    * </BLOCKQUOTE>
137
   */
138

139
  public java.util.Optional<String> getLocation() {
140
    return this.location;
×
141
  }
142

143
  private java.util.Optional<String> path;
144

145
  /**
146
   * Getter for property <I>https://w3id.org/cwl/cwl#path</I><BR>
147
   * <BLOCKQUOTE>
148
   * The local host path where the File is available when a CommandLineTool is
149
   * executed.  This field must be set by the implementation.  The final
150
   * path component must match the value of `basename`.  This field
151
   * must not be used in any other context.  The command line tool being
152
   * executed must be able to access the file at `path` using the POSIX
153
   * `open(2)` syscall.
154
   * 
155
   * As a special case, if the `path` field is provided but the `location`
156
   * field is not, an implementation may assign the value of the `path`
157
   * field to `location`, and remove the `path` field.
158
   * 
159
   * If the `path` contains [POSIX shell metacharacters](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02)
160
   * (`|`,`&`, `;`, `<`, `>`, `(`,`)`, `$`,`` ` ``, `\`, `"`, `'`,
161
   * `<space>`, `<tab>`, and `<newline>`) or characters
162
   * [not allowed](http://www.iana.org/assignments/idna-tables-6.3.0/idna-tables-6.3.0.xhtml)
163
   * for [Internationalized Domain Names for Applications](https://tools.ietf.org/html/rfc6452)
164
   * then implementations may terminate the process with a
165
   * `permanentFailure`.
166
   *    * </BLOCKQUOTE>
167
   */
168

169
  public java.util.Optional<String> getPath() {
170
    return this.path;
×
171
  }
172

173
  private java.util.Optional<String> basename;
174

175
  /**
176
   * Getter for property <I>https://w3id.org/cwl/cwl#File/basename</I><BR>
177
   * <BLOCKQUOTE>
178
   * The base name of the file, that is, the name of the file without any
179
   * leading directory path.  The base name must not contain a slash `/`.
180
   * 
181
   * If not provided, the implementation must set this field based on the
182
   * `location` field by taking the final path component after parsing
183
   * `location` as an IRI.  If `basename` is provided, it is not required to
184
   * match the value from `location`.
185
   * 
186
   * When this file is made available to a CommandLineTool, it must be named
187
   * with `basename`, i.e. the final component of the `path` field must match
188
   * `basename`.
189
   *    * </BLOCKQUOTE>
190
   */
191

192
  public java.util.Optional<String> getBasename() {
193
    return this.basename;
×
194
  }
195

196
  private java.util.Optional<String> dirname;
197

198
  /**
199
   * Getter for property <I>https://w3id.org/cwl/cwl#File/dirname</I><BR>
200
   * <BLOCKQUOTE>
201
   * The name of the directory containing file, that is, the path leading up
202
   * to the final slash in the path such that `dirname + '/' + basename ==
203
   * path`.
204
   * 
205
   * The implementation must set this field based on the value of `path`
206
   * prior to evaluating parameter references or expressions in a
207
   * CommandLineTool document.  This field must not be used in any other
208
   * context.
209
   *    * </BLOCKQUOTE>
210
   */
211

212
  public java.util.Optional<String> getDirname() {
213
    return this.dirname;
×
214
  }
215

216
  private java.util.Optional<String> nameroot;
217

218
  /**
219
   * Getter for property <I>https://w3id.org/cwl/cwl#File/nameroot</I><BR>
220
   * <BLOCKQUOTE>
221
   * The basename root such that `nameroot + nameext == basename`, and
222
   * `nameext` is empty or begins with a period and contains at most one
223
   * period.  For the purposes of path splitting leading periods on the
224
   * basename are ignored; a basename of `.cshrc` will have a nameroot of
225
   * `.cshrc`.
226
   * 
227
   * The implementation must set this field automatically based on the value
228
   * of `basename` prior to evaluating parameter references or expressions.
229
   *    * </BLOCKQUOTE>
230
   */
231

232
  public java.util.Optional<String> getNameroot() {
233
    return this.nameroot;
×
234
  }
235

236
  private java.util.Optional<String> nameext;
237

238
  /**
239
   * Getter for property <I>https://w3id.org/cwl/cwl#File/nameext</I><BR>
240
   * <BLOCKQUOTE>
241
   * The basename extension such that `nameroot + nameext == basename`, and
242
   * `nameext` is empty or begins with a period and contains at most one
243
   * period.  Leading periods on the basename are ignored; a basename of
244
   * `.cshrc` will have an empty `nameext`.
245
   * 
246
   * The implementation must set this field automatically based on the value
247
   * of `basename` prior to evaluating parameter references or expressions.
248
   *    * </BLOCKQUOTE>
249
   */
250

251
  public java.util.Optional<String> getNameext() {
252
    return this.nameext;
×
253
  }
254

255
  private java.util.Optional<String> checksum;
256

257
  /**
258
   * Getter for property <I>https://w3id.org/cwl/cwl#File/checksum</I><BR>
259
   * <BLOCKQUOTE>
260
   * Optional hash code for validating file integrity.  Currently, must be in the form
261
   * "sha1$ + hexadecimal string" using the SHA-1 algorithm.
262
   *    * </BLOCKQUOTE>
263
   */
264

265
  public java.util.Optional<String> getChecksum() {
266
    return this.checksum;
×
267
  }
268

269
  private Object size;
270

271
  /**
272
   * Getter for property <I>https://w3id.org/cwl/cwl#File/size</I><BR>
273
   * <BLOCKQUOTE>
274
   * Optional file size (in bytes)   * </BLOCKQUOTE>
275
   */
276

277
  public Object getSize() {
278
    return this.size;
×
279
  }
280

281
  private java.util.Optional<java.util.List<Object>> secondaryFiles;
282

283
  /**
284
   * Getter for property <I>https://w3id.org/cwl/cwl#secondaryFiles</I><BR>
285
   * <BLOCKQUOTE>
286
   * A list of additional files or directories that are associated with the
287
   * primary file and must be transferred alongside the primary file.
288
   * Examples include indexes of the primary file, or external references
289
   * which must be included when loading primary document.  A file object
290
   * listed in `secondaryFiles` may itself include `secondaryFiles` for
291
   * which the same rules apply.
292
   *    * </BLOCKQUOTE>
293
   */
294

295
  public java.util.Optional<java.util.List<Object>> getSecondaryFiles() {
296
    return this.secondaryFiles;
×
297
  }
298

299
  private java.util.Optional<String> format;
300

301
  /**
302
   * Getter for property <I>https://w3id.org/cwl/cwl#format</I><BR>
303
   * <BLOCKQUOTE>
304
   * The format of the file: this must be an IRI of a concept node that
305
   * represents the file format, preferably defined within an ontology.
306
   * If no ontology is available, file formats may be tested by exact match.
307
   * 
308
   * Reasoning about format compatibility must be done by checking that an
309
   * input file format is the same, `owl:equivalentClass` or
310
   * `rdfs:subClassOf` the format required by the input parameter.
311
   * `owl:equivalentClass` is transitive with `rdfs:subClassOf`, e.g. if
312
   * `<B> owl:equivalentClass <C>` and `<B> owl:subclassOf <A>` then infer
313
   * `<C> owl:subclassOf <A>`.
314
   * 
315
   * File format ontologies may be provided in the "$schemas" metadata at the
316
   * root of the document.  If no ontologies are specified in `$schemas`, the
317
   * runtime may perform exact file format matches.
318
   *    * </BLOCKQUOTE>
319
   */
320

321
  public java.util.Optional<String> getFormat() {
322
    return this.format;
×
323
  }
324

325
  private java.util.Optional<String> contents;
326

327
  /**
328
   * Getter for property <I>https://w3id.org/cwl/cwl#File/contents</I><BR>
329
   * <BLOCKQUOTE>
330
   * File contents literal.
331
   * 
332
   * If neither `location` nor `path` is provided, `contents` must be
333
   * non-null.  The implementation must assign a unique identifier for the
334
   * `location` field.  When the file is staged as input to CommandLineTool,
335
   * the value of `contents` must be written to a file.
336
   * 
337
   * If `contents` is set as a result of a Javascript expression,
338
   * an `entry` in `InitialWorkDirRequirement`, or read in from
339
   * `cwl.output.json`, there is no specified upper limit on the
340
   * size of `contents`.  Implementations may have practical limits
341
   * on the size of `contents` based on memory and storage
342
   * available to the workflow runner or other factors.
343
   * 
344
   * If the `loadContents` field of an `InputParameter` or
345
   * `OutputParameter` is true, and the input or output File object
346
   * `location` is valid, the file must be a UTF-8 text file 64 KiB
347
   * or smaller, and the implementation must read the entire
348
   * contents of the file and place it in the `contents` field.  If
349
   * the size of the file is greater than 64 KiB, the
350
   * implementation must raise a fatal error.
351
   *    * </BLOCKQUOTE>
352
   */
353

354
  public java.util.Optional<String> getContents() {
355
    return this.contents;
×
356
  }
357

358
  /**
359
   * Used by {@link org.w3id.cwl.cwl1_2.utils.RootLoader} to construct instances of FileImpl.
360
   *
361
   * @param __doc_            Document fragment to load this record object from (presumably a
362
                              {@link java.util.Map}).
363
   * @param __baseUri_        Base URI to generate child document IDs against.
364
   * @param __loadingOptions  Context for loading URIs and populating objects.
365
   * @param __docRoot_        ID at this position in the document (if available) (maybe?)
366
   * @throws ValidationException If the document fragment is not a {@link java.util.Map}
367
   *                             or validation of fields fails.
368
   */
369
  public FileImpl(
370
      final Object __doc_,
371
      final String __baseUri_,
372
      LoadingOptions __loadingOptions,
373
      final String __docRoot_) {
374
    super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
1✔
375
    // Prefix plumbing variables with '__' to reduce likelihood of collision with
376
    // generated names.
377
    String __baseUri = __baseUri_;
1✔
378
    String __docRoot = __docRoot_;
1✔
379
    if (!(__doc_ instanceof java.util.Map)) {
1✔
380
      throw new ValidationException("FileImpl called on non-map");
×
381
    }
382
    final java.util.Map<String, Object> __doc = (java.util.Map<String, Object>) __doc_;
1✔
383
    final java.util.List<ValidationException> __errors =
1✔
384
        new java.util.ArrayList<ValidationException>();
385
    if (__loadingOptions != null) {
1✔
386
      this.loadingOptions_ = __loadingOptions;
1✔
387
    }
388
    File_class class_;
389
    try {
390
      class_ =
1✔
391
          LoaderInstances
392
              .uri_File_class_False_True_None_None
393
              .loadField(__doc.get("class"), __baseUri, __loadingOptions);
1✔
394
    } catch (ValidationException e) {
1✔
395
      class_ = null; // won't be used but prevents compiler from complaining.
1✔
396
      final String __message = "the `class` field is not valid because:";
1✔
397
      __errors.add(new ValidationException(__message, e));
1✔
398
    }
1✔
399
    java.util.Optional<String> location;
400

401
    if (__doc.containsKey("location")) {
1✔
402
      try {
403
        location =
1✔
404
            LoaderInstances
405
                .uri_optional_StringInstance_False_False_None_None
406
                .loadField(__doc.get("location"), __baseUri, __loadingOptions);
1✔
407
      } catch (ValidationException e) {
×
408
        location = null; // won't be used but prevents compiler from complaining.
×
409
        final String __message = "the `location` field is not valid because:";
×
410
        __errors.add(new ValidationException(__message, e));
×
411
      }
1✔
412

413
    } else {
414
      location = null;
1✔
415
    }
416
    java.util.Optional<String> path;
417

418
    if (__doc.containsKey("path")) {
1✔
419
      try {
420
        path =
1✔
421
            LoaderInstances
422
                .uri_optional_StringInstance_False_False_None_None
423
                .loadField(__doc.get("path"), __baseUri, __loadingOptions);
1✔
424
      } catch (ValidationException e) {
×
425
        path = null; // won't be used but prevents compiler from complaining.
×
426
        final String __message = "the `path` field is not valid because:";
×
427
        __errors.add(new ValidationException(__message, e));
×
428
      }
1✔
429

430
    } else {
431
      path = null;
1✔
432
    }
433
    java.util.Optional<String> basename;
434

435
    if (__doc.containsKey("basename")) {
1✔
436
      try {
437
        basename =
×
438
            LoaderInstances
439
                .optional_StringInstance
440
                .loadField(__doc.get("basename"), __baseUri, __loadingOptions);
×
441
      } catch (ValidationException e) {
×
442
        basename = null; // won't be used but prevents compiler from complaining.
×
443
        final String __message = "the `basename` field is not valid because:";
×
444
        __errors.add(new ValidationException(__message, e));
×
445
      }
×
446

447
    } else {
448
      basename = null;
1✔
449
    }
450
    java.util.Optional<String> dirname;
451

452
    if (__doc.containsKey("dirname")) {
1✔
453
      try {
454
        dirname =
×
455
            LoaderInstances
456
                .optional_StringInstance
457
                .loadField(__doc.get("dirname"), __baseUri, __loadingOptions);
×
458
      } catch (ValidationException e) {
×
459
        dirname = null; // won't be used but prevents compiler from complaining.
×
460
        final String __message = "the `dirname` field is not valid because:";
×
461
        __errors.add(new ValidationException(__message, e));
×
462
      }
×
463

464
    } else {
465
      dirname = null;
1✔
466
    }
467
    java.util.Optional<String> nameroot;
468

469
    if (__doc.containsKey("nameroot")) {
1✔
470
      try {
471
        nameroot =
×
472
            LoaderInstances
473
                .optional_StringInstance
474
                .loadField(__doc.get("nameroot"), __baseUri, __loadingOptions);
×
475
      } catch (ValidationException e) {
×
476
        nameroot = null; // won't be used but prevents compiler from complaining.
×
477
        final String __message = "the `nameroot` field is not valid because:";
×
478
        __errors.add(new ValidationException(__message, e));
×
479
      }
×
480

481
    } else {
482
      nameroot = null;
1✔
483
    }
484
    java.util.Optional<String> nameext;
485

486
    if (__doc.containsKey("nameext")) {
1✔
487
      try {
488
        nameext =
×
489
            LoaderInstances
490
                .optional_StringInstance
491
                .loadField(__doc.get("nameext"), __baseUri, __loadingOptions);
×
492
      } catch (ValidationException e) {
×
493
        nameext = null; // won't be used but prevents compiler from complaining.
×
494
        final String __message = "the `nameext` field is not valid because:";
×
495
        __errors.add(new ValidationException(__message, e));
×
496
      }
×
497

498
    } else {
499
      nameext = null;
1✔
500
    }
501
    java.util.Optional<String> checksum;
502

503
    if (__doc.containsKey("checksum")) {
1✔
504
      try {
505
        checksum =
×
506
            LoaderInstances
507
                .optional_StringInstance
508
                .loadField(__doc.get("checksum"), __baseUri, __loadingOptions);
×
509
      } catch (ValidationException e) {
×
510
        checksum = null; // won't be used but prevents compiler from complaining.
×
511
        final String __message = "the `checksum` field is not valid because:";
×
512
        __errors.add(new ValidationException(__message, e));
×
513
      }
×
514

515
    } else {
516
      checksum = null;
1✔
517
    }
518
    Object size;
519

520
    if (__doc.containsKey("size")) {
1✔
521
      try {
522
        size =
×
523
            LoaderInstances
524
                .union_of_NullInstance_or_IntegerInstance_or_LongInstance
525
                .loadField(__doc.get("size"), __baseUri, __loadingOptions);
×
526
      } catch (ValidationException e) {
×
527
        size = null; // won't be used but prevents compiler from complaining.
×
528
        final String __message = "the `size` field is not valid because:";
×
529
        __errors.add(new ValidationException(__message, e));
×
530
      }
×
531

532
    } else {
533
      size = null;
1✔
534
    }
535
    java.util.Optional<java.util.List<Object>> secondaryFiles;
536

537
    if (__doc.containsKey("secondaryFiles")) {
1✔
538
      try {
539
        secondaryFiles =
×
540
            LoaderInstances
541
                .secondaryfilesdsl_optional_array_of_union_of_File_or_Directory
542
                .loadField(__doc.get("secondaryFiles"), __baseUri, __loadingOptions);
×
543
      } catch (ValidationException e) {
×
544
        secondaryFiles = null; // won't be used but prevents compiler from complaining.
×
545
        final String __message = "the `secondaryFiles` field is not valid because:";
×
546
        __errors.add(new ValidationException(__message, e));
×
547
      }
×
548

549
    } else {
550
      secondaryFiles = null;
1✔
551
    }
552
    java.util.Optional<String> format;
553

554
    if (__doc.containsKey("format")) {
1✔
555
      try {
556
        format =
×
557
            LoaderInstances
558
                .uri_optional_StringInstance_True_False_None_True
559
                .loadField(__doc.get("format"), __baseUri, __loadingOptions);
×
560
      } catch (ValidationException e) {
×
561
        format = null; // won't be used but prevents compiler from complaining.
×
562
        final String __message = "the `format` field is not valid because:";
×
563
        __errors.add(new ValidationException(__message, e));
×
564
      }
×
565

566
    } else {
567
      format = null;
1✔
568
    }
569
    java.util.Optional<String> contents;
570

571
    if (__doc.containsKey("contents")) {
1✔
572
      try {
573
        contents =
×
574
            LoaderInstances
575
                .optional_StringInstance
576
                .loadField(__doc.get("contents"), __baseUri, __loadingOptions);
×
577
      } catch (ValidationException e) {
×
578
        contents = null; // won't be used but prevents compiler from complaining.
×
579
        final String __message = "the `contents` field is not valid because:";
×
580
        __errors.add(new ValidationException(__message, e));
×
581
      }
×
582

583
    } else {
584
      contents = null;
1✔
585
    }
586
    if (!__errors.isEmpty()) {
1✔
587
      throw new ValidationException("Trying 'RecordField'", __errors);
1✔
588
    }
589
    this.class_ = (File_class) class_;
1✔
590
    this.location = (java.util.Optional<String>) location;
1✔
591
    this.path = (java.util.Optional<String>) path;
1✔
592
    this.basename = (java.util.Optional<String>) basename;
1✔
593
    this.dirname = (java.util.Optional<String>) dirname;
1✔
594
    this.nameroot = (java.util.Optional<String>) nameroot;
1✔
595
    this.nameext = (java.util.Optional<String>) nameext;
1✔
596
    this.checksum = (java.util.Optional<String>) checksum;
1✔
597
    this.size = (Object) size;
1✔
598
    this.secondaryFiles = (java.util.Optional<java.util.List<Object>>) secondaryFiles;
1✔
599
    this.format = (java.util.Optional<String>) format;
1✔
600
    this.contents = (java.util.Optional<String>) contents;
1✔
601
    for (String field:__doc.keySet()) {
1✔
602
      if (!attrs.contains(field)) {
1✔
NEW
603
        if (field.contains(":")) {
×
NEW
604
          String expanded_field = __loadingOptions.expandUrl(field, "", false, false, null);
×
NEW
605
          extensionFields_.put(expanded_field, __doc.get(field));
×
606
        }
607
      }
608
    }
1✔
609
  }
1✔
610
  private java.util.List<String> attrs = java.util.Arrays.asList("class", "location", "path", "basename", "dirname", "nameroot", "nameext", "checksum", "size", "secondaryFiles", "format", "contents");
1✔
611
}
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