@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,275 @@
1
+ import { value, unwrap } from "../../fable_modules/fable-library-js.4.24.0/Option.js";
2
+ import { LDDefinedTerm } from "./DefinedTerm.js";
3
+ import { LDComment } from "./Comment.js";
4
+ import { empty, singleton as singleton_1, delay, toList, append } from "../../fable_modules/fable-library-js.4.24.0/Seq.js";
5
+ import { clean } from "../Helper.js";
6
+ import { join } from "../../fable_modules/fable-library-js.4.24.0/String.js";
7
+ import { isEmpty, singleton, append as append_1 } from "../../fable_modules/fable-library-js.4.24.0/List.js";
8
+ import { createMissingIdentifier } from "../../Core/Helper/Identifier.js";
9
+ import { LDNode } from "../LDObject.js";
10
+ import { class_type } from "../../fable_modules/fable-library-js.4.24.0/Reflection.js";
11
+
12
+ export class LDLabProtocol {
13
+ constructor() {
14
+ }
15
+ static get schemaType() {
16
+ return "https://bioschemas.org/LabProtocol";
17
+ }
18
+ static get description() {
19
+ return "http://schema.org/description";
20
+ }
21
+ static get intendedUse() {
22
+ return "https://bioschemas.org/intendedUse";
23
+ }
24
+ static get name() {
25
+ return "http://schema.org/name";
26
+ }
27
+ static get comment() {
28
+ return "http://schema.org/comment";
29
+ }
30
+ static get computationalTool() {
31
+ return "https://bioschemas.org/computationalTool";
32
+ }
33
+ static get labEquipment() {
34
+ return "https://bioschemas.org/labEquipment";
35
+ }
36
+ static get reagent() {
37
+ return "https://bioschemas.org/reagent";
38
+ }
39
+ static get url() {
40
+ return "http://schema.org/url";
41
+ }
42
+ static get version() {
43
+ return "http://schema.org/version";
44
+ }
45
+ static tryGetDescriptionAsString(lp, context) {
46
+ const matchValue = lp.TryGetPropertyAsSingleton(LDLabProtocol.description, unwrap(context));
47
+ let matchResult, d;
48
+ if (matchValue != null) {
49
+ if (typeof value(matchValue) === "string") {
50
+ matchResult = 0;
51
+ d = value(matchValue);
52
+ }
53
+ else {
54
+ matchResult = 1;
55
+ }
56
+ }
57
+ else {
58
+ matchResult = 1;
59
+ }
60
+ switch (matchResult) {
61
+ case 0:
62
+ return d;
63
+ default:
64
+ return undefined;
65
+ }
66
+ }
67
+ static setDescriptionAsString(lp, description, context) {
68
+ return lp.SetProperty(LDLabProtocol.description, description, unwrap(context));
69
+ }
70
+ static tryGetIntendedUseAsString(lp, context) {
71
+ const matchValue = lp.TryGetPropertyAsSingleton(LDLabProtocol.intendedUse, unwrap(context));
72
+ let matchResult, iu;
73
+ if (matchValue != null) {
74
+ if (typeof value(matchValue) === "string") {
75
+ matchResult = 0;
76
+ iu = value(matchValue);
77
+ }
78
+ else {
79
+ matchResult = 1;
80
+ }
81
+ }
82
+ else {
83
+ matchResult = 1;
84
+ }
85
+ switch (matchResult) {
86
+ case 0:
87
+ return iu;
88
+ default:
89
+ return undefined;
90
+ }
91
+ }
92
+ static setIntendedUseAsString(lp, intendedUse, context) {
93
+ return lp.SetProperty(LDLabProtocol.intendedUse, intendedUse, unwrap(context));
94
+ }
95
+ static tryGetIntendedUseAsDefinedTerm(lp, graph, context) {
96
+ let ldObject;
97
+ const matchValue = lp.TryGetPropertyAsSingleNode(LDLabProtocol.intendedUse, unwrap(graph), unwrap(context));
98
+ let matchResult, iu_1;
99
+ if (matchValue != null) {
100
+ if ((ldObject = matchValue, LDDefinedTerm.validate(ldObject, unwrap(context)))) {
101
+ matchResult = 0;
102
+ iu_1 = matchValue;
103
+ }
104
+ else {
105
+ matchResult = 1;
106
+ }
107
+ }
108
+ else {
109
+ matchResult = 1;
110
+ }
111
+ switch (matchResult) {
112
+ case 0:
113
+ return iu_1;
114
+ default:
115
+ return undefined;
116
+ }
117
+ }
118
+ static setIntendedUseAsDefinedTerm(lp, intendedUse, context) {
119
+ return lp.SetProperty(LDLabProtocol.intendedUse, intendedUse, unwrap(context));
120
+ }
121
+ static tryGetNameAsString(lp, context) {
122
+ const matchValue = lp.TryGetPropertyAsSingleton(LDLabProtocol.name, unwrap(context));
123
+ let matchResult, n;
124
+ if (matchValue != null) {
125
+ if (typeof value(matchValue) === "string") {
126
+ matchResult = 0;
127
+ n = value(matchValue);
128
+ }
129
+ else {
130
+ matchResult = 1;
131
+ }
132
+ }
133
+ else {
134
+ matchResult = 1;
135
+ }
136
+ switch (matchResult) {
137
+ case 0:
138
+ return n;
139
+ default:
140
+ return undefined;
141
+ }
142
+ }
143
+ static getNameAsString(lp, context) {
144
+ const matchValue = lp.TryGetPropertyAsSingleton(LDLabProtocol.name, unwrap(context));
145
+ let matchResult, n;
146
+ if (matchValue != null) {
147
+ if (typeof value(matchValue) === "string") {
148
+ matchResult = 0;
149
+ n = value(matchValue);
150
+ }
151
+ else {
152
+ matchResult = 1;
153
+ }
154
+ }
155
+ else {
156
+ matchResult = 1;
157
+ }
158
+ switch (matchResult) {
159
+ case 0:
160
+ return n;
161
+ default:
162
+ throw new Error(`Could not access property \`name\` of object with @id \`${lp.Id}\``);
163
+ }
164
+ }
165
+ static setNameAsString(lp, name, context) {
166
+ return lp.SetProperty(LDLabProtocol.name, name, unwrap(context));
167
+ }
168
+ static getComments(lp, graph, context) {
169
+ return lp.GetPropertyNodes(LDLabProtocol.comment, (ldObject, context_1) => LDComment.validate(ldObject, unwrap(context_1)), unwrap(graph), unwrap(context));
170
+ }
171
+ static setComments(lp, comments, context) {
172
+ return lp.SetProperty(LDLabProtocol.comment, comments, unwrap(context));
173
+ }
174
+ static getComputationalTools(lp, graph, context) {
175
+ return lp.GetPropertyNodes(LDLabProtocol.computationalTool, undefined, unwrap(graph), unwrap(context));
176
+ }
177
+ static setComputationalTools(lp, computationalTools, context) {
178
+ return lp.SetProperty(LDLabProtocol.computationalTool, computationalTools, unwrap(context));
179
+ }
180
+ static getLabEquipments(lp, graph, context) {
181
+ return lp.GetPropertyNodes(LDLabProtocol.labEquipment, undefined, unwrap(graph), unwrap(context));
182
+ }
183
+ static setLabEquipments(lp, labEquipments, context) {
184
+ return lp.SetProperty(LDLabProtocol.labEquipment, labEquipments, unwrap(context));
185
+ }
186
+ static getReagents(lp, graph, context) {
187
+ return lp.GetPropertyNodes(LDLabProtocol.reagent, undefined, unwrap(graph), unwrap(context));
188
+ }
189
+ static setReagents(lp, reagents, context) {
190
+ return lp.SetProperty(LDLabProtocol.reagent, reagents, unwrap(context));
191
+ }
192
+ static getComponents(lp, graph, context) {
193
+ let collection;
194
+ let source_3;
195
+ const source_1 = LDLabProtocol.getLabEquipments(lp, unwrap(graph), unwrap(context));
196
+ source_3 = append(LDLabProtocol.getReagents(lp, unwrap(graph), unwrap(context)), source_1);
197
+ collection = append(LDLabProtocol.getComputationalTools(lp, unwrap(graph), unwrap(context)), source_3);
198
+ return Array.from(collection);
199
+ }
200
+ static tryGetUrl(lp, context) {
201
+ const matchValue = lp.TryGetPropertyAsSingleton(LDLabProtocol.url, unwrap(context));
202
+ let matchResult, u;
203
+ if (matchValue != null) {
204
+ if (typeof value(matchValue) === "string") {
205
+ matchResult = 0;
206
+ u = value(matchValue);
207
+ }
208
+ else {
209
+ matchResult = 1;
210
+ }
211
+ }
212
+ else {
213
+ matchResult = 1;
214
+ }
215
+ switch (matchResult) {
216
+ case 0:
217
+ return u;
218
+ default:
219
+ return undefined;
220
+ }
221
+ }
222
+ static setUrl(lp, url, context) {
223
+ return lp.SetProperty(LDLabProtocol.url, url, unwrap(context));
224
+ }
225
+ static tryGetVersionAsString(lp, context) {
226
+ const matchValue = lp.TryGetPropertyAsSingleton(LDLabProtocol.version, unwrap(context));
227
+ let matchResult, v;
228
+ if (matchValue != null) {
229
+ if (typeof value(matchValue) === "string") {
230
+ matchResult = 0;
231
+ v = value(matchValue);
232
+ }
233
+ else {
234
+ matchResult = 1;
235
+ }
236
+ }
237
+ else {
238
+ matchResult = 1;
239
+ }
240
+ switch (matchResult) {
241
+ case 0:
242
+ return v;
243
+ default:
244
+ return undefined;
245
+ }
246
+ }
247
+ static setVersionAsString(lp, version, context) {
248
+ return lp.SetProperty(LDLabProtocol.version, version, unwrap(context));
249
+ }
250
+ static validate(lp, context) {
251
+ return lp.HasType(LDLabProtocol.schemaType, unwrap(context));
252
+ }
253
+ static genId(name, processName, assayName, studyName) {
254
+ let vals;
255
+ return clean(join("_", append_1(singleton("#Protocol"), (vals = toList(delay(() => append((name != null) ? singleton_1(value(name)) : empty(), delay(() => append((processName != null) ? singleton_1(value(processName)) : empty(), delay(() => append((assayName != null) ? singleton_1(value(assayName)) : empty(), delay(() => ((studyName != null) ? singleton_1(value(studyName)) : empty()))))))))), isEmpty(vals) ? singleton(createMissingIdentifier()) : vals))));
256
+ }
257
+ static create(id, name, description, intendedUse, comments, computationalTools, labEquipments, reagents, url, version, context) {
258
+ const lp = new LDNode(id, [LDLabProtocol.schemaType], undefined, unwrap(context));
259
+ lp.SetOptionalProperty(LDLabProtocol.name, name, unwrap(context));
260
+ lp.SetOptionalProperty(LDLabProtocol.description, description, unwrap(context));
261
+ lp.SetOptionalProperty(LDLabProtocol.intendedUse, intendedUse, unwrap(context));
262
+ lp.SetOptionalProperty(LDLabProtocol.comment, comments, unwrap(context));
263
+ lp.SetOptionalProperty(LDLabProtocol.computationalTool, computationalTools, unwrap(context));
264
+ lp.SetOptionalProperty(LDLabProtocol.labEquipment, labEquipments, unwrap(context));
265
+ lp.SetOptionalProperty(LDLabProtocol.reagent, reagents, unwrap(context));
266
+ lp.SetOptionalProperty(LDLabProtocol.url, url, unwrap(context));
267
+ lp.SetOptionalProperty(LDLabProtocol.version, version, unwrap(context));
268
+ return lp;
269
+ }
270
+ }
271
+
272
+ export function LDLabProtocol_$reflection() {
273
+ return class_type("ARCtrl.ROCrate.LDLabProtocol", undefined, LDLabProtocol);
274
+ }
275
+
@@ -0,0 +1,71 @@
1
+ import { value, unwrap } from "../../fable_modules/fable-library-js.4.24.0/Option.js";
2
+ import { clean } from "../Helper.js";
3
+ import { LDNode } from "../LDObject.js";
4
+ import { class_type } from "../../fable_modules/fable-library-js.4.24.0/Reflection.js";
5
+
6
+ export class LDOrganization {
7
+ constructor() {
8
+ }
9
+ static get schemaType() {
10
+ return "http://schema.org/Organization";
11
+ }
12
+ static get name() {
13
+ return "http://schema.org/name";
14
+ }
15
+ static tryGetNameAsString(o, context) {
16
+ const matchValue = o.TryGetPropertyAsSingleton(LDOrganization.name, unwrap(context));
17
+ let matchResult, n;
18
+ if (matchValue != null) {
19
+ if (typeof value(matchValue) === "string") {
20
+ matchResult = 0;
21
+ n = value(matchValue);
22
+ }
23
+ else {
24
+ matchResult = 1;
25
+ }
26
+ }
27
+ else {
28
+ matchResult = 1;
29
+ }
30
+ switch (matchResult) {
31
+ case 0:
32
+ return n;
33
+ default:
34
+ return undefined;
35
+ }
36
+ }
37
+ static getNameAsString(o, context) {
38
+ const matchValue = o.TryGetPropertyAsSingleton(LDOrganization.name, unwrap(context));
39
+ if (matchValue != null) {
40
+ if (typeof value(matchValue) === "string") {
41
+ const n = value(matchValue);
42
+ return n;
43
+ }
44
+ else {
45
+ throw new Error(`Property of \`name\` of object with @id \`${o.Id}\` was not a string`);
46
+ }
47
+ }
48
+ else {
49
+ throw new Error(`Could not access property \`name\` of object with @id \`${o.Id}\``);
50
+ }
51
+ }
52
+ static setNameAsString(o, n, context) {
53
+ return o.SetProperty(LDOrganization.name, n, unwrap(context));
54
+ }
55
+ static genID(name) {
56
+ return clean(`#Organization_${name}`);
57
+ }
58
+ static validate(o, context) {
59
+ return o.HasType(LDOrganization.schemaType, unwrap(context)) && o.HasProperty(LDOrganization.name, unwrap(context));
60
+ }
61
+ static create(name, id, context) {
62
+ const o = new LDNode((id == null) ? LDOrganization.genID(name) : id, [LDOrganization.schemaType], undefined, unwrap(context));
63
+ o.SetProperty(LDOrganization.name, name, unwrap(context));
64
+ return o;
65
+ }
66
+ }
67
+
68
+ export function LDOrganization_$reflection() {
69
+ return class_type("ARCtrl.ROCrate.LDOrganization", undefined, LDOrganization);
70
+ }
71
+