Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Use a UML model with a profile
Use a UML model with a profile [message #477552] Tue, 24 June 2008 12:08 Go to next message
Eclipse UserFriend
Originally posted by: kfestz.no-spam.com

Hi,

I'm trying to use a UML model with a profile programatically in a
standalone app.
My app does a model-to-model transformation in ATL.
So I don't use EMF directly but ATL does, and I have access to the
ResourceSet.
In my model I have some references to a profile :

xsi:schemaLocation="http:///schemas/Test/_UiwQwDhYEd2PFcRE_i9KZg/0
Test.profile.uml#_UjU4gDhYEd2PFcRE_i9KZg">

<references xmi:type="ecore:EPackage"
href="Test.profile.uml#_UjU4gDhYEd2PFcRE_i9KZg"/>

<appliedProfile href="Test.profile.uml#_JotlEDhYEd2PFcRE_i9KZg"/>

My profile 'Test.profile.uml' is in the same folder as my model.
That's why the references in my model consist only of the name of the
file. But when I try to load my model, by means of the ATL API, an
exception is raised :
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with
uri 'http:///schemas/Test/_UiwQwDhYEd2PFcRE_i9KZg/0' not found.
( file:///D:/Stage/eclipse-modeling-ganymede-RC1-win32/workspa ce/LaunchAtlUml/A,
23, 93)

So the profile is not seen because apparently my app doesn't look for it
in the folder where my model is. If I change the profile reference to a
path like '/C:/MyPath/Test.profile.uml, it works fine.
So I tries a lot of things with the URIConverter but nothing seems to
work. How can I make EMF looks into the folder where my model is to find
my profile?
Re: Use a UML model with a profile [message #477556 is a reply to message #477552] Thu, 26 June 2008 17:54 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi John,

Have a look at
http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_2. 0_Migration_Guide/guide.html
toward the bottom at the section entitled "programmatic migration".

That shows how to work with a stand-alone app.
Let us know if you still have issues.

Cheers,
- James.


"John Kfestz" <kfestz@no-spam.com> wrote in message
news:g3qo32$8p6$1@build.eclipse.org...
> Hi,
>
> I'm trying to use a UML model with a profile programatically in a
> standalone app.
> My app does a model-to-model transformation in ATL.
> So I don't use EMF directly but ATL does, and I have access to the
> ResourceSet.
> In my model I have some references to a profile :
>
> xsi:schemaLocation="http:///schemas/Test/_UiwQwDhYEd2PFcRE_i9KZg/0
> Test.profile.uml#_UjU4gDhYEd2PFcRE_i9KZg">
>
> <references xmi:type="ecore:EPackage"
> href="Test.profile.uml#_UjU4gDhYEd2PFcRE_i9KZg"/>
>
> <appliedProfile href="Test.profile.uml#_JotlEDhYEd2PFcRE_i9KZg"/>
>
> My profile 'Test.profile.uml' is in the same folder as my model.
> That's why the references in my model consist only of the name of the
> file. But when I try to load my model, by means of the ATL API, an
> exception is raised :
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with
> uri 'http:///schemas/Test/_UiwQwDhYEd2PFcRE_i9KZg/0' not found.
> ( file:///D:/Stage/eclipse-modeling-ganymede-RC1-win32/workspa ce/LaunchAtlUml/A,
> 23, 93)
>
> So the profile is not seen because apparently my app doesn't look for it
> in the folder where my model is. If I change the profile reference to a
> path like '/C:/MyPath/Test.profile.uml, it works fine.
> So I tries a lot of things with the URIConverter but nothing seems to
> work. How can I make EMF looks into the folder where my model is to find
> my profile?
Re: Use a UML model with a profile [message #626747 is a reply to message #477552] Thu, 26 June 2008 17:54 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi John,

Have a look at
http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_2. 0_Migration_Guide/guide.html
toward the bottom at the section entitled "programmatic migration".

That shows how to work with a stand-alone app.
Let us know if you still have issues.

Cheers,
- James.


"John Kfestz" <kfestz@no-spam.com> wrote in message
news:g3qo32$8p6$1@build.eclipse.org...
> Hi,
>
> I'm trying to use a UML model with a profile programatically in a
> standalone app.
> My app does a model-to-model transformation in ATL.
> So I don't use EMF directly but ATL does, and I have access to the
> ResourceSet.
> In my model I have some references to a profile :
>
> xsi:schemaLocation="http:///schemas/Test/_UiwQwDhYEd2PFcRE_i9KZg/0
> Test.profile.uml#_UjU4gDhYEd2PFcRE_i9KZg">
>
> <references xmi:type="ecore:EPackage"
> href="Test.profile.uml#_UjU4gDhYEd2PFcRE_i9KZg"/>
>
> <appliedProfile href="Test.profile.uml#_JotlEDhYEd2PFcRE_i9KZg"/>
>
> My profile 'Test.profile.uml' is in the same folder as my model.
> That's why the references in my model consist only of the name of the
> file. But when I try to load my model, by means of the ATL API, an
> exception is raised :
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with
> uri 'http:///schemas/Test/_UiwQwDhYEd2PFcRE_i9KZg/0' not found.
> ( file:///D:/Stage/eclipse-modeling-ganymede-RC1-win32/workspa ce/LaunchAtlUml/A,
> 23, 93)
>
> So the profile is not seen because apparently my app doesn't look for it
> in the folder where my model is. If I change the profile reference to a
> path like '/C:/MyPath/Test.profile.uml, it works fine.
> So I tries a lot of things with the URIConverter but nothing seems to
> work. How can I make EMF looks into the folder where my model is to find
> my profile?
Previous Topic:Diagram -> Model -> Diagram - how to do this?
Next Topic:Loading a uml model with a profile (in an ATL transformation)
Goto Forum:
  


Current Time: Fri Apr 26 13:48:42 GMT 2024

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

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

Back to the top