Commit d59f835 1 parent ad9c62e commit d59f835 Copy full SHA for d59f835
File tree 1 file changed +17
-1
lines changed
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -263,7 +263,23 @@ def get_edges(self):
263
263
return embedded , linked
264
264
265
265
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
+ """
267
283
schema_type = self ._schema_payload ["_type" ]
268
284
class_name = schema_type .split ("/" )[- 1 ]
269
285
if "_module" in self ._schema_payload :
You can’t perform that action at this time.
0 commit comments