Book a Demo

Author Topic: Stereotypes  (Read 3596 times)

themiyac

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Stereotypes
« on: August 06, 2015, 02:37:22 am »
We have defined a profile and it has sterotypes in it. We imported the profile into the model and we are using your java api to apply a stereotype. The apply stereotype method only takes a string. If another profile has a stereotype with the same name that we applied then there is a chance that your apply stereotype method applies another stereotype than the one that we want to apply. How do I destinguish that the GetStereotype method and ApplyStereotype method is coming from our profile when all they return is just the name of the stereotype?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Stereotypes
« Reply #1 on: August 06, 2015, 04:17:41 am »
Good question. I'd assume that the names need to unique but would not know where this constraint is stated (too lazy to crawl through Superstructures). Sparx?

q.

themiyac

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Re: Stereotypes
« Reply #2 on: August 06, 2015, 04:23:25 am »
I think fully qualified name is a solution, because it provides the name in terms of Profile::Stereotype::Tag, but would still like to have an official answer from Sparx.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Stereotypes
« Reply #3 on: August 06, 2015, 09:05:07 am »
When you apply your stereotype, give it a fully-qualified name, e.g. "MyProfile::MyStereotype". To find out the fully-qualified stereotype that has been applied to an element, for now you will need to look in t_xref, but hopefully it should appear in the Automation Interface in a future release.

[edit]select Description from t_xref where Name='Stereotypes' and Client=<GUID>, replacing <GUID> as appropriate[/edit]
The Sparx Team
[email protected]