@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.
- package/ARC.js +103 -12
- package/CWL/CWLTypes.js +2 -2
- package/CWL/Decode.js +2 -2
- package/CWL/Inputs.js +2 -2
- package/CWL/Outputs.js +2 -2
- package/CWL/Requirements.js +2 -2
- package/CWL/ToolDescription.js +1 -1
- package/CWL/WorkflowDescription.js +1 -1
- package/CWL/WorkflowSteps.js +1 -1
- package/ColumnIndex.js +258 -0
- package/Conversion.js +1679 -0
- package/Core/Data.js +28 -3
- package/Core/DataFile.js +19 -3
- package/Core/Helper/Collections.js +107 -4
- package/Core/Helper/DateTime.js +17 -0
- package/Core/Helper/ORCID.js +39 -0
- package/Core/Table/ArcTable.js +6 -0
- package/Core/Table/CompositeHeader.js +4 -0
- package/Json/Assay.js +1 -1
- package/Json/Decode.js +3 -3
- package/Json/Encode.js +9 -0
- package/Json/Investigation.js +5 -4
- package/Json/OntologySourceReference.js +4 -4
- package/Json/ROCrate/LDContext.js +121 -0
- package/Json/ROCrate/LDGraph.js +87 -0
- package/Json/{LDObject.js → ROCrate/LDNode.js} +55 -46
- package/Json/ROCrate/LDRef.js +25 -0
- package/Json/ROCrate/LDValue.js +66 -0
- package/Json/Study.js +5 -4
- package/Json/context/rocrate/isa_investigation_context.js +2 -2
- package/Json/context/rocrate/isa_study_context.js +15 -11
- package/Json/context/rocrate/rocrate_context.js +1 -1
- package/JsonIO/LDObject.js +30 -5
- package/README.md +12 -3
- package/ROCrate/ArcROCrateMetadata.js +14 -13
- package/ROCrate/Generic/Comment.js +115 -0
- package/ROCrate/Generic/Dataset.js +669 -0
- package/ROCrate/Generic/DefinedTerm.js +115 -0
- package/ROCrate/Generic/File.js +200 -0
- package/ROCrate/Generic/LabProcess.js +238 -0
- package/ROCrate/Generic/LabProtocol.js +275 -0
- package/ROCrate/Generic/Organization.js +71 -0
- package/ROCrate/Generic/Person.js +411 -0
- package/ROCrate/Generic/PostalAddress.js +159 -0
- package/ROCrate/Generic/PropertyValue.js +548 -0
- package/ROCrate/Generic/Sample.js +139 -0
- package/ROCrate/Generic/ScholarlyArticle.js +187 -0
- package/ROCrate/Helper.js +6 -0
- package/ROCrate/ISAProfile/Assay.js +3 -3
- package/ROCrate/ISAProfile/Data.js +7 -7
- package/ROCrate/ISAProfile/Dataset.js +7 -6
- package/ROCrate/ISAProfile/Investigation.js +3 -3
- package/ROCrate/ISAProfile/LabProcess.js +7 -7
- package/ROCrate/ISAProfile/LabProtocol.js +7 -7
- package/ROCrate/ISAProfile/Person.js +7 -7
- package/ROCrate/ISAProfile/PropertyValue.js +7 -7
- package/ROCrate/ISAProfile/Sample.js +7 -7
- package/ROCrate/ISAProfile/ScholarlyArticle.js +7 -7
- package/ROCrate/ISAProfile/Study.js +3 -3
- package/ROCrate/LDContext.js +283 -0
- package/ROCrate/LDObject.js +902 -36
- package/ROCrate/ROCrateContext.js +44 -0
- package/ROCrateIO.js +62 -0
- package/Spreadsheet/DataMap.js +11 -3
- package/Spreadsheet/DataMapTable/DataMapHeader.js +3 -2
- package/Xlsx.js +21 -8
- package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/DynObj.fs +31 -1
- package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/DynObj.fs.js +30 -1
- package/fable_modules/DynamicObj.7.0.1/DynamicObj.fs +1025 -0
- package/fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js +433 -0
- package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/FableJS.fs +16 -0
- package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/FablePy.fs +14 -0
- package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/HashCodes.fs +15 -0
- package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/HashCodes.fs.js +4 -0
- package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/obj/Debug/netstandard2.0/DynamicObj.AssemblyInfo.fs +1 -1
- package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/obj/Release/netstandard2.0/DynamicObj.AssemblyInfo.fs +3 -3
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
- package/Json/ARC.js +0 -31
- package/JsonIO/ARC.js +0 -31
- package/fable_modules/DynamicObj.4.0.3/DynamicObj.fs +0 -310
- package/fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js +0 -166
- /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/DynamicObj.fableproj +0 -0
- /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/FableJS.fs.js +0 -0
- /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/PropertyHelper.fs +0 -0
- /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/PropertyHelper.fs.js +0 -0
- /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/ReflectionUtils.fs +0 -0
- /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/ReflectionUtils.fs.js +0 -0
- /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /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,283 @@
|
|
|
1
|
+
import { Dictionary } from "../fable_modules/fable-library-js.4.24.0/MutableMap.js";
|
|
2
|
+
import { stringHash, comparePrimitives, safeHash, disposeSafe, getEnumerator, defaultOf, structuralHash, equals } from "../fable_modules/fable-library-js.4.24.0/Util.js";
|
|
3
|
+
import { tryPick, sort, map, reduce, iterate } from "../fable_modules/fable-library-js.4.24.0/Seq.js";
|
|
4
|
+
import { getItemFromDict, tryGetValue, addToDict } from "../fable_modules/fable-library-js.4.24.0/MapUtil.js";
|
|
5
|
+
import { toString, FSharpRef } from "../fable_modules/fable-library-js.4.24.0/Types.js";
|
|
6
|
+
import { defaultArg, unwrap, some } from "../fable_modules/fable-library-js.4.24.0/Option.js";
|
|
7
|
+
import { ActivePatterns_$007CRegex$007C_$007C } from "../Core/Helper/Regex.js";
|
|
8
|
+
import { Uri } from "../fable_modules/fable-library-js.4.24.0/Uri.js";
|
|
9
|
+
import { Dictionary_addOrUpdate } from "../Core/Helper/Collections.js";
|
|
10
|
+
import { hash as hash_2, mergeHashes, boxHashSeq } from "../Core/Helper/HashCodes.js";
|
|
11
|
+
import { class_type } from "../fable_modules/fable-library-js.4.24.0/Reflection.js";
|
|
12
|
+
|
|
13
|
+
export function Dictionary_ofSeq(s) {
|
|
14
|
+
const dict = new Dictionary([], {
|
|
15
|
+
Equals: equals,
|
|
16
|
+
GetHashCode: structuralHash,
|
|
17
|
+
});
|
|
18
|
+
iterate((tupledArg) => {
|
|
19
|
+
addToDict(dict, tupledArg[0], tupledArg[1]);
|
|
20
|
+
}, s);
|
|
21
|
+
return dict;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function Dictionary_tryFind(key, dict) {
|
|
25
|
+
let patternInput;
|
|
26
|
+
let outArg = defaultOf();
|
|
27
|
+
patternInput = [tryGetValue(dict, key, new FSharpRef(() => outArg, (v) => {
|
|
28
|
+
outArg = v;
|
|
29
|
+
})), outArg];
|
|
30
|
+
if (patternInput[0]) {
|
|
31
|
+
return some(patternInput[1]);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const IRIHelper_compactIRIRegex = "(?<prefix>.*):(?<suffix>[^\\/][^\\/].*)";
|
|
39
|
+
|
|
40
|
+
export function IRIHelper_$007CCompactIri$007C_$007C(termDefition) {
|
|
41
|
+
const activePatternResult = ActivePatterns_$007CRegex$007C_$007C(IRIHelper_compactIRIRegex, termDefition);
|
|
42
|
+
if (activePatternResult != null) {
|
|
43
|
+
const result = activePatternResult;
|
|
44
|
+
return [(result.groups && result.groups.prefix) || "", (result.groups && result.groups.suffix) || ""];
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function IRIHelper_combine(baseIRI, relative) {
|
|
52
|
+
if (relative.startsWith("http://") ? true : relative.startsWith("https://")) {
|
|
53
|
+
return relative;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
return toString(Uri.create(Uri.create(baseIRI), relative));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function IRIHelper_combineOptional(baseIRI, relative) {
|
|
61
|
+
if (baseIRI == null) {
|
|
62
|
+
if (relative != null) {
|
|
63
|
+
const r_1 = relative;
|
|
64
|
+
return r_1;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else if (relative == null) {
|
|
71
|
+
const b_1 = baseIRI;
|
|
72
|
+
return b_1;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
const b = baseIRI;
|
|
76
|
+
const r = relative;
|
|
77
|
+
return IRIHelper_combine(b, r);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export class LDContext {
|
|
82
|
+
constructor(mappings, baseContexts) {
|
|
83
|
+
this["baseContexts@54"] = defaultArg(baseContexts, []);
|
|
84
|
+
this.name = undefined;
|
|
85
|
+
this["mappings@58"] = ((mappings == null) ? (new Map([])) : mappings);
|
|
86
|
+
this.reverseMappings = (new Map([]));
|
|
87
|
+
this.compactReverseMappings = (new Map([]));
|
|
88
|
+
let enumerator = getEnumerator(this["mappings@58"]);
|
|
89
|
+
try {
|
|
90
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
91
|
+
const kvp = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
92
|
+
this.addReverseMapping(kvp[0], kvp[1]);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
finally {
|
|
96
|
+
disposeSafe(enumerator);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
get Mappings() {
|
|
100
|
+
const this$ = this;
|
|
101
|
+
return this$["mappings@58"];
|
|
102
|
+
}
|
|
103
|
+
get BaseContexts() {
|
|
104
|
+
const this$ = this;
|
|
105
|
+
return this$["baseContexts@54"];
|
|
106
|
+
}
|
|
107
|
+
set BaseContexts(value) {
|
|
108
|
+
const this$ = this;
|
|
109
|
+
this$["baseContexts@54"] = value;
|
|
110
|
+
}
|
|
111
|
+
get Name() {
|
|
112
|
+
const this$ = this;
|
|
113
|
+
return unwrap(this$.name);
|
|
114
|
+
}
|
|
115
|
+
set Name(value) {
|
|
116
|
+
const this$ = this;
|
|
117
|
+
this$.name = value;
|
|
118
|
+
}
|
|
119
|
+
AddMapping(term, definition) {
|
|
120
|
+
const this$ = this;
|
|
121
|
+
Dictionary_addOrUpdate(term, definition, this$["mappings@58"]);
|
|
122
|
+
this$.addReverseMapping(term, definition);
|
|
123
|
+
}
|
|
124
|
+
TryResolveTerm(term) {
|
|
125
|
+
const this$ = this;
|
|
126
|
+
return (term.indexOf(":") >= 0) ? reduce(IRIHelper_combineOptional, map((term_1) => this$.tryFindTerm(term_1), term.split(":"))) : this$.tryFindTerm(term);
|
|
127
|
+
}
|
|
128
|
+
TryGetTerm(iri) {
|
|
129
|
+
const this$ = this;
|
|
130
|
+
return this$.tryFindIri(iri);
|
|
131
|
+
}
|
|
132
|
+
PropertyNamesMatch(p1, p2) {
|
|
133
|
+
let p2Def_2, p1Def_2, p1Def_1, p2Def_1;
|
|
134
|
+
const this$ = this;
|
|
135
|
+
if (p1 === p2) {
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
const p1Def = this$.TryResolveTerm(p1);
|
|
140
|
+
const p2Def = this$.TryResolveTerm(p2);
|
|
141
|
+
return (p1Def == null) ? ((p2Def != null) && ((p2Def_2 = p2Def, p1 === p2Def_2))) : ((p2Def == null) ? ((p1Def_2 = p1Def, p1Def_2 === p2)) : ((p1Def_1 = p1Def, (p2Def_1 = p2Def, p1Def_1 === p2Def_1))));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
static fromMappingSeq(mappings) {
|
|
145
|
+
return new LDContext(Dictionary_ofSeq(mappings));
|
|
146
|
+
}
|
|
147
|
+
static combine_InPlace(baseContext, specificContext) {
|
|
148
|
+
void (specificContext.BaseContexts.push(baseContext));
|
|
149
|
+
return specificContext;
|
|
150
|
+
}
|
|
151
|
+
static combine(baseContext, specificContext) {
|
|
152
|
+
return new LDContext(undefined, [specificContext, baseContext]);
|
|
153
|
+
}
|
|
154
|
+
static tryCombineOptional(baseContext, specificContext) {
|
|
155
|
+
let s_1, f_1, f, s;
|
|
156
|
+
return (baseContext == null) ? ((specificContext != null) ? ((s_1 = specificContext, s_1)) : undefined) : ((specificContext == null) ? ((f_1 = baseContext, f_1)) : ((f = baseContext, (s = specificContext, LDContext.combine(f, s)))));
|
|
157
|
+
}
|
|
158
|
+
ShallowCopy() {
|
|
159
|
+
const this$ = this;
|
|
160
|
+
const newMappings = new Map([]);
|
|
161
|
+
let enumerator = getEnumerator(this$["mappings@58"]);
|
|
162
|
+
try {
|
|
163
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
164
|
+
const kvp = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
165
|
+
addToDict(newMappings, kvp[0], kvp[1]);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
finally {
|
|
169
|
+
disposeSafe(enumerator);
|
|
170
|
+
}
|
|
171
|
+
return new LDContext(newMappings, this$["baseContexts@54"]);
|
|
172
|
+
}
|
|
173
|
+
DeepCopy() {
|
|
174
|
+
const this$ = this;
|
|
175
|
+
const newMappings = new Map([]);
|
|
176
|
+
let enumerator = getEnumerator(this$["mappings@58"]);
|
|
177
|
+
try {
|
|
178
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
179
|
+
const kvp = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
180
|
+
addToDict(newMappings, kvp[0], kvp[1]);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
finally {
|
|
184
|
+
disposeSafe(enumerator);
|
|
185
|
+
}
|
|
186
|
+
const newBaseContexts = [];
|
|
187
|
+
let enumerator_1 = getEnumerator(this$["baseContexts@54"]);
|
|
188
|
+
try {
|
|
189
|
+
while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
|
|
190
|
+
const ctx = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
191
|
+
void (newBaseContexts.push(ctx.DeepCopy()));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
finally {
|
|
195
|
+
disposeSafe(enumerator_1);
|
|
196
|
+
}
|
|
197
|
+
return new LDContext(newMappings, newBaseContexts);
|
|
198
|
+
}
|
|
199
|
+
StructurallyEquals(other) {
|
|
200
|
+
const this$ = this;
|
|
201
|
+
return safeHash(this$) === safeHash(other);
|
|
202
|
+
}
|
|
203
|
+
ReferenceEquals(other) {
|
|
204
|
+
const this$ = this;
|
|
205
|
+
return this$ === other;
|
|
206
|
+
}
|
|
207
|
+
Equals(other) {
|
|
208
|
+
let other_1;
|
|
209
|
+
const this$ = this;
|
|
210
|
+
return (other instanceof LDContext) && ((other_1 = other, this$.StructurallyEquals(other_1)));
|
|
211
|
+
}
|
|
212
|
+
GetHashCode() {
|
|
213
|
+
const this$ = this;
|
|
214
|
+
const mappingsHash = boxHashSeq(map((k) => mergeHashes(hash_2(k), hash_2(getItemFromDict(this$.Mappings, k))), sort(this$.Mappings.keys(), {
|
|
215
|
+
Compare: comparePrimitives,
|
|
216
|
+
}))) | 0;
|
|
217
|
+
let nameHash;
|
|
218
|
+
const matchValue = this$.Name;
|
|
219
|
+
nameHash = ((matchValue == null) ? 0 : stringHash(matchValue));
|
|
220
|
+
const baseContextsHash = ((this$["baseContexts@54"].length === 0) ? 0 : reduce(mergeHashes, map(safeHash, this$["baseContexts@54"]))) | 0;
|
|
221
|
+
return mergeHashes(mergeHashes(mappingsHash, nameHash), baseContextsHash) | 0;
|
|
222
|
+
}
|
|
223
|
+
"System.ICloneable.Clone"() {
|
|
224
|
+
const this$ = this;
|
|
225
|
+
return this$.DeepCopy();
|
|
226
|
+
}
|
|
227
|
+
addReverseMapping(key, value) {
|
|
228
|
+
const this$ = this;
|
|
229
|
+
Dictionary_addOrUpdate(value, key, this$.reverseMappings);
|
|
230
|
+
const activePatternResult = IRIHelper_$007CCompactIri$007C_$007C(value);
|
|
231
|
+
if (activePatternResult != null) {
|
|
232
|
+
const prefix = activePatternResult[0];
|
|
233
|
+
const suffix = activePatternResult[1];
|
|
234
|
+
Dictionary_addOrUpdate(prefix, [suffix, key], this$.compactReverseMappings);
|
|
235
|
+
const matchValue = Dictionary_tryFind(prefix, this$["mappings@58"]);
|
|
236
|
+
if (matchValue == null) {
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
Dictionary_addOrUpdate(IRIHelper_combine(matchValue, suffix), key, this$.reverseMappings);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
const matchValue_1 = Dictionary_tryFind(key, this$.compactReverseMappings);
|
|
244
|
+
if (matchValue_1 == null) {
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
const term = matchValue_1[1];
|
|
248
|
+
Dictionary_addOrUpdate(IRIHelper_combine(value, matchValue_1[0]), term, this$.reverseMappings);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
tryFindTerm(term) {
|
|
253
|
+
let prefix, suffix, d;
|
|
254
|
+
const this$ = this;
|
|
255
|
+
let definition;
|
|
256
|
+
const matchValue = Dictionary_tryFind(term, this$["mappings@58"]);
|
|
257
|
+
definition = ((matchValue == null) ? tryPick((ctx) => ctx.TryResolveTerm(term), this$["baseContexts@54"]) : matchValue);
|
|
258
|
+
if (definition == null) {
|
|
259
|
+
return undefined;
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
const activePatternResult = IRIHelper_$007CCompactIri$007C_$007C(definition);
|
|
263
|
+
return (activePatternResult != null) ? ((prefix = activePatternResult[0], (suffix = activePatternResult[1], IRIHelper_combine((prefix === term) ? prefix : defaultArg(this$.tryFindTerm(prefix), prefix), (suffix === term) ? suffix : defaultArg(this$.tryFindTerm(suffix), suffix))))) : ((d = definition, d));
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
tryFindIri(iri) {
|
|
267
|
+
const this$ = this;
|
|
268
|
+
const matchValue = Dictionary_tryFind(iri, this$.reverseMappings);
|
|
269
|
+
return (matchValue == null) ? tryPick((ctx) => ctx.TryGetTerm(iri), this$["baseContexts@54"]) : matchValue;
|
|
270
|
+
}
|
|
271
|
+
tryCompactIRI(iri) {
|
|
272
|
+
throw new Error("TryCompactIRI is Not implemented yet");
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export function LDContext_$reflection() {
|
|
277
|
+
return class_type("ARCtrl.ROCrate.LDContext", undefined, LDContext);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export function LDContext_$ctor_7878CD77(mappings, baseContexts) {
|
|
281
|
+
return new LDContext(mappings, baseContexts);
|
|
282
|
+
}
|
|
283
|
+
|