UML Model and Diagram definition, where? – XMI has them, Standards not?

1k views Asked by At

So, I’ve been looking through the UML 2.3 Infrastructure, UML 2.3 Superstructure, MOF 2.0 and XMI 2.11 standards in search of the specification and definition of Models and Diagrams.

I am aware about models and diagrams and what they are (diagrams show a view on the model), but seeing them in an XMI file exported from Visual Paradigm and analysing it I got a bit confused.

Throughout the standards mentioned above the specification mentions diagrams and models specifically with their corresponding meanings, but I could not find where it is defined, nor, the most important part, how it comes in to the UML Metamodel.

XMI mentioned above has the following structure (heavily pruned):

<xmi:XMI xmi:version="2.1" …>
  <uml:Model />
  <uml:Diagram />
</xmi:XMI>

So as I could not find definitions on Model and Diagram, I could also not find out how many Model elements are allowed/possible and what content it may have. Same for Diagrams, although I know those can be 0..*.

2

There are 2 answers

2
UML GURU On

THe easiest way to check your model is to use the EclipseUML2 editor. This is not a graphical UML but a tree where you can create elements directly on the XMI model. The XMI is 2.1 corresponding to UML 2.3 and is really clean. This XMI is used by RSA IBM, Topcased, Papyrus at project level and you can even have multiple projects merge with Omondo. Really cool !!

1
Jordi Cabot On

Models tags are used in XMI files. I'm not sure there's a standard for that (in the sense that sometimes you just see a single model tag for the whole XMI and other times tools seem to open a new model tag for each diagram.

What it is true is that we don't have yet a standard to store in an XML file the diagram information (layout, sizes,...). There is some work in progress but right now each tool uses its own proprietary format for that (some of them store the info in the same XMI as the model information others do it in a separate file).