Changes for page Technical details
Last modified by lzehl on 2021/07/05 18:57
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -139,7 +139,7 @@ 139 139 Under **##"properties"##** a nested associative array is defined, where each key defines the property name (format: lowerCamelCase; e.g. **##"givenName"##**). The corresponding value is again a nested associative array defining the expected data **##"type"##** (cf. below) and the **##"_instructions"##** for entering the correct metadata for the respective property. 140 140 141 141 (% style="text-align: justify;" %) 142 -Under **##"required"##** a list of property names can be provided that are obligatory to be present in a correctly instantiated metadata instance of the respective schema. If none of the properties are required, this key-value pair does not have to be specified. 142 +Under **##"required"##** a list of property names can be provided that are obligatory to be present in a correctly instantiated metadata instance of the respective schema. If none of the properties are required, this key-value pair does not have to be specified. Note that within openMINDS, it is assumed that only the stated properties are allowed (additional undefined properties are prohibited per default). 143 143 144 144 (% style="text-align: justify;" %) 145 145 ==== Schemas extending a context-schema ==== ... ... @@ -228,14 +228,82 @@ 228 228 {{/code}} 229 229 230 230 (% class="wikigeneratedid" %) 231 -If the expected data **##"type"##** is an **##"object"##** the expected schema type needs to be defined, as well as if the object is linked or embedded. Here abstract examples for all possible **##"object"##** constraints: 231 +If the expected data **##"type"##** is an **##"object"##** the expected schema type needs to be defined, as well as if the object is linked or embedded. Note that linked objects can exist by themselves. In contrast embedded objects depend on the existence of their parent schema (if the parent schema is deleted, the embedded objects will be deleted as well). Here abstract examples for all possible **##"object"##** constraints: 232 232 233 +{{code language="json"}} 234 +{ 235 + "properties": { 236 + "objectProperty_linked": { 237 + "_linkedTypes": [ 238 + "«SCHEMA_TYPE»" 239 + ], 240 + "_instruction": "Add the link to an instance conform with the given schema types." 241 + }, 242 + "objectProperty_embedded": { 243 + "_embeddedTypes": [ 244 + "«SCHEMA_TYPE»" 245 + ], 246 + "_instruction": "Enter an instance conform with the given schema types." 247 + } 248 + } 249 +} 250 +{{/code}} 233 233 234 234 (% class="wikigeneratedid" %) 235 -If the expected data **##"type"##** is an **##"array"##** the expected data type of the items in the array, as well as the expected length of the array can be further defined. Valid data types for items are **##"string"##**, **##"number"##**, ##**"integer"**##, **##"float"##**, **##"boolean"##**, and/or **##"object"##**. In addition, items can also be defined as n-tuples with expected data types. Here abstract examples for all possible **##"array"##** constraints: 253 +If the expected data **##"type"##** is an **##"array"##** the expected data type of the items in the array, as well as the expected length of the array can be further defined. Valid data types for items are **##"string"##**, **##"number"##**, ##**"integer"**##, **##"float"##**, **##"boolean"##**, and/or **##"object"##**. In addition, items can also be defined as n-tuples with expected data types. Note that any of the above data type depending constraints can be also applied to respective items. Note that within openMINDS, it is assumed that only the stated item types are allowed (additional unconstrained items are prohibited per default). All array constraints can be applied to all item types. Here abstract examples for all possible **##"array"##** constraints: 236 236 255 +{{code language="json"}} 256 +{ 257 + "properties": { 258 + "arrayProperty_noConstraints": { 259 + "type": "array", 260 + "_instruction": "Add at least one item of any data type." 261 + }, 262 + "arrayProperty_itemsOfTypeInteger": { 263 + "type": "array", 264 + "items": { 265 + "type": "integer" 266 + }, 267 + "_instruction": "Add at least one item of data type integer." 268 + }, 269 + "arrayProperty_uniqueItemsOfTypeString": { 270 + "type": "array", 271 + "items": { 272 + "type": "string" 273 + }, 274 + "uniqueItems": true, 275 + "_instruction": "Add unique items of data type string." 276 + }, 277 + "arrayProperty_itemsOfTypeNumber_constrainedArrayLength": { 278 + "type": "array", 279 + "items": { 280 + "type": "number" 281 + }, 282 + "maxItems": 3, 283 + "minItems": 2, 284 + "_instruction": "Add 2 or 3 items of data type number." 285 + }, 286 + "arrayProperty_objectArray": { 287 + "type": "array", 288 + "_linkedTypes": [ 289 + "«SCHEMA_TYPE»" 290 + ], 291 + "_instruction": "Add at least one link to an instance conform with the given schema types." 292 + }, 293 + "arrayProperty_tuplesWithDefinedDataTypes": { 294 + "type": "array", 295 + "items": [ 296 + {"type": "string"}, 297 + {"type": "integer"} 298 + ], 299 + "_instruction": "Add at least one 2-tuple with data type string and integer." 300 + } 301 + } 302 +} 303 +{{/code}} 304 + 237 237 === The openMINDS integration pipeline === 238 238 239 -(//**coming soon**//) If you'd like to learn more about the openMINDS integration pipeline, especially if you'd like to contribute to it, please get in touch with us (the openMINDS development team) via the issues on the openMINDSGitHubor the support email: openminds@ebrains.eu307 +(//**coming soon**//) If you'd like to learn more about the openMINDS integration pipeline, especially if you'd like to contribute to it, please get in touch with us via the issues on the [[openMINDS_generator GitHub>>https://github.com/HumanBrainProject/openMINDS_generator]] or the support email: openminds@ebrains.eu 240 240 241 241 {{putFootnotes/}}