This document is licensed under a Creative Commons Attribution 4.0 License.
This document defines ShapeVOWL, a visual notation for RDF constraints. It specifies the visualization primitives to represent constraints to users.
This document is draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organization.
This document is the result of research and the accompanying paper is currently under submission at the 22nd International Conference on Knowledge Engineering and Knowledge Management (EKAW 2020).
This section is non-normative.
Knowledge Graphs defined with the Resource Description Framework [RDF] consist of vocabulary terms and instance data both described using the graph model of RDF. Several constraint languages exist to define conditions on such RDF graphs, one such language is the W3C recommended Shapes Constraint Language [SHACL] which itself is represented using RDF. Users rely on different types of constraints offered by constraint languages to define conditions on RDF graphs.
RDF follows a graph model which intuitively can be represented using nodes and edges. The Visual Notation for OWL Ontologies [VOWL] leverages this graph model to visualize ontologies, the vocabulary of terms of Knowledge Graphs. Besides this, VOWL-based visual notations were also used for the RDF Query Language SPARQL [QueryVOWL], used to query RDF data, and for the RDF Mapping Language (RML) [MapVOWL], used to transform structured data to RDF. ShapeVOWL is an attempt to leverage the broadly used visual notation VOWL for RDF constraints.
| Name | Primitive | Description |
|---|---|---|
| circle |
|
|
| rectangle |
|
|
| solid line |
|
|
| dashed line |
|
|
| arrowhead | relationship direction | |
| text | text | labels, constraints and other textual information |
| Abstract Color Name | Concrete Color Recommendation | Description | Application | |
|---|---|---|---|---|
| canvas | #ffffff | white | Bright color with a good contrast to all other colors. | canvas where are all other graph elements are shown on |
| foreground | #000000 | black | Very dark color with a good contrast to all other colors. | border of elements and edges |
| base color | see next table | We reuse the color 'general' of VOWL. | standard fill color of data shapes | |
| datatype color | #ffcc33 | yellow | We reuse the color 'datatype' of VOWL. | standard fill color of literals |
| deactivated | see next table | We reuse the color 'deprecated' of VOWL. | fill color for deactivated data shapes | |
| highlight | see next table | For each data shape the highlight color is a darker shade of the base color of that element. | fill color of the graph elements when selected | |
| severity | see next table | Every severity has its own color. This is alternative to the base color. | fill color of the data shape based on its severity; default severity is violation | |
| Color Schema Name | Base Color | Highlight |
|---|---|---|
| base color | #aaccff | #1155cc |
| deactivated | #cccccc | #999999 |
| severity violation | #e06666 | #b7b7b7 |
| severity warning (light yellow different from datatype color) | #ffd966 | #bf9000 |
| severity information | #93c47d | #b7b7b7 |
| Term source | Term | Label | Description |
|---|---|---|---|
| SHACL | Node Shape | Node Conditions | The type of a data shape |
| SHACL | Property Shape | Property Conditions | The type of a data shape |
| SHACL | IRI | IRI | The unique identifier of a data shape |
| SHACL | targetNode | appliesOn(x) | Specifies on which data a data shape applies by default |
| SHACL | targetClass | appliesOnClass(x) | Specifies on which data a data shape applies by default |
| SHACL | targetSubjectsOf | appliesOnSubjectsOf(x) | Specifies on which data a data shape applies by default |
| SHACL | targetObjectsOf | appliesOnObjectsOf(x) | Specifies on which data a data shape applies by default |
| SHACL | minCount | 1..* | The inclusive min count is the left number. In case only maximum but no minimum is specified, the minimum is 0 |
| SHACL | maxCount | 0..1 | The inclusive max count is the right number. In case only minimum but no maximum is specified, the maximum is '*' |
| SHACL | pattern, flags | /pattern/flags | The constraint type 'pattern', a regular expression separated with a dash from possible flags |
| SHACL | Xone | OneOf | The logical relationship representing exclusive or |
| SHACL | node | compliesWith | The constraint type expressing that one data shape should comply with another data shape |
| SHACL | property | - | Not used, instead the property path of the property shape is displayed as label |
| SHACL | qualifiedValueShape, qualifiedMinCount, qualifiedMaxCount | compliesWith, 1..2 | The constraint type expressing that the specified number of a data shape should comply with another data shape |
| SHACL | ignoredProperties | otherAllowedProperties | Specifies which properties of a node are allowed even in a closed data shape |
| SHACL | in | valueIn | This constraint type specifies that a value needs to be member of a provided list |
| SHACL | sequence path | property1/property2 | A property path following the SPARQL 1.1 specification |
| SHACL | alternative path | property1 | property2 | An alternative property path following the SPARQL 1.1 specification |
| SHACL | inverse path | ^property1 | An inverse property path following the SPARQL 1.1 specification |
| SHACL | zero-or-more path | property1/property2* | Zero or more property path following the SPARQL 1.1 specification |
| SHACL | One-or-more path | property1/property2+ | One or more property path following the SPARQL 1.1 specification |
| SHACL | Zero-or-more path | property1/property2? | Zero or more property path following the SPARQL 1.1 specification |
| Visualization | Description |
|---|---|
| A node shape which has constraints attached in a note-element. | |
| A relationship between a node shape and a property shape: conditions of the property shape in combination with the conditions of the node shape. | |
| A one-to-many relationship using logical operators. | |
| A property shape refering to a node shape indicated by a dashed connection. |
Node shapes can be reused by a directed dashed connection, however we recommend splitting rules for the visualization of reused property shapes as trade-off for the graph rendering. Different splittings for property shapes are possible; in the following we describe three possible splitting rules for property shapes. Depending on the level of detail, applications may choose one of the splitting rules.
Property shapes consist of two parts: a solid directed edge with the property path as label in a rectangle and a value the directed edge points too which is either a node or a literal.
A reused property shape is visualized for each reuse, i.e. a property shape which is used n times will be visualized n times.
The value of a reused property shape is visualized only once but the directed edge and label are visualized for each reuse.
I.e. a property shape which is used n times will be visualized by one value and n directed solid edges with label.
A reused property shape is visualized only once, i.e. a property shape which is used n times will be visualized exactly one time
and will have n ingoing solid edges to the rectangle containing the property path.
Below you can find an example for constraints expressed with ShapeVOWL.