All Downloads are FREE. Search and download functionalities are using the official Maven repository.

data-shapes-test-suite.tests.sparql.property.sparql-001.ttl Maven / Gradle / Ivy

The newest version!
@prefix dash:  .
@prefix ex:  .
@prefix mf:  .
@prefix owl:  .
@prefix rdf:  .
@prefix rdfs:  .
@prefix sh:  .
@prefix sht:  .
@prefix xsd:  .

ex:Country
  rdf:type rdfs:Class ;
.
ex:InvalidCountry
  rdf:type ex:Country ;
  ex:germanLabel "Spain"@en ;
.
ex:LanguageExamplePropertyShape
  rdf:type sh:PropertyShape ;
  sh:path ex:germanLabel ;
  sh:sparql ex:LanguageExamplePropertyShape-sparql ;
  sh:targetClass ex:Country ;
.
ex:LanguageExamplePropertyShape-sparql
  rdf:type sh:SPARQLConstraint ;
  sh:message "Values are literals with German language tag." ;
  sh:prefixes ex: ;
  sh:select """
		SELECT $this ?value
		WHERE {
			$this $PATH ?value .
			FILTER (!isLiteral(?value) || !langMatches(lang(?value), \"de\"))
		}
		""" ;
.
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 property shape 001" ;
  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:LanguageExamplePropertyShape-sparql ;
          sh:sourceConstraintComponent sh:SPARQLConstraintComponent ;
          sh:sourceShape ex:LanguageExamplePropertyShape ;
          sh:value "Spain"@en ;
        ] ;
    ] ;
  mf:status sht:approved ;
.




© 2015 - 2025 Weber Informatics LLC | Privacy Policy