Changes for page Technical details

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

From version 83.2
edited by lzehl
on 2021/07/05 13:16
Change comment: There is no comment for this version
To version 90.1
edited by lzehl
on 2021/07/05 18:56
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -68,7 +68,7 @@
68 68   "label": "«HUMAN-READABLE_LABEL»",
69 69   "name": "«SCHEMA_NAME»",
70 70   "schemas": [
71 - "«METADATA_MODEL_LABEL»/«VERSION_BRANCH»/«SCHEMA_NAME»"
71 + "«RELATIVE_PATH_TO_SCHEMA_FILE_OF_THAT_TYPE»"
72 72   ],
73 73   "translatableTo": [
74 74   "«REFERENCE_TO_RELATED_SCHEMA_OF_OTHER_INITIATIVE»"
... ... @@ -78,7 +78,7 @@
78 78  {{/code}}
79 79  
80 80  (% style="text-align: justify;" %)
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 **##"name"##** and **##"label"##** automatically derived from the respective schema type. 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" 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.
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.
82 82  
83 83  (% style="text-align: justify;" %)
84 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:
... ... @@ -85,15 +85,16 @@
85 85  
86 86  {{code language="json"}}
87 87  {
88 - "https://openminds.ebrains.eu/vocab/«PROPERTY_NAME": {
89 - "description": "GENERAL_DESCRIPTION",
90 - "name": "DISPLAY_LABEL",
91 - "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»",
92 92   "sameAs": [
93 - "REFERENCE_TO_MATCHING_SCHEMA-PROPERTY_OF_OTHER_INITIATIVE"
94 + "«REFERENCE_TO_MATCHING_SCHEMA-PROPERTY_OF_OTHER_INITIATIVE"
94 94   ],
95 95   "schemas": [
96 - "RELATIVE_PATH_TO_OPENMINDS-SCHEMA_USING_THIS_PROPERTY"
97 + "«RELATIVE_PATH_TO_SCHEMA_FILE_CONTAINING_THIS_PROPERTY»"
97 97   ]
98 98   }
99 99  }
... ... @@ -100,7 +100,7 @@
100 100  {{/code}}
101 101  
102 102  (% style="text-align: justify;" %)
103 -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 display label and list of schemas in which this property occurs automatically derived. The remaining attributes are initially provided with a null value. Once an entry for a property is made in the **##properties.json##** file, the values of all attributes (**##"name"##**, **##"description"##**, **##"nameForReversedLink"##**, and **##"sameAs"##**) can be manually edited, except for **##"schemas"##** which will be always automatically updated. All those 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.
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.
104 104  
105 105  === The openMINDS syntax ===
106 106  
... ... @@ -123,6 +123,7 @@
123 123   "PROPERTY_NAME": {
124 124   "type": "DATA_TYPE",
125 125   "_instruction": "METADATA_ENTRY_INSTRUCTION"
127 + }
126 126   },
127 127   "required": [
128 128   "PROPERTY_NAME"
... ... @@ -137,7 +137,7 @@
137 137  Under **##"properties"##** a nested associative array is defined, where each key defines the property name (format: lowerCamelCase; e.g. **##"givenName"##**). The corresponding value is again a nested associative array defining the expected data **##"type"##** (cf. below) and the **##"_instructions"##** for entering the correct metadata for the respective property.
138 138  
139 139  (% style="text-align: justify;" %)
140 -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.
142 +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. Note that within openMINDS, it is assumed that only the stated properties are allowed (additional undefined properties are prohibited per default).
141 141  
142 142  (% style="text-align: justify;" %)
143 143  ==== Schemas extending a context-schema ====
... ... @@ -158,11 +158,148 @@
158 158  ==== Data type depending constraints ====
159 159  
160 160  (% style="text-align: justify;" %)
161 -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"##**, **##"object"##** or **##"array"##**. Except for **##"boolean"##**, all these data types can have additional constraints. The essential constraints will be summarized in the following (cf. [[JSON-Schema specifications 7.0>>https://json-schema.org/understanding-json-schema/index.html||rel="noopener noreferrer" target="_blank"]] for more).
162 162  
163 163  (% style="text-align: justify;" %)
164 -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:
165 165  
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_ECMA_262_dialect»"
194 + "type": "string",
195 + "_instruction": "Enter a string matching the given regex pattern."
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 the expected data **##"type"##** is an **##"object"##** the expected schema type needs to be defined, as well as if the object is linked or embedded. Note that linked objects can exist by themselves. In contrast embedded objects depend on the existence of their parent schema (if the parent schema is deleted, the embedded objects will be deleted as well). Here abstract examples for all possible  **##"object"##** constraints:
232 +
233 +{{code language="json"}}
234 +{
235 + "properties": {
236 + "objectProperty_linked": {
237 + "_linkedTypes": [
238 + "«SCHEMA_TYPE»"
239 + ],
240 + "_instruction": "Add the link to an instance conform with the given schema types."
241 + },
242 + "objectProperty_embedded": {
243 + "_embeddedTypes": [
244 + "«SCHEMA_TYPE»"
245 + ],
246 + "_instruction": "Enter an instance conform with the given schema types."
247 + }
248 + }
249 +}
250 +{{/code}}
251 +
252 +(% class="wikigeneratedid" %)
253 +If the expected data **##"type"##** is an **##"array"##** the expected data type of the items in the array, as well as the expected length of the array can be further defined. Valid data types for items are **##"string"##**, **##"number"##**, ##**"integer"**##, **##"float"##**, **##"boolean"##**, and/or **##"object"##**. In addition, items can also be defined as n-tuples with expected data types. Note that any of the above data type depending constraints can be also applied to respective items. Note that within openMINDS, it is assumed that only the stated item types are allowed (additional unconstrained items are prohibited per default). All array constraints can be applied to all item types. Here abstract examples for all possible  **##"array"##** constraints:
254 +
255 +{{code language="json"}}
256 +{
257 + "properties": {
258 + "arrayProperty_noConstraints": {
259 + "type": "array",
260 + "_instruction": "Add at least one item of any data type."
261 + },
262 + "arrayProperty_itemsOfTypeInteger": {
263 + "type": "array",
264 + "items": {
265 + "type": "integer"
266 + },
267 + "_instruction": "Add at least one item of data type integer."
268 + },
269 + "arrayProperty_uniqueItemsOfTypeString": {
270 + "type": "array",
271 + "items": {
272 + "type": "string"
273 + },
274 + "uniqueItems": true,
275 + "_instruction": "Add unique items of data type string."
276 + },
277 + "arrayProperty_itemsOfTypeNumber_constrainedArrayLength": {
278 + "type": "array",
279 + "items": {
280 + "type": "number"
281 + },
282 + "maxItems": 3,
283 + "minItems": 2,
284 + "_instruction": "Add 2 or 3 items of data type number."
285 + },
286 + "arrayProperty_objectArray": {
287 + "type": "array",
288 + "_linkedTypes": [
289 + "«SCHEMA_TYPE»"
290 + ],
291 + "_instruction": "Add at least one link to an instance conform with the given schema types."
292 + },
293 + "arrayProperty_tuplesWithDefinedDataTypes": {
294 + "type": "array",
295 + "items": [
296 + {"type": "string"},
297 + {"type": "integer"}
298 + ],
299 + "_instruction": "Add at least one 2-tuple with data type string and integer."
300 + }
301 + }
302 +}
303 +{{/code}}
304 +
166 166  === The openMINDS integration pipeline ===
167 167  
168 168  (//**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
Public

openMINDS