Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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] Tue, 17 February 2015 01:31 Go to next message
yi zhou is currently offline yi zhouFriend
Messages: 2
Registered: February 2015
Junior Member
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 07:39 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
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.


Ed Merks
Professional Support: https://www.macromodeling.com/
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: Sat Apr 20 04:42:18 GMT 2024

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

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

Back to the top