Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Unable to Apply Profile to my Model
Unable to Apply Profile to my Model [message #423211] Wed, 24 September 2008 21:51 Go to next message
Roshan S. is currently offline Roshan S.Friend
Messages: 125
Registered: July 2009
Senior Member
Hi,

This might also be a UML newsgroup question but I'll try here first.
I used RSM to create a profile ("MyProfile"), to which I am now mapping to
an eCore model. When I run the mapping process and load input model. I
try to apply my profile.

I found out while debugging that isEProxy() returns true and that
eURIProxy has the profile but is not loaded. So I tried to use resolve
from EcoreUtil.


for (Profile profile : inputModel.getAllAppliedProfiles()) {
ResourceSet resourceSet = new ResourceSetImpl();
boolean proxy = profile.eIsProxy();
if(proxy){
EObject out = EcoreUtil.resolve((EObject)profile, resourceSet);
}
if(profile.getName()!=null &&
profile.getName().compareTo("MyProfile")==0){
myProfile = profile;
break;
}
}

As you can see out is not used, but also returns null as well. Does
anyone know how to load the profile correctly. I'm going crazy trying to
figure out the solution, any help would be great.

Thanks,
Roshan
Re: Unable to Apply Profile to my Model [message #423216 is a reply to message #423211] Wed, 24 September 2008 23:04 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30813
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000801040105040206030603
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Roshan,

This whole issue of apply profiles and "my profiles don't resolve"
sounds like a Frequently Asked Question to me. But a UML one, so best
to ask on the UML newsgroup *after *looking at the FAQ and at all the
documentation they have for how to apply and resolve profiles.


Roshan Soni wrote:
> Hi,
>
> This might also be a UML newsgroup question but I'll try here first.
> I used RSM to create a profile ("MyProfile"), to which I am now
> mapping to an eCore model. When I run the mapping process and load
> input model. I try to apply my profile.
>
> I found out while debugging that isEProxy() returns true and that
> eURIProxy has the profile but is not loaded. So I tried to use
> resolve from EcoreUtil.
>
>
> for (Profile profile : inputModel.getAllAppliedProfiles()) {
> ResourceSet resourceSet = new ResourceSetImpl();
> boolean proxy = profile.eIsProxy();
> if(proxy){
> EObject out = EcoreUtil.resolve((EObject)profile, resourceSet);
> }
> if(profile.getName()!=null &&
> profile.getName().compareTo("MyProfile")==0){
> myProfile = profile;
> break;
> }
> }
>
> As you can see out is not used, but also returns null as well. Does
> anyone know how to load the profile correctly. I'm going crazy trying
> to figure out the solution, any help would be great.
>
> Thanks,
> Roshan
>

--------------000801040105040206030603
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Roshan,<br>
<br>
This whole issue of apply profiles and "my profiles don't resolve"
sounds like a Frequently Asked Question to me.
Previous Topic:[Teneo] mapModel problem?
Next Topic:Elements unique identification
Goto Forum:
  


Current Time: Thu Jan 23 16:22:50 GMT 2020

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

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

Back to the top