User Tools

Site Tools


01_user_documentation:07_rgg_xl:02_xl:03_query:01_predicate:02_path

Path pattern

Path patterns enable to add edge (or path more generally) predicates between node patterns.

Implicit

The XL language defines two implicit edge patterns, whitespace and brackets. These patterns bound two nodes such as: the left node is bound as source of the edge, and the right node is bound as target. The patterns then are defined as:

  • whitespace: an edge pattern with the successor type.
  • [: an edge pattern with the branch type.

Explicit

Explicit edge patterns are declared with:

  • -r->: directed relation from left to right
  • <-r-: directed relation from right to left
  • -r-: undirected relation
  • <-r->: bidirectional relation

→ Read more...

Standard edges

There are four types of edge standard types, which have a specific notation for each of: directed right, left, undirected, and bidirectional. The four types are:

  • Any type: with the symbols --> , <-- , -- , <-->
  • Successor: with the symbols > , < , --- , <->
  • Branch: with the symbols +> , <+ , -+- , <+>
  • Refinement: with the symbols /> , </ , -/- , </>

Binary

Binary predicates for path patterns are boolean methods that takes two Nodes as arguments. The method is tested against the two nodes left and right in the query when used as predicate. The two nodes do not have to be directly connected.

→ Read more...

Node function

Method that return either a Node or a Node generator can be used as path pattern. The method needs to have at least one argument, and its first argument must be of type Node (or extend Node). Then, the path pattern use the Node pattern on the left and test if it can be matched with the Node pattern on the right.

→ Read more...

Acropetal pattern

The acropetal pattern is specifically designed for acropetal transport in plants following this structure:

in -acropetal(Child.class,child,Leaf.class,leaf)-> out

I queries the graph in a way that starts at the in node and travels forward to all possible out node. It additionally provides for each match two VoidToObjectGenerators (here named child and leaf) as query variables. These two generators provide the first instance of the given classes on all possible paths from the node forward, hereby describes the first argument (Child.class) the class for the first VoidToObjectGenerator (child) and the third argument (Leaf.class) the class for the second VoidToObjectGenerator (leaf).

→ Read more...

Basipetal pattern

Analog to acropetal pattern in the opposite direction.

01_user_documentation/07_rgg_xl/02_xl/03_query/01_predicate/02_path.txt · Last modified: 2025/08/22 13:40 by gaetan