Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Attribute derived from resource uri
Attribute derived from resource uri [message #427315] Thu, 12 February 2009 08:31 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
Hey,

I expect instances of a certain class to be serialized in a single
resource. Now, instead of giving that class a full-featured 'name'
attribute, I'd want to make 'name' volatile/non-changeable/transient and
derive it from the name of the (file)resource that the object is
contained in. As long as there's no resource, there's no name of course.
Is there anything to watch out for when doing things like this? (I'm
aware I need to take care when the object is moved into a different
resource..)


Thanks,
Felix
Re: Attribute derived from resource uri [message #427322 is a reply to message #427315] Thu, 12 February 2009 11:23 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Felix,

Comments below.

Felix Dorner wrote:
> Hey,
>
> I expect instances of a certain class to be serialized in a single
> resource. Now, instead of giving that class a full-featured 'name'
> attribute, I'd want to make 'name' volatile/non-changeable/transient
> and derive it from the name of the (file)resource that the object is
> contained in. As long as there's no resource, there's no name of course.
> Is there anything to watch out for when doing things like this? (I'm
> aware I need to take care when the object is moved into a different
> resource..)
Mark it derived as well. Is the object in the root of the resource or
nested deeper? Will you have to consider the case of the resource's URI
being set in addition to moving to a different resource?
>
>
> Thanks,
> Felix


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Attribute derived from resource uri [message #427324 is a reply to message #427322] Thu, 12 February 2009 11:37 Go to previous message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
Hi Ed,

> Mark it derived as well.
Of course.

Is the object in the root of the resource or
> nested deeper?
It's the root.

Will you have to consider the case of the resource's URI
> being set in addition to moving to a different resource?
Good point. At the moment I only set it once.
Previous Topic:problem with " load/save for Ecore models
Next Topic:MappingException when initializing the hbDataStore
Goto Forum:
  


Current Time: Thu Apr 25 20:22:30 GMT 2024

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

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

Back to the top