Explore data and class relationships

Explore instances

To explore instances and their relationships, first enable the Autocomplete index from Setup ‣ Autocomplete, which makes the lookup of IRIs easier. Then navigate to Explore ‣ Visual graph, and find an instance of interest through the Easy graph search box. You can also do it from the View resource search field in GraphDB’s home page — search for the name of your graph, and press the Visual button.

The graph of the instance and its relationships are shown. The example here is from the w3.org wine ontology that we mentioned earlier.


Hover over a node to see a menu for the following actions:

  • Expand a node to show its relationships or collapse to hide them if already expanded. You can also expand the node by double-clicking on it.

  • Copy a node’s IRI to the clipboard.

  • Focus on a node to restart the graph with this instance as the central one. Note that you will lose the current state of your graph.

  • Delete a node to hide its relationships and hide it from the graph.

Click on a node to see more info about it: a side panel opens on the right, including a short description (rdfs:comment), labels (rdfs:label), RDF rank, image (foaf:depiction) if present, and all DataType properties. You can also search by DataType property if you are interested in its value. Click on the node again if you want to hide the side panel.

You can switch between nodes without closing the side panel. Just click on the new node about which you want to see more, and the side panel will automatically show the information about it.

Click on the settings icon on the top right for advanced graph settings. Control number of links, types, and predicates to hide and show.


A side panel opens with the available settings:


Create your own visual graph

Control the SPARQL queries behind the visual graph by creating your own visual graph configuration. To make one, go to Explore ‣ Visual graph ‣ Advanced graph configurations ‣ Create graph config. Use the sample queries to guide you in the configuration.


The following parts of the graph can be configured:

  • Starting point — this is the initial state of your graph.

    • Search box: start with a search box to choose a different start resource each time;

    • Fixed node: you may want to start exploration with the same resource each time;

    • Query results: the initial config state may be the visual representation of a Graph SPARQL query result.

  • Graph expansion: determines how new nodes and links are added to the visual graph when the user expands an existing node. The ?node variable is required and will be replaced with the IRI of the expanded node.

  • Node basics: this SELECT query controls how the type, label, comment and rank are obtained for the nodes in the graph. Node types correspond to different colors. Node rank is a number between 0 and 1 and determines the size of a node. The label is the text over each node, and if empty, IRI local name is used. Again, ?node binding is replaced with node IRI.

  • Predicate label: defines what text to show for each edge IRI. The query should have ?edge variable to replace it with the edge IRI.

  • Node extra: Click on the info icon to see additional node properties. Control what to see in the side panel. ?node variable is replaced with node IRI.

  • Save your config and reload it to explore your data the way you wish to visualize it.

Class hierarchy

To explore your data, navigate to Explore ‣ Class hierarchy. You can see a diagram depicting the hierarchy of the imported RDF classes by number of instances. The biggest circles are the parent classes and the nested ones are their children.


If your data has no ontology (hierarchy), the RDF classes will be visualized as separate circles instead of nested ones.


Various actions for exploring your data:

  • To see what classes each parent has, hover over the nested circles.

  • To explore a given class, click its circle. The selected class is highlighted with a dashed line, and a side panel with its instances opens for further exploration. For each RDF class you can see its local name, IRI, and a list of its first 1,000 class instances. The class instances are represented by their IRIs, which, when clicked, lead to another view where you can further explore their metadata.


    The side panel includes the following:

    • Local name;

    • IRI (Press Ctrl+C / Cmd+C to copy to clipboard and Enter to close);

    • Domain-Range Graph button;

    • Class instances count;

    • Scrollable list of the first 1,000 class instances;

    • View Instances in SPARQL View button. It redirects to the SPARQL view and executes an auto-generated query that lists all class instances without LIMIT.

  • To go to the Domain-Range Graph diagram, double-click a class circle or the Domain-Range Graph button from the side panel.

  • To explore an instance, click its IRI from the side panel.

  • To adjust the number of classes displayed, drag the slider on the left-hand side of the screen. Classes are sorted by the maximum instance count, and the diagram displays only the current slider value.

  • To administrate your data view, use the toolbar options on the right-hand side of the screen.

    • To see only the class labels, click Hide/Show Prefixes. You can still view the prefixes when you hover over the class that interests you.

    • To zoom out of a particular class, click the Focus diagram home icon.

    • To reload the data on the diagram, click the Reload diagram icon. This is recommended when you have updated the data in your repository, or when you are experiencing some strange behavior, for example you cannot see a given class.

    • To export the diagram as an .svg image, click the Export Diagram download icon.

  • You can also filter the hierarchy by graph when there is more than one named graph in your repository. Just expand the All graphs drop-down menu next to the toolbar options and select the graph you want to explore.


Domain-Range graph

To explore the connectedness of a given class, double-click the class circle or the Domain-Range Graph button from the side panel. You can see a diagram that shows this class and its properties with their domain and range, where domain refers to all subject resources and range — to all object resources. For example, if you start from class pub:Company, you see something like: <pub-old:Mention pub-old:hasInstance pub:Company> <pub:Company pub:description xsd:string>.


You can also further explore the class connectedness by clicking:

  • the green nodes (object property class);

  • the labels — they lead to the View resource page, where you can find more information about the current class or property;

  • the slider Show collapsed predicates to hide all edges sharing the same source and target nodes;


To see all predicate labels contained in a collapsed edge, click the collapsed edge count label, which is always in the format <count> predicates. A side panel opens with the target node label, a list of the collapsed predicate labels and the type of the property (explicit or implicit). You can click these labels to see the resource in the View resource page.


Administrating the diagram view

To administrate your diagram view, use the toolbar options on the right-hand side of the screen.

  • To go back to your class in the Class hierarchy, click the Back to Class hierarchy diagram button.

  • To collapse edges with common source/target nodes, in order to see the diagram more clearly, click the Show all predicate/Show collapsed predicates button. The default is collapsed.

  • To export the diagram as an .svg image, click the Export Diagram download icon.

Class relationships

To explore the relationships between the classes, navigate to Explore ‣ Class relationships. You can see a complicated diagram showing only the top relationships, where each of them is a bundle of links between the individual instances of two classes. Each link is an RDF statement, where the subject is an instance of one class, the object is an instance of another class, and the link is the predicate. Depending on the number of links between the instances of two classes, the bundle can be thicker or thinner and gets the color of the class with more incoming links. These links can be in both directions.

In the example below, you can see the relationships between the classes of the News sample dataset provided in the distribution folder. You can observe that the class with the biggest number of links (the thickest bundle) is pub-old:Document.


To remove all classes, use the X icon.


To control which classes to display in the diagram, use the add/remove icon next to each class.


To see how many annotations (mentions) there are in the documents, click on the blue bundle representing the relationship between the classes pub-old:Document and pub-old:TextMention. The tooltip shows that there are 6,197 annotations linked by the pub-old:containsMention predicate.


To see how many of these annotations are about people, click on light purple bundle representing the relationship between the classes pub-old:TextMention and pub:Person. The tooltip shows that 274 annotations are about people linked by the pub-old:hasInstance predicate.


Just like in the Class hierarchy view, you can also filter the class relationships by graph when there is more than one named graph in the repository. Expand the All graphs drop-down menu next to the toolbar options and select the graph you want to explore.