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,68 @@ 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. 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. 32 32 33 -=== The openMINDS vocabulary === 29 +(% style="text-align: justify;" %) 30 +===== Target & context templates ===== 34 34 35 35 (% style="text-align: justify;" %) 36 - Through the integrationpipelineof the openMINDSgenerator,the openMINDSvocabularyisautomaticallygathered and storedintheain openMINDSGitHub in ordertocentrally maintain generaldefinitionsand referencesfor**types**and **properties**used inschemasacross all openMINDSrepositories.Howthisworks isexplainedin the following.33 +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: 37 37 35 +(% style="text-align: center;" %) 36 +**##"_type": "https:~/~/openminds.ebrains.eu/<<schema-model>>/<<schema-name>>"##**, 37 + 38 38 (% style="text-align: justify;" %) 39 - Schema types and propertiesare stored in dedicated JSON files (**##types.json##** and**##properties.json##**)underthefolder **##vocab##** located inthemain openMINDS GitHub directory. Eachschematypeand propertyoccurringinthe openMINDS metadata modelsis automaticallyrepresentedthosefiles asnesteddictionaries.39 +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. 40 40 41 41 (% style="text-align: justify;" %) 42 - Thekeywordsofthosenesteddictionariesarepre-definedto consistently capturefor all schematypesand propertiestheirnamespace,theiroccurrence,theirgeneral description,andpossible referencestorelatedor matching schematypesandproperties of othermetadatainitiatives (e.g., schema.org). This setupalso allows usto define some values/entriestobeautomaticallyfilledby theopenMINDSintegrationpipelinewithachcommit to one oftheopenMINDSrepositories(e.g.,thenamespace andoccurrence)andotherstobemanuallyeditable lateron (e.g., the generaldescription andreferences).42 +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 with a corresponding openMINDS namespace. The context and corresponding target templates have to be located in the same openMINDS metadata model repository. 43 43 44 44 (% style="text-align: justify;" %) 45 - For security,outdatedentriesinthose openMINDSvocabulary files (e.g., becausethenamespaceofthe schematype orproperty changedor theschematype orpropertywasdeleted)arenot automaticallydeleted,butkept andmarkedasbeingdeprecated.Afterevaluation,deprecatedschematypesor propertiescan be deletedmanuallyfromopenMINDSvocabulary.45 +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. 46 46 47 47 (% style="text-align: justify;" %) 48 - Withthat,the openMINDS vocabreflectsalways an up-to-date statusoftheschematypes and propertiesuse acrossallopenMINDS metadatamodels,whileproviding theopportunitytocentrallyreviewandmaintaintheirconsistencyand references.48 +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. 49 49 50 -=== The openMINDS schema template syntax === 50 +(% style="text-align: justify;" %) 51 +===== String properties ===== 51 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##**.54 +(//**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 excludestechnical aspects that are generally expected for the openMINDS 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).57 +===== Numerical 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.60 +(//**coming soon**//) 60 60 61 61 (% style="text-align: justify;" %) 62 - Pleasefind in thefollowing a full documentationof the openMINDS schematemplate syntax and howit's key-value pairsneed to be defined and interpreted.63 +===== Object properties ===== 63 63 64 64 (% style="text-align: justify;" %) 65 65 (//**coming soon**//) 66 66 68 +(% style="text-align: justify;" %) 69 +===== Property arrays ===== 70 + 71 +(% style="text-align: justify;" %) 72 +(//**coming soon**//) 73 + 74 + 67 67 === The openMINDS integration pipeline === 68 68 69 69 (//**coming soon**//)