major
nice-to-have
defect
major
enhancement
The existing ConfiguredEdgeBuilder assumes that there is a dedicated object for each edge in the model (which, in turn, has source and target references). For the simpler case where one wants to map a reference assignment (object A` references objects `B and C` in its reference `r`) as edges A-r->B and A-r->C, there is no adequate configurational option.
Analysis
In practice, this functionality already exists: Within the context of a Node Builder, you can use `<edges> ` to configure a ` ConfiguredReferenceBinding ` and specify a function there that calculates the target nodes.
Application
New: A symmetric builder that constructs reference edges between nodes, producing both outgoing and incoming edges of a partially represented graph:
#!xml <referenceEdgeBuilder predicate="model -> node -> $node.instanceOf(`tl.graph.demo:AtomicNode`)" predecessors="model -> node -> $node.referers(`tl.graph.demo:AtomicNode#other`)" successors="model -> node -> $node.get(`tl.graph.demo:AtomicNode#other`)" />
Test
- In tl-graph-demo, the one-to-one reference ` other ` is now also displayed as an edge. A ` referenceEdgeBuilder ` is used for this reference.