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
-
... ... @@ -10,60 +10,83 @@ 10 10 Please find below a documentation of the layout and requirements needed to keep the openMINDS modularity, the syntax of the openMINDS schema template, as well as the openMINDS integration pipeline. 11 11 ))) 12 12 13 -=== The openMINDSumbrella ===13 +=== Overview of the openMINDS layout === 14 14 15 15 (% style="text-align: justify;" %) 16 16 In summary, openMINDS is the overall umbrella for a set of distributed GitHub repositories, each defining a particular metadata model for neuroscience research products. 17 17 18 +=== The openMINDS schema template syntax === 19 + 18 18 (% style="text-align: justify;" %) 19 - The main (or central)[[openMINDSGitHub repository>>https://github.com/HumanBrainProject/openMINDS||rel="noopenernoreferrer" target="_blank"]] ingestsall these GitHub repositoriesas[[git-submodules>>https://git-scm.com/docs/git-submodule||rel="noopenernoreferrer"target="_blank"]]. Furthermoreitstores the openMINDS vocabulary(**##vocab##**), providinggeneraldefinitionsand references for **types**and**properties**used in schemasacross all openMINDSrepositories(cf. below). Andastbut not least, itholdstheschemarepresentationsfor all supported metadata formatscreatedbytheopenMINDSintegrationpipeline (cf.below).21 +All openMINDS metadata models use a light-weighted schema template syntax for defining the metadata. The correspondingly formatted schema files use the extension: **##.schema.tpl.json##**. 20 20 21 21 (% style="text-align: justify;" %) 22 - Forthistoworksmoothlyforthe existing,but alsofor allnewopenMINDSmetadatamodels,the correspondingopenMINDSsubmodules(GitHubrepositories)have tomeet the followingrequirements:24 +Although, as the file extension suggests, this openMINDS schema template syntax is inspired by JSON-Schema, it facilitates or even excludes technical aspects that are generally expected for the openMINDS schemas making it more human-readable, especially for untrained eyes. Behind the scenes, within the openMINDS integration pipeline (cf. below), this schema template syntax is then interpreted and flexibly translated to various formal metadata formats (e.g., JSON-Schema). 23 23 24 -(% style="text-align:justify" %) 25 -* The openMINDS metadata model has to be located on a **public GitHub repository** and published under an **MIT license**. 26 -* The GitHub repository should have at least one **version branch** (e.g. "v1"). 27 -* The version branch should have the following **main directory folders**: **##schemas##** (required), **##tests##** (recommended), **##examples##** (recommended), and **##img##** (optional). 28 -* The **##schemas##** folder should contain the schemas of that metadata model implemented in the **openMINDS schema template syntax** (cf. below). The directory of the schemas can be further structured or flat. 29 -* The **##tests##** folder should contain test-instances (JSON-LDs) for the schemas in a flat directory. The file names for these test-instances should follow the convention of **##<<XXX>>-<<YYY>>.jsonld##** for files that should pass the tests, and **##<<XXX>>-<<YYY>>-nok.jsonld##** 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##**). 30 -* 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 to group related instances. 31 -* 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. 26 +(% style="text-align: justify;" %) 27 +Despite the simplification in comparison to JSON-Schema, the openMINDS schema templates are also, at the core, specially formatted JSON files using a particular syntax, meaning special key-value pairs that define the validation rules of a schema. 32 32 33 -=== The openMINDS vocabulary === 29 +(% style="text-align: justify;" %) 30 +Please find in the following a full documentation of the openMINDS schema template syntax and how the key-value pairs need to be defined and interpreted. 34 34 35 35 (% style="text-align: justify;" %) 36 -T hrough theintegrationpipelineof the openMINDS generator, theopenMINDS vocabulary is automaticallygathered and stored in themain openMINDS GitHub in order to centrally maintain general definitionsand references for **types** and **properties** used in schemas across all openMINDS repositories. How this works is explained in the following.33 +===== Target & context templates ===== 37 37 38 38 (% style="text-align: justify;" %) 39 - Schema types andproperties are stored indedicatedJSONfiles(**##types.json##**and **##properties.json##**)underthefolder**##vocab##**locatedinthe main openMINDS GitHub directory. Eachschematypeandproperty occurringinthe openMINDS metadatamodelsisautomaticallyrepresented in those filesasnested dictionaries.36 +An openMINDS schema //HAS TO HAVE// a **##"_type"##** to be recognized as **target template**. In other words, the **##"_type"##** is used to define the openMINDS namespace of a corresponding schema using the following naming convention: 40 40 38 +{{code language="json"}} 39 +{ 40 + "_type": "https:~/~/openminds.ebrains.eu/<<schema-model>>/<<schema-name>>" 41 +} 42 +{{/code}} 43 + 41 41 (% style="text-align: justify;" %) 42 - Thekeywords of thosenested dictionariesare pre-definedtoconsistentlycapturefor all schema types andpropertiestheirnamespace,theiroccurrence,theirgeneraldescription,andpossiblereferencestorelated or matching schematypesand propertiesf other metadatainitiatives (e.g.schema.org).This setup alsoallowsustodefinesomevalues/entriesto be automatically filled inbythe openMINDSintegrationpipeline with each commit to one of the openMINDS repositories(e.g., the namespace and occurrence) and others to bemanuallyeditable later on(e.g., the general description and references).45 +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 that schema (written in **##CamelCase##**). 43 43 44 44 (% style="text-align: justify;" %) 45 - Forsecurity, outdated entriesin those openMINDSvocabulary files(e.g. because thenamespaceoftheschemaypeorpropertychangedor theschema typeor propertywasdeleted)arenotautomatically deleted,butkeptandmarkedasbeingdeprecated. Afterevaluation,deprecatedschematypes orpropertiescan be deletedmanually from openMINDS vocabulary.48 +If an openMINDS schema template //DOES NOT// define a **##"_type"##**, it is interpreted as a **context template** which //HAS TO BE// extended to a target template. 46 46 47 47 (% style="text-align: justify;" %) 48 - Withthat,the openMINDSvocab reflectsalwaysan up-to-datestatusofthe schematypesandproperties in useacrossallopenMINDSmetadatamodels,whileprovidingthe opportunitytocentrallyreviewandmaintaintheirconsistencyand references.51 +Context templates are and should be used when multiple openMINDS schemas (target templates) have the same subset of properties. This 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. 49 49 50 -=== The openMINDS schema template syntax === 53 +(% style="text-align: justify;" %) 54 +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 schema **##Dataset##** (target template) extends the core concept template **##researchProduct##**: 51 51 56 +{{code language="json"}} 57 +{ 58 + "_type": "https:~/~/openminds.ebrains.eu/core/Dataset", 59 + "_extends": "products/researchProduct.schema.tpl.json" 60 +} 61 +{{/code}} 62 + 63 +Note that this convention requires the context and corresponding target templates to be located in the same openMINDS metadata model repository. 64 + 52 52 (% style="text-align: justify;" %) 53 - AllopenMINDSmetadata models use a light-weighted schema template syntax fordefiningthe expected metadata. The correspondingly formatted schema filesuse the extension: **##.schema.tpl.json##**.66 +===== String properties ===== 54 54 55 55 (% style="text-align: justify;" %) 56 - Although, as the file extension suggests, this openMINDS schema template syntax is inspired by JSON-Schema, it facilitatesor even excludes technical aspects that are generally expected for the openMINDS schemas makingthem more human-readable, especially for untrained eyes. Behind the scenes, within theopenMINDS integration pipeline (cf. below), this schema template syntax is then interpreted and flexibly translated to various formal metadata formats (e.g., JSON-Schema).69 +(//**coming soon**//) 57 57 58 58 (% style="text-align: justify;" %) 59 - Despitethe simplification in comparison to JSON-Schema, theopenMINDS schema templates are also, at the core, speciallyformatted JSON files using aparticular syntax, meaning special key-value pairsthat definethe validation rulesof a schema.72 +===== Numerical properties ===== 60 60 61 61 (% style="text-align: justify;" %) 62 - Please find in the followinga full documentation of the openMINDSschema template syntax and how it's key-value pairs need tobe defined and interpreted.75 +(//**coming soon**//) 63 63 64 64 (% style="text-align: justify;" %) 78 +===== Object properties ===== 79 + 80 +(% style="text-align: justify;" %) 65 65 (//**coming soon**//) 66 66 83 +(% style="text-align: justify;" %) 84 +===== Property arrays ===== 85 + 86 +(% style="text-align: justify;" %) 87 +(//**coming soon**//) 88 + 89 + 67 67 === The openMINDS integration pipeline === 68 68 69 69 (//**coming soon**//)