You may know that Enterprise Architect uses a relational database to persist the model. An EAP file for instance is powered by the Microsoft Jet database engine. So it is legal to ask what are the advantages of using the EA-Bridge instead of a specific database driver (e.g. JDBC/ODBC).
The answer is simply that you avoid to reverse engineer the database schema of Enterprise Architect. You’re implementation will be based on the Eclipse UML 2 project which offers an EMF based implementation of the UML standard. The EA-Bridge itself offers an EMF specific Resource implementation for EAP files. If you have already an application based on the Eclipse UML 2 project, you do not have to modify it it in order to process EAP files. All you have to is to add the EA-Bridge to your Eclipse product and maybe to adjust the file handling. Please observe that you can use the EA-Bridge also in pure Java applications as long as you are willing to integrate also the dependencies to the Eclipse UML 2 project and EMF.
We would like to visualize the difference between working with a database driver and the EA-Bridge with the following example that shows a typical application with a sender component that publishes content to two connected receiver components.
The following three screenshots show how the content is queried in Enterprise Architect with help of an SQL select query:
Feel free to reverse engineer the foreign keys to re-build the model. Please observe that each table has more columns and that many more tables are needed in realistic examples. Furthermore, nearly each UML concept has its specific persistence handling in Enterprise Architect. So you have to reverse engineer all UML concepts used in your model.
The following screenshots shows as alternative how the model is visualized to the user by the editor offered by the Eclipse UML 2 project. Instead of inspecting tuples in a table, the UML concepts are instantiated. This allows one to navigate along the hierarchy (editor ‘ComponentExample.EAP’’) and to inspect all properties of the selected instance (view ‘Properties’).
The programmatic handling of the instances is really convenient. Each implementation of a UML concept offers methods to read and modify its content and to create new child elements.
Please observe that the EA-Bridge does not only avoid to get the knowledge from the reverse engineering of Enterprise Architect’s database schema. It also avoids to implement it. We spend a lot of effort to optimize the read and write performance of the EA-Bridge to be able to process really large models.