Changes for page Application details

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

From version 49.3
edited by lzehl
on 2021/10/13 13:10
Change comment: There is no comment for this version
To version 49.1
edited by lzehl
on 2021/06/30 12:12
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -76,13 +76,12 @@
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 ===
79 +=== The openMINDS Python API ===
80 80  
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.
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: 
83 83  
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]]).
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. also [[Technical details>>doc:Collabs.openminds.Documentation.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). Please note that the openMINDS.compiler 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>>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]].
86 86  
87 87  ===== Installation =====
88 88  
... ... @@ -89,40 +89,33 @@
89 89  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:
90 90  
91 91  {{code language="console"}}
92 -pip install openMINDS
91 +pip install openminds
93 93  {{/code}}
94 94  
95 95  The latest development version is available on the [[openMINDS generator GitHub>>https://github.com/HumanBrainProject/openMINDS_generator]].
96 96  
97 -===== Usage =====
96 +===== openMINDS.compiler documentation =====
98 98  
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:
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:
100 100  
101 101  {{code language="python"}}
102 -import openMINDS
103 -import openMINDS.version_manager
101 +import openMINDS.compiler
104 104  
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 -
111 111  # initiate the helper class for the dynamic usage of a specific openMINDS version
112 -helper = openMINDS.Helper()
104 +helper = openMINDS.compiler.Helper(version="v1.0")
113 113  
114 114  # initiate the collection into which you will store all metadata instances
115 -mycollection = helper.create_collection()
107 +mycollection = helper.get_collection()
116 116  
117 117  # create a metadata instance for (e.g.) the openMINDS Person schema
118 -person_open = mycollection.add_core_person(givenName="open")
110 +lyuba = mycollection.add_core_person(givenName="Lyuba")
119 119  
120 120  # add more metadata to a created instance
121 -mycollection.get(person_open).familyName = "MINDS"
113 +mycollection.get(lyuba).familyName = "Zehl"
122 122  
123 123  # add connections to other metadata instances
124 -email_openminds = mycollection.add_core_contactInformation(email="openminds@ebrains.eu")
125 -mycollection.get(person_open).contactInformation = email_openminds
116 +email_lyuba = mycollection.add_core_contactInformation(email="openminds@ebrains.eu")
117 +mycollection.get(lyuba).contactInformation = email_lyuba
126 126  
127 127  # save your collection
128 128  mycollection.save("./myFirstOpenMINDSMetadataCollection/")
... ... @@ -134,8 +134,7 @@
134 134  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:
135 135  
136 136  {{code language="python"}}
137 -# Getting help for properties
138 -mycollection.help_core_actors_person()
129 +mycollection.help_core_person()
139 139  {{/code}}
140 140  
141 141  === The openMINDS spreadsheet templates ===
Public

openMINDS