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
-
... ... @@ -44,7 +44,7 @@ 44 44 where **##XXX##** and **##YYY##** should be replaced with the openMINDS sub-module (e.g., **##core##**) and corresponding schema-name (e.g., **##ContactInformation##**), respectively. 45 45 46 46 (% 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: 47 +In return, the JSON-LD property **##"@id"##** defines the particular metadata instance (i.e., graph database 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 48 49 49 (% style="text-align: center;" %) 50 50 **##"@id": "http:~/~/localhost/YYY/ZZZ"##** ... ... @@ -71,17 +71,18 @@ 71 71 {{/code}} 72 72 73 73 (% style="text-align: justify;" %) 74 -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"##**.Pleasealso note, thataperson isallowedto linktomultiplecontactinformationinstances,hence itexpectsalistofdictionaries,insteadofa singledictionary (which wouldbealidif onlya singlelinkis expected).74 +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"##**. This means, optional properties, if not known, do not have to be defined in the respective JSON-LD, but they could also be listed with a **##null##** value. Please note in addition, that values for properties which expect an array should always be provided as such (cf. property **##"contactInformation"##**), even if only one item is defined. 75 75 76 76 (% style="text-align: justify;" %) 77 77 You learned now how a valid JSON-LD for an openMINDS metadata instance looks like and how linkages between openMINDS instances are defined. In the following sections you will learn about the different tools that support you to create your own openMINDS JSON-LD metadata collection. 78 78 79 -=== The openMINDS Python API===79 +=== The openMINDS Python === 80 80 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: 81 +(% style="text-align: justify;" %) 82 +openMINDS Python is a small library that 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. 82 82 83 - The **openMINDS.generator**(comingsoon) facilitates the translation of theopenMINDS schematemplate syntaxo other establishedformats, such asHTML and JSON-Schema (cf. also [[Technical details>>doc:Collabs.openminds.Documentation.Implementationdetails.WebHome]]).84 - \\The **openMINDS.compiler**allowsyou thedynamic usageof openMINDS metadata modelsand schemas in your Pythonapplicationfor generating your own collection of openMINDSconform metadata representations (instances) as JSON-LDs (as described above).Please note that theopenMINDS.compileronly helps you to generate correctly formatted JSON-LD metadata instances - the preparation on how you want to describe your research product with openMINDS is still up to you. If you need support in designing your own openMINDS metadata collection, check out the [[Tutorials>>openminds@ebrains.eu||target="_blank"]] which might give you hints on how to tackle your individual case or, of course, get in touch with us via [[openminds@ebrains.eu>>mailto:openminds@ebrains.eu]].84 +(% style="text-align: justify;" %) 85 +Please note that openMINDS Python only helps you to generate correctly formatted JSON-LD metadata instances - the preparation on how you want to describe your research product with openMINDS is still up to you. If you need support in designing your own openMINDS metadata collection, check out the [[Tutorials>>doc:Collabs.openminds.Tutorials.WebHome||target="_blank"]] which might give you hints on how to tackle your individual case or, of course, get in touch with us directly via our support-email ([[openminds@ebrains.eu>>mailto:openminds@ebrains.eu]]). 85 85 86 86 ===== Installation ===== 87 87 ... ... @@ -88,33 +88,40 @@ 88 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 89 90 90 {{code language="console"}} 91 -pip install open minds92 +pip install openMINDS 92 92 {{/code}} 93 93 94 94 The latest development version is available on the [[openMINDS generator GitHub>>https://github.com/HumanBrainProject/openMINDS_generator]]. 95 95 96 -===== openMINDS.compilerdocumentation=====97 +===== Usage ===== 97 97 98 -As stated above, the openMINDS .compilerallows 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. Here a small example:99 +As stated above, the openMINDS Python 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. Here a small example: 99 99 100 100 {{code language="python"}} 101 -import openMINDS.compiler 102 +import openMINDS 103 +import openMINDS.version_manager 102 102 105 +# Initialise the local copy of openMINDS 106 +openMINDS.version_manager.init() 107 + 108 +# Select which version of openMINDS to use 109 +openMINDS.version_manager.version_selection('v2.0.0') 110 + 103 103 # initiate the helper class for the dynamic usage of a specific openMINDS version 104 -helper = openMINDS. compiler.Helper(version="v1.0")112 +helper = openMINDS.Helper() 105 105 106 106 # initiate the collection into which you will store all metadata instances 107 -mycollection = helper. get_collection()115 +mycollection = helper.create_collection() 108 108 109 109 # create a metadata instance for (e.g.) the openMINDS Person schema 110 - lyuba= mycollection.add_core_person(givenName="Lyuba")118 +person_open = mycollection.add_core_person(givenName="open") 111 111 112 112 # add more metadata to a created instance 113 -mycollection.get( lyuba).familyName = "Zehl"121 +mycollection.get(person_open).familyName = "MINDS" 114 114 115 115 # add connections to other metadata instances 116 -email_ lyuba= mycollection.add_core_contactInformation(email="openminds@ebrains.eu")117 -mycollection.get( lyuba).contactInformation = email_lyuba124 +email_openminds = mycollection.add_core_contactInformation(email="openminds@ebrains.eu") 125 +mycollection.get(person_open).contactInformation = email_openminds 118 118 119 119 # save your collection 120 120 mycollection.save("./myFirstOpenMINDSMetadataCollection/") ... ... @@ -126,11 +126,10 @@ 126 126 Interactively you can also get an overview of the requirement of a schema and all its properties by using the **##help_##** function of the openMINDS.compiler. Here an example: 127 127 128 128 {{code language="python"}} 129 -mycollection.help_core_person() 137 +# Getting help for properties 138 +mycollection.help_core_actors_person() 130 130 {{/code}} 131 131 132 - 133 - 134 134 === The openMINDS spreadsheet templates === 135 135 136 136 (% style="text-align: justify;" %) ... ... @@ -139,4 +139,19 @@ 139 139 === The EBRAINS Knowledge Graph Editor === 140 140 141 141 (% style="text-align: justify;" %) 142 -For curators of the EBRAINS Data & Knowledge service, it is possible to register openMINDS conform metadata into the EBRAINS Knowledge Graph database by using the EBRAINS Knowledge Graph Editor. 149 +For curators of the EBRAINS Data & Knowledge service and users with an EBRAINS account, it is possible to register openMINDS conform metadata into the EBRAINS Knowledge Graph database by using the EBRAINS Knowledge Graph Editor. This editor not only allows the manual registration of openMINDS conform metadata, but also has many project management related features establishing a controlled and secured environment for curating metadata of submitted research products that should be published via the EBRAINS Knowledge Graph database (including the assignment of an EBRAINS DOI if requested). 150 + 151 +(% style="text-align: justify;" %) 152 +To guarantee the latter, the EBRAINS Data & Knowledge service has its own EBRAINS Knowledge Graph Editor environment which reserves the rights of publicly releasing metadata and assigned EBRAINS DOIs via the EBRAINS Knowledge Graph for the members of the curation team. Nonetheless, users with an EBRAINS account can receive access to a separate EBRAINS Knowledge Graph Editor environment through a private Collab in the EBRAINS Collaboratory. All members of such a private Collab can then manually register openMINDS conform metadata through the EBRAINS Knowledge Graph Editor to a restricted space of the Knowledge Graph database that is not accessible to any user outside of the respective Collab. In order to publicly release these privately registered metadata, an official curation request has to be made through the EBRAINS Data & Knowledge service. 153 + 154 +(% style="text-align: justify;" %) 155 +Independent of the different user environments, the EBRAINS Knowledge Graph Editor has the following features to facilitate the manual registration of openMINDS conform metadata: 156 + 157 +(% style="text-align: justify;" %) 158 +(1) Input masks for all openMINDS metadata schemas. New metadata instances can be easily created through an intuitive input mask that validates the user entries already against the respective openMINDS schema. 159 + 160 +(% style="text-align: justify;" %) 161 +(2) Facilitation of correct linkages between metadata instances. In accordance with the openMINDS metadata models, registered metadata instances can be linked with each other. Establishing these linkages is facilitated by jumping via dedicated properties to new input masks of matching schema types. 162 + 163 +(% style="text-align: justify;" %) 164 +(3) Drop down menus for existing metadata instances. Establishing linkages between instances in accordance with the openMINDS metadata models is further facilitated by providing drop down menus for the dedicated properties for selecting existing instances of matching schema types.