@nfdi4plants/arctrl 2.1.0-alpha.4 → 2.2.1

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 (88) hide show
  1. package/CWL/CWLTypes.js +135 -0
  2. package/CWL/Decode.js +585 -0
  3. package/CWL/Inputs.js +62 -0
  4. package/CWL/Outputs.js +59 -0
  5. package/CWL/Requirements.js +72 -0
  6. package/CWL/ToolDescription.js +81 -0
  7. package/CWL/WorkflowDescription.js +81 -0
  8. package/CWL/WorkflowSteps.js +98 -0
  9. package/Core/ArcTypes.js +76 -87
  10. package/Core/Helper/Identifier.js +2 -2
  11. package/Core/OntologyAnnotation.js +8 -5
  12. package/Core/Table/ArcTable.js +15 -7
  13. package/Core/Table/CompositeHeader.js +4 -0
  14. package/Core/Template.js +8 -0
  15. package/Json/{ROCrateObject.js → LDObject.js} +66 -17
  16. package/Json/Process/Material.js +32 -8
  17. package/Json/Process/ProcessInput.js +3 -3
  18. package/Json/Process/Sample.js +32 -8
  19. package/Json/Process/Source.js +32 -8
  20. package/Json/context/rocrate/isa_assay_context.js +4 -4
  21. package/JsonIO/LDObject.js +31 -0
  22. package/ROCrate/ArcROCrateMetadata.js +35 -0
  23. package/ROCrate/ISAProfile/Assay.js +30 -2
  24. package/ROCrate/ISAProfile/Data.js +32 -5
  25. package/ROCrate/ISAProfile/Dataset.js +3 -3
  26. package/ROCrate/ISAProfile/Investigation.js +30 -2
  27. package/ROCrate/ISAProfile/LabProcess.js +113 -5
  28. package/ROCrate/ISAProfile/LabProtocol.js +4 -4
  29. package/ROCrate/ISAProfile/Person.js +32 -5
  30. package/ROCrate/ISAProfile/PropertyValue.js +59 -5
  31. package/ROCrate/ISAProfile/Sample.js +32 -5
  32. package/ROCrate/ISAProfile/ScholarlyArticle.js +59 -5
  33. package/ROCrate/ISAProfile/Study.js +30 -2
  34. package/ROCrate/LDObject.js +105 -0
  35. package/Spreadsheet/AnnotationTable/ArcTable.js +8 -5
  36. package/Spreadsheet/Template.js +29 -11
  37. package/Yaml/ValidationPackage.js +6 -6
  38. package/Yaml/ValidationPackagesConfig.js +6 -6
  39. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynObj.fs +4 -4
  40. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynObj.fs.js +0 -44
  41. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/HashCodes.fs +4 -1
  42. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/HashCodes.fs.js +8 -3
  43. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Debug/netstandard2.0/DynamicObj.AssemblyInfo.fs +1 -1
  44. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Release/netstandard2.0/DynamicObj.AssemblyInfo.fs +3 -3
  45. package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Decode.fs +398 -373
  46. package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Decode.fs.js +35 -2
  47. package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Debug/netstandard2.0/YAMLicious.AssemblyInfo.fs +1 -1
  48. package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Release/netstandard2.0/YAMLicious.AssemblyInfo.fs +1 -1
  49. package/fable_modules/project_cracked.json +1 -1
  50. package/package.json +1 -1
  51. package/JsonIO/ROCrateObject.js +0 -146
  52. package/ROCrate/ROCrateObject.js +0 -61
  53. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynamicObj.fableproj +0 -0
  54. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynamicObj.fs +0 -0
  55. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynamicObj.fs.js +0 -0
  56. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/FableJS.fs +0 -0
  57. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/FableJS.fs.js +0 -0
  58. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/FablePy.fs +0 -0
  59. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/PropertyHelper.fs +0 -0
  60. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/PropertyHelper.fs.js +0 -0
  61. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/ReflectionUtils.fs +0 -0
  62. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/ReflectionUtils.fs.js +0 -0
  63. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  64. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  65. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Encode.fs +0 -0
  66. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Encode.fs.js +0 -0
  67. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Interop/JsInterop.fs +0 -0
  68. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Interop/JsInterop.fs.js +0 -0
  69. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Interop/PyInterop.fs +0 -0
  70. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Library.fs +0 -0
  71. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Library.fs.js +0 -0
  72. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Persil.fs +0 -0
  73. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Persil.fs.js +0 -0
  74. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Preprocessing.fs +0 -0
  75. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Preprocessing.fs.js +0 -0
  76. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Reader.fs +0 -0
  77. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Reader.fs.js +0 -0
  78. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Regex.fs +0 -0
  79. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Regex.fs.js +0 -0
  80. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/RegexActivePatterns.fs +0 -0
  81. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/RegexActivePatterns.fs.js +0 -0
  82. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Writer.fs +0 -0
  83. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Writer.fs.js +0 -0
  84. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/YAMLicious.fableproj +0 -0
  85. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/YAMLiciousTypes.fs +0 -0
  86. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/YAMLiciousTypes.fs.js +0 -0
  87. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  88. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
@@ -1,11 +1,11 @@
1
1
  import { defaultOf } from "../../fable_modules/fable-library-js.4.22.0/Util.js";
2
2
  import { FSharpRef } from "../../fable_modules/fable-library-js.4.22.0/Types.js";
3
- import { setOptionalProperty } from "../../fable_modules/DynamicObj.4.0.0/DynObj.fs.js";
4
- import { ROCrateObject_$reflection, ROCrateObject } from "../ROCrateObject.js";
3
+ import { setOptionalProperty } from "../../fable_modules/DynamicObj.4.0.3/DynObj.fs.js";
4
+ import { LDObject_$reflection, LDObject } from "../LDObject.js";
5
5
  import { unwrap } from "../../fable_modules/fable-library-js.4.22.0/Option.js";
6
6
  import { class_type } from "../../fable_modules/fable-library-js.4.22.0/Reflection.js";
7
7
 
8
- export class LabProtocol extends ROCrateObject {
8
+ export class LabProtocol extends LDObject {
9
9
  constructor(id, additionalType, name, intendedUse, description, url, comment, version, labEquipment, reagent, computationalTool) {
10
10
  super(id, "bioschemas.org/LabProtocol", unwrap(additionalType));
11
11
  const this$ = new FSharpRef(defaultOf());
@@ -24,7 +24,7 @@ export class LabProtocol extends ROCrateObject {
24
24
  }
25
25
 
26
26
  export function LabProtocol_$reflection() {
27
- return class_type("ARCtrl.ROCrate.LabProtocol", undefined, LabProtocol, ROCrateObject_$reflection());
27
+ return class_type("ARCtrl.ROCrate.LabProtocol", undefined, LabProtocol, LDObject_$reflection());
28
28
  }
29
29
 
30
30
  export function LabProtocol_$ctor_3514295B(id, additionalType, name, intendedUse, description, url, comment, version, labEquipment, reagent, computationalTool) {
@@ -1,11 +1,11 @@
1
+ import { setOptionalProperty, setProperty, tryGetPropertyValue } from "../../fable_modules/DynamicObj.4.0.3/DynObj.fs.js";
2
+ import { unwrap, value as value_1 } from "../../fable_modules/fable-library-js.4.22.0/Option.js";
1
3
  import { defaultOf } from "../../fable_modules/fable-library-js.4.22.0/Util.js";
2
4
  import { FSharpRef } from "../../fable_modules/fable-library-js.4.22.0/Types.js";
3
- import { setOptionalProperty, setProperty } from "../../fable_modules/DynamicObj.4.0.0/DynObj.fs.js";
4
- import { ROCrateObject_$reflection, ROCrateObject } from "../ROCrateObject.js";
5
- import { unwrap } from "../../fable_modules/fable-library-js.4.22.0/Option.js";
5
+ import { LDObject_$reflection, LDObject } from "../LDObject.js";
6
6
  import { class_type } from "../../fable_modules/fable-library-js.4.22.0/Reflection.js";
7
7
 
8
- export class Person extends ROCrateObject {
8
+ export class Person extends LDObject {
9
9
  constructor(id, givenName, additionalType, familyName, email, identifier, affiliation, jobTitle, additionalName, address, telephone, faxNumber, disambiguatingDescription) {
10
10
  super(id, "schema.org/Person", unwrap(additionalType));
11
11
  const this$ = new FSharpRef(defaultOf());
@@ -23,10 +23,37 @@ export class Person extends ROCrateObject {
23
23
  setOptionalProperty("faxNumber", faxNumber, this$.contents);
24
24
  setOptionalProperty("disambiguatingDescription", disambiguatingDescription, this$.contents);
25
25
  }
26
+ GetGivenName() {
27
+ const this$ = this;
28
+ const obj = this$;
29
+ if (tryGetPropertyValue("givenName", obj) != null) {
30
+ let matchValue;
31
+ const matchValue_1 = obj.TryGetPropertyValue("givenName");
32
+ if (matchValue_1 != null) {
33
+ const o = value_1(matchValue_1);
34
+ matchValue = ((typeof o === "string") ? o : undefined);
35
+ }
36
+ else {
37
+ matchValue = undefined;
38
+ }
39
+ if (matchValue == null) {
40
+ throw new Error(`Property '${"givenName"}' is set on this '${"Person"}' object but cannot be cast to '${"String"}'`);
41
+ }
42
+ else {
43
+ return matchValue;
44
+ }
45
+ }
46
+ else {
47
+ throw new Error(`No property '${"givenName"}' set on this '${"Person"}' object although it is mandatory. Was it created correctly?`);
48
+ }
49
+ }
50
+ static get getGivenName() {
51
+ return (p) => p.GetGivenName();
52
+ }
26
53
  }
27
54
 
28
55
  export function Person_$reflection() {
29
- return class_type("ARCtrl.ROCrate.Person", undefined, Person, ROCrateObject_$reflection());
56
+ return class_type("ARCtrl.ROCrate.Person", undefined, Person, LDObject_$reflection());
30
57
  }
31
58
 
32
59
  export function Person_$ctor_Z45412208(id, givenName, additionalType, familyName, email, identifier, affiliation, jobTitle, additionalName, address, telephone, faxNumber, disambiguatingDescription) {
@@ -1,11 +1,11 @@
1
+ import { setOptionalProperty, setProperty, tryGetPropertyValue } from "../../fable_modules/DynamicObj.4.0.3/DynObj.fs.js";
2
+ import { unwrap, value as value_1 } from "../../fable_modules/fable-library-js.4.22.0/Option.js";
1
3
  import { defaultOf } from "../../fable_modules/fable-library-js.4.22.0/Util.js";
2
4
  import { FSharpRef } from "../../fable_modules/fable-library-js.4.22.0/Types.js";
3
- import { setOptionalProperty, setProperty } from "../../fable_modules/DynamicObj.4.0.0/DynObj.fs.js";
4
- import { ROCrateObject_$reflection, ROCrateObject } from "../ROCrateObject.js";
5
- import { unwrap } from "../../fable_modules/fable-library-js.4.22.0/Option.js";
5
+ import { LDObject_$reflection, LDObject } from "../LDObject.js";
6
6
  import { class_type } from "../../fable_modules/fable-library-js.4.22.0/Reflection.js";
7
7
 
8
- export class PropertyValue extends ROCrateObject {
8
+ export class PropertyValue extends LDObject {
9
9
  constructor(id, name, value, propertyID, unitCode, unitText, valueReference, additionalType) {
10
10
  super(id, "schema.org/PropertyValue", unwrap(additionalType));
11
11
  const this$ = new FSharpRef(defaultOf());
@@ -18,10 +18,64 @@ export class PropertyValue extends ROCrateObject {
18
18
  setOptionalProperty("unitText", unitText, this$.contents);
19
19
  setOptionalProperty("valueReference", valueReference, this$.contents);
20
20
  }
21
+ GetName() {
22
+ const this$ = this;
23
+ const obj = this$;
24
+ if (tryGetPropertyValue("name", obj) != null) {
25
+ let matchValue;
26
+ const matchValue_1 = obj.TryGetPropertyValue("name");
27
+ if (matchValue_1 != null) {
28
+ const o = value_1(matchValue_1);
29
+ matchValue = ((typeof o === "string") ? o : undefined);
30
+ }
31
+ else {
32
+ matchValue = undefined;
33
+ }
34
+ if (matchValue == null) {
35
+ throw new Error(`Property '${"name"}' is set on this '${"PropertyValue"}' object but cannot be cast to '${"String"}'`);
36
+ }
37
+ else {
38
+ return matchValue;
39
+ }
40
+ }
41
+ else {
42
+ throw new Error(`No property '${"name"}' set on this '${"PropertyValue"}' object although it is mandatory. Was it created correctly?`);
43
+ }
44
+ }
45
+ static get getName() {
46
+ return (lp) => lp.GetName();
47
+ }
48
+ GetValue() {
49
+ const this$ = this;
50
+ const obj = this$;
51
+ if (tryGetPropertyValue("name", obj) != null) {
52
+ let matchValue;
53
+ const matchValue_1 = obj.TryGetPropertyValue("name");
54
+ if (matchValue_1 != null) {
55
+ const o = value_1(matchValue_1);
56
+ matchValue = ((typeof o === "string") ? o : undefined);
57
+ }
58
+ else {
59
+ matchValue = undefined;
60
+ }
61
+ if (matchValue == null) {
62
+ throw new Error(`Property '${"name"}' is set on this '${"PropertyValue"}' object but cannot be cast to '${"String"}'`);
63
+ }
64
+ else {
65
+ return matchValue;
66
+ }
67
+ }
68
+ else {
69
+ throw new Error(`No property '${"name"}' set on this '${"PropertyValue"}' object although it is mandatory. Was it created correctly?`);
70
+ }
71
+ }
72
+ static get getValue() {
73
+ return (lp) => lp.GetValue();
74
+ }
21
75
  }
22
76
 
23
77
  export function PropertyValue_$reflection() {
24
- return class_type("ARCtrl.ROCrate.PropertyValue", undefined, PropertyValue, ROCrateObject_$reflection());
78
+ return class_type("ARCtrl.ROCrate.PropertyValue", undefined, PropertyValue, LDObject_$reflection());
25
79
  }
26
80
 
27
81
  export function PropertyValue_$ctor_7804003(id, name, value, propertyID, unitCode, unitText, valueReference, additionalType) {
@@ -1,11 +1,11 @@
1
+ import { setOptionalProperty, setProperty, tryGetPropertyValue } from "../../fable_modules/DynamicObj.4.0.3/DynObj.fs.js";
2
+ import { unwrap, value as value_1 } from "../../fable_modules/fable-library-js.4.22.0/Option.js";
1
3
  import { defaultOf } from "../../fable_modules/fable-library-js.4.22.0/Util.js";
2
4
  import { FSharpRef } from "../../fable_modules/fable-library-js.4.22.0/Types.js";
3
- import { setOptionalProperty, setProperty } from "../../fable_modules/DynamicObj.4.0.0/DynObj.fs.js";
4
- import { ROCrateObject_$reflection, ROCrateObject } from "../ROCrateObject.js";
5
- import { unwrap } from "../../fable_modules/fable-library-js.4.22.0/Option.js";
5
+ import { LDObject_$reflection, LDObject } from "../LDObject.js";
6
6
  import { class_type } from "../../fable_modules/fable-library-js.4.22.0/Reflection.js";
7
7
 
8
- export class Sample extends ROCrateObject {
8
+ export class Sample extends LDObject {
9
9
  constructor(id, name, additionalType, additionalProperty, derivesFrom) {
10
10
  super(id, "bioschemas.org/Sample", unwrap(additionalType));
11
11
  const this$ = new FSharpRef(defaultOf());
@@ -15,10 +15,37 @@ export class Sample extends ROCrateObject {
15
15
  setOptionalProperty("additionalProperty", additionalProperty, this$.contents);
16
16
  setOptionalProperty("derivesFrom", derivesFrom, this$.contents);
17
17
  }
18
+ GetName() {
19
+ const this$ = this;
20
+ const obj = this$;
21
+ if (tryGetPropertyValue("name", obj) != null) {
22
+ let matchValue;
23
+ const matchValue_1 = obj.TryGetPropertyValue("name");
24
+ if (matchValue_1 != null) {
25
+ const o = value_1(matchValue_1);
26
+ matchValue = ((typeof o === "string") ? o : undefined);
27
+ }
28
+ else {
29
+ matchValue = undefined;
30
+ }
31
+ if (matchValue == null) {
32
+ throw new Error(`Property '${"name"}' is set on this '${"Sample"}' object but cannot be cast to '${"String"}'`);
33
+ }
34
+ else {
35
+ return matchValue;
36
+ }
37
+ }
38
+ else {
39
+ throw new Error(`No property '${"name"}' set on this '${"Sample"}' object although it is mandatory. Was it created correctly?`);
40
+ }
41
+ }
42
+ static get getName() {
43
+ return (s) => s.GetName();
44
+ }
18
45
  }
19
46
 
20
47
  export function Sample_$reflection() {
21
- return class_type("ARCtrl.ROCrate.Sample", undefined, Sample, ROCrateObject_$reflection());
48
+ return class_type("ARCtrl.ROCrate.Sample", undefined, Sample, LDObject_$reflection());
22
49
  }
23
50
 
24
51
  export function Sample_$ctor_7AC741F8(id, name, additionalType, additionalProperty, derivesFrom) {
@@ -1,11 +1,11 @@
1
+ import { setOptionalProperty, setProperty, tryGetPropertyValue } from "../../fable_modules/DynamicObj.4.0.3/DynObj.fs.js";
2
+ import { unwrap, value as value_1 } from "../../fable_modules/fable-library-js.4.22.0/Option.js";
1
3
  import { defaultOf } from "../../fable_modules/fable-library-js.4.22.0/Util.js";
2
4
  import { FSharpRef } from "../../fable_modules/fable-library-js.4.22.0/Types.js";
3
- import { setOptionalProperty, setProperty } from "../../fable_modules/DynamicObj.4.0.0/DynObj.fs.js";
4
- import { ROCrateObject_$reflection, ROCrateObject } from "../ROCrateObject.js";
5
- import { unwrap } from "../../fable_modules/fable-library-js.4.22.0/Option.js";
5
+ import { LDObject_$reflection, LDObject } from "../LDObject.js";
6
6
  import { class_type } from "../../fable_modules/fable-library-js.4.22.0/Reflection.js";
7
7
 
8
- export class ScholarlyArticle extends ROCrateObject {
8
+ export class ScholarlyArticle extends LDObject {
9
9
  constructor(id, headline, identifier, additionalType, author, url, creativeWorkStatus, disambiguatingDescription) {
10
10
  super(id, "schema.org/ScholarlyArticle", unwrap(additionalType));
11
11
  const this$ = new FSharpRef(defaultOf());
@@ -18,10 +18,64 @@ export class ScholarlyArticle extends ROCrateObject {
18
18
  setOptionalProperty("creativeWorkStatus", creativeWorkStatus, this$.contents);
19
19
  setOptionalProperty("disambiguatingDescription", disambiguatingDescription, this$.contents);
20
20
  }
21
+ GetHeadline() {
22
+ const this$ = this;
23
+ const obj = this$;
24
+ if (tryGetPropertyValue("headline", obj) != null) {
25
+ let matchValue;
26
+ const matchValue_1 = obj.TryGetPropertyValue("headline");
27
+ if (matchValue_1 != null) {
28
+ const o = value_1(matchValue_1);
29
+ matchValue = ((typeof o === "string") ? o : undefined);
30
+ }
31
+ else {
32
+ matchValue = undefined;
33
+ }
34
+ if (matchValue == null) {
35
+ throw new Error(`Property '${"headline"}' is set on this '${"ScholarlyArticle"}' object but cannot be cast to '${"String"}'`);
36
+ }
37
+ else {
38
+ return matchValue;
39
+ }
40
+ }
41
+ else {
42
+ throw new Error(`No property '${"headline"}' set on this '${"ScholarlyArticle"}' object although it is mandatory. Was it created correctly?`);
43
+ }
44
+ }
45
+ static get getHeadline() {
46
+ return (s) => s.GetHeadline();
47
+ }
48
+ GetIdentifier() {
49
+ const this$ = this;
50
+ const obj = this$;
51
+ if (tryGetPropertyValue("identifier", obj) != null) {
52
+ let matchValue;
53
+ const matchValue_1 = obj.TryGetPropertyValue("identifier");
54
+ if (matchValue_1 != null) {
55
+ const o = value_1(matchValue_1);
56
+ matchValue = ((typeof o === "string") ? o : undefined);
57
+ }
58
+ else {
59
+ matchValue = undefined;
60
+ }
61
+ if (matchValue == null) {
62
+ throw new Error(`Property '${"identifier"}' is set on this '${"ScholarlyArticle"}' object but cannot be cast to '${"String"}'`);
63
+ }
64
+ else {
65
+ return matchValue;
66
+ }
67
+ }
68
+ else {
69
+ throw new Error(`No property '${"identifier"}' set on this '${"ScholarlyArticle"}' object although it is mandatory. Was it created correctly?`);
70
+ }
71
+ }
72
+ static get getIdentifier() {
73
+ return (s) => s.GetIdentifier();
74
+ }
21
75
  }
22
76
 
23
77
  export function ScholarlyArticle_$reflection() {
24
- return class_type("ARCtrl.ROCrate.ScholarlyArticle", undefined, ScholarlyArticle, ROCrateObject_$reflection());
78
+ return class_type("ARCtrl.ROCrate.ScholarlyArticle", undefined, ScholarlyArticle, LDObject_$reflection());
25
79
  }
26
80
 
27
81
  export function ScholarlyArticle_$ctor_11693003(id, headline, identifier, additionalType, author, url, creativeWorkStatus, disambiguatingDescription) {
@@ -1,6 +1,7 @@
1
+ import { setOptionalProperty, setProperty, tryGetPropertyValue } from "../../fable_modules/DynamicObj.4.0.3/DynObj.fs.js";
2
+ import { value as value_1 } from "../../fable_modules/fable-library-js.4.22.0/Option.js";
1
3
  import { defaultOf } from "../../fable_modules/fable-library-js.4.22.0/Util.js";
2
4
  import { FSharpRef } from "../../fable_modules/fable-library-js.4.22.0/Types.js";
3
- import { setOptionalProperty, setProperty } from "../../fable_modules/DynamicObj.4.0.0/DynObj.fs.js";
4
5
  import { Dataset_$reflection, Dataset } from "./Dataset.js";
5
6
  import { class_type } from "../../fable_modules/fable-library-js.4.22.0/Reflection.js";
6
7
 
@@ -23,13 +24,40 @@ export class Study extends Dataset {
23
24
  setOptionalProperty("headline", headline, this$.contents);
24
25
  setOptionalProperty("url", url, this$.contents);
25
26
  }
27
+ GetIdentifier() {
28
+ const this$ = this;
29
+ const obj = this$;
30
+ if (tryGetPropertyValue("identifier", obj) != null) {
31
+ let matchValue;
32
+ const matchValue_1 = obj.TryGetPropertyValue("identifier");
33
+ if (matchValue_1 != null) {
34
+ const o = value_1(matchValue_1);
35
+ matchValue = ((typeof o === "string") ? o : undefined);
36
+ }
37
+ else {
38
+ matchValue = undefined;
39
+ }
40
+ if (matchValue == null) {
41
+ throw new Error(`Property '${"identifier"}' is set on this '${"Study"}' object but cannot be cast to '${"String"}'`);
42
+ }
43
+ else {
44
+ return matchValue;
45
+ }
46
+ }
47
+ else {
48
+ throw new Error(`No property '${"identifier"}' set on this '${"Study"}' object although it is mandatory. Was it created correctly?`);
49
+ }
50
+ }
51
+ static get getIdentifier() {
52
+ return (inv) => inv.GetIdentifier();
53
+ }
26
54
  }
27
55
 
28
56
  export function Study_$reflection() {
29
57
  return class_type("ARCtrl.ROCrate.Study", undefined, Study, Dataset_$reflection());
30
58
  }
31
59
 
32
- export function Study_$ctor_Z3E174868(id, identifier, about, citation, comment, creator, dateCreated, dateModified, datePublished, description, hasPart, headline, url) {
60
+ export function Study_$ctor_Z47833D48(id, identifier, about, citation, comment, creator, dateCreated, dateModified, datePublished, description, hasPart, headline, url) {
33
61
  return new Study(id, identifier, about, citation, comment, creator, dateCreated, dateModified, datePublished, description, hasPart, headline, url);
34
62
  }
35
63
 
@@ -0,0 +1,105 @@
1
+ import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js";
2
+ import { class_type } from "../fable_modules/fable-library-js.4.22.0/Reflection.js";
3
+ import { value as value_1, unwrap } from "../fable_modules/fable-library-js.4.22.0/Option.js";
4
+
5
+ export class LDContext extends DynamicObj {
6
+ constructor() {
7
+ super();
8
+ }
9
+ }
10
+
11
+ export function LDContext_$reflection() {
12
+ return class_type("ARCtrl.ROCrate.LDContext", undefined, LDContext, DynamicObj_$reflection());
13
+ }
14
+
15
+ export function LDContext_$ctor() {
16
+ return new LDContext();
17
+ }
18
+
19
+ export class LDObject extends DynamicObj {
20
+ constructor(id, schemaType, additionalType) {
21
+ super();
22
+ this.id = id;
23
+ this["schemaType@22"] = schemaType;
24
+ this["additionalType@23"] = additionalType;
25
+ }
26
+ get Id() {
27
+ const this$ = this;
28
+ return this$.id;
29
+ }
30
+ get SchemaType() {
31
+ const this$ = this;
32
+ return this$["schemaType@22"];
33
+ }
34
+ set SchemaType(value) {
35
+ const this$ = this;
36
+ this$["schemaType@22"] = value;
37
+ }
38
+ get AdditionalType() {
39
+ const this$ = this;
40
+ return unwrap(this$["additionalType@23"]);
41
+ }
42
+ set AdditionalType(value) {
43
+ const this$ = this;
44
+ this$["additionalType@23"] = value;
45
+ }
46
+ SetContext(context) {
47
+ const this$ = this;
48
+ this$.SetProperty("@context", context);
49
+ }
50
+ static setContext(context) {
51
+ return (roc) => {
52
+ roc.SetContext(context);
53
+ };
54
+ }
55
+ TryGetContext() {
56
+ const this$ = this;
57
+ const matchValue = this$.TryGetPropertyValue("@context");
58
+ if (matchValue != null) {
59
+ const o = value_1(matchValue);
60
+ return (o instanceof DynamicObj) ? o : undefined;
61
+ }
62
+ else {
63
+ return undefined;
64
+ }
65
+ }
66
+ static tryGetContext() {
67
+ return (roc) => roc.TryGetContext();
68
+ }
69
+ RemoveContext() {
70
+ const this$ = this;
71
+ return this$.RemoveProperty("@context");
72
+ }
73
+ static removeContext() {
74
+ return (roc) => roc.RemoveContext();
75
+ }
76
+ get SchemaType() {
77
+ const this$ = this;
78
+ return this$["schemaType@22"];
79
+ }
80
+ set SchemaType(value) {
81
+ const this$ = this;
82
+ this$["schemaType@22"] = value;
83
+ }
84
+ get Id() {
85
+ const this$ = this;
86
+ return this$.id;
87
+ }
88
+ get AdditionalType() {
89
+ const this$ = this;
90
+ return unwrap(this$["additionalType@23"]);
91
+ }
92
+ set AdditionalType(value) {
93
+ const this$ = this;
94
+ this$["additionalType@23"] = value;
95
+ }
96
+ }
97
+
98
+ export function LDObject_$reflection() {
99
+ return class_type("ARCtrl.ROCrate.LDObject", undefined, LDObject, DynamicObj_$reflection());
100
+ }
101
+
102
+ export function LDObject_$ctor_Z2FC25A28(id, schemaType, additionalType) {
103
+ return new LDObject(id, schemaType, additionalType);
104
+ }
105
+
@@ -1,6 +1,6 @@
1
1
  import { iterateIndexed, length, sortBy, collect as collect_1, exists, toArray, ofArray, empty, tail, head, isEmpty, cons, singleton, fold, map, reverse } from "../../fable_modules/fable-library-js.4.22.0/List.js";
2
2
  import { item, map as map_1 } from "../../fable_modules/fable-library-js.4.22.0/Array.js";
3
- import { singleton as singleton_1, collect, map as map_2, delay, toArray as toArray_1, tryFind } from "../../fable_modules/fable-library-js.4.22.0/Seq.js";
3
+ import { fold as fold_1, singleton as singleton_1, collect, map as map_2, delay, toArray as toArray_1, tryFind } from "../../fable_modules/fable-library-js.4.22.0/Seq.js";
4
4
  import { toStringCellColumns, fixDeprecatedIOHeader, fromStringCellColumns } from "./CompositeColumn.js";
5
5
  import { printf, toFail } from "../../fable_modules/fable-library-js.4.22.0/String.js";
6
6
  import { Dictionary_tryGet, FsCellsCollection__TryGetCell_Z37302880 } from "../../fable_modules/FsSpreadsheet.6.3.0-alpha.4/Cells/FsCellsCollection.fs.js";
@@ -11,6 +11,7 @@ import { FsRangeBase__Cell_Z3407A44B, FsRangeBase__get_RangeAddress } from "../.
11
11
  import { ArcTable } from "../../Core/Table/ArcTable.js";
12
12
  import { FsWorksheet } from "../../fable_modules/FsSpreadsheet.6.3.0-alpha.4/FsWorksheet.fs.js";
13
13
  import { comparePrimitives } from "../../fable_modules/fable-library-js.4.22.0/Util.js";
14
+ import { max } from "../../fable_modules/fable-library-js.4.22.0/Double.js";
14
15
  import { addToDict } from "../../fable_modules/fable-library-js.4.22.0/MapUtil.js";
15
16
 
16
17
  /**
@@ -121,17 +122,19 @@ export function tryFromFsWorksheet(sheet) {
121
122
  export function toFsWorksheet(index, table) {
122
123
  const stringCount = new Map([]);
123
124
  const ws = new FsWorksheet(table.Name);
124
- if (table.Columns.length === 0) {
125
+ if (table.ColumnCount === 0) {
125
126
  return ws;
126
127
  }
127
128
  else {
128
129
  const columns = collect_1(toStringCellColumns, sortBy(classifyColumnOrder, ofArray(table.Columns), {
129
130
  Compare: comparePrimitives,
130
131
  }));
131
- const maxRow = length(head(columns)) | 0;
132
- const maxCol = length(columns) | 0;
132
+ let tableRowCount;
133
+ const maxRow = fold_1((acc, c) => max(acc, length(c)), 0, columns) | 0;
134
+ tableRowCount = ((maxRow === 1) ? 2 : maxRow);
135
+ const tableColumnCount = length(columns) | 0;
133
136
  const name = (index == null) ? "annotationTable" : (`${"annotationTable"}${index}`);
134
- const fsTable = ws.Table(name, FsRangeAddress_$ctor_7E77A4A0(FsAddress_$ctor_Z37302880(1, 1), FsAddress_$ctor_Z37302880(maxRow, maxCol)));
137
+ const fsTable = ws.Table(name, FsRangeAddress_$ctor_7E77A4A0(FsAddress_$ctor_Z37302880(1, 1), FsAddress_$ctor_Z37302880(tableRowCount, tableColumnCount)));
135
138
  iterateIndexed((colI, col) => {
136
139
  iterateIndexed((rowI, stringCell) => {
137
140
  let value;
@@ -9,13 +9,14 @@ import { createMissingIdentifier } from "../Core/Helper/Identifier.js";
9
9
  import { addToDict } from "../fable_modules/fable-library-js.4.22.0/MapUtil.js";
10
10
  import { List_distinct } from "../fable_modules/fable-library-js.4.22.0/Seq2.js";
11
11
  import { getEnumerator, stringHash } from "../fable_modules/fable-library-js.4.22.0/Util.js";
12
- import { tryPick, iterateIndexed, toList, delay, singleton, append, head, exists, map as map_1 } from "../fable_modules/fable-library-js.4.22.0/Seq.js";
12
+ import { tryPick, iterateIndexed, tryFind, toList, delay, singleton, append, head, exists, map as map_1 } from "../fable_modules/fable-library-js.4.22.0/Seq.js";
13
13
  import { Person_orcidKey } from "../Core/Conversion.js";
14
14
  import { toArray } from "../fable_modules/fable-library-js.4.22.0/Option.js";
15
15
  import { toRows as toRows_1, fromRows as fromRows_1 } from "./Metadata/Contacts.js";
16
16
  import { parse } from "../fable_modules/fable-library-js.4.22.0/Guid.js";
17
17
  import { Template, Organisation } from "../Core/Template.js";
18
18
  import { FsWorksheet } from "../fable_modules/FsSpreadsheet.6.3.0-alpha.4/FsWorksheet.fs.js";
19
+ import { printf, toConsole } from "../fable_modules/fable-library-js.4.22.0/String.js";
19
20
  import { toFsWorksheet, tryFromFsWorksheet } from "./AnnotationTable/ArcTable.js";
20
21
  import { now } from "../fable_modules/fable-library-js.4.22.0/Date.js";
21
22
  import { FsWorkbook } from "../fable_modules/FsSpreadsheet.6.3.0-alpha.4/FsWorkbook.fs.js";
@@ -269,6 +270,23 @@ export function Template_fromParts(templateInfo, ers, tags, authors, table, last
269
270
  return Template.make(id, table, templateInfo.Name, templateInfo.Description, organisation, templateInfo.Version, authors_1, repos, tags_1, lastUpdated);
270
271
  }
271
272
 
273
+ export function Template_isMetadataSheetName(name) {
274
+ if (name === "isa_template") {
275
+ return true;
276
+ }
277
+ else {
278
+ return name === "SwateTemplateMetadata";
279
+ }
280
+ }
281
+
282
+ export function Template_isMetadataSheet(sheet) {
283
+ return Template_isMetadataSheetName(sheet.Name);
284
+ }
285
+
286
+ export function Template_tryGetMetadataSheet(doc) {
287
+ return tryFind(Template_isMetadataSheet, doc.GetWorksheets());
288
+ }
289
+
272
290
  export function Template_toMetadataSheet(template) {
273
291
  const sheet = new FsWorksheet("isa_template");
274
292
  iterateIndexed((rowI, r) => {
@@ -293,39 +311,39 @@ export function Template_fromMetadataCollection(collection) {
293
311
  * Reads an assay from a spreadsheet
294
312
  */
295
313
  export function Template_fromFsWorkbook(doc) {
296
- let matchValue_2, matchValue_4, ws_3, matchValue_5, ws_2, matchValue_3;
314
+ let matchValue_1, matchValue_3, ws_3, matchValue_4, ws_2, matchValue_2;
297
315
  let patternInput;
298
- const matchValue = doc.TryGetWorksheetByName("isa_template");
316
+ const matchValue = Template_tryGetMetadataSheet(doc);
299
317
  if (matchValue == null) {
300
- const matchValue_1 = doc.TryGetWorksheetByName("SwateTemplateMetadata");
301
- patternInput = ((matchValue_1 == null) ? [Metadata_Template_TemplateInfo_get_empty(), empty(), empty(), empty()] : Template_fromMetadataSheet(matchValue_1));
318
+ toConsole(printf("Could not find metadata sheet with sheetname \"isa_template\" or deprecated sheetname \"Template\""));
319
+ patternInput = [Metadata_Template_TemplateInfo_get_empty(), empty(), empty(), empty()];
302
320
  }
303
321
  else {
304
322
  patternInput = Template_fromMetadataSheet(matchValue);
305
323
  }
306
324
  const templateInfo = patternInput[0];
307
325
  const sheets = doc.GetWorksheets();
308
- return Template_fromParts(templateInfo, patternInput[1], patternInput[2], patternInput[3], (matchValue_2 = tryPick((ws) => {
326
+ return Template_fromParts(templateInfo, patternInput[1], patternInput[2], patternInput[3], (matchValue_1 = tryPick((ws) => {
309
327
  if (exists((t) => (t.Name === templateInfo.Table), ws.Tables)) {
310
328
  return ws;
311
329
  }
312
330
  else {
313
331
  return undefined;
314
332
  }
315
- }, sheets), (matchValue_2 == null) ? ((matchValue_4 = tryPick((ws_1) => {
333
+ }, sheets), (matchValue_1 == null) ? ((matchValue_3 = tryPick((ws_1) => {
316
334
  if (ws_1.Name === templateInfo.Table) {
317
335
  return ws_1;
318
336
  }
319
337
  else {
320
338
  return undefined;
321
339
  }
322
- }, sheets), (matchValue_4 == null) ? (() => {
340
+ }, sheets), (matchValue_3 == null) ? (() => {
323
341
  throw new TemplateReadError(`No worksheet or table with name \`${templateInfo.Table}\` found`);
324
- })() : ((ws_3 = matchValue_4, (matchValue_5 = tryFromFsWorksheet(ws_3), (matchValue_5 == null) ? (() => {
342
+ })() : ((ws_3 = matchValue_3, (matchValue_4 = tryFromFsWorksheet(ws_3), (matchValue_4 == null) ? (() => {
325
343
  throw new TemplateReadError(`Ws with name \`${ws_3.Name}\` could not be converted to a table`);
326
- })() : matchValue_5))))) : ((ws_2 = matchValue_2, (matchValue_3 = tryFromFsWorksheet(ws_2), (matchValue_3 == null) ? (() => {
344
+ })() : matchValue_4))))) : ((ws_2 = matchValue_1, (matchValue_2 = tryFromFsWorksheet(ws_2), (matchValue_2 == null) ? (() => {
327
345
  throw new TemplateReadError(`Ws with name \`${ws_2.Name}\` could not be converted to a table`);
328
- })() : matchValue_3)))), now());
346
+ })() : matchValue_2)))), now());
329
347
  }
330
348
 
331
349
  export function Template_toFsWorkbook(template) {
@@ -1,15 +1,15 @@
1
1
  import { ofArray, choose } from "../fable_modules/fable-library-js.4.22.0/List.js";
2
2
  import { equals } from "../fable_modules/fable-library-js.4.22.0/Util.js";
3
- import { Config, YAMLElement } from "../fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js";
4
- import { tryInclude, string } from "../fable_modules/YAMLicious.0.0.1/Encode.fs.js";
3
+ import { Config, YAMLElement } from "../fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js";
4
+ import { tryInclude, string } from "../fable_modules/YAMLicious.0.0.3/Encode.fs.js";
5
5
  import { singleton, collect, delay, toList } from "../fable_modules/fable-library-js.4.22.0/Seq.js";
6
- import { YAMLContent_create_27AED5E3 } from "../fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js";
7
- import { string as string_1, object } from "../fable_modules/YAMLicious.0.0.1/Decode.fs.js";
6
+ import { YAMLContent_create_27AED5E3 } from "../fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js";
7
+ import { string as string_1, object } from "../fable_modules/YAMLicious.0.0.3/Decode.fs.js";
8
8
  import { ValidationPackage } from "../ValidationPackages/ValidationPackage.js";
9
9
  import { unwrap } from "../fable_modules/fable-library-js.4.22.0/Option.js";
10
- import { read } from "../fable_modules/YAMLicious.0.0.1/Reader.fs.js";
10
+ import { read } from "../fable_modules/YAMLicious.0.0.3/Reader.fs.js";
11
11
  import { defaultWhitespace } from "./Encode.js";
12
- import { write } from "../fable_modules/YAMLicious.0.0.1/Writer.fs.js";
12
+ import { write } from "../fable_modules/YAMLicious.0.0.3/Writer.fs.js";
13
13
 
14
14
  export function ValidationPackage_encoder(validationpackage) {
15
15
  const objSeq = choose((tupledArg) => {
@@ -1,16 +1,16 @@
1
1
  import { ofArray, choose } from "../fable_modules/fable-library-js.4.22.0/List.js";
2
2
  import { equals } from "../fable_modules/fable-library-js.4.22.0/Util.js";
3
- import { Config, YAMLElement } from "../fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js";
4
- import { resizearray, string, tryInclude } from "../fable_modules/YAMLicious.0.0.1/Encode.fs.js";
3
+ import { Config, YAMLElement } from "../fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js";
4
+ import { resizearray, string, tryInclude } from "../fable_modules/YAMLicious.0.0.3/Encode.fs.js";
5
5
  import { ValidationPackage_decoder, ValidationPackage_encoder } from "./ValidationPackage.js";
6
6
  import { singleton, collect, delay, toList } from "../fable_modules/fable-library-js.4.22.0/Seq.js";
7
- import { YAMLContent_create_27AED5E3 } from "../fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js";
8
- import { string as string_1, resizearray as resizearray_1, object } from "../fable_modules/YAMLicious.0.0.1/Decode.fs.js";
7
+ import { YAMLContent_create_27AED5E3 } from "../fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js";
8
+ import { string as string_1, resizearray as resizearray_1, object } from "../fable_modules/YAMLicious.0.0.3/Decode.fs.js";
9
9
  import { ValidationPackagesConfig } from "../ValidationPackages/ValidationPackagesConfig.js";
10
10
  import { unwrap } from "../fable_modules/fable-library-js.4.22.0/Option.js";
11
- import { read } from "../fable_modules/YAMLicious.0.0.1/Reader.fs.js";
11
+ import { read } from "../fable_modules/YAMLicious.0.0.3/Reader.fs.js";
12
12
  import { defaultWhitespace } from "./Encode.js";
13
- import { write } from "../fable_modules/YAMLicious.0.0.1/Writer.fs.js";
13
+ import { write } from "../fable_modules/YAMLicious.0.0.3/Writer.fs.js";
14
14
 
15
15
  export function ValidationPackagesConfig_encoder(validationpackage) {
16
16
  const objSeq = choose((tupledArg) => {