sparnatural
Version:
Visual client-side SPARQL query builder and knowledge graph exploration tool
466 lines (418 loc) • 20.1 kB
text/turtle
schema: <http://schema.org/> .
volipi: <http://data.sparna.fr/ontologies/volipi#> .
owl: <http://www.w3.org/2002/07/owl#> .
xsd: <http://www.w3.org/2001/XMLSchema#> .
skosthes: <http://purl.org/iso25964/skos-thes#> .
rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
geo: <http://www.opengis.net/ont/geosparql#> .
qb: <http://purl.org/linked-data/cube#> .
dct: <http://purl.org/dc/terms/> .
doap: <http://usefulinc.com/ns/doap#> .
sh: <http://www.w3.org/ns/shacl#> .
dcat: <http://www.w3.org/ns/dcat#> .
euvoc: <http://publications.europa.eu/ontology/euvoc#> .
prov: <http://www.w3.org/ns/prov#> .
foaf: <http://xmlns.com/foaf/0.1/> .
adms: <http://www.w3.org/ns/adms#> .
org: <http://www.w3.org/ns/org#> .
xls2rdf: <https://xls2rdf.sparna.fr/vocabulary#> .
this: <http://data.mydomain.com/sparnatural-page/sparnatural-config/> .
dbpedia: <http://dbpedia.org/ontology/> .
odb: <http://example.com/ontology/odb#> .
core: <http://data.sparna.fr/ontologies/sparnatural-config-core#> .
datasources: <http://data.sparna.fr/ontologies/sparnatural-config-datasources#> .
rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
dash: <http://datashapes.org/dash#> .
dc: <http://purl.org/dc/elements/1.1/> .
skos: <http://www.w3.org/2004/02/skos/core#> .
skosxl: <http://www.w3.org/2008/05/skos-xl#> .
<http://data.mydomain.com/sparnatural-page/sparnatural-config> a owl:Ontology .
this:Vehicle a sh:NodeShape;
sh:order "1"^^xsd:integer;
volipi:iconName "fa-solid fa-car";
sh:targetClass odb:Vehicle;
sh:nodeKind sh:IRI;
rdfs:label "Vehicle", "Véhicule";
sh:description "A vehicle is a car model for a specific brand.", "Un véhicule est un modèle de voiture pour une marque spécifique.";
sh:property this:Vehicle_VIN, this:Vehicle_hasManufacturer, this:Vehicle_hasDiagnosis,
this:Vehicle_weightInKg .
this:Manufacturer a sh:NodeShape;
sh:order "2"^^xsd:integer;
volipi:iconName "fa-solid fa-industry";
sh:targetClass odb:Manufacturer;
sh:nodeKind sh:IRI;
rdfs:label "Manufacturer", "Constructeur";
sh:description "A car manufacturer is a company whose main activity is the design, construction and marketing of cars.",
"Un constructeur automobile est une entreprise qui a pour activité principale la conception, la construction et la commercialisation de voitures.";
sh:property this:Manufacturer_name .
this:Diagnostic a sh:NodeShape;
sh:order "3"^^xsd:integer;
volipi:iconName "fa-solid fa-stethoscope";
sh:targetClass odb:Diagnostic;
sh:nodeKind sh:IRI;
rdfs:label "Diagnosis", "Diagnostic";
sh:description "A diagnosis identifies a possible problem on your vehicle. You can request a diagnosis when you suspect a breakdown or malfunction. Using an auto diagnosis kit, the mechanic identifies the problem with your vehicle.",
"Un diagnostic permet d'identifier un éventuel problème sur votre véhicule. Vous pouvez demander un diagnostic quand vous suspectez une panne ou un dysfonctionnement. À l'aide d'une valise de diagnostic auto, le mécanicien identifie le problème subi par votre véhicule.";
sh:property this:Diagnostic_diagnosticDate, this:Diagnostic_analysedVehicle, this:Diagnostic_hasResults,
this:Diagnostic_diagnosticPlace, this:Diagnostic_returnsCode .
this:Error a sh:NodeShape;
sh:order "4"^^xsd:integer;
volipi:iconName "fa-solid fa-circle-exclamation";
sh:targetClass odb:Error;
sh:nodeKind sh:IRI;
rdfs:label "Error", "Erreur";
sh:description "An error is an element that comes up during a diagnosis, which indicates that the vehicle on which the analysis was carried out is encountering a problem.",
"Une erreur est un élément qui remonte lors d'un diagnostic, qui indique que le véhicule sur lequel on a fait l'analyse rencontre un problème.";
sh:deactivated "true"^^xsd:boolean;
sh:property this:Error_alreadyRaised, this:Error_hasErrorCode .
this:ErrorCode a sh:NodeShape;
sh:order "5"^^xsd:integer;
volipi:iconName "fa-solid fa-ticket";
sh:targetClass odb:ErrorCode;
sh:nodeKind sh:IRI;
rdfs:label "Error code", "Code d'erreur";
sh:description "An error code is a set of numbers following a letter corresponding to a problem detected on your vehicle. The letter gives an indication of the family of the defect.",
"Un code erreur, est un ensemble de chiffres suivant une lettre correspondant à un problème détecté sur votre véhicule. La lettre donne une indication sur la famille du défaut.";
sh:property this:ErrorCode_errorCode, this:ErrorCode_hasSymptom, this:ErrorCode_hasComponent,
this:ErrorCode_hasComponent_tree .
this:Symptom a sh:NodeShape;
sh:order "6"^^xsd:integer;
volipi:iconName "fa-solid fa-arrows-to-eye";
sh:targetClass odb:Symptom;
sh:nodeKind sh:IRI;
rdfs:label "Symptom", "Symptôme";
sh:description "A symptom is a phenomenon, perceptible or observable character linked to a state, a problem that it allows to detect, of which it is the sign.",
"Un symptôme est un Phénomène, caractère perceptible ou observable lié à un état, un problème qu'il permet de déceler, dont il est le signe.";
sh:deactivated "true"^^xsd:boolean;
sh:property this:Symptom_label .
this:Component a sh:NodeShape;
sh:order "7"^^xsd:integer;
volipi:iconName "fa-solid fa-gear";
sh:targetClass odb:Component;
sh:nodeKind sh:IRI;
rdfs:label "Component", "Composant";
sh:description "A class representing a component of a vehicle.", "Une classe représentant un composant d'un véhicule.";
sh:property this:Component_componentCode, this:Component_label, this:Component_label_or_code .
this:TrueFalse a sh:NodeShape;
sh:order "8"^^xsd:integer;
volipi:iconName "fa-solid fa-yin-yang";
sh:nodeKind sh:Literal;
rdfs:label "True / False", "Vrai / Faux" .
this:Search a sh:NodeShape;
sh:order "9"^^xsd:integer;
volipi:iconName "fa-solid fa-search";
sh:nodeKind sh:Literal;
rdfs:label "Search...", "Rechercher...";
sh:description "Use this to search on labels and description", "Sélectionnez cette entrée pour rechercher sur les libellés et les descriptions" .
this:RootComponent a sh:NodeShape;
sh:order "10"^^xsd:integer;
volipi:iconName "fa-solid fa-gear";
sh:nodeKind sh:IRI;
rdfs:label "Root component", "Root component";
sh:description "Components at the top of components tree", "Sélectionnez cette entrée pour rechercher sur les libellés et les descriptions";
sh:node this:Component;
sh:target this:RootComponent-target;
sh:property this:RootComponent_criticity .
this:RootComponent-target sh:select """SELECT $this
WHERE {
$this a <http://example.com/ontology/odb#Component> .
FILTER NOT EXISTS {
$this <http://example.com/ontology/odb#parentComponent> ?parent
}
}""" .
this:Vehicle_VIN sh:path odb:VIN;
sh:order "1";
sh:name "has VIN", "a pour VIN";
sh:description "Specifies the Vehicle Identification Number (VIN) of the vehicle.",
"Spécifie le numéro d'identification du véhicule (VIN).";
sh:minCount "1"^^xsd:integer;
sh:maxCount "1"^^xsd:integer;
sh:nodeKind sh:Literal;
sh:datatype xsd:string;
dash:searchWidget core:AutocompleteProperty;
dash:propertyRole dash:LabelRole;
core:enableOptional "false"^^xsd:boolean;
core:enableNegation "false"^^xsd:boolean .
this:Vehicle_hasManufacturer sh:path odb:hasManufacturer;
sh:order "2";
sh:name "has manufacturer", "a pour constructeur";
sh:description "Specifies the manufacturer of the vehicle.", "Spécifie le constructeur d'un véhicule.";
sh:minCount "1"^^xsd:integer;
sh:maxCount "1"^^xsd:integer;
sh:nodeKind sh:IRI;
sh:node this:Manufacturer;
dash:searchWidget core:ListProperty;
core:enableOptional "false"^^xsd:boolean;
core:enableNegation "false"^^xsd:boolean .
this:Vehicle_hasDiagnosis sh:path _:17d00ff6071d48b4a355f4284ed63c331845;
sh:order "3";
sh:name "has diagnosis", "a pour diagnostic";
sh:description "The property is the inverse of odb:analysedVehicle.", "Propriété inverse de odb:analysedVehicle.";
sh:nodeKind sh:IRI;
sh:node this:Diagnostic;
dash:searchWidget core:NonSelectableProperty .
_:17d00ff6071d48b4a355f4284ed63c331845 sh:inversePath odb:analysedVehicle .
this:Vehicle_weightInKg sh:path odb:weightInKg;
sh:order "4";
sh:name "weight in kg", "poids en kg";
sh:minCount "1"^^xsd:integer;
sh:maxCount "1"^^xsd:integer;
sh:nodeKind sh:Literal;
sh:datatype xsd:integer;
dash:searchWidget core:NumberProperty;
core:enableOptional "false"^^xsd:boolean;
core:enableNegation "false"^^xsd:boolean .
this:Manufacturer_name sh:path odb:name;
sh:order "1";
sh:name "has name", "nom";
sh:description "Specifies the name of the manufacturer.", "Spécifie le nom du constructeur.";
sh:minCount "1"^^xsd:integer;
sh:maxCount "1"^^xsd:integer;
sh:nodeKind sh:Literal;
sh:datatype xsd:string;
dash:searchWidget core:NonSelectableProperty;
dash:propertyRole dash:LabelRole;
core:enableOptional "false"^^xsd:boolean;
core:enableNegation "false"^^xsd:boolean .
this:Diagnostic_diagnosticDate sh:path odb:diagnosticDate;
sh:order "1";
sh:name "has diagnosis date", "date du diagnostic";
sh:description "Defines the date on which the diagnosis occurs.", "Définit la date à laquelle le diagnostic a eu lieu.";
sh:minCount "1"^^xsd:integer;
sh:maxCount "1"^^xsd:integer;
sh:nodeKind sh:Literal;
sh:datatype xsd:date;
dash:searchWidget core:TimeProperty-Date;
core:enableOptional "false"^^xsd:boolean;
core:enableNegation "false"^^xsd:boolean .
this:Diagnostic_analysedVehicle sh:path odb:analysedVehicle;
sh:order "2";
sh:name "analysed vehicle", "véhicule analysé";
sh:description "Specifies that the vehicle has been analyzed, to identify a potential problem.",
"Spécifie que le véhicule a été analysé, pour identifier un potentiel problème.";
sh:minCount "1"^^xsd:integer;
sh:maxCount "1"^^xsd:integer;
sh:nodeKind sh:IRI;
sh:node this:Vehicle;
dash:searchWidget core:AutocompleteProperty;
datasources:datasource this:search_VIN_strstarts;
core:enableOptional "false"^^xsd:boolean;
core:enableNegation "false"^^xsd:boolean .
this:Diagnostic_hasResults sh:path odb:hasResults;
sh:order "3";
sh:name "has results", "a pour résultat";
sh:description "Specifies the results, from the analysis.", "Spécifie les résultats issus de l'analyse.";
sh:nodeKind sh:IRI;
sh:node this:Error;
dash:searchWidget core:NonSelectableProperty;
core:enableOptional "false"^^xsd:boolean;
core:enableNegation "false"^^xsd:boolean .
this:Diagnostic_diagnosticPlace sh:path odb:diagnosticPlace;
sh:order "4";
sh:name "has diagnosis place", "lieu du diagnostic";
sh:description "Defines the place where the diagnosis occurs.", "Définit le lieu où le diagnostic a été effectué.";
sh:minCount "1"^^xsd:integer;
sh:maxCount "1"^^xsd:integer;
sh:nodeKind sh:Literal;
sh:datatype geo:wktLiteral;
dash:searchWidget core:MapProperty;
core:enableOptional "false"^^xsd:boolean;
core:enableNegation "false"^^xsd:boolean .
this:Diagnostic_returnsCode sh:path _:17d00ff6071d48b4a355f4284ed63c331846;
sh:order "5";
sh:name "returns code", "renvoie le code";
sh:description "The property is a shortcut between Diagnosis and Error Code.",
"Cette propriété est un raccourci entre Diagnostic et Code d'erreur.";
sh:nodeKind sh:IRI;
sh:node this:ErrorCode;
dash:searchWidget core:ListProperty;
core:enableOptional "false"^^xsd:boolean;
core:enableNegation "false"^^xsd:boolean .
_:17d00ff6071d48b4a355f4284ed63c331846 rdf:first odb:hasResults;
rdf:rest _:17d00ff6071d48b4a355f4284ed63c331847 .
_:17d00ff6071d48b4a355f4284ed63c331847 rdf:first odb:hasErrorCode;
rdf:rest rdf:nil .
this:Error_alreadyRaised sh:path odb:alreadyRaised;
sh:order "1";
sh:name "already raised", "déjà signalée";
sh:description "Attribute indicating whether an error has already been detected previously.",
"Attribut permettant de savoir si une erreur a déjà été relevée précédemment.";
sh:maxCount "1"^^xsd:integer;
sh:nodeKind sh:Literal;
sh:datatype xsd:boolean;
sh:node this:TrueFalse;
dash:searchWidget core:BooleanProperty .
this:Error_hasErrorCode sh:path odb:hasErrorCode;
sh:order "2";
sh:name "has error code", "a pour code d'erreur";
sh:description "Specifies the error code relating to an error reported during a diagnostic.",
"Spécifie le code erreur relatif à une erreur remontée lors d'un diagnostic.";
sh:minCount "1"^^xsd:integer;
sh:maxCount "1"^^xsd:integer;
sh:nodeKind sh:IRI;
sh:node this:ErrorCode;
dash:searchWidget core:ListProperty;
core:enableOptional "false"^^xsd:boolean;
core:enableNegation "false"^^xsd:boolean .
this:ErrorCode_errorCode sh:path odb:errorCode;
sh:order "1";
sh:minCount "1"^^xsd:integer;
sh:maxCount "1"^^xsd:integer;
sh:nodeKind sh:Literal;
sh:datatype xsd:string;
dash:searchWidget core:NonSelectableProperty;
dash:propertyRole dash:LabelRole;
sh:deactivated "true"^^xsd:boolean;
core:enableOptional "false"^^xsd:boolean;
core:enableNegation "false"^^xsd:boolean .
this:ErrorCode_hasSymptom sh:path odb:hasSymptom;
sh:order "2";
sh:name "has symptom", "a pour symptôme";
sh:description "Specifies the symptoms associated with an error code.", "Spécifie le symptôme associé à un code erreur.";
sh:nodeKind sh:IRI;
sh:node this:Symptom;
dash:searchWidget core:ListProperty;
datasources:datasource datasources:list_rdfslabel_count .
this:ErrorCode_hasComponent sh:path odb:hasComponent;
sh:order "3";
sh:name "has component (list)", "concerne le composant (liste)";
sh:description "Specifies the components impacted by an error code.", "Spécifie le composant impacté par un code erreur.";
sh:nodeKind sh:IRI;
sh:node this:Component;
dash:searchWidget core:ListProperty;
datasources:datasource this:list_componentCode_alpha .
this:ErrorCode_hasComponent_tree sh:path odb:hasComponent;
sh:order "4";
sh:name "has component (tree)", "concerne le composant (arbre)";
sh:description "Specifies the components impacted by an error code.", "Spécifie le composant impacté par un code erreur.";
sh:nodeKind sh:IRI;
sh:node this:Component;
dash:searchWidget core:TreeProperty;
datasources:treeRootsDatasource this:tree_root_Component;
datasources:treeChildrenDatasource this:tree_children_Component .
this:Symptom_label sh:path rdfs:label;
sh:order "1";
sh:name "label", "a pour libellé";
sh:description "Specifies the name of the object.", "Spécifie le nom du Sympôme";
sh:minCount "1"^^xsd:integer;
sh:maxCount "1"^^xsd:integer;
sh:nodeKind sh:Literal;
sh:datatype rdf:langString;
dash:searchWidget core:SearchProperty;
dash:propertyRole dash:LabelRole;
core:enableOptional "false"^^xsd:boolean;
core:enableNegation "false"^^xsd:boolean .
this:Component_componentCode sh:path odb:componentCode;
sh:order "1";
sh:name "has component code", "a pour code composant";
sh:description "Specifies the unique code of the component.", "Spécifie le code unique relatif à un composant.";
sh:minCount "1"^^xsd:integer;
sh:maxCount "1"^^xsd:integer;
sh:nodeKind sh:Literal;
sh:datatype xsd:string;
dash:searchWidget core:SearchProperty;
sh:deactivated "true"^^xsd:boolean;
core:enableOptional "false"^^xsd:boolean;
core:enableNegation "false"^^xsd:boolean .
this:Component_label sh:path rdfs:label;
sh:order "2";
sh:name "label", "a pour libellé";
sh:description "Specifies the name of the object.", "Spécifie le nom du Composant";
sh:minCount "1"^^xsd:integer;
sh:nodeKind sh:Literal;
sh:datatype rdf:langString;
dash:searchWidget core:SearchProperty;
dash:propertyRole dash:LabelRole;
core:enableOptional "false"^^xsd:boolean;
core:enableNegation "false"^^xsd:boolean .
this:Component_label_or_code sh:path _:17d00ff6071d48b4a355f4284ed63c331848;
sh:order "3";
sh:name "label or code", "a pour libellé ou code";
sh:description "Allows to search a label or a code", "Permet de rechercher un libellé ou un code.";
sh:nodeKind sh:Literal;
sh:node this:Search;
dash:searchWidget core:SearchProperty .
_:17d00ff6071d48b4a355f4284ed63c331848 sh:alternativePath _:17d00ff6071d48b4a355f4284ed63c331849 .
_:17d00ff6071d48b4a355f4284ed63c331849 rdf:first odb:componentCode;
rdf:rest _:17d00ff6071d48b4a355f4284ed63c331850 .
_:17d00ff6071d48b4a355f4284ed63c331850 rdf:first rdfs:label;
rdf:rest rdf:nil .
this:RootComponent_criticity sh:path odb:criticity;
sh:order "1";
sh:name "criticity", "criticité";
sh:description "Cricity of the component", "Criticité du composant";
sh:nodeKind sh:Literal;
sh:datatype xsd:byte;
dash:searchWidget core:NumberProperty .
this:list_componentCode_alpha a datasources:SparqlDatasource;
datasources:queryString """PREFIX odb: <http://example.com/ontology/odb#>
SELECT DISTINCT ?uri ?label
WHERE {
?domain $type $domain .
?domain $property ?uri .
# Note how the range criteria is not used in this query
FILTER(isIRI(?uri))
?uri rdfs:label ?libelleComposant .
FILTER(lang(?libelleComposant) = \"\" || lang(?libelleComposant) = $lang)
?uri odb:componentCode ?codeComposant .
# Concat component code + component label
BIND(CONCAT(STR(?codeComposant),\" - \",STR(?libelleComposant)) AS ?label)
}
ORDER BY UCASE(?label)
LIMIT 500""" .
this:tree_root_Component a datasources:SparqlDatasource;
datasources:queryString """PREFIX odb: <http://example.com/ontology/odb#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#label>
SELECT ?uri ?label ?hasChildren (COUNT(?x) AS ?count) WHERE {
?uri a odb:Component .
# Keep only roots, that do not have any parent
FILTER NOT EXISTS {
?uri odb:parentComponent ?parent .
}
?uri rdfs:label ?libelleComposant .
FILTER(lang(?libelleComposant) = \"\" || lang(?libelleComposant) = $lang)
?uri odb:componentCode ?codeComposant .
# Concat component code + component label
BIND(CONCAT(STR(?codeComposant),\" - \",STR(?libelleComposant)) AS ?label)
OPTIONAL { ?uri ^odb:parentComponent ?children }
BIND(IF(bound(?children),true,false) AS ?hasChildren)
OPTIONAL {
?x a $domain .
?x $property ?uri .
}
}
GROUP BY ?uri ?label ?hasChildren
ORDER BY ?label""" .
this:tree_children_Component a datasources:SparqlDatasource;
datasources:queryString """PREFIX odb: <http://example.com/ontology/odb#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#label>
SELECT DISTINCT ?uri ?label ?hasChildren (COUNT(?x) AS ?count) WHERE {
$node ^odb:parentComponent ?uri .
?uri rdfs:label ?libelleComposant .
FILTER(lang(?libelleComposant) = \"\" || lang(?libelleComposant) = $lang)
?uri odb:componentCode ?codeComposant .
# Concat component code + component label
BIND(CONCAT(STR(?codeComposant),\" - \",STR(?libelleComposant)) AS ?label)
OPTIONAL { ?uri ^odb:parentComponent ?children }
BIND(IF(bound(?children),true,false) AS ?hasChildren)
OPTIONAL {
?x a $domain .
?x $property ?uri .
}
}
GROUP BY ?uri ?label ?hasChildren
ORDER BY ?label""" .
this:query_search_label_contains_langfr a datasources:SPARQLQuery;
datasources:queryString """SELECT DISTINCT ?uri ?label
WHERE {
?domain a $domain .
?domain $property ?uri .
?uri a $range .
?uri $labelPath ?label .
FILTER(isIRI(?uri))
FILTER(CONTAINS(LCASE(STR(?label)), LCASE(\"$key\")))
FILTER(lang(?label) = '' || lang(?label) = \"fr\")
}
ORDER BY UCASE(?label)
LIMIT 50""";
rdfs:comment "A query that will search in labels using contains function, first in the user language but will default to French." .