Book a Demo

Author Topic: Stereotype Apply Type = <All>???  (Read 24796 times)

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Stereotype Apply Type = <All>???
« on: November 22, 2021, 06:39:19 am »
Heyo

If you take a look in the Archetype Modelling Language MDG (File Name AML), it shows the following apply type.
The profile helpers certainly don't offer it as an option (at least not as far as I can see).

So, does anyone know what this does?

<Stereotype name="IdentifiedItem" notes="">
            <AppliesTo>
              <Apply type="&lt;All&gt;"/>
            </AppliesTo>

Cheers

Jays :-)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Stereotype Apply Type = <All>???
« Reply #1 on: November 22, 2021, 10:27:15 am »
Can't confirm or deny. But the & seems to be used at random. I had other cases where EA mixed the use of &-notation with plain text in quotes. EA it is...

q.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Stereotype Apply Type = <All>???
« Reply #2 on: November 22, 2021, 10:34:22 am »
Hmmm

I am doing some in depth testing of my utility to make sure it can "Import" all the standard MDG files that come with Sparx.
In the case of the Archetype Modelling Language (AML), it fails on this because I was unaware of this odd ball thing when I wrote the code.

Strangely, it ONLY appears in the AML language, which seems to have been deprecated since I cannot see it as one of the standard MDGs when I choose to Add Diagram.

Eve? KP?

Cheers :-)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Stereotype Apply Type = <All>???
« Reply #3 on: November 22, 2021, 10:39:37 am »
Well, to be on the safe side you need to conform to XML standards. And these allow (and it's preferred in many cases) to use the &-notation. Your language of choice should offer sufficient de-marshalling operations.

q.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Stereotype Apply Type = <All>???
« Reply #4 on: November 22, 2021, 10:41:41 am »
Thanks for that.

Yeah, I've got it properly decoding to <All> from &ltAll&gt.

Still need to figure out what this whole All thing means.

LOL!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Stereotype Apply Type = <All>???
« Reply #5 on: November 22, 2021, 12:27:24 pm »
It might be a bug, simply. The <all> is found in the drop down of the "wild" stereotypes of EA. And the stereotype then can be applied to all metaclasses. Not sure if that is something "official".

q.

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Stereotype Apply Type = <All>???
« Reply #6 on: November 24, 2021, 09:08:59 am »
Hey q

What do you mean by:

The <all> is found in the drop down of the "wild" stereotypes of EA.

Where do I find this?

Cheers :-)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Stereotype Apply Type = <All>???
« Reply #7 on: November 24, 2021, 09:42:30 am »
Configure/Ref Data/UML Types. The first entry in Base Class.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Stereotype Apply Type = <All>???
« Reply #8 on: November 25, 2021, 08:05:11 am »
Strangely, it ONLY appears in the AML language, which seems to have been deprecated since I cannot see it as one of the standard MDGs when I choose to Add Diagram.

Set perspective to Information Exchange > Archetype AML


Regarding the metaclass '<All>', it is the equivalent to 'Element', the UML base metaclass from which all others are specialized. I believe we added '<All>' before we added the ability to extend abstract metaclasses. Either should now work, but 'Element' would be preferred.

And regarding '&lt;' and '&gt;' as you have realized, you can't put '<' or '>' in a string in XML and they need to be encoded. Other characters that need to be encoded are " and & (&quot; and &amp;). Always have an XML string decoding function handy.
The Sparx Team
[email protected]

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Stereotype Apply Type = <All>???
« Reply #9 on: November 28, 2021, 09:00:33 pm »
Thanks for that KP.
With regards to the XML encoding, yeah I have totally outsourced that to a library.