@nfdi4plants/arctrl 1.0.0-beta.5 → 1.0.0-beta.7
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/ARC.js +79 -20
- package/Contracts/Contracts.ARCtrl.js +1 -3
- package/Contracts/Contracts.ArcTypes.js +253 -0
- package/ISA/ISA/ArcTypes/ArcTypes.js +133 -51
- package/ISA/ISA/Helper.js +156 -2
- package/ISA/ISA/Identifier.js +1 -1
- package/ISA/ISA.Spreadsheet/ArcInvestigation.js +5 -2
- package/Path.js +10 -0
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
- package/Contracts/Contracts.ArcAssay.js +0 -65
- package/Contracts/Contracts.ArcInvestigation.js +0 -58
- package/Contracts/Contracts.ArcStudy.js +0 -65
package/ARC.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { concat, fold, exactlyOne, choose
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { ARCtrl_ISA_ArcStudy__ArcStudy_toFsWorkbook_Static_Z2A9662E9, ARCtrl_ISA_ArcStudy__ArcStudy_fromFsWorkbook_Static_32154C9D } from "./ISA/ISA.Spreadsheet/ArcStudy.js";
|
|
5
|
-
import { tryFromContract as tryFromContract_1 } from "./Contracts/Contracts.ArcStudy.js";
|
|
6
|
-
import { toFsWorkbook, fromFsWorkbook as fromFsWorkbook_1 } from "./ISA/ISA.Spreadsheet/ArcInvestigation.js";
|
|
7
|
-
import { tryFromContract as tryFromContract_2 } from "./Contracts/Contracts.ArcInvestigation.js";
|
|
8
|
-
import { collect, toList, empty, singleton, append, delay, iterate, find, tryFind, toArray } from "./fable_modules/fable-library.4.5.0/Seq.js";
|
|
1
|
+
import { concat, fold, map, exactlyOne, choose } from "./fable_modules/fable-library.4.5.0/Array.js";
|
|
2
|
+
import { ARCtrl_ISA_ArcStudy__ArcStudy_ToUpdateContract, ARCtrl_ISA_ArcInvestigation__ArcInvestigation_ToUpdateContract, ARCtrl_ISA_ArcAssay__ArcAssay_ToDeleteContract, ARCtrl_ISA_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F, ARCtrl_ISA_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F, ARCtrl_ISA_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F } from "./Contracts/Contracts.ArcTypes.js";
|
|
3
|
+
import { collect, empty, iterate, find, tryFind, map as map_1, singleton, append, delay, toList, toArray } from "./fable_modules/fable-library.4.5.0/Seq.js";
|
|
9
4
|
import { createRunsFolder, createWorkflowsFolder, createInvestigationFile, createStudyFolder, createStudiesFolder, createAssayFolder, createAssaysFolder } from "./FileSystemTree.js";
|
|
10
5
|
import { FileSystemTree } from "./FileSystem/FileSystemTree.js";
|
|
11
6
|
import { FileSystem } from "./FileSystem/FileSystem.js";
|
|
12
|
-
import { bind, map as
|
|
7
|
+
import { bind, map as map_2, value as value_2, defaultArg, unwrap } from "./fable_modules/fable-library.4.5.0/Option.js";
|
|
8
|
+
import { getStudyFolderPath, getAssayFolderPath } from "./Path.js";
|
|
9
|
+
import { Contract } from "./Contract/Contract.js";
|
|
10
|
+
import { ofArray } from "./fable_modules/fable-library.4.5.0/List.js";
|
|
13
11
|
import { tryISAReadContractFromPath } from "./Contracts/Contracts.ARCtrl.js";
|
|
14
12
|
import { ArcTables } from "./ISA/ISA/ArcTypes/ArcTables.js";
|
|
15
13
|
import { addToDict } from "./fable_modules/fable-library.4.5.0/MapUtil.js";
|
|
14
|
+
import { toFsWorkbook } from "./ISA/ISA.Spreadsheet/ArcInvestigation.js";
|
|
16
15
|
import { ArcInvestigation } from "./ISA/ISA/ArcTypes/ArcTypes.js";
|
|
17
16
|
import { Assay_fileNameFromIdentifier, Study_fileNameFromIdentifier } from "./ISA/ISA/Identifier.js";
|
|
17
|
+
import { ARCtrl_ISA_ArcStudy__ArcStudy_toFsWorkbook_Static_Z2A9662E9 } from "./ISA/ISA.Spreadsheet/ArcStudy.js";
|
|
18
|
+
import { toFsWorkbook as toFsWorkbook_1 } from "./ISA/ISA.Spreadsheet/ArcAssay.js";
|
|
18
19
|
import { Dictionary_tryGet } from "./fable_modules/FsSpreadsheet.5.0.1/Cells/FsCellsCollection.fs.js";
|
|
19
|
-
import { Contract } from "./Contract/Contract.js";
|
|
20
20
|
import { Clone_createCloneContract_5000466F, Init_createAddRemoteContract_Z721C83C5, gitignoreContract, Init_createInitContract_6DFDD678 } from "./Contracts/Contracts.Git.js";
|
|
21
21
|
import { FSharpSet__Contains, ofSeq, unionMany } from "./fable_modules/fable-library.4.5.0/Set.js";
|
|
22
22
|
import { comparePrimitives } from "./fable_modules/fable-library.4.5.0/Util.js";
|
|
@@ -24,15 +24,15 @@ import { ofSeq as ofSeq_1 } from "./fable_modules/fable-library.4.5.0/Map.js";
|
|
|
24
24
|
import { class_type } from "./fable_modules/fable-library.4.5.0/Reflection.js";
|
|
25
25
|
|
|
26
26
|
export function ARCAux_getArcAssaysFromContracts(contracts) {
|
|
27
|
-
return
|
|
27
|
+
return choose(ARCtrl_ISA_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F, contracts);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export function ARCAux_getArcStudiesFromContracts(contracts) {
|
|
31
|
-
return
|
|
31
|
+
return choose(ARCtrl_ISA_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F, contracts);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export function ARCAux_getArcInvestigationFromContracts(contracts) {
|
|
35
|
-
return
|
|
35
|
+
return exactlyOne(choose(ARCtrl_ISA_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F, contracts));
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export function ARCAux_updateFSByISA(isa, fs) {
|
|
@@ -92,9 +92,56 @@ export class ARC {
|
|
|
92
92
|
const this$ = this;
|
|
93
93
|
return this$._fs;
|
|
94
94
|
}
|
|
95
|
+
set FileSystem(fs) {
|
|
96
|
+
const this$ = this;
|
|
97
|
+
this$._fs = fs;
|
|
98
|
+
}
|
|
99
|
+
RemoveAssay(assayIdentifier) {
|
|
100
|
+
const this$ = this;
|
|
101
|
+
let isa;
|
|
102
|
+
const matchValue = this$.ISA;
|
|
103
|
+
if (matchValue == null) {
|
|
104
|
+
throw new Error("Cannot remove assay from null ISA value.");
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
isa = matchValue;
|
|
108
|
+
}
|
|
109
|
+
const assay = isa.GetAssay(assayIdentifier);
|
|
110
|
+
const studies = assay.StudiesRegisteredIn;
|
|
111
|
+
isa.RemoveAssay(assayIdentifier);
|
|
112
|
+
const paths = this$.FileSystem.Tree.ToFilePaths();
|
|
113
|
+
const assayFolderPath = getAssayFolderPath(assayIdentifier);
|
|
114
|
+
const filteredPaths = paths.filter((p) => !(p.indexOf(assayFolderPath) === 0));
|
|
115
|
+
this$.SetFilePaths(filteredPaths);
|
|
116
|
+
const collection = toList(delay(() => append(singleton(ARCtrl_ISA_ArcAssay__ArcAssay_ToDeleteContract(assay)), delay(() => append(singleton(ARCtrl_ISA_ArcInvestigation__ArcInvestigation_ToUpdateContract(isa)), delay(() => map_1(ARCtrl_ISA_ArcStudy__ArcStudy_ToUpdateContract, studies)))))));
|
|
117
|
+
return Array.from(collection);
|
|
118
|
+
}
|
|
119
|
+
RemoveStudy(studyIdentifier) {
|
|
120
|
+
const this$ = this;
|
|
121
|
+
let isa;
|
|
122
|
+
const matchValue = this$.ISA;
|
|
123
|
+
if (matchValue == null) {
|
|
124
|
+
throw new Error("Cannot remove study from null ISA value.");
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
isa = matchValue;
|
|
128
|
+
}
|
|
129
|
+
isa.RemoveStudy(studyIdentifier);
|
|
130
|
+
const paths = this$.FileSystem.Tree.ToFilePaths();
|
|
131
|
+
const studyFolderPath = getStudyFolderPath(studyIdentifier);
|
|
132
|
+
const filteredPaths = paths.filter((p) => !(p.indexOf(studyFolderPath) === 0));
|
|
133
|
+
this$.SetFilePaths(filteredPaths);
|
|
134
|
+
const collection = ofArray([Contract.createDelete(studyFolderPath), ARCtrl_ISA_ArcInvestigation__ArcInvestigation_ToUpdateContract(isa)]);
|
|
135
|
+
return Array.from(collection);
|
|
136
|
+
}
|
|
95
137
|
static fromFilePaths(filePaths) {
|
|
96
138
|
return new ARC(void 0, void 0, FileSystem.fromFilePaths(filePaths));
|
|
97
139
|
}
|
|
140
|
+
SetFilePaths(filePaths) {
|
|
141
|
+
const this$ = this;
|
|
142
|
+
const tree = FileSystemTree.fromFilePaths(filePaths);
|
|
143
|
+
this$._fs = (new FileSystem(tree, this$._fs.History));
|
|
144
|
+
}
|
|
98
145
|
GetReadContracts() {
|
|
99
146
|
const this$ = this;
|
|
100
147
|
return choose(tryISAReadContractFromPath, this$._fs.Tree.ToFilePaths());
|
|
@@ -104,8 +151,20 @@ export class ARC {
|
|
|
104
151
|
const investigation = ARCAux_getArcInvestigationFromContracts(contracts);
|
|
105
152
|
const studies = map((tuple) => tuple[0], ARCAux_getArcStudiesFromContracts(contracts));
|
|
106
153
|
const assays = ARCAux_getArcAssaysFromContracts(contracts);
|
|
154
|
+
const array_2 = investigation.AssayIdentifiers;
|
|
155
|
+
array_2.forEach((ai) => {
|
|
156
|
+
if (!assays.some((a) => (a.Identifier === ai))) {
|
|
157
|
+
investigation.DeleteAssay(ai);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
const array_4 = investigation.StudyIdentifiers;
|
|
161
|
+
array_4.forEach((si) => {
|
|
162
|
+
if (!studies.some((s) => (s.Identifier === si))) {
|
|
163
|
+
investigation.RemoveStudy(si);
|
|
164
|
+
}
|
|
165
|
+
});
|
|
107
166
|
studies.forEach((study) => {
|
|
108
|
-
const registeredStudyOpt = tryFind((
|
|
167
|
+
const registeredStudyOpt = tryFind((s_1) => (s_1.Identifier === study.Identifier), investigation.Studies);
|
|
109
168
|
if (registeredStudyOpt == null) {
|
|
110
169
|
investigation.AddStudy(study);
|
|
111
170
|
}
|
|
@@ -115,7 +174,7 @@ export class ARC {
|
|
|
115
174
|
}
|
|
116
175
|
});
|
|
117
176
|
assays.forEach((assay) => {
|
|
118
|
-
const registeredAssayOpt = tryFind((
|
|
177
|
+
const registeredAssayOpt = tryFind((a_1) => (a_1.Identifier === assay.Identifier), investigation.Assays);
|
|
119
178
|
if (registeredAssayOpt == null) {
|
|
120
179
|
investigation.AddAssay(assay);
|
|
121
180
|
}
|
|
@@ -123,10 +182,10 @@ export class ARC {
|
|
|
123
182
|
const registeredAssay = registeredAssayOpt;
|
|
124
183
|
registeredAssay.UpdateReferenceByAssayFile(assay, true);
|
|
125
184
|
}
|
|
126
|
-
const assay_1 = find((
|
|
185
|
+
const assay_1 = find((a_2) => (a_2.Identifier === assay.Identifier), investigation.Assays);
|
|
127
186
|
let updatedTables;
|
|
128
|
-
const
|
|
129
|
-
updatedTables = fold((tables, study_1) => ArcTables.updateReferenceTablesBySheets(new ArcTables(study_1.Tables), tables, false), new ArcTables(assay_1.Tables),
|
|
187
|
+
const array_6 = assay_1.StudiesRegisteredIn;
|
|
188
|
+
updatedTables = fold((tables, study_1) => ArcTables.updateReferenceTablesBySheets(new ArcTables(study_1.Tables), tables, false), new ArcTables(assay_1.Tables), array_6);
|
|
130
189
|
assay_1.Tables = updatedTables.Tables;
|
|
131
190
|
});
|
|
132
191
|
this$.ISA = investigation;
|
|
@@ -176,14 +235,14 @@ export class ARC {
|
|
|
176
235
|
}
|
|
177
236
|
Copy() {
|
|
178
237
|
const this$ = this;
|
|
179
|
-
const isaCopy =
|
|
238
|
+
const isaCopy = map_2((i) => i.Copy(), this$._isa);
|
|
180
239
|
const fsCopy = this$._fs.Copy();
|
|
181
240
|
return new ARC(unwrap(isaCopy), this$._cwl, fsCopy);
|
|
182
241
|
}
|
|
183
242
|
GetRegisteredPayload(IgnoreHidden) {
|
|
184
243
|
let tree, paths, array_3;
|
|
185
244
|
const this$ = this;
|
|
186
|
-
const registeredStudies = defaultArg(
|
|
245
|
+
const registeredStudies = defaultArg(map_2((isa) => isa.Studies.slice(), map_2((i) => i.Copy(), this$._isa)), []);
|
|
187
246
|
const registeredAssays = concat(map((s) => s.RegisteredAssays.slice(), registeredStudies));
|
|
188
247
|
const includeFiles = unionMany([ofSeq(["isa.investigation.xlsx", "README.md"], {
|
|
189
248
|
Compare: comparePrimitives,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { split as split_1 } from "../FileSystem/Path.js";
|
|
2
|
-
import { $007CInvestigationPath$007C_$007C } from "./Contracts.
|
|
2
|
+
import { $007CStudyPath$007C_$007C, $007CAssayPath$007C_$007C, $007CInvestigationPath$007C_$007C } from "./Contracts.ArcTypes.js";
|
|
3
3
|
import { Contract } from "../Contract/Contract.js";
|
|
4
|
-
import { $007CAssayPath$007C_$007C } from "./Contracts.ArcAssay.js";
|
|
5
|
-
import { $007CStudyPath$007C_$007C } from "./Contracts.ArcStudy.js";
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* Tries to create READ contract with DTOType = ISA_Assay, ISA_Study or ISA_Investigation from given path relative to ARC root.
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { combineMany } from "../FileSystem/Path.js";
|
|
2
|
+
import { equalsWith } from "../fable_modules/fable-library.4.5.0/Array.js";
|
|
3
|
+
import { defaultOf } from "../fable_modules/fable-library.4.5.0/Util.js";
|
|
4
|
+
import { Contract } from "../Contract/Contract.js";
|
|
5
|
+
import { fromFsWorkbook, toFsWorkbook } from "../ISA/ISA.Spreadsheet/ArcInvestigation.js";
|
|
6
|
+
import { Assay_fileNameFromIdentifier, Study_fileNameFromIdentifier } from "../ISA/ISA/Identifier.js";
|
|
7
|
+
import { ARCtrl_ISA_ArcStudy__ArcStudy_fromFsWorkbook_Static_32154C9D, ARCtrl_ISA_ArcStudy__ArcStudy_toFsWorkbook_Static_Z2A9662E9 } from "../ISA/ISA.Spreadsheet/ArcStudy.js";
|
|
8
|
+
import { getAssayFolderPath, getStudyFolderPath } from "../Path.js";
|
|
9
|
+
import { fromFsWorkbook as fromFsWorkbook_1, toFsWorkbook as toFsWorkbook_1 } from "../ISA/ISA.Spreadsheet/ArcAssay.js";
|
|
10
|
+
|
|
11
|
+
export function $007CStudyPath$007C_$007C(input) {
|
|
12
|
+
let matchResult;
|
|
13
|
+
if (!equalsWith((x, y) => (x === y), input, defaultOf()) && (input.length === 3)) {
|
|
14
|
+
if (input[0] === "studies") {
|
|
15
|
+
if (input[2] === "isa.study.xlsx") {
|
|
16
|
+
matchResult = 0;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
matchResult = 1;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
matchResult = 1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
matchResult = 1;
|
|
28
|
+
}
|
|
29
|
+
switch (matchResult) {
|
|
30
|
+
case 0: {
|
|
31
|
+
const anyStudyName = input[1];
|
|
32
|
+
return combineMany(input);
|
|
33
|
+
}
|
|
34
|
+
default:
|
|
35
|
+
return void 0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function $007CAssayPath$007C_$007C(input) {
|
|
40
|
+
let matchResult;
|
|
41
|
+
if (!equalsWith((x, y) => (x === y), input, defaultOf()) && (input.length === 3)) {
|
|
42
|
+
if (input[0] === "assays") {
|
|
43
|
+
if (input[2] === "isa.assay.xlsx") {
|
|
44
|
+
matchResult = 0;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
matchResult = 1;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
matchResult = 1;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
matchResult = 1;
|
|
56
|
+
}
|
|
57
|
+
switch (matchResult) {
|
|
58
|
+
case 0: {
|
|
59
|
+
const anyAssayName = input[1];
|
|
60
|
+
return combineMany(input);
|
|
61
|
+
}
|
|
62
|
+
default:
|
|
63
|
+
return void 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function $007CInvestigationPath$007C_$007C(input) {
|
|
68
|
+
let matchResult;
|
|
69
|
+
if (!equalsWith((x, y) => (x === y), input, defaultOf()) && (input.length === 1)) {
|
|
70
|
+
if (input[0] === "isa.investigation.xlsx") {
|
|
71
|
+
matchResult = 0;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
matchResult = 1;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
matchResult = 1;
|
|
79
|
+
}
|
|
80
|
+
switch (matchResult) {
|
|
81
|
+
case 0:
|
|
82
|
+
return combineMany(input);
|
|
83
|
+
default:
|
|
84
|
+
return void 0;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function ARCtrl_ISA_ArcInvestigation__ArcInvestigation_ToCreateContract(this$) {
|
|
89
|
+
return Contract.createCreate("isa.investigation.xlsx", "ISA_Investigation", toFsWorkbook(this$));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function ARCtrl_ISA_ArcInvestigation__ArcInvestigation_ToUpdateContract(this$) {
|
|
93
|
+
return Contract.createUpdate("isa.investigation.xlsx", "ISA_Investigation", toFsWorkbook(this$));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function ARCtrl_ISA_ArcInvestigation__ArcInvestigation_toCreateContract_Static_Z4D87C88C(inv) {
|
|
97
|
+
return ARCtrl_ISA_ArcInvestigation__ArcInvestigation_ToCreateContract(inv);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function ARCtrl_ISA_ArcInvestigation__ArcInvestigation_toUpdateContract_Static_Z4D87C88C(inv) {
|
|
101
|
+
return ARCtrl_ISA_ArcInvestigation__ArcInvestigation_ToUpdateContract(inv);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function ARCtrl_ISA_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F(c) {
|
|
105
|
+
let matchResult, fsworkbook;
|
|
106
|
+
if (c.Operation === "READ") {
|
|
107
|
+
if (c.DTOType != null) {
|
|
108
|
+
if (c.DTOType === "ISA_Investigation") {
|
|
109
|
+
if (c.DTO != null) {
|
|
110
|
+
matchResult = 0;
|
|
111
|
+
fsworkbook = c.DTO;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
matchResult = 1;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
matchResult = 1;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
matchResult = 1;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
matchResult = 1;
|
|
127
|
+
}
|
|
128
|
+
switch (matchResult) {
|
|
129
|
+
case 0:
|
|
130
|
+
return fromFsWorkbook(fsworkbook);
|
|
131
|
+
default:
|
|
132
|
+
return void 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function ARCtrl_ISA_ArcStudy__ArcStudy_ToCreateContract(this$) {
|
|
137
|
+
const path = Study_fileNameFromIdentifier(this$.Identifier);
|
|
138
|
+
return Contract.createCreate(path, "ISA_Study", ARCtrl_ISA_ArcStudy__ArcStudy_toFsWorkbook_Static_Z2A9662E9(this$));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function ARCtrl_ISA_ArcStudy__ArcStudy_ToUpdateContract(this$) {
|
|
142
|
+
const path = Study_fileNameFromIdentifier(this$.Identifier);
|
|
143
|
+
return Contract.createUpdate(path, "ISA_Study", ARCtrl_ISA_ArcStudy__ArcStudy_toFsWorkbook_Static_Z2A9662E9(this$));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function ARCtrl_ISA_ArcStudy__ArcStudy_ToDeleteContract(this$) {
|
|
147
|
+
const path = getStudyFolderPath(this$.Identifier);
|
|
148
|
+
return Contract.createDelete(path);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export function ARCtrl_ISA_ArcStudy__ArcStudy_toDeleteContract_Static_1B3D5E9B(study) {
|
|
152
|
+
return ARCtrl_ISA_ArcStudy__ArcStudy_ToDeleteContract(study);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function ARCtrl_ISA_ArcStudy__ArcStudy_toCreateContract_Static_1B3D5E9B(study) {
|
|
156
|
+
return ARCtrl_ISA_ArcStudy__ArcStudy_ToCreateContract(study);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function ARCtrl_ISA_ArcStudy__ArcStudy_toUpdateContract_Static_1B3D5E9B(study) {
|
|
160
|
+
return ARCtrl_ISA_ArcStudy__ArcStudy_ToUpdateContract(study);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function ARCtrl_ISA_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F(c) {
|
|
164
|
+
let matchResult, fsworkbook;
|
|
165
|
+
if (c.Operation === "READ") {
|
|
166
|
+
if (c.DTOType != null) {
|
|
167
|
+
if (c.DTOType === "ISA_Study") {
|
|
168
|
+
if (c.DTO != null) {
|
|
169
|
+
matchResult = 0;
|
|
170
|
+
fsworkbook = c.DTO;
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
matchResult = 1;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
matchResult = 1;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
matchResult = 1;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
matchResult = 1;
|
|
186
|
+
}
|
|
187
|
+
switch (matchResult) {
|
|
188
|
+
case 0:
|
|
189
|
+
return ARCtrl_ISA_ArcStudy__ArcStudy_fromFsWorkbook_Static_32154C9D(fsworkbook);
|
|
190
|
+
default:
|
|
191
|
+
return void 0;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export function ARCtrl_ISA_ArcAssay__ArcAssay_ToCreateContract(this$) {
|
|
196
|
+
const path = Assay_fileNameFromIdentifier(this$.Identifier);
|
|
197
|
+
return Contract.createCreate(path, "ISA_Assay", toFsWorkbook_1(this$));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export function ARCtrl_ISA_ArcAssay__ArcAssay_ToUpdateContract(this$) {
|
|
201
|
+
const path = Assay_fileNameFromIdentifier(this$.Identifier);
|
|
202
|
+
return Contract.createUpdate(path, "ISA_Assay", toFsWorkbook_1(this$));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export function ARCtrl_ISA_ArcAssay__ArcAssay_ToDeleteContract(this$) {
|
|
206
|
+
const path = getAssayFolderPath(this$.Identifier);
|
|
207
|
+
return Contract.createDelete(path);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function ARCtrl_ISA_ArcAssay__ArcAssay_toDeleteContract_Static_1C75D08D(assay) {
|
|
211
|
+
return ARCtrl_ISA_ArcAssay__ArcAssay_ToDeleteContract(assay);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export function ARCtrl_ISA_ArcAssay__ArcAssay_toCreateContract_Static_1C75D08D(assay) {
|
|
215
|
+
return ARCtrl_ISA_ArcAssay__ArcAssay_ToCreateContract(assay);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export function ARCtrl_ISA_ArcAssay__ArcAssay_toUpdateContract_Static_1C75D08D(assay) {
|
|
219
|
+
return ARCtrl_ISA_ArcAssay__ArcAssay_ToUpdateContract(assay);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export function ARCtrl_ISA_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F(c) {
|
|
223
|
+
let matchResult, fsworkbook;
|
|
224
|
+
if (c.Operation === "READ") {
|
|
225
|
+
if (c.DTOType != null) {
|
|
226
|
+
if (c.DTOType === "ISA_Assay") {
|
|
227
|
+
if (c.DTO != null) {
|
|
228
|
+
matchResult = 0;
|
|
229
|
+
fsworkbook = c.DTO;
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
matchResult = 1;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
matchResult = 1;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
matchResult = 1;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
matchResult = 1;
|
|
245
|
+
}
|
|
246
|
+
switch (matchResult) {
|
|
247
|
+
case 0:
|
|
248
|
+
return fromFsWorkbook_1(fsworkbook);
|
|
249
|
+
default:
|
|
250
|
+
return void 0;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|