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
-
... ... @@ -92,7 +92,7 @@ 92 92 "schemas": [ 93 93 "RELATIVE_PATH_TO_OPENMINDS-SCHEMA_USING_THIS_PROPERTY" 94 94 ] 95 - } 95 + } 96 96 } 97 97 {{/code}} 98 98 ... ... @@ -108,9 +108,6 @@ 108 108 The few remaining customized technical properties which need additional interpretation or translation to a formal schema languages (e.g. JSON-Schema) have an underscore as prefix (e.g., **##"_type"##**). Within the openMINDS integration pipeline (cf. below), the schema template syntax is interpreted, extended and flexibly translated to various formal schema languages. All further specifications of the openMINDS schema template syntax are described below. 109 109 110 110 (% style="text-align: justify;" %) 111 -==== Basic openMINDS schema structure ==== 112 - 113 -(% style="text-align: justify;" %) 114 114 All openMINDS schemas need to have the extension **##.schema.tpl.json##** and each schema is defined as a nested associative array (dictionary) with the following conceptual structure: 115 115 116 116 {{code language="json"}} ... ... @@ -137,24 +137,12 @@ 137 137 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. 138 138 139 139 (% style="text-align: justify;" %) 140 - ====Schemas extending a context-schema====137 +In the case that several schemas are highly related and contain a common set of properties, it is possible to define a non-type context-schema with these common properties that can be extended and modified by the group of related schemas. All properties and constraints (e.g. required properties, expected data types) defined in the context-schema are passed on to the schemas extending this context-schema. Each of these schemas can define additional properties, or (if necessary) can overwrite the constraints of the context-schema. In order to state that a schema is extending a context-schema, the following additional key-value pair has to be added to the schema template above: 141 141 142 -(% style="text-align: justify;" %) 143 -In the case that several schemas are highly related and contain a common set of properties, it is possible to define a non-type context-schema with these common properties that can be extended and modified by the group of related schemas. 144 - 145 -(% style="text-align: justify;" %) 146 -All properties and constraints (e.g. required properties, expected data types) defined in the context-schema are passed on to the schemas extending this context-schema. Each of these schemas can define additional properties, or (if necessary) can overwrite the constraints of the context-schema (incl. **##"_instructions"##**). In order to state that a schema is extending a context-schema, the following additional key-value pair has to be added to the schema template above: 147 - 148 148 (% style="text-align: center;" %) 149 149 **##"_extends": "RELATIVE_PATH_TO_OPENMINDS-CONTEXT-SCHEMA"##** 150 150 151 151 (% style="text-align: justify;" %) 152 -This design not only makes it easier to identify highly related schemas, but also facilitates the maintenance of the commonly used properties. A good hands-on example, is the context-schema [[ResearchProduct>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS_core/v3/schemas/products/researchProduct.schema.tpl.json||rel="noopener noreferrer" target="_blank"]] which is extended by the following schema set: [[Dataset>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS_core/v3/schemas/products/dataset.schema.tpl.json||rel="noopener noreferrer" target="_blank"]], [[MetaDataModel>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS_core/v3/schemas/products/metaDataModel.schema.tpl.json]], [[Model>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS_core/v3/schemas/products/model.schema.tpl.json||rel="noopener noreferrer" target="_blank"]], and [[Software>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS_core/v3/schemas/products/software.schema.tpl.json||rel="noopener noreferrer" target="_blank"]]. 153 - 154 -(% style="text-align: justify;" %) 155 -==== Data type depending constraints ==== 156 - 157 -(% style="text-align: justify;" %) 158 158 Depending on the expected data **##"type"##** additional constraints can be made for the metadata entry of a respective property. Currently, the openMINDS schema template syntax supports the following data types: **##"string"##**, ##**"integer"**##, **##"float"##**, **##"boolean"##**, **##"array"##** and **##"object"##**. 159 159 160 160 === The openMINDS integration pipeline ===