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]].

Reply via email to