Nodes and relationships in a Neo4j graph model

A toro4n model is a model of types, the way you'd describe a Neo4j database: one node per label combination, and relationships that say how the types connect. This page covers everything you draw on the canvas.

Adding nodes

A new model starts with one empty node in the middle of the canvas. Add more with the Add node button at the top of the side panel, or right-click empty canvas and choose Add node to place one exactly there. Each new node opens two boxes on the canvas: one for its labels above and one for its properties below.

You can also draw a relationship out into empty canvas (see below) to create a connected node in one motion, or paste a list of names to create many nodes at once (see Import).

Labels

Labels sit above the node as chips with a border. A node can have several labels. Because a toro4n model describes types, two nodes may never have the same label or the same label combination; the app stops you with a message, and a model loaded from a file with such a clash marks the nodes with a red ring. Capitalization doesn't make two labels different: Order and order count as the same.

Labels are always written the Neo4j way, automatically: a capital first letter, as in Person or NetworkSwitch. Relationship types become all capitals, ACTED_IN, and property keys start with a lowercase letter, firstName. Only the case changes; spaces, underscores, and hyphens are never touched. The same rule is applied when a model is imported.

Captions

The text inside a node is its caption, and it's always the example of the property at the top of the node's list. There's no separate caption field: drag the property you want to show to the top. A node whose topmost property has no example is empty inside, which is what a pure type model looks like. In Simple mode, double-clicking a node opens a single Caption box instead.

Relationships

Hover a node and drag from the ring around it to another node to create a relationship. Release on empty canvas and toro4n creates a new node there, already connected. The relationship's type is edited in the Type box above the line; press Enter to save.

Editing on the canvas

Double-click a node or relationship, or select it and press Enter, to edit it in place: the labels box above, the properties box below (the same Key, Type, and Example fields as in the side panel), and for a relationship the Type box. Enter saves and moves on, Esc or a click on the canvas closes the boxes. The side panel's Edit tab shows the same things for the selection.

Circles or cards

By default a node is a circle with its labels above and its properties listed below. Turn on Square mode in the top bar and every node becomes a card: the labels as a bold row at the top, the caption in a band in the node's color, and the properties inside, in three columns for key, type, and example. Square mode is one setting for the whole model, and it's an undo step like any other change. In Square mode, properties are always shown and the card is edited in place. Turn it off and the circles come back.

Selecting and moving

Click to select, Shift-click or ⌘-click (Ctrl-click on Windows and Linux) to add to the selection, ⌘-drag on empty canvas for a marquee, and drag any selected item to move the whole selection. Arrow keys nudge by 1 px, 10 px with Shift. Duplicate (⌘D) copies the selection next to the original; a copy of a node drops any label that would clash.

Related