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
-
... ... @@ -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 schemas define the name and value of the metadata they expect under the key **##properties##** as nested dictionaries, and whichof thosepropertiesisobligatoryunder the key **##required##**listing thecorrespondingpropertynames,as depictedhere: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 { ... ... @@ -50,7 +50,7 @@ 50 50 {{/code}} 51 51 52 52 (% style="text-align: justify;" %) 53 -In addition, an openMINDS schema //has to have// a key **##"_type"##** to be recognized as **target template**. In other words, the **##"_type"##** is used to define the openMINDS namespace of a corresponding schema using a particular naming convention ,asdepictedhere:53 +In addition, an openMINDS schema //has to have// a key **##"_type"##** to be recognized as **target template**. In other words, the **##"_type"##** is used to define the openMINDS namespace of a corresponding schema using a particular naming convention. Here again a generalized example: 54 54 55 55 {{code language="json"}} 56 56 { ... ... @@ -61,7 +61,7 @@ 61 61 {{/code}} 62 62 63 63 (% style="text-align: justify;" %) 64 - where**##<<schema-model>>##** has to be replaced with the label of the openMINDS metadata model to which the corresponding schema belongs to, and **##<<schema-name>>##** has to be replaced with the corresponding name of thatschema (written in **##CamelCase##**).64 +Note that **##<<schema-model>>##** has to be replaced with the label of the openMINDS metadata model to which the corresponding schema belongs to, and **##<<schema-name>>##** has to be replaced with the corresponding name of the schema (written in **##CamelCase##**). 65 65 66 66 (% style="text-align: justify;" %) 67 67 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. ... ... @@ -70,7 +70,7 @@ 70 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. 71 71 72 72 (% style="text-align: justify;" %) 73 -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##**: 73 +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 74 75 75 {{code language="json"}} 76 76 { ... ... @@ -80,12 +80,15 @@ 80 80 } 81 81 {{/code}} 82 82 83 -Note that this convention requires the context and corresponding target templates to be located in the same openMINDS metadata model repository. Note also that both, target and concept template, can or cannot define required properties. In this context, the following rules apply:83 +Note that this convention requires the context and corresponding target templates to be located in the same openMINDS metadata model repository. 84 84 85 -1. If a concept template requires properties, the target templates extending this concept template require the same properties. 86 -1. A target template can require properties of the concept template, that are not explicitly required within the concept template. Other target templates extending the same concept template will not require those properties. 87 -1. A target template can define and require additional properties that were not defined and required in the concept template. These properties are not shared with the other target templates that extend the same concept template. 85 +Note also that for properties, the following rules apply for target and concept template: 88 88 87 +1. A concept template has to define some properties which will be inherited by all extending target templates. 88 +1. If a concept template additionally defines that some of these properties are required, all extending target templates will require the same properties. 89 +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. 90 +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. 91 + 89 89 How to define the expected value of a property will be explained for the different property types in the following sections. 90 90 91 91 (% style="text-align: justify;" %)