Changes for page Application details
Last modified by lzehl on 2021/10/13 13:11
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -33,16 +33,26 @@ 33 33 To simplify the human-readability for all openMINDS users, technical properties specifically required for the JSON-LD syntax are, on purpose, not defined in the openMINDS schema templates. Instead, these technical properties are first added to the required property list of all openMINDS schemas after their template is transformed into an established, full-blown metadata schema format, such as JSON-Schema (cf. [[Technical details>>Technical details||target="_blank"]]). Let us explain why these technical JSON-LD properties are needed and how they are correctly provided for an openMINDS instance. 34 34 35 35 (% style="text-align: justify;" %) 36 -The JSON-LD property **##"@type"##** expects an entry (value) of type string that defines which schema is used to validate the particular JSON-LD. Within openMINDS each schema can be identified through its namespace (type) with the following naming convention: 37 -**##"@type": "https:~/~/openminds.ebrains.eu/XXX/YYY"##**, 38 -where **##XXX##** and **##YYY##** should be replaced with the openMINDS sub-module (e.g., **##core##**) and corresponding schema (e.g., **##ContactInformation##**), respectively. 36 +The JSON-LD properties **##"@context"##** and **##"@vocab"##** define a common vocabulary mapping, by stating a prefix that extends all non-JSON-LD property names and **##"@type"##** values that do not correspond to an IRI or compact IRI. Within openMINDS, each metadata instance should map to the openMINDS vocabulary, meaning the **##"@context"##** and **##"@vocab"##** is the same across all metadata instances (cf. code above). If you want to learn more about the power of the openMINDS vocabulary please go to: [[Technical details>>doc:Collabs.openminds.openMINDS core.Implementation details.WebHome||target="_blank"]]. 39 39 38 +Generally speaking, the JSON-LD property **##"@type"##** defines which schema should be used to validate the particular JSON-LD. The **##"@type"##** expects an entry (value) of type string with the format of an IRI. Within openMINDS, the **##"@type"##** value equals the corresponding schema-namespace with the following naming convention: 39 + 40 +(% style="text-align: center;" %) 41 +**##"@type": "https:~/~/openminds.ebrains.eu/XXX/YYY"##** 42 + 40 40 (% style="text-align: justify;" %) 41 -The JSON-LD property **##"@id"##** expects an entry (value) of type string that provides a unique identifier for the created metadata instance. On your local machine, you should use the following naming convention for this identifier: 42 -**##"@id": "http:~/~/localhost/YYY/ZZZ"##**, 43 -where **##YYY##** and **##ZZZ##** should be replaced with the openMINDS schema (e.g., **##ContactInformation##**) and your own collection-unique identifier (e.g. **##email_openMINDS##**), respectively. Within the EBRAINS Knowledge Graph (KG) this identifier has to be a universally unique identifier (UUID). Assuming you locally generated a openMINDS metadata collection, your user-defined **##"@id"##** will be automatically replaced with a UUID in all your JSON-LDs if they are uploaded to the KG. 44 +where **##XXX##** and **##YYY##** should be replaced with the openMINDS sub-module (e.g., **##core##**) and corresponding schema-name (e.g., **##ContactInformation##**), respectively. 44 44 45 45 (% style="text-align: justify;" %) 47 +In return, the JSON-LD property **##"@id"##** defines the particular metadata instance (node). For this reason, the **##"@id"##** also expects an entry (value) of type string with the format of an IRI. In particular when you plan to submit your metadata collection later to the EBRAINS Knowledge Graph, we recommend you use the following naming convention on your local machine for this identifier: 48 + 49 +(% style="text-align: center;" %) 50 +**##"@id": "http:~/~/localhost/YYY/ZZZ"##** 51 + 52 +(% style="text-align: justify;" %) 53 +where **##YYY##** and **##ZZZ##** should be replaced with the openMINDS schema (e.g., **##ContactInformation##**) and your own collection-unique identifier (e.g. **##email_openMINDS##**), respectively. Within the EBRAINS Knowledge Graph (KG) this identifier has to be a universally unique identifier (UUID), and, therefore, will be replaced accordingly with a UUID by the EBRAINS Knowledge Graph system during the integration process of your openMINDS collection. 54 + 55 +(% style="text-align: justify;" %) 46 46 The JSON-LD property **##"@id"##** is also used to link two different metadata instances. Let us introduce a second openMINDS instance of the openMINDS core schema Person which can link to an openMINDS instance of the openMINDS core schema ContactInformation. Here a valid JSON-LD for a person with a link to the contact information we defined above: 47 47 48 48 {{code language="json"}} ... ... @@ -68,9 +68,20 @@ 68 68 69 69 === The openMINDS Python API === 70 70 71 -(% style="text-align: justify;" %) 72 -For users with at least some programming experience, one possible way to write openMINDS conform JSON-LDs is to use the openMINDS Python API. 81 +One possible way to write openMINDS conform JSON-LDs is to use the openMINDS Python API which will help you to interact with the EBRAINS openMINDS metadata models and schemas. It consists of two sub-modules: 73 73 83 +The ~*~*openMINDS.generator~*~* (coming soon) facilitates the translation of the openMINDS schema template syntax to other established formats, such as HTML and JSON-Schema (cf. [[Technical details>>doc:Collabs.openminds.openMINDS core.Implementation details.WebHome]]). 84 +\\The ~*~*openMINDS.compiler~*~* allows you the dynamic usage of openMINDS metadata models and schemas in your Python application for generating your own collection of openMINDS conform metadata representations (instances) as JSON-LDs (as described above). 85 + 86 +===== Installation ===== 87 + 88 +The official versions are available at the [[Python Package Index>>https://pypi.org/project/openMINDS/]] and can be installed using `pip install` in your console: 89 + 90 +{{code}} 91 +pip install openminds 92 +{{/code}} 93 + 94 + 74 74 === The openMINDS spreadsheet templates === 75 75 76 76 (% style="text-align: justify;" %)