file Repository DTD

4 years 4 months ago #3612 by asefth

can you detail how the "exml" repository is structured?
I mean: where can I find the DTD?
This would be nice for exchanging targeted information.

e.g. if I ask to get some model elements (model+diagrams) in a set of exml files well formed against this DTD, is it possible to EASILY use thes files from a Modelio instance (with a module)?
The module would be in charge with reading/importing these information within "the project and its work models" (e.g. create a new work model).
Can you guide me to the methods required to read/retrieve these information (BTW these methods are supposed to know the DTD! ).

The API shows some read/write methods. But the concepts involved should be clarified for me.
Can you define what is a "fragment", and what is the minimum knowldedge required to handle that task.


Please Log in or Create an account to join the conversation.

4 years 4 months ago #3614 by phv

There is no known DTD nor Schema available for the .exml file structure (the internal parser is hand-crafted and does not rely on such a schema). However, this structure is quite simple (not that many elements). It should be possible to retrieve from existing exml files with the help of some XML tool.

Manipulating these files which are at the core of the model storage of Modelio is probably a bad idea.
  • First of all, these files have been designed for the purpose of storing models in Modelio, they do not follow any standard, they have specific characteristics for their purpose, not sure they will suit other needs.
  • Second, being specific to Modelio they might evolve at any moment if required to improve Modelio.
  • Third, we do not provide any module API for theses files as their manipulation and life-cycle are far more complex than simply reading and writing them. Feel free to dig in the Modelio code (for example in org.modelio.vstore and other packages from vcore project) to understand this point.

So the answer to your question is "No, there is no EASY way for a module to handler exml persistency files". We do not recommend it.
Should you really want or need to manipulate these files, we advise you to consider writing an additional Eclipse plugin and to package it in your own version of Modelio. But writing such a plugin is another story.

It seems that your intent is to exchange models using a module. There must be simpler options... Let us know more about your needs and we might suggest you some ideas.

About "fragment": just consider that this term is a generic word, a shortcut, to designate either a Work Model, a Library or a Module. Indeed, these three "objects" contribute a part or "fragment" of model of a Modelio Project.


Please Log in or Create an account to join the conversation.

4 years 4 months ago - 4 years 4 months ago #3622 by asefth

I apreciate your quick and clear answer.

Regarding the exml repository, I don't intend to manipulate these files which are dedicated to persist Modelio projects (as I dont' play with my *.docx *.* files if I want to keep on using them everyday)

Some tests can be done on a copy of this repository. Parsing it or sharing it as-is, so the model can be rebuilded outside.
This way, it woud be possible to share more about the model than what XMI provides (often very randomly). The diagrams that are meaningful would also be provided (e.g. based on one model, maybe there are 4 useful diagrams instead of 1 big diagram with all the inheritance and associaton stuff mixed-up; if the guy outside get the model and blindly rebuilds a big class diagram from my model, maybe he will lose smth important; sure that I can send him an image of my 4 diagrams but it's static information he should recreate).
Is the diagram layout description within the exml files documented?

Let's try the simpler way you suggest.

But first, let me tell you what I expect from such a Modelio module's:

1/ importing fragments/parts of models (including diagrams).
The problem is that the incoming file maybe in a proprietary format or XMI-like format (XML file, EMF file, or any other flat file with its own DTD).
The model will be imported as a new work model, or as package within my work model.
Once it's in the Modelio place, I'm quite sure I can do manually or programmatically all the job I want on it.
Solution? Offer other people a repository-like sharing solution?

2/ exporting some fragments/parts of a work model.
e.g. the whole package Alpha of my (2nd) work model NiceModel within project veryNiceProject, including the classes, the associations and also the related diagrams.
There is XMI export. Diagrams description is preserved within the model but the layout is lost.
How can I also export the layout description?

3/ exporting my model changes I've not persisted yet (let's says during the last two hours because I'm very optimistic with 3.3)
events inform about which elements have been created/updated/deleted/moved.
So it's a straightforward way to let counterpart informed about the stuff I'm doing e.g. on a specific branch in my model which is an image of a branch in his model (at least a list of changed elements)

4/ last but not least: synchronize the 2 models
In between, we both have modified our models.
So this is obviously the masterpiece, assuming we don't have a CVS/SVN common repository and different modeling tools. At best, imagine each one has its own private repository. So the job would be to find a way to synchronize these 2 repositories.
In addition, security must be regarded (user_id, user_grant on each fragment, timestamp...)

Automatic layout (Option)
It's can quickly be a forest when there are many associations crossing each other, the roles/names/cardinalities can be mixed up and not even readable (sometime an association name is 5 cm away from the association, on another association!).
I've not found anything in Modelio for quickly re-arranging the layout of a diagram in a few clicks. Is there such tool?
This is an issue.
Such a feature could be a short term turnaround for the problem of receiving a model without diagrams layout. Layout could be easily rebuilded.

I hope it's clear.
I prefer expressing "strong" requirements at the beginning instead of lately and then be stuck in the middle.

EDIT Let's take a simple use case regarding "persistence management", when modifying the model programatically:
I launch a pretty nice batch on my model. Of course, I've a nice and reliable test procedure. But if some hidden deep errors are not detected (e.g. 50 tricky stereotyped associations badly modified), I may discover them later as I've modified many other parts of the model. That can be very very messy, and anyway time-consuming.
So I need to be able to rollback at project level.
Of course, the backup management system of my computer can guarantee a back up. But it is dedicated to big hard/software problems.
The Export project manual GUI feature requires to close the project first, and I don't know yet if possible and how simple it is programmatically (project opened). It's an image of the project (I've to manually manage...).
This issue is not relative to collaboration but only to my projects on my computer.


Please Log in or Create an account to join the conversation.

4 years 4 months ago #3653 by asefth

Regarding the requirements I expressed in my last post,
can you tell me/us what is the simpler way you were about to suggest?



Please Log in or Create an account to join the conversation.

4 years 3 months ago - 4 years 3 months ago #3671 by asefth

I'm sorry to ask you again about this.

Is there a simple way with Modelio to address the requirements I expressed?


Please Log in or Create an account to join the conversation.

Moderators: tmachmaab
Time to create page: 0.034 seconds
^ Back to Top