![JAR search and dependency download from the Maven repository](/logo.png)
data-shapes-test-suite.tests.sparql.node.sparql-002.ttl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rdf4j-shacl-testsuite Show documentation
Show all versions of rdf4j-shacl-testsuite Show documentation
Test suite for the SHACL Shapes Constraint Language
The newest version!
@prefix dash: .
@prefix ex: .
@prefix mf: .
@prefix owl: .
@prefix rdf: .
@prefix rdfs: .
@prefix sh: .
@prefix sht: .
@prefix xsd: .
sh:declare [
rdf:type sh:PrefixDeclaration ;
sh:namespace "http://datashapes.org/sh/tests/sparql/node/sparql-002.test#"^^xsd:anyURI ;
sh:prefix "ex" ;
] ;
.
ex:InvalidCountry
rdf:type ex:Country ;
ex:germanLabel "Spain"@en ;
.
ex:LanguageExampleShape
rdf:type sh:NodeShape ;
rdf:type sh:SPARQLConstraint ;
sh:message "Values are literals with German language tag." ;
sh:prefixes ;
sh:select """
SELECT $this (ex:germanLabel AS ?path) ?value
WHERE {
$this ex:germanLabel ?value .
FILTER (!isLiteral(?value) || !langMatches(lang(?value), \"de\"))
}
""" ;
sh:sparql ex:LanguageExampleShape ;
sh:targetClass ex:Country ;
.
ex:ValidCountry
rdf:type ex:Country ;
ex:germanLabel "Spanien"@de ;
.
<>
rdf:type mf:Manifest ;
mf:entries (
) ;
.
rdf:type sht:Validate ;
rdfs:label "Test of sh:sparql at node shape 002" ;
mf:action [
sht:dataGraph <> ;
sht:shapesGraph <> ;
] ;
mf:result [
rdf:type sh:ValidationReport ;
sh:conforms "false"^^xsd:boolean ;
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:InvalidCountry ;
sh:resultPath ex:germanLabel ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraint ex:LanguageExampleShape ;
sh:sourceConstraintComponent sh:SPARQLConstraintComponent ;
sh:sourceShape ex:LanguageExampleShape ;
sh:value "Spain"@en ;
] ;
] ;
mf:status sht:approved ;
.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy