Skip to main content



      Home
Home » Modeling » EMF » How to convert a URI to another URI format(I want to save project in URI format that I want, but failed. )
How to convert a URI to another URI format [message #1620074] Mon, 16 February 2015 20:31 Go to next message
Eclipse UserFriend
I want to save URI in the format below.
" href="MARTE.profile.xml#_3SSvMKqXEeSeJNQQRi89ZA""

However, the result is like below.
"href="../git/learning-uml2/src/main/resources/papyrus/MARTE.profile.uml#_3SSvMKqXEeSeJNQQRi89ZA""

My source code is below.

URI uri = URI.createFileURI(filename);
resource.setURI(uri);
resource.save(null);

Thanks.
Re: How to convert a URI to another URI format [message #1620450 is a reply to message #1620074] Tue, 17 February 2015 02:39 Go to previous message
Eclipse UserFriend
What is the URI of the referencing resource? Generally you should
expect the referenced resource's URI to be relative to that...

On 17.02.2015 02:31, yi zhou wrote:
> I want to save URI in the format below.
> " href="MARTE.profile.xml#_3SSvMKqXEeSeJNQQRi89ZA""
>
> However, the result is like below.
> "href="../git/learning-uml2/src/main/resources/papyrus/MARTE.profile.uml#_3SSvMKqXEeSeJNQQRi89ZA""
>
>
> My source code is below.
>
> URI uri = URI.createFileURI(filename);
> resource.setURI(uri);
> resource.save(null);
>
> Thanks.
Previous Topic:How to achieve selecting impl of interface
Next Topic: [CDO] How to start CDO Server as OSGi bundles (no eclipse product)
Goto Forum:
  


Current Time: Sun Jul 13 14:26:28 EDT 2025

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

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

Back to the top