Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Where did getAppliedVersion and applyProfile move to?
Where did getAppliedVersion and applyProfile move to? [message #473053] Wed, 30 May 2007 19:31 Go to next message
Paul Smith is currently offline Paul Smith
Messages: 10
Registered: July 2009
Junior Member
We are currently migrating from IBM Rational Software Architect 6.x to 7.x
and have noticed that getAppliedVersion(Stereotype) and
applyProfile(Stereotype) methods have been removed from the Element
interface. Can someone tell me where they went to or how it should be done
now?
Re: Where did getAppliedVersion and applyProfile move to? [message #473076 is a reply to message #473053] Fri, 01 June 2007 09:32 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn Hussey
Messages: 1618
Registered: July 2009
Senior Member
Paul,

The concept of a formal profile/stereotype version was removed from the API
as of UML2 2.0. The reasoning behind this was that it's really the namespace
URI that should uniquely identify a specific profile version, and UML2 can't
always assume what the format of the URI will be (although guidelines are
provided by the UML specification) - if a profile is stereotyped as
<<ePackage>> the value of the 'nsURI' tag is used as the URI; otherwise, one
is automatically generated for you, and happens to have a trailing integer
(what used to be the "version") that gets incremented with each definition.
You can compare the "versions" of two different applied stereotypes by
obtaining their profile definitions from the profile applications
(ProfileApplication#getAppliedDefinition(NamedElement)) and then obtaining
the namespace URIs from the returned Ecore packages (EPackage#getNsURI()),
possibly introspecting the URIs to look for specific version information...

I'm not sure which method you are referring to by
'applyProfile(Stereotype)', as there was no such method in UML2 1.x...
Perhaps you are looking for Element#applyStereotype(Stereotype) or
Package#applyProfile(Profile)?

Kenn

"Paul Smith" <paulsm@mincom.com> wrote in message
news:5e2535075e00e830fc7cc5f8a847f476$1@www.eclipse.org...
> We are currently migrating from IBM Rational Software Architect 6.x to 7.x
> and have noticed that getAppliedVersion(Stereotype) and
> applyProfile(Stereotype) methods have been removed from the Element
> interface. Can someone tell me where they went to or how it should be done
> now?
>
Re: Where did getAppliedVersion and applyProfile move to? [message #473085 is a reply to message #473053] Fri, 01 June 2007 14:47 Go to previous message
james bruck is currently offline james bruck
Messages: 1724
Registered: July 2009
Senior Member
Hi Paul,

As a side note, there is a feature in RSA7 that will migrate usage of the
opensource api in your code.
You select the code you want to modify then select the "api migrate" feature
and it will refactor your code.

- James.


"Paul Smith" <paulsm@mincom.com> wrote in message
news:5e2535075e00e830fc7cc5f8a847f476$1@www.eclipse.org...
> We are currently migrating from IBM Rational Software Architect 6.x to 7.x
> and have noticed that getAppliedVersion(Stereotype) and
> applyProfile(Stereotype) methods have been removed from the Element
> interface. Can someone tell me where they went to or how it should be done
> now?
>
Re: Where did getAppliedVersion and applyProfile move to? [message #619440 is a reply to message #473053] Fri, 01 June 2007 09:32 Go to previous message
Kenn Hussey is currently offline Kenn Hussey
Messages: 1618
Registered: July 2009
Senior Member
Paul,

The concept of a formal profile/stereotype version was removed from the API
as of UML2 2.0. The reasoning behind this was that it's really the namespace
URI that should uniquely identify a specific profile version, and UML2 can't
always assume what the format of the URI will be (although guidelines are
provided by the UML specification) - if a profile is stereotyped as
<<ePackage>> the value of the 'nsURI' tag is used as the URI; otherwise, one
is automatically generated for you, and happens to have a trailing integer
(what used to be the "version") that gets incremented with each definition.
You can compare the "versions" of two different applied stereotypes by
obtaining their profile definitions from the profile applications
(ProfileApplication#getAppliedDefinition(NamedElement)) and then obtaining
the namespace URIs from the returned Ecore packages (EPackage#getNsURI()),
possibly introspecting the URIs to look for specific version information...

I'm not sure which method you are referring to by
'applyProfile(Stereotype)', as there was no such method in UML2 1.x...
Perhaps you are looking for Element#applyStereotype(Stereotype) or
Package#applyProfile(Profile)?

Kenn

"Paul Smith" <paulsm@mincom.com> wrote in message
news:5e2535075e00e830fc7cc5f8a847f476$1@www.eclipse.org...
> We are currently migrating from IBM Rational Software Architect 6.x to 7.x
> and have noticed that getAppliedVersion(Stereotype) and
> applyProfile(Stereotype) methods have been removed from the Element
> interface. Can someone tell me where they went to or how it should be done
> now?
>
Re: Where did getAppliedVersion and applyProfile move to? [message #619673 is a reply to message #473053] Fri, 01 June 2007 14:47 Go to previous message
james bruck is currently offline james bruck
Messages: 1724
Registered: July 2009
Senior Member
Hi Paul,

As a side note, there is a feature in RSA7 that will migrate usage of the
opensource api in your code.
You select the code you want to modify then select the "api migrate" feature
and it will refactor your code.

- James.


"Paul Smith" <paulsm@mincom.com> wrote in message
news:5e2535075e00e830fc7cc5f8a847f476$1@www.eclipse.org...
> We are currently migrating from IBM Rational Software Architect 6.x to 7.x
> and have noticed that getAppliedVersion(Stereotype) and
> applyProfile(Stereotype) methods have been removed from the Element
> interface. Can someone tell me where they went to or how it should be done
> now?
>
Previous Topic:OCL Constraints within UML2
Next Topic:update problem with Bidirectional composite aggregation
Goto Forum:
  


Current Time: Fri Aug 01 07:51:32 EDT 2014

Powered by FUDForum. Page generated in 0.01587 seconds