My interpretation of the UML 2.1.1 spec is that we can use
<<appliedProfile>> for profiles as well as user models, but either mechanism
(<<appliedProfile>> or <<import>>) will work. Anyone else have an opinion
on the best approach for compatibility with other applications and the
future?
>From a pure ArgoUML point of view, these are all equivalent at the level of
the XMI reader/writer. Any type of external reference will get resolved
using the same mechanism. For example, an Attribute with a type which comes
from the profile will look like this:
<UML:Attribute xmi.id =
'-64--88-1-2-23fd354c:114423b3b4e:-8000:000000000000077D'
name = 'newAttr' visibility = 'public' isSpecification =
'false' ownerScope = 'instance'
changeability = 'changeable' targetScope = 'instance'>
<UML:StructuralFeature.type>
<UML:Interface href =
'http://argouml.org/profiles/uml14/default-uml14.xmi#.:000000000000085E'/>
</UML:StructuralFeature.type>
</UML:Attribute>
where the base URL of the HREF is a proxy for our profile library.
To answer your questions:
1) import the profile package from the profile model
(adding an <<import>> from the user model to the profile - do I need to
do that?)
You don't need to do this.
2) add an <<appliedProfile>> from the user model to the profile package
This is a good idea for interchange with other tools, but our internal
support will work without it.
The main thing that is missing right now to get you going is the ability to
load multiple profiles so that they are all available. That is what's
missing to allow you to extend one from the other. I apologize in the delay
in getting this stuff committed, but since it affects the project save/load,
I'm trying to be careful not to do anything that will create corrupt
projects (even though we're not near a release right now).
Tom
-----Original Message-----
From: Marcos Aurélio [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 8:04 AM
To: [email protected]
Subject: Re: [argouml-dev] Profiles and cross XMI file references (was
ElementImport)
2007/8/4, Tom Morris <[EMAIL PROTECTED]>:
In looking at this further, I don't think ElementImport (or its Package
equivalent Permission <<import>>) is the right mechanism for profiles.
I think what we want to use is Dependency <<appliedProfile>> in UML 1.4 (see
Section 2.14.2.1 of the UML 1.4 spec) which will become ProfileApplication
associations in UML 2.x (see Section 18.3.5 of the UML 2.1.1 spec).
Profiles can have other profiles applied, so an EJB profile could have a
Java profile applied to it, allowing it to extend the Java profile. The
standard UML 1.4 profile (i.e. the elements in Appendix A UML Standard
Elements) doesn't need to be applied explicitly, in my opinion, but instead
can always be assumed to be applied (see Annex C of UML 2.1.1 for some text
which describes this).
I think the "<<appliedProfile>>" allows a model to use the items defined at
a profile, but doesn't allow a profile to extend another, you need an
"<<import>>" to do that.
e.g:
[MyModel] -- <<appliedProfile>> --> [JavaBeans] -- <<imports>> --> [Java]
-- <<imports>> --> [UML1.4]
we need therefore both mechanisms.
when adding a new profile:
1) import the profile package from the profile model
(adding an <<import>> from the user model to the profile - do I need to
do that?)
2) add an <<appliedProfile>> from the user model to the profile package
3) add the profile to the profile configuration
maas
I've completed most of the work on the
XmiReferenceResolver/XmiReferenceProvider which is needed to support cross
XMI file references, but it looks like it's not really going to be that
useful for profiles per se.
maas - If you modify your profile management code to apply Dependencies with
<<appliedProfile>> stereotypes to the top level Model element of the user
model. I'll make sure that the project loading code looks for those
Dependencies and loads the given profiles. The profiles can have other
profiles applied recursively, but you can also apply multiple profiles
independently if they are not related to each other. The profile names
should be relative to some virtual profile library, not absolute file names,
eg argouml-v026.xmi or java/ejb-v1.xmi. I think it would be a good idea to
include a version in the naming scheme so that multiple versions can be
distinguished.
The other remaining pieces are to teach the various search methods (e.g.
find a stereotype) to look in multiple profiles and to teach the file saving
code to recognize profile derived elements and save references to them
instead of saving them explicitly (most of this will happen automatically).
For background reading, I'd recommend reading Chapter 18 of the UML 2.1.1
spec to see where things will be evolving to in the future and this
Rational/IBM article
http://www.ibm.com/developerworks/rational/library/05/0906_dusko/ for a user
level view of profiles in another tool.
Tom
> -----Original Message-----
> From: Tom Morris [mailto:[EMAIL PROTECTED]
> Sent: Saturday, July 28, 2007 4:48 PM
> To: ' [email protected] <mailto:[email protected]> '
> Subject: RE: [argouml-dev] ElementImport (Was: Profiles and
> cross XMI file references)
>
>
> > Does it support linking elements in different models?
> > I tryied it and it seems to took for elements in the user's
> main model
>
> It should support linking between different models. The
> issue is that the other model needs to be loaded and we don't
> currently have a way to have multiple models (except for the
> profile model) loaded at once.
>
> The next step is to implement a "open readonly" or "load for
> reference" or some similar type of function, but we'll also
> probably have to fix up some of the methods which create the
> list of elements for the user to select from because many of
> them assume that the search should start at a single root
> model (the user's model), which won't work for this type of
> configuration.
>
> Perhaps in the short term I'll try to link the profiles for
> you by hand. I'll see if I can work on it today or tomorrow.
>
> Tom
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
--
-
http://www.marcosaurelio.com
*1984 +2057
"Standard Portuguese is mostly a jewel for powerless middle-class careers
(journalists, teachers, writers, actors, etc.)" - wikipedia