Navigating through aql when starting from an ecore::EAttribute

Hello
Don’t know if this is doable or not.
Let’s say I have the following EAttribute:
image

I found it impossible to obtain the value of this attribute from this attrbute:

  • eInverse() does not work, I could get to the original object (its name happen to be “origin” here), I mean i used eInverse(class of origin), it would not work.
  • the attributes of THIS attribute were of no help:
    image
  • eAllSuperTypes might not help.

Is there anyway to obtain the value of the attribute (here id would be (3a106ac6-2d73-4fd8-9e68-3ff583071791)), when you have the “EAttribute” as a starting point in your aql call.

I guess not?
__

My goal?
Is to obtain the value of all (eAllStructuralFeatures) without having to write the name of the attribute next to the element you are studying, if that makes sens?
In other words I want to find an aql call that gives you a Sequence containing this:

Object.eAllStructuralFeaturesOfCurrentObject.values

You should be able to do something like:

eObject.eGet(eAttribute.name)

But this return an Object and after this AQL will not be able to infer the correct type. You will probably need to use .oclAsType() or ->filter() to help AQL validation.

1 Like