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

common-workflow-language / cwljava / #336

29 Jan 2025 12:41PM UTC coverage: 60.005% (-2.2%) from 62.203%
#336

Pull #192

github

web-flow
Merge 40f1ed817 into e28b918d2
Pull Request #192: regenerate using latest schema & schema-salad-tool

441 of 968 new or added lines in 65 files covered. (45.56%)

21 existing lines in 3 files now uncovered.

7347 of 12244 relevant lines covered (60.0%)

0.6 hits per line

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

90.91
/src/main/java/org/w3id/cwl/cwl1_2/utils/LoadingOptionsBuilder.java
1
package org.w3id.cwl.cwl1_2.utils;
2

3
import java.util.HashMap;
4
import java.util.List;
5
import java.util.Map;
6
import java.util.Optional;
7

8
public class LoadingOptionsBuilder {
9
  private Optional<Fetcher> fetcher = Optional.empty();
1✔
10
  private Optional<String> fileUri = Optional.empty();
1✔
11
  private Optional<Map<String, String>> namespaces = Optional.empty();
1✔
12
  private Optional<List<String>> schemas = Optional.empty();
1✔
13
  private Optional<LoadingOptions> copyFrom = Optional.empty();
1✔
14
  private Optional<Boolean> noLinkCheck = Optional.empty();
1✔
15
  private Optional<String> container = Optional.empty();
1✔
16

17
  public LoadingOptionsBuilder() {}
1✔
18

19
  public LoadingOptionsBuilder setFetcher(final Fetcher fetcher) {
20
    this.fetcher = Optional.of(fetcher);
×
21
    return this;
×
22
  }
23

24
  public LoadingOptionsBuilder copiedFrom(final LoadingOptions copyFrom) {
25
    this.copyFrom = Optional.of(copyFrom);
1✔
26
    return this;
1✔
27
  }
28

29
  public LoadingOptionsBuilder setFileUri(final String fileUri) {
30
    this.fileUri = Optional.of(fileUri);
1✔
31
    return this;
1✔
32
  }
33

34
  public LoadingOptionsBuilder setNamespaces(final Map<String, String> namespaces) {
35
    this.namespaces = Optional.of(namespaces);
1✔
36
    return this;
1✔
37
  }
38

39
  public LoadingOptionsBuilder setNoLinkCheck(final Boolean noLinkCheck) {
40
    this.noLinkCheck = Optional.of(noLinkCheck);
1✔
41
    return this;
1✔
42
  }
43

44
  public LoadingOptionsBuilder setContainer(final String container) {
NEW
45
    this.container = Optional.of(container);
×
NEW
46
    return this;
×
47
  }
48

49
  public LoadingOptions build() {
50
    Fetcher fetcher = this.fetcher.orElse(null);
1✔
51
    String fileUri = this.fileUri.orElse(null);
1✔
52
    List<String> schemas = this.schemas.orElse(null);
1✔
53
    Map<String, String> namespaces = this.namespaces.orElse(null);
1✔
54
    Boolean noLinkCheck = this.noLinkCheck.orElse(null);
1✔
55
    String container = this.container.orElse(null);
1✔
56
    Map<String, Object> idx = new HashMap<String, Object>();
1✔
57
    if (this.copyFrom.isPresent()) {
1✔
58
      final LoadingOptions copyFrom = this.copyFrom.get();
1✔
59
      idx = copyFrom.idx;
1✔
60
      if (fetcher == null) {
1✔
61
        fetcher = copyFrom.fetcher;
1✔
62
      }
63
      if (fileUri == null) {
1✔
64
        fileUri = copyFrom.fileUri;
1✔
65
      }
66
      if (namespaces == null) {
1✔
67
        namespaces = copyFrom.namespaces;
1✔
68
        schemas = copyFrom.schemas; // Bug in Python codegen?
1✔
69
      }
70
      if (noLinkCheck == null) {
1✔
71
        noLinkCheck = copyFrom.noLinkCheck;
1✔
72
      }
73
      if (container == null) {
1✔
74
        container = copyFrom.container;
1✔
75
      }
76
    }
77
    if (fetcher == null) {
1✔
78
      fetcher = new DefaultFetcher();
1✔
79
    }
80
    return new LoadingOptions(fetcher, fileUri, namespaces, schemas, noLinkCheck, container, idx);
1✔
81
  }
82
}
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