Advanced Graph View

The RDF Graph Query UI supports an advanced graph view feature that allows users to interact directly with the graph visualization. This is unlike the graph displayed on the RDF model editor or public component where the graph view is just an output of the SPARQL results on the paging table.

This section describes the advanced graph view component, starting from the execution of a SPARQL CONSTRUCT or SPARQL DESCRIBE query to advanced interaction with the graph visualization.

The main user interface (UI) elements of the advanced graph view component are as shown:

Figure: Advanced Graph View Components

Description of the illustration adv_graph_view_page.png

The following describes the UI components seen in the preceding figure:

To access the advanced graph view feature, right-click on the RDF model and select Visualize as shown:

Figure: Visualize Menu

Description of the illustration adv_graph_view_visualize_menu.png

Query Selector Panel

To start using the advanced graph view feature, you must first execute a SPARQL CONSTRUCT or SPARQL DESCRIBE query. The Query Selector also provides an Options input box to specify the query options to be used when executing queries in the visualizer. The supported query options are described in Using the SEM_MATCH Table Function to Query RDF Data. The resulting query output is displayed as an interactive graph in the Graphviz component.

The system may automatically run additional queries to build the graph before it is displayed. A SPARQL query is executed for each resource in the initial query result set to retrieve values for its datatype properties. These additional queries ensure that each vertex in the graph is fully populated with its attributes. The maximum number of resources that can be expanded in a result set is 2,000. The application will raise an error if this limit is exceeded. In which case, you can reduce the result set size by using a more selective SPARQL query or using a LIMIT clause.

The following figure shows an example SPARQL CONSTRUCT query that describes the person named George in a PEOPLE dataset. The Query Selector Panel can be collapsed to provide more space for interacting with the graph.

Figure: Query Selector

Description of the illustration adv_graph_view_query_selector.png

Graphviz

The graph is displayed in the Graphviz panel and the visualization is based on the Graph Visualization Library. See Graph Visualization Library Reference in Property Graph Visualization Developer’s Guide and Reference for more information.

The displayed graph is constructed from an RDF graph as follows.

The Graphviz panel consists of the following components:

You can interact with the edges and vertices of the graph displayed in the graph view area.

You can right-click on a vertex to view its datatype properties. The following figure shows the datatype property values for the vertex representing the person Craig.

Figure: Viewing Vertex Properties

Description of the illustration adv_graph_view_display_vertex_prop.png

You can also right-click on an edge to show its properties. The following figure shows the edge properties for the worksFor edge:

Figure: Viewing Edge Properties

Description of the illustration adv_graph_view_display_edge_prop.png

To expand a vertex in the graph, right-click on the vertex and then click the expand icon. New vertices and edges directly connected to the expanded vertex will be added to the graph. For example, in the following figure, vertex Julie is shown expanded:

Figure: Expanding a Vertex

Description of the illustration adv_graph_view_expand.png