@nfdi4plants/arctrl 1.0.0-beta.8 → 1.0.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 +9 -8
- package/Contracts/Contracts.ArcTypes.js +12 -9
- package/ISA/ISA/ArcTypes/ArcTable.js +17 -17
- package/ISA/ISA/ArcTypes/ArcTableAux.js +13 -11
- package/ISA/ISA/ArcTypes/ArcTables.js +6 -6
- package/ISA/ISA/ArcTypes/ArcTypes.js +209 -185
- package/ISA/ISA/ArcTypes/CompositeHeader.js +2 -2
- package/ISA/ISA/ArcTypes/CompositeRow.js +4 -4
- package/ISA/ISA/Fable.js +83 -10
- package/ISA/ISA/Helper.js +11 -4
- package/ISA/ISA/Identifier.js +10 -8
- package/ISA/ISA/JsonTypes/ColumnIndex.js +2 -2
- package/ISA/ISA/JsonTypes/Component.js +24 -16
- package/ISA/ISA/JsonTypes/OntologyAnnotation.js +3 -2
- package/ISA/ISA/JsonTypes/Process.js +7 -6
- package/ISA/ISA/JsonTypes/ProcessParameterValue.js +70 -92
- package/ISA/ISA/JsonTypes/ProtocolParameter.js +51 -79
- package/ISA/ISA/JsonTypes/Value.js +100 -165
- package/ISA/ISA/Regex.js +12 -6
- package/ISA/ISA.Json/ArcTypes/ArcAssay.js +197 -0
- package/ISA/ISA.Json/ArcTypes/ArcInvestigation.js +79 -0
- package/ISA/ISA.Json/ArcTypes/ArcStudy.js +77 -0
- package/ISA/ISA.Json/ArcTypes/ArcTable.js +57 -0
- package/ISA/ISA.Json/ArcTypes/CompositeCell.js +51 -0
- package/ISA/ISA.Json/ArcTypes/CompositeHeader.js +82 -0
- package/ISA/ISA.Json/ArcTypes/IOType.js +35 -0
- package/ISA/ISA.Json/Assay.js +0 -18
- package/ISA/ISA.Json/Investigation.js +17 -35
- package/ISA/ISA.Json/Process.js +3 -3
- package/ISA/ISA.Json/Study.js +0 -18
- package/ISA/ISA.Spreadsheet/ArcAssay.js +3 -3
- package/ISA/ISA.Spreadsheet/ArcInvestigation.js +21 -5
- package/ISA/ISA.Spreadsheet/ArcStudy.js +3 -5
- package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +3 -3
- package/SemVer.js +5 -7
- package/Templates/Template.Json.js +12 -17
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +5 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { record_type, option_type, string_type } from "../../../fable_modules/fable-library.4.5.0/Reflection.js";
|
|
3
|
-
import { OntologyAnnotation, OntologyAnnotation_$reflection } from "./OntologyAnnotation.js";
|
|
1
|
+
import { OntologyAnnotation_$reflection, OntologyAnnotation } from "./OntologyAnnotation.js";
|
|
4
2
|
import { bind, map, defaultArg, unwrap } from "../../../fable_modules/fable-library.4.5.0/Option.js";
|
|
5
3
|
import { Option_fromValueWithDefault } from "../Helper.js";
|
|
4
|
+
import { Record, toString } from "../../../fable_modules/fable-library.4.5.0/Types.js";
|
|
5
|
+
import { record_type, option_type, string_type } from "../../../fable_modules/fable-library.4.5.0/Reflection.js";
|
|
6
6
|
|
|
7
7
|
export class ProtocolParameter extends Record {
|
|
8
8
|
constructor(ID, ParameterName) {
|
|
@@ -10,13 +10,60 @@ export class ProtocolParameter extends Record {
|
|
|
10
10
|
this.ID = ID;
|
|
11
11
|
this.ParameterName = ParameterName;
|
|
12
12
|
}
|
|
13
|
+
static make(id, parameterName) {
|
|
14
|
+
return new ProtocolParameter(id, parameterName);
|
|
15
|
+
}
|
|
16
|
+
static create(Id, ParameterName) {
|
|
17
|
+
return ProtocolParameter.make(Id, ParameterName);
|
|
18
|
+
}
|
|
19
|
+
static get empty() {
|
|
20
|
+
return ProtocolParameter.create();
|
|
21
|
+
}
|
|
22
|
+
static fromString(term, source, accession, comments) {
|
|
23
|
+
const oa = OntologyAnnotation.fromString(term, source, accession, unwrap(comments));
|
|
24
|
+
const parameterName = Option_fromValueWithDefault(OntologyAnnotation.empty, oa);
|
|
25
|
+
return ProtocolParameter.make(void 0, parameterName);
|
|
26
|
+
}
|
|
27
|
+
static toString(pp) {
|
|
28
|
+
const value = {
|
|
29
|
+
TermAccessionNumber: "",
|
|
30
|
+
TermName: "",
|
|
31
|
+
TermSourceREF: "",
|
|
32
|
+
};
|
|
33
|
+
return defaultArg(map((oa) => OntologyAnnotation.toString(oa), pp.ParameterName), value);
|
|
34
|
+
}
|
|
35
|
+
get NameText() {
|
|
36
|
+
const this$ = this;
|
|
37
|
+
return defaultArg(map((oa) => oa.NameText, this$.ParameterName), "");
|
|
38
|
+
}
|
|
39
|
+
get TryNameText() {
|
|
40
|
+
const this$ = this;
|
|
41
|
+
return unwrap(bind((oa) => oa.TryNameText, this$.ParameterName));
|
|
42
|
+
}
|
|
43
|
+
MapCategory(f) {
|
|
44
|
+
const this$ = this;
|
|
45
|
+
return new ProtocolParameter(this$.ID, map(f, this$.ParameterName));
|
|
46
|
+
}
|
|
47
|
+
SetCategory(c) {
|
|
48
|
+
const this$ = this;
|
|
49
|
+
return new ProtocolParameter(this$.ID, c);
|
|
50
|
+
}
|
|
51
|
+
static tryGetNameText(pp) {
|
|
52
|
+
return pp.TryNameText;
|
|
53
|
+
}
|
|
54
|
+
static getNameText(pp) {
|
|
55
|
+
return defaultArg(ProtocolParameter.tryGetNameText(pp), "");
|
|
56
|
+
}
|
|
57
|
+
static nameEqualsString(name, pp) {
|
|
58
|
+
return pp.NameText === name;
|
|
59
|
+
}
|
|
13
60
|
Print() {
|
|
14
61
|
const this$ = this;
|
|
15
62
|
return toString(this$);
|
|
16
63
|
}
|
|
17
64
|
PrintCompact() {
|
|
18
65
|
const this$ = this;
|
|
19
|
-
return "OA " +
|
|
66
|
+
return "OA " + this$.NameText;
|
|
20
67
|
}
|
|
21
68
|
}
|
|
22
69
|
|
|
@@ -24,78 +71,3 @@ export function ProtocolParameter_$reflection() {
|
|
|
24
71
|
return record_type("ARCtrl.ISA.ProtocolParameter", [], ProtocolParameter, () => [["ID", option_type(string_type)], ["ParameterName", option_type(OntologyAnnotation_$reflection())]]);
|
|
25
72
|
}
|
|
26
73
|
|
|
27
|
-
export function ProtocolParameter_make(id, parameterName) {
|
|
28
|
-
return new ProtocolParameter(id, parameterName);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function ProtocolParameter_create_Z6C54B221(Id, ParameterName) {
|
|
32
|
-
return ProtocolParameter_make(Id, ParameterName);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export function ProtocolParameter_get_empty() {
|
|
36
|
-
return ProtocolParameter_create_Z6C54B221();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Create a ISAJson Protocol Parameter from ISATab string entries
|
|
41
|
-
*/
|
|
42
|
-
export function ProtocolParameter_fromString_Z2304A83C(term, source, accession, comments) {
|
|
43
|
-
const oa = OntologyAnnotation.fromString(term, source, accession, unwrap(comments));
|
|
44
|
-
return ProtocolParameter_make(void 0, Option_fromValueWithDefault(OntologyAnnotation.empty, oa));
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Get ISATab string entries from an ISAJson ProtocolParameter object (name,source,accession)
|
|
49
|
-
*/
|
|
50
|
-
export function ProtocolParameter_toString_Z3A4310A5(pp) {
|
|
51
|
-
const value = {
|
|
52
|
-
TermAccessionNumber: "",
|
|
53
|
-
TermName: "",
|
|
54
|
-
TermSourceREF: "",
|
|
55
|
-
};
|
|
56
|
-
return defaultArg(map((oa) => OntologyAnnotation.toString(oa), pp.ParameterName), value);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Returns the name of the parameter as string
|
|
61
|
-
*/
|
|
62
|
-
export function ProtocolParameter__get_NameText(this$) {
|
|
63
|
-
return defaultArg(map((oa) => oa.NameText, this$.ParameterName), "");
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Returns the name of the parameter as string
|
|
68
|
-
*/
|
|
69
|
-
export function ProtocolParameter__get_TryNameText(this$) {
|
|
70
|
-
return bind((oa) => oa.TryNameText, this$.ParameterName);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export function ProtocolParameter__MapCategory_Z69DD836A(this$, f) {
|
|
74
|
-
return new ProtocolParameter(this$.ID, map(f, this$.ParameterName));
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export function ProtocolParameter__SetCategory_Z4C0FE73C(this$, c) {
|
|
78
|
-
return new ProtocolParameter(this$.ID, c);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Returns the name of the paramater as string if it exists
|
|
83
|
-
*/
|
|
84
|
-
export function ProtocolParameter_tryGetNameText_Z3A4310A5(pp) {
|
|
85
|
-
return ProtocolParameter__get_TryNameText(pp);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Returns the name of the paramater as string
|
|
90
|
-
*/
|
|
91
|
-
export function ProtocolParameter_getNameText_Z3A4310A5(pp) {
|
|
92
|
-
return defaultArg(ProtocolParameter_tryGetNameText_Z3A4310A5(pp), "");
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Returns true if the given name matches the name of the parameter
|
|
97
|
-
*/
|
|
98
|
-
export function ProtocolParameter_nameEqualsString(name, pp) {
|
|
99
|
-
return ProtocolParameter__get_NameText(pp) === name;
|
|
100
|
-
}
|
|
101
|
-
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Union, toString } from "../../../fable_modules/fable-library.4.5.0/Types.js";
|
|
2
|
-
import { printf, toText } from "../../../fable_modules/fable-library.4.5.0/String.js";
|
|
3
|
-
import { OntologyAnnotation, OntologyAnnotation_$reflection } from "./OntologyAnnotation.js";
|
|
4
|
-
import { union_type, string_type, float64_type, int32_type } from "../../../fable_modules/fable-library.4.5.0/Reflection.js";
|
|
5
1
|
import { parse } from "../../../fable_modules/fable-library.4.5.0/Double.js";
|
|
6
2
|
import { parse as parse_1 } from "../../../fable_modules/fable-library.4.5.0/Int32.js";
|
|
3
|
+
import { OntologyAnnotation_$reflection, OntologyAnnotation } from "./OntologyAnnotation.js";
|
|
7
4
|
import { map, defaultArg } from "../../../fable_modules/fable-library.4.5.0/Option.js";
|
|
8
5
|
import { int32ToString } from "../../../fable_modules/fable-library.4.5.0/Util.js";
|
|
9
6
|
import { AnnotationValue_toString_Z6FAD7738 } from "./AnnotationValue.js";
|
|
7
|
+
import { Union, toString } from "../../../fable_modules/fable-library.4.5.0/Types.js";
|
|
8
|
+
import { printf, toText } from "../../../fable_modules/fable-library.4.5.0/String.js";
|
|
9
|
+
import { union_type, string_type, float64_type, int32_type } from "../../../fable_modules/fable-library.4.5.0/Reflection.js";
|
|
10
10
|
|
|
11
11
|
export class Value extends Union {
|
|
12
12
|
constructor(tag, fields) {
|
|
@@ -17,194 +17,129 @@ export class Value extends Union {
|
|
|
17
17
|
cases() {
|
|
18
18
|
return ["Ontology", "Int", "Float", "Name"];
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
const this$ = this;
|
|
22
|
-
return toString(this$);
|
|
23
|
-
}
|
|
24
|
-
PrintCompact() {
|
|
25
|
-
const this$ = this;
|
|
26
|
-
return (this$.tag === 1) ? toText(printf("%i"))(this$.fields[0]) : ((this$.tag === 2) ? toText(printf("%f"))(this$.fields[0]) : ((this$.tag === 3) ? this$.fields[0] : this$.fields[0].NameText));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function Value_$reflection() {
|
|
31
|
-
return union_type("ARCtrl.ISA.Value", [], Value, () => [[["Item", OntologyAnnotation_$reflection()]], [["Item", int32_type]], [["Item", float64_type]], [["Item", string_type]]]);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export function Value_fromString_Z721C83C5(value) {
|
|
35
|
-
try {
|
|
36
|
-
return new Value(1, [parse_1(value, 511, false, 32)]);
|
|
37
|
-
}
|
|
38
|
-
catch (matchValue) {
|
|
20
|
+
static fromString(value) {
|
|
39
21
|
try {
|
|
40
|
-
return new Value(
|
|
22
|
+
return new Value(1, [parse_1(value, 511, false, 32)]);
|
|
41
23
|
}
|
|
42
|
-
catch (
|
|
43
|
-
|
|
24
|
+
catch (matchValue) {
|
|
25
|
+
try {
|
|
26
|
+
return new Value(2, [parse(value)]);
|
|
27
|
+
}
|
|
28
|
+
catch (matchValue_1) {
|
|
29
|
+
return new Value(3, [value]);
|
|
30
|
+
}
|
|
44
31
|
}
|
|
45
32
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
33
|
+
static fromOptions(value, termSource, termAccesssion) {
|
|
34
|
+
let value_1;
|
|
35
|
+
return (value == null) ? ((termSource == null) ? ((termAccesssion == null) ? void 0 : (new Value(0, [OntologyAnnotation.fromString(defaultArg(value, ""), termSource, termAccesssion)]))) : (new Value(0, [OntologyAnnotation.fromString(defaultArg(value, ""), termSource, termAccesssion)]))) : ((termSource == null) ? ((termAccesssion == null) ? ((value_1 = value, (() => {
|
|
36
|
+
try {
|
|
37
|
+
return new Value(1, [parse_1(value_1, 511, false, 32)]);
|
|
38
|
+
}
|
|
39
|
+
catch (matchValue_1) {
|
|
40
|
+
try {
|
|
41
|
+
return new Value(2, [parse(value_1)]);
|
|
42
|
+
}
|
|
43
|
+
catch (matchValue_2) {
|
|
44
|
+
return new Value(3, [value_1]);
|
|
45
|
+
}
|
|
54
46
|
}
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
})())) : (new Value(0, [OntologyAnnotation.fromString(defaultArg(value, ""), termSource, termAccesssion)]))) : (new Value(0, [OntologyAnnotation.fromString(defaultArg(value, ""), termSource, termAccesssion)])));
|
|
48
|
+
}
|
|
49
|
+
static toOptions(value) {
|
|
50
|
+
switch (value.tag) {
|
|
51
|
+
case 1:
|
|
52
|
+
return [int32ToString(value.fields[0]), void 0, void 0];
|
|
53
|
+
case 2:
|
|
54
|
+
return [value.fields[0].toString(), void 0, void 0];
|
|
55
|
+
case 3:
|
|
56
|
+
return [value.fields[0], void 0, void 0];
|
|
57
|
+
default: {
|
|
58
|
+
const oa = value.fields[0];
|
|
59
|
+
return [map(AnnotationValue_toString_Z6FAD7738, oa.Name), oa.TermAccessionNumber, oa.TermSourceREF];
|
|
57
60
|
}
|
|
58
61
|
}
|
|
62
|
+
}
|
|
63
|
+
get Text() {
|
|
64
|
+
const this$ = this;
|
|
65
|
+
return (this$.tag === 2) ? this$.fields[0].toString() : ((this$.tag === 1) ? int32ToString(this$.fields[0]) : ((this$.tag === 3) ? this$.fields[0] : this$.fields[0].NameText));
|
|
66
|
+
}
|
|
67
|
+
AsName() {
|
|
68
|
+
const this$ = this;
|
|
69
|
+
if (this$.tag === 3) {
|
|
70
|
+
return this$.fields[0];
|
|
71
|
+
}
|
|
59
72
|
else {
|
|
60
|
-
|
|
73
|
+
throw new Error(`Value ${this$} is not of case name`);
|
|
61
74
|
}
|
|
62
75
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
76
|
+
AsInt() {
|
|
77
|
+
const this$ = this;
|
|
78
|
+
if (this$.tag === 1) {
|
|
79
|
+
return this$.fields[0] | 0;
|
|
67
80
|
}
|
|
68
81
|
else {
|
|
69
|
-
|
|
82
|
+
throw new Error(`Value ${this$} is not of case int`);
|
|
70
83
|
}
|
|
71
84
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return new Value(1, [parse_1(value_1, 511, false, 32)]);
|
|
80
|
-
}
|
|
81
|
-
catch (matchValue_1) {
|
|
82
|
-
try {
|
|
83
|
-
return new Value(2, [parse(value_1)]);
|
|
84
|
-
}
|
|
85
|
-
catch (matchValue_2) {
|
|
86
|
-
return new Value(3, [value_1]);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
})();
|
|
90
|
-
case 1:
|
|
91
|
-
return void 0;
|
|
92
|
-
default:
|
|
93
|
-
return new Value(0, [OntologyAnnotation.fromString(defaultArg(value, ""), termSource, termAccesssion)]);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export function Value_toOptions_72E9EF0F(value) {
|
|
98
|
-
switch (value.tag) {
|
|
99
|
-
case 1:
|
|
100
|
-
return [int32ToString(value.fields[0]), void 0, void 0];
|
|
101
|
-
case 2:
|
|
102
|
-
return [value.fields[0].toString(), void 0, void 0];
|
|
103
|
-
case 3:
|
|
104
|
-
return [value.fields[0], void 0, void 0];
|
|
105
|
-
default: {
|
|
106
|
-
const oa = value.fields[0];
|
|
107
|
-
return [map(AnnotationValue_toString_Z6FAD7738, oa.Name), oa.TermAccessionNumber, oa.TermSourceREF];
|
|
85
|
+
AsFloat() {
|
|
86
|
+
const this$ = this;
|
|
87
|
+
if (this$.tag === 2) {
|
|
88
|
+
return this$.fields[0];
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
throw new Error(`Value ${this$} is not of case float`);
|
|
108
92
|
}
|
|
109
93
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
switch (this$.tag) {
|
|
114
|
-
case 2:
|
|
115
|
-
return this$.fields[0].toString();
|
|
116
|
-
case 1:
|
|
117
|
-
return int32ToString(this$.fields[0]);
|
|
118
|
-
case 3:
|
|
94
|
+
AsOntology() {
|
|
95
|
+
const this$ = this;
|
|
96
|
+
if (this$.tag === 0) {
|
|
119
97
|
return this$.fields[0];
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export function Value__AsName(this$) {
|
|
126
|
-
if (this$.tag === 3) {
|
|
127
|
-
return this$.fields[0];
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
throw new Error(`Value ${this$} is not of case name`);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export function Value__AsInt(this$) {
|
|
135
|
-
if (this$.tag === 1) {
|
|
136
|
-
return this$.fields[0] | 0;
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
throw new Error(`Value ${this$} is not of case int`);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export function Value__AsFloat(this$) {
|
|
144
|
-
if (this$.tag === 2) {
|
|
145
|
-
return this$.fields[0];
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
throw new Error(`Value ${this$} is not of case float`);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export function Value__AsOntology(this$) {
|
|
153
|
-
if (this$.tag === 0) {
|
|
154
|
-
return this$.fields[0];
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
throw new Error(`Value ${this$} is not of case ontology`);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export function Value__get_IsAnOntology(this$) {
|
|
162
|
-
if (this$.tag === 0) {
|
|
163
|
-
return true;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
throw new Error(`Value ${this$} is not of case ontology`);
|
|
101
|
+
}
|
|
164
102
|
}
|
|
165
|
-
|
|
166
|
-
|
|
103
|
+
get IsAnOntology() {
|
|
104
|
+
const this$ = this;
|
|
105
|
+
return this$.tag === 0;
|
|
167
106
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
107
|
+
get IsNumerical() {
|
|
108
|
+
const this$ = this;
|
|
109
|
+
switch (this$.tag) {
|
|
110
|
+
case 1:
|
|
111
|
+
case 2:
|
|
112
|
+
return true;
|
|
113
|
+
default:
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
177
116
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
if (this$.tag === 1) {
|
|
182
|
-
return true;
|
|
117
|
+
get IsAnInt() {
|
|
118
|
+
const this$ = this;
|
|
119
|
+
return this$.tag === 1;
|
|
183
120
|
}
|
|
184
|
-
|
|
185
|
-
|
|
121
|
+
get IsAFloat() {
|
|
122
|
+
const this$ = this;
|
|
123
|
+
return this$.tag === 2;
|
|
186
124
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
if (this$.tag === 2) {
|
|
191
|
-
return true;
|
|
125
|
+
get IsAText() {
|
|
126
|
+
const this$ = this;
|
|
127
|
+
return this$.tag === 3;
|
|
192
128
|
}
|
|
193
|
-
|
|
194
|
-
return
|
|
129
|
+
static getText(v) {
|
|
130
|
+
return v.Text;
|
|
195
131
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
if (this$.tag === 3) {
|
|
200
|
-
return true;
|
|
132
|
+
Print() {
|
|
133
|
+
const this$ = this;
|
|
134
|
+
return toString(this$);
|
|
201
135
|
}
|
|
202
|
-
|
|
203
|
-
|
|
136
|
+
PrintCompact() {
|
|
137
|
+
const this$ = this;
|
|
138
|
+
return (this$.tag === 1) ? toText(printf("%i"))(this$.fields[0]) : ((this$.tag === 2) ? toText(printf("%f"))(this$.fields[0]) : ((this$.tag === 3) ? this$.fields[0] : this$.fields[0].NameText));
|
|
204
139
|
}
|
|
205
140
|
}
|
|
206
141
|
|
|
207
|
-
export function
|
|
208
|
-
return
|
|
142
|
+
export function Value_$reflection() {
|
|
143
|
+
return union_type("ARCtrl.ISA.Value", [], Value, () => [[["Item", OntologyAnnotation_$reflection()]], [["Item", int32_type]], [["Item", float64_type]], [["Item", string_type]]]);
|
|
209
144
|
}
|
|
210
145
|
|
package/ISA/ISA/Regex.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { create, match } from "../../fable_modules/fable-library.4.5.0/RegExp.js";
|
|
2
|
-
import { value as value_1, map, some } from "../../fable_modules/fable-library.4.5.0/Option.js";
|
|
3
2
|
import { parse } from "../../fable_modules/fable-library.4.5.0/Int32.js";
|
|
3
|
+
import { map } from "../../fable_modules/fable-library.4.5.0/Option.js";
|
|
4
|
+
|
|
5
|
+
export function Pattern_handleGroupPatterns(pattern) {
|
|
6
|
+
return pattern;
|
|
7
|
+
}
|
|
4
8
|
|
|
5
9
|
export const Pattern_ExcelNumberFormat = `"(?<${"numberFormat"}>(.*?))"`;
|
|
6
10
|
|
|
@@ -20,7 +24,7 @@ export const Pattern_OutputPattern = `Output\\s\\[(?<${"iotype"}>.+)\\]`;
|
|
|
20
24
|
* Matches, if the input string matches the given regex pattern.
|
|
21
25
|
*/
|
|
22
26
|
export function ActivePatterns_$007CRegex$007C_$007C(pattern, input) {
|
|
23
|
-
const m = match(create(pattern), input.trim());
|
|
27
|
+
const m = match(create(Pattern_handleGroupPatterns(pattern)), input.trim());
|
|
24
28
|
if (m != null) {
|
|
25
29
|
return m;
|
|
26
30
|
}
|
|
@@ -66,8 +70,10 @@ export function ActivePatterns_$007CTermColumn$007C_$007C(input) {
|
|
|
66
70
|
* Matches a "Unit" column header.
|
|
67
71
|
*/
|
|
68
72
|
export function ActivePatterns_$007CUnitColumnHeader$007C_$007C(input) {
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
const activePatternResult = ActivePatterns_$007CRegex$007C_$007C("Unit", input);
|
|
74
|
+
if (activePatternResult != null) {
|
|
75
|
+
const o = activePatternResult;
|
|
76
|
+
return o[0];
|
|
71
77
|
}
|
|
72
78
|
else {
|
|
73
79
|
return void 0;
|
|
@@ -462,8 +468,8 @@ export function tryParseTermColumn(input) {
|
|
|
462
468
|
export function tryParseUnitColumnHeader(input) {
|
|
463
469
|
const activePatternResult = ActivePatterns_$007CUnitColumnHeader$007C_$007C(input);
|
|
464
470
|
if (activePatternResult != null) {
|
|
465
|
-
const r =
|
|
466
|
-
return
|
|
471
|
+
const r = activePatternResult;
|
|
472
|
+
return r;
|
|
467
473
|
}
|
|
468
474
|
else {
|
|
469
475
|
return void 0;
|