Differences in URI values [message #1751843] |
Mon, 16 January 2017 07:39  |
chris yo Messages: 146 Registered: February 2013 |
Senior Member |
|
|
I want to get the URI of my data.
So, I have this object called x.
I noticed that I can get the URI in different ways.
[1] x.eContainingFeature.eContainer.eResource.URI
[2] x.eResource.URI
[3] x.eContainer.eResource.URI
What are the differences of these 3 URI values? Should I expect them to always contain the same values?
[Updated on: Mon, 16 January 2017 07:40] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Differences in URI values [message #1752029 is a reply to message #1752025] |
Wed, 18 January 2017 03:45  |
Ed Merks Messages: 32819 Registered: July 2009 |
Senior Member |
|
|
No, this isn't a safe general assumption. The first is the feature of the container of x that actually contains x, i.e., you could call x.eContainer.eGet(x.eContainingFeature) and expect to find x in the result. The second is the feature that contains the container of x. They might be the same feature, but generally not because generally the container will have a completely different set of features because it's a completely different class of object.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03316 seconds