This page (revision-12) was last changed on 12-Dec-2018 13:58 by Tim Abler

This page was created on 29-Apr-2015 10:52 by unknown

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
12 12-Dec-2018 13:58 13 KB Tim Abler to previous
11 14-Feb-2017 19:23 5 KB Albrecht Striffler to previous | to last
10 14-Feb-2017 19:23 5 KB Albrecht Striffler to previous | to last
9 19-Apr-2016 12:08 5 KB Jochen Reutelshöfer to previous | to last
8 19-Apr-2016 12:08 5 KB Jochen Reutelshöfer to previous | to last
7 06-May-2015 14:51 5 KB Albrecht Striffler to previous | to last
6 06-May-2015 14:50 5 KB Albrecht Striffler to previous | to last
5 06-May-2015 14:49 5 KB Albrecht Striffler to previous | to last
4 06-May-2015 14:44 5 KB Albrecht Striffler to previous | to last
3 06-May-2015 14:44 5 KB Albrecht Striffler to previous | to last
2 06-May-2015 14:44 5 KB Albrecht Striffler to previous | to last
1 29-Apr-2015 10:52 5 KB unknown to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 changed 5 lines
[{TableOfContents title='Table of contents' }]
!!! Introduction
! Introduction
asd
At line 8 removed 6 lines
!!! SparqlVisualization Syntax
!! Basic Syntax
At line 24 changed one line
!! Annotations
! Display the Class Hierarchy as a Tree
At line 26 removed 4 lines
There's a number of different annotations, which allow to configure different aspects of your SparqlVisualization.
Annotations can be placed under any SparqlVisualization markup as following:
{{{
At line 31 changed 48 lines
SELECT ?source ?edge ?target WHERE { <selection-pattern>}
%
@Annotation <option>
}}}
|| Annotation || Function || Allowed Options || Default
| @colors | The annotation ''@colors'' allows to specify a color schema by defining a property. With this property colors can be assigned to Classes and Properties. The color schema for this example can be found on [Visualization Util]\\ | In accordance with [Visualization Util] | none
| @config | Allows outsourcing annotations into a self defined config, which can be reused in different sparql requests as shown in [Visualization Util]. | config name | none
| @design | Allows using an attached css file to be applied to generated svg file. | css file name? | null
| @dotAddLine | Allows adding a line in dot language to the dot file. | any string in dot language | null
| @excludeNodes | Given nodes are excluded from the visualization and therefore will not be shown. | node identifier | none
| @excludeRelations | Given relations are excluded from the visualization and therefore will not be shown. | relation identifier | null
| @filterRelations | Given relation will be included in the visualization exclusively. Other relations will not be shown! | relation identifier | null
| @format | Sets the file format of the visualization file. | png, svg | svg
| @height | Limits the visualization's height to given height in pixels. | Integer | not limited
| @isVisTemplateForClass | Defines this SparqlVisualization as an Template for a given class. | class identifier | none
| @language | Sets language of visualization. | languages codes in accordance with [ISO 639-1|https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes#Partial_ISO_639_table]. | null
| @layout | Allows using different [Graphviz layouts| http://www.graphviz.org/Documentation.php]. | DOT, NEATO, FDP, CIRCO, TWOPI | null
| @linkMode | Deprecated | Deprecated | Deprecated
| @literals | Don't show literals, show literals as tables or show literals as nodes. | OFF, TABLE, NODES | TABLE
| @overlap | Allows using different [Graphviz overlap options| http://www.graphviz.org/Documentation.php] | TRUE, FALSE, SCALEXY, SCALE, COMPRESS, VPSC, VORONOI, ORTHO, ORTHOXY, ORTHOYX, PORTHO, PORTHOXY, PORTHOYX | null
| @predecessors | Limits the the number of predecessor nodes to be shown in the visualization. | Integer | 1
| @rankDir | Sets direction of graph layout. For example, if rankdir="LR", and barring cycles, an edge T -> H; will go from left to right. By default, graphs are laid out from top to bottom. | LR, RL, TB, BT | LR
| @rankSame | Will rank given nodes on the same level dependent on selected layout. | node identifiers | null
| @showInverse | Shows inverse relations in the visualization if set to true. | TRUE, FALSE | FALSE
| @showLabels |   | ??? | TRUE
| @showOutgoingEdges | Shows edges of nodes which are outside the visualizations boundaries if set to true. | TRUE, FALSE | FALSE
| @showProperties | Shows properties as property nodes if set to true or hides them if set to false. | TRUE, FALSE | TRUE
| @showRedundant | Shows edges which are not necessarily needed if set to true. | TRUE, FALSE | FALSE
| @size | Limits the visualization's size to given size in pixels. | Integer | not limited
| @successors | Limits the the number of successor nodes to be shown in the visualization. | Integer | 1
| @templateDefaultConcept | Sets the default concept for this visualization template to given node identifier. | node identifier | none
| @timeout | Sets the timeout for rendering the visualization. Use with caution! | Integer | 300000
| @title | Adds specified title to the visualization and the date and time of generation, aswell. | Any value | no title shown
| @width | Limits the visualization's width to given width in pixels. | Integer | not limited
----
!!! Demos
!! Display the Class Hierarchy as a Tree
%%SparqlVisualization
SELECT ?x ?y ?z WHERE {
SELECT ?x ?y ?z WHERE {
At line 22 added one line
?x rdfs:subClassOf ?z.
At line 36 added one line
@linkMode: browse
At line 96 removed one line
@dotAddLine: «value»
At line 61 added one line
@linkMode: browse
At line 124 removed one line
----
At line 67 added one line
! Display the family relations as a graph using labels
At line 127 removed 2 lines
!! Display the family relations as a graph using labels
At line 134 changed one line
?x ?y ?z .
?x ?y ?z .
At line 88 added one line
At line 169 removed one line
----
At line 111 added one line
! Visualize lost of stuff (be careful for large ontologies!)
At line 172 removed 2 lines
!! Visualize lost of stuff (be careful for large ontologies!)
At line 180 removed 2 lines
At line 226 removed one line
----
At line 164 added one line
! Show all Properties of the Simpsons Ontology
At line 229 removed one line
!! Show all Properties of the Simpsons Ontology
At line 231 removed one line
At line 233 removed one line
At line 240 removed one line
At line 266 removed 131 lines
----
!! Filtering Functions
To make your SparqlVisualization sleeker, simpler and easier to grasp you can make use of different filtering functions, which are turned on by default (ShowRedundant: false).
! ShowRedundant
This filter is turned on by default and will work on following edges:
* Recursive edges: Edges which have the same subject and object (e.g. Homer is related to himself) will be filtered out.
* Double edges: If there are two edges having same predicate and swapped subject and object, the filtering function will replace them with one double headed edge.
* SuperProperties: The filtering function will focus on the edges having the highest level of detail. Therefore it will find all edges in your visualization having SubProperties in this visualization and filter them out.
Let's visualize all the relations between the characters in the Simpsons ontology to see the difference by turning the redundant filter off first and visualize it afterwards with turned on filter.
! ShowRedundant true (Filtering function turned off)
%%SparqlVisualization
SELECT ?xLabel ?y ?zLabel WHERE {
?x ?y ?z .
?x rdf:type si:Human.
?z rdf:type si:Human.
?x rdfs:label ?xLabel.
?z rdfs:label ?zLabel.
}
@rankDir: BT
@showRedundant: true
%
@size: 1200
! ShowRedundant false (Filtering function turned on)
%%SparqlVisualization
SELECT ?xLabel ?y ?zLabel WHERE {
?x ?y ?z .
?x rdf:type si:Human.
?z rdf:type si:Human.
?x rdfs:label ?xLabel.
?z rdfs:label ?zLabel.
}
@rankDir: BT
@size: 900
@showRedundant: false
%
! ShowInverse
Inverse edges are edges which are the "opposite" of each other (e.g. Husband and Wife).\\
The filtering function, which is turned on by default (ShowInverse: false), will find these and replace them by one double headed edge having both predicates combined.
! ShowInverse true (Filtering function turned off)
%%SparqlVisualization
SELECT ?xLabel ?y ?zLabel WHERE {
?x ?y ?z .
?x rdf:type si:Human.
?z rdf:type si:Human.
?x rdfs:label ?xLabel.
?z rdfs:label ?zLabel.
}
@rankDir: BT
@size: 800
@showInverse: true
%
! ShowInverse false (Filtering function turned on)
%%SparqlVisualization
SELECT ?xLabel ?y ?zLabel WHERE {
?x ?y ?z .
?x rdf:type si:Human.
?z rdf:type si:Human.
?x rdfs:label ?xLabel.
?z rdfs:label ?zLabel.
}
@rankDir: BT
@size: 800
@showInverse: false
%
!!! Visualization Templates
Visualization Templates can be used to create visualization patterns for certain classes.
If a template is defined for a certain class, users will have the option to visualize it on usage, by clicking on the instance in the visualization and chosing "Visualize with template ..."
!! Defining templates
Templates are easily defined by using the annotation @isVisTemplateForClass: <class>.\\
You can also define a default concept which will be visualized when no concept was chosen by using the annotation @templateDefaultConcept: <class>.\\
\\
__Please be aware that only one template should be defined per page!__
The example below demonstrates the definition of a SparqlVisualization template for the class si:Human, having si:homer as default concept and will visualize relations between a given si:human instance and other si:human instances.
{{{
%%sparqlVisualization
SELECT ?x ?y ?z WHERE {
BIND ( %1$ AS ?x) .
?x ?y ?z .
?z rdf:type si:Human.
FILTER (?z != ?x).
}
@templateDefaultConcept: si:homer
@isVisTemplateForClass: si:Human
%
}}}
!! Examples
! Template for class si:Human
[VisualizationTemplateHuman] is a template for all instances of class si:Human.
! Template for class si:Location
[VisualizationTemplateLocation] is a template for all instances of class si:Location.