Skip to content

Navigation editor

A navigation is a succession of steps that CogTL must follow to browse the knowledge graph and search for paths or subgraphs.

A navigation has a root, which is always a variable entity (being a prepared query root, an assertion subject, or any other variabilized entity).

Every navigation step describes a condition that must be true in order to go to the next step, has a minimum and maximum cardinality, and an optional negation.

A navigation will give a result if, and only if, all steps have been succesfully completed.

Steps can be of the following type:

Type Description
Entity type Test whether the current entity is of a defined type (or one of its children)
Entity data value Test whether the current entity has a specific value in one of its data types
Entity tag Test whether the current entity has a specifig tag
Follow relation type Follows one of the relations of the current entity, that is of a specific type
Follow relation features Follows one of the relations of the current entity, whose type includes a specific feature
Variable Is true only if the current entity is the specified variable

Cardinality

The cardinality of a step designates how many times this step must be true. A minimum cardinality of 0 allows to define an optional step. A maximum cardinality of * allows to define a step that can be recursively evaluated until no more possibility is available.

Usage of cardinality makes specifically sense in the context of steps that follow relations. For other testing steps, it will be ignored by CogTL.

Warning: Using unlimited maximum cardinality with * may lead to infinite cycles depending on the topology of the graph. A good practice is rather to define a sufficiently high number.

Negative clauses

A negative clause will be true only if the condition of a step is NOT fulfilled.

Editor

To add a navigation step, move the cursor just before or after an existing step (a big red I will appear), and click to open a popover allowing you to select the type of step and details.

To remove a navigation step, click on it and choose "Remove" in the popover.