Author Topic: Specify one of more stereotypes with same name?  (Read 1418 times)

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 128
  • Karma: +1/-1
  • Business Information Architect
    • View Profile
Specify one of more stereotypes with same name?
« on: July 10, 2014, 07:51:30 pm »
In EA script, How do I specify which stereotype when there are more stereotypes with the same name?
They have different namespaces. But how do I specify the one I need in an assignment like: Obj.StereoType = "StTypName"


qwerty

  • EA Guru
  • *****
  • Posts: 10393
  • Karma: +229/-178
  • I'm no guru at all
    • View Profile
Re: Specify one of more stereotypes with same name
« Reply #1 on: July 10, 2014, 07:57:33 pm »
Like <profile>::<stereo>

q.

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 128
  • Karma: +1/-1
  • Business Information Architect
    • View Profile
Re: Specify one of more stereotypes with same name
« Reply #2 on: July 15, 2014, 12:31:25 am »
Thanx, qwerty, that works just fine.
But new challenge: How do I see the full name of the existing stereotype?
(I mean in script - but actually I don't see how to se it in the GUI either)

qwerty

  • EA Guru
  • *****
  • Posts: 10393
  • Karma: +229/-178
  • I'm no guru at all
    • View Profile
Re: Specify one of more stereotypes with same name
« Reply #3 on: July 15, 2014, 05:04:31 am »
The full info for the stereo is stored in t_xref. Best you create an empty EAP with just one stereotyped element and issue a SELECT * FROM t_xref- Only the MDG-stereos get that extra record in t_xref.

q

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 128
  • Karma: +1/-1
  • Business Information Architect
    • View Profile
Re: Specify one of more stereotypes with same name
« Reply #4 on: August 20, 2014, 12:38:35 am »
Thanks @qwerty.
So EA Object Model does not support testing if an element has a given stereotype with a given namespace like "CPH_MetaModel::Application"?

qwerty

  • EA Guru
  • *****
  • Posts: 10393
  • Karma: +229/-178
  • I'm no guru at all
    • View Profile
Re: Specify one of more stereotypes with same name
« Reply #5 on: August 20, 2014, 01:12:00 am »
Not directly. Stereotype/Ex don't contain the namespace from where it was derived. If you read t_xref with Type="element property" you will find the column Description  that looks like @STEREO;Name=ArchiMate_BusinessProcess;FQName=Archimate2::ArchiMate_BusinessProcess;@ENDSTEREO;


q.