File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -263,7 +263,23 @@ def get_edges(self):
263263 return embedded , linked
264264
265265 def get_module_dict (self ,class_module_dict ):
266-
266+ """
267+ Updates a dictionary with the class name and its corresponding module based on the schemas.
268+
269+ This method extracts the class name and module from the `_schema_payload` attribute
270+ and updates the provided dictionary (`class_module_dict`) with a mapping of
271+ the class name to its module. If the `_module` key exists in `_schema_payload`
272+ (which was introduced in version 4 of openMINDS), its value is used as the module.
273+ Otherwise, the module is derived from the second-to-last component of the `_type`
274+ field in `_schema_payload`.
275+
276+ Args:
277+ class_module_dict (dict): A dictionary where keys are class names and values
278+ are their corresponding modules.
279+
280+ Returns:
281+ dict: The updated dictionary with the class name and module mapping.
282+ """
267283 schema_type = self ._schema_payload ["_type" ]
268284 class_name = schema_type .split ("/" )[- 1 ]
269285 if "_module" in self ._schema_payload :
You can’t perform that action at this time.
0 commit comments