graph LR
gaphor_storage_load["gaphor.storage.load"]
gaphor_storage_save["gaphor.storage.save"]
gaphor_storage_recovery_Recovery["gaphor.storage.recovery.Recovery"]
gaphor_services_undomanager_UndoManager["gaphor.services.undomanager.UndoManager"]
gaphor_core_eventmanager["gaphor.core.eventmanager"]
gaphor_transaction_Transaction["gaphor.transaction.Transaction"]
gaphor_core_modeling_elementfactory["gaphor.core.modeling.elementfactory"]
gaphor_storage_xmlwriter["gaphor.storage.xmlwriter"]
gaphor_storage_load -- "uses" --> gaphor_core_modeling_elementfactory
gaphor_storage_load -- "is counterpart of" --> gaphor_storage_save
gaphor_storage_save -- "uses" --> gaphor_storage_xmlwriter
gaphor_storage_save -- "is counterpart of" --> gaphor_storage_load
gaphor_storage_recovery_Recovery -- "subscribes to events from" --> gaphor_core_eventmanager
gaphor_storage_recovery_Recovery -- "monitors" --> gaphor_transaction_Transaction
gaphor_services_undomanager_UndoManager -- "subscribes to events from" --> gaphor_core_eventmanager
gaphor_services_undomanager_UndoManager -- "observes transaction events from" --> gaphor_transaction_Transaction
gaphor_core_eventmanager -- "notifies" --> gaphor_storage_recovery_Recovery
gaphor_core_eventmanager -- "notifies" --> gaphor_services_undomanager_UndoManager
gaphor_transaction_Transaction -- "provides context to" --> gaphor_storage_recovery_Recovery
gaphor_transaction_Transaction -- "provides context to" --> gaphor_services_undomanager_UndoManager
gaphor_core_modeling_elementfactory -- "is used by" --> gaphor_storage_load
gaphor_storage_xmlwriter -- "is used by" --> gaphor_storage_save
The Gaphor application's core functionality revolves around robust model management, encompassing loading, saving, recovery, and undo/redo capabilities. The gaphor.core.eventmanager acts as a central nervous system, coordinating interactions between components by dispatching events. Model persistence is handled by gaphor.storage.load and gaphor.storage.save, which rely on gaphor.core.modeling.elementfactory for object instantiation and gaphor.storage.xmlwriter for XML serialization. Data integrity and user experience are enhanced by gaphor.storage.recovery.Recovery and gaphor.services.undomanager.UndoManager, both of which observe and react to the atomic changes managed by gaphor.transaction.Transaction. This design ensures a consistent and recoverable state for the user's modeling work.
Responsible for deserializing Gaphor models from persistent storage (e.g., XML files) into in-memory objects. It reconstructs model elements and their relationships, handling version compatibility.
Related Classes/Methods:
Manages the serialization of the current in-memory Gaphor model into a persistent format (e.g., XML) for storage. It iterates through model elements and their properties to create a complete representation.
Related Classes/Methods:
Ensures data integrity by logging model changes (events) to facilitate recovery from unexpected application shutdowns. It can replay these events to restore a model to its last consistent state.
Related Classes/Methods:
Provides undo and redo capabilities by tracking and managing a stack of reversible model operations. It groups individual model changes into logical transactions.
Related Classes/Methods:
A central event bus that manages and dispatches events throughout the application, notifying subscribed components of model changes and transaction states.
Related Classes/Methods:
Manages atomic model changes and the lifecycle of transactions, ensuring data consistency by grouping multiple operations into a single, reversible unit.
Related Classes/Methods:
Responsible for instantiating and managing Gaphor model elements, particularly during the loading process and other model creation operations.
Related Classes/Methods:
Handles the low-level serialization of Gaphor model data into XML format, used by the save component to write models to persistent storage.
Related Classes/Methods: