Changes for page Application details

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

From version 32.3
edited by lzehl
on 2021/02/25 18:08
Change comment: There is no comment for this version
To version 33.2
edited by lzehl
on 2021/02/25 18:32
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -80,18 +80,52 @@
80 80  
81 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: 
82 82  
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).
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 85  
86 86  ===== Installation =====
87 87  
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 -{{code}}
90 +{{code language="console"}}
91 91  pip install openminds
92 92  {{/code}}
93 93  
94 +The latest development version is available on the [[openMINDS generator GitHub>>https://github.com/HumanBrainProject/openMINDS_generator]].
94 94  
96 +===== openMINDS.compiler documentation =====
97 +
98 +As stated above, 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. Here a small example:
99 +
100 +{{code language="python"}}
101 +import openMINDS.compiler
102 +
103 +# initiate the helper class for the dynamic usage of a specific openMINDS version
104 +helper = openMINDS.compiler.Helper(version="v1.0")
105 +
106 +# initiate the collection into which you will store all metadata instances
107 +mycollection = helper.get_collection()
108 +
109 +# create a metadata instance for (e.g.) the openMINDS Person schema
110 +lyuba = mycollection.add_core_person(givenName="Lyuba")
111 +
112 +# add more metadata to a created instance
113 +mycollection.get(lyuba).familyName = "Zehl"
114 +
115 +# add connections to other metadata instances
116 +email_lyuba = mycollection.add_core_contactInformation(email="openminds@ebrains.eu")
117 +mycollection.get(lyuba).contactInformation = email_lyuba
118 +
119 +# save your collection
120 +mycollection.save("./myFirstOpenMINDSMetadataCollection/")
121 +{{/code}}
122 +
123 +(% class="wikigeneratedid" %)
124 +To learn in general about the available openMINDS metadata models and schemas including their required or optional metadata properties, please check out the HTML representations of the schemas or the code on the corresponding GitHub (cf. [[Metadata models & schemas>>doc:Collabs.openminds.openMINDS core.Metadata models & schemas.WebHome]]).
125 +
126 +Within the openMINDS.compiler you can also get an overview of the requirement of a schema and all its properties by using the **##help_##** function. Here an example:
127 +
128 +
95 95  === The openMINDS spreadsheet templates ===
96 96  
97 97  (% style="text-align: justify;" %)
Public

openMINDS