Graphical Query Tool - Nested Components

So the structure of my SOI is something like below :

  • SOI
    – SubSystem_1
    — SubSystemComponent_1
    — SubSystemComponent_2
    ---- SubSystemSubComponent_1
    ---- SubSystemSubComponent_2
    — SubSystemComponent_3
    … and so on.
    Using the query tool I can chain LogicalComponent parameters and extract their ownedLogicalComponent. However I got two problems:
  1. With the given exemple, if I extract SOI -> ownedLogicalComponent -> ownedLogicalComponent, only SubSystemComponent_2 will be displayed because it’s the only one with ownedLogicalComponents, but I need to extract other subsystems components.
  2. With this approach I need to know in advance the nested depths of my components. Is it possible to have a recursive / loop approach ?
    Best Regards.
    Mehdi Belatrous