Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Model or package as root element
Model or package as root element [message #800012] Thu, 16 February 2012 15:23 Go to next message
Michael Bob is currently offline Michael BobFriend
Messages: 29
Registered: February 2012
Junior Member
Hi,

can anybody tell me what is the difference between model and package as root element of a UML model?

In most cases packages are used, also when creating a new model using the wizard, the package is marked as default.

Regards,

Michael
Re: Model or package as root element [message #809216 is a reply to message #800012] Tue, 28 February 2012 15:53 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Michael,

Existence of the Model type is somewhat historical and not really well
realized in UML. Its original intent was to represent a view of elements
owned by various packages (thus the 'viewpoint' property), but because a
model actually owns all of its packaged elements (by virtue of being a
Package) instead of simply referencing them, it's not all that useful.

Technically, one need not use Model instances at all, since a Package
can be used as the root of a given element hierarchy. It's common
practice, however, to use a Model as the root of a given model, for
several reasons, among them being:

- it helps distinguish the model from a profile
- many tools have adopted this convention
- a number of standard stereotypes (e.g., Metamodel and SystemModel) are
only applicable to models

Kenn

On 12-02-16 10:23 AM, Michael Bob wrote:
> Hi,
>
> can anybody tell me what is the difference between model and package as
> root element of a UML model?
>
> In most cases packages are used, also when creating a new model using
> the wizard, the package is marked as default.
>
> Regards,
>
> Michael
Re: Model or package as root element [message #814335 is a reply to message #809216] Tue, 06 March 2012 10:18 Go to previous message
Eclipse UserFriend
Michael,

Kenn's comment is perfect. Just as an addition: A model (with a cerrain
viewpoint) can also be used as kind of a semantic/methodological
substructure of your model. The 'viewpoint' property is the only difference
to a package, so it can be used as kind of a methodology-dependent
meta-information to, as one example, indicate that allow only a certain
element type should be contained by the model.

For example, I myself use a Model with viewpoint 'requirements' to have a
fix location where possible requirements are stored. The viewpoint
information can also be exploited for a later consistency check... if there
is any requirement, which is not directly or indirectly contained in a Model
with viewpoint 'requirements' an error message would be displayed.

Marc-Florian

"Kenn Hussey" schrieb im Newsbeitrag news:jiit93$kmk$1@news.eclipse.org...

Michael,

Existence of the Model type is somewhat historical and not really well
realized in UML. Its original intent was to represent a view of elements
owned by various packages (thus the 'viewpoint' property), but because a
model actually owns all of its packaged elements (by virtue of being a
Package) instead of simply referencing them, it's not all that useful.

Technically, one need not use Model instances at all, since a Package
can be used as the root of a given element hierarchy. It's common
practice, however, to use a Model as the root of a given model, for
several reasons, among them being:

- it helps distinguish the model from a profile
- many tools have adopted this convention
- a number of standard stereotypes (e.g., Metamodel and SystemModel) are
only applicable to models

Kenn

On 12-02-16 10:23 AM, Michael Bob wrote:
> Hi,
>
> can anybody tell me what is the difference between model and package as
> root element of a UML model?
>
> In most cases packages are used, also when creating a new model using
> the wizard, the package is marked as default.
>
> Regards,
>
> Michael
Previous Topic:URI.createURI
Next Topic:Semantic annotations for UML elements
Goto Forum:
  


Current Time: Wed Apr 24 16:10:10 GMT 2024

Powered by FUDForum. Page generated in 0.02907 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top