Path patterns enable to add edge (or path more generally) predicates between node patterns.
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:
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 relationThere 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:
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.
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.
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).
Analog to acropetal pattern in the opposite direction.