Skip to content

Commit 3e84eeb

Browse files
committed
move UIHelper function into compositecell
1 parent a55d12b commit 3e84eeb

File tree

3 files changed

+28
-19
lines changed

3 files changed

+28
-19
lines changed

src/ISA/ISA/ARCtrl.ISA.fsproj

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
<TargetFrameworks>netstandard2.0</TargetFrameworks>
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
66
</PropertyGroup>
7-
<ItemGroup>
8-
<Content Include="*.fsproj; **\*.fs; **\*.fsi" PackagePath="fable\" />
7+
<ItemGroup>
98
<Compile Include="Path.fs" />
109
<Compile Include="Url.fs" />
1110
<Compile Include="Regex.fs" />
@@ -54,7 +53,6 @@
5453
<Compile Include="ArcTypes\ArcTables.fs" />
5554
<Compile Include="ArcTypes\ArcTypes.fs" />
5655
<Compile Include="ArcTypes\IdentifierSetters.fs" />
57-
<Compile Include="UIHelper.fs" />
5856
<Compile Include="Builder\Types.fs" />
5957
<Compile Include="Builder\ProcessBuilder.fs" />
6058
<Compile Include="Builder\AssayBuilder.fs" />
@@ -64,6 +62,9 @@
6462
<ItemGroup>
6563
<ProjectReference Include="..\..\FileSystem\ARCtrl.FileSystem.fsproj" />
6664
</ItemGroup>
65+
<ItemGroup>
66+
<Content Include="*.fsproj; **\*.fs; **\*.fsi" PackagePath="fable\" />
67+
</ItemGroup>
6768
<PropertyGroup>
6869
<Authors>nfdi4plants, Lukas Weil, Kevin Frey, Kevin Schneider, Oliver Muas</Authors>
6970
<Description>ARC and ISA compliant experimental metadata toolkit in F#. This project is meant as an easy means to open, manipulate and save ISA (Investigation,Study,Assay) metadata files in the dotnet environment.</Description>

src/ISA/ISA/ArcTypes/CompositeCell.fs

+24
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,30 @@ type CompositeCell =
114114
static member emptyFreeText = FreeText ""
115115
static member emptyUnitized = Unitized ("", OntologyAnnotation.empty)
116116

117+
/// <summary>
118+
/// Updates current CompositeCell with information from OntologyAnnotation.
119+
///
120+
/// For `Term`, OntologyAnnotation (oa) is fully set. For `Unitized`, oa is set as unit while value is untouched.
121+
/// For `FreeText` oa.NameText is set.
122+
/// </summary>
123+
/// <param name="oa"></param>
124+
member this.UpdateWithOA (oa:OntologyAnnotation) =
125+
match this with
126+
| CompositeCell.Term _ -> CompositeCell.createTerm oa
127+
| CompositeCell.Unitized (v,_) -> CompositeCell.createUnitized (v,oa)
128+
| CompositeCell.FreeText _ -> CompositeCell.createFreeText oa.NameText
129+
130+
/// <summary>
131+
/// Updates current CompositeCell with information from OntologyAnnotation.
132+
///
133+
/// For `Term`, OntologyAnnotation (oa) is fully set. For `Unitized`, oa is set as unit while value is untouched.
134+
/// For `FreeText` oa.NameText is set.
135+
/// </summary>
136+
/// <param name="oa"></param>
137+
/// <param name="cell"></param>
138+
static member updateWithOA (oa:OntologyAnnotation) (cell: CompositeCell) =
139+
cell.UpdateWithOA oa
140+
117141
override this.ToString() =
118142
match this with
119143
| Term oa -> $"{oa.NameText}"

src/ISA/ISA/UIHelper.fs

-16
This file was deleted.

0 commit comments

Comments
 (0)