@nfdi4plants/arctrl 2.1.0-alpha.4 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CWL/CWLTypes.js +135 -0
- package/CWL/Decode.js +585 -0
- package/CWL/Inputs.js +62 -0
- package/CWL/Outputs.js +59 -0
- package/CWL/Requirements.js +72 -0
- package/CWL/ToolDescription.js +81 -0
- package/CWL/WorkflowDescription.js +81 -0
- package/CWL/WorkflowSteps.js +98 -0
- package/Core/ArcTypes.js +76 -87
- package/Core/Helper/Identifier.js +2 -2
- package/Core/OntologyAnnotation.js +8 -5
- package/Core/Table/ArcTable.js +15 -7
- package/Core/Table/CompositeHeader.js +4 -0
- package/Core/Template.js +8 -0
- package/Json/{ROCrateObject.js → LDObject.js} +66 -17
- package/JsonIO/LDObject.js +31 -0
- package/ROCrate/ArcROCrateMetadata.js +35 -0
- package/ROCrate/ISAProfile/Assay.js +30 -2
- package/ROCrate/ISAProfile/Data.js +32 -5
- package/ROCrate/ISAProfile/Dataset.js +3 -3
- package/ROCrate/ISAProfile/Investigation.js +30 -2
- package/ROCrate/ISAProfile/LabProcess.js +113 -5
- package/ROCrate/ISAProfile/LabProtocol.js +4 -4
- package/ROCrate/ISAProfile/Person.js +32 -5
- package/ROCrate/ISAProfile/PropertyValue.js +59 -5
- package/ROCrate/ISAProfile/Sample.js +32 -5
- package/ROCrate/ISAProfile/ScholarlyArticle.js +59 -5
- package/ROCrate/ISAProfile/Study.js +30 -2
- package/ROCrate/LDObject.js +105 -0
- package/Spreadsheet/AnnotationTable/ArcTable.js +8 -5
- package/Spreadsheet/Template.js +29 -11
- package/Yaml/ValidationPackage.js +6 -6
- package/Yaml/ValidationPackagesConfig.js +6 -6
- package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynObj.fs +4 -4
- package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynObj.fs.js +0 -44
- package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/HashCodes.fs +4 -1
- package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/HashCodes.fs.js +8 -3
- package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Debug/netstandard2.0/DynamicObj.AssemblyInfo.fs +1 -1
- package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Release/netstandard2.0/DynamicObj.AssemblyInfo.fs +3 -3
- package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Decode.fs +398 -373
- package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Decode.fs.js +35 -2
- package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Debug/netstandard2.0/YAMLicious.AssemblyInfo.fs +1 -1
- package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Release/netstandard2.0/YAMLicious.AssemblyInfo.fs +1 -1
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
- package/JsonIO/ROCrateObject.js +0 -146
- package/ROCrate/ROCrateObject.js +0 -61
- /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynamicObj.fableproj +0 -0
- /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynamicObj.fs +0 -0
- /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynamicObj.fs.js +0 -0
- /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/FableJS.fs +0 -0
- /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/FableJS.fs.js +0 -0
- /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/FablePy.fs +0 -0
- /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/PropertyHelper.fs +0 -0
- /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/PropertyHelper.fs.js +0 -0
- /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/ReflectionUtils.fs +0 -0
- /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/ReflectionUtils.fs.js +0 -0
- /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Encode.fs +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Encode.fs.js +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Interop/JsInterop.fs +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Interop/JsInterop.fs.js +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Interop/PyInterop.fs +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Library.fs +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Library.fs.js +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Persil.fs +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Persil.fs.js +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Preprocessing.fs +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Preprocessing.fs.js +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Reader.fs +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Reader.fs.js +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Regex.fs +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Regex.fs.js +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/RegexActivePatterns.fs +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/RegexActivePatterns.fs.js +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Writer.fs +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Writer.fs.js +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/YAMLicious.fableproj +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/YAMLiciousTypes.fs +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/YAMLiciousTypes.fs.js +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
package/CWL/Decode.js
ADDED
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
import { disposeSafe, getEnumerator } from "../fable_modules/fable-library-js.4.22.0/Util.js";
|
|
2
|
+
import { setOptionalProperty, setProperty } from "../fable_modules/DynamicObj.4.0.3/DynObj.fs.js";
|
|
3
|
+
import { DynamicObj } from "../fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js";
|
|
4
|
+
import { ofArray, tail, head, isEmpty, empty, map, iterate } from "../fable_modules/fable-library-js.4.22.0/List.js";
|
|
5
|
+
import { read, int, float, resizearray, map as map_1, bool, string, object } from "../fable_modules/YAMLicious.0.0.3/Decode.fs.js";
|
|
6
|
+
import { replace, toFail, printf, toText } from "../fable_modules/fable-library-js.4.22.0/String.js";
|
|
7
|
+
import { CWLOutput, OutputBinding } from "./Outputs.js";
|
|
8
|
+
import { SchemaDefRequirementType_$ctor_541DA560, SoftwarePackage, DirectoryInstance_$ctor, FileInstance_$ctor, CWLType, DirentInstance } from "./CWLTypes.js";
|
|
9
|
+
import { length, item, singleton, empty as empty_1, append, collect, delay, toArray } from "../fable_modules/fable-library-js.4.22.0/Seq.js";
|
|
10
|
+
import { getItemFromDict } from "../fable_modules/fable-library-js.4.22.0/MapUtil.js";
|
|
11
|
+
import { Requirement, ResourceRequirementInstance_$ctor_D76FC00, EnvironmentDef, DockerRequirement } from "./Requirements.js";
|
|
12
|
+
import { some } from "../fable_modules/fable-library-js.4.22.0/Option.js";
|
|
13
|
+
import { FSharpMap__get_Values, FSharpMap__get_Keys } from "../fable_modules/fable-library-js.4.22.0/Map.js";
|
|
14
|
+
import { CWLInput, InputBinding } from "./Inputs.js";
|
|
15
|
+
import { WorkflowStep, StepOutput, StepInput } from "./WorkflowSteps.js";
|
|
16
|
+
import { CWLToolDescription } from "./ToolDescription.js";
|
|
17
|
+
import { CWLWorkflowDescription } from "./WorkflowDescription.js";
|
|
18
|
+
|
|
19
|
+
export function ResizeArray_map(f, a) {
|
|
20
|
+
const b = [];
|
|
21
|
+
let enumerator = getEnumerator(a);
|
|
22
|
+
try {
|
|
23
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
24
|
+
const i = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
25
|
+
void (b.push(f(i)));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
finally {
|
|
29
|
+
disposeSafe(enumerator);
|
|
30
|
+
}
|
|
31
|
+
return b;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Decode key value pairs into a dynamic object, while preserving their tree structure
|
|
36
|
+
*/
|
|
37
|
+
export function Decode_overflowDecoder(dynObj, dict) {
|
|
38
|
+
let enumerator = getEnumerator(dict);
|
|
39
|
+
try {
|
|
40
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
41
|
+
const e = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
42
|
+
const matchValue = e[1];
|
|
43
|
+
let matchResult, v, s;
|
|
44
|
+
if (matchValue.tag === 3) {
|
|
45
|
+
if (!isEmpty(matchValue.fields[0])) {
|
|
46
|
+
switch (head(matchValue.fields[0]).tag) {
|
|
47
|
+
case 1: {
|
|
48
|
+
if (isEmpty(tail(matchValue.fields[0]))) {
|
|
49
|
+
matchResult = 0;
|
|
50
|
+
v = head(matchValue.fields[0]).fields[0];
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
matchResult = 2;
|
|
54
|
+
}
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
case 2: {
|
|
58
|
+
if (isEmpty(tail(matchValue.fields[0]))) {
|
|
59
|
+
matchResult = 1;
|
|
60
|
+
s = head(matchValue.fields[0]).fields[0];
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
matchResult = 2;
|
|
64
|
+
}
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
default:
|
|
68
|
+
matchResult = 2;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
matchResult = 2;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
matchResult = 2;
|
|
77
|
+
}
|
|
78
|
+
switch (matchResult) {
|
|
79
|
+
case 0: {
|
|
80
|
+
setProperty(e[0], v.Value, dynObj);
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
case 1: {
|
|
84
|
+
const newDynObj = new DynamicObj();
|
|
85
|
+
iterate((x) => {
|
|
86
|
+
setProperty(e[0], x, dynObj);
|
|
87
|
+
}, map((arg) => Decode_overflowDecoder(newDynObj, object((get$) => get$.Overflow.FieldList(empty()), arg)), s));
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
case 2: {
|
|
91
|
+
setProperty(e[0], e[1], dynObj);
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
finally {
|
|
98
|
+
disposeSafe(enumerator);
|
|
99
|
+
}
|
|
100
|
+
return dynObj;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Decode a YAMLElement which is either a string or expression into a string
|
|
105
|
+
*/
|
|
106
|
+
export function Decode_decodeStringOrExpression(yEle) {
|
|
107
|
+
let matchResult, v, c, v_1;
|
|
108
|
+
switch (yEle.tag) {
|
|
109
|
+
case 1: {
|
|
110
|
+
matchResult = 0;
|
|
111
|
+
v = yEle.fields[0];
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
case 3: {
|
|
115
|
+
if (!isEmpty(yEle.fields[0])) {
|
|
116
|
+
switch (head(yEle.fields[0]).tag) {
|
|
117
|
+
case 1: {
|
|
118
|
+
if (isEmpty(tail(yEle.fields[0]))) {
|
|
119
|
+
matchResult = 0;
|
|
120
|
+
v = head(yEle.fields[0]).fields[0];
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
matchResult = 2;
|
|
124
|
+
}
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
case 0: {
|
|
128
|
+
if (head(yEle.fields[0]).fields[1].tag === 3) {
|
|
129
|
+
if (!isEmpty(head(yEle.fields[0]).fields[1].fields[0])) {
|
|
130
|
+
if (head(head(yEle.fields[0]).fields[1].fields[0]).tag === 1) {
|
|
131
|
+
if (isEmpty(tail(head(yEle.fields[0]).fields[1].fields[0]))) {
|
|
132
|
+
if (isEmpty(tail(yEle.fields[0]))) {
|
|
133
|
+
matchResult = 1;
|
|
134
|
+
c = head(yEle.fields[0]).fields[0];
|
|
135
|
+
v_1 = head(head(yEle.fields[0]).fields[1].fields[0]).fields[0];
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
matchResult = 2;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
matchResult = 2;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
matchResult = 2;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
matchResult = 2;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
matchResult = 2;
|
|
155
|
+
}
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
default:
|
|
159
|
+
matchResult = 2;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
matchResult = 2;
|
|
164
|
+
}
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
default:
|
|
168
|
+
matchResult = 2;
|
|
169
|
+
}
|
|
170
|
+
switch (matchResult) {
|
|
171
|
+
case 0:
|
|
172
|
+
return v.Value;
|
|
173
|
+
case 1:
|
|
174
|
+
return toText(printf("%s: %s"))(c.Value)(v_1.Value);
|
|
175
|
+
default:
|
|
176
|
+
return toFail(printf("%A"))(yEle);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export const Decode_outputBindingGlobDecoder = (value_1) => object((get$) => {
|
|
181
|
+
let objectArg;
|
|
182
|
+
return new OutputBinding((objectArg = get$.Optional, objectArg.Field("glob", string)));
|
|
183
|
+
}, value_1);
|
|
184
|
+
|
|
185
|
+
export const Decode_outputBindingDecoder = (value) => object((get$) => {
|
|
186
|
+
const objectArg = get$.Optional;
|
|
187
|
+
return objectArg.Field("outputBinding", Decode_outputBindingGlobDecoder);
|
|
188
|
+
}, value);
|
|
189
|
+
|
|
190
|
+
export const Decode_direntDecoder = (value_1) => object((get$) => {
|
|
191
|
+
let objectArg, objectArg_1, objectArg_2;
|
|
192
|
+
return new CWLType(2, [new DirentInstance((objectArg = get$.Required, objectArg.Field("entry", Decode_decodeStringOrExpression)), (objectArg_1 = get$.Optional, objectArg_1.Field("entryname", Decode_decodeStringOrExpression)), (objectArg_2 = get$.Optional, objectArg_2.Field("writable", bool)))]);
|
|
193
|
+
}, value_1);
|
|
194
|
+
|
|
195
|
+
export const Decode_cwlArrayTypeDecoder = (value_1) => object((get$) => {
|
|
196
|
+
let objectArg_1;
|
|
197
|
+
let items;
|
|
198
|
+
const objectArg = get$.Required;
|
|
199
|
+
items = objectArg.Field("items", string);
|
|
200
|
+
switch (items) {
|
|
201
|
+
case "File":
|
|
202
|
+
return new CWLType(11, [new CWLType(0, [FileInstance_$ctor()])]);
|
|
203
|
+
case "Directory":
|
|
204
|
+
return new CWLType(11, [new CWLType(1, [DirectoryInstance_$ctor()])]);
|
|
205
|
+
case "Dirent":
|
|
206
|
+
return new CWLType(11, [(objectArg_1 = get$.Required, objectArg_1.Field("listing", Decode_direntDecoder))]);
|
|
207
|
+
case "string":
|
|
208
|
+
return new CWLType(11, [new CWLType(3, [])]);
|
|
209
|
+
case "int":
|
|
210
|
+
return new CWLType(11, [new CWLType(4, [])]);
|
|
211
|
+
case "long":
|
|
212
|
+
return new CWLType(11, [new CWLType(5, [])]);
|
|
213
|
+
case "float":
|
|
214
|
+
return new CWLType(11, [new CWLType(6, [])]);
|
|
215
|
+
case "double":
|
|
216
|
+
return new CWLType(11, [new CWLType(7, [])]);
|
|
217
|
+
case "boolean":
|
|
218
|
+
return new CWLType(11, [new CWLType(8, [])]);
|
|
219
|
+
default:
|
|
220
|
+
throw new Error("Invalid CWL type");
|
|
221
|
+
}
|
|
222
|
+
}, value_1);
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Match the input string to the possible CWL types and checks if it is optional
|
|
226
|
+
*/
|
|
227
|
+
export function Decode_cwlTypeStringMatcher(t, get$) {
|
|
228
|
+
let objectArg, objectArg_1;
|
|
229
|
+
const patternInput = t.endsWith("?") ? [true, replace(t, "?", "")] : [false, t];
|
|
230
|
+
const newT = patternInput[1];
|
|
231
|
+
return [(newT === "File") ? (new CWLType(0, [FileInstance_$ctor()])) : ((newT === "Directory") ? (new CWLType(1, [DirectoryInstance_$ctor()])) : ((newT === "Dirent") ? ((objectArg = get$.Required, objectArg.Field("listing", Decode_direntDecoder))) : ((newT === "string") ? (new CWLType(3, [])) : ((newT === "int") ? (new CWLType(4, [])) : ((newT === "long") ? (new CWLType(5, [])) : ((newT === "float") ? (new CWLType(6, [])) : ((newT === "double") ? (new CWLType(7, [])) : ((newT === "boolean") ? (new CWLType(8, [])) : ((newT === "File[]") ? (new CWLType(11, [new CWLType(0, [FileInstance_$ctor()])])) : ((newT === "Directory[]") ? (new CWLType(11, [new CWLType(1, [DirectoryInstance_$ctor()])])) : ((newT === "Dirent[]") ? (new CWLType(11, [(objectArg_1 = get$.Required, objectArg_1.Field("listing", Decode_direntDecoder))])) : ((newT === "string[]") ? (new CWLType(11, [new CWLType(3, [])])) : ((newT === "int[]") ? (new CWLType(11, [new CWLType(4, [])])) : ((newT === "long[]") ? (new CWLType(11, [new CWLType(5, [])])) : ((newT === "float[]") ? (new CWLType(11, [new CWLType(6, [])])) : ((newT === "double[]") ? (new CWLType(11, [new CWLType(7, [])])) : ((newT === "boolean[]") ? (new CWLType(11, [new CWLType(8, [])])) : ((newT === "stdout") ? (new CWLType(9, [])) : ((newT === "null") ? (new CWLType(10, [])) : (() => {
|
|
232
|
+
throw new Error("Invalid CWL type");
|
|
233
|
+
})()))))))))))))))))))), patternInput[0]];
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export const Decode_cwlTypeDecoder = (value_1) => object((get$) => {
|
|
237
|
+
let objectArg_1;
|
|
238
|
+
let cwlType;
|
|
239
|
+
const objectArg = get$.Required;
|
|
240
|
+
cwlType = objectArg.Field("type", (value) => {
|
|
241
|
+
let matchResult, v, o;
|
|
242
|
+
switch (value.tag) {
|
|
243
|
+
case 1: {
|
|
244
|
+
matchResult = 0;
|
|
245
|
+
v = value.fields[0];
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
case 3: {
|
|
249
|
+
if (!isEmpty(value.fields[0])) {
|
|
250
|
+
if (head(value.fields[0]).tag === 1) {
|
|
251
|
+
if (isEmpty(tail(value.fields[0]))) {
|
|
252
|
+
matchResult = 0;
|
|
253
|
+
v = head(value.fields[0]).fields[0];
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
matchResult = 1;
|
|
257
|
+
o = value.fields[0];
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
matchResult = 1;
|
|
262
|
+
o = value.fields[0];
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
matchResult = 1;
|
|
267
|
+
o = value.fields[0];
|
|
268
|
+
}
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
default:
|
|
272
|
+
matchResult = 2;
|
|
273
|
+
}
|
|
274
|
+
switch (matchResult) {
|
|
275
|
+
case 0:
|
|
276
|
+
return v.Value;
|
|
277
|
+
case 1:
|
|
278
|
+
return undefined;
|
|
279
|
+
default:
|
|
280
|
+
throw new Error("Unexpected YAMLElement");
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
if (cwlType == null) {
|
|
284
|
+
return [(objectArg_1 = get$.Required, objectArg_1.Field("type", Decode_cwlArrayTypeDecoder)), false];
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
return Decode_cwlTypeStringMatcher(cwlType, get$);
|
|
288
|
+
}
|
|
289
|
+
}, value_1);
|
|
290
|
+
|
|
291
|
+
export const Decode_outputArrayDecoder = (value_2) => object((get$) => {
|
|
292
|
+
const dict = get$.Overflow.FieldList(empty());
|
|
293
|
+
const collection = toArray(delay(() => collect((key) => {
|
|
294
|
+
const value = getItemFromDict(dict, key);
|
|
295
|
+
const outputBinding = Decode_outputBindingDecoder(value);
|
|
296
|
+
let outputSource;
|
|
297
|
+
const objectArg = get$.Optional;
|
|
298
|
+
outputSource = objectArg.Field("outputSource", string);
|
|
299
|
+
const output = new CWLOutput(key, (value.tag === 3) ? (!isEmpty(value.fields[0]) ? ((head(value.fields[0]).tag === 1) ? (isEmpty(tail(value.fields[0])) ? Decode_cwlTypeStringMatcher(head(value.fields[0]).fields[0].Value, get$)[0] : Decode_cwlTypeDecoder(value)[0]) : Decode_cwlTypeDecoder(value)[0]) : Decode_cwlTypeDecoder(value)[0]) : Decode_cwlTypeDecoder(value)[0]);
|
|
300
|
+
return append((outputBinding != null) ? ((setOptionalProperty("outputBinding", outputBinding, output), empty_1())) : empty_1(), delay(() => append((outputSource != null) ? ((setOptionalProperty("outputSource", outputSource, output), empty_1())) : empty_1(), delay(() => singleton(output)))));
|
|
301
|
+
}, dict.keys())));
|
|
302
|
+
return Array.from(collection);
|
|
303
|
+
}, value_2);
|
|
304
|
+
|
|
305
|
+
export const Decode_outputsDecoder = (value) => object((get$) => {
|
|
306
|
+
const objectArg = get$.Required;
|
|
307
|
+
return objectArg.Field("outputs", Decode_outputArrayDecoder);
|
|
308
|
+
}, value);
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Decode a YAMLElement into a DockerRequirement
|
|
312
|
+
*/
|
|
313
|
+
export function Decode_dockerRequirementDecoder(get$) {
|
|
314
|
+
let objectArg, objectArg_1, objectArg_2;
|
|
315
|
+
return new DockerRequirement((objectArg = get$.Optional, objectArg.Field("dockerPull", string)), (objectArg_1 = get$.Optional, objectArg_1.Field("dockerFile", (value_1) => map_1((x) => x, string, value_1))), (objectArg_2 = get$.Optional, objectArg_2.Field("dockerImageId", string)));
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Decode a YAMLElement into an EnvVarRequirement array
|
|
320
|
+
*/
|
|
321
|
+
export function Decode_envVarRequirementDecoder(get$) {
|
|
322
|
+
const objectArg = get$.Required;
|
|
323
|
+
return objectArg.Field("envDef", (value_3) => resizearray((value_2) => object((get2) => {
|
|
324
|
+
let objectArg_1, objectArg_2;
|
|
325
|
+
return new EnvironmentDef((objectArg_1 = get2.Required, objectArg_1.Field("envName", string)), (objectArg_2 = get2.Required, objectArg_2.Field("envValue", string)));
|
|
326
|
+
}, value_2), value_3));
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Decode a YAMLElement into a SoftwareRequirement array
|
|
331
|
+
*/
|
|
332
|
+
export function Decode_softwareRequirementDecoder(get$) {
|
|
333
|
+
const objectArg = get$.Required;
|
|
334
|
+
return objectArg.Field("packages", (value_6) => resizearray((value_5) => object((get2) => {
|
|
335
|
+
let objectArg_1, objectArg_2, objectArg_3;
|
|
336
|
+
return new SoftwarePackage((objectArg_1 = get2.Required, objectArg_1.Field("package", string)), (objectArg_2 = get2.Optional, objectArg_2.Field("version", (value_1) => resizearray(string, value_1))), (objectArg_3 = get2.Optional, objectArg_3.Field("specs", (value_3) => resizearray(string, value_3))));
|
|
337
|
+
}, value_5), value_6));
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Decode a YAMLElement into a InitialWorkDirRequirement array
|
|
342
|
+
*/
|
|
343
|
+
export function Decode_initialWorkDirRequirementDecoder(get$) {
|
|
344
|
+
const objectArg = get$.Required;
|
|
345
|
+
return objectArg.Field("listing", (value) => resizearray(Decode_direntDecoder, value));
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Decode a YAMLElement into a ResourceRequirementInstance
|
|
350
|
+
*/
|
|
351
|
+
export function Decode_resourceRequirementDecoder(get$) {
|
|
352
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6, objectArg_7;
|
|
353
|
+
return ResourceRequirementInstance_$ctor_D76FC00(some((objectArg = get$.Optional, objectArg.Field("coresMin", (x) => x))), some((objectArg_1 = get$.Optional, objectArg_1.Field("coresMax", (x_1) => x_1))), some((objectArg_2 = get$.Optional, objectArg_2.Field("ramMin", (x_2) => x_2))), some((objectArg_3 = get$.Optional, objectArg_3.Field("ramMax", (x_3) => x_3))), some((objectArg_4 = get$.Optional, objectArg_4.Field("tmpdirMin", (x_4) => x_4))), some((objectArg_5 = get$.Optional, objectArg_5.Field("tmpdirMax", (x_5) => x_5))), some((objectArg_6 = get$.Optional, objectArg_6.Field("outdirMin", (x_6) => x_6))), some((objectArg_7 = get$.Optional, objectArg_7.Field("outdirMax", (x_7) => x_7))));
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Decode a YAMLElement into a SchemaDefRequirementType array
|
|
358
|
+
*/
|
|
359
|
+
export function Decode_schemaDefRequirementDecoder(get$) {
|
|
360
|
+
let objectArg;
|
|
361
|
+
return ResizeArray_map((m) => SchemaDefRequirementType_$ctor_541DA560(item(0, FSharpMap__get_Keys(m)), item(0, FSharpMap__get_Values(m))), (objectArg = get$.Required, objectArg.Field("types", (value_2) => resizearray((value) => map_1((x) => x, string, value), value_2))));
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Decode a YAMLElement into a ToolTimeLimitRequirement
|
|
366
|
+
*/
|
|
367
|
+
export function Decode_toolTimeLimitRequirementDecoder(get$) {
|
|
368
|
+
const objectArg = get$.Required;
|
|
369
|
+
return objectArg.Field("timelimit", float);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export const Decode_requirementArrayDecoder = (value_2) => resizearray((value_1) => object((get$) => {
|
|
373
|
+
let cls;
|
|
374
|
+
const objectArg = get$.Required;
|
|
375
|
+
cls = objectArg.Field("class", string);
|
|
376
|
+
switch (cls) {
|
|
377
|
+
case "InlineJavascriptRequirement":
|
|
378
|
+
return new Requirement(0, []);
|
|
379
|
+
case "SchemaDefRequirement":
|
|
380
|
+
return new Requirement(1, [Decode_schemaDefRequirementDecoder(get$)]);
|
|
381
|
+
case "DockerRequirement":
|
|
382
|
+
return new Requirement(2, [Decode_dockerRequirementDecoder(get$)]);
|
|
383
|
+
case "SoftwareRequirement":
|
|
384
|
+
return new Requirement(3, [Decode_softwareRequirementDecoder(get$)]);
|
|
385
|
+
case "InitialWorkDirRequirement":
|
|
386
|
+
return new Requirement(4, [Decode_initialWorkDirRequirementDecoder(get$)]);
|
|
387
|
+
case "EnvVarRequirement":
|
|
388
|
+
return new Requirement(5, [Decode_envVarRequirementDecoder(get$)]);
|
|
389
|
+
case "ShellCommandRequirement":
|
|
390
|
+
return new Requirement(6, []);
|
|
391
|
+
case "ResourceRequirement":
|
|
392
|
+
return new Requirement(7, [Decode_resourceRequirementDecoder(get$)]);
|
|
393
|
+
case "WorkReuse":
|
|
394
|
+
return new Requirement(8, []);
|
|
395
|
+
case "NetworkAccess":
|
|
396
|
+
return new Requirement(9, []);
|
|
397
|
+
case "InplaceUpdateRequirement":
|
|
398
|
+
return new Requirement(10, []);
|
|
399
|
+
case "ToolTimeLimit":
|
|
400
|
+
return new Requirement(11, [Decode_toolTimeLimitRequirementDecoder(get$)]);
|
|
401
|
+
case "SubworkflowFeatureRequirement":
|
|
402
|
+
return new Requirement(12, []);
|
|
403
|
+
case "ScatterFeatureRequirement":
|
|
404
|
+
return new Requirement(13, []);
|
|
405
|
+
case "MultipleInputFeatureRequirement":
|
|
406
|
+
return new Requirement(14, []);
|
|
407
|
+
case "StepInputExpressionRequirement":
|
|
408
|
+
return new Requirement(15, []);
|
|
409
|
+
default:
|
|
410
|
+
throw new Error("Invalid requirement");
|
|
411
|
+
}
|
|
412
|
+
}, value_1), value_2);
|
|
413
|
+
|
|
414
|
+
export const Decode_requirementsDecoder = (value) => object((get$) => {
|
|
415
|
+
const objectArg = get$.Optional;
|
|
416
|
+
return objectArg.Field("requirements", Decode_requirementArrayDecoder);
|
|
417
|
+
}, value);
|
|
418
|
+
|
|
419
|
+
export const Decode_hintsDecoder = (value) => object((get$) => {
|
|
420
|
+
const objectArg = get$.Optional;
|
|
421
|
+
return objectArg.Field("hints", Decode_requirementArrayDecoder);
|
|
422
|
+
}, value);
|
|
423
|
+
|
|
424
|
+
export const Decode_inputBindingDecoder = (value_5) => object((get$) => {
|
|
425
|
+
const objectArg = get$.Optional;
|
|
426
|
+
return objectArg.Field("inputBinding", (value_4) => object((get$0027) => {
|
|
427
|
+
let objectArg_1, objectArg_2, objectArg_3, objectArg_4;
|
|
428
|
+
return new InputBinding((objectArg_1 = get$0027.Optional, objectArg_1.Field("prefix", string)), (objectArg_2 = get$0027.Optional, objectArg_2.Field("position", int)), (objectArg_3 = get$0027.Optional, objectArg_3.Field("itemSeparator", string)), (objectArg_4 = get$0027.Optional, objectArg_4.Field("separate", bool)));
|
|
429
|
+
}, value_4));
|
|
430
|
+
}, value_5);
|
|
431
|
+
|
|
432
|
+
export const Decode_inputArrayDecoder = (value_1) => object((get$) => {
|
|
433
|
+
const dict = get$.Overflow.FieldList(empty());
|
|
434
|
+
const collection = toArray(delay(() => collect((key) => {
|
|
435
|
+
const value = getItemFromDict(dict, key);
|
|
436
|
+
const inputBinding = Decode_inputBindingDecoder(value);
|
|
437
|
+
const patternInput = (value.tag === 3) ? (!isEmpty(value.fields[0]) ? ((head(value.fields[0]).tag === 1) ? (isEmpty(tail(value.fields[0])) ? Decode_cwlTypeStringMatcher(head(value.fields[0]).fields[0].Value, get$) : Decode_cwlTypeDecoder(value)) : Decode_cwlTypeDecoder(value)) : Decode_cwlTypeDecoder(value)) : Decode_cwlTypeDecoder(value);
|
|
438
|
+
const input = new CWLInput(key, patternInput[0]);
|
|
439
|
+
return append((inputBinding != null) ? ((setOptionalProperty("inputBinding", inputBinding, input), empty_1())) : empty_1(), delay(() => append(patternInput[1] ? ((setOptionalProperty("optional", true, input), empty_1())) : empty_1(), delay(() => singleton(input)))));
|
|
440
|
+
}, dict.keys())));
|
|
441
|
+
return Array.from(collection);
|
|
442
|
+
}, value_1);
|
|
443
|
+
|
|
444
|
+
export const Decode_inputsDecoder = (value) => object((get$) => {
|
|
445
|
+
const objectArg = get$.Optional;
|
|
446
|
+
return objectArg.Field("inputs", Decode_inputArrayDecoder);
|
|
447
|
+
}, value);
|
|
448
|
+
|
|
449
|
+
export const Decode_baseCommandDecoder = (value_2) => object((get$) => {
|
|
450
|
+
const objectArg = get$.Optional;
|
|
451
|
+
return objectArg.Field("baseCommand", (value) => resizearray(string, value));
|
|
452
|
+
}, value_2);
|
|
453
|
+
|
|
454
|
+
export const Decode_versionDecoder = (value_1) => object((get$) => {
|
|
455
|
+
const objectArg = get$.Required;
|
|
456
|
+
return objectArg.Field("cwlVersion", string);
|
|
457
|
+
}, value_1);
|
|
458
|
+
|
|
459
|
+
export const Decode_classDecoder = (value_1) => object((get$) => {
|
|
460
|
+
const objectArg = get$.Required;
|
|
461
|
+
return objectArg.Field("class", string);
|
|
462
|
+
}, value_1);
|
|
463
|
+
|
|
464
|
+
export function Decode_stringOptionFieldDecoder(field) {
|
|
465
|
+
return (value_1) => object((get$) => {
|
|
466
|
+
const objectArg = get$.Optional;
|
|
467
|
+
return objectArg.Field(field, string);
|
|
468
|
+
}, value_1);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export function Decode_stringFieldDecoder(field) {
|
|
472
|
+
return (value_1) => object((get$) => {
|
|
473
|
+
const objectArg = get$.Required;
|
|
474
|
+
return objectArg.Field(field, string);
|
|
475
|
+
}, value_1);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export const Decode_inputStepDecoder = (value_1) => object((get$) => {
|
|
479
|
+
const dict = get$.Overflow.FieldList(empty());
|
|
480
|
+
const collection = toArray(delay(() => collect((key) => {
|
|
481
|
+
let s1, s2;
|
|
482
|
+
const value = getItemFromDict(dict, key);
|
|
483
|
+
return singleton(new StepInput(key, (s1 = ((value.tag === 3) ? (!isEmpty(value.fields[0]) ? ((head(value.fields[0]).tag === 1) ? (isEmpty(tail(value.fields[0])) ? head(value.fields[0]).fields[0].Value : undefined) : undefined) : undefined) : undefined), (s2 = Decode_stringOptionFieldDecoder("source")(value), (s1 != null) ? s1 : ((s2 != null) ? s2 : undefined))), Decode_stringOptionFieldDecoder("default")(value), Decode_stringOptionFieldDecoder("valueFrom")(value)));
|
|
484
|
+
}, dict.keys())));
|
|
485
|
+
return Array.from(collection);
|
|
486
|
+
}, value_1);
|
|
487
|
+
|
|
488
|
+
export const Decode_outputStepsDecoder = (value_2) => object((get$) => {
|
|
489
|
+
const objectArg = get$.Required;
|
|
490
|
+
return objectArg.Field("out", (value) => resizearray(string, value));
|
|
491
|
+
}, value_2);
|
|
492
|
+
|
|
493
|
+
export const Decode_stepArrayDecoder = (value_1) => object((get$) => {
|
|
494
|
+
const dict = get$.Overflow.FieldList(empty());
|
|
495
|
+
const collection = toArray(delay(() => collect((key) => {
|
|
496
|
+
const value = getItemFromDict(dict, key);
|
|
497
|
+
const run = Decode_stringFieldDecoder("run")(value);
|
|
498
|
+
const inputs = object((get$_1) => {
|
|
499
|
+
const objectArg = get$_1.Required;
|
|
500
|
+
return objectArg.Field("in", Decode_inputStepDecoder);
|
|
501
|
+
}, value);
|
|
502
|
+
const outputs = new StepOutput(Decode_outputStepsDecoder(value));
|
|
503
|
+
const requirements = Decode_requirementsDecoder(value);
|
|
504
|
+
const hints = Decode_hintsDecoder(value);
|
|
505
|
+
const wfStep = new WorkflowStep(key, inputs, outputs, run);
|
|
506
|
+
return append((requirements != null) ? ((wfStep.Requirements = requirements, empty_1())) : empty_1(), delay(() => append((hints != null) ? ((wfStep.Hints = hints, empty_1())) : empty_1(), delay(() => singleton(wfStep)))));
|
|
507
|
+
}, dict.keys())));
|
|
508
|
+
return Array.from(collection);
|
|
509
|
+
}, value_1);
|
|
510
|
+
|
|
511
|
+
export const Decode_stepsDecoder = (value) => object((get$) => {
|
|
512
|
+
const objectArg = get$.Required;
|
|
513
|
+
return objectArg.Field("steps", Decode_stepArrayDecoder);
|
|
514
|
+
}, value);
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Decode a CWL file string written in the YAML format into a CWLToolDescription
|
|
518
|
+
*/
|
|
519
|
+
export function Decode_decodeCommandLineTool(cwl) {
|
|
520
|
+
const yamlCWL = read(cwl);
|
|
521
|
+
const cwlVersion = Decode_versionDecoder(yamlCWL);
|
|
522
|
+
const outputs = Decode_outputsDecoder(yamlCWL);
|
|
523
|
+
const inputs = Decode_inputsDecoder(yamlCWL);
|
|
524
|
+
const requirements = Decode_requirementsDecoder(yamlCWL);
|
|
525
|
+
const hints = Decode_hintsDecoder(yamlCWL);
|
|
526
|
+
const baseCommand = Decode_baseCommandDecoder(yamlCWL);
|
|
527
|
+
const description = new CWLToolDescription(outputs, cwlVersion);
|
|
528
|
+
let metadata;
|
|
529
|
+
const md = new DynamicObj();
|
|
530
|
+
object((get$) => Decode_overflowDecoder(md, get$.Overflow.FieldList(ofArray(["inputs", "outputs", "class", "id", "label", "doc", "requirements", "hints", "cwlVersion", "baseCommand", "arguments", "stdin", "stderr", "stdout", "successCodes", "temporaryFailCodes", "permanentFailCodes"]))), yamlCWL);
|
|
531
|
+
metadata = md;
|
|
532
|
+
object((get$_1) => Decode_overflowDecoder(description, get$_1.MultipleOptional.FieldList(ofArray(["id", "label", "doc", "arguments", "stdin", "stderr", "stdout", "successCodes", "temporaryFailCodes", "permanentFailCodes"]))), yamlCWL);
|
|
533
|
+
if (inputs != null) {
|
|
534
|
+
description.Inputs = inputs;
|
|
535
|
+
}
|
|
536
|
+
if (requirements != null) {
|
|
537
|
+
description.Requirements = requirements;
|
|
538
|
+
}
|
|
539
|
+
if (hints != null) {
|
|
540
|
+
description.Hints = hints;
|
|
541
|
+
}
|
|
542
|
+
if (baseCommand != null) {
|
|
543
|
+
description.BaseCommand = baseCommand;
|
|
544
|
+
}
|
|
545
|
+
if (length(metadata.GetProperties(false)) > 0) {
|
|
546
|
+
description.Metadata = metadata;
|
|
547
|
+
}
|
|
548
|
+
return description;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Decode a CWL file string written in the YAML format into a CWLWorkflowDescription
|
|
553
|
+
*/
|
|
554
|
+
export function Decode_decodeWorkflow(cwl) {
|
|
555
|
+
const yamlCWL = read(cwl);
|
|
556
|
+
const cwlVersion = Decode_versionDecoder(yamlCWL);
|
|
557
|
+
const outputs = Decode_outputsDecoder(yamlCWL);
|
|
558
|
+
let inputs;
|
|
559
|
+
const matchValue = Decode_inputsDecoder(yamlCWL);
|
|
560
|
+
if (matchValue == null) {
|
|
561
|
+
throw new Error("Inputs are required for a workflow");
|
|
562
|
+
}
|
|
563
|
+
else {
|
|
564
|
+
inputs = matchValue;
|
|
565
|
+
}
|
|
566
|
+
const requirements = Decode_requirementsDecoder(yamlCWL);
|
|
567
|
+
const hints = Decode_hintsDecoder(yamlCWL);
|
|
568
|
+
const description = new CWLWorkflowDescription(Decode_stepsDecoder(yamlCWL), inputs, outputs, cwlVersion);
|
|
569
|
+
let metadata;
|
|
570
|
+
const md = new DynamicObj();
|
|
571
|
+
object((get$) => Decode_overflowDecoder(md, get$.Overflow.FieldList(ofArray(["inputs", "outputs", "class", "steps", "id", "label", "doc", "requirements", "hints", "cwlVersion"]))), yamlCWL);
|
|
572
|
+
metadata = md;
|
|
573
|
+
object((get$_1) => Decode_overflowDecoder(description, get$_1.MultipleOptional.FieldList(ofArray(["id", "label", "doc"]))), yamlCWL);
|
|
574
|
+
if (requirements != null) {
|
|
575
|
+
description.Requirements = requirements;
|
|
576
|
+
}
|
|
577
|
+
if (hints != null) {
|
|
578
|
+
description.Hints = hints;
|
|
579
|
+
}
|
|
580
|
+
if (length(metadata.GetProperties(false)) > 0) {
|
|
581
|
+
description.Metadata = metadata;
|
|
582
|
+
}
|
|
583
|
+
return description;
|
|
584
|
+
}
|
|
585
|
+
|
package/CWL/Inputs.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { FSharpRef, Record } from "../fable_modules/fable-library-js.4.22.0/Types.js";
|
|
2
|
+
import { class_type, record_type, bool_type, int32_type, option_type, string_type } from "../fable_modules/fable-library-js.4.22.0/Reflection.js";
|
|
3
|
+
import { value, unwrap } from "../fable_modules/fable-library-js.4.22.0/Option.js";
|
|
4
|
+
import { CWLType } from "./CWLTypes.js";
|
|
5
|
+
import { defaultOf } from "../fable_modules/fable-library-js.4.22.0/Util.js";
|
|
6
|
+
import { setOptionalProperty } from "../fable_modules/DynamicObj.4.0.3/DynObj.fs.js";
|
|
7
|
+
import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js";
|
|
8
|
+
|
|
9
|
+
export class InputBinding extends Record {
|
|
10
|
+
constructor(Prefix, Position, ItemSeparator, Separate) {
|
|
11
|
+
super();
|
|
12
|
+
this.Prefix = Prefix;
|
|
13
|
+
this.Position = Position;
|
|
14
|
+
this.ItemSeparator = ItemSeparator;
|
|
15
|
+
this.Separate = Separate;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function InputBinding_$reflection() {
|
|
20
|
+
return record_type("ARCtrl.CWL.InputBinding", [], InputBinding, () => [["Prefix", option_type(string_type)], ["Position", option_type(int32_type)], ["ItemSeparator", option_type(string_type)], ["Separate", option_type(bool_type)]]);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export class CWLInput extends DynamicObj {
|
|
24
|
+
constructor(name, type_, inputBinding, optional) {
|
|
25
|
+
super();
|
|
26
|
+
const this$ = new FSharpRef(defaultOf());
|
|
27
|
+
this.name = name;
|
|
28
|
+
this$.contents = this;
|
|
29
|
+
this["init@14"] = 1;
|
|
30
|
+
setOptionalProperty("type", type_, this$.contents);
|
|
31
|
+
setOptionalProperty("inputBinding", inputBinding, this$.contents);
|
|
32
|
+
setOptionalProperty("optional", optional, this$.contents);
|
|
33
|
+
}
|
|
34
|
+
get Name() {
|
|
35
|
+
const this$ = this;
|
|
36
|
+
return this$.name;
|
|
37
|
+
}
|
|
38
|
+
get Type_() {
|
|
39
|
+
let matchValue, o;
|
|
40
|
+
const this$ = this;
|
|
41
|
+
return unwrap((matchValue = this$.TryGetPropertyValue("type"), (matchValue != null) ? ((o = value(matchValue), (o instanceof CWLType) ? o : undefined)) : undefined));
|
|
42
|
+
}
|
|
43
|
+
get InputBinding() {
|
|
44
|
+
let matchValue, o;
|
|
45
|
+
const this$ = this;
|
|
46
|
+
return unwrap((matchValue = this$.TryGetPropertyValue("inputBinding"), (matchValue != null) ? ((o = value(matchValue), (o instanceof InputBinding) ? o : undefined)) : undefined));
|
|
47
|
+
}
|
|
48
|
+
get Optional() {
|
|
49
|
+
let matchValue, o;
|
|
50
|
+
const this$ = this;
|
|
51
|
+
return unwrap((matchValue = this$.TryGetPropertyValue("optional"), (matchValue != null) ? ((o = value(matchValue), (typeof o === "boolean") ? o : undefined)) : undefined));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function CWLInput_$reflection() {
|
|
56
|
+
return class_type("ARCtrl.CWL.CWLInput", undefined, CWLInput, DynamicObj_$reflection());
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CWLInput_$ctor_Z3A15BEDB(name, type_, inputBinding, optional) {
|
|
60
|
+
return new CWLInput(name, type_, inputBinding, optional);
|
|
61
|
+
}
|
|
62
|
+
|