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
-
... ... @@ -42,52 +42,36 @@ 42 42 (% style="text-align: justify;" %) 43 43 **(3)** The version branch should have the following **folders** & **files**: 44 44 45 -* **##schemas/##** (required) - contains the schemas of th at metadata model implemented in the reduced openMINDS syntax (cf. below). The sub-directory of the "schemas" folder can be further structured or flat.46 -* **##tests/##** (recommended) - contains test-instances (JSON-LDs) for checking the constraints defined in the schemas of the metadata model. The sub-directory of the "tests" folder should follow the same structure as the "schemas" folder. The file names of the test-instances should state in lowerCamelCase first the name of the respectively tested schema and second, separated with an underscore, what schema constrain is tested (e.g., **##contactInformation_validEmail.jsonld##**). If a test-instance is expected to fail the schema validation the file name should receive the postfix **##"_nok"##** (e.g., **##contactInformation_invalidEmail_nok.jsonld##**).47 -* **##examples/##** (recommended) 45 +* **##schemas/##** (required) - contains the schemas of the respective metadata model implemented in the reduced openMINDS syntax (cf. below). The sub-directory of the "schemas" folder can be further structured or flat. 46 +* **##tests/##** (recommended) - contains test-instances (JSON-LDs) for checking the constraints defined in the schemas of the respective metadata model. The sub-directory of the "tests" folder should follow the same structure as the "schemas" folder with an additional sub-directory for each schema. The file names of the test-instances should be written in lowerCamelCase and state first the name of the respectively tested schema and second, separated with an underscore, what schema constrain is tested (e.g., **##contactInformation_validEmail.jsonld##**). If a test-instance is expected to fail the schema validation the file name should receive the postfix **##"_nok"##** (e.g., **##contactInformation_invalidEmail_nok.jsonld##**). 47 +* **##examples/##** (recommended) - contains examples for valid instance collections for the respective metadata model. Each example should receive its own directory (folder) with a **##README.md##** describing the example, and an **##metadataCollection##** subfolder containing the openMINDS instances (JSON-LDs). This subfolder can be further structured or flat. 48 48 * **##img/##** (optional) - contains typically the logo of the openMINDS submodule. 49 -* **##instances/##** (optional) - contains the controlled metadata instances (JSON-LDs) for selected schemas of the metadata model. The sub-directory of the "instances" folder should follow the same structure as the "schemas" folder. 50 -* **##version.txt##** (required) 51 -* **##README.md##** (required) 52 -* **##LICENSE.txt##** (required) 49 +* **##instances/##** (optional) - contains the controlled metadata instances (JSON-LDs) for selected schemas of the respective metadata model. The sub-directory of the "instances" folder should follow the same structure as the "schemas" folder with an additional sub-directory for each schema. The file names of the controlled instances should be written in lowerCamelCase and state the simple, human-readable identifier of the instance (e.g., **##homoSapiens.jsonld##** for the controlledTerms schema **##Species##**). 50 +* **##version.txt##** (required) - states the identifier of the version branch (e.g., **##v1##**) of the respective metadata model. 51 +* **##README.md##** (required) - contains a short content description of the respective metadata model. 52 +* **##LICENSE.txt##** (required) - defines the MIT license for the respective metadata model. 53 53 54 +For more information on the content of the existing openMINDS metadata models, please go to [[Metadata models & schemas>>doc:Collabs.openminds.Documentation.Metadata models and schemas.WebHome||target="_blank"]]. 54 54 55 -(% style="text-align: justify;" %) 56 -**(5)** The **##tests##** folder should for the schemas in a flat directory. The file names for these test-instances should follow the convention of 57 - 58 -(% style="text-align: center;" %) 59 -**##<<XXX>>-<<YYY>>.jsonld##** 60 - 61 -(% style="text-align: justify;" %) 62 -for files that should pass the tests, and 63 - 64 -(% style="text-align: center;" %) 65 -**##<<XXX>>-<<YYY>>-nok.jsonld##** 66 - 67 -(% style="text-align: justify;" %) 68 -for files that should fail the test. In both cases, **##<<XXX>>##** should be replaced with the label of the schema that is tested, and **##<<YYY>>##** with a user defined label for what aspect is tested (e.g., **##person-withoutCI.jsonld##**). 69 - 70 -(% style="text-align: justify;" %) 71 -**(6)** The **##examples##** folder should contain examples for valid instance collections for that metadata model. Each example should receive its own directory (folder) with a **##README.md##** describing the example, and an **##metadataCollection##** subfolder containing the openMINDS instances (JSON-LDs). This subfolder can be further structured or flat. 72 - 73 -(% style="text-align: justify;" %) 74 -**(7)** The **##img##** folder should contain image files used on that GitHub repository (e.g., the logo of the new openMINDS metadata model). The directory of the images can be further structured or flat. 75 - 76 76 === The openMINDS vocabulary === 77 77 78 78 (% style="text-align: justify;" %) 79 -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. 80 80 81 81 (% style="text-align: justify;" %) 82 -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: 83 83 84 84 {{code language="json"}} 85 85 { 86 - "OPENMINDS_SCHEMA_TYPE": { 87 - "description": "GENERAL_DESCRIPTION", 88 - "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 + ], 89 89 "translatableTo": [ 90 - "REFERENCE_TO_RELATED_SCHEMA_OF_OTHER_INITIATIVE" 74 + "«REFERENCE_TO_RELATED_SCHEMA_OF_OTHER_INITIATIVE»" 91 91 ] 92 92 } 93 93 } ... ... @@ -94,22 +94,23 @@ 94 94 {{/code}} 95 95 96 96 (% style="text-align: justify;" %) 97 -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. 98 98 99 99 (% style="text-align: justify;" %) 100 -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: 101 101 102 102 {{code language="json"}} 103 103 { 104 - "PROPERTY_NAME": { 105 - "description": "GENERAL_DESCRIPTION", 106 - "name": "DISPLAY_LABEL", 107 - "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»", 108 108 "sameAs": [ 109 - "REFERENCE_TO_MATCHING_SCHEMA-PROPERTY_OF_OTHER_INITIATIVE" 94 + "«REFERENCE_TO_MATCHING_SCHEMA-PROPERTY_OF_OTHER_INITIATIVE" 110 110 ], 111 111 "schemas": [ 112 - "RELATIVE_PATH_TO_ OPENMINDS-SCHEMA_USING_THIS_PROPERTY"97 + "«RELATIVE_PATH_TO_SCHEMA_FILE_CONTAINING_THIS_PROPERTY»" 113 113 ] 114 114 } 115 115 } ... ... @@ -116,7 +116,7 @@ 116 116 {{/code}} 117 117 118 118 (% style="text-align: justify;" %) 119 -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. 120 120 121 121 === The openMINDS syntax === 122 122 ... ... @@ -139,6 +139,7 @@ 139 139 "PROPERTY_NAME": { 140 140 "type": "DATA_TYPE", 141 141 "_instruction": "METADATA_ENTRY_INSTRUCTION" 127 + } 142 142 }, 143 143 "required": [ 144 144 "PROPERTY_NAME" ... ... @@ -177,8 +177,42 @@ 177 177 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"##**. 178 178 179 179 (% style="text-align: justify;" %) 180 -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 an abstract example for all possible string constraints: 181 181 168 +{{code language="json"}} 169 +{ 170 + "_type": "https://openminds.ebrains.eu/LABEL_OF_METADATA_MODEL/SCHEMA_NAME", 171 + "properties": { 172 + "stringProperty_noConstraints": { 173 + "type": "string", 174 + "_instruction": "Enter a free text." 175 + }, 176 + "stringProperty_lengthConstraints": { 177 + "maxLength": 6, 178 + "minLength": 2, 179 + "type": "string", 180 + "_instruction": "Enter a free text (allowed numbers of characters: 2 - 6)." 181 + }, 182 + "stringProperty_formatConstraints": { 183 + "type": "string", 184 + "_formats": [ 185 + "email", 186 + "date", 187 + "time", 188 + "date-time", 189 + "iri" 190 + ] 191 + "_instruction": "Enter a string matching one of the given formats." 192 + }, 193 + "stringProperty_patternConstraints": { 194 + "pattern": "«regular_expression»" 195 + "type": "string", 196 + "_instruction": "Enter a string matching the given regex pattern (ECMA 262 dialect)." 197 + } 198 + } 199 +} 200 +{{/code}} 201 + 182 182 === The openMINDS integration pipeline === 183 183 184 184 (//**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