Ontology Diagram Panel
The Ontology Diagram panel is used to create and visualize UML-style class diagrams where nodes represent OWL classes and edges represent either subclass relationships or object property relationships between those classes.
Unlike the Simple Diagram Panel, every element in an Ontology Diagram has a backing presence in
the RDF graph: creating a node opens a dialog to create a new class, and drawing an edge between two
nodes creates either an rdfs:subClassOf triple or a SHACL property shape, depending on the
selected edge type.
Navigation & Selection
Add Node: Click any empty area on the canvas to open the Create Class dialog
Drag Node from tree: Drag an existing class from the resource tree onto the canvas to add it as a node. Any subclass, superclass, or property relationship to classes that are already shown in the diagram is connected automatically.
Pan View: Hold Ctrl (Windows) or Cmd (Mac) and drag the canvas
Bulk Selection: Click and drag on an empty area to use the Marquee tool to select multiple items
Node & Edge Manipulation
Move Node: Click and drag the center of a node
Create Edge: Drag from the border of a node (blue highlight). The Edge type selector overlaid on the canvas determines what kind of relationship is created:
Subclass of adds an
rdfs:subClassOfrelationship, shown with a hollow triangle arrow. A duplicate subclass edge between the same pair of nodes is rejected with a notification.Relationship opens the Create Object Property dialog, which is used to select or create the SHACL property shape (and, optionally, its inverse) that backs the relationship.
To cancel edge creation while dragging, Right-click.
Delete: Select an item and press Backspace or Delete
Labels & Styling
Edit Node Labels: Double-click a node or an existing node label to modify the class’s
rdfs:labelEdit Relationship Label: Double-click the label on a relationship edge to rename the underlying property shape. Subclass edges do not carry an editable label.
Cardinality: Relationship edges, as well as attributes listed in a class node’s body, display the SHACL
sh:minCount/sh:maxCountof the corresponding property shape as a read-only[min..max]label.Color Styling: Select one or more nodes to reveal the Context Menu. Use the color picker to change the color of the selection
Keyboard Shortcut Summary
Action |
Input |
|---|---|
New Node |
Click Canvas |
New Edge |
Drag Node Border |
Pan Canvas |
Ctrl + Drag |
Edit Node Label |
Double-Click |
Delete Selection |
Del / Backspace |
The diagrams themselves are represented as assets in RDF using a dedicated diagrams ontology. Nodes become instances of diagrams:Node and edges become instances of diagrams:Edge. Nodes store the x/y position and width/height information in an extensible data model.
Nodes are linked to the class that they represent using the property diagrams:asset.
Subclass edges represent the rdfs:subClassOf triple directly, while relationship edges are linked
to the SHACL property shape that defines the object property, including its sh:path, sh:class,
sh:minCount and sh:maxCount.
The RDF-based representation also means that Data Foundation features like importers, exporters, SPARQL query and ADS scripting can be applied on them. For example, diagrams can be generated programmatically from other data.
A consequence of the representation is also that edit permissions are required to modify the diagram, even to move or resize nodes.
Toolbar Features
Refresh diagram forces a manual refresh of the visualization from the underlying RDF representation. This is usually not necessary because the diagram should update itself after any edit, regardless of where they originated from.
Fit diagram in view zooms and pans so that the whole diagram is visible.
Focus diagram globally selects the asset that represents the diagram itself. This can be used, for example, to edit the label of the diagram, or add descriptive comments.
Auto layout rearranges all classes using a hierarchical, bottom-to-top layout that follows the direction of subclass relationships, then saves the resulting node positions back to the diagram.
Remove selected nodes from diagram (keep classes) removes the selected nodes from the diagram visualization only. The backing classes and their RDF data remain untouched. Any selected edges are also removed, and their backing triples are deleted. Only enabled when at least one node is selected.
Delete selected items and their backing assets permanently deletes the selected nodes and edges along with the classes and property shapes they represent from the underlying ontology. Only enabled when at least one node or edge is selected.
Export diagram can be used to save the diagram as an image.
Select a diagram shows the available diagrams, allowing users to switch between them. This includes diagrams that are stored in the current asset collection, but also any included asset collection. Diagrams that are stored in included collections are always read-only.
Create ontology diagram can be used to create a new, empty diagram.
Delete diagram opens a confirmation dialog to permanently delete the selected diagram. Choose Delete diagram to remove only the diagram’s visual layout while preserving the underlying classes and property shapes, or Delete diagram and data to also permanently delete backing resources owned by this collection. Unowned resources are skipped.
See Also
Further Reading on TQ Data Foundation