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,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 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 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: 20 20 21 21 {{code language="json"}} 22 22 { ... ... @@ -31,27 +31,11 @@ 31 31 32 32 (% style="text-align: justify;" %) 33 33 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: 34 - **##"@type": "https:~/~/openminds.ebrains.eu/XXX/YYY"##**, where **##XXX##** and **##YYY##** should be replaced with the openMINDS sub-module (e.g.,**##core##**) and corresponding schema (e.g.,**##ContactInformation##**), respectively.34 +##"@type": "https:~/~/openminds.ebrains.eu/XXX/YYY"##, where **##XXX##** and **##YYY##** should be replaced with the openMINDS sub-module (e.g., ##core##) and corresponding schema (e.g., ##ContactInformation##), respectively. 35 35 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.37 +##"@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, 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 - "@type": "https://openminds.ebrains.eu/core/Person", 45 - "@id": "http://localhost/person/lyuba_zehl", 46 - "givenName": "Lyuba", 47 - "familyName": "Zehl", 48 - "contactInformation": [ 49 - {"@id": "http://localhost/contactInformation/email_openMINDS"} 50 - ] 51 -}{{/code}} 52 - 53 -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. 54 - 55 55 === The openMINDS Python API === 56 56 57 57 (% style="text-align: justify;" %)