@@ -11,22 +11,29 @@ type LDLabProtocol =
1111
1212 static member description = " http://schema.org/description"
1313
14- static member intendedUse = " https://bioschemas.org/intendedUse"
15-
1614 static member name = " http://schema.org/name"
1715
18- static member comment = " http://schema.org/comment"
16+ static member computationalTool = " https://bioschemas.org/properties/computationalTool"
17+
18+ static member computationalToolDeprecated = " https://bioschemas.org/computationalTool"
19+
20+ static member labEquipment = " https://bioschemas.org/properties/labEquipment"
21+
22+ static member labEquipmentDeprecated = " https://bioschemas.org/labEquipment"
1923
20- static member computationalTool = " https://bioschemas.org/computationalTool "
24+ static member reagent = " https://bioschemas.org/properties/reagent "
2125
22- static member labEquipment = " https://bioschemas.org/labEquipment "
26+ static member reagentDeprecated = " https://bioschemas.org/reagent "
2327
24- static member reagent = " https://bioschemas.org/reagent"
28+ static member intendedUse = " https://bioschemas.org/properties/intendedUse"
29+
30+ static member intendedUseDeprecated = " https://bioschemas.org/intendedUse"
2531
2632 static member url = " http://schema.org/url"
2733
2834 static member version = " http://schema.org/version"
2935
36+ static member comment = " http://schema.org/comment"
3037
3138 static member tryGetDescriptionAsString ( lp : LDNode , ? context : LDContext ) =
3239 match lp.TryGetPropertyAsSingleton( LDLabProtocol.description, ?context = context) with
@@ -39,7 +46,10 @@ type LDLabProtocol =
3946 static member tryGetIntendedUseAsString ( lp : LDNode , ? context : LDContext ) =
4047 match lp.TryGetPropertyAsSingleton( LDLabProtocol.intendedUse, ?context = context) with
4148 | Some (:? string as iu) -> Some iu
42- | _ -> None
49+ | _ ->
50+ match lp.TryGetPropertyAsSingleton( LDLabProtocol.intendedUseDeprecated, ?context = context) with
51+ | Some (:? string as iu) -> Some iu
52+ | _ -> None
4353
4454 static member setIntendedUseAsString ( lp : LDNode , intendedUse : string , ? context : LDContext ) =
4555 lp.SetProperty( LDLabProtocol.intendedUse, intendedUse, ?context = context)
@@ -48,7 +58,10 @@ type LDLabProtocol =
4858 let filter ldObject context = LDDefinedTerm.validate( ldObject, ?context = context)
4959 match lp.TryGetPropertyAsSingleNode( LDLabProtocol.intendedUse, ?graph = graph, ?context = context) with
5060 | Some iu when filter iu context -> Some iu
51- | _ -> None
61+ | _ ->
62+ match lp.TryGetPropertyAsSingleNode( LDLabProtocol.intendedUseDeprecated, ?graph = graph, ?context = context) with
63+ | Some iu when filter iu context -> Some iu
64+ | _ -> None
5265
5366 static member setIntendedUseAsDefinedTerm ( lp : LDNode , intendedUse : LDNode , ? context : LDContext ) =
5467 lp.SetProperty( LDLabProtocol.intendedUse, intendedUse, ?context = context)
@@ -74,19 +87,34 @@ type LDLabProtocol =
7487 lp.SetProperty( LDLabProtocol.comment, comments, ?context = context)
7588
7689 static member getComputationalTools ( lp : LDNode , ? graph : LDGraph , ? context : LDContext ) =
77- lp.GetPropertyNodes( LDLabProtocol.computationalTool, ?graph = graph, ?context = context)
90+ let l = lp.GetPropertyNodes( LDLabProtocol.computationalTool, ?graph = graph, ?context = context)
91+ if l.Count = 0 then
92+ // try deprecated property
93+ lp.GetPropertyNodes( LDLabProtocol.computationalToolDeprecated, ?graph = graph, ?context = context)
94+ else
95+ l
7896
7997 static member setComputationalTools ( lp : LDNode , computationalTools : ResizeArray < LDNode >, ? context : LDContext ) =
8098 lp.SetProperty( LDLabProtocol.computationalTool, computationalTools, ?context = context)
8199
82100 static member getLabEquipments ( lp : LDNode , ? graph : LDGraph , ? context : LDContext ) =
83- lp.GetPropertyNodes( LDLabProtocol.labEquipment, ?graph = graph, ?context = context)
101+ let l = lp.GetPropertyNodes( LDLabProtocol.labEquipment, ?graph = graph, ?context = context)
102+ if l.Count = 0 then
103+ // try deprecated property
104+ lp.GetPropertyNodes( LDLabProtocol.labEquipmentDeprecated, ?graph = graph, ?context = context)
105+ else
106+ l
84107
85108 static member setLabEquipments ( lp : LDNode , labEquipments : ResizeArray < LDNode >, ? context : LDContext ) =
86109 lp.SetProperty( LDLabProtocol.labEquipment, labEquipments, ?context = context)
87110
88111 static member getReagents ( lp : LDNode , ? graph : LDGraph , ? context : LDContext ) =
89- lp.GetPropertyNodes( LDLabProtocol.reagent, ?graph = graph, ?context = context)
112+ let l = lp.GetPropertyNodes( LDLabProtocol.reagent, ?graph = graph, ?context = context)
113+ if l.Count = 0 then
114+ // try deprecated property
115+ lp.GetPropertyNodes( LDLabProtocol.reagentDeprecated, ?graph = graph, ?context = context)
116+ else
117+ l
90118
91119 static member setReagents ( lp : LDNode , reagents : ResizeArray < LDNode >, ? context : LDContext ) =
92120 lp.SetProperty( LDLabProtocol.reagent, reagents, ?context = context)
0 commit comments