@nfdi4plants/arctrl 3.0.0-beta.12 → 3.0.0-beta.13
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/README.md +30 -3
- package/dist/ts/index.d.ts +15 -15
- package/dist/ts/index.d.ts.map +1 -1
- package/dist/ts/index.js +16 -16
- package/dist/ts/ts/ARC.d.ts +6 -1
- package/dist/ts/ts/ARC.d.ts.map +1 -1
- package/dist/ts/ts/ARC.js +30 -6
- package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts +19 -0
- package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts.map +1 -0
- package/dist/ts/ts/CWL/CWLProcessingUnit.js +26 -0
- package/dist/ts/ts/CWL/CWLTypes.d.ts +92 -0
- package/dist/ts/ts/CWL/CWLTypes.d.ts.map +1 -0
- package/dist/ts/ts/CWL/CWLTypes.js +173 -0
- package/dist/ts/ts/CWL/Decode.d.ts +94 -0
- package/dist/ts/ts/CWL/Decode.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Decode.js +649 -0
- package/dist/ts/ts/CWL/Encode.d.ts +28 -0
- package/dist/ts/ts/CWL/Encode.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Encode.js +546 -0
- package/dist/ts/ts/CWL/HashHelpers.d.ts +9 -0
- package/dist/ts/ts/CWL/HashHelpers.d.ts.map +1 -0
- package/dist/ts/ts/CWL/HashHelpers.js +35 -0
- package/dist/ts/ts/CWL/Inputs.d.ts +28 -0
- package/dist/ts/ts/CWL/Inputs.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Inputs.js +62 -0
- package/dist/ts/ts/CWL/Outputs.d.ts +25 -0
- package/dist/ts/ts/CWL/Outputs.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Outputs.js +59 -0
- package/dist/ts/ts/CWL/ParameterReference.d.ts +23 -0
- package/dist/ts/ts/CWL/ParameterReference.d.ts.map +1 -0
- package/dist/ts/ts/CWL/ParameterReference.js +60 -0
- package/dist/ts/ts/CWL/Requirements.d.ts +71 -0
- package/dist/ts/ts/CWL/Requirements.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Requirements.js +116 -0
- package/dist/ts/ts/CWL/ToolDescription.d.ts +33 -0
- package/dist/ts/ts/CWL/ToolDescription.d.ts.map +1 -0
- package/dist/ts/ts/CWL/ToolDescription.js +80 -0
- package/dist/ts/ts/CWL/WorkflowDescription.d.ts +34 -0
- package/dist/ts/ts/CWL/WorkflowDescription.d.ts.map +1 -0
- package/dist/ts/ts/CWL/WorkflowDescription.js +80 -0
- package/dist/ts/ts/CWL/WorkflowSteps.d.ts +45 -0
- package/dist/ts/ts/CWL/WorkflowSteps.d.ts.map +1 -0
- package/dist/ts/ts/CWL/WorkflowSteps.js +99 -0
- package/dist/ts/ts/Contract/ARC.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ARC.js +27 -9
- package/dist/ts/ts/Contract/ArcRun.d.ts +6 -0
- package/dist/ts/ts/Contract/ArcRun.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcRun.js +131 -4
- package/dist/ts/ts/Contract/ArcWorkflow.d.ts +3 -0
- package/dist/ts/ts/Contract/ArcWorkflow.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcWorkflow.js +70 -4
- package/dist/ts/ts/ContractIO/ContractIO.d.ts.map +1 -1
- package/dist/ts/ts/ContractIO/ContractIO.js +3 -1
- package/dist/ts/ts/Conversion/Assay.d.ts +13 -0
- package/dist/ts/ts/Conversion/Assay.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Assay.js +69 -0
- package/dist/ts/ts/Conversion/Basic.d.ts +105 -0
- package/dist/ts/ts/Conversion/Basic.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Basic.js +452 -0
- package/dist/ts/ts/Conversion/ColumnIndex.d.ts +10 -0
- package/dist/ts/ts/Conversion/ColumnIndex.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/ColumnIndex.js +52 -0
- package/dist/ts/ts/Conversion/Datamap.d.ts +11 -0
- package/dist/ts/ts/Conversion/Datamap.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Datamap.js +21 -0
- package/dist/ts/ts/Conversion/DateTime.d.ts +4 -0
- package/dist/ts/ts/Conversion/DateTime.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/DateTime.js +23 -0
- package/dist/ts/ts/Conversion/Investigation.d.ts +12 -0
- package/dist/ts/ts/Conversion/Investigation.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Investigation.js +59 -0
- package/dist/ts/ts/Conversion/Person.d.ts +16 -0
- package/dist/ts/ts/Conversion/Person.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Person.js +100 -0
- package/dist/ts/ts/Conversion/Process.d.ts +84 -0
- package/dist/ts/ts/Conversion/Process.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Process.js +455 -0
- package/dist/ts/ts/Conversion/Run.d.ts +26 -0
- package/dist/ts/ts/Conversion/Run.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Run.js +190 -0
- package/dist/ts/ts/Conversion/ScholarlyArticle.d.ts +16 -0
- package/dist/ts/ts/Conversion/ScholarlyArticle.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/ScholarlyArticle.js +116 -0
- package/dist/ts/ts/Conversion/Study.d.ts +12 -0
- package/dist/ts/ts/Conversion/Study.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Study.js +51 -0
- package/dist/ts/ts/Conversion/Table.d.ts +45 -0
- package/dist/ts/ts/Conversion/Table.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Table.js +203 -0
- package/dist/ts/ts/Conversion/Workflow.d.ts +45 -0
- package/dist/ts/ts/Conversion/Workflow.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Workflow.js +305 -0
- package/dist/ts/ts/Conversion.d.ts +23 -274
- package/dist/ts/ts/Conversion.d.ts.map +1 -1
- package/dist/ts/ts/Conversion.js +62 -1475
- package/dist/ts/ts/Core/ArcTypes.d.ts +48 -38
- package/dist/ts/ts/Core/ArcTypes.d.ts.map +1 -1
- package/dist/ts/ts/Core/ArcTypes.js +183 -103
- package/dist/ts/ts/Core/Helper/Identifier.d.ts +24 -0
- package/dist/ts/ts/Core/Helper/Identifier.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/Identifier.js +34 -1
- package/dist/ts/ts/FileSystem/FileSystemTree.d.ts +2 -2
- package/dist/ts/ts/FileSystem/FileSystemTree.d.ts.map +1 -1
- package/dist/ts/ts/FileSystem/FileSystemTree.js +8 -15
- package/dist/ts/ts/Json/ROCrate/LDContext.d.ts.map +1 -1
- package/dist/ts/ts/Json/ROCrate/LDContext.js +21 -11
- package/dist/ts/ts/Json/Run.js +2 -2
- package/dist/ts/ts/Json/Workflow.d.ts.map +1 -1
- package/dist/ts/ts/Json/Workflow.js +8 -9
- package/dist/ts/ts/ROCrate/LDContext.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDContext.js +35 -31
- package/dist/ts/ts/ROCrate/LDObject.d.ts +2 -2
- package/dist/ts/ts/ROCrate/LDObject.js +2 -2
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Comment.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.d.ts +61 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.js +338 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.d.ts +39 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.js +219 -0
- package/dist/ts/ts/ROCrate/LDTypes/CreateAction.d.ts +43 -0
- package/dist/ts/ts/ROCrate/LDTypes/CreateAction.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/CreateAction.js +224 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/CreativeWork.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Dataset.d.ts +32 -22
- package/dist/ts/ts/ROCrate/LDTypes/Dataset.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Dataset.js +45 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/DefinedTerm.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/File.d.ts +10 -4
- package/dist/ts/ts/ROCrate/LDTypes/File.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/File.js +34 -1
- package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.d.ts +59 -0
- package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.js +344 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProcess.d.ts +2 -0
- package/dist/ts/ts/ROCrate/LDTypes/LabProcess.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProcess.js +31 -5
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProtocol.d.ts +6 -2
- package/dist/ts/ts/ROCrate/LDTypes/LabProtocol.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProtocol.js +66 -15
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Organization.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Person.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PostalAddress.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PropertyValue.d.ts +35 -11
- package/dist/ts/ts/ROCrate/LDTypes/PropertyValue.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PropertyValue.js +191 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Sample.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/ScholarlyArticle.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.d.ts +46 -0
- package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.js +247 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.d.ts +12 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.js +40 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.d.ts +11 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.js +46 -0
- package/dist/ts/ts/ROCrate/ROCrateContext.d.ts +2 -2
- package/dist/ts/ts/ROCrate/ROCrateContext.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/ROCrateContext.js +6 -6
- package/dist/ts/ts/ROCrateIO.js +6 -6
- package/dist/ts/ts/Spreadsheet/Metadata/Run.js +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +4 -4
- package/dist/ts/ts/fable_modules/DynamicObj.7.1.0/DynObj.fs.js +109 -0
- package/package.json +1 -1
- package/dist/ts/ts/ROCrate/Generic/Dataset.d.ts.map +0 -1
- package/dist/ts/ts/ROCrate/Generic/File.d.ts.map +0 -1
- package/dist/ts/ts/ROCrate/Generic/LabProcess.d.ts.map +0 -1
- package/dist/ts/ts/ROCrate/Generic/LabProtocol.d.ts.map +0 -1
- package/dist/ts/ts/ROCrate/Generic/PropertyValue.d.ts.map +0 -1
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Comment.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Comment.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/CreativeWork.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/CreativeWork.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/DefinedTerm.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/DefinedTerm.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Organization.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Organization.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Person.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Person.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PostalAddress.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PostalAddress.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Sample.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Sample.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/ScholarlyArticle.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/ScholarlyArticle.js +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/DynamicObj.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/FableJS.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/HashCodes.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/PropertyHelper.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/ReflectionUtils.fs.js +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { class_type } from '../../node_modules/@fable-org/fable-library-js/Reflection.js';
|
|
2
|
+
import { ResizeArray_distinct, ResizeArray_append, ResizeArray_choose, ResizeArray_collect, ResizeArray_filter, ResizeArray_map, ResizeArray_tryFind, Option_fromSeq, ResizeArray_groupBy, ResizeArray_singleton, ResizeArray_appendSingleton, Option_fromValueWithDefault } from '../Core/Helper/Collections.js';
|
|
3
|
+
import { LDPropertyValue } from '../ROCrate/LDTypes/PropertyValue.js';
|
|
4
|
+
import { unwrap, defaultArg, value, map } from '../../node_modules/@fable-org/fable-library-js/Option.js';
|
|
5
|
+
import { LDLabProcess } from '../ROCrate/LDTypes/LabProcess.js';
|
|
6
|
+
import { DataAux_pathAndSelectorFromName } from '../Core/Data.js';
|
|
7
|
+
import { LDFile } from '../ROCrate/LDTypes/File.js';
|
|
8
|
+
import { LDDataset } from '../ROCrate/LDTypes/Dataset.js';
|
|
9
|
+
import { BaseTypes_composeDefinedTerm_ZDED3A0F, BaseTypes_composePropertyValueFromOA_ZDED3A0F, BaseTypes_composeComment_Z13201A7E, BaseTypes_decomposeDefinedTerm_Z2F770004, BaseTypes_decomposePropertyValueToOA_Z2F770004, BaseTypes_decomposeComment_Z2F770004 } from './Basic.js';
|
|
10
|
+
import { PersonConversion_composePerson_Z64D846DC, PersonConversion_decomposePerson_Z6839B9E8 } from './Person.js';
|
|
11
|
+
import { ARCtrl_ArcTables__ArcTables_GetProcesses_5E660E5C, ARCtrl_ArcTables__ArcTables_fromProcesses_Static_Z27F0B586 } from './Table.js';
|
|
12
|
+
import { ArcTables } from '../Core/Table/ArcTables.js';
|
|
13
|
+
import { DatamapConversion_composeFragmentDescriptors_Z8923FA3, DatamapConversion_decomposeFragmentDescriptors_Z6E59645F } from './Datamap.js';
|
|
14
|
+
import { DataMap } from '../Core/DataMap.js';
|
|
15
|
+
import { ArcAssay } from '../Core/ArcTypes.js';
|
|
16
|
+
import { ofSeq } from '../../node_modules/@fable-org/fable-library-js/List.js';
|
|
17
|
+
|
|
18
|
+
class AssayConversion {
|
|
19
|
+
constructor() {
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function AssayConversion_$reflection() {
|
|
23
|
+
return class_type("ARCtrl.Conversion.AssayConversion", void 0, AssayConversion);
|
|
24
|
+
}
|
|
25
|
+
function AssayConversion_getDataFilesFromProcesses_6BABD1B0(processes, fragmentDescriptors, graph, context) {
|
|
26
|
+
const data = ResizeArray_distinct(ResizeArray_append(ResizeArray_choose((df) => LDPropertyValue.tryGetSubjectOf(df, unwrap(graph), unwrap(context)), defaultArg(fragmentDescriptors, [])), ResizeArray_collect((p) => ResizeArray_append(LDLabProcess.getObjectsAsData(p, unwrap(graph), unwrap(context)), LDLabProcess.getResultsAsData(p, unwrap(graph), unwrap(context))), processes)));
|
|
27
|
+
const files = ResizeArray_filter((d) => DataAux_pathAndSelectorFromName(d.Id)[1] == null, data);
|
|
28
|
+
return ResizeArray_append(files, ResizeArray_map((tupledArg) => {
|
|
29
|
+
const path = tupledArg[0];
|
|
30
|
+
const fragments = tupledArg[1];
|
|
31
|
+
let file;
|
|
32
|
+
const matchValue = ResizeArray_tryFind((d_3) => d_3.Id === path, files);
|
|
33
|
+
if (matchValue == null) {
|
|
34
|
+
const comments = Option_fromSeq(LDFile.getComments(fragments[0], unwrap(graph), unwrap(context)));
|
|
35
|
+
file = LDFile.create(path, path, unwrap(comments), unwrap(LDFile.tryGetDisambiguatingDescriptionAsString(fragments[0], unwrap(context))), unwrap(LDFile.tryGetEncodingFormatAsString(fragments[0], unwrap(context))), void 0, unwrap(fragments[0].TryGetContext()));
|
|
36
|
+
} else {
|
|
37
|
+
file = value(matchValue);
|
|
38
|
+
}
|
|
39
|
+
LDDataset.setHasParts(file, fragments, unwrap(context));
|
|
40
|
+
return file;
|
|
41
|
+
}, ResizeArray_groupBy((d_2) => DataAux_pathAndSelectorFromName(d_2.Id)[0], ResizeArray_filter((d_1) => DataAux_pathAndSelectorFromName(d_1.Id)[1] != null, data))));
|
|
42
|
+
}
|
|
43
|
+
function AssayConversion_composeAssay_Z5C53FD5C(assay, fs) {
|
|
44
|
+
let collection, fds_1, vm_1, fds, vm;
|
|
45
|
+
const measurementMethod = map(BaseTypes_composeDefinedTerm_ZDED3A0F, assay.TechnologyType);
|
|
46
|
+
const measurementTechnique = map(BaseTypes_composeDefinedTerm_ZDED3A0F, assay.TechnologyPlatform);
|
|
47
|
+
const variableMeasured = map(BaseTypes_composePropertyValueFromOA_ZDED3A0F, assay.MeasurementType);
|
|
48
|
+
const creators = Option_fromSeq(ResizeArray_map(PersonConversion_composePerson_Z64D846DC, assay.Performers));
|
|
49
|
+
const processSequence = Option_fromSeq((collection = ARCtrl_ArcTables__ArcTables_GetProcesses_5E660E5C(new ArcTables(assay.Tables), assay.Identifier, void 0, unwrap(fs)), Array.from(collection)));
|
|
50
|
+
const fragmentDescriptors = map(DatamapConversion_composeFragmentDescriptors_Z8923FA3, assay.DataMap);
|
|
51
|
+
const dataFiles = map((ps) => AssayConversion_getDataFilesFromProcesses_6BABD1B0(ps, unwrap(fragmentDescriptors)), processSequence);
|
|
52
|
+
const variableMeasureds = variableMeasured == null ? fragmentDescriptors == null ? void 0 : (fds_1 = value(fragmentDescriptors), fds_1) : fragmentDescriptors == null ? (vm_1 = value(variableMeasured), ResizeArray_singleton(vm_1)) : (fds = value(fragmentDescriptors), vm = value(variableMeasured), ResizeArray_appendSingleton(vm, fds));
|
|
53
|
+
const comments = Option_fromSeq(ResizeArray_map(BaseTypes_composeComment_Z13201A7E, assay.Comments));
|
|
54
|
+
return LDDataset.createAssay(assay.Identifier, void 0, unwrap(assay.Title), unwrap(assay.Description), unwrap(creators), unwrap(dataFiles), unwrap(measurementMethod), unwrap(measurementTechnique), unwrap(variableMeasureds), unwrap(processSequence), unwrap(comments));
|
|
55
|
+
}
|
|
56
|
+
function AssayConversion_decomposeAssay_Z6839B9E8(assay, graph, context) {
|
|
57
|
+
const measurementMethod = map((m) => BaseTypes_decomposeDefinedTerm_Z2F770004(m, unwrap(context)), LDDataset.tryGetMeasurementMethodAsDefinedTerm(assay, unwrap(graph), unwrap(context)));
|
|
58
|
+
const measurementTechnique = map((m_1) => BaseTypes_decomposeDefinedTerm_Z2F770004(m_1, unwrap(context)), LDDataset.tryGetMeasurementTechniqueAsDefinedTerm(assay, unwrap(graph), unwrap(context)));
|
|
59
|
+
const variableMeasured = map((v) => BaseTypes_decomposePropertyValueToOA_Z2F770004(v, unwrap(context)), LDDataset.tryGetVariableMeasuredAsMeasurementType(assay, unwrap(graph), unwrap(context)));
|
|
60
|
+
const perfomers = ResizeArray_map((c) => PersonConversion_decomposePerson_Z6839B9E8(c, unwrap(graph), unwrap(context)), LDDataset.getCreators(assay, unwrap(graph), unwrap(context)));
|
|
61
|
+
let dataMap;
|
|
62
|
+
const v_1 = DatamapConversion_decomposeFragmentDescriptors_Z6E59645F(LDDataset.getVariableMeasuredAsFragmentDescriptors(assay, unwrap(graph), unwrap(context)), unwrap(graph), unwrap(context));
|
|
63
|
+
dataMap = Option_fromValueWithDefault(DataMap.init(), v_1);
|
|
64
|
+
const tables = ARCtrl_ArcTables__ArcTables_fromProcesses_Static_Z27F0B586(ofSeq(LDDataset.getAboutsAsLabProcess(assay, unwrap(graph), unwrap(context))), unwrap(graph), unwrap(context));
|
|
65
|
+
const comments = ResizeArray_map((c_1) => BaseTypes_decomposeComment_Z2F770004(c_1, unwrap(context)), LDDataset.getComments(assay, unwrap(graph), unwrap(context)));
|
|
66
|
+
return ArcAssay.create(LDDataset.getIdentifierAsString(assay, unwrap(context)), unwrap(LDDataset.tryGetNameAsString(assay, unwrap(context))), unwrap(LDDataset.tryGetDescriptionAsString(assay, unwrap(context))), unwrap(variableMeasured), unwrap(measurementMethod), unwrap(measurementTechnique), tables.Tables, unwrap(dataMap), perfomers, comments);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { AssayConversion, AssayConversion_$reflection, AssayConversion_composeAssay_Z5C53FD5C, AssayConversion_decomposeAssay_Z6839B9E8, AssayConversion_getDataFilesFromProcesses_6BABD1B0 };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { TypeInfo } from '@fable-org/fable-library-js/Reflection.js';
|
|
2
|
+
import { Option } from '@fable-org/fable-library-js/Option.js';
|
|
3
|
+
import { Comment$ } from '../Core/Comment.js';
|
|
4
|
+
import { LDGraph, LDNode } from '../ROCrate/LDObject.js';
|
|
5
|
+
import { LDContext } from '../ROCrate/LDContext.js';
|
|
6
|
+
import { OntologyAnnotation } from '../Core/OntologyAnnotation.js';
|
|
7
|
+
import { Data } from '../Core/Data.js';
|
|
8
|
+
import { CompositeCell_$union } from '../Core/Table/CompositeCell.js';
|
|
9
|
+
import { CompositeHeader_$union } from '../Core/Table/CompositeHeader.js';
|
|
10
|
+
import { FileSystem } from '../FileSystem/FileSystem.js';
|
|
11
|
+
import { DataContext } from '../Core/DataContext.js';
|
|
12
|
+
import { Value_$union } from '../Core/Value.js';
|
|
13
|
+
export declare class BaseTypes {
|
|
14
|
+
constructor();
|
|
15
|
+
}
|
|
16
|
+
export declare function BaseTypes_$reflection(): TypeInfo;
|
|
17
|
+
export declare function BaseTypes_composeComment_Z13201A7E(comment: Comment$): LDNode;
|
|
18
|
+
export declare function BaseTypes_decomposeComment_Z2F770004(comment: LDNode, context?: LDContext): Comment$;
|
|
19
|
+
export declare function BaseTypes_ontologyTermFromNameAndID_40457300(name?: string, id?: string): OntologyAnnotation;
|
|
20
|
+
export declare function BaseTypes_tryOntologyTermFromNameAndID_40457300(name?: string, id?: string): Option<OntologyAnnotation>;
|
|
21
|
+
export declare function BaseTypes_composeDefinedTerm_ZDED3A0F(term: OntologyAnnotation): LDNode;
|
|
22
|
+
export declare function BaseTypes_decomposeDefinedTerm_Z2F770004(term: LDNode, context?: LDContext): OntologyAnnotation;
|
|
23
|
+
export declare function BaseTypes_composePropertyValueFromOA_ZDED3A0F(term: OntologyAnnotation): LDNode;
|
|
24
|
+
export declare function BaseTypes_decomposePropertyValueToOA_Z2F770004(term: LDNode, context?: LDContext): OntologyAnnotation;
|
|
25
|
+
/**
|
|
26
|
+
* Convert a CompositeCell to a ISA Value and Unit tuple.
|
|
27
|
+
*/
|
|
28
|
+
export declare function BaseTypes_valuesOfCell_Z436420FE(value: CompositeCell_$union): [Option<string>, Option<string>, Option<string>, Option<string>];
|
|
29
|
+
export declare function BaseTypes_termOfHeader_6CAF647B(header: CompositeHeader_$union): [string, Option<string>];
|
|
30
|
+
/**
|
|
31
|
+
* Convert a CompositeHeader and Cell tuple to a ISA Component
|
|
32
|
+
*/
|
|
33
|
+
export declare function BaseTypes_composeComponent(header: CompositeHeader_$union, value: CompositeCell_$union): LDNode;
|
|
34
|
+
/**
|
|
35
|
+
* Convert a CompositeHeader and Cell tuple to a ISA ProcessParameterValue
|
|
36
|
+
*/
|
|
37
|
+
export declare function BaseTypes_composeParameterValue(header: CompositeHeader_$union, value: CompositeCell_$union): LDNode;
|
|
38
|
+
/**
|
|
39
|
+
* Convert a CompositeHeader and Cell tuple to a ISA FactorValue
|
|
40
|
+
*/
|
|
41
|
+
export declare function BaseTypes_composeFactorValue(header: CompositeHeader_$union, value: CompositeCell_$union): LDNode;
|
|
42
|
+
/**
|
|
43
|
+
* Convert a CompositeHeader and Cell tuple to a ISA MaterialAttributeValue
|
|
44
|
+
*/
|
|
45
|
+
export declare function BaseTypes_composeCharacteristicValue(header: CompositeHeader_$union, value: CompositeCell_$union): LDNode;
|
|
46
|
+
export declare function BaseTypes_composeFreetextMaterialName(headerFT: string, name: string): string;
|
|
47
|
+
export declare function BaseTypes_composeFile_6CE21C7D(d: Data, fs?: FileSystem): LDNode;
|
|
48
|
+
export declare function BaseTypes_decomposeFile_Z2F770004(f: LDNode, context?: LDContext): Data;
|
|
49
|
+
export declare function BaseTypes_composeFragmentDescriptor_Z4C0BEF62(dc: DataContext): LDNode;
|
|
50
|
+
export declare function BaseTypes_decomposeFragmentDescriptor_Z6839B9E8(fd: LDNode, graph?: LDGraph, context?: LDContext): DataContext;
|
|
51
|
+
/**
|
|
52
|
+
* Convert a CompositeHeader and Cell tuple to a ISA ProcessInput
|
|
53
|
+
*/
|
|
54
|
+
export declare function BaseTypes_composeProcessInput(header: CompositeHeader_$union, value: CompositeCell_$union, fs: Option<FileSystem>): LDNode;
|
|
55
|
+
/**
|
|
56
|
+
* Convert a CompositeHeader and Cell tuple to a ISA ProcessOutput
|
|
57
|
+
*/
|
|
58
|
+
export declare function BaseTypes_composeProcessOutput(header: CompositeHeader_$union, value: CompositeCell_$union, fs: Option<FileSystem>): LDNode;
|
|
59
|
+
export declare function BaseTypes_headerOntologyOfPropertyValue_Z2F770004(pv: LDNode, context?: LDContext): OntologyAnnotation;
|
|
60
|
+
/**
|
|
61
|
+
* Convert an ISA Value and Unit tuple to a CompositeCell
|
|
62
|
+
*/
|
|
63
|
+
export declare function BaseTypes_cellOfPropertyValue_Z2F770004(pv: LDNode, context?: LDContext): CompositeCell_$union;
|
|
64
|
+
/**
|
|
65
|
+
* Convert an ISA Component to a CompositeHeader and Cell tuple
|
|
66
|
+
*/
|
|
67
|
+
export declare function BaseTypes_decomposePropertyValue_Z2F770004(pv: LDNode, context?: LDContext): [OntologyAnnotation, Option<Value_$union>, Option<OntologyAnnotation>];
|
|
68
|
+
/**
|
|
69
|
+
* Convert an ISA Component to a CompositeHeader and Cell tuple
|
|
70
|
+
*/
|
|
71
|
+
export declare function BaseTypes_decomposeComponent_Z2F770004(c: LDNode, context?: LDContext): [CompositeHeader_$union, CompositeCell_$union];
|
|
72
|
+
/**
|
|
73
|
+
* Convert an ISA ProcessParameterValue to a CompositeHeader and Cell tuple
|
|
74
|
+
*/
|
|
75
|
+
export declare function BaseTypes_decomposeParameterValue_Z2F770004(c: LDNode, context?: LDContext): [CompositeHeader_$union, CompositeCell_$union];
|
|
76
|
+
/**
|
|
77
|
+
* Convert an ISA FactorValue to a CompositeHeader and Cell tuple
|
|
78
|
+
*/
|
|
79
|
+
export declare function BaseTypes_decomposeFactorValue_Z2F770004(c: LDNode, context?: LDContext): [CompositeHeader_$union, CompositeCell_$union];
|
|
80
|
+
/**
|
|
81
|
+
* Convert an ISA MaterialAttributeValue to a CompositeHeader and Cell tuple
|
|
82
|
+
*/
|
|
83
|
+
export declare function BaseTypes_decomposeCharacteristicValue_Z2F770004(c: LDNode, context?: LDContext): [CompositeHeader_$union, CompositeCell_$union];
|
|
84
|
+
/**
|
|
85
|
+
* Convert an ISA ProcessOutput to a CompositeHeader and Cell tuple
|
|
86
|
+
*/
|
|
87
|
+
export declare function BaseTypes_decomposeProcessInput_Z2F770004(pn: LDNode, context?: LDContext): [CompositeHeader_$union, CompositeCell_$union];
|
|
88
|
+
export declare function BaseTypes_decomposeProcessOutput_Z2F770004(pn: LDNode, context?: LDContext): [CompositeHeader_$union, CompositeCell_$union];
|
|
89
|
+
/**
|
|
90
|
+
* This function creates a string containing the name and the ontology short-string of the given ontology annotation term
|
|
91
|
+
*
|
|
92
|
+
* TechnologyPlatforms are plain strings in ISA-JSON.
|
|
93
|
+
*
|
|
94
|
+
* This function allows us, to parse them as an ontology term.
|
|
95
|
+
*/
|
|
96
|
+
export declare function BaseTypes_composeTechnologyPlatform_ZDED3A0F(tp: OntologyAnnotation): string;
|
|
97
|
+
/**
|
|
98
|
+
* This function parses the given string containing the name and the ontology short-string of the given ontology annotation term
|
|
99
|
+
*
|
|
100
|
+
* TechnologyPlatforms are plain strings in ISA-JSON.
|
|
101
|
+
*
|
|
102
|
+
* This function allows us, to parse them as an ontology term.
|
|
103
|
+
*/
|
|
104
|
+
export declare function BaseTypes_decomposeTechnologyPlatform_Z721C83C5(name: string): OntologyAnnotation;
|
|
105
|
+
//# sourceMappingURL=Basic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Basic.d.ts","sourceRoot":"","sources":["../../../../src/ARCtrl/ts/Conversion/Basic.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
import { class_type } from '../../node_modules/@fable-org/fable-library-js/Reflection.js';
|
|
2
|
+
import { value, unwrap, map, defaultArg, bind } from '../../node_modules/@fable-org/fable-library-js/Option.js';
|
|
3
|
+
import { LDComment } from '../ROCrate/LDTypes/Comment.js';
|
|
4
|
+
import { Comment$ } from '../Core/Comment.js';
|
|
5
|
+
import { LDRef, LDNode } from '../ROCrate/LDObject.js';
|
|
6
|
+
import { OntologyAnnotation } from '../Core/OntologyAnnotation.js';
|
|
7
|
+
import { Option_fromValueWithDefault, Option_fromSeq, ResizeArray_map } from '../Core/Helper/Collections.js';
|
|
8
|
+
import { LDDefinedTerm } from '../ROCrate/LDTypes/DefinedTerm.js';
|
|
9
|
+
import { LDPropertyValue } from '../ROCrate/LDTypes/PropertyValue.js';
|
|
10
|
+
import { Data } from '../Core/Data.js';
|
|
11
|
+
import { CompositeCell_Term, CompositeCell_Unitized, CompositeCell_FreeText, CompositeCell_Data } from '../Core/Table/CompositeCell.js';
|
|
12
|
+
import { toFail, printf } from '../../node_modules/@fable-org/fable-library-js/String.js';
|
|
13
|
+
import { CompositeHeader_Component, CompositeHeader_Parameter, CompositeHeader_Factor, CompositeHeader_Characteristic, CompositeHeader_Input, IOType_Source, IOType_Material, IOType_Sample, IOType_Data, IOType_FreeText, CompositeHeader_Output } from '../Core/Table/CompositeHeader.js';
|
|
14
|
+
import { DataFile__get_AsString, DataFile_fromString_Z721C83C5 } from '../Core/DataFile.js';
|
|
15
|
+
import { LDFile } from '../ROCrate/LDTypes/File.js';
|
|
16
|
+
import { LDDataset } from '../ROCrate/LDTypes/Dataset.js';
|
|
17
|
+
import { map as map$1 } from '../../node_modules/@fable-org/fable-library-js/Array.js';
|
|
18
|
+
import { combine } from '../FileSystem/Path.js';
|
|
19
|
+
import { DataContext__get_Explication, DataContext__get_Unit, DataContext__get_ObjectType, DataContext__get_GeneratedBy, DataContext__get_Description, DataContext__get_Label, DataContext_$ctor_Z780A8A2A } from '../Core/DataContext.js';
|
|
20
|
+
import { toString } from '../../node_modules/@fable-org/fable-library-js/Types.js';
|
|
21
|
+
import { LDSample } from '../ROCrate/LDTypes/Sample.js';
|
|
22
|
+
import { Value_Name, Value_Ontology } from '../Core/Value.js';
|
|
23
|
+
import { ActivePatterns_$007CRegex$007C_$007C } from '../Core/Helper/Regex.js';
|
|
24
|
+
|
|
25
|
+
class BaseTypes {
|
|
26
|
+
constructor() {
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function BaseTypes_$reflection() {
|
|
30
|
+
return class_type("ARCtrl.Conversion.BaseTypes", void 0, BaseTypes);
|
|
31
|
+
}
|
|
32
|
+
function BaseTypes_composeComment_Z13201A7E(comment) {
|
|
33
|
+
let name;
|
|
34
|
+
const matchValue = comment.Name;
|
|
35
|
+
if (matchValue == null) {
|
|
36
|
+
throw new Error("Comment must have a name");
|
|
37
|
+
} else {
|
|
38
|
+
name = value(matchValue);
|
|
39
|
+
}
|
|
40
|
+
return LDComment.create(name, void 0, unwrap(comment.Value));
|
|
41
|
+
}
|
|
42
|
+
function BaseTypes_decomposeComment_Z2F770004(comment, context) {
|
|
43
|
+
return new Comment$(LDComment.getNameAsString(comment, unwrap(context)), unwrap(LDComment.tryGetTextAsString(comment, unwrap(context))));
|
|
44
|
+
}
|
|
45
|
+
function BaseTypes_ontologyTermFromNameAndID_40457300(name, id) {
|
|
46
|
+
if (id == null) {
|
|
47
|
+
return OntologyAnnotation.create(unwrap(name));
|
|
48
|
+
} else {
|
|
49
|
+
const t = value(id);
|
|
50
|
+
return OntologyAnnotation.fromTermAnnotation(t, unwrap(name));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function BaseTypes_tryOntologyTermFromNameAndID_40457300(name, id) {
|
|
54
|
+
if (name == null && id == null) {
|
|
55
|
+
return void 0;
|
|
56
|
+
} else {
|
|
57
|
+
return BaseTypes_ontologyTermFromNameAndID_40457300(unwrap(name), unwrap(id));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function BaseTypes_composeDefinedTerm_ZDED3A0F(term) {
|
|
61
|
+
const tan = Option_fromValueWithDefault("", term.TermAccessionAndOntobeeUrlIfShort);
|
|
62
|
+
return LDDefinedTerm.create(term.NameText, void 0, unwrap(tan));
|
|
63
|
+
}
|
|
64
|
+
function BaseTypes_decomposeDefinedTerm_Z2F770004(term, context) {
|
|
65
|
+
return BaseTypes_ontologyTermFromNameAndID_40457300(LDDefinedTerm.getNameAsString(term, unwrap(context)), unwrap(LDDefinedTerm.tryGetTermCodeAsString(term, unwrap(context))));
|
|
66
|
+
}
|
|
67
|
+
function BaseTypes_composePropertyValueFromOA_ZDED3A0F(term) {
|
|
68
|
+
const tan = Option_fromValueWithDefault("", term.TermAccessionAndOntobeeUrlIfShort);
|
|
69
|
+
return LDPropertyValue.create(term.NameText, void 0, void 0, unwrap(tan));
|
|
70
|
+
}
|
|
71
|
+
function BaseTypes_decomposePropertyValueToOA_Z2F770004(term, context) {
|
|
72
|
+
return BaseTypes_ontologyTermFromNameAndID_40457300(LDPropertyValue.getNameAsString(term, unwrap(context)), unwrap(LDPropertyValue.tryGetPropertyIDAsString(term, unwrap(context))));
|
|
73
|
+
}
|
|
74
|
+
function BaseTypes_valuesOfCell_Z436420FE(value) {
|
|
75
|
+
let term, term_1;
|
|
76
|
+
switch (value.tag) {
|
|
77
|
+
case /* Term */
|
|
78
|
+
0:
|
|
79
|
+
if (term = value.fields[0], term.isEmpty()) {
|
|
80
|
+
const term_2 = value.fields[0];
|
|
81
|
+
return [void 0, void 0, void 0, void 0];
|
|
82
|
+
} else if (term_1 = value.fields[0], term_1.TANInfo != null) {
|
|
83
|
+
const term_3 = value.fields[0];
|
|
84
|
+
return [term_3.Name, term_3.TermAccessionAndOntobeeUrlIfShort, void 0, void 0];
|
|
85
|
+
} else {
|
|
86
|
+
const term_4 = value.fields[0];
|
|
87
|
+
return [term_4.Name, void 0, void 0, void 0];
|
|
88
|
+
}
|
|
89
|
+
case /* Unitized */
|
|
90
|
+
2: {
|
|
91
|
+
const text_1 = value.fields[0];
|
|
92
|
+
const unit = value.fields[1];
|
|
93
|
+
const patternInput = unit.isEmpty() ? [void 0, void 0] : [unit.Name, Option_fromValueWithDefault("", unit.TermAccessionAndOntobeeUrlIfShort)];
|
|
94
|
+
return [Option_fromValueWithDefault("", text_1), void 0, patternInput[0], patternInput[1]];
|
|
95
|
+
}
|
|
96
|
+
case /* Data */
|
|
97
|
+
3: {
|
|
98
|
+
const data = value.fields[0];
|
|
99
|
+
throw new Error("Data cell should not be parsed to isa value");
|
|
100
|
+
}
|
|
101
|
+
default:
|
|
102
|
+
if (value.fields[0] === "") {
|
|
103
|
+
return [void 0, void 0, void 0, void 0];
|
|
104
|
+
} else {
|
|
105
|
+
const text = value.fields[0];
|
|
106
|
+
return [text, void 0, void 0, void 0];
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function BaseTypes_termOfHeader_6CAF647B(header) {
|
|
111
|
+
let matchResult, oa;
|
|
112
|
+
switch (header.tag) {
|
|
113
|
+
case /* Component */
|
|
114
|
+
0: {
|
|
115
|
+
matchResult = 0;
|
|
116
|
+
oa = header.fields[0];
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
case /* Parameter */
|
|
120
|
+
3: {
|
|
121
|
+
matchResult = 0;
|
|
122
|
+
oa = header.fields[0];
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
case /* Factor */
|
|
126
|
+
2: {
|
|
127
|
+
matchResult = 0;
|
|
128
|
+
oa = header.fields[0];
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
case /* Characteristic */
|
|
132
|
+
1: {
|
|
133
|
+
matchResult = 0;
|
|
134
|
+
oa = header.fields[0];
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
default:
|
|
138
|
+
matchResult = 1;
|
|
139
|
+
}
|
|
140
|
+
switch (matchResult) {
|
|
141
|
+
case 0:
|
|
142
|
+
return [oa.NameText, oa.TANInfo != null ? oa.TermAccessionAndOntobeeUrlIfShort : void 0];
|
|
143
|
+
default:
|
|
144
|
+
return toFail(printf("header %O should not be parsed to isa value"))(header);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function BaseTypes_composeComponent(header, value) {
|
|
148
|
+
const patternInput = BaseTypes_valuesOfCell_Z436420FE(value);
|
|
149
|
+
const patternInput_1 = BaseTypes_termOfHeader_6CAF647B(header);
|
|
150
|
+
return LDPropertyValue.createComponent(patternInput_1[0], unwrap(patternInput[0]), void 0, unwrap(patternInput_1[1]), unwrap(patternInput[3]), unwrap(patternInput[2]), unwrap(patternInput[1]));
|
|
151
|
+
}
|
|
152
|
+
function BaseTypes_composeParameterValue(header, value) {
|
|
153
|
+
const patternInput = BaseTypes_valuesOfCell_Z436420FE(value);
|
|
154
|
+
const patternInput_1 = BaseTypes_termOfHeader_6CAF647B(header);
|
|
155
|
+
return LDPropertyValue.createParameterValue(patternInput_1[0], unwrap(patternInput[0]), void 0, unwrap(patternInput_1[1]), unwrap(patternInput[3]), unwrap(patternInput[2]), unwrap(patternInput[1]));
|
|
156
|
+
}
|
|
157
|
+
function BaseTypes_composeFactorValue(header, value) {
|
|
158
|
+
const patternInput = BaseTypes_valuesOfCell_Z436420FE(value);
|
|
159
|
+
const patternInput_1 = BaseTypes_termOfHeader_6CAF647B(header);
|
|
160
|
+
return LDPropertyValue.createFactorValue(patternInput_1[0], unwrap(patternInput[0]), void 0, unwrap(patternInput_1[1]), unwrap(patternInput[3]), unwrap(patternInput[2]), unwrap(patternInput[1]));
|
|
161
|
+
}
|
|
162
|
+
function BaseTypes_composeCharacteristicValue(header, value) {
|
|
163
|
+
const patternInput = BaseTypes_valuesOfCell_Z436420FE(value);
|
|
164
|
+
const patternInput_1 = BaseTypes_termOfHeader_6CAF647B(header);
|
|
165
|
+
return LDPropertyValue.createCharacteristicValue(patternInput_1[0], unwrap(patternInput[0]), void 0, unwrap(patternInput_1[1]), unwrap(patternInput[3]), unwrap(patternInput[2]), unwrap(patternInput[1]));
|
|
166
|
+
}
|
|
167
|
+
function BaseTypes_composeFreetextMaterialName(headerFT, name) {
|
|
168
|
+
return `${headerFT}=${name}`;
|
|
169
|
+
}
|
|
170
|
+
function BaseTypes_composeFile_6CE21C7D(d, fs) {
|
|
171
|
+
const createFile = () => {
|
|
172
|
+
const dataType = map(DataFile__get_AsString, d.DataType);
|
|
173
|
+
return LDFile.create(d.NameText, d.NameText, void 0, unwrap(dataType), unwrap(d.Format), unwrap(d.SelectorFormat));
|
|
174
|
+
};
|
|
175
|
+
if (fs == null) {
|
|
176
|
+
return createFile();
|
|
177
|
+
} else {
|
|
178
|
+
const fs_1 = value(fs);
|
|
179
|
+
const matchValue = fs_1.Tree.TryGetPath(d.NameText);
|
|
180
|
+
if (matchValue != null) {
|
|
181
|
+
if (value(matchValue).tag === /* Folder */
|
|
182
|
+
1) {
|
|
183
|
+
const fs_2 = value(matchValue);
|
|
184
|
+
const file = createFile();
|
|
185
|
+
file.SchemaType = [LDFile.schemaType, LDDataset.schemaType];
|
|
186
|
+
let subFiles;
|
|
187
|
+
const collection = map$1((fp) => {
|
|
188
|
+
const fullPath = combine(d.NameText, fp);
|
|
189
|
+
return LDFile.create(fullPath, fullPath);
|
|
190
|
+
}, fs_2.ToFilePaths(true));
|
|
191
|
+
subFiles = Array.from(collection);
|
|
192
|
+
LDDataset.setHasParts(file, subFiles);
|
|
193
|
+
return file;
|
|
194
|
+
} else {
|
|
195
|
+
return createFile();
|
|
196
|
+
}
|
|
197
|
+
} else {
|
|
198
|
+
return createFile();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function BaseTypes_decomposeFile_Z2F770004(f, context) {
|
|
203
|
+
const dataType = map(DataFile_fromString_Z721C83C5, LDFile.tryGetDisambiguatingDescriptionAsString(f, unwrap(context)));
|
|
204
|
+
const format = LDFile.tryGetEncodingFormatAsString(f, unwrap(context));
|
|
205
|
+
const selectorFormat = LDFile.tryGetUsageInfoAsString(f, unwrap(context));
|
|
206
|
+
return new Data(void 0, LDFile.getNameAsString(f, unwrap(context)), unwrap(dataType), unwrap(format), unwrap(selectorFormat));
|
|
207
|
+
}
|
|
208
|
+
function BaseTypes_composeFragmentDescriptor_Z4C0BEF62(dc) {
|
|
209
|
+
if (dc.Name == null) {
|
|
210
|
+
throw new Error("RO-Crate parsing of DataContext failed: Cannot create a fragment descriptor without a name.");
|
|
211
|
+
}
|
|
212
|
+
const id = LDPropertyValue.genIdFragmentDescriptor(dc.NameText);
|
|
213
|
+
const patternInput = defaultArg(map((e) => [e.Name, Option_fromValueWithDefault("", e.TermAccessionAndOntobeeUrlIfShort)], DataContext__get_Explication(dc)), [void 0, void 0]);
|
|
214
|
+
const patternInput_1 = defaultArg(map((u) => [u.Name, Option_fromValueWithDefault("", u.TermAccessionAndOntobeeUrlIfShort)], DataContext__get_Unit(dc)), [void 0, void 0]);
|
|
215
|
+
const disambiguatingDescriptions = Option_fromSeq(ResizeArray_map(toString, dc.Comments));
|
|
216
|
+
const dataFragment = BaseTypes_composeFile_6CE21C7D(dc);
|
|
217
|
+
const pattern = map(BaseTypes_composeDefinedTerm_ZDED3A0F, DataContext__get_ObjectType(dc));
|
|
218
|
+
dataFragment.SetProperty(LDFile.about, new LDRef(id));
|
|
219
|
+
dataFragment.SetOptionalProperty(LDFile.pattern, pattern);
|
|
220
|
+
return LDPropertyValue.createFragmentDescriptor(dc.NameText, unwrap(patternInput[0]), void 0, unwrap(patternInput_1[1]), unwrap(patternInput_1[0]), unwrap(patternInput[1]), unwrap(DataContext__get_GeneratedBy(dc)), unwrap(DataContext__get_Description(dc)), unwrap(DataContext__get_Label(dc)), unwrap(disambiguatingDescriptions), dataFragment);
|
|
221
|
+
}
|
|
222
|
+
function BaseTypes_decomposeFragmentDescriptor_Z6839B9E8(fd, graph, context) {
|
|
223
|
+
const file = LDPropertyValue.tryGetSubjectOf(fd, unwrap(graph), unwrap(context));
|
|
224
|
+
let name;
|
|
225
|
+
if (file == null) {
|
|
226
|
+
throw new Error("RO-Crate parsing of DataContext failed: Cannot decompose a fragment descriptor without a name.");
|
|
227
|
+
} else {
|
|
228
|
+
const f = value(file);
|
|
229
|
+
name = LDFile.getNameAsString(f, unwrap(context));
|
|
230
|
+
}
|
|
231
|
+
const objectType = map((pa) => BaseTypes_decomposeDefinedTerm_Z2F770004(pa, unwrap(context)), bind((f_1) => LDFile.tryGetPatternAsDefinedTerm(f_1, unwrap(graph), unwrap(context)), file));
|
|
232
|
+
const format = bind((f_2) => LDFile.tryGetEncodingFormatAsString(f_2, unwrap(context)), file);
|
|
233
|
+
const selectorFormat = bind((f_3) => LDFile.tryGetUsageInfoAsString(f_3, unwrap(context)), file);
|
|
234
|
+
const explication = BaseTypes_tryOntologyTermFromNameAndID_40457300(unwrap(LDPropertyValue.tryGetValueAsString(fd)), unwrap(LDPropertyValue.tryGetValueReferenceAsString(fd)));
|
|
235
|
+
const unit = BaseTypes_tryOntologyTermFromNameAndID_40457300(unwrap(LDPropertyValue.tryGetUnitTextAsString(fd)), unwrap(LDPropertyValue.tryGetUnitCodeAsString(fd)));
|
|
236
|
+
const generatedBy = LDPropertyValue.tryGetMeasurementMethodAsString(fd);
|
|
237
|
+
const description = LDPropertyValue.tryGetDescriptionAsString(fd);
|
|
238
|
+
return DataContext_$ctor_Z780A8A2A(void 0, name, void 0, unwrap(format), unwrap(selectorFormat), unwrap(explication), unwrap(unit), unwrap(objectType), unwrap(LDPropertyValue.tryGetAlternateNameAsString(fd)), unwrap(description), unwrap(generatedBy), ResizeArray_map((s) => Comment$.fromString(s), LDPropertyValue.getDisambiguatingDescriptionsAsString(fd)));
|
|
239
|
+
}
|
|
240
|
+
function BaseTypes_composeProcessInput(header, value, fs) {
|
|
241
|
+
if (header.tag === /* Input */
|
|
242
|
+
11) {
|
|
243
|
+
switch (header.fields[0].tag) {
|
|
244
|
+
case /* Sample */
|
|
245
|
+
1:
|
|
246
|
+
return LDSample.createSample(value.AsFreeText);
|
|
247
|
+
case /* Material */
|
|
248
|
+
3:
|
|
249
|
+
return LDSample.createMaterial(value.AsFreeText);
|
|
250
|
+
case /* Data */
|
|
251
|
+
2:
|
|
252
|
+
switch (value.tag) {
|
|
253
|
+
case /* FreeText */
|
|
254
|
+
1: {
|
|
255
|
+
const ft = value.fields[0];
|
|
256
|
+
return LDFile.create(ft, ft);
|
|
257
|
+
}
|
|
258
|
+
case /* Data */
|
|
259
|
+
3:
|
|
260
|
+
return BaseTypes_composeFile_6CE21C7D(value.fields[0], unwrap(fs));
|
|
261
|
+
default:
|
|
262
|
+
return toFail(printf("Could not parse input data %O"))(value);
|
|
263
|
+
}
|
|
264
|
+
case /* FreeText */
|
|
265
|
+
4: {
|
|
266
|
+
const ft_1 = header.fields[0].fields[0];
|
|
267
|
+
const n = new LDNode(BaseTypes_composeFreetextMaterialName(ft_1, value.AsFreeText), [ft_1]);
|
|
268
|
+
n.SetProperty(LDSample.name, value.AsFreeText);
|
|
269
|
+
return n;
|
|
270
|
+
}
|
|
271
|
+
default:
|
|
272
|
+
return LDSample.createSource(value.AsFreeText);
|
|
273
|
+
}
|
|
274
|
+
} else {
|
|
275
|
+
return toFail(printf("Could not parse input header %O"))(header);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
function BaseTypes_composeProcessOutput(header, value, fs) {
|
|
279
|
+
let matchResult, ft_1;
|
|
280
|
+
if (header.tag === /* Output */
|
|
281
|
+
12) {
|
|
282
|
+
switch (header.fields[0].tag) {
|
|
283
|
+
case /* Material */
|
|
284
|
+
3: {
|
|
285
|
+
matchResult = 1;
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
case /* Data */
|
|
289
|
+
2: {
|
|
290
|
+
matchResult = 2;
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
case /* FreeText */
|
|
294
|
+
4: {
|
|
295
|
+
matchResult = 3;
|
|
296
|
+
ft_1 = header.fields[0].fields[0];
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
299
|
+
default:
|
|
300
|
+
matchResult = 0;
|
|
301
|
+
}
|
|
302
|
+
} else {
|
|
303
|
+
matchResult = 4;
|
|
304
|
+
}
|
|
305
|
+
switch (matchResult) {
|
|
306
|
+
case 0:
|
|
307
|
+
return LDSample.createSample(value.AsFreeText);
|
|
308
|
+
case 1:
|
|
309
|
+
return LDSample.createMaterial(value.AsFreeText);
|
|
310
|
+
case 2:
|
|
311
|
+
switch (value.tag) {
|
|
312
|
+
case /* FreeText */
|
|
313
|
+
1: {
|
|
314
|
+
const ft = value.fields[0];
|
|
315
|
+
return LDFile.create(ft, ft);
|
|
316
|
+
}
|
|
317
|
+
case /* Data */
|
|
318
|
+
3:
|
|
319
|
+
return BaseTypes_composeFile_6CE21C7D(value.fields[0], unwrap(fs));
|
|
320
|
+
default:
|
|
321
|
+
return toFail(printf("Could not parse output data %O"))(value);
|
|
322
|
+
}
|
|
323
|
+
case 3: {
|
|
324
|
+
const n = new LDNode(BaseTypes_composeFreetextMaterialName(ft_1, value.AsFreeText), [ft_1]);
|
|
325
|
+
n.SetProperty(LDSample.name, value.AsFreeText);
|
|
326
|
+
return n;
|
|
327
|
+
}
|
|
328
|
+
default:
|
|
329
|
+
return toFail(printf("Could not parse output header %O"))(header);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
function BaseTypes_headerOntologyOfPropertyValue_Z2F770004(pv, context) {
|
|
333
|
+
const n = LDPropertyValue.getNameAsString(pv, unwrap(context));
|
|
334
|
+
const matchValue = LDPropertyValue.tryGetPropertyIDAsString(pv, unwrap(context));
|
|
335
|
+
if (matchValue == null) {
|
|
336
|
+
return new OntologyAnnotation(n);
|
|
337
|
+
} else {
|
|
338
|
+
const nRef = value(matchValue);
|
|
339
|
+
return OntologyAnnotation.fromTermAnnotation(nRef, n);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
function BaseTypes_cellOfPropertyValue_Z2F770004(pv, context) {
|
|
343
|
+
const v = LDPropertyValue.tryGetValueAsString(pv, unwrap(context));
|
|
344
|
+
const vRef = LDPropertyValue.tryGetValueReferenceAsString(pv, unwrap(context));
|
|
345
|
+
const u = LDPropertyValue.tryGetUnitTextAsString(pv, unwrap(context));
|
|
346
|
+
const uRef = LDPropertyValue.tryGetUnitCodeAsString(pv, unwrap(context));
|
|
347
|
+
let matchResult, vr, u_1, uRef_1;
|
|
348
|
+
if (vRef == null) {
|
|
349
|
+
if (u == null) {
|
|
350
|
+
if (uRef == null) {
|
|
351
|
+
matchResult = 3;
|
|
352
|
+
} else {
|
|
353
|
+
matchResult = 2;
|
|
354
|
+
uRef_1 = value(uRef);
|
|
355
|
+
}
|
|
356
|
+
} else if (uRef != null) {
|
|
357
|
+
matchResult = 2;
|
|
358
|
+
uRef_1 = value(uRef);
|
|
359
|
+
} else {
|
|
360
|
+
matchResult = 1;
|
|
361
|
+
u_1 = value(u);
|
|
362
|
+
}
|
|
363
|
+
} else if (u == null) {
|
|
364
|
+
if (uRef == null) {
|
|
365
|
+
matchResult = 0;
|
|
366
|
+
vr = value(vRef);
|
|
367
|
+
} else {
|
|
368
|
+
matchResult = 4;
|
|
369
|
+
}
|
|
370
|
+
} else {
|
|
371
|
+
matchResult = 4;
|
|
372
|
+
}
|
|
373
|
+
switch (matchResult) {
|
|
374
|
+
case 0:
|
|
375
|
+
return CompositeCell_Term(OntologyAnnotation.fromTermAnnotation(vr, unwrap(v)));
|
|
376
|
+
case 1:
|
|
377
|
+
return CompositeCell_Unitized(defaultArg(v, ""), new OntologyAnnotation(u_1));
|
|
378
|
+
case 2:
|
|
379
|
+
return CompositeCell_Unitized(defaultArg(v, ""), OntologyAnnotation.fromTermAnnotation(uRef_1, unwrap(u)));
|
|
380
|
+
case 3:
|
|
381
|
+
return CompositeCell_Term(new OntologyAnnotation(unwrap(v)));
|
|
382
|
+
default: {
|
|
383
|
+
const arg = defaultArg(v, "");
|
|
384
|
+
return toFail(printf("Could not parse value %s with unit %O and unit reference %O"))(arg)(u)(uRef);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
function BaseTypes_decomposePropertyValue_Z2F770004(pv, context) {
|
|
389
|
+
let v, vRef, vr, u, uRef, uRef_1, u_1;
|
|
390
|
+
return [BaseTypes_headerOntologyOfPropertyValue_Z2F770004(pv, unwrap(context)), (v = LDPropertyValue.tryGetValueAsString(pv, unwrap(context)), vRef = LDPropertyValue.tryGetValueReferenceAsString(pv, unwrap(context)), vRef == null ? v == null ? void 0 : Value_Name(value(v)) : (vr = value(vRef), Value_Ontology(OntologyAnnotation.fromTermAnnotation(vr, unwrap(v))))), (u = LDPropertyValue.tryGetUnitTextAsString(pv, unwrap(context)), uRef = LDPropertyValue.tryGetUnitCodeAsString(pv, unwrap(context)), u == null ? uRef == null ? void 0 : (uRef_1 = value(uRef), OntologyAnnotation.fromTermAnnotation(uRef_1, unwrap(u))) : uRef != null ? (uRef_1 = value(uRef), OntologyAnnotation.fromTermAnnotation(uRef_1, unwrap(u))) : (u_1 = value(u), new OntologyAnnotation(u_1)))];
|
|
391
|
+
}
|
|
392
|
+
function BaseTypes_decomposeComponent_Z2F770004(c, context) {
|
|
393
|
+
return [CompositeHeader_Component(BaseTypes_headerOntologyOfPropertyValue_Z2F770004(c, unwrap(context))), BaseTypes_cellOfPropertyValue_Z2F770004(c, unwrap(context))];
|
|
394
|
+
}
|
|
395
|
+
function BaseTypes_decomposeParameterValue_Z2F770004(c, context) {
|
|
396
|
+
return [CompositeHeader_Parameter(BaseTypes_headerOntologyOfPropertyValue_Z2F770004(c, unwrap(context))), BaseTypes_cellOfPropertyValue_Z2F770004(c, unwrap(context))];
|
|
397
|
+
}
|
|
398
|
+
function BaseTypes_decomposeFactorValue_Z2F770004(c, context) {
|
|
399
|
+
return [CompositeHeader_Factor(BaseTypes_headerOntologyOfPropertyValue_Z2F770004(c, unwrap(context))), BaseTypes_cellOfPropertyValue_Z2F770004(c, unwrap(context))];
|
|
400
|
+
}
|
|
401
|
+
function BaseTypes_decomposeCharacteristicValue_Z2F770004(c, context) {
|
|
402
|
+
return [CompositeHeader_Characteristic(BaseTypes_headerOntologyOfPropertyValue_Z2F770004(c, unwrap(context))), BaseTypes_cellOfPropertyValue_Z2F770004(c, unwrap(context))];
|
|
403
|
+
}
|
|
404
|
+
function BaseTypes_decomposeProcessInput_Z2F770004(pn, context) {
|
|
405
|
+
if (LDSample.validateSource(pn, unwrap(context))) {
|
|
406
|
+
return [CompositeHeader_Input(IOType_Source()), CompositeCell_FreeText(LDSample.getNameAsString(pn, unwrap(context)))];
|
|
407
|
+
} else if (LDSample.validateMaterial(pn, unwrap(context))) {
|
|
408
|
+
return [CompositeHeader_Input(IOType_Material()), CompositeCell_FreeText(LDSample.getNameAsString(pn, unwrap(context)))];
|
|
409
|
+
} else if (LDSample.validate(pn, unwrap(context))) {
|
|
410
|
+
return [CompositeHeader_Input(IOType_Sample()), CompositeCell_FreeText(LDSample.getNameAsString(pn, unwrap(context)))];
|
|
411
|
+
} else if (LDFile.validate(pn, unwrap(context))) {
|
|
412
|
+
return [CompositeHeader_Input(IOType_Data()), CompositeCell_Data(BaseTypes_decomposeFile_Z2F770004(pn, unwrap(context)))];
|
|
413
|
+
} else {
|
|
414
|
+
const n = pn;
|
|
415
|
+
return [CompositeHeader_Input(IOType_FreeText(n.SchemaType[0])), CompositeCell_FreeText(LDSample.getNameAsString(n, unwrap(context)))];
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
function BaseTypes_decomposeProcessOutput_Z2F770004(pn, context) {
|
|
419
|
+
if (LDSample.validateMaterial(pn, unwrap(context))) {
|
|
420
|
+
return [CompositeHeader_Output(IOType_Material()), CompositeCell_FreeText(LDSample.getNameAsString(pn, unwrap(context)))];
|
|
421
|
+
} else if (LDSample.validate(pn, unwrap(context))) {
|
|
422
|
+
return [CompositeHeader_Output(IOType_Sample()), CompositeCell_FreeText(LDSample.getNameAsString(pn, unwrap(context)))];
|
|
423
|
+
} else if (LDFile.validate(pn, unwrap(context))) {
|
|
424
|
+
return [CompositeHeader_Output(IOType_Data()), CompositeCell_Data(BaseTypes_decomposeFile_Z2F770004(pn, unwrap(context)))];
|
|
425
|
+
} else {
|
|
426
|
+
const n = pn;
|
|
427
|
+
return [CompositeHeader_Output(IOType_FreeText(n.SchemaType[0])), CompositeCell_FreeText(LDSample.getNameAsString(n, unwrap(context)))];
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
function BaseTypes_composeTechnologyPlatform_ZDED3A0F(tp) {
|
|
431
|
+
const matchValue = tp.TANInfo;
|
|
432
|
+
if (matchValue == null) {
|
|
433
|
+
return `${tp.NameText}`;
|
|
434
|
+
} else {
|
|
435
|
+
return `${tp.NameText} (${tp.TermAccessionShort})`;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
function BaseTypes_decomposeTechnologyPlatform_Z721C83C5(name) {
|
|
439
|
+
const activePatternResult = ActivePatterns_$007CRegex$007C_$007C("^(?<value>.+) \\((?<ontology>[^(]*:[^)]*)\\)$", name);
|
|
440
|
+
if (activePatternResult != null) {
|
|
441
|
+
const r = value(activePatternResult);
|
|
442
|
+
let oa;
|
|
443
|
+
const tan = r.groups && r.groups.ontology || "";
|
|
444
|
+
oa = OntologyAnnotation.fromTermAnnotation(tan);
|
|
445
|
+
const v = r.groups && r.groups.value || "";
|
|
446
|
+
return OntologyAnnotation.create(v, unwrap(oa.TermSourceREF), unwrap(oa.TermAccessionNumber));
|
|
447
|
+
} else {
|
|
448
|
+
return OntologyAnnotation.create(name);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export { BaseTypes, BaseTypes_$reflection, BaseTypes_cellOfPropertyValue_Z2F770004, BaseTypes_composeCharacteristicValue, BaseTypes_composeComment_Z13201A7E, BaseTypes_composeComponent, BaseTypes_composeDefinedTerm_ZDED3A0F, BaseTypes_composeFactorValue, BaseTypes_composeFile_6CE21C7D, BaseTypes_composeFragmentDescriptor_Z4C0BEF62, BaseTypes_composeFreetextMaterialName, BaseTypes_composeParameterValue, BaseTypes_composeProcessInput, BaseTypes_composeProcessOutput, BaseTypes_composePropertyValueFromOA_ZDED3A0F, BaseTypes_composeTechnologyPlatform_ZDED3A0F, BaseTypes_decomposeCharacteristicValue_Z2F770004, BaseTypes_decomposeComment_Z2F770004, BaseTypes_decomposeComponent_Z2F770004, BaseTypes_decomposeDefinedTerm_Z2F770004, BaseTypes_decomposeFactorValue_Z2F770004, BaseTypes_decomposeFile_Z2F770004, BaseTypes_decomposeFragmentDescriptor_Z6839B9E8, BaseTypes_decomposeParameterValue_Z2F770004, BaseTypes_decomposeProcessInput_Z2F770004, BaseTypes_decomposeProcessOutput_Z2F770004, BaseTypes_decomposePropertyValueToOA_Z2F770004, BaseTypes_decomposePropertyValue_Z2F770004, BaseTypes_decomposeTechnologyPlatform_Z721C83C5, BaseTypes_headerOntologyOfPropertyValue_Z2F770004, BaseTypes_ontologyTermFromNameAndID_40457300, BaseTypes_termOfHeader_6CAF647B, BaseTypes_tryOntologyTermFromNameAndID_40457300, BaseTypes_valuesOfCell_Z436420FE };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { int32 } from '@fable-org/fable-library-js/Int32.js';
|
|
2
|
+
import { Option } from '@fable-org/fable-library-js/Option.js';
|
|
3
|
+
import { LDNode } from '../ROCrate/LDObject.js';
|
|
4
|
+
export declare const orderName = "columnIndex";
|
|
5
|
+
export declare function tryGetIndex(node: LDNode): Option<int32>;
|
|
6
|
+
export declare function setIndex(node: LDNode, index: int32): void;
|
|
7
|
+
export declare function ARCtrl_ROCrate_LDNode__LDNode_GetColumnIndex(this$: LDNode): int32;
|
|
8
|
+
export declare function ARCtrl_ROCrate_LDNode__LDNode_TryGetColumnIndex(this$: LDNode): Option<int32>;
|
|
9
|
+
export declare function ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4(this$: LDNode, index: int32): void;
|
|
10
|
+
//# sourceMappingURL=ColumnIndex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnIndex.d.ts","sourceRoot":"","sources":["../../../../src/ARCtrl/ts/Conversion/ColumnIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAEvE,OAAO,EAAS,MAAM,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAiBhD,eAAO,MAAM,SAAS,gBAAgB,CAAC;AAEvC,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAqBvD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAEzD;AAED,wBAAgB,4CAA4C,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAEjF;AAED,wBAAgB,+CAA+C,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAE5F;AAED,wBAAgB,sDAAsD,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAExG"}
|