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,71 @@ 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 41 41 (% style="text-align: justify;" %) 42 - The keywords ofthose nested dictionaries are pre-defined to consistentlycapturefor all schematypes and properties their namespace, their occurrence, their general description, andpossiblereferences to related ormatching schema types andpropertiesof othermetadatainitiatives(e.g.schema.org). This setup also allows us todefine some values/entriesto be automatically filled in by theopenMINDS integration pipeline 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).39 +**##"_type": "https:~/~/openminds.ebrains.eu/<<schema-model>>/<<schema-name>>"##** 43 43 44 44 (% style="text-align: justify;" %) 45 - For security, outdatedentriesin thosepenMINDS vocabularyfiles(e.g.becausethenamespaceoftheschematype orproperty changedor theschema typeor property wasdeleted)are notutomaticallydeleted,but kept and markedasbeingdeprecated.After evaluation,deprecatedschematypesor propertiescanbeeletedmanuallyfromopenMINDSvocabulary.42 +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. 46 46 47 47 (% style="text-align: justify;" %) 48 - Withthat,theopenMINDSvocabreflectsalwaysanup-to-datestatus oftheschema typesand propertiesin useacrossallopenMINDS metadatamodels,while providing theopportunitytocentrally review andmaintaintheirconsistencyand references.45 +If an openMINDS schema template file //DOES NOT// define a **##"_type"##**, it is interpreted as a **context template** which //HAS TO BE// extended to a target template. 49 49 50 -=== The openMINDS schema template syntax === 47 +(% style="text-align: justify;" %) 48 +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. 51 51 52 52 (% style="text-align: justify;" %) 53 - AllopenMINDS metadatamodelsuse alight-weightedschema templatesyntaxfordefiningthe expectedmetadata.The correspondinglyformatted schema filesuse theextension: **##.schema.tpl.json##**.51 +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. Note that this requires the context and corresponding target templates to be located in the same openMINDS metadata model repository. 54 54 55 55 (% style="text-align: justify;" %) 56 - Although,as the file extension suggests, this openMINDSschematemplate syntax is inspired by JSON-Schema,it facilitates or evenexcludes technical aspects that aregenerallyexpected fortheopenMINDS schemas making them 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).54 +===== String 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 schematemplatesyntax and how it's key-valuepairs need tobe defined and interpreted.60 +===== Numerical properties ===== 63 63 64 64 (% style="text-align: justify;" %) 65 65 (//**coming soon**//) 66 66 65 +(% style="text-align: justify;" %) 66 +===== Object properties ===== 67 + 68 +(% style="text-align: justify;" %) 69 +(//**coming soon**//) 70 + 71 +(% style="text-align: justify;" %) 72 +===== Property arrays ===== 73 + 74 +(% style="text-align: justify;" %) 75 +(//**coming soon**//) 76 + 77 + 67 67 === The openMINDS integration pipeline === 68 68 69 69 (//**coming soon**//)