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

common-workflow-language / cwljava / #394

31 Oct 2025 04:10PM UTC coverage: 57.972% (-1.6%) from 59.538%
#394

push

github

mr-c
rename package to a namespace that we control

7575 of 12994 new or added lines in 261 files covered. (58.3%)

7752 of 13372 relevant lines covered (57.97%)

0.58 hits per line

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

96.55
/src/main/java/org/commonwl/cwlsdk/cwl1_2/CWLVersion.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.commonwl.cwlsdk.cwl1_2;
16

17
import org.commonwl.cwlsdk.cwl1_2.utils.ValidationException;
18

19
public enum CWLVersion {
1✔
20
  DRAFT_2("draft-2"),
1✔
21
  DRAFT_3_DEV1("draft-3.dev1"),
1✔
22
  DRAFT_3_DEV2("draft-3.dev2"),
1✔
23
  DRAFT_3_DEV3("draft-3.dev3"),
1✔
24
  DRAFT_3_DEV4("draft-3.dev4"),
1✔
25
  DRAFT_3_DEV5("draft-3.dev5"),
1✔
26
  DRAFT_3("draft-3"),
1✔
27
  DRAFT_4_DEV1("draft-4.dev1"),
1✔
28
  DRAFT_4_DEV2("draft-4.dev2"),
1✔
29
  DRAFT_4_DEV3("draft-4.dev3"),
1✔
30
  V1_0_DEV4("v1.0.dev4"),
1✔
31
  V1_0("v1.0"),
1✔
32
  V1_1_0_DEV1("v1.1.0-dev1"),
1✔
33
  V1_1("v1.1"),
1✔
34
  V1_2_0_DEV1("v1.2.0-dev1"),
1✔
35
  V1_2_0_DEV2("v1.2.0-dev2"),
1✔
36
  V1_2_0_DEV3("v1.2.0-dev3"),
1✔
37
  V1_2_0_DEV4("v1.2.0-dev4"),
1✔
38
  V1_2_0_DEV5("v1.2.0-dev5"),
1✔
39
  V1_2("v1.2");
1✔
40

41
  private static String[] symbols = new String[] {"draft-2", "draft-3.dev1", "draft-3.dev2", "draft-3.dev3", "draft-3.dev4", "draft-3.dev5", "draft-3", "draft-4.dev1", "draft-4.dev2", "draft-4.dev3", "v1.0.dev4", "v1.0", "v1.1.0-dev1", "v1.1", "v1.2.0-dev1", "v1.2.0-dev2", "v1.2.0-dev3", "v1.2.0-dev4", "v1.2.0-dev5", "v1.2"};
1✔
42
  private String docVal;
43

44
  private CWLVersion(final String docVal) {
1✔
45
    this.docVal = docVal;
1✔
46
  }
1✔
47

48
  public static CWLVersion fromDocumentVal(final String docVal) {
49
    for(final CWLVersion val : CWLVersion.values()) {
1✔
50
      if(val.docVal.equals(docVal)) {
1✔
51
        return val;
1✔
52
      }
53
    }
NEW
54
    throw new ValidationException(String.format("Expected one of %s", CWLVersion.symbols, docVal));
×
55
  }
56
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc