Changes for page 3 Try it yourself!

Last modified by maaike on 2022/07/06 10:08

From version 11.1
edited by maaike
on 2022/07/06 09:31
Change comment: There is no comment for this version
To version 10.1
edited by maaike
on 2022/07/06 08:27
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -98,9 +98,9 @@
98 98  
99 99  For dataset versions that use male adult subjects, we can filter datasets using these 2 properties. The easiest way is to add a required filter to biological sex that is "EQUAL" to "male" and the age category "EQUAL" to "adult". By selecting the filter "EQUAL" instead of "CONTAINS", we ensure that only datasets with adult animals are found. If we want to be more general and include all subjects from the onset of sexual maturity, we can use "CONTAINS" instead as this will include subjects with the age category "prime adult", "young adult" and "late adult" as well.
100 100  
101 -We are showing the unflattened query here. You can take advantage of the type filter (set it to subjects and subject groups), and flatten the query where possible. The query will look different; there will be multiple elements in the "path" for "biological sex" and for the "age category".
101 +We have again taken advantage of the type filter (set it to subjects and subject groups), and we flattened the query where possible. This means that you now find multiple elements in the "path" for "biological sex" and for the "age category".
102 102  
103 -Try it yourself and check out the differences between the results of the flattened and unflattened queries! Hint: look at the indexing of elements within your results!
103 +Try it yourself and check out the differences between the results of the flattened and unflattened queries!
104 104  
105 105  {{code language="json" layout="LINENUMBERS"}}
106 106  {
... ... @@ -117,8 +117,8 @@
117 117   }
118 118   },
119 119   "meta": {
120 - "responseVocab": "https://schema.hbp.eu/myQuery/",
121 - "type": "https://openminds.ebrains.eu/core/DatasetVersion"
120 + "type": "https://openminds.ebrains.eu/core/DatasetVersion",
121 + "responseVocab": "https://schema.hbp.eu/myQuery/"
122 122   },
123 123   "structure": [
124 124   {
... ... @@ -154,35 +154,28 @@
154 154   },
155 155   {
156 156   "propertyName": "query:biologicalSex",
157 - "path": "https://openminds.ebrains.eu/vocab/biologicalSex",
158 158   "required": true,
159 - "structure": {
160 - "propertyName": "query:name",
161 - "path": "https://openminds.ebrains.eu/vocab/name",
162 - "filter": {
163 - "op": "EQUALS",
164 - "value": "male"
165 - }
166 - }
158 + "filter": {
159 + "op": "EQUALS",
160 + "value": "male"
161 + },
162 + "path": [
163 + "https://openminds.ebrains.eu/vocab/biologicalSex",
164 + "https://openminds.ebrains.eu/vocab/name"
165 + ]
167 167   },
168 168   {
169 169   "propertyName": "query:studiedState",
170 - "path": "https://openminds.ebrains.eu/vocab/studiedState",
171 171   "required": true,
172 - "structure": {
173 - "propertyName": "query:ageCategory",
174 - "path": "https://openminds.ebrains.eu/vocab/ageCategory",
175 - "required": true,
176 - "structure": {
177 - "propertyName": "query:name",
178 - "path": "https://openminds.ebrains.eu/vocab/name",
179 - "required": true,
180 - "filter": {
181 - "op": "EQUALS",
182 - "value": "adult"
183 - }
184 - }
185 - }
170 + "filter": {
171 + "op": "EQUALS",
172 + "value": "adult"
173 + },
174 + "path": [
175 + "https://openminds.ebrains.eu/vocab/studiedState",
176 + "https://openminds.ebrains.eu/vocab/ageCategory",
177 + "https://openminds.ebrains.eu/vocab/name"
178 + ]
186 186   }
187 187   ]
188 188   }
... ... @@ -263,7 +263,7 @@
263 263  }
264 264  {{/code}}
265 265  
266 -**Query datasets based on content type**
259 + **Query datasets based on content type**
267 267  
268 268  To find datasets using the content type structure, we can use a filter that "CONTAINS" a value (e.g. nifti). We are now not distinguishing between nifti 1 or nifti 2 files, but select all files that are classified as "nifti". If you want to narrow down the results further, you could replace "nifti" by "nifti.1" or "nifti.2".
269 269  
... ... @@ -397,3 +397,4 @@
397 397  {{/code}}
398 398  
399 399  
393 +