Knowledge Information Systems Group, Salzburg, Austria

Salzburg Research
  Home
  Documentation
  Download
  Contact

RDF Gravity (RDF Graph Visualization Tool)

Sunil Goyal, Rupert Westenthaler
{sgoyal, rwestenthaler}@salzburgresearch.at
Salzburg Research, Austria


User Documentation

1 Introduction

1.1 Overview

RDF GRAph VIsualization Tool (RDF Gravity) is a tool for visualizing directed graphs built in RDF and OWL. The tool provides a simple yet powerful visualization of RDF graph structures and the ability to filter out and visualize specific parts or fragments of RDF Graphs.

Figure 1: A part of Wine Ontology showing different Wines in RDF Gravity

Its main features are:

  • Graph Visualization (Renderers/ Zoom/ Selection)
  • Filters (Global, Local, Namespace, Instance level) enabling specific views on a graph.
  • Full text Search/ RDQL queries
  • Visualizing multiple RDF files

1.2 Installation

RDF Gravity is built in Java and requires JVM1.3 or higher. It uses the JUNG Graph API and Jena semantic web toolkit (Jena 2.0) provided by HP. A simple Java Web Start installation is provided to install and run the tool.

2 General Notations

The table below provides the notations used the RDF Gravity tool for denoting RDF resources and properties.

Refers to concepts or Classes. Here "EatingGrape" is a concept.
Refers to a literal value (string, integer) etc.
Refers to Anonymous nodes
This refers to instances. Any anonymous node which has rdf:type property associated to a Class is also shown as an instance.
Refers to Properties
Refers to URI strings which cannot be identified as any of the above items
Blue edges refer to rdfs:subClassOf property.
Black edges refer to the rdf:type property.
Dotted Edges refer to the rdf:comment property.
Rest all other properties are marked as red in color.

Table 1: Denotes notations used by the RDF Gravity Tool.

3 Graph Visualization

The tool allows user to visualize RDF graphs and navigate through them easily.

3.1 Multiple Node Selection

A user can select one or more nodes from the visible graph in two ways. The first way is to press the left button of the mouse and drag the cursor while pressing the left button. This results in selection of all those nodes that get covered during the drag operation. The second way is to press the "Shift" key on the mouse and click any arbitrary node for selection.

Full Image Full Image

Figure 2: A user can select multiple nodes on the graph both via selecting a region and selecting arbitrary nodes.

A user can move the selected nodes anywhere within the graph without changing the layout of the rest of the graph.

Full Image Full Image

Figure 3: Note that only the position of selected nodes is changed. All other unselected graph nodes remain at their original position in the above figure.

3.2 Zoom

The tool allows a user to zoom through the whole graph. Using a marker provided at the lower right corner of the tool, a user can zoom in or zoom out of a graph according to his needs.

Full Image Full Image

Figure 4: A user can zoom in or zoom out of a graph.

In case particular set of nodes are selected before zooming, during zoom the selected nodes always remain visible.

Full Image Full Image

Figure 5: During zoom, the selected nodes always remain visible.

3.3 Automatic Graph Layout

Users can automatically layout the visible graph by pressing the "Scramble" button on the lower right corner of the tool. The "Scramble" button re-initializes the layout of the graph.

Full Image Full Image

Figure 6: Pressing the Scramble button changes the layout of the graph.

4 Graph Navigation

The tool allows a user to navigate through individual nodes of a graph, show outgoing or incoming nodes or associated instances and literals to a particular node.

4.1 Outgoing Nodes

To visualize all outgoing edges of a node, left click on the selected node and on the menu select "Show Outgoing Nodes". This will open up another window showing all nodes to which the selected node is a source. All outgoing nodes that are already visible are marked selected.

Full Image Full Image

Figure 7: A user selects the option for "Outgoing Nodes" and then gets a popup window showing all outgoing nodes that exist within the graph.

A user can choose (select or deselect) nodes that he wants to visualize. All selected nodes will be visualized in the graph panel by the tool.

Full Image Full Image

Figure 8: A user selects all the outgoing nodes that he wishes to visualize and the selected nodes are added in the graph.

4.2 Incoming Nodes

A user can visualize all incoming nodes (similar as Outgoing Nodes) by selecting the option of "Show Incoming Nodes" from the menu.

Full Image Full Image

Figure 9: A user selects the incoming nodes he wants to visualize and the specific incoming nodes are added in the graph.

4.3 Instances

If a particular node has any instances associated with it, those instances can be directly visualized or hidden by choosing the option of "Show Instances" or "Hide Instances" respectively from the menu.

Full Image Full Image

Figure 10: The figure shows the option for selecting the "Show Instances" and "Hide Instances" options.

4.4 Literals

If a particular node has any literal associated with it, those literals can be directly visualized or hidden by choosing the option of "Show Literals" or "Hide Literals" respectively from the menu.

Full Image Full Image

Figure 11: The figure shows the option for selecting the "Show Literals" and "Hide Literals" options and adds two literals on doing the "Show Literals" action on a particular instance node.

4.5 Hide Nodes

A user can hide a particular node from the graph panel by choosing the option "Hide Node" from the menu. A user can hide multiple nodes by selecting all the specific nodes that he wishes to hide together.

Full Image Full Image

Figure 12: The two selected nodes in the above graph are hidden after the "Hide Node" action is performed.

5 Graph Filtering

The tool allows a user to apply filters to have specific views on the graph. Filters enable hiding of particular nodes or edges from the graph. For instance, one can hide all edges of "dc:author" or any other specific type occurring in any particular given ontology.

There are two types of filter:

  • Global Filters
  • Local Filters

When a user opens a particular RDF file within the tool, the right side window of the tool shows two panels (Global Filter Panel and Local Filter Panel), each listing all possible namespaces and the RDF properties that exist in the particular RDF Graph being currently visualized. A user can select particular edges or the whole namespace in these panels to hide selected edges or hide all edges belonging to a particular namespace respectively from the graph.

5.1 Global Filters

Global Filters allow a user to hide specific edges and concepts based on type. One can select particular edges from the Global Filter Panel. On selection if any such edge which was prior visible in the graph on the left-hand side in the Graph Panel will be automatically hided.

Full Image Full Image

Figure 13: Note that there are three "subClassOf" relations (blue edges) visible in the graph panel. Selecting the global filter "subClassOf" results in removal of "subClassOf" relations.

Global Filters are persistent and unless these are not removed explicitly (edges deselected), any option of including globally filtered edges (from Search Panel or explicitly from the Graph Panel) will not work. The filters applied from the Global Filter Panel are Global in nature.

5.2 Local Filters

Local Filters allow a user to hide or view (include) edges of a particular type from the RDF Graph. A user can select a particular edge (e.g. dc:author) and then click the option "Apply Filter". This will hide all edges or properties of type dc:author from the viewed graph in the Graph Panel. Local Filters are "one-time filters" and unlike Global Filters, not persistent. Any option of including edges (previously filtered by applying Local Filters) from Search Panel, Local Filter Panel or from Graph Panel can be included.

Local Filter Panel provides three options on its user interface:

  • Apply Filter
  • Include Visible Type
  • Include Type

Apply Filter: This option is used for applying Local Filter on selected edges from the Local Filter Panel. After selecting particular edges, a user needs to click "Apply Filter" button to apply the filter for hiding the selected edges.

Full Image Full Image

Figure 14: Note that there are three "subClassOf" relations (blue edges) visible in the graph panel. Selecting the local filter "subClassOf" results in removal of "subClassOf" relations.

Include Visible Type: This option is used for including selected edges from the Local Filter Panel. After selecting edges from the Local Filter Panel, a user needs to click "Include Visible Type" button to include the selected edges. Note that this option will not add those selected edges whose source and target nodes are currently not visible in the Graph Panel. This option will therefore visualize only those selected edges whose both source and target nodes are already "visible".

Full Image

Figure 15: Selecting the "Include Visible Type" option on "subClassOf" results in visualization of all subClassOf relations that exist within the visible nodes.

Include Type: This option is also used for including selected edges from the Local Filter Panel. Unlike "Include Visible Type" option, this option will include all selected edges even if their source or target nodes are missing from the Graph Panel. All those edges whose source or target edges are missing, this option will include the source or target nodes as needed to make the particular edge visible.

Full Image

Figure 16: Selecting the "Include Type" option on "subClassOf" results in visualization of all subClassOf relations that exist within the graph. This results in addition of all nodes in the graph that have the subClassOf relation.

5.3 Custom Filters

The "Apply Filter" option in the menu bar provides a number of filters that hide or show nodes depending on the type of node.

  • Filter/Show Literal : hides or shows literals
  • Filter/Show Anonymous Node : hides or shows anonymous nodes
  • Filter/Show Concept Node : hides or shows custom nodes
  • Filter/Show Property Node : hides or shows property nodes
  • Filter/Show Instance Node : hides or shows instance nodes
  • Filter/Show URI Resource Node : hides or shows URI Resource nodes.
  • Filter Zero Edge Node : hides all those individual nodes which are not connected to any other node.
Full Image

Figure 17: The figure shows the menu bar option where all the custom filters are listed.

Note: The "Global Filters" option in the menu bar also includes a Zero Edge Node Filter. When this option is set, then individual nodes cannot be added to the visible graph, as this filter is persistent and unless deselected filters out any individual nodes that a user is trying to visualize.

6 Search

RDF Gravity provides a full text search over concepts, properties, literal and instances specified in a RDF Graph. It gives also the ability to run RDQL queries and visualize the triples in the result as a graph directly. A user can make queries by selecting the "Query" or the "RDQL" tab along side local filter panel.

6.1 Full Text Search

The Query Tab allows a user to input any string, choose what he wishes to search (Resources, Properties or both) and then search for the query. The input string is matched against resources and properties present in the RDF Graph and the matched results are shown in the result window.

Full Image

Figure 18: In the above figure, a user makes a query for "Pasta". The result window below shows all resources related to "Pasta".

After getting the result, a user can add respective resources or properties on the Graph Panel. A user can select the resource or property he wishes to visualise on the Graph Panel, and then click the "Include Resources" button. This will include the selected resource in the graph panel. Note that for adding properties (edges), both the source and the target nodes have to be visible from before, otherwise the selected edge won't be visible.

Full Image Full Image

Figure 19: A user searches for "wine". Note that there are no concepts related to wine in the graph panel in the first figure. After selecting the "Wine" concept from the search results, the user clicks "Include Resources". This results in the "Wine" concept being added to the graph panel. In the second figure, one can see the Wine concept that was added because of the "Include Resources" action.

6.2 RDQL Queries

A user can also make RDQL queries (see Jena documentation for more on that) and the resulting triples from the query are directly visible on the Graph Panel. In the "RDQL" panel, a user can write a specific RDQL query he wants to make and then needs to press the "Query" button.

In the example below, a user makes the following RDQL query on the food ontology.

  SELECT *
  WHERE  (?x, ?y, <http://www.w3.org/TR/2003/CR-owl-guide-20030818/food#Pasta>)
Full Image

Figure 20: The figure shows the result of an RDQL query.

The above query results in display of all triples which have "<http://www.w3.org/TR/2003/CR-owl-guide-20030818/food#Pasta>" as their object nodes.

7 Other Features

7.1 Multiple RDF Graphs Inclusion:

A user can include multiple files and then query or visualise the RDF triples from multiple files within the same graph. The "Include File" option in the "File" menu enables a user to add multiple files.