Changes for page Application details

Last modified by lzehl on 2021/10/13 13:11

From version 19.1
edited by lzehl
on 2021/02/24 18:00
Change comment: There is no comment for this version
To version 20.1
edited by lzehl
on 2021/02/24 18:17
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -16,7 +16,7 @@
16 16  As stated above, openMINDS supports JSON-LD as serialization format for the metadata representations (instances) of its schemas. In the following we will briefly explain the JSON-LD syntax necessary for writing a correct openMINDS instance.
17 17  
18 18  (% style="text-align: justify;" %)
19 -Let us first start with the most simple example: the openMINDS core schema ContactInformation. According to its schema template (cf. [[ContactInformation HTML>>https://humanbrainproject.github.io/openMINDS/core/schemas/v3/actors/contactInformation.html||rel="noopener noreferrer" target="_blank"]]), the only required property for a contact information instance is **##"email"##**. However, every valid JSON-LD needs two more technical properties: **##"@type"##** and **##"@id"##**. Here, as example, a valid JSON-LD for a contact information instance:
19 +Let us start with the most simple example: the openMINDS core schema ContactInformation. According to its schema template (cf. [[ContactInformation HTML>>https://humanbrainproject.github.io/openMINDS/core/schemas/v3/actors/contactInformation.html||rel="noopener noreferrer" target="_blank"]]), the only required property for a contact information instance is **##"email"##**. However, every valid JSON-LD needs two more technical properties: **##"@type"##** and **##"@id"##**. Here, as example, a valid JSON-LD for a contact information instance:
20 20  
21 21  {{code language="json"}}
22 22  {
... ... @@ -35,8 +35,24 @@
35 35  
36 36  (% style="text-align: justify;" %)
37 37  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:
38 -**##"@id": "http:~/~/localhost/YYY/ZZZ"##**, 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..
38 +**##"@id": "http:~/~/localhost/YYY/ZZZ"##**, 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.
39 39  
40 +(% style="text-align: justify;" %)
41 +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 (cf. its HTML) 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:
42 +
43 +{{code language="json"}}
44 +{
45 + "@type": "https://openminds.ebrains.eu/core/Person",
46 + "@id": "http://localhost/person/lyuba_zehl",
47 + "givenName": "Lyuba",
48 + "familyName": "Zehl",
49 + "contactInformation": [
50 + {"@id": "http://localhost/contactInformation/email_openMINDS"}
51 + ]
52 +}
53 +{{/code}}
54 +Note that we did not use all schema defined properties for this person instance, but only the required property **##"givenName"##** and the two optional properties **##"familyName"##** and **##"ContactInformation"##**. Please also note, that a person is allowed to link to multiple contact information instances, hence it expects a list of dictionaries, instead of a single dictionary.
55 +
40 40  === The openMINDS Python API ===
41 41  
42 42  (% style="text-align: justify;" %)
Public

openMINDS