json2graph.modules.messages
Decoding messages to be displayed to users must be concentrated in this module whenever possibile.
Module Contents
Functions
|
Mounts and returns a warning message according to the information received as parameter. |
|
Gets warning message and prints it to the user as a log if not in silent mode. |
Attributes
- json2graph.modules.messages.LOGGER
- json2graph.modules.messages.get_decode_log_message(object_dict, warning_code, property_name, att_valid_stereotype='')
Mounts and returns a warning message according to the information received as parameter.
- Parameters:
object_dict (dict) – Object’s JSON data loaded as a dictionary.
warning_code (str) – Code used to select the correct message to be displayed to the user if not in silent mode.
property_name (str) – Information about a property or attribute type to be displayed in a warning message. Optional.
att_valid_stereotype (str) – Stereotype associated to an attribute to be displayed in a warning message. Optional.
- Returns:
Warning message containing information about the modification made to be printed to user.
- Return type:
str
- json2graph.modules.messages.print_decode_log_message(object_dict, warning_code, property_name='', att_valid_stereotype='')
Gets warning message and prints it to the user as a log if not in silent mode.
- Parameters:
object_dict (dict) – Object’s JSON data loaded as a dictionary.
warning_code (str) – Predefined warning number to be displayed to the user if not in silent mode.
property_name (str) – Information about a property or attribute type to be displayed in a warning message. Optional.
att_valid_stereotype (str) – Optional attribute’s stereotype to be displayed in a warning message.
- Return type:
None