diff --git a/README.md b/README.md
index c3a69e05..75928d4a 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
[](https://coveralls.io/github/common-workflow-language/cwljava?branch=cwl-1.2.0)
-# org.w3id.cwl.cwl1_2
+# org.commonwl.cwlsdk
This project contains Java objects and utilities auto-generated by Schema Salad for parsing documents corresponding to the https://w3id.org/cwl/cwl# schema.
diff --git a/adding_new_cwl_versions.txt b/adding_new_cwl_versions.txt
index e554c7b2..ca4b8c3b 100644
--- a/adding_new_cwl_versions.txt
+++ b/adding_new_cwl_versions.txt
@@ -6,7 +6,7 @@ git ls-files -- tests | grep cwl$ | xargs -I{} bash -c 'cwltool --relax-path-che
mkdir valid-examples; for file in $(cat valid_examples.txt); do cp ${file} valid-examples/valid_$(basename ${file}) ; done
# build the Java parser
-schema-salad-tool --codegen java --codegen-package org.w3id.cwl.cwl1_1 --codegen-examples ~/cwl-v1.1/valid-examples ~/cwl-v1.1/CommonWorkflowLanguage.yml
+schema-salad-tool --codegen java --codegen-package org.commonwl.cwlsdk.cwl1_1 --codegen-examples ~/cwl-v1.1/valid-examples ~/cwl-v1.1/CommonWorkflowLanguage.yml
mvn test
-# copy missing files into ./src/test/resources/org/w3id/cwl/cwl1_1/utils
+# copy missing files into ./src/test/resources/org/commonwl/cwlsdk/cwl1_1/utils
diff --git a/pom.xml b/pom.xml
index 05f955e9..35ec2597 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,8 +1,8 @@
4.0.0
- org.w3id.cwl.sdk
- cwljava
+ org.commonwl
+ cwlsdkjarCommon Workflow Language SDKSchema Salad for parsing documents corresponding to the https://w3id.org/cwl/cwl# schema.]]>
@@ -70,7 +70,7 @@
- org.w3id.cwl.cwl1_2.utils.Validator
+ org.commonwl.cwlsdk.cwl1_2.utils.Validator
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/Any.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/Any.java
new file mode 100644
index 00000000..bf92975e
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/Any.java
@@ -0,0 +1,37 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.ValidationException;
+
+public enum Any {
+ ANY("Any");
+
+ private static String[] symbols = new String[] {"Any"};
+ private String docVal;
+
+ private Any(final String docVal) {
+ this.docVal = docVal;
+ }
+
+ public static Any fromDocumentVal(final String docVal) {
+ for(final Any val : Any.values()) {
+ if(val.docVal.equals(docVal)) {
+ return val;
+ }
+ }
+ throw new ValidationException(String.format("Expected one of %s", Any.symbols, docVal));
+ }
+}
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/ArraySchema.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/ArraySchema.java
new file mode 100644
index 00000000..ff57c37f
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/ArraySchema.java
@@ -0,0 +1,42 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
+import org.commonwl.cwlsdk.cwl1_1.utils.Saveable;
+
+/**
+* Auto-generated interface for https://w3id.org/cwl/salad#ArraySchema This interface is implemented by {@link ArraySchemaImpl}
+ */
+public interface ArraySchema extends Saveable {
+
+ java.util.Map getExtensionFields();
+ LoadingOptions getLoadingOptions();
+
+ /**
+ * Getter for property https://w3id.org/cwl/salad#items
+ *
+ */
+
+ Array_name getType();
+}
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/ArraySchemaImpl.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/ArraySchemaImpl.java
new file mode 100644
index 00000000..5197cb6a
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/ArraySchemaImpl.java
@@ -0,0 +1,128 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.LoaderInstances;
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptionsBuilder;
+import org.commonwl.cwlsdk.cwl1_1.utils.SaveableImpl;
+import org.commonwl.cwlsdk.cwl1_1.utils.ValidationException;
+
+/**
+* Auto-generated class implementation for https://w3id.org/cwl/salad#ArraySchema
+ */
+public class ArraySchemaImpl extends SaveableImpl implements ArraySchema {
+ private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
+ private java.util.Map extensionFields_ =
+ new java.util.HashMap();
+ public LoadingOptions getLoadingOptions() {
+ return this.loadingOptions_;
+ }
+ public java.util.Map getExtensionFields() {
+ return this.extensionFields_;
+ }
+
+ private Object items;
+
+ /**
+ * Getter for property https://w3id.org/cwl/salad#items
+ *
+ */
+
+ public Array_name getType() {
+ return this.type;
+ }
+
+ /**
+ * Used by {@link org.commonwl.cwlsdk.cwl1_1.utils.RootLoader} to construct instances of ArraySchemaImpl.
+ *
+ * @param __doc_ Document fragment to load this record object from (presumably a
+ {@link java.util.Map}).
+ * @param __baseUri_ Base URI to generate child document IDs against.
+ * @param __loadingOptions Context for loading URIs and populating objects.
+ * @param __docRoot_ ID at this position in the document (if available) (maybe?)
+ * @throws ValidationException If the document fragment is not a {@link java.util.Map}
+ * or validation of fields fails.
+ */
+ public ArraySchemaImpl(
+ final Object __doc_,
+ final String __baseUri_,
+ LoadingOptions __loadingOptions,
+ final String __docRoot_) {
+ super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
+ // Prefix plumbing variables with '__' to reduce likelihood of collision with
+ // generated names.
+ String __baseUri = __baseUri_;
+ String __docRoot = __docRoot_;
+ if (!(__doc_ instanceof java.util.Map)) {
+ throw new ValidationException("ArraySchemaImpl called on non-map");
+ }
+ final java.util.Map __doc = (java.util.Map) __doc_;
+ final java.util.List __errors =
+ new java.util.ArrayList();
+ if (__loadingOptions != null) {
+ this.loadingOptions_ = __loadingOptions;
+ }
+ Object items;
+ try {
+ items =
+ LoaderInstances
+ .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
+ .loadField(__doc.get("items"), __baseUri, __loadingOptions);
+ } catch (ValidationException e) {
+ items = null; // won't be used but prevents compiler from complaining.
+ final String __message = "the `items` field is not valid because:";
+ __errors.add(new ValidationException(__message, e));
+ }
+ Array_name type;
+ try {
+ type =
+ LoaderInstances
+ .typedsl_Array_name_2
+ .loadField(__doc.get("type"), __baseUri, __loadingOptions);
+ } catch (ValidationException e) {
+ type = null; // won't be used but prevents compiler from complaining.
+ final String __message = "the `type` field is not valid because:";
+ __errors.add(new ValidationException(__message, e));
+ }
+ if (!__errors.isEmpty()) {
+ throw new ValidationException("Trying 'RecordField'", __errors);
+ }
+ this.items = (Object) items;
+ this.type = (Array_name) type;
+ for (String field:__doc.keySet()) {
+ if (!attrs.contains(field)) {
+ if (field.contains(":")) {
+ String expanded_field = __loadingOptions.expandUrl(field, "", false, false, null);
+ extensionFields_.put(expanded_field, __doc.get(field));
+ }
+ }
+ }
+ }
+ private java.util.List attrs = java.util.Arrays.asList("items", "type");
+}
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/Array_name.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/Array_name.java
new file mode 100644
index 00000000..91fdc1fe
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/Array_name.java
@@ -0,0 +1,37 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.ValidationException;
+
+public enum Array_name {
+ ARRAY("array");
+
+ private static String[] symbols = new String[] {"array"};
+ private String docVal;
+
+ private Array_name(final String docVal) {
+ this.docVal = docVal;
+ }
+
+ public static Array_name fromDocumentVal(final String docVal) {
+ for(final Array_name val : Array_name.values()) {
+ if(val.docVal.equals(docVal)) {
+ return val;
+ }
+ }
+ throw new ValidationException(String.format("Expected one of %s", Array_name.symbols, docVal));
+ }
+}
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLArraySchema.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLArraySchema.java
new file mode 100644
index 00000000..9003654e
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLArraySchema.java
@@ -0,0 +1,42 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
+import org.commonwl.cwlsdk.cwl1_1.utils.Saveable;
+
+/**
+* Auto-generated interface for https://w3id.org/cwl/cwl#CWLArraySchema This interface is implemented by {@link CWLArraySchemaImpl}
+ */
+public interface CWLArraySchema extends ArraySchema, Saveable {
+
+ java.util.Map getExtensionFields();
+ LoadingOptions getLoadingOptions();
+
+ /**
+ * Getter for property https://w3id.org/cwl/salad#items
+ *
+ */
+
+ Array_name getType();
+}
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLArraySchemaImpl.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLArraySchemaImpl.java
new file mode 100644
index 00000000..8cf046fc
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLArraySchemaImpl.java
@@ -0,0 +1,128 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.LoaderInstances;
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptionsBuilder;
+import org.commonwl.cwlsdk.cwl1_1.utils.SaveableImpl;
+import org.commonwl.cwlsdk.cwl1_1.utils.ValidationException;
+
+/**
+* Auto-generated class implementation for https://w3id.org/cwl/cwl#CWLArraySchema
+ */
+public class CWLArraySchemaImpl extends SaveableImpl implements CWLArraySchema {
+ private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
+ private java.util.Map extensionFields_ =
+ new java.util.HashMap();
+ public LoadingOptions getLoadingOptions() {
+ return this.loadingOptions_;
+ }
+ public java.util.Map getExtensionFields() {
+ return this.extensionFields_;
+ }
+
+ private Object items;
+
+ /**
+ * Getter for property https://w3id.org/cwl/salad#items
+ *
+ */
+
+ public Array_name getType() {
+ return this.type;
+ }
+
+ /**
+ * Used by {@link org.commonwl.cwlsdk.cwl1_1.utils.RootLoader} to construct instances of CWLArraySchemaImpl.
+ *
+ * @param __doc_ Document fragment to load this record object from (presumably a
+ {@link java.util.Map}).
+ * @param __baseUri_ Base URI to generate child document IDs against.
+ * @param __loadingOptions Context for loading URIs and populating objects.
+ * @param __docRoot_ ID at this position in the document (if available) (maybe?)
+ * @throws ValidationException If the document fragment is not a {@link java.util.Map}
+ * or validation of fields fails.
+ */
+ public CWLArraySchemaImpl(
+ final Object __doc_,
+ final String __baseUri_,
+ LoadingOptions __loadingOptions,
+ final String __docRoot_) {
+ super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
+ // Prefix plumbing variables with '__' to reduce likelihood of collision with
+ // generated names.
+ String __baseUri = __baseUri_;
+ String __docRoot = __docRoot_;
+ if (!(__doc_ instanceof java.util.Map)) {
+ throw new ValidationException("CWLArraySchemaImpl called on non-map");
+ }
+ final java.util.Map __doc = (java.util.Map) __doc_;
+ final java.util.List __errors =
+ new java.util.ArrayList();
+ if (__loadingOptions != null) {
+ this.loadingOptions_ = __loadingOptions;
+ }
+ Object items;
+ try {
+ items =
+ LoaderInstances
+ .uri_union_of_PrimitiveType_or_CWLRecordSchema_or_EnumSchema_or_CWLArraySchema_or_StringInstance_or_array_of_union_of_PrimitiveType_or_CWLRecordSchema_or_EnumSchema_or_CWLArraySchema_or_StringInstance_False_True_2_None
+ .loadField(__doc.get("items"), __baseUri, __loadingOptions);
+ } catch (ValidationException e) {
+ items = null; // won't be used but prevents compiler from complaining.
+ final String __message = "the `items` field is not valid because:";
+ __errors.add(new ValidationException(__message, e));
+ }
+ Array_name type;
+ try {
+ type =
+ LoaderInstances
+ .typedsl_Array_name_2
+ .loadField(__doc.get("type"), __baseUri, __loadingOptions);
+ } catch (ValidationException e) {
+ type = null; // won't be used but prevents compiler from complaining.
+ final String __message = "the `type` field is not valid because:";
+ __errors.add(new ValidationException(__message, e));
+ }
+ if (!__errors.isEmpty()) {
+ throw new ValidationException("Trying 'RecordField'", __errors);
+ }
+ this.items = (Object) items;
+ this.type = (Array_name) type;
+ for (String field:__doc.keySet()) {
+ if (!attrs.contains(field)) {
+ if (field.contains(":")) {
+ String expanded_field = __loadingOptions.expandUrl(field, "", false, false, null);
+ extensionFields_.put(expanded_field, __doc.get(field));
+ }
+ }
+ }
+ }
+ private java.util.List attrs = java.util.Arrays.asList("items", "type");
+}
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLRecordField.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLRecordField.java
new file mode 100644
index 00000000..a5cb4193
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLRecordField.java
@@ -0,0 +1,51 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
+import org.commonwl.cwlsdk.cwl1_1.utils.Saveable;
+
+/**
+* Auto-generated interface for https://w3id.org/cwl/cwl#CWLRecordField This interface is implemented by {@link CWLRecordFieldImpl}
+ */
+public interface CWLRecordField extends RecordField, Saveable {
+
+ java.util.Map getExtensionFields();
+ LoadingOptions getLoadingOptions();
+
+ /**
+ * Getter for property https://w3id.org/cwl/salad#RecordField/name
+ *
+ */
+
+ Object getType();
+}
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLRecordFieldImpl.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLRecordFieldImpl.java
new file mode 100644
index 00000000..3dccc3d3
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLRecordFieldImpl.java
@@ -0,0 +1,175 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.LoaderInstances;
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptionsBuilder;
+import org.commonwl.cwlsdk.cwl1_1.utils.SaveableImpl;
+import org.commonwl.cwlsdk.cwl1_1.utils.ValidationException;
+
+/**
+* Auto-generated class implementation for https://w3id.org/cwl/cwl#CWLRecordField
+ */
+public class CWLRecordFieldImpl extends SaveableImpl implements CWLRecordField {
+ private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
+ private java.util.Map extensionFields_ =
+ new java.util.HashMap();
+ public LoadingOptions getLoadingOptions() {
+ return this.loadingOptions_;
+ }
+ public java.util.Map getExtensionFields() {
+ return this.extensionFields_;
+ }
+
+ private String name;
+
+ /**
+ * Getter for property https://w3id.org/cwl/salad#RecordField/name
+ *
+ */
+
+ public Object getType() {
+ return this.type;
+ }
+
+ /**
+ * Used by {@link org.commonwl.cwlsdk.cwl1_1.utils.RootLoader} to construct instances of CWLRecordFieldImpl.
+ *
+ * @param __doc_ Document fragment to load this record object from (presumably a
+ {@link java.util.Map}).
+ * @param __baseUri_ Base URI to generate child document IDs against.
+ * @param __loadingOptions Context for loading URIs and populating objects.
+ * @param __docRoot_ ID at this position in the document (if available) (maybe?)
+ * @throws ValidationException If the document fragment is not a {@link java.util.Map}
+ * or validation of fields fails.
+ */
+ public CWLRecordFieldImpl(
+ final Object __doc_,
+ final String __baseUri_,
+ LoadingOptions __loadingOptions,
+ final String __docRoot_) {
+ super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
+ // Prefix plumbing variables with '__' to reduce likelihood of collision with
+ // generated names.
+ String __baseUri = __baseUri_;
+ String __docRoot = __docRoot_;
+ if (!(__doc_ instanceof java.util.Map)) {
+ throw new ValidationException("CWLRecordFieldImpl called on non-map");
+ }
+ final java.util.Map __doc = (java.util.Map) __doc_;
+ final java.util.List __errors =
+ new java.util.ArrayList();
+ if (__loadingOptions != null) {
+ this.loadingOptions_ = __loadingOptions;
+ }
+ String name;
+
+ if (__doc.containsKey("name")) {
+ try {
+ name =
+ LoaderInstances
+ .uri_StringInstance_True_False_None_None
+ .loadField(__doc.get("name"), __baseUri, __loadingOptions);
+ } catch (ValidationException e) {
+ name = null; // won't be used but prevents compiler from complaining.
+ final String __message = "the `name` field is not valid because:";
+ __errors.add(new ValidationException(__message, e));
+ }
+
+ } else {
+ name = null;
+ }
+
+ if (name == null) {
+ if (__docRoot != null) {
+ name = __docRoot;
+ } else {
+ throw new ValidationException("Missing name");
+ }
+ }
+ __baseUri = (String) name;
+ Object doc;
+
+ if (__doc.containsKey("doc")) {
+ try {
+ doc =
+ LoaderInstances
+ .union_of_NullInstance_or_StringInstance_or_array_of_StringInstance
+ .loadField(__doc.get("doc"), __baseUri, __loadingOptions);
+ } catch (ValidationException e) {
+ doc = null; // won't be used but prevents compiler from complaining.
+ final String __message = "the `doc` field is not valid because:";
+ __errors.add(new ValidationException(__message, e));
+ }
+
+ } else {
+ doc = null;
+ }
+ Object type;
+ try {
+ type =
+ LoaderInstances
+ .typedsl_union_of_PrimitiveType_or_CWLRecordSchema_or_EnumSchema_or_CWLArraySchema_or_StringInstance_or_array_of_union_of_PrimitiveType_or_CWLRecordSchema_or_EnumSchema_or_CWLArraySchema_or_StringInstance_2
+ .loadField(__doc.get("type"), __baseUri, __loadingOptions);
+ } catch (ValidationException e) {
+ type = null; // won't be used but prevents compiler from complaining.
+ final String __message = "the `type` field is not valid because:";
+ __errors.add(new ValidationException(__message, e));
+ }
+ if (!__errors.isEmpty()) {
+ throw new ValidationException("Trying 'RecordField'", __errors);
+ }
+ this.doc = (Object) doc;
+ this.name = (String) name;
+ this.type = (Object) type;
+ for (String field:__doc.keySet()) {
+ if (!attrs.contains(field)) {
+ if (field.contains(":")) {
+ String expanded_field = __loadingOptions.expandUrl(field, "", false, false, null);
+ extensionFields_.put(expanded_field, __doc.get(field));
+ }
+ }
+ }
+ }
+ private java.util.List attrs = java.util.Arrays.asList("doc", "name", "type");
+}
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLRecordSchema.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLRecordSchema.java
new file mode 100644
index 00000000..4bdfc29e
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLRecordSchema.java
@@ -0,0 +1,42 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
+import org.commonwl.cwlsdk.cwl1_1.utils.Saveable;
+
+/**
+* Auto-generated interface for https://w3id.org/cwl/cwl#CWLRecordSchema This interface is implemented by {@link CWLRecordSchemaImpl}
+ */
+public interface CWLRecordSchema extends RecordSchema, Saveable {
+
+ java.util.Map getExtensionFields();
+ LoadingOptions getLoadingOptions();
+
+ /**
+ * Getter for property https://w3id.org/cwl/salad#fields
+ *
+ */
+
+ Record_name getType();
+}
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLRecordSchemaImpl.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLRecordSchemaImpl.java
new file mode 100644
index 00000000..4e2aa4be
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLRecordSchemaImpl.java
@@ -0,0 +1,134 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.LoaderInstances;
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptionsBuilder;
+import org.commonwl.cwlsdk.cwl1_1.utils.SaveableImpl;
+import org.commonwl.cwlsdk.cwl1_1.utils.ValidationException;
+
+/**
+* Auto-generated class implementation for https://w3id.org/cwl/cwl#CWLRecordSchema
+ */
+public class CWLRecordSchemaImpl extends SaveableImpl implements CWLRecordSchema {
+ private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
+ private java.util.Map extensionFields_ =
+ new java.util.HashMap();
+ public LoadingOptions getLoadingOptions() {
+ return this.loadingOptions_;
+ }
+ public java.util.Map getExtensionFields() {
+ return this.extensionFields_;
+ }
+
+ private java.util.Optional> fields;
+
+ /**
+ * Getter for property https://w3id.org/cwl/salad#fields
+ *
+ */
+
+ public Record_name getType() {
+ return this.type;
+ }
+
+ /**
+ * Used by {@link org.commonwl.cwlsdk.cwl1_1.utils.RootLoader} to construct instances of CWLRecordSchemaImpl.
+ *
+ * @param __doc_ Document fragment to load this record object from (presumably a
+ {@link java.util.Map}).
+ * @param __baseUri_ Base URI to generate child document IDs against.
+ * @param __loadingOptions Context for loading URIs and populating objects.
+ * @param __docRoot_ ID at this position in the document (if available) (maybe?)
+ * @throws ValidationException If the document fragment is not a {@link java.util.Map}
+ * or validation of fields fails.
+ */
+ public CWLRecordSchemaImpl(
+ final Object __doc_,
+ final String __baseUri_,
+ LoadingOptions __loadingOptions,
+ final String __docRoot_) {
+ super(__doc_, __baseUri_, __loadingOptions, __docRoot_);
+ // Prefix plumbing variables with '__' to reduce likelihood of collision with
+ // generated names.
+ String __baseUri = __baseUri_;
+ String __docRoot = __docRoot_;
+ if (!(__doc_ instanceof java.util.Map)) {
+ throw new ValidationException("CWLRecordSchemaImpl called on non-map");
+ }
+ final java.util.Map __doc = (java.util.Map) __doc_;
+ final java.util.List __errors =
+ new java.util.ArrayList();
+ if (__loadingOptions != null) {
+ this.loadingOptions_ = __loadingOptions;
+ }
+ java.util.Optional> fields;
+
+ if (__doc.containsKey("fields")) {
+ try {
+ fields =
+ LoaderInstances
+ .idmap_fields_optional_array_of_CWLRecordField
+ .loadField(__doc.get("fields"), __baseUri, __loadingOptions);
+ } catch (ValidationException e) {
+ fields = null; // won't be used but prevents compiler from complaining.
+ final String __message = "the `fields` field is not valid because:";
+ __errors.add(new ValidationException(__message, e));
+ }
+
+ } else {
+ fields = null;
+ }
+ Record_name type;
+ try {
+ type =
+ LoaderInstances
+ .typedsl_Record_name_2
+ .loadField(__doc.get("type"), __baseUri, __loadingOptions);
+ } catch (ValidationException e) {
+ type = null; // won't be used but prevents compiler from complaining.
+ final String __message = "the `type` field is not valid because:";
+ __errors.add(new ValidationException(__message, e));
+ }
+ if (!__errors.isEmpty()) {
+ throw new ValidationException("Trying 'RecordField'", __errors);
+ }
+ this.fields = (java.util.Optional>) fields;
+ this.type = (Record_name) type;
+ for (String field:__doc.keySet()) {
+ if (!attrs.contains(field)) {
+ if (field.contains(":")) {
+ String expanded_field = __loadingOptions.expandUrl(field, "", false, false, null);
+ extensionFields_.put(expanded_field, __doc.get(field));
+ }
+ }
+ }
+ }
+ private java.util.List attrs = java.util.Arrays.asList("fields", "type");
+}
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLType.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLType.java
new file mode 100644
index 00000000..e0037687
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLType.java
@@ -0,0 +1,45 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.ValidationException;
+
+public enum CWLType {
+ NULL("null"),
+ BOOLEAN("boolean"),
+ INT("int"),
+ LONG("long"),
+ FLOAT("float"),
+ DOUBLE("double"),
+ STRING("string"),
+ FILE("File"),
+ DIRECTORY("Directory");
+
+ private static String[] symbols = new String[] {"null", "boolean", "int", "long", "float", "double", "string", "File", "Directory"};
+ private String docVal;
+
+ private CWLType(final String docVal) {
+ this.docVal = docVal;
+ }
+
+ public static CWLType fromDocumentVal(final String docVal) {
+ for(final CWLType val : CWLType.values()) {
+ if(val.docVal.equals(docVal)) {
+ return val;
+ }
+ }
+ throw new ValidationException(String.format("Expected one of %s", CWLType.symbols, docVal));
+ }
+}
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLVersion.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLVersion.java
new file mode 100644
index 00000000..02f81525
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CWLVersion.java
@@ -0,0 +1,50 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.ValidationException;
+
+public enum CWLVersion {
+ DRAFT_2("draft-2"),
+ DRAFT_3_DEV1("draft-3.dev1"),
+ DRAFT_3_DEV2("draft-3.dev2"),
+ DRAFT_3_DEV3("draft-3.dev3"),
+ DRAFT_3_DEV4("draft-3.dev4"),
+ DRAFT_3_DEV5("draft-3.dev5"),
+ DRAFT_3("draft-3"),
+ DRAFT_4_DEV1("draft-4.dev1"),
+ DRAFT_4_DEV2("draft-4.dev2"),
+ DRAFT_4_DEV3("draft-4.dev3"),
+ V1_0_DEV4("v1.0.dev4"),
+ V1_0("v1.0"),
+ V1_1_0_DEV1("v1.1.0-dev1"),
+ V1_1("v1.1");
+
+ 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"};
+ private String docVal;
+
+ private CWLVersion(final String docVal) {
+ this.docVal = docVal;
+ }
+
+ public static CWLVersion fromDocumentVal(final String docVal) {
+ for(final CWLVersion val : CWLVersion.values()) {
+ if(val.docVal.equals(docVal)) {
+ return val;
+ }
+ }
+ throw new ValidationException(String.format("Expected one of %s", CWLVersion.symbols, docVal));
+ }
+}
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/CommandInputArraySchema.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CommandInputArraySchema.java
new file mode 100644
index 00000000..56eeef7c
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CommandInputArraySchema.java
@@ -0,0 +1,70 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
+import org.commonwl.cwlsdk.cwl1_1.utils.Saveable;
+
+/**
+* Auto-generated interface for https://w3id.org/cwl/cwl#CommandInputArraySchema This interface is implemented by {@link CommandInputArraySchemaImpl}
+ */
+public interface CommandInputArraySchema extends InputArraySchema, CommandInputSchema, CommandLineBindable, Saveable {
+
+ java.util.Map getExtensionFields();
+ LoadingOptions getLoadingOptions();
+
+ /**
+ * Getter for property https://w3id.org/cwl/cwl#IOSchema/name
+ *
+ * Describes how to turn this object into command line arguments. *
+ */
+
+ java.util.Optional getInputBinding();
+}
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/CommandInputArraySchemaImpl.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CommandInputArraySchemaImpl.java
new file mode 100644
index 00000000..9da0e555
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CommandInputArraySchemaImpl.java
@@ -0,0 +1,262 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.LoaderInstances;
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptionsBuilder;
+import org.commonwl.cwlsdk.cwl1_1.utils.SaveableImpl;
+import org.commonwl.cwlsdk.cwl1_1.utils.ValidationException;
+
+/**
+* Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandInputArraySchema
+ */
+public class CommandInputArraySchemaImpl extends SaveableImpl implements CommandInputArraySchema {
+ private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
+ private java.util.Map extensionFields_ =
+ new java.util.HashMap();
+ public LoadingOptions getLoadingOptions() {
+ return this.loadingOptions_;
+ }
+ public java.util.Map getExtensionFields() {
+ return this.extensionFields_;
+ }
+
+ private java.util.Optional name;
+
+ /**
+ * Getter for property https://w3id.org/cwl/cwl#IOSchema/name
+ *
+ * Describes how to turn this object into command line arguments. *
+ */
+
+ java.util.Optional getInputBinding();
+}
diff --git a/src/main/java/org/commonwl/cwlsdk/cwl1_1/CommandInputEnumSchemaImpl.java b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CommandInputEnumSchemaImpl.java
new file mode 100644
index 00000000..c75f93ea
--- /dev/null
+++ b/src/main/java/org/commonwl/cwlsdk/cwl1_1/CommandInputEnumSchemaImpl.java
@@ -0,0 +1,262 @@
+// Copyright Common Workflow Language project contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.commonwl.cwlsdk.cwl1_1;
+
+import org.commonwl.cwlsdk.cwl1_1.utils.LoaderInstances;
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptions;
+import org.commonwl.cwlsdk.cwl1_1.utils.LoadingOptionsBuilder;
+import org.commonwl.cwlsdk.cwl1_1.utils.SaveableImpl;
+import org.commonwl.cwlsdk.cwl1_1.utils.ValidationException;
+
+/**
+* Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandInputEnumSchema
+ */
+public class CommandInputEnumSchemaImpl extends SaveableImpl implements CommandInputEnumSchema {
+ private LoadingOptions loadingOptions_ = new LoadingOptionsBuilder().build();
+ private java.util.Map extensionFields_ =
+ new java.util.HashMap();
+ public LoadingOptions getLoadingOptions() {
+ return this.loadingOptions_;
+ }
+ public java.util.Map getExtensionFields() {
+ return this.extensionFields_;
+ }
+
+ private java.util.Optional name;
+
+ /**
+ * Getter for property https://w3id.org/cwl/cwl#IOSchema/name
+ *
+ * Only valid when `type: File` or is an array of `items: File`.
+ *
+ * Provides a pattern or expression specifying files or
+ * directories that should be included alongside the primary
+ * file. Secondary files may be required or optional. When not
+ * explicitly specified, secondary files specified for `inputs`
+ * are required and `outputs` are optional. An implementation
+ * must include matching Files and Directories in the
+ * `secondaryFiles` property of the primary file. These Files
+ * and Directories must be transferred and staged alongside the
+ * primary file. An implementation may fail workflow execution
+ * if a required secondary file does not exist.
+ *
+ * If the value is an expression, the value of `self` in the expression
+ * must be the primary input or output File object to which this binding
+ * applies. The `basename`, `nameroot` and `nameext` fields must be
+ * present in `self`. For `CommandLineTool` outputs the `path` field must
+ * also be present. The expression must return a filename string relative
+ * to the path to the primary File, a File or Directory object with either
+ * `path` or `location` and `basename` fields set, or an array consisting
+ * of strings or File or Directory objects. It is legal to reference an
+ * unchanged File or Directory object taken from input as a secondaryFile.
+ * The expression may return "null" in which case there is no secondaryFile
+ * from that expression.
+ *
+ * To work on non-filename-preserving storage systems, portable tool
+ * descriptions should avoid constructing new values from `location`, but
+ * should construct relative references using `basename` or `nameroot`
+ * instead.
+ *
+ * If a value in `secondaryFiles` is a string that is not an expression,
+ * it specifies that the following pattern should be applied to the path
+ * of the primary file to yield a filename relative to the primary File:
+ *
+ * 1. If string ends with `?` character, remove the last `?` and mark
+ * the resulting secondary file as optional.
+ * 2. If string begins with one or more caret `^` characters, for each
+ * caret, remove the last file extension from the path (the last
+ * period `.` and all following characters). If there are no file
+ * extensions, the path is unchanged.
+ * 3. Append the remainder of the string to the end of the file path.
+ * *
+ * Only valid when `type: File` or is an array of `items: File`.
+ *
+ * A value of `true` indicates that the file is read or written
+ * sequentially without seeking. An implementation may use this flag to
+ * indicate whether it is valid to stream file contents using a named
+ * pipe. Default: `false`.
+ * *
+ * Only valid when `type: File` or is an array of `items: File`.
+ *
+ * This must be one or more IRIs of concept nodes
+ * that represents file formats which are allowed as input to this
+ * parameter, preferrably defined within an ontology. If no ontology is
+ * available, file formats may be tested by exact match.
+ * *
+ * Only valid when `type: File` or is an array of `items: File`.
+ *
+ * Read up to the first 64 KiB of text from the file and place it in the
+ * "contents" field of the file object for use by expressions.
+ * *
+ * Only valid when `type: Directory` or is an array of `items: Directory`.
+ *
+ * Specify the desired behavior for loading the `listing` field of
+ * a Directory object for use by expressions.
+ *
+ * The order of precedence for loadListing is:
+ *
+ * 1. `loadListing` on an individual parameter
+ * 2. Inherited from `LoadListingRequirement`
+ * 3. By default: `no_listing`
+ * *
+ * The default value to use for this parameter if the parameter is missing
+ * from the input object, or if the value of the parameter in the input
+ * object is `null`. Default values are applied before evaluating expressions
+ * (e.g. dependent `valueFrom` fields).
+ * *