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
-
... ... @@ -56,18 +56,22 @@ 56 56 === The openMINDS vocabulary === 57 57 58 58 (% style="text-align: justify;" %) 59 -Located under the folder **##vocab##** in the main openMINDS GitHub directory, the openMINDS vocabulary is semi-automatically gathered and stored in dedicated JSON files ([[**##types.json##**>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS/v2/vocab/types.json||rel="noopener noreferrer" target="_blank"]] and [[**##properties.json##**>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS/v2/vocab/properties.json||rel="noopener noreferrer" target="_blank"]]). The openMINDS integration pipeline makes sure that both files are updated with each commit to any of the GitHub repositories for the openMINDS metadata models. With that, the openMINDS vocab reflects always an up-to-date status of the general attributes of existing **schemas** and **properties** across all openMINDS metadata models, while providing the opportunity to centrally review and maintain their consistency. In addition, this design allows us to centrally define and maintain multiple references to related schemas and matching schema properties of other metadata initiatives. How this works in detail is explained in the following. 59 +Located under the folder **##vocab##** in the main branch of the central openMINDS GitHub directory, the openMINDS vocabulary is semi-automatically gathered and stored in dedicated JSON files ([[**##types.json##**>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS/v2/vocab/types.json||rel="noopener noreferrer" target="_blank"]] and [[**##properties.json##**>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS/v2/vocab/properties.json||rel="noopener noreferrer" target="_blank"]]). The openMINDS integration pipeline makes sure that both files are updated with each commit to any of the GitHub repositories for the openMINDS metadata models. With that, the openMINDS vocab reflects always an up-to-date status of the general attributes of existing **schema types** and **properties** across all openMINDS metadata models, while providing the opportunity to centrally review and maintain their consistency. In addition, this design allows us to centrally define and maintain multiple references to related schemas and matching schema properties of other metadata initiatives. How this works in detail is explained in the following. 60 60 61 61 (% style="text-align: justify;" %) 62 -The **##types.json##** file is an associative array listing all existing openMINDS schema s(viatheir type). For each openMINDS schema, a small list of general attributes are provided in a nested associative array. Currently, the following attributes are captured:62 +The **##types.json##** file is an associative array listing all existing openMINDS schema types. For each openMINDS schema type, a small list of general attributes are provided in a nested associative array. Currently, the following attributes are captured: 63 63 64 64 {{code language="json"}} 65 65 { 66 - "OPENMINDS_SCHEMA_TYPE": { 67 - "description": "GENERAL_DESCRIPTION", 68 - "name": "DISPLAY_LABEL", 66 + "https://openminds.ebrains.eu/«METADATA_MODEL_LABEL»/«SCHEMA_NAME»": { 67 + "description": "«GENERAL_DESCRIPTION»", 68 + "label": "«HUMAN-READABLE_LABEL»", 69 + "name": "«SCHEMA_NAME»", 70 + "schemas": [ 71 + "«RELATIVE_PATH_TO_SCHEMA_FILE_OF_THAT_TYPE»" 72 + ], 69 69 "translatableTo": [ 70 - "REFERENCE_TO_RELATED_SCHEMA_OF_OTHER_INITIATIVE" 74 + "«REFERENCE_TO_RELATED_SCHEMA_OF_OTHER_INITIATIVE»" 71 71 ] 72 72 } 73 73 } ... ... @@ -74,22 +74,23 @@ 74 74 {{/code}} 75 75 76 76 (% style="text-align: justify;" %) 77 -With each new schema committed to one of the openMINDS metadata models, a new entry is appended to the **##types.json##** file, with the displaylabel automatically derivedfrom the respective schematype and the remaining attributes predefined with a null value.Once an entryforaschema ismadein the**##types.json##**file,thevaluesof allattributes(**##"name"##**, **##"description"##**, and **##"translatableTo"##**)can bemanuallyedited. All manual editions will be preserved and not overwritten when the file is updated again with a new commit. In case a schema is deleted from the openMINDS metadata models, the corresponding entry in the **##types.json##** file is marked as being deprecated (additional attribute-value pair; **##"deprecated": true##**). It only can be permanently removed from the **##types.json##** file, if the entry is manually deleted.81 +With each new schema committed to one of the openMINDS metadata models, a new entry is appended to the **##types.json##** file, with the values for **##"name"##**, **##"label"##**, and **##"schemas"##** automatically derived. The remaining attributes are predefined with a null value and frequently, manually edited by a corresponding expert of the openMINDS development team. If necessary the auto-derived **##"label"##** value can be edited as well. All manual editions will be preserved and not overwritten when the file is updated again with a new commit. In case a schema is deleted from the openMINDS metadata models, the corresponding entry in the **##types.json##** file is marked as being deprecated (additional attribute-value pair; **##"deprecated": true##**). It only can be permanently removed from the **##types.json##** file, if the entry is manually deleted. 78 78 79 79 (% style="text-align: justify;" %) 80 -Similar to the **##types.json##** file, the **##properties.json##** file is an associative array listing all properties across all existing openMINDS schemas (via the property name). For each openMINDS property, a small list of general attributes are provided in a nested associative array. Currently, the following attributes are captured:84 +Similar to the **##types.json##** file, the **##properties.json##** file is an associative array listing all properties across all existing openMINDS schemas. For each openMINDS property, a small list of general attributes are provided in a nested associative array. Currently, the following attributes are captured: 81 81 82 82 {{code language="json"}} 83 83 { 84 - "PROPERTY_NAME": { 85 - "description": "GENERAL_DESCRIPTION", 86 - "name": "DISPLAY_LABEL", 87 - "nameForReverseLink": "DISPLAY_LABEL_OF_REVERSED_LINK", 88 + "https://openminds.ebrains.eu/vocab/«PROPERTY_NAME»": { 89 + "description": "«GENERAL_DESCRIPTION", 90 + "label": "«HUMAN-READABLE_LABEL", 91 + "labelForReverseLink": "«HUMAN-READABLE_LABEL_OF_REVERSED_LINK", 92 + "name": "«PROPERTY_NAME»", 88 88 "sameAs": [ 89 - "REFERENCE_TO_MATCHING_SCHEMA-PROPERTY_OF_OTHER_INITIATIVE" 94 + "«REFERENCE_TO_MATCHING_SCHEMA-PROPERTY_OF_OTHER_INITIATIVE" 90 90 ], 91 91 "schemas": [ 92 - "RELATIVE_PATH_TO_ OPENMINDS-SCHEMA_USING_THIS_PROPERTY"97 + "«RELATIVE_PATH_TO_SCHEMA_FILE_CONTAINING_THIS_PROPERTY»" 93 93 ] 94 94 } 95 95 } ... ... @@ -96,7 +96,7 @@ 96 96 {{/code}} 97 97 98 98 (% style="text-align: justify;" %) 99 -With each new property committed to a schema of one of the openMINDS metadata models, a new entry is appended to the **##properties.json##** file, with the displaylabel and listof schemaswhich this property occursautomatically derived. The remaining attributes areinitiallyprovided with a null value.Once an entryforapropertyismade inthe**##properties.json##**file,thevaluesofall attributes(**##"name"##**,**##"description"##**,**##"nameForReversedLink"##**,and **##"sameAs"##**)can bemanuallyedited,except for **##"schemas"##**which will bealways automatically updated. Allthosemanual editions will be preserved and not overwritten when the file is updated again with a new commit. In case a property is not used anymore in any of the schemas from the openMINDS metadata models, the corresponding entry in the **##properties.json##** file is marked as being deprecated (additional attribute-value pair; **##"deprecated": true##**). It only can be permanently removed from the **##properties.json##** file, if the entry is manually deleted.104 +With each new property committed to a schema of one of the openMINDS metadata models, a new entry is appended to the **##properties.json##** file, with the **##"name"##**, **##"label"##** and **##"labelForReversedLink"##** automatically derived. The remaining attributes are predefined with a null value and frequently, manually edited by a corresponding expert of the openMINDS development team. If necessary the auto-derived values for **##"label"##** and **##"labelForReversedLink"##** can be edited as well. All manual editions will be preserved and not overwritten when the file is updated again with a new commit. In case a property is not used anymore in any of the schemas from the openMINDS metadata models, the corresponding entry in the **##properties.json##** file is marked as being deprecated (additional attribute-value pair; **##"deprecated": true##**). It only can be permanently removed from the **##properties.json##** file, if the entry is manually deleted. 100 100 101 101 === The openMINDS syntax === 102 102 ... ... @@ -119,6 +119,7 @@ 119 119 "PROPERTY_NAME": { 120 120 "type": "DATA_TYPE", 121 121 "_instruction": "METADATA_ENTRY_INSTRUCTION" 127 + } 122 122 }, 123 123 "required": [ 124 124 "PROPERTY_NAME" ... ... @@ -154,11 +154,76 @@ 154 154 ==== Data type depending constraints ==== 155 155 156 156 (% style="text-align: justify;" %) 157 -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"##**. 163 +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"##**, **##"number"##** (integer or float), ##**"integer"**##, **##"float"##**, **##"boolean"##**, **##"array"##** and **##"object"##**. 158 158 159 159 (% style="text-align: justify;" %) 160 -If the expected data **##"type"##** is a **##"string"##** the expected number of characters, the format or a regular expression pattern of the string can be further defined. 166 +If the expected data **##"type"##** is a **##"string"##** the expected number of characters, the format or a regular expression pattern of the string can be further defined. Here abstract examples for all possible string constraints: 161 161 168 +{{code language="json"}} 169 +{ 170 + "properties": { 171 + "stringProperty_noConstraints": { 172 + "type": "string", 173 + "_instruction": "Enter a free text." 174 + }, 175 + "stringProperty_lengthConstraints": { 176 + "maxLength": 6, 177 + "minLength": 2, 178 + "type": "string", 179 + "_instruction": "Enter a free text (allowed numbers of characters: 2 - 6)." 180 + }, 181 + "stringProperty_formatConstraints": { 182 + "type": "string", 183 + "_formats": [ 184 + "email", 185 + "date", 186 + "time", 187 + "date-time", 188 + "iri" 189 + ] 190 + "_instruction": "Enter a string matching one of the given formats." 191 + }, 192 + "stringProperty_patternConstraints": { 193 + "pattern": "«regular_expression»" 194 + "type": "string", 195 + "_instruction": "Enter a string matching the given regex pattern (ECMA 262 dialect)." 196 + } 197 + } 198 +} 199 +{{/code}} 200 + 201 +(% class="wikigeneratedid" %) 202 +If the expected data **##"type"##** is an **##"integer"##** or a **##"number"##** (float or integer) the expected range or multiples can be further defined. Here abstract examples for all possible **##"integer"##** and **##"number"##** constraints (not that both constraints can be defined for both data types): 203 + 204 +{{code language="json"}} 205 +{ 206 + "properties": { 207 + "integerProperty_noConstraints": { 208 + "type": "integer", 209 + "_instruction": "Enter an integer." 210 + }, 211 + "integerProperty_rangeConstraints": { 212 + "maximum": 50, 213 + "minimum": 10, 214 + "type": "integer", 215 + "_instruction": "Enter an integer equal or between 10 and 50." 216 + }, 217 + "numberProperty_noConstraints": { 218 + "type": "number", 219 + "_instruction": "Enter a number (float or integer)." 220 + }, 221 + "numberProperty_multipleOfConstraints": { 222 + "multipleOf": 10.5, 223 + "type": "number", 224 + "_instruction": "Enter any number which is a multiple of 10.5." 225 + } 226 + } 227 +} 228 +{{/code}} 229 + 230 +(% class="wikigeneratedid" %) 231 +If ... 232 + 162 162 === The openMINDS integration pipeline === 163 163 164 164 (//**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 openMINDS or openMINDS_generator GitHub or the support email: openminds@ebrains.eu