Home > SHACL-based configuration
SHACL-based configuration
Sparnatural can be configured using a SHACL specification of the entities and properties to be displayed in the UI.
Sparnatural SHACL configuration profile
The formal specification of the subset of SHACL to use, in combination with a few properties from other ontologies, is defined in the Sparnatural SHACL configuration profile, available as an HTML documentation, an online spreadsheet, or a technical SHACL file.
Reference of the Sparnatural SHACL configuration profile
Namespaces
Prefix | Namespaces |
---|---|
core | http://data.sparna.fr/ontologies/sparnatural-config-core# |
ds | http://data.sparna.fr/ontologies/sparnatural-config-datasources# |
sh | http://www.w3.org/ns/shacl# |
volipi | http://data.sparna.fr/ontologies/volipi# |
NodeShapes configuration reference
Property name | URI | Expected value | Card. | Description |
---|---|---|---|---|
type | rdf:type |
sh:NodeShape |
1..*
|
Class. Value must always be sh:NodeShape. |
label | rdfs:label |
rdf:langString or xsd:string |
0..*
|
The label of the entity to be displayed in Sparnatural. Labels are multilingual, and can provide multiple labels in different languages. Lhe label in the current user language is displayed; If no label is given, the local part of the URI is used. |
order | sh:order |
xsd:decimal |
0..*
|
The order of this entity in the entity selection dropdown. |
tooltip | volipi:message |
rdf:langString or xsd:string |
0..*
|
The preferred tooltip that will be displayed when this entity is hovered. This can contain HTML markup. Tooltips are also multilingual, you can provide one tooltip per language, and the tooltip in the current user language is used. |
fontawesome icon code, tooltip | volipi:iconName |
rdf:langString or xsd:string |
0..1
|
The fontawesome icon code that will be displayed by Sparnatural, e.g. "fa-solid fa-user", The default tooltip that will be displayed when this entity is hovered, if no preferred tooltip is provided. This can contain HTML markup. |
icon url | volipi:icon |
IRI |
0..1
|
A reference to an icon URL that will be displayed on Sparnatural. Use of this is discouraged, prefer volipi:iconName |
target class | sh:targetClass |
IRI |
0..*
|
The actual URI of the class that this shape corresponds to, that will be inserted in the SPARQL queries. NodeShapes can either have sh:targetClass or they can be rdf:type rdfs:Class, in which case the URI of the NodeShape is assumed to be the URI of the class itself. |
node kind | sh:nodeKind |
IRI |
0..1
|
If used on a NodeShape with value sh:Literal, then Sparnatural will treat this shape as a Literal and will not generate an rdf:type triple in the SPARQL query. |
datatype | sh:datatype |
IRI |
0..1
|
If used on a NodeShape, then Sparnatural will treat this shape as a Literal and will not generate an rdf:type triple in the SPARQL query. |
language in | sh:languageIn |
BlankNode |
0..1
|
If used on a NodeShape, then Sparnatural will treat this shape as a Literal and will not generate an rdf:type triple in the SPARQL query. |
unique lang | sh:uniqueLang |
xsd:boolean |
0..1
|
If used on a NodeShape, then Sparnatural will treat this shape as a Literal and will not generate an rdf:type triple in the SPARQL query. |
or | sh:or |
BlankNode |
0..*
|
PropertyShapes configuration reference
Property name | URI | Expected value | Card. | Description |
---|---|---|---|---|
entity / shape | ^sh:property |
Sparnatural entity |
1..*
|
The entity from the configuration to which the property is attached. Note that this is expressed as an inverse property on the PropertyShapes, for ease of use when defining SHACL configurations in Excel tables. |
property | sh:path |
IRI |
1..1
|
The property URI that this property shape is constraining. This is restricted to single properties, paths are not supported (yet) |
order | sh:order |
xsd:decimal |
0..1
|
The order of this property in the property selection drpdown. |
name | sh:name |
rdf:langString or xsd:string |
0..*
|
The name of the property to be displayed. Labels are multilingual, and can provide multiple labels in different languages. Lhe label in the current user language is displayed; If no label is given, the local part of the URI is used. |
tooltip | volipi:message |
rdf:langString or xsd:string |
0..*
|
The preferred tooltip that will be displayed when this entity is hovered. This can contain HTML markup. Tooltips are also multilingual, you can provide one tooltip per language, and the tooltip in the current user language is used. |
tooltip | sh:description |
rdf:langString or xsd:string |
0..*
|
The default tooltip that will be displayed when this entity is hovered, if no preferred tooltip is provided. This can contain HTML markup. |
search widget | dash:searchWidget |
IRI (config-core:SearchProperty, config-core:ListProperty, config-core:AutocompleteProperty, config-core:BooleanProperty, config-core:MapProperty, config-core:StringEqualsProperty, config-core:TimeProperty-Date, config-core:TimeProperty-Year, config-core:TimeProperty-Period, config-core:TreeProperty) |
0..1
|
An explicit search widget to use for this property. If no explicit search widget is specified, a default one is determined based on the sh:datatype and other characteristics of the property shape. |
role of the property (default label property) | dash:propertyRole |
dash:LabelRole |
0..1
|
If used with the value dash:LabelRole, indicate that this property shape describes the main label of the entities to which it is attached. This is used to fetch this property automatically in generated SPARQL queries, and to populate automatically dropdowns and autocomplete search with this property. |
class (of the property value) | sh:class |
IRI |
0..1
|
Defines the entity in the configuration that is the value of this property. References the URI of a class that is itself referred to by an sh:targetClass from a NodeShape. |
node shape (of the property value) | sh:node |
IRI |
0..1
|
Defines the entity in the configuration that is the value of this property. References a NodeShape that describes the target entity of the property. If no sh:class or sh:node is found, then a default behavior is proposed |
datasource (for lists and autocomplete) | config-datasources:datasource |
BlankNodeOrIRI |
0..1
|
The datasource to populate the widget of the property. If not provided, a default datasource is used. |
datasource (for tree childrens) | config-datasources:treeChildrenDatasource |
BlankNodeOrIRI |
0..1
|
The datasource to populate the children node of a node in a tree widget |
datasource (for tree roots) | config-datasources:treeRootsDatasource |
BlankNodeOrIRI |
0..1
|
The datasource to populate the root nodes of a tree widget |
or | sh:or |
BlankNodeOrIRI |
0..1
|
Indicates alternatives for either multiple datatypes (e.g. xsd:string or xsd:dateTime), or multiple sh:class/sh:node, or different node kinds (e.g. IRI or Literal). The expected values are nodes with either an sh:datatype or an sh:class or an sh:node or an sh:nodeKind. 2 levels of sh:or are supported to deal with properties that can be either IRI or literals, and then indicate the sh:class(es) of the IRI shape, and the sh:datatype(s) of the literal shape. The actual list value of sh:or can be either a blank node or an IRI. Example : property with 2 datatypes : ([sh:datatype xsd:string][sh:datatype xsd:dateTime]), Example : property either IRI or literal ([sh:nodeKind sh:IRI; sh:class ex:class1][sh:nodeKind sh:Literal sh:or([sh:datatype xsd:string][sh:datatype xsd:date])]) |