Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Retrieving a Profile through a ProfileApplication
Retrieving a Profile through a ProfileApplication [message #472897] Sun, 13 May 2007 18:54 Go to next message
Andrew Carton is currently offline Andrew CartonFriend
Messages: 104
Registered: July 2009
Senior Member
Hi,

I have exported my model from magicdraw. It has a number of profiles
attached including one I created. When I open up the uml file in the
tree editor, I can see the reference to my profile as a profile
Application. I am however, unable to retrieve the profile.

Profile profile = model.getAppliedProfile("MyProfile", true);

This returns null.

System.out.println(model.getAppliedProfiles());

returns (along with the other MD profiles which I excluded)
[ org.eclipse.uml2.uml.internal.impl.ProfileImpl@fa88fb (eProxyURI:
MyProfile.profile.uml#_DNHRNwF5EdyEG6fRrQ6shQ)]

Tried a number of other things unsuccessfully. There doesn't even appear
to register any stereotypes on the items that I can see are applied
through the uml graph editor. A profile application has been changed
from a package import to a directrelationship from previous uml
versions, so how do I go about "getting at" the actual profile?

Thanks,
Andrew.
Re: Retrieving a Profile through a ProfileApplication [message #472899 is a reply to message #472897] Mon, 14 May 2007 12:40 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Andrew,

It appears that the model has a proxy (reference) to the profile that isn't
being resolved. Can you confirm that a 'MyProfile.profile.uml' resource does
in fact exist (in the same folder/location as the model) and that it
contains a profile with an identifer of '_DNHRNwF5EdyEG6fRrQ6shQ'?

Kenn

"Andrew Carton" <cartona@cs.tcd.ie> wrote in message
news:f27mti$o8v$1@build.eclipse.org...
> Hi,
>
> I have exported my model from magicdraw. It has a number of profiles
> attached including one I created. When I open up the uml file in the tree
> editor, I can see the reference to my profile as a profile Application. I
> am however, unable to retrieve the profile.
>
> Profile profile = model.getAppliedProfile("MyProfile", true);
>
> This returns null.
>
> System.out.println(model.getAppliedProfiles());
>
> returns (along with the other MD profiles which I excluded)
> [ org.eclipse.uml2.uml.internal.impl.ProfileImpl@fa88fb (eProxyURI:
> MyProfile.profile.uml#_DNHRNwF5EdyEG6fRrQ6shQ)]
>
> Tried a number of other things unsuccessfully. There doesn't even appear
> to register any stereotypes on the items that I can see are applied
> through the uml graph editor. A profile application has been changed from
> a package import to a directrelationship from previous uml versions, so
> how do I go about "getting at" the actual profile?
>
> Thanks,
> Andrew.
Re: Retrieving a Profile through a ProfileApplication [message #472903 is a reply to message #472899] Mon, 14 May 2007 17:05 Go to previous message
Andrew Carton is currently offline Andrew CartonFriend
Messages: 104
Registered: July 2009
Senior Member
Kenn,

I was loading the file like URI.createURI("inputmodel/MyUMLFile.uml");
The profile was in the inputmodel directory too. It doesn't seem to be
relative to the uml file position rather relative to the actual
executable. So when I put all the files in the root directory and just
used "MyUMLFile.uml" it appeared to work!

Thanks Kenn, as usual you are a really big help!

Andrew.

Kenn Hussey wrote:
> Andrew,
>
> It appears that the model has a proxy (reference) to the profile that isn't
> being resolved. Can you confirm that a 'MyProfile.profile.uml' resource does
> in fact exist (in the same folder/location as the model) and that it
> contains a profile with an identifer of '_DNHRNwF5EdyEG6fRrQ6shQ'?
>
> Kenn
>
> "Andrew Carton" <cartona@cs.tcd.ie> wrote in message
> news:f27mti$o8v$1@build.eclipse.org...
>> Hi,
>>
>> I have exported my model from magicdraw. It has a number of profiles
>> attached including one I created. When I open up the uml file in the tree
>> editor, I can see the reference to my profile as a profile Application. I
>> am however, unable to retrieve the profile.
>>
>> Profile profile = model.getAppliedProfile("MyProfile", true);
>>
>> This returns null.
>>
>> System.out.println(model.getAppliedProfiles());
>>
>> returns (along with the other MD profiles which I excluded)
>> [ org.eclipse.uml2.uml.internal.impl.ProfileImpl@fa88fb (eProxyURI:
>> MyProfile.profile.uml#_DNHRNwF5EdyEG6fRrQ6shQ)]
>>
>> Tried a number of other things unsuccessfully. There doesn't even appear
>> to register any stereotypes on the items that I can see are applied
>> through the uml graph editor. A profile application has been changed from
>> a package import to a directrelationship from previous uml versions, so
>> how do I go about "getting at" the actual profile?
>>
>> Thanks,
>> Andrew.
>
>
Re: Retrieving a Profile through a ProfileApplication [message #615852 is a reply to message #472897] Mon, 14 May 2007 12:40 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Andrew,

It appears that the model has a proxy (reference) to the profile that isn't
being resolved. Can you confirm that a 'MyProfile.profile.uml' resource does
in fact exist (in the same folder/location as the model) and that it
contains a profile with an identifer of '_DNHRNwF5EdyEG6fRrQ6shQ'?

Kenn

"Andrew Carton" <cartona@cs.tcd.ie> wrote in message
news:f27mti$o8v$1@build.eclipse.org...
> Hi,
>
> I have exported my model from magicdraw. It has a number of profiles
> attached including one I created. When I open up the uml file in the tree
> editor, I can see the reference to my profile as a profile Application. I
> am however, unable to retrieve the profile.
>
> Profile profile = model.getAppliedProfile("MyProfile", true);
>
> This returns null.
>
> System.out.println(model.getAppliedProfiles());
>
> returns (along with the other MD profiles which I excluded)
> [ org.eclipse.uml2.uml.internal.impl.ProfileImpl@fa88fb (eProxyURI:
> MyProfile.profile.uml#_DNHRNwF5EdyEG6fRrQ6shQ)]
>
> Tried a number of other things unsuccessfully. There doesn't even appear
> to register any stereotypes on the items that I can see are applied
> through the uml graph editor. A profile application has been changed from
> a package import to a directrelationship from previous uml versions, so
> how do I go about "getting at" the actual profile?
>
> Thanks,
> Andrew.
Re: Retrieving a Profile through a ProfileApplication [message #615861 is a reply to message #472899] Mon, 14 May 2007 17:05 Go to previous message
Andrew Carton is currently offline Andrew CartonFriend
Messages: 104
Registered: July 2009
Senior Member
Kenn,

I was loading the file like URI.createURI("inputmodel/MyUMLFile.uml");
The profile was in the inputmodel directory too. It doesn't seem to be
relative to the uml file position rather relative to the actual
executable. So when I put all the files in the root directory and just
used "MyUMLFile.uml" it appeared to work!

Thanks Kenn, as usual you are a really big help!

Andrew.

Kenn Hussey wrote:
> Andrew,
>
> It appears that the model has a proxy (reference) to the profile that isn't
> being resolved. Can you confirm that a 'MyProfile.profile.uml' resource does
> in fact exist (in the same folder/location as the model) and that it
> contains a profile with an identifer of '_DNHRNwF5EdyEG6fRrQ6shQ'?
>
> Kenn
>
> "Andrew Carton" <cartona@cs.tcd.ie> wrote in message
> news:f27mti$o8v$1@build.eclipse.org...
>> Hi,
>>
>> I have exported my model from magicdraw. It has a number of profiles
>> attached including one I created. When I open up the uml file in the tree
>> editor, I can see the reference to my profile as a profile Application. I
>> am however, unable to retrieve the profile.
>>
>> Profile profile = model.getAppliedProfile("MyProfile", true);
>>
>> This returns null.
>>
>> System.out.println(model.getAppliedProfiles());
>>
>> returns (along with the other MD profiles which I excluded)
>> [ org.eclipse.uml2.uml.internal.impl.ProfileImpl@fa88fb (eProxyURI:
>> MyProfile.profile.uml#_DNHRNwF5EdyEG6fRrQ6shQ)]
>>
>> Tried a number of other things unsuccessfully. There doesn't even appear
>> to register any stereotypes on the items that I can see are applied
>> through the uml graph editor. A profile application has been changed from
>> a package import to a directrelationship from previous uml versions, so
>> how do I go about "getting at" the actual profile?
>>
>> Thanks,
>> Andrew.
>
>
Previous Topic:Behavior and Profiles in metamodeling
Next Topic:Component removal.
Goto Forum:
  


Current Time: Fri Apr 26 16:55:42 GMT 2024

Powered by FUDForum. Page generated in 0.03386 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top