Skip to content

Commit 50b25c0

Browse files
committed
rename package to a namespace that we control
1 parent b4e249e commit 50b25c0

File tree

1,801 files changed

+72936
-70573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,801 files changed

+72936
-70573
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![Coverage Status](https://coveralls.io/repos/github/common-workflow-language/cwljava/badge.svg?branch=cwl-1.2.0)](https://coveralls.io/github/common-workflow-language/cwljava?branch=cwl-1.2.0)
22

3-
# org.w3id.cwl.cwl1_2
3+
# org.commonwl.cwlsdk
44

55
This project contains Java objects and utilities auto-generated by <a href="https://github.com/common-workflow-language/schema_salad">Schema Salad</a> for parsing documents corresponding to the https://w3id.org/cwl/cwl# schema.
66

adding_new_cwl_versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ git ls-files -- tests | grep cwl$ | xargs -I{} bash -c 'cwltool --relax-path-che
66
mkdir valid-examples; for file in $(cat valid_examples.txt); do cp ${file} valid-examples/valid_$(basename ${file}) ; done
77

88
# build the Java parser
9-
schema-salad-tool --codegen java --codegen-package org.w3id.cwl.cwl1_1 --codegen-examples ~/cwl-v1.1/valid-examples ~/cwl-v1.1/CommonWorkflowLanguage.yml
9+
schema-salad-tool --codegen java --codegen-package org.commonwl.cwlsdk.cwl1_1 --codegen-examples ~/cwl-v1.1/valid-examples ~/cwl-v1.1/CommonWorkflowLanguage.yml
1010

1111
mvn test
12-
# copy missing files into ./src/test/resources/org/w3id/cwl/cwl1_1/utils
12+
# copy missing files into ./src/test/resources/org/commonwl/cwlsdk/cwl1_1/utils

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4-
<groupId>org.w3id.cwl.sdk</groupId>
5-
<artifactId>cwljava</artifactId>
4+
<groupId>org.commonwl</groupId>
5+
<artifactId>cwlsdk</artifactId>
66
<packaging>jar</packaging>
77
<name>Common Workflow Language SDK</name>
88
<description><![CDATA[This project contains Java objects and utilities auto-generated by <a href="https://github.com/common-workflow-language/schema_salad">Schema Salad</a> for parsing documents corresponding to the https://w3id.org/cwl/cwl# schema.]]></description>
@@ -70,7 +70,7 @@
7070
<configuration>
7171
<archive>
7272
<manifest>
73-
<mainClass>org.w3id.cwl.cwl1_2.utils.Validator</mainClass>
73+
<mainClass>org.commonwl.cwlsdk.cwl1_2.utils.Validator</mainClass>
7474
</manifest>
7575
</archive>
7676
<descriptorRefs>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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_1;
16+
17+
import org.commonwl.cwlsdk.cwl1_1.utils.ValidationException;
18+
19+
public enum Any {
20+
ANY("Any");
21+
22+
private static String[] symbols = new String[] {"Any"};
23+
private String docVal;
24+
25+
private Any(final String docVal) {
26+
this.docVal = docVal;
27+
}
28+
29+
public static Any fromDocumentVal(final String docVal) {
30+
for(final Any val : Any.values()) {
31+
if(val.docVal.equals(docVal)) {
32+
return val;
33+
}
34+
}
35+
throw new ValidationException(String.format("Expected one of %s", Any.symbols, docVal));
36+
}
37+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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_1;
16+
17+
import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
18+
import org.commonwl.cwlsdk.cwl1_1.utils.Saveable;
19+
20+
/**
21+
* Auto-generated interface for <I>https://w3id.org/cwl/salad#ArraySchema</I><BR>This interface is implemented by {@link ArraySchemaImpl}<BR>
22+
*/
23+
public interface ArraySchema extends Saveable {
24+
25+
java.util.Map<String, Object> getExtensionFields();
26+
LoadingOptions getLoadingOptions();
27+
28+
/**
29+
* Getter for property <I>https://w3id.org/cwl/salad#items</I><BR>
30+
* <BLOCKQUOTE>
31+
* Defines the type of the array elements. * </BLOCKQUOTE>
32+
*/
33+
34+
Object getItems();
35+
/**
36+
* Getter for property <I>https://w3id.org/cwl/salad#type</I><BR>
37+
* <BLOCKQUOTE>
38+
* Must be `array` * </BLOCKQUOTE>
39+
*/
40+
41+
Array_name getType();
42+
}
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
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_1;
16+
17+
import org.commonwl.cwlsdk.cwl1_1.utils.LoaderInstances;
18+
import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
19+
import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptionsBuilder;
20+
import org.commonwl.cwlsdk.cwl1_1.utils.SaveableImpl;
21+
import org.commonwl.cwlsdk.cwl1_1.utils.ValidationException;
22+
23+
/**
24+
* Auto-generated class implementation for <I>https://w3id.org/cwl/salad#ArraySchema</I><BR>
25+
*/
26+
public class ArraySchemaImpl extends SaveableImpl implements ArraySchema {
27+
private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
28+
private java.util.Map<String, Object> extensionFields_ =
29+
new java.util.HashMap<String, Object>();
30+
public LoadingOptions getLoadingOptions() {
31+
return this.loadingOptions_;
32+
}
33+
public java.util.Map<String, Object> getExtensionFields() {
34+
return this.extensionFields_;
35+
}
36+
37+
private Object items;
38+
39+
/**
40+
* Getter for property <I>https://w3id.org/cwl/salad#items</I><BR>
41+
* <BLOCKQUOTE>
42+
* Defines the type of the array elements. * </BLOCKQUOTE>
43+
*/
44+
45+
public Object getItems() {
46+
return this.items;
47+
}
48+
49+
private Array_name type;
50+
51+
/**
52+
* Getter for property <I>https://w3id.org/cwl/salad#type</I><BR>
53+
* <BLOCKQUOTE>
54+
* Must be `array` * </BLOCKQUOTE>
55+
*/
56+
57+
public Array_name getType() {
58+
return this.type;
59+
}
60+
61+
/**
62+
* Used by {@link org.commonwl.cwlsdk.cwl1_1.utils.RootLoader} to construct instances of ArraySchemaImpl.
63+
*
64+
* @param __doc_ Document fragment to load this record object from (presumably a
65+
{@link java.util.Map}).
66+
* @param __baseUri_ Base URI to generate child document IDs against.
67+
* @param __loadingOptions Context for loading URIs and populating objects.
68+
* @param __docRoot_ ID at this position in the document (if available) (maybe?)
69+
* @throws ValidationException If the document fragment is not a {@link java.util.Map}
70+
* or validation of fields fails.
71+
*/
72+
public ArraySchemaImpl(
73+
final Object __doc_,
74+
final String __baseUri_,
75+
LoadingOptions __loadingOptions,
76+
final String __docRoot_) {
77+
super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
78+
// Prefix plumbing variables with '__' to reduce likelihood of collision with
79+
// generated names.
80+
String __baseUri = __baseUri_;
81+
String __docRoot = __docRoot_;
82+
if (!(__doc_ instanceof java.util.Map)) {
83+
throw new ValidationException("ArraySchemaImpl called on non-map");
84+
}
85+
final java.util.Map<String, Object> __doc = (java.util.Map<String, Object>) __doc_;
86+
final java.util.List<ValidationException> __errors =
87+
new java.util.ArrayList<ValidationException>();
88+
if (__loadingOptions != null) {
89+
this.loadingOptions_ = __loadingOptions;
90+
}
91+
Object items;
92+
try {
93+
items =
94+
LoaderInstances
95+
.uri_union_of_PrimitiveType_or_RecordSchema_or_EnumSchema_or_ArraySchema_or_MapSchema_or_UnionSchema_or_StringInstance_or_array_of_union_of_PrimitiveType_or_RecordSchema_or_EnumSchema_or_ArraySchema_or_MapSchema_or_UnionSchema_or_StringInstance_False_True_2_None
96+
.loadField(__doc.get("items"), __baseUri, __loadingOptions);
97+
} catch (ValidationException e) {
98+
items = null; // won't be used but prevents compiler from complaining.
99+
final String __message = "the `items` field is not valid because:";
100+
__errors.add(new ValidationException(__message, e));
101+
}
102+
Array_name type;
103+
try {
104+
type =
105+
LoaderInstances
106+
.typedsl_Array_name_2
107+
.loadField(__doc.get("type"), __baseUri, __loadingOptions);
108+
} catch (ValidationException e) {
109+
type = null; // won't be used but prevents compiler from complaining.
110+
final String __message = "the `type` field is not valid because:";
111+
__errors.add(new ValidationException(__message, e));
112+
}
113+
if (!__errors.isEmpty()) {
114+
throw new ValidationException("Trying 'RecordField'", __errors);
115+
}
116+
this.items = (Object) items;
117+
this.type = (Array_name) type;
118+
for (String field:__doc.keySet()) {
119+
if (!attrs.contains(field)) {
120+
if (field.contains(":")) {
121+
String expanded_field = __loadingOptions.expandUrl(field, "", false, false, null);
122+
extensionFields_.put(expanded_field, __doc.get(field));
123+
}
124+
}
125+
}
126+
}
127+
private java.util.List<String> attrs = java.util.Arrays.asList("items", "type");
128+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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_1;
16+
17+
import org.commonwl.cwlsdk.cwl1_1.utils.ValidationException;
18+
19+
public enum Array_name {
20+
ARRAY("array");
21+
22+
private static String[] symbols = new String[] {"array"};
23+
private String docVal;
24+
25+
private Array_name(final String docVal) {
26+
this.docVal = docVal;
27+
}
28+
29+
public static Array_name fromDocumentVal(final String docVal) {
30+
for(final Array_name val : Array_name.values()) {
31+
if(val.docVal.equals(docVal)) {
32+
return val;
33+
}
34+
}
35+
throw new ValidationException(String.format("Expected one of %s", Array_name.symbols, docVal));
36+
}
37+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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_1;
16+
17+
import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
18+
import org.commonwl.cwlsdk.cwl1_1.utils.Saveable;
19+
20+
/**
21+
* Auto-generated interface for <I>https://w3id.org/cwl/cwl#CWLArraySchema</I><BR>This interface is implemented by {@link CWLArraySchemaImpl}<BR>
22+
*/
23+
public interface CWLArraySchema extends ArraySchema, Saveable {
24+
25+
java.util.Map<String, Object> getExtensionFields();
26+
LoadingOptions getLoadingOptions();
27+
28+
/**
29+
* Getter for property <I>https://w3id.org/cwl/salad#items</I><BR>
30+
* <BLOCKQUOTE>
31+
* Defines the type of the array elements. * </BLOCKQUOTE>
32+
*/
33+
34+
Object getItems();
35+
/**
36+
* Getter for property <I>https://w3id.org/cwl/salad#type</I><BR>
37+
* <BLOCKQUOTE>
38+
* Must be `array` * </BLOCKQUOTE>
39+
*/
40+
41+
Array_name getType();
42+
}

0 commit comments

Comments
 (0)