-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add QProcessSequence type for QueryModel
- Loading branch information
Showing
8 changed files
with
504 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
namespace ISADotNet.QueryModel | ||
|
||
open ISADotNet | ||
open System.Text.Json.Serialization | ||
|
||
[<AnyOf>] | ||
type ISACategory = | ||
| [<SerializationOrder(0)>] Parameter of ProtocolParameter | ||
| [<SerializationOrder(1)>] Characteristic of MaterialAttribute | ||
| [<SerializationOrder(2)>] Factor of Factor | ||
|
||
member this.IsCharacteristicCategory = | ||
match this with | ||
| Characteristic _ -> true | ||
| _ -> false | ||
|
||
member this.IsParameterCategory = | ||
match this with | ||
| Parameter _ -> true | ||
| _ -> false | ||
|
||
member this.IsFactorCategory = | ||
match this with | ||
| Factor _ -> true | ||
| _ -> false | ||
|
||
/// Returns the name of the Category | ||
member this.Name = | ||
match this with | ||
| Parameter p -> try p.ParameterName.Value with | _ -> failwith $"Parameter does not contain header" | ||
| Characteristic c -> try c.CharacteristicType.Value with | _ -> failwith $"Characteristic does not contain header" | ||
| Factor f -> try f.FactorType.Value with | _ -> failwith $"Factor does not contain header" | ||
|
||
/// Returns the name of the Category as string | ||
member this.NameText = this.Name.NameText | ||
|
||
/// Returns the header text of the Category as string | ||
member this.HeaderText = | ||
match this with | ||
| Parameter p -> try $"Parameter [{p.NameText}]" with | _ -> failwith $"Parameter does not contain header" | ||
| Characteristic c -> try $"Characteristics [{c.NameText}]" with | _ -> failwith $"Characteristic does not contain header" | ||
| Factor f -> try $"Factor [{f.NameText}]" with | _ -> failwith $"Factor does not contain header" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
module Column | ||
namespace ISADotNet.QueryModel | ||
|
||
open ISADotNet | ||
open System.Text.Json.Serialization | ||
|
||
open System.Collections.Generic | ||
open System.Collections | ||
|
||
type QColumn = | ||
{ | ||
[<JsonPropertyName(@"category")>] | ||
Header : ISACategory | ||
[<JsonPropertyName(@"values")>] | ||
Values : KeyValuePair<string*string,ISAValue> list | ||
} | ||
|
Oops, something went wrong.