tik_manager4.objects.metadata
Module to hold and manage metadata.
Classes
Class to filter the overridden and new data. |
|
Metadata class. |
|
Hold the value and overridden status of a property. |
Module Contents
- class FilteredData(**kwargs)
Bases:
dictClass to filter the overridden and new data.
- update_new_data(settings_data)
- update_overridden_data(settings_data)
- class Metadata(data_dictionary)
Bases:
dictMetadata class.
- add_item(key, value, overridden=False)
Add an item to the metadata.
- Args:
key (str): The key to add. value (any): The value to add. overridden (bool): Whether the value is overridden or
inheriting from the parent.
- Returns:
Metaitem: The Metaitem object that was created.
- copy()
Return a copy of the metadata.
- exists(key)
Check if the key exists.
- get_all_items()
Return all items in the metadata.
- get_value(key, fallback_value=None)
Get the value of a key.
- Args:
key (str): The key to get the value of. fallback_value (any): The value to return if the key is not found.
- is_overridden(key)
Check if a key is overridden.
- Args:
key (str): The key to check.
- Returns:
bool: True if the key is overridden, False otherwise.
- override(data_dictionary)
Override the metadata with a new dictionary.
- Args:
data_dictionary (dict): The dictionary to override the metadata with.