Use a UML model with a profile [message #477552] |
Tue, 24 June 2008 12:08 |
Eclipse User |
|
|
|
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 |
james bruck 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 |
james bruck 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?
|
|
|
Powered by
FUDForum. Page generated in 0.03405 seconds