Book a Demo

Author Topic: Creating profiles including new data types  (Read 11960 times)

intheyear1984

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Creating profiles including new data types
« on: October 30, 2009, 08:31:57 pm »
Hello,

I tried to define a stereotype extending UML elements by serveral attributes.
I defined a package with stereotype <<profile>> and inside this
I defined my stereotypes extending <<metaclass> state,
following the instructions on the web page and the ea internal help.
The stereotypes contain attributes of a new class. So I incorporated these new class into the profile, too.

First problem is, that the new classes for my new data types are not part of the profile xml file.

Next problem is, that using my profile I cannot access attributes assigned to my stereotypes.

I did not find the right help yet and would be very pleased if anybody can help me.

Thanks
Marcel

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: Creating profiles including new data types
« Reply #1 on: October 30, 2009, 08:47:01 pm »
Hi,

Quote
The stereotypes contain attributes of a new class. So I incorporated these new class into the profile, too.
Can you clarify more, how you defined them, these should be either stereotypes as well or enumerations I think.

WBR
Günther

intheyear1984

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Creating profiles including new data types
« Reply #2 on: October 31, 2009, 12:10:39 am »
Quote
The stereotypes contain attributes of a new class. So I incorporated these new class into the profile, too.

I added a new attribute to one of the stereotypes. The type of this stereotype attribute should be a new complex data type.
The definition of this data type is given by a new class, which I also added to the class diagram of the profile.

I need this type definition to be able to use the stereotype I just defined before. It is directly related to the profile and its stereotypes.

Thanks
Marcel

Andrew Warner

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: Creating profiles including new data types
« Reply #3 on: December 10, 2009, 02:28:07 pm »
Hi Marcel,
in place of the class, try adding a new stereotype for the new type. Then give it an attribute of type String (don't know how significant the type is) with the name _metatype and a default value of the name of the type.

So,
You want a class called NewType.
Create a «stereotype» named "new type"
Give it an attribute named "_metatype" of type String
Set the default of _metatype to "NewType"

Next, use NewType as the complex data type in your other stereotype.

Incidentally, any attributes you add to the stereotypes show up as Tagged Values, not attributes on a type. Think metatype rather than type. You'll go on to create the type in your model and add the attributes there. It raises all sorts of questions about whether to use attributes, tagged values, or associations since they all seem to be treated a little differently, at least in most modelling tools.

I'm still wrestling with the differences between types with attributes tagged values, and InstanceSpecifications.

Cheers,
Andrew.
P.S. sorry the reply is so late. I only started using EA a couple of weeks ago and just joined the forum.
Regards,
Andrew Warner.