Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Modeling Question: EMF Library Model as Profile?
Modeling Question: EMF Library Model as Profile? [message #627136] Wed, 05 November 2008 06:11
Marc Moser is currently offline Marc MoserFriend
Messages: 66
Registered: July 2009
Member
Hi,

I tried to do something similar to the EMF Library Tutorial, but
instead of using EMF, I wanted to use UML and a profile. I encountered
some problems, mostly due to a lack of understanding all the UML
metamodel's properties.

The scenario
---------------

In the EMF world, I have/create the following artifacts:
a) I have the ecore meta-model
b) I create the library model using ecore
c) I create an instance, e.g. using the editors EMF generates from b)

Now, in the UML world, I have these artifacts:
a) I have the uml meta-model
b) I create a profile to "adapt" the uml meta-model
c) I crate an instance of the uml meta-model... now here I have to
switch my conceptual point-of-view and consider the uml meta-model as
my model. I can then apply the profile to it, and create an instance.
Doing so, I can re-use the available UML tooling to create the
instance.

The Questions
-----------------

1) It seems as if I could define several profiles to hold the same
information as the ecore library model. Is there already a way of
transforming an ecore model to a profile that could be considered as a
"standard" way of doing it?

2) I wanted to do it like this (only part of library model): created
three stereotypes on metamodel-element "Class", called "Library",
"Book", "Writer". Then I created two stereotypes called
"Library_Writers" and "Library_Books" on metamodel-element
"Association".
Applying this profile to UML, I was able to create a library instance
(Library0), some Books (Book0..BookN) and some Writers
(Writer0..WriterM). But I don't know how to:

- Restrict the model such that only instances of the above stereotypes
can be created, no other elements. I tried with the "strict=true" in
the profile application, but I could still create other elements and
successfully validate the resource (I'm currently working on latest
3.4 modeling release build)

- Create the associations between the Library0 and Book0..BookN. My
idea was to create normal associations, and then apply the stereotype
"Library_Books" to it. But how can I now specify the association ends?
In normal class diagrams, I can easily create associations with the
diagram-editor, but here, I would like to set the properties manually,
and I don't really know what properties to set.

- Concerning the "Library_Books" stereotype, how can I spedify that
only "Library" is allowed on one end, and only "Book"s are allowed on
the other end?

Thanks for your help!

All the best,
Marc
Previous Topic:Can UML2 profiles/models/instances be manipulated via reflective EMF?
Next Topic:Cast UML model elements
Goto Forum:
  


Current Time: Fri Apr 26 20:59:37 GMT 2024

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

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

Back to the top