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,59 @@ 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 alsoforallnewopenMINDSmetadatamodels,thecorrespondingopenMINDS submodules(GitHubrepositories)haveto meetthefollowingrequirements: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. 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. 32 - 33 -=== The openMINDS vocabulary === 34 - 35 35 (% style="text-align: justify;" %) 36 - Throughtheintegrationpipelineofthe openMINDSgenerator,the openMINDSvocabularyisautomatically gatheredandstoredinthemainopenMINDS GitHubinorderto centrallymaintain generaldefinitionsandreferences for**types**and**properties**used inschemasacrossall openMINDSrepositories.Howthis worksisexplainedinthefollowing.27 +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). Please find in the following a full documentation of the openMINDS schema template syntax and how it needs to be interpreted. 37 37 38 38 (% style="text-align: justify;" %) 39 - Schematypesand propertiesarestored in dedicated JSON files (**##types.json##** and **##properties.json##**) underthefolder **##vocab##** located in themain openMINDS GitHub directory. Each schema type and property occurring in the openMINDS metadata models isautomatically representedin those files as nested dictionaries.30 +===== Target & context templates ===== 40 40 32 +All openMINDS schemas have to have a **##"_type"##** to be recognized as target templates. In other words, the **##"_type"##** is used to define the openMINDS namespace of a corresponding schema using the following naming convention: 33 + 34 +(% style="text-align: center;" %) 35 +**##"_type": "https:~/~/openminds.ebrains.eu/<<schema-model>>/<<schema-name>>"##**, 36 + 37 +where **##<<schema-model>>##** has to be replaced with the label of the openMINDS metadata model the corresponding schema belongs to and **##<<schema-name>>##** exchanged with the label of that schema. 38 + 39 +If an openMINDS schema template file does not define a **##"_type"##**, it is interpreted as a context template which requires an extension to become a target template. 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. 40 + 41 41 (% style="text-align: justify;" %) 42 - Thekeywords ofthose nested dictionaries are pre-defined to consistently capture for all schema types and properties their namespace, their occurrence, theirgeneraldescription, and possiblereferences torelated or matching schema types and propertiesof other metadata initiatives (e.g., schema.org). This setup also allows us to define some values/entries to be automatically filled in by the openMINDS integration pipeline with each commit to one of the openMINDS repositories (e.g., the namespace and occurrence) and others to be manually editable later on (e.g., the general description and references).42 +===== String properties ===== 43 43 44 44 (% style="text-align: justify;" %) 45 - For security, outdated entries in those openMINDS vocabulary files(e.g., because the namespaceof the schema type or property changed or the schema type or property was deleted) are not automatically deleted, but kept and marked as beingdeprecated. After evaluation, deprecatedschema typesor properties canbe deleted manually from openMINDS vocabulary.45 +(//**coming soon**//) 46 46 47 47 (% style="text-align: justify;" %) 48 - Withthat, the openMINDS vocab reflects always anup-to-date status of the schema types and properties in use acrossallopenMINDS metadata models, while providing the opportunity to centrally review and maintain their consistencyand references.48 +===== Numerical properties ===== 49 49 50 -=== The openMINDS schema template syntax === 51 - 52 52 (% style="text-align: justify;" %) 53 - All openMINDS metadata models use a light-weighted schema template syntax for defining the expectedmetadata. The correspondinglyformattedschema files use the extension: **##.schema.tpl.json##**.51 +(//**coming soon**//) 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 facilitates or even excludes technical aspects that are generally expected for the openMINDS schemas making them more human-readable, especially for untrainedeyes. Behind the scenes, within the openMINDS integrationpipeline (cf. below), this schema template syntax is then interpreted and flexibly translated to variousformal metadata formats (e.g., JSON-Schema).54 +===== Object properties ===== 57 57 58 58 (% style="text-align: justify;" %) 59 - Despite the simplification in comparisonto JSON-Schema, the openMINDS schema templates are also, at the core, specially formatted JSON files usinga particularsyntax, meaning special key-value pairs that define the validation rulesof a schema.57 +(//**coming soon**//) 60 60 61 61 (% style="text-align: justify;" %) 62 - Pleasefind in the following a full documentation of the openMINDS schematemplate syntaxand how it's key-value pairsneed to be defined and interpreted.60 +===== Property arrays ===== 63 63 64 64 (% style="text-align: justify;" %) 65 65 (//**coming soon**//) 66 66 65 + 67 67 === The openMINDS integration pipeline === 68 68 69 69 (//**coming soon**//)