Show only parent nodes. [message #1804450] |
Tue, 26 March 2019 10:36 |
Bushra Harraq Messages: 5 Registered: February 2019 |
Junior Member |
|
|
Hi,
in the follwing the metamodel constellation is documented:
http://prntscr.com/n32fnd
To get all the Processes:
Now, I want to show all node, which don't have a parent Process. Here is my approach, which does not work. Please correct me.
aql: self.process -> select(myProcess | myProcess.eInverse(subProcesses) -> size = 0)
Thank you,
Bushra
[Updated on: Tue, 26 March 2019 13:12] Report message to a moderator
|
|
|
Re: Show only parent nodes. [message #1804476 is a reply to message #1804450] |
Tue, 26 March 2019 14:28 |
|
Hi Bushra,
The AQL documentation can be found here: https://www.eclipse.org/acceleo/documentation/
There are several eInverse method with or without parameters:
- eInverse() (no parameter) : returns any element which as a relationship with the current one
- eInverse(packageName::EClassName) : returns only instances of the given type.
- eInverse('featureName') : more explicit and query for a specific reference name
Please also note that
- -> isEmpty is equivalent to -> size() = 0
- the opposites would be myEelement.ref1.ref2 -> size() <> 0 or not (myElement.ref1.ref2 -> isEmpty())
In your case, you should try:
aql: self.process -> select(myProcess | myProcess.eInverse('subProcesses') -> isEmpty())
Regards,
Maxime Porhel - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.03250 seconds