Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » getting a feature from an URI
getting a feature from an URI [message #425448] Wed, 26 November 2008 15:00 Go to next message
Sven Krause is currently offline Sven KrauseFriend
Messages: 64
Registered: July 2009
Member
Hi,

I need to persist a feature somewhere as string. So I've used
EcoreUtil.getURI(feature) and got
http://mynamespace#//EClass/EStructuralFeature. Thats perfect. Is the as
well a convenient way to get the feature from the uri? May I use the
resource set to get the object from from?

Sven
Re: getting a feature from an URI [message #425450 is a reply to message #425448] Wed, 26 November 2008 15:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Sven,

Comments below.

Sven Krause wrote:
> Hi,
>
> I need to persist a feature somewhere as string. So I've used
> EcoreUtil.getURI(feature) and got
> http://mynamespace#//EClass/EStructuralFeature. Thats perfect.
Why not have an EReference of type EStructuralFeature?
> Is the as
> well a convenient way to get the feature from the uri?
ResourceSet.getEObject should do the trick.
> May I use the
> resource set to get the object from from?
>
Yes.
> Sven
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: getting a feature from an URI [message #425484 is a reply to message #425450] Thu, 27 November 2008 09:11 Go to previous message
Sven Krause is currently offline Sven KrauseFriend
Messages: 64
Registered: July 2009
Member
Thanks Ed,


Ed Merks wrote:
> Sven,
>
> Comments below.
>
> Sven Krause wrote:
>> Hi,
>>
>> I need to persist a feature somewhere as string. So I've used
>> EcoreUtil.getURI(feature) and got
>> http://mynamespace#//EClass/EStructuralFeature. Thats perfect.
> Why not have an EReference of type EStructuralFeature?
Sure. There is the concrete feature name addressed. It was just a sample.
>> Is the as
>> well a convenient way to get the feature from the uri?
> ResourceSet.getEObject should do the trick.
>> May I use the
>> resource set to get the object from from?
>>
> Yes.
>> Sven
>>
Previous Topic:Notifications Problem
Next Topic:DeleteCommand
Goto Forum:
  


Current Time: Sat Apr 20 03:08:12 GMT 2024

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

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

Back to the top