Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » to deletion
to deletion [message #1262133] Mon, 03 March 2014 09:45 Go to next message
Areq Novak is currently offline Areq NovakFriend
Messages: 12
Registered: March 2014
Junior Member
to deletion

[Updated on: Mon, 03 March 2014 13:59]

Report message to a moderator

Re: How to convert java String to org.eclipse.emf.common.util.URI ? [message #1262361 is a reply to message #1262133] Mon, 03 March 2014 14:59 Go to previous message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
On 03/03/2014 14:51, Michal Wlodarczyk wrote:
> Hi,
>
> Exist any possibility to convert java String to
> org.eclipse.emf.common.util.URI ?
>
> for example:
>
> it works fine: Resource resource =
> resourceSet.createResource(URI.createURI("artefactModel.json"));
>
> (I read resource from file)
>
> but I want create resource from String:
>
> URI.createURI("{\"value\" : \"test2\", \"name\" : \"test1\"}")
>
> thanks
> Mike
>
Are you confusing content (the stuff in your last line of sample code),
from identification (the URI)? Because on the top you say: You want to
convert String to URI. That's one of the URI.create(...). On the bottom
it looks like you want to feed "content" to the URI method, which makes
no sense. To do what you want, you need to create (or reuse) a custom
Resource implementation that's able to read json or yaml or newspeak.
Previous Topic:DynamicEStoreEObjectImpl intended usage
Next Topic:[Xcore] How to model assignments in operations
Goto Forum:
  


Current Time: Fri Apr 26 17:19:38 GMT 2024

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

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

Back to the top