Changes for page Technical details

Last modified by lzehl on 2021/07/05 18:57

From version 34.1
edited by lzehl
on 2021/03/08 22:20
Change comment: There is no comment for this version
To version 27.1
edited by lzehl
on 2021/03/08 22:04
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -33,7 +33,7 @@
33 33  ===== Target & context templates =====
34 34  
35 35  (% style="text-align: justify;" %)
36 -Same as in JSON-Schema, all openMINDS schema templates define the expected name (written in **##lowerCamelCase##**) and value of the metadata, typically called property, under the key **##properties##** as nested dictionaries. Furthermore, the names of obligatory metadata can be listed under the key **##required##**. Here a generalized example:
36 +Same as in JSON-Schema, all openMINDS schema templates define the name (written in lowerCamelCase) and value of the metadata (typically called property) they expect under the key **##properties##** as nested dictionaries. Furthermore, the names of obligatory metadata/properties can be listed under the key **##required##**. Here a generalized example:
37 37  
38 38  {{code language="json"}}
39 39  {
... ... @@ -55,7 +55,8 @@
55 55  {{code language="json"}}
56 56  {
57 57   "_type": "https:~/~/openminds.ebrains.eu/<<schema-model>>/<<schema-name>>",
58 - "properties": {}
58 + "properties": {},
59 + "required": []
59 59  }
60 60  {{/code}}
61 61  
... ... @@ -66,7 +66,7 @@
66 66  If an openMINDS schema template //does not// define a key **##"_type"##** (as in the first example above), it is interpreted as a **context template** which //has to be// extended to a target template.
67 67  
68 68  (% style="text-align: justify;" %)
69 -Context templates are and should be used when multiple target templates have the same subset of properties, in order to facilitate the long-term maintenance of such shared properties. In such a case, the common subset is then defined within a single context schema instead of repeatedly within each target template.
70 +Context templates are and should be used when multiple openMINDS schemas (target templates) have the same subset of properties. Such a common subset of properties can then be defined within a single context schema instead of each target template which facilitates the long-term maintenance of these properties.
70 70  
71 71  (% style="text-align: justify;" %)
72 72  To define that a target template is the extension of a context template, the target template can state under **##"_extends"##** the relative path to the context template. For example, the openMINDS core target template **##Dataset##** extends the core concept template **##researchProduct##** as indicated here:
... ... @@ -74,14 +74,17 @@
74 74  {{code language="json"}}
75 75  {
76 76   "_type": "https:~/~/openminds.ebrains.eu/core/Dataset",
77 - "_extends": "products/researchProduct.schema.tpl.json"
78 + "_extends": "products/researchProduct.schema.tpl.json",
79 + "properties": []
78 78  }
79 79  {{/code}}
80 80  
81 -Note that this convention requires the context and corresponding target templates to be located in the same openMINDS metadata model repository. Note also that for properties, the following rules apply for target and concept template: 
83 +Note that this convention requires the context and corresponding target templates to be located in the same openMINDS metadata model repository.
82 82  
85 +Note also that for properties, the following rules apply for target and concept template: 
86 +
83 83  1. A concept template has to define some properties which will be inherited by all extending target templates.
84 -1. If a concept template additionally states that some of these properties are required, all extending target templates will require the same properties. 
88 +1. If a concept template additionally defines that some of these properties are required, all extending target templates will require the same properties. 
85 85  1. A target template can require properties of the concept template, that are not explicitly required within the concept template. In such a case, the other target templates extending the same concept template will not require those properties.
86 86  1. A target template can (but does not have to) define and require additional properties that were not defined and required in the concept template. These additionally defined and required properties will not be shared with the other target templates extending the same concept template.
87 87  
Public

openMINDS