@nfdi4plants/arctrl 2.3.1 → 2.5.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.
Files changed (90) hide show
  1. package/ARC.js +103 -12
  2. package/CWL/CWLTypes.js +2 -2
  3. package/CWL/Decode.js +2 -2
  4. package/CWL/Inputs.js +2 -2
  5. package/CWL/Outputs.js +2 -2
  6. package/CWL/Requirements.js +2 -2
  7. package/CWL/ToolDescription.js +1 -1
  8. package/CWL/WorkflowDescription.js +1 -1
  9. package/CWL/WorkflowSteps.js +1 -1
  10. package/ColumnIndex.js +258 -0
  11. package/Conversion.js +1679 -0
  12. package/Core/Data.js +28 -3
  13. package/Core/DataFile.js +19 -3
  14. package/Core/Helper/Collections.js +107 -4
  15. package/Core/Helper/DateTime.js +17 -0
  16. package/Core/Helper/ORCID.js +39 -0
  17. package/Core/Table/ArcTable.js +6 -0
  18. package/Core/Table/CompositeHeader.js +4 -0
  19. package/Json/Assay.js +1 -1
  20. package/Json/Decode.js +3 -3
  21. package/Json/Encode.js +9 -0
  22. package/Json/Investigation.js +5 -4
  23. package/Json/OntologySourceReference.js +4 -4
  24. package/Json/ROCrate/LDContext.js +121 -0
  25. package/Json/ROCrate/LDGraph.js +87 -0
  26. package/Json/{LDObject.js → ROCrate/LDNode.js} +55 -46
  27. package/Json/ROCrate/LDRef.js +25 -0
  28. package/Json/ROCrate/LDValue.js +66 -0
  29. package/Json/Study.js +5 -4
  30. package/Json/context/rocrate/isa_investigation_context.js +2 -2
  31. package/Json/context/rocrate/isa_study_context.js +15 -11
  32. package/Json/context/rocrate/rocrate_context.js +1 -1
  33. package/JsonIO/LDObject.js +30 -5
  34. package/README.md +12 -3
  35. package/ROCrate/ArcROCrateMetadata.js +14 -13
  36. package/ROCrate/Generic/Comment.js +115 -0
  37. package/ROCrate/Generic/Dataset.js +669 -0
  38. package/ROCrate/Generic/DefinedTerm.js +115 -0
  39. package/ROCrate/Generic/File.js +200 -0
  40. package/ROCrate/Generic/LabProcess.js +238 -0
  41. package/ROCrate/Generic/LabProtocol.js +275 -0
  42. package/ROCrate/Generic/Organization.js +71 -0
  43. package/ROCrate/Generic/Person.js +411 -0
  44. package/ROCrate/Generic/PostalAddress.js +159 -0
  45. package/ROCrate/Generic/PropertyValue.js +548 -0
  46. package/ROCrate/Generic/Sample.js +139 -0
  47. package/ROCrate/Generic/ScholarlyArticle.js +187 -0
  48. package/ROCrate/Helper.js +6 -0
  49. package/ROCrate/ISAProfile/Assay.js +3 -3
  50. package/ROCrate/ISAProfile/Data.js +7 -7
  51. package/ROCrate/ISAProfile/Dataset.js +7 -6
  52. package/ROCrate/ISAProfile/Investigation.js +3 -3
  53. package/ROCrate/ISAProfile/LabProcess.js +7 -7
  54. package/ROCrate/ISAProfile/LabProtocol.js +7 -7
  55. package/ROCrate/ISAProfile/Person.js +7 -7
  56. package/ROCrate/ISAProfile/PropertyValue.js +7 -7
  57. package/ROCrate/ISAProfile/Sample.js +7 -7
  58. package/ROCrate/ISAProfile/ScholarlyArticle.js +7 -7
  59. package/ROCrate/ISAProfile/Study.js +3 -3
  60. package/ROCrate/LDContext.js +283 -0
  61. package/ROCrate/LDObject.js +902 -36
  62. package/ROCrate/ROCrateContext.js +44 -0
  63. package/ROCrateIO.js +62 -0
  64. package/Spreadsheet/DataMap.js +11 -3
  65. package/Spreadsheet/DataMapTable/DataMapHeader.js +3 -2
  66. package/Xlsx.js +21 -8
  67. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/DynObj.fs +31 -1
  68. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/DynObj.fs.js +30 -1
  69. package/fable_modules/DynamicObj.7.0.1/DynamicObj.fs +1025 -0
  70. package/fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js +433 -0
  71. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/FableJS.fs +16 -0
  72. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/FablePy.fs +14 -0
  73. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/HashCodes.fs +15 -0
  74. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/HashCodes.fs.js +4 -0
  75. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/obj/Debug/netstandard2.0/DynamicObj.AssemblyInfo.fs +1 -1
  76. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/obj/Release/netstandard2.0/DynamicObj.AssemblyInfo.fs +3 -3
  77. package/fable_modules/project_cracked.json +1 -1
  78. package/package.json +1 -1
  79. package/Json/ARC.js +0 -31
  80. package/JsonIO/ARC.js +0 -31
  81. package/fable_modules/DynamicObj.4.0.3/DynamicObj.fs +0 -310
  82. package/fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js +0 -166
  83. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/DynamicObj.fableproj +0 -0
  84. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/FableJS.fs.js +0 -0
  85. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/PropertyHelper.fs +0 -0
  86. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/PropertyHelper.fs.js +0 -0
  87. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/ReflectionUtils.fs +0 -0
  88. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/ReflectionUtils.fs.js +0 -0
  89. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  90. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
@@ -0,0 +1,669 @@
1
+ import { value as value_1, unwrap } from "../../fable_modules/fable-library-js.4.24.0/Option.js";
2
+ import { LDPerson } from "./Person.js";
3
+ import { LDFile } from "./File.js";
4
+ import { LDScholarlyArticle } from "./ScholarlyArticle.js";
5
+ import { LDComment } from "./Comment.js";
6
+ import { LDLabProcess } from "./LabProcess.js";
7
+ import { LDDefinedTerm } from "./DefinedTerm.js";
8
+ import { LDPropertyValue } from "./PropertyValue.js";
9
+ import { ResizeArray_tryPick } from "../../Core/Helper/Collections.js";
10
+ import { contains } from "../../fable_modules/fable-library-js.4.24.0/Array.js";
11
+ import { stringHash } from "../../fable_modules/fable-library-js.4.24.0/Util.js";
12
+ import { LDNode } from "../LDObject.js";
13
+ import { class_type } from "../../fable_modules/fable-library-js.4.24.0/Reflection.js";
14
+
15
+ export class LDDataset {
16
+ constructor() {
17
+ }
18
+ static get schemaType() {
19
+ return "http://schema.org/Dataset";
20
+ }
21
+ static get identifier() {
22
+ return "http://schema.org/identifier";
23
+ }
24
+ static get creator() {
25
+ return "http://schema.org/creator";
26
+ }
27
+ static get dateCreated() {
28
+ return "http://schema.org/dateCreated";
29
+ }
30
+ static get datePublished() {
31
+ return "http://schema.org/datePublished";
32
+ }
33
+ static get sdDatePublished() {
34
+ return "http://schema.org/datePublished";
35
+ }
36
+ static get license() {
37
+ return "http://schema.org/license";
38
+ }
39
+ static get dateModified() {
40
+ return "http://schema.org/dateModified";
41
+ }
42
+ static get description() {
43
+ return "http://schema.org/description";
44
+ }
45
+ static get hasPart() {
46
+ return "http://schema.org/hasPart";
47
+ }
48
+ static get headline() {
49
+ return "http://schema.org/headline";
50
+ }
51
+ static get name() {
52
+ return "http://schema.org/name";
53
+ }
54
+ static get citation() {
55
+ return "http://schema.org/citation";
56
+ }
57
+ static get comment() {
58
+ return "http://schema.org/comment";
59
+ }
60
+ static get mentions() {
61
+ return "http://schema.org/mentions";
62
+ }
63
+ static get url() {
64
+ return "http://schema.org/url";
65
+ }
66
+ static get about() {
67
+ return "http://schema.org/about";
68
+ }
69
+ static get measurementMethod() {
70
+ return "http://schema.org/measurementMethod";
71
+ }
72
+ static get measurementTechnique() {
73
+ return "http://schema.org/measurementTechnique";
74
+ }
75
+ static get variableMeasured() {
76
+ return "http://schema.org/variableMeasured";
77
+ }
78
+ static tryGetIdentifierAsString(lp, context) {
79
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.identifier, unwrap(context));
80
+ let matchResult, n;
81
+ if (matchValue != null) {
82
+ if (typeof value_1(matchValue) === "string") {
83
+ matchResult = 0;
84
+ n = value_1(matchValue);
85
+ }
86
+ else {
87
+ matchResult = 1;
88
+ }
89
+ }
90
+ else {
91
+ matchResult = 1;
92
+ }
93
+ switch (matchResult) {
94
+ case 0:
95
+ return n;
96
+ default:
97
+ return undefined;
98
+ }
99
+ }
100
+ static getIdentifierAsString(lp, context) {
101
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.identifier, unwrap(context));
102
+ if (matchValue != null) {
103
+ if (typeof value_1(matchValue) === "string") {
104
+ const n = value_1(matchValue);
105
+ return n;
106
+ }
107
+ else {
108
+ throw new Error(`property \`identifier\` of object with @id \`${lp.Id}\` was not a string`);
109
+ }
110
+ }
111
+ else {
112
+ throw new Error(`Could not access property \`identifier\` of object with @id \`${lp.Id}\``);
113
+ }
114
+ }
115
+ static setIdentifierAsString(lp, identifier, context) {
116
+ return lp.SetProperty(LDDataset.identifier, identifier, unwrap(context));
117
+ }
118
+ static getCreators(lp, graph, context) {
119
+ return lp.GetPropertyNodes(LDDataset.creator, (p, ctx) => LDPerson.validate(p, unwrap(ctx)), unwrap(graph), unwrap(context));
120
+ }
121
+ static setCreators(lp, creators, context) {
122
+ return lp.SetProperty(LDDataset.creator, creators, unwrap(context));
123
+ }
124
+ static tryGetDateCreatedAsDateTime(lp, context) {
125
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.dateCreated, unwrap(context));
126
+ let matchResult, n;
127
+ if (matchValue != null) {
128
+ if (value_1(matchValue) instanceof Date) {
129
+ matchResult = 0;
130
+ n = value_1(matchValue);
131
+ }
132
+ else {
133
+ matchResult = 1;
134
+ }
135
+ }
136
+ else {
137
+ matchResult = 1;
138
+ }
139
+ switch (matchResult) {
140
+ case 0:
141
+ return n;
142
+ default:
143
+ return undefined;
144
+ }
145
+ }
146
+ static setDateCreatedAsDateTime(lp, dateCreated, context) {
147
+ return lp.SetProperty(LDDataset.dateCreated, dateCreated, unwrap(context));
148
+ }
149
+ static tryGetDatePublishedAsDateTime(lp, context) {
150
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.datePublished, unwrap(context));
151
+ let matchResult, n;
152
+ if (matchValue != null) {
153
+ if (value_1(matchValue) instanceof Date) {
154
+ matchResult = 0;
155
+ n = value_1(matchValue);
156
+ }
157
+ else {
158
+ matchResult = 1;
159
+ }
160
+ }
161
+ else {
162
+ matchResult = 1;
163
+ }
164
+ switch (matchResult) {
165
+ case 0:
166
+ return n;
167
+ default:
168
+ return undefined;
169
+ }
170
+ }
171
+ static setDatePublishedAsDateTime(lp, datePublished, context) {
172
+ return lp.SetProperty(LDDataset.datePublished, datePublished, unwrap(context));
173
+ }
174
+ static tryGetSDDatePublishedAsDateTime(lp, context) {
175
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.sdDatePublished, unwrap(context));
176
+ let matchResult, n;
177
+ if (matchValue != null) {
178
+ if (value_1(matchValue) instanceof Date) {
179
+ matchResult = 0;
180
+ n = value_1(matchValue);
181
+ }
182
+ else {
183
+ matchResult = 1;
184
+ }
185
+ }
186
+ else {
187
+ matchResult = 1;
188
+ }
189
+ switch (matchResult) {
190
+ case 0:
191
+ return n;
192
+ default:
193
+ return undefined;
194
+ }
195
+ }
196
+ static setSDDatePublishedAsDateTime(lp, sdDatePublished, context) {
197
+ return lp.SetProperty(LDDataset.sdDatePublished, sdDatePublished, unwrap(context));
198
+ }
199
+ static tryGetLicenseAsString(lp, context) {
200
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.license, unwrap(context));
201
+ let matchResult, n;
202
+ if (matchValue != null) {
203
+ if (typeof value_1(matchValue) === "string") {
204
+ matchResult = 0;
205
+ n = value_1(matchValue);
206
+ }
207
+ else {
208
+ matchResult = 1;
209
+ }
210
+ }
211
+ else {
212
+ matchResult = 1;
213
+ }
214
+ switch (matchResult) {
215
+ case 0:
216
+ return n;
217
+ default:
218
+ return undefined;
219
+ }
220
+ }
221
+ static setLicenseAsString(lp, license, context) {
222
+ return lp.SetProperty(LDDataset.license, license, unwrap(context));
223
+ }
224
+ static setLicenseAsCreativeWork(lp, license, context) {
225
+ return lp.SetProperty(LDDataset.license, license, unwrap(context));
226
+ }
227
+ static tryGetDateModifiedAsDateTime(lp, context) {
228
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.dateModified, unwrap(context));
229
+ let matchResult, n;
230
+ if (matchValue != null) {
231
+ if (value_1(matchValue) instanceof Date) {
232
+ matchResult = 0;
233
+ n = value_1(matchValue);
234
+ }
235
+ else {
236
+ matchResult = 1;
237
+ }
238
+ }
239
+ else {
240
+ matchResult = 1;
241
+ }
242
+ switch (matchResult) {
243
+ case 0:
244
+ return n;
245
+ default:
246
+ return undefined;
247
+ }
248
+ }
249
+ static setDateModifiedAsDateTime(lp, dateModified, context) {
250
+ return lp.SetProperty(LDDataset.dateModified, dateModified, unwrap(context));
251
+ }
252
+ static tryGetDescriptionAsString(lp, context) {
253
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.description, unwrap(context));
254
+ let matchResult, n;
255
+ if (matchValue != null) {
256
+ if (typeof value_1(matchValue) === "string") {
257
+ matchResult = 0;
258
+ n = value_1(matchValue);
259
+ }
260
+ else {
261
+ matchResult = 1;
262
+ }
263
+ }
264
+ else {
265
+ matchResult = 1;
266
+ }
267
+ switch (matchResult) {
268
+ case 0:
269
+ return n;
270
+ default:
271
+ return undefined;
272
+ }
273
+ }
274
+ static getDescriptionAsString(lp, context) {
275
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.description, unwrap(context));
276
+ if (matchValue != null) {
277
+ if (typeof value_1(matchValue) === "string") {
278
+ const n = value_1(matchValue);
279
+ return n;
280
+ }
281
+ else {
282
+ throw new Error(`property \`description\` of object with @id \`${lp.Id}\` was not a string`);
283
+ }
284
+ }
285
+ else {
286
+ throw new Error(`Could not access property \`description\` of object with @id \`${lp.Id}\``);
287
+ }
288
+ }
289
+ static setDescriptionAsString(lp, description, context) {
290
+ return lp.SetProperty(LDDataset.description, description, unwrap(context));
291
+ }
292
+ static getHasParts(lp, graph, context) {
293
+ return lp.GetPropertyNodes(LDDataset.hasPart, undefined, unwrap(graph), unwrap(context));
294
+ }
295
+ static getHasPartsAsDataset(lp, graph, context) {
296
+ return lp.GetPropertyNodes(LDDataset.hasPart, (ldnode, context_1) => LDDataset.validate(ldnode, unwrap(context_1)), unwrap(graph), unwrap(context));
297
+ }
298
+ static getHasPartsAsFile(lp, graph, context) {
299
+ return lp.GetPropertyNodes(LDDataset.hasPart, (ldnode, context_1) => LDFile.validate(ldnode, unwrap(context_1)), unwrap(graph), unwrap(context));
300
+ }
301
+ static setHasParts(lp, hasParts, context) {
302
+ return lp.SetProperty(LDDataset.hasPart, hasParts, unwrap(context));
303
+ }
304
+ static tryGetHeadlineAsString(lp, context) {
305
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.headline, unwrap(context));
306
+ let matchResult, n;
307
+ if (matchValue != null) {
308
+ if (typeof value_1(matchValue) === "string") {
309
+ matchResult = 0;
310
+ n = value_1(matchValue);
311
+ }
312
+ else {
313
+ matchResult = 1;
314
+ }
315
+ }
316
+ else {
317
+ matchResult = 1;
318
+ }
319
+ switch (matchResult) {
320
+ case 0:
321
+ return n;
322
+ default:
323
+ return undefined;
324
+ }
325
+ }
326
+ static tryGetNameAsString(lp, context) {
327
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.name, unwrap(context));
328
+ let matchResult, n;
329
+ if (matchValue != null) {
330
+ if (typeof value_1(matchValue) === "string") {
331
+ matchResult = 0;
332
+ n = value_1(matchValue);
333
+ }
334
+ else {
335
+ matchResult = 1;
336
+ }
337
+ }
338
+ else {
339
+ matchResult = 1;
340
+ }
341
+ switch (matchResult) {
342
+ case 0:
343
+ return n;
344
+ default:
345
+ return undefined;
346
+ }
347
+ }
348
+ static getNameAsString(lp, context) {
349
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.name, unwrap(context));
350
+ if (matchValue != null) {
351
+ if (typeof value_1(matchValue) === "string") {
352
+ const n = value_1(matchValue);
353
+ return n;
354
+ }
355
+ else {
356
+ throw new Error(`property \`name\` of object with @id \`${lp.Id}\` was not a string`);
357
+ }
358
+ }
359
+ else {
360
+ throw new Error(`Could not access property \`name\` of object with @id \`${lp.Id}\``);
361
+ }
362
+ }
363
+ static setNameAsString(lp, name, context) {
364
+ return lp.SetProperty(LDDataset.name, name, unwrap(context));
365
+ }
366
+ static getCitations(lp, graph, context) {
367
+ return lp.GetPropertyNodes(LDDataset.citation, (ldnode, context_1) => LDScholarlyArticle.validate(ldnode, unwrap(context_1)), unwrap(graph), unwrap(context));
368
+ }
369
+ static setCitations(lp, citations, context) {
370
+ return lp.SetProperty(LDDataset.citation, citations, unwrap(context));
371
+ }
372
+ static getComments(lp, graph, context) {
373
+ return lp.GetPropertyNodes(LDDataset.comment, (ldnode, context_1) => LDComment.validate(ldnode, unwrap(context_1)), unwrap(graph), unwrap(context));
374
+ }
375
+ static setComments(lp, comments, context) {
376
+ return lp.SetProperty(LDDataset.comment, comments, unwrap(context));
377
+ }
378
+ static tryGetUrlAsString(lp, context) {
379
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.url, unwrap(context));
380
+ let matchResult, n;
381
+ if (matchValue != null) {
382
+ if (typeof value_1(matchValue) === "string") {
383
+ matchResult = 0;
384
+ n = value_1(matchValue);
385
+ }
386
+ else {
387
+ matchResult = 1;
388
+ }
389
+ }
390
+ else {
391
+ matchResult = 1;
392
+ }
393
+ switch (matchResult) {
394
+ case 0:
395
+ return n;
396
+ default:
397
+ return undefined;
398
+ }
399
+ }
400
+ static getUrlAsString(lp, context) {
401
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.url, unwrap(context));
402
+ if (matchValue != null) {
403
+ if (typeof value_1(matchValue) === "string") {
404
+ const n = value_1(matchValue);
405
+ return n;
406
+ }
407
+ else {
408
+ throw new Error(`property \`url\` of object with @id \`${lp.Id}\` was not a string`);
409
+ }
410
+ }
411
+ else {
412
+ throw new Error(`Could not access property \`url\` of object with @id \`${lp.Id}\``);
413
+ }
414
+ }
415
+ static setUrlAsString(lp, url, context) {
416
+ return lp.SetProperty(LDDataset.url, url, unwrap(context));
417
+ }
418
+ static getAbouts(lp, graph, context) {
419
+ return lp.GetPropertyNodes(LDDataset.about, undefined, unwrap(graph), unwrap(context));
420
+ }
421
+ static getAboutsAsLabProcess(lp, graph, context) {
422
+ return lp.GetPropertyNodes(LDDataset.about, (ldnode, context_1) => LDLabProcess.validate(ldnode, unwrap(context_1)), unwrap(graph), unwrap(context));
423
+ }
424
+ static setAbouts(lp, abouts, context) {
425
+ return lp.SetProperty(LDDataset.about, abouts, unwrap(context));
426
+ }
427
+ static tryGetMeasurementMethodAsString(lp, context) {
428
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.measurementMethod, unwrap(context));
429
+ let matchResult, n;
430
+ if (matchValue != null) {
431
+ if (typeof value_1(matchValue) === "string") {
432
+ matchResult = 0;
433
+ n = value_1(matchValue);
434
+ }
435
+ else {
436
+ matchResult = 1;
437
+ }
438
+ }
439
+ else {
440
+ matchResult = 1;
441
+ }
442
+ switch (matchResult) {
443
+ case 0:
444
+ return n;
445
+ default:
446
+ return undefined;
447
+ }
448
+ }
449
+ static tryGetMeasurementMethodAsDefinedTerm(lp, graph, context) {
450
+ let n;
451
+ const matchValue = lp.TryGetPropertyAsSingleNode(LDDataset.measurementMethod, unwrap(graph), unwrap(context));
452
+ let matchResult, n_1;
453
+ if (matchValue != null) {
454
+ if ((n = matchValue, LDDefinedTerm.validate(n, unwrap(context)))) {
455
+ matchResult = 0;
456
+ n_1 = matchValue;
457
+ }
458
+ else {
459
+ matchResult = 1;
460
+ }
461
+ }
462
+ else {
463
+ matchResult = 1;
464
+ }
465
+ switch (matchResult) {
466
+ case 0:
467
+ return n_1;
468
+ default:
469
+ return undefined;
470
+ }
471
+ }
472
+ static setMeasurementMethodAsString(lp, measurementMethod, context) {
473
+ return lp.SetProperty(LDDataset.measurementMethod, measurementMethod, unwrap(context));
474
+ }
475
+ static setMeasurementMethodAsDefinedTerm(lp, measurementMethod, context) {
476
+ return lp.SetProperty(LDDataset.measurementMethod, measurementMethod, unwrap(context));
477
+ }
478
+ static tryGetMeasurementTechniqueAsString(lp, context) {
479
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.measurementTechnique, unwrap(context));
480
+ let matchResult, n;
481
+ if (matchValue != null) {
482
+ if (typeof value_1(matchValue) === "string") {
483
+ matchResult = 0;
484
+ n = value_1(matchValue);
485
+ }
486
+ else {
487
+ matchResult = 1;
488
+ }
489
+ }
490
+ else {
491
+ matchResult = 1;
492
+ }
493
+ switch (matchResult) {
494
+ case 0:
495
+ return n;
496
+ default:
497
+ return undefined;
498
+ }
499
+ }
500
+ static tryGetMeasurementTechniqueAsDefinedTerm(lp, graph, context) {
501
+ let n;
502
+ const matchValue = lp.TryGetPropertyAsSingleNode(LDDataset.measurementTechnique, unwrap(graph), unwrap(context));
503
+ let matchResult, n_1;
504
+ if (matchValue != null) {
505
+ if ((n = matchValue, LDDefinedTerm.validate(n, unwrap(context)))) {
506
+ matchResult = 0;
507
+ n_1 = matchValue;
508
+ }
509
+ else {
510
+ matchResult = 1;
511
+ }
512
+ }
513
+ else {
514
+ matchResult = 1;
515
+ }
516
+ switch (matchResult) {
517
+ case 0:
518
+ return n_1;
519
+ default:
520
+ return undefined;
521
+ }
522
+ }
523
+ static setMeasurementTechniqueAsString(lp, measurementTechnique, context) {
524
+ return lp.SetProperty(LDDataset.measurementTechnique, measurementTechnique, unwrap(context));
525
+ }
526
+ static setMeasurementTechniqueAsDefinedTerm(lp, measurementTechnique, context) {
527
+ return lp.SetProperty(LDDataset.measurementTechnique, measurementTechnique, unwrap(context));
528
+ }
529
+ static tryGetVariableMeasuredAsString(lp, context) {
530
+ const matchValue = lp.TryGetPropertyAsSingleton(LDDataset.variableMeasured, unwrap(context));
531
+ let matchResult, n;
532
+ if (matchValue != null) {
533
+ if (typeof value_1(matchValue) === "string") {
534
+ matchResult = 0;
535
+ n = value_1(matchValue);
536
+ }
537
+ else {
538
+ matchResult = 1;
539
+ }
540
+ }
541
+ else {
542
+ matchResult = 1;
543
+ }
544
+ switch (matchResult) {
545
+ case 0:
546
+ return n;
547
+ default:
548
+ return undefined;
549
+ }
550
+ }
551
+ static tryGetVariableMeasuredAsPropertyValue(lp, graph, context) {
552
+ let n;
553
+ const matchValue = lp.TryGetPropertyAsSingleNode(LDDataset.variableMeasured, unwrap(graph), unwrap(context));
554
+ let matchResult, n_1;
555
+ if (matchValue != null) {
556
+ if ((n = matchValue, LDPropertyValue.validate(n, unwrap(context)))) {
557
+ matchResult = 0;
558
+ n_1 = matchValue;
559
+ }
560
+ else {
561
+ matchResult = 1;
562
+ }
563
+ }
564
+ else {
565
+ matchResult = 1;
566
+ }
567
+ switch (matchResult) {
568
+ case 0:
569
+ return n_1;
570
+ default:
571
+ return undefined;
572
+ }
573
+ }
574
+ static tryGetVariableMeasuredAsMeasurementType(lp, graph, context) {
575
+ return ResizeArray_tryPick((n) => {
576
+ if (!LDPropertyValue.validateFragmentDescriptor(n, unwrap(context))) {
577
+ return n;
578
+ }
579
+ else {
580
+ return undefined;
581
+ }
582
+ }, lp.GetPropertyNodes(LDDataset.variableMeasured, undefined, unwrap(graph), unwrap(context)));
583
+ }
584
+ static getVariableMeasuredAsFragmentDescriptors(lp, graph, context) {
585
+ return lp.GetPropertyNodes(LDDataset.variableMeasured, (ldnode, context_1) => LDPropertyValue.validateFragmentDescriptor(ldnode, unwrap(context_1)), unwrap(graph), unwrap(context));
586
+ }
587
+ static setVariableMeasuredAsString(lp, variableMeasured, context) {
588
+ return lp.SetProperty(LDDataset.variableMeasured, variableMeasured, unwrap(context));
589
+ }
590
+ static setVariableMeasuredAsPropertyValue(lp, variableMeasured, context) {
591
+ return lp.SetProperty(LDDataset.variableMeasured, variableMeasured, unwrap(context));
592
+ }
593
+ static setVariableMeasuredAsPropertyValues(lp, variableMeasured, context) {
594
+ return lp.SetProperty(LDDataset.variableMeasured, variableMeasured, unwrap(context));
595
+ }
596
+ static genIDInvesigation() {
597
+ return "./";
598
+ }
599
+ static genIDStudy(identifier) {
600
+ return `studies/${identifier}/`;
601
+ }
602
+ static genIDAssay(identifier) {
603
+ return `assay/${identifier}/`;
604
+ }
605
+ static validate(lp, context) {
606
+ return lp.HasType(LDDataset.schemaType, unwrap(context));
607
+ }
608
+ static validateInvestigation(lp, context) {
609
+ return LDDataset.validate(lp, unwrap(context)) && contains("Investigation", lp.AdditionalType, {
610
+ Equals: (x, y) => (x === y),
611
+ GetHashCode: stringHash,
612
+ });
613
+ }
614
+ static validateStudy(lp, context) {
615
+ return LDDataset.validate(lp, unwrap(context)) && contains("Study", lp.AdditionalType, {
616
+ Equals: (x, y) => (x === y),
617
+ GetHashCode: stringHash,
618
+ });
619
+ }
620
+ static validateAssay(lp, context) {
621
+ return LDDataset.validate(lp, unwrap(context)) && contains("Assay", lp.AdditionalType, {
622
+ Equals: (x, y) => (x === y),
623
+ GetHashCode: stringHash,
624
+ });
625
+ }
626
+ static create(id, identier, creators, dateCreated, datePublished, dateModified, description, hasParts, name, citations, comments, mentions, url, abouts, measurementMethod, measurementTechnique, variableMeasureds, context) {
627
+ const s = new LDNode(id, [LDDataset.schemaType], undefined, unwrap(context));
628
+ s.SetOptionalProperty(LDDataset.identifier, identier, unwrap(context));
629
+ s.SetOptionalProperty(LDDataset.creator, creators, unwrap(context));
630
+ s.SetOptionalProperty(LDDataset.dateCreated, dateCreated, unwrap(context));
631
+ s.SetOptionalProperty(LDDataset.datePublished, datePublished, unwrap(context));
632
+ s.SetOptionalProperty(LDDataset.dateModified, dateModified, unwrap(context));
633
+ s.SetOptionalProperty(LDDataset.description, description, unwrap(context));
634
+ s.SetOptionalProperty(LDDataset.hasPart, hasParts, unwrap(context));
635
+ s.SetOptionalProperty(LDDataset.name, name, unwrap(context));
636
+ s.SetOptionalProperty(LDDataset.citation, citations, unwrap(context));
637
+ s.SetOptionalProperty(LDDataset.comment, comments, unwrap(context));
638
+ s.SetOptionalProperty(LDDataset.mentions, mentions, unwrap(context));
639
+ s.SetOptionalProperty(LDDataset.url, url, unwrap(context));
640
+ s.SetOptionalProperty(LDDataset.about, abouts, unwrap(context));
641
+ s.SetOptionalProperty(LDDataset.measurementMethod, measurementMethod, unwrap(context));
642
+ s.SetOptionalProperty(LDDataset.measurementTechnique, measurementTechnique, unwrap(context));
643
+ s.SetOptionalProperty(LDDataset.variableMeasured, variableMeasureds, unwrap(context));
644
+ return s;
645
+ }
646
+ static createInvestigation(identifier, name, id, creators, dateCreated, datePublished, dateModified, description, hasParts, citations, comments, mentions, url, context) {
647
+ const id_1 = (id == null) ? LDDataset.genIDInvesigation() : id;
648
+ const s = LDDataset.create(id_1, identifier, unwrap(creators), unwrap(dateCreated), unwrap(datePublished), unwrap(dateModified), unwrap(description), unwrap(hasParts), name, unwrap(citations), unwrap(comments), unwrap(mentions), unwrap(url), undefined, undefined, undefined, undefined, unwrap(context));
649
+ s.AdditionalType = ["Investigation"];
650
+ return s;
651
+ }
652
+ static createStudy(identifier, id, creators, dateCreated, datePublished, dateModified, description, hasParts, name, citations, variableMeasureds, comments, url, abouts, context) {
653
+ const id_1 = (id == null) ? LDDataset.genIDStudy(identifier) : id;
654
+ const s = LDDataset.create(id_1, identifier, unwrap(creators), unwrap(dateCreated), unwrap(datePublished), unwrap(dateModified), unwrap(description), unwrap(hasParts), unwrap(name), unwrap(citations), unwrap(comments), undefined, unwrap(url), unwrap(abouts), undefined, undefined, unwrap(variableMeasureds), unwrap(context));
655
+ s.AdditionalType = ["Study"];
656
+ return s;
657
+ }
658
+ static createAssay(identifier, id, description, creators, hasParts, measurementMethod, measurementTechnique, variableMeasureds, abouts, comments, context) {
659
+ const id_1 = (id == null) ? LDDataset.genIDAssay(identifier) : id;
660
+ const s = LDDataset.create(id_1, identifier, unwrap(creators), undefined, undefined, undefined, unwrap(description), unwrap(hasParts), undefined, undefined, unwrap(comments), undefined, undefined, unwrap(abouts), unwrap(measurementMethod), unwrap(measurementTechnique), unwrap(variableMeasureds), unwrap(context));
661
+ s.AdditionalType = ["Assay"];
662
+ return s;
663
+ }
664
+ }
665
+
666
+ export function LDDataset_$reflection() {
667
+ return class_type("ARCtrl.ROCrate.LDDataset", undefined, LDDataset);
668
+ }
669
+