Changes for page 3 Try it yourself!
Last modified by maaike on 2022/07/06 10:08
Summary
-
Page properties (1 modified, 0 added, 0 removed)
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 a reshowingthe unflattenedquery here. You cantake advantage of the type filter (set it to subjects and subject groups), and flatten the query where possible. The query willlook different;therewillbemultiple 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,9 +117,8 @@ 117 117 } 118 118 }, 119 119 "meta": { 120 - "name": "FENS-example2", 121 - "responseVocab": "https://schema.hbp.eu/myQuery/", 122 - "type": "https://openminds.ebrains.eu/core/DatasetVersion" 120 + "type": "https://openminds.ebrains.eu/core/DatasetVersion", 121 + "responseVocab": "https://schema.hbp.eu/myQuery/" 123 123 }, 124 124 "structure": [ 125 125 { ... ... @@ -155,35 +155,28 @@ 155 155 }, 156 156 { 157 157 "propertyName": "query:biologicalSex", 158 - "path": "https://openminds.ebrains.eu/vocab/biologicalSex", 159 159 "required": true, 160 - " structure": {161 - " propertyName": "query:name",162 - " path": "https://openminds.ebrains.eu/vocab/name",163 - "filter": {164 - op":"EQUALS",165 - ue": "male"166 - }167 - }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 + ] 168 168 }, 169 169 { 170 170 "propertyName": "query:studiedState", 171 - "path": "https://openminds.ebrains.eu/vocab/studiedState", 172 172 "required": true, 173 - "structure": { 174 - "propertyName": "query:ageCategory", 175 - "path": "https://openminds.ebrains.eu/vocab/ageCategory", 176 - "required": true, 177 - "structure": { 178 - "propertyName": "query:name", 179 - "path": "https://openminds.ebrains.eu/vocab/name", 180 - "required": true, 181 - "filter": { 182 - "op": "EQUALS", 183 - "value": "adult" 184 - } 185 - } 186 - } 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 + ] 187 187 } 188 188 ] 189 189 } ... ... @@ -264,7 +264,7 @@ 264 264 } 265 265 {{/code}} 266 266 267 -**Query datasets based on content type** 259 + **Query datasets based on content type** 268 268 269 269 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". 270 270