@nfdi4plants/arctrl 1.0.0-beta.7 → 1.0.0-beta.9

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.
@@ -1,11 +1,11 @@
1
+ import { bind, unwrap, map, defaultArg } from "../../../fable_modules/fable-library.4.5.0/Option.js";
2
+ import { int32ToString } from "../../../fable_modules/fable-library.4.5.0/Util.js";
3
+ import { printf, toText } from "../../../fable_modules/fable-library.4.5.0/String.js";
4
+ import { ProtocolParameter_$reflection, ProtocolParameter } from "./ProtocolParameter.js";
1
5
  import { Record, toString } from "../../../fable_modules/fable-library.4.5.0/Types.js";
2
- import { bind, defaultArg, map } from "../../../fable_modules/fable-library.4.5.0/Option.js";
3
- import { ProtocolParameter__SetCategory_Z4C0FE73C, ProtocolParameter_create_Z6C54B221, ProtocolParameter__MapCategory_Z69DD836A, ProtocolParameter__get_TryNameText, ProtocolParameter_$reflection, ProtocolParameter__get_NameText } from "./ProtocolParameter.js";
4
6
  import { record_type, option_type } from "../../../fable_modules/fable-library.4.5.0/Reflection.js";
5
7
  import { Value_$reflection } from "./Value.js";
6
8
  import { OntologyAnnotation_$reflection } from "./OntologyAnnotation.js";
7
- import { int32ToString } from "../../../fable_modules/fable-library.4.5.0/Util.js";
8
- import { printf, toText } from "../../../fable_modules/fable-library.4.5.0/String.js";
9
9
 
10
10
  export class ProcessParameterValue extends Record {
11
11
  constructor(Category, Value, Unit) {
@@ -14,6 +14,71 @@ export class ProcessParameterValue extends Record {
14
14
  this.Value = Value;
15
15
  this.Unit = Unit;
16
16
  }
17
+ static make(category, value, unit) {
18
+ return new ProcessParameterValue(category, value, unit);
19
+ }
20
+ static create(Category, Value, Unit) {
21
+ return ProcessParameterValue.make(Category, Value, Unit);
22
+ }
23
+ static get empty() {
24
+ return ProcessParameterValue.create();
25
+ }
26
+ get NameText() {
27
+ const this$ = this;
28
+ return defaultArg(map((oa) => oa.NameText, this$.Category), "");
29
+ }
30
+ get TryNameText() {
31
+ const this$ = this;
32
+ return unwrap(bind((oa) => oa.TryNameText, this$.Category));
33
+ }
34
+ get ValueText() {
35
+ const this$ = this;
36
+ return defaultArg(map((oa) => {
37
+ switch (oa.tag) {
38
+ case 2:
39
+ return oa.fields[0].toString();
40
+ case 1:
41
+ return int32ToString(oa.fields[0]);
42
+ case 3:
43
+ return oa.fields[0];
44
+ default:
45
+ return oa.fields[0].NameText;
46
+ }
47
+ }, this$.Value), "");
48
+ }
49
+ get ValueWithUnitText() {
50
+ const this$ = this;
51
+ const unit = map((oa) => oa.NameText, this$.Unit);
52
+ const v = this$.ValueText;
53
+ if (unit == null) {
54
+ return v;
55
+ }
56
+ else {
57
+ const u = unit;
58
+ return toText(printf("%s %s"))(v)(u);
59
+ }
60
+ }
61
+ MapCategory(f) {
62
+ const this$ = this;
63
+ return new ProcessParameterValue(map((p) => p.MapCategory(f), this$.Category), this$.Value, this$.Unit);
64
+ }
65
+ SetCategory(c) {
66
+ let matchValue, p;
67
+ const this$ = this;
68
+ return new ProcessParameterValue((matchValue = this$.Category, (matchValue == null) ? ProtocolParameter.create(void 0, c) : ((p = matchValue, p.SetCategory(c)))), this$.Value, this$.Unit);
69
+ }
70
+ static tryGetNameText(pv) {
71
+ return pv.TryNameText;
72
+ }
73
+ static getNameText(pv) {
74
+ return pv.NameText;
75
+ }
76
+ static nameEqualsString(name, pv) {
77
+ return pv.NameText === name;
78
+ }
79
+ static getCategory(pv) {
80
+ return pv.Category;
81
+ }
17
82
  Print() {
18
83
  const this$ = this;
19
84
  return toString(this$);
@@ -21,7 +86,7 @@ export class ProcessParameterValue extends Record {
21
86
  PrintCompact() {
22
87
  let value_2, category_2, category_1, value_1;
23
88
  const this$ = this;
24
- const category = map(ProtocolParameter__get_NameText, this$.Category);
89
+ const category = map((f) => f.NameText, this$.Category);
25
90
  const unit = map((oa) => oa.NameText, this$.Unit);
26
91
  const value = map((v) => {
27
92
  const s = v.PrintCompact();
@@ -40,90 +105,3 @@ export function ProcessParameterValue_$reflection() {
40
105
  return record_type("ARCtrl.ISA.ProcessParameterValue", [], ProcessParameterValue, () => [["Category", option_type(ProtocolParameter_$reflection())], ["Value", option_type(Value_$reflection())], ["Unit", option_type(OntologyAnnotation_$reflection())]]);
41
106
  }
42
107
 
43
- export function ProcessParameterValue_make(category, value, unit) {
44
- return new ProcessParameterValue(category, value, unit);
45
- }
46
-
47
- export function ProcessParameterValue_create_569825F3(Category, Value, Unit) {
48
- return ProcessParameterValue_make(Category, Value, Unit);
49
- }
50
-
51
- export function ProcessParameterValue_get_empty() {
52
- return ProcessParameterValue_create_569825F3();
53
- }
54
-
55
- /**
56
- * Returns the name of the category as string
57
- */
58
- export function ProcessParameterValue__get_NameText(this$) {
59
- return defaultArg(map(ProtocolParameter__get_NameText, this$.Category), "");
60
- }
61
-
62
- /**
63
- * Returns the name of the category as string
64
- */
65
- export function ProcessParameterValue__get_TryNameText(this$) {
66
- return bind(ProtocolParameter__get_TryNameText, this$.Category);
67
- }
68
-
69
- export function ProcessParameterValue__get_ValueText(this$) {
70
- return defaultArg(map((oa) => {
71
- switch (oa.tag) {
72
- case 2:
73
- return oa.fields[0].toString();
74
- case 1:
75
- return int32ToString(oa.fields[0]);
76
- case 3:
77
- return oa.fields[0];
78
- default:
79
- return oa.fields[0].NameText;
80
- }
81
- }, this$.Value), "");
82
- }
83
-
84
- export function ProcessParameterValue__get_ValueWithUnitText(this$) {
85
- const unit = map((oa) => oa.NameText, this$.Unit);
86
- const v = ProcessParameterValue__get_ValueText(this$);
87
- if (unit == null) {
88
- return v;
89
- }
90
- else {
91
- const u = unit;
92
- return toText(printf("%s %s"))(v)(u);
93
- }
94
- }
95
-
96
- export function ProcessParameterValue__MapCategory_Z69DD836A(this$, f) {
97
- return new ProcessParameterValue(map((p) => ProtocolParameter__MapCategory_Z69DD836A(p, f), this$.Category), this$.Value, this$.Unit);
98
- }
99
-
100
- export function ProcessParameterValue__SetCategory_Z4C0FE73C(this$, c) {
101
- let matchValue;
102
- return new ProcessParameterValue((matchValue = this$.Category, (matchValue == null) ? ProtocolParameter_create_Z6C54B221(void 0, c) : ProtocolParameter__SetCategory_Z4C0FE73C(matchValue, c)), this$.Value, this$.Unit);
103
- }
104
-
105
- /**
106
- * Returns the name of the paramater value as string if it exists
107
- */
108
- export function ProcessParameterValue_tryGetNameText_5FD7232D(pv) {
109
- return ProcessParameterValue__get_TryNameText(pv);
110
- }
111
-
112
- /**
113
- * Returns the name of the paramater value as string
114
- */
115
- export function ProcessParameterValue_getNameText_5FD7232D(pv) {
116
- return ProcessParameterValue__get_NameText(pv);
117
- }
118
-
119
- /**
120
- * Returns true if the given name matches the name of the parameter value
121
- */
122
- export function ProcessParameterValue_nameEqualsString(name, pv) {
123
- return ProcessParameterValue__get_NameText(pv) === name;
124
- }
125
-
126
- export function ProcessParameterValue_getCategory_5FD7232D(pv) {
127
- return pv.Category;
128
- }
129
-
@@ -1,8 +1,8 @@
1
- import { Record, toString } from "../../../fable_modules/fable-library.4.5.0/Types.js";
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 " + ProtocolParameter__get_NameText(this$);
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
- Print() {
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(2, [parse(value)]);
22
+ return new Value(1, [parse_1(value, 511, false, 32)]);
41
23
  }
42
- catch (matchValue_1) {
43
- return new Value(3, [value]);
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
- export function Value_fromOptions(value, termSource, termAccesssion) {
49
- let matchResult, value_1;
50
- if (value == null) {
51
- if (termSource == null) {
52
- if (termAccesssion == null) {
53
- matchResult = 1;
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
- else {
56
- matchResult = 2;
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
- matchResult = 2;
73
+ throw new Error(`Value ${this$} is not of case name`);
61
74
  }
62
75
  }
63
- else if (termSource == null) {
64
- if (termAccesssion == null) {
65
- matchResult = 0;
66
- value_1 = value;
76
+ AsInt() {
77
+ const this$ = this;
78
+ if (this$.tag === 1) {
79
+ return this$.fields[0] | 0;
67
80
  }
68
81
  else {
69
- matchResult = 2;
82
+ throw new Error(`Value ${this$} is not of case int`);
70
83
  }
71
84
  }
72
- else {
73
- matchResult = 2;
74
- }
75
- switch (matchResult) {
76
- case 0:
77
- return (() => {
78
- try {
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
- export function Value__get_Text(this$) {
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
- default:
121
- return this$.fields[0].NameText;
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
- else {
166
- return false;
103
+ get IsAnOntology() {
104
+ const this$ = this;
105
+ return this$.tag === 0;
167
106
  }
168
- }
169
-
170
- export function Value__get_IsNumerical(this$) {
171
- switch (this$.tag) {
172
- case 1:
173
- case 2:
174
- return true;
175
- default:
176
- return false;
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
- export function Value__get_IsAnInt(this$) {
181
- if (this$.tag === 1) {
182
- return true;
117
+ get IsAnInt() {
118
+ const this$ = this;
119
+ return this$.tag === 1;
183
120
  }
184
- else {
185
- return false;
121
+ get IsAFloat() {
122
+ const this$ = this;
123
+ return this$.tag === 2;
186
124
  }
187
- }
188
-
189
- export function Value__get_IsAFloat(this$) {
190
- if (this$.tag === 2) {
191
- return true;
125
+ get IsAText() {
126
+ const this$ = this;
127
+ return this$.tag === 3;
192
128
  }
193
- else {
194
- return false;
129
+ static getText(v) {
130
+ return v.Text;
195
131
  }
196
- }
197
-
198
- export function Value__get_IsAText(this$) {
199
- if (this$.tag === 3) {
200
- return true;
132
+ Print() {
133
+ const this$ = this;
134
+ return toString(this$);
201
135
  }
202
- else {
203
- return false;
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 Value_getText_72E9EF0F(v) {
208
- return Value__get_Text(v);
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
- if (ActivePatterns_$007CRegex$007C_$007C("Unit", input) != null) {
70
- return some(void 0);
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 = value_1(activePatternResult);
466
- return some(void 0);
471
+ const r = activePatternResult;
472
+ return r;
467
473
  }
468
474
  else {
469
475
  return void 0;