2
2
# This file was autogenerated using schema-salad-tool --codegen=python
3
3
# The code itself is released under the Apache 2.0 license and the help text is
4
4
# subject to the license of the original schema.
5
- from abc import ABC, abstractmethod
6
5
import copy
7
6
import os
8
7
import pathlib
9
8
import re
10
9
import tempfile
11
10
import uuid as _uuid__ # pylint: disable=unused-import # noqa: F401
11
+ from abc import ABC, abstractmethod
12
12
from io import StringIO
13
13
from typing import (
14
14
Any,
@@ -337,6 +337,7 @@ def load(self, doc, baseuri, loadingOptions, docRoot=None):
337
337
d
338
338
)
339
339
)
340
+ r.append(new_dict)
340
341
341
342
else:
342
343
raise ValidationException(
@@ -360,6 +361,7 @@ def load(self, doc, baseuri, loadingOptions, docRoot=None):
360
361
doc
361
362
)
362
363
)
364
+ r.append(new_dict)
363
365
364
366
elif isinstance(doc, str):
365
367
if doc.endswith("?"):
@@ -1112,7 +1114,7 @@ def fromDoc(
1112
1114
try:
1113
1115
items = load_field(
1114
1116
_doc.get("items"),
1115
- uri_union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype_or_array_of_union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype_False_True_2 ,
1117
+ typedsl_union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype_or_array_of_union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype_2 ,
1116
1118
baseuri,
1117
1119
loadingOptions,
1118
1120
)
@@ -1174,9 +1176,9 @@ def save(
1174
1176
for ef in self.extension_fields:
1175
1177
r[prefix_url(ef, self.loadingOptions.vocab)] = self.extension_fields[ef]
1176
1178
if self.items is not None:
1177
- u = save_relative_uri(self.items, base_url, False, 2, relative_uris)
1178
- if u:
1179
- r["items"] = u
1179
+ r["items"] = save(
1180
+ self.items, top=False, base_url=base_url, relative_uris=relative_uris
1181
+ )
1180
1182
if self.type is not None:
1181
1183
r["type"] = save(
1182
1184
self.type, top=False, base_url=base_url, relative_uris=relative_uris
@@ -2811,7 +2813,7 @@ def fromDoc(
2811
2813
try:
2812
2814
items = load_field(
2813
2815
_doc.get("items"),
2814
- uri_union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype_False_True_2 ,
2816
+ typedsl_union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype_2 ,
2815
2817
baseuri,
2816
2818
loadingOptions,
2817
2819
)
@@ -2916,9 +2918,9 @@ def save(
2916
2918
if u:
2917
2919
r["name"] = u
2918
2920
if self.items is not None:
2919
- u = save_relative_uri(self.items, self.name, False, 2, relative_uris)
2920
- if u:
2921
- r["items"] = u
2921
+ r["items"] = save(
2922
+ self.items, top=False, base_url=self.name, relative_uris=relative_uris
2923
+ )
2922
2924
if self.type is not None:
2923
2925
r["type"] = save(
2924
2926
self.type, top=False, base_url=self.name, relative_uris=relative_uris
@@ -3679,7 +3681,7 @@ def fromDoc(
3679
3681
try:
3680
3682
items = load_field(
3681
3683
_doc.get("items"),
3682
- uri_union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype_False_True_2 ,
3684
+ typedsl_union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype_2 ,
3683
3685
baseuri,
3684
3686
loadingOptions,
3685
3687
)
@@ -3784,9 +3786,9 @@ def save(
3784
3786
if u:
3785
3787
r["name"] = u
3786
3788
if self.items is not None:
3787
- u = save_relative_uri(self.items, self.name, False, 2, relative_uris)
3788
- if u:
3789
- r["items"] = u
3789
+ r["items"] = save(
3790
+ self.items, top=False, base_url=self.name, relative_uris=relative_uris
3791
+ )
3790
3792
if self.type is not None:
3791
3793
r["type"] = save(
3792
3794
self.type, top=False, base_url=self.name, relative_uris=relative_uris
@@ -5966,7 +5968,7 @@ def fromDoc(
5966
5968
try:
5967
5969
items = load_field(
5968
5970
_doc.get("items"),
5969
- uri_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_False_True_2 ,
5971
+ typedsl_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_2 ,
5970
5972
baseuri,
5971
5973
loadingOptions,
5972
5974
)
@@ -6092,9 +6094,9 @@ def save(
6092
6094
if u:
6093
6095
r["name"] = u
6094
6096
if self.items is not None:
6095
- u = save_relative_uri(self.items, self.name, False, 2, relative_uris)
6096
- if u:
6097
- r["items"] = u
6097
+ r["items"] = save(
6098
+ self.items, top=False, base_url=self.name, relative_uris=relative_uris
6099
+ )
6098
6100
if self.type is not None:
6099
6101
r["type"] = save(
6100
6102
self.type, top=False, base_url=self.name, relative_uris=relative_uris
@@ -6905,7 +6907,7 @@ def fromDoc(
6905
6907
try:
6906
6908
items = load_field(
6907
6909
_doc.get("items"),
6908
- uri_union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype_False_True_2 ,
6910
+ typedsl_union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype_2 ,
6909
6911
baseuri,
6910
6912
loadingOptions,
6911
6913
)
@@ -7012,9 +7014,9 @@ def save(
7012
7014
if u:
7013
7015
r["name"] = u
7014
7016
if self.items is not None:
7015
- u = save_relative_uri(self.items, self.name, False, 2, relative_uris)
7016
- if u:
7017
- r["items"] = u
7017
+ r["items"] = save(
7018
+ self.items, top=False, base_url=self.name, relative_uris=relative_uris
7019
+ )
7018
7020
if self.type is not None:
7019
7021
r["type"] = save(
7020
7022
self.type, top=False, base_url=self.name, relative_uris=relative_uris
@@ -14699,12 +14701,6 @@ def save(
14699
14701
typedsl_enum_d961d79c225752b9fadb617367615ab176b47d77Loader_2 = _TypeDSLLoader(
14700
14702
enum_d961d79c225752b9fadb617367615ab176b47d77Loader, 2
14701
14703
)
14702
- uri_union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype_or_array_of_union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype_False_True_2 = _URILoader(
14703
- union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype_or_array_of_union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype,
14704
- False,
14705
- True,
14706
- 2,
14707
- )
14708
14704
enum_d062602be0b4b8fd33e69e29a841317b6ab665bcLoader = _EnumLoader(("array",))
14709
14705
typedsl_enum_d062602be0b4b8fd33e69e29a841317b6ab665bcLoader_2 = _TypeDSLLoader(
14710
14706
enum_d062602be0b4b8fd33e69e29a841317b6ab665bcLoader, 2
@@ -14834,12 +14830,6 @@ def save(
14834
14830
idmap_fields_union_of_None_type_or_array_of_InputRecordFieldLoader = _IdMapLoader(
14835
14831
union_of_None_type_or_array_of_InputRecordFieldLoader, "name", "type"
14836
14832
)
14837
- uri_union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype_False_True_2 = _URILoader(
14838
- union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype,
14839
- False,
14840
- True,
14841
- 2,
14842
- )
14843
14833
union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype = _UnionLoader(
14844
14834
(
14845
14835
CWLTypeLoader,
@@ -14876,12 +14866,6 @@ def save(
14876
14866
idmap_fields_union_of_None_type_or_array_of_OutputRecordFieldLoader = _IdMapLoader(
14877
14867
union_of_None_type_or_array_of_OutputRecordFieldLoader, "name", "type"
14878
14868
)
14879
- uri_union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype_False_True_2 = _URILoader(
14880
- union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype,
14881
- False,
14882
- True,
14883
- 2,
14884
- )
14885
14869
union_of_None_type_or_Any_type = _UnionLoader(
14886
14870
(
14887
14871
None_type,
@@ -15082,12 +15066,6 @@ def save(
15082
15066
union_of_None_type_or_array_of_CommandInputRecordFieldLoader, "name", "type"
15083
15067
)
15084
15068
)
15085
- uri_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_False_True_2 = _URILoader(
15086
- union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype,
15087
- False,
15088
- True,
15089
- 2,
15090
- )
15091
15069
union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype = _UnionLoader(
15092
15070
(
15093
15071
CWLTypeLoader,
@@ -15132,12 +15110,6 @@ def save(
15132
15110
union_of_None_type_or_array_of_CommandOutputRecordFieldLoader, "name", "type"
15133
15111
)
15134
15112
)
15135
- uri_union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype_False_True_2 = _URILoader(
15136
- union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype,
15137
- False,
15138
- True,
15139
- 2,
15140
- )
15141
15113
union_of_CWLTypeLoader_or_stdinLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype = _UnionLoader(
15142
15114
(
15143
15115
CWLTypeLoader,
0 commit comments