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
-
... ... @@ -16,10 +16,13 @@ 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 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 a couple more technical properties. Here, as example, a valid JSON-LD for a contact information instance: 20 20 21 21 {{code language="json"}} 22 22 { 23 + "@context": { 24 + "@vocab": "https://openminds.ebrains.eu/vocab/" 25 + }, 23 23 "@type": "https://openminds.ebrains.eu/core/ContactInformation", 24 24 "@id": "http://localhost/contactInformation/email_openMINDS", 25 25 "email": "openminds@ebrains.eu" ... ... @@ -42,6 +42,9 @@ 42 42 43 43 {{code language="json"}} 44 44 { 48 + "@context": { 49 + "@vocab": "https://openminds.ebrains.eu/vocab/" 50 + }, 45 45 "@type": "https://openminds.ebrains.eu/core/Person", 46 46 "@id": "http://localhost/person/lyuba_zehl", 47 47 "givenName": "Lyuba", ... ... @@ -53,7 +53,7 @@ 53 53 {{/code}} 54 54 55 55 (% style="text-align: justify;" %) 56 -Note that we do not use all properties defined for the schema (cf. the [[Person HTML>>https://humanbrainproject.github.io/openMINDS/core/schemas/v3/actors/person.html||target="_blank"]]), but that we only used the required property **##"givenName"##** and 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 (which would be valid if only a single link is expected). 62 +Note that we do not use all properties defined for the schema (cf. the [[Person HTML>>https://humanbrainproject.github.io/openMINDS/core/schemas/v3/actors/person.html||rel="noopener noreferrer" target="_blank"]]), but that we only used the required property **##"givenName"##** and 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 (which would be valid if only a single link is expected). 57 57 58 58 (% style="text-align: justify;" %) 59 59 You learned now how to write a valid JSON-LD for an openMINDS metadata instance and how you can link different openMINDS metadata instances. In the following sections you will learn that you do not have to manually write such JSON-LDs, but that there are different tools that support you to create your own openMINDS metadata collection.