Node
- class Node
Proxy to a node in the graph.
Provides access to the node’s attributes and components.
Members defined in
Node(11 members)
RAnnotation contents for note-shaped nodes.
RFeature direction, or
Noneif not aFeatureor undirected.
RSource element this node was constructed from.
RTyped node ID of this node.
RWhether this node has been lifted from outside this graph, or is inherited.
RLabel parts for this node.
RParent node, or
Nonefor root nodes.
Child nodes.
Structural style of the edge from
parentto this node if any.
Structural style of this node.
Attributes
- property annotation: syside.experimental.viz.TextAnnotation | syside.experimental.viz.Code | syside.experimental.viz.Metadata | None
Annotation contents for note-shaped nodes.
- property direction: syside.FeatureDirectionKind | None
Feature direction, or
Noneif not aFeatureor undirected.
- property element: syside.Element | None
Source element this node was constructed from.
This is only provided for convenience as the graph contains all the data needed for visualization.
- property id: syside.experimental.viz.NodeID
Typed node ID of this node.
- property is_lifted: bool
Whether this node has been lifted from outside this graph, or is inherited.
This primarily applies to inherited features which are linked via edges to existing nodes. Instead of having an edge target the exact feature in a base class, the feature is instead “lifted” to the type that inherits it, e.g. when chaining features. This makes the linked feature scope explicit, and matches the source text better.
- property label: syside.experimental.viz.Label
Label parts for this node.
- property parent: syside.experimental.viz.Node | None
Parent node, or
Nonefor root nodes.
Methods
- __str__() str
- children() list[syside.experimental.viz.Node]
Child nodes.
- parent_edge_style() syside.experimental.viz.EdgeStyle | None
Structural style of the edge from
parentto this node if any.Such edges are always unnamed, implied through the hierarchy, and not required in some visualizations. For these reasons, explicit edges are not created, and style options are stored together with node options. If no edge from the
parentis required, this returnsNone.
- style() syside.experimental.viz.NodeStyle
Structural style of this node.