Marcos Aurélio | 26 Apr 11:18 2009
Picon

Re: best practice to build profile for argouml 0.28



On Sat, Mar 7, 2009 at 12:53 AM, Jens Klein <jens <at> bluedynamics.com> wrote:
Hi,

I'am maintainer and core-developer of ArchGenXML, a code generator for
Python code in the context of Zope and Plone. ArgoUML is the major
modeling tool most people using in this context.

We're doing a huge refactoring of ArchGenXML and while doing so we build
a new registry for stereotypes, taggedvalues and datatypes. From this
registry we generate the profile xmi file for usage in ArgoUML.

Now in our registry a stereotype may depend on the context of another
stereotype. I.e we have a package with stereotype <<contenttypes>> and in
there we have a class with stereotype <<archetype>>. Now latter can only
exist in the package contenttypes. We can express this in our registry.

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
 

Thanks in advance

Jens
--
Jens W. Klein, BlueDynamics Alliance, http://bluedynamics.com

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe <at> argouml.tigris.org].



--
-
http://www.marcosaurelio.com
*1984 +2057


"crescer não é evoluir, crescer é ficar maior, evoluir é ficar melhor"
webpost | 28 Apr 21:55 2009
Picon

hiiiiiii there :)

<a
href=http://www.3rb69.com/f6-%D8%B5%D9%88%D8%B1-%D8%B3%D9%83%D8%B3-%D8%B5%D9%88%D8%B1-%D8%AC%D9%86%D8%B3/>&#1589;&#1608;&#1585; &#1587;&#1603;&#1587;</a>
http://www.3rb69.com/f6-%D8%B5%D9%88%D8%B1-%D8%B3%D9%83%D8%B3-%D8%B5%D9%88%D8%B1-%D8%AC%D9%86%D8%B3/

you r great ppl

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe <at> argouml.tigris.org].

webpost | 28 Apr 20:44 2009
Picon

How cool is handmade soap

Hi Everybody!

Lately I've been lurking around these forums as a guest but today I finally found a reason to sign up and bug
you all. look forward to interacting with you all.

<a href=http://www.bubblesandsoap.co.uk>Handmade soap blog</a>

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe <at> argouml.tigris.org].

Linus Tolke | 29 Apr 06:44 2009
Picon

Sorry, for the spam mail

Oh no!
 
I pressed the wrong button by misstake while deleting spam mail and approved them instead. I am very sorry about that!
 
Please delete these mails immediately, I will delete them from the mail archive.
 
        /Linus
 
Jens Klein | 27 Apr 10:29 2009

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: [users-unsubscribe <at> argouml.tigris.org].

Vincent Fretin | 29 Apr 16:30 2009
Picon

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

Hi Marcos and Jens,

Some answer below.

On Mon, Apr 27, 2009 at 10:29 AM, Jens Klein <jens <at> bluedynamics.com> wrote:
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.

I think TagDefinition should be bound to a stereotype and with the stereotype you can say it apply only on Class elements.
TagDefinition should always be bound to a stereotype in UML2.
 


Example 2
---------
the following shoudl be allowed only on classes with the stereotype
<<tool>>

the stereotype <<tool>> should be allowed only on classes.
You wanted to say "tool_instance_name" tagged-value should be allowed only on elements with <<tool>> stereotype", no?
<<tool>> stereotype is already for "Class" elements :
        <UML:Stereotype xmi.id = '5d6b1dca-45fc-569e-b7bd-aab2ca3acc72' name = 'tool'
          isSpecification = 'false' isRoot = 'false' isLeaf = 'false' isAbstract = 'false'>
          <UML:Stereotype.baseClass>Class</UML:Stereotype.baseClass>
        </UML:Stereotype>

If you open the profile in argouml, select tool_instance_name tagDefinition and change owner to the <<tool>> stereotype, export the xmi, you get :
        <UML:Stereotype xmi.id = '5d6b1dca-45fc-569e-b7bd-aab2ca3acc72' name = 'tool'
          isSpecification = 'false' isRoot = 'false' isLeaf = 'false' isAbstract = 'false'>
          <UML:Stereotype.baseClass>Class</UML:Stereotype.baseClass>
          <UML:Stereotype.definedTag>
            <UML:TagDefinition xmi.id = 'd2558c78-8aad-5af8-ab11-6979bc21e721' name = 'tool_instance_name'
              isSpecification = 'false' tagType = 'String'>
              <UML:TagDefinition.multiplicity>
                <UML:Multiplicity xmi.id = 'c95e6681-d169-5750-94c3-dde71c488a95'>
                  <UML:Multiplicity.range>
                    <UML:MultiplicityRange xmi.id = '5a64da82-8374-562c-a0a4-c264239b0ac5' lower = '0'
                      upper = '1'/>
                  </UML:Multiplicity.range>
                </UML:Multiplicity>
              </UML:TagDefinition.multiplicity>
            </UML:TagDefinition>
          </UML:Stereotype.definedTag>
        </UML:Stereotype>

The tool_instance_name tagDefinition will be available only if you applied the <<tool>> stereotype on the Class.




       <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


For OCL constraint, I think an example will be to
allow methods with stereotype <<action>> only if the class has the <<archetype>> stereotype for example.
How do we do that in OCL? And how do we include such a constraint in the profile?

Regards
--
Vincent Fretin
Tom Morris | 29 Apr 16:35 2009
Picon

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

A year or two ago, I patched the ArchGenXML profile generator to
prepare it for our new profiles by providing stable xmi.id values, but
the patch also included some other functional improvements as well.  I
think, but am not sure, that I provided the patch to either the Plone
bug system or as an attachment/comment on one of the doc pages.  Do
you have that patch?  If not, I can see if I can resurrect it.

More comments below...

On Mon, Apr 27, 2009 at 4:29 AM, Jens Klein <jens <at> bluedynamics.com> wrote:
> 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
>
> the current profile xmi  file is located here:
> https://svn.plone.org/svn/archetypes/ArchGenXML/trunk/umltools/argouml
>
> Example 1:
>
> 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.
>
> 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.

It sounds to me that both of these constraints can be handled by the
fundamental constraints of the Stereotype/TaggedValue system.
Stereotypes have base classes which constrain what elements they can
be applied to.  TagDefinitions are owned by Stereotypes and can only
be applied to elements which have those Stereotypes applied.  Are you
using this functionality or are you falling back to UML 1.3
compatibility mode where anything can be applied to anything?

Tom

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe <at> argouml.tigris.org].

Thomas Neustupny | 29 Apr 16:38 2009
Picon
Picon

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

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 <jens <at> bluedynamics.com>
> An: users <at> argouml.tigris.org
> 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:
> [users-unsubscribe <at> argouml.tigris.org].

--

-- 
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: [users-unsubscribe <at> argouml.tigris.org].
Attachment (archgenxml_profile.xmi): application/octet-stream, 207 KiB
Vincent Fretin | 29 Apr 16:49 2009
Picon

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

On Wed, Apr 29, 2009 at 4:35 PM, Tom Morris <tfmorris <at> gmail.com> wrote:
A year or two ago, I patched the ArchGenXML profile generator to
prepare it for our new profiles by providing stable xmi.id values, but
the patch also included some other functional improvements as well.  I
think, but am not sure, that I provided the patch to either the Plone
bug system or as an attachment/comment on one of the doc pages.  Do
you have that patch?  If not, I can see if I can resurrect it.
Now the archgenxml_profile.xmi use stable xmi.id.
I saw nowhere your patch. You already said that when I implemented stable xmi.id with the uuid module, but it seems your patch was never commited....
 
 


It sounds to me that both of these constraints can be handled by the
fundamental constraints of the Stereotype/TaggedValue system.
Stereotypes have base classes which constrain what elements they can
be applied to.  TagDefinitions are owned by Stereotypes and can only
be applied to elements which have those Stereotypes applied.  Are you
using this functionality or are you falling back to UML 1.3
compatibility mode where anything can be applied to anything?

Tom

For now all tagged-values can be used anywhere. We don't use the "tag definitions are associated with a stereotype" functionality. We should indeed. :-)

--
Vincent Fretin
Thomas Neustupny | 29 Apr 16:58 2009
Picon
Picon

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

Hi!

> For now all tagged-values can be used anywhere. We don't use the "tag
> definitions are associated with a stereotype" functionality. We should
> indeed. :-)

Yes, and in my previous mail I described how, and I sent a modified profile, I hope you got it.

Thomas
--

-- 
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=1981016

To unsubscribe from this discussion, e-mail: [users-unsubscribe <at> argouml.tigris.org].


Gmane