Skip to content

Commit 1887f0d

Browse files
authored
Update LabProtocol_v1.0-DRAFT.jsonld
Added very basic JSON-schema validation rules for the 'parameter' property.
1 parent 599039c commit 1887f0d

1 file changed

Lines changed: 175 additions & 2 deletions

File tree

LabProtocol/jsonld/LabProtocol_v1.0-DRAFT.jsonld

Lines changed: 175 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,180 @@
3030
"properties": {
3131
"parameter": {
3232
"description": "A structured description of a condition to be specified in the execution of this LabProtocol. This includes physical quantities that can be set for steps of this LabProtocol, such as temperature or time. Ideally given with a reference to an ontology (propertyID).",
33-
"owl:cardinality": "many"
33+
"owl:cardinality": "many",
34+
"oneOf": [
35+
{
36+
"@type": "PropertyValue",
37+
"type": "object",
38+
"properties": {
39+
"name": {
40+
"type": "string"
41+
},
42+
"value": {
43+
"oneOf": [
44+
{
45+
"type": "string"
46+
},
47+
{
48+
"type": "boolean"
49+
},
50+
{
51+
"type": "number"
52+
}
53+
]
54+
},
55+
"propertyID": {
56+
"oneOf": [
57+
{
58+
"type": "string"
59+
},
60+
{
61+
"type": "string",
62+
"format": "uri"
63+
}
64+
]
65+
},
66+
"valueReference": {
67+
"oneOf": [
68+
{
69+
"@type": "DefinedTerm",
70+
"type": "object",
71+
"properties": {
72+
"inDefinedTermSet": {
73+
"type": "string"
74+
},
75+
"name": {
76+
"type": "string"
77+
},
78+
"termcode": {
79+
"type": "string"
80+
},
81+
"sameAs": {
82+
"type": "string",
83+
"format": "uri"
84+
}
85+
}
86+
},
87+
{
88+
"type": "string"
89+
}
90+
]
91+
},
92+
"unitCode": {
93+
"oneOf": [
94+
{
95+
"type": "string"
96+
},
97+
{
98+
"type": "string",
99+
"format": "uri"
100+
}
101+
]
102+
},
103+
"unitText": {
104+
"type": "string"
105+
}
106+
},
107+
"required": [],
108+
"recommended": [
109+
"name",
110+
"propertyID",
111+
"value",
112+
"valueReference"
113+
],
114+
"optional": [
115+
"unitCode",
116+
"unitText"
117+
]
118+
},
119+
{
120+
"type": "array",
121+
"items": {
122+
"@type": "PropertyValue",
123+
"type": "object",
124+
"properties": {
125+
"name": {
126+
"type": "string"
127+
},
128+
"value": {
129+
"oneOf": [
130+
{
131+
"type": "string"
132+
},
133+
{
134+
"type": "boolean"
135+
},
136+
{
137+
"type": "number"
138+
}
139+
]
140+
},
141+
"propertyID": {
142+
"oneOf": [
143+
{
144+
"type": "string"
145+
},
146+
{
147+
"type": "string",
148+
"format": "uri"
149+
}
150+
]
151+
},
152+
"valueReference": {
153+
"oneOf": [
154+
{
155+
"@type": "DefinedTerm",
156+
"type": "object",
157+
"properties": {
158+
"inDefinedTermSet": {
159+
"type": "string"
160+
},
161+
"name": {
162+
"type": "string"
163+
},
164+
"termcode": {
165+
"type": "string"
166+
},
167+
"sameAs": {
168+
"type": "string",
169+
"format": "uri"
170+
}
171+
}
172+
},
173+
{
174+
"type": "string"
175+
}
176+
]
177+
},
178+
"unitCode": {
179+
"oneOf": [
180+
{
181+
"type": "string"
182+
},
183+
{
184+
"type": "string",
185+
"format": "uri"
186+
}
187+
]
188+
},
189+
"unitText": {
190+
"type": "string"
191+
}
192+
},
193+
"required": [],
194+
"recommended": [
195+
"name",
196+
"propertyID",
197+
"value",
198+
"valueReference"
199+
],
200+
"optional": [
201+
"unitCode",
202+
"unitText"
203+
]
204+
}
205+
}
206+
]
34207
},
35208
"bioSample": {
36209
"description": "BioSample used in the protocol. It could be a record in a Dataset describing the sample or a physical object corresponding to the sample or a URL pointing to the type of sample used.",
@@ -2163,4 +2336,4 @@
21632336
]
21642337
}
21652338
]
2166-
}
2339+
}

0 commit comments

Comments
 (0)