Node

class Node

Proxy to a node in the graph.

Provides access to the node’s attributes and components.

%3
Members defined in Node (11 members)

annotation

R

Annotation contents for note-shaped nodes.

direction

R

Feature direction, or None if not a Feature or undirected.

element

R

Source element this node was constructed from.

id

R

Typed node ID of this node.

is_lifted

R

Whether this node has been lifted from outside this graph, or is inherited.

label

R

Label parts for this node.

parent

R

Parent node, or None for root nodes.

__str__

children

Child nodes.

parent_edge_style

Structural style of the edge from parent to this node if any.

style

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 None if not a Feature or 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 None for 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 parent to 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 parent is required, this returns None.

style() syside.experimental.viz.NodeStyle

Structural style of this node.

Used in