Re: Re: best practice to build profile for argouml 0.28

Thomas Neustupny <[email protected]> Wed, 29 Apr 2009 16:38:35 +0200
Newsgroups gmane.comp.lang.uml.argouml.user
Message-ID <[email protected]>
Hi Jens,

stereotypes can be restricted to be applicable to classes, tagged values based on some tag definition not. I'd suggest to organize the tag definitions by assigning them all to a smaller set of stereotypes. Then, such tag definitions are only available in the tagged values tab if the respective stereotype is assigned.

This is to be used for your example 1 and 2. For your second example, the solution is easy: open the XMI in ArgoUML as project, select the tool_instance_name tag definition and change the owner to the tool stereotype in the property panel. I've done that and send you the modified profile, please find it attached.

I know of no other way then using the stereotypes mechanism, also I don't know if OCL can offer more here.

Thomas

P.S.: Your mails arrive late. Could it be that you are using a non registered mail address when you send to the users mailing list? In this case Linus has to approve your mails manually.

-------- Original-Nachricht --------
> Datum: Mon, 27 Apr 2009 08:29:10 +0000 (UTC)
> Von: Jens Klein <[email protected]>
> An: [email protected]
> Betreff: [argouml-users] Re: best practice to build profile for argouml 0.28

> Am Sun, 26 Apr 2009 11:18:56 +0200 schrieb Marcos Aurélio:
> >>
> >> Is it possible to express this kind of constraint in XMI and within
> >> ArgoUML? A tiny example or a simple "No way" would help me a lot.
> >> Searching the web brought up tons of crap results, but no good document
> >> explaining XMI and UML-Profiles in depth.
> >>
> >>
> > Hi, I think you can represent this adding an OCL annotation to your
> > profile I would need to look at the UML spec to write the proper
> > expression, but I'm sure it is possible.
> > 
> > Can you send me an example of such profile? I can add the OCL expression
> > to you
> > 
> > *maas*
> 
> the current profile xmi  file is located here:
> https://svn.plone.org/svn/archetypes/ArchGenXML/trunk/umltools/argouml
> 
> Example 1:
> ----------
> 
> if you take the last entry, a tag definition for a tagged value (i 
> replaced the uuids for better readability):
> 
> <UML:TagDefinition xmi.id = '...' name = 'index:extras'
>           isSpecification = 'false' tagType = 'String'>
>           <UML:TagDefinition.multiplicity>
>             <UML:Multiplicity xmi.id = '...'>
>               <UML:Multiplicity.range>
>                 <UML:MultiplicityRange xmi.id = '...' lower = '0'
>                   upper = '1'/>
>               </UML:Multiplicity.range>
>             </UML:Multiplicity>
>           </UML:TagDefinition.multiplicity>
>         </UML:TagDefinition>
> 
> I'd like to tell the tag definition to be valid only on "Class" elements.
> 
> Example 2
> ---------
> the following shoudl be allowed only on classes with the stereotype 
> <<tool>>
> 
> the stereotype <<tool>> should be allowed only on classes.
> 
>         <UML:TagDefinition xmi.id = '...1' name = 'tool_instance_name'
>           isSpecification = 'false' tagType = 'String'>
>           <UML:TagDefinition.multiplicity>
>             <UML:Multiplicity xmi.id = '...'>
>               <UML:Multiplicity.range>
>                 <UML:MultiplicityRange xmi.id = '...' lower = '0'
>                   upper = '1'/>
>               </UML:Multiplicity.range>
>             </UML:Multiplicity>
>           </UML:TagDefinition.multiplicity>
>         </UML:TagDefinition>
> 
> Id really appreciate examples for both. As you see in the file we have 
> lots of tagged values and selecting them from this very long drop-down in 
> argouml is no fun. 
> 
> Different topic, but it would also help if the dropdown helps selecting 
> the value by jumping to the entry by pressing its first letter. This is 
> not so important if we can reduce the list to relevant entries only using 
> the OCL-approach you mentioned.
> 
> thanks and best regards
> -- 
> Jens W. Klein - Klein & Partner KEG - BlueDynamics Alliance
> 
> ------------------------------------------------------
> http://argouml.tigris.org/ds/viewMessage.do?dsForumId=449&dsMessageId=1942099
> 
> To unsubscribe from this discussion, e-mail:
> [[email protected]].

-- 
Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss für nur 17,95 Euro/mtl.!* http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=449&dsMessageId=1980844

To unsubscribe from this discussion, e-mail: [[email protected]].
archgenxml_profile.xmi (application/octet-stream, 153.8 KB) - not displayed