Skip to content

Instantly share code, notes, and snippets.

@James-Hudson3010
Last active April 14, 2020 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save James-Hudson3010/b6383ce102a188358fef1177555ad781 to your computer and use it in GitHub Desktop.
Save James-Hudson3010/b6383ce102a188358fef1177555ad781 to your computer and use it in GitHub Desktop.
Validation Errors
@prefix hr: <http://learningsparql.com/ns/humanResources#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
hr:Employee a rdfs:Class .
hr:BadThree rdfs:comment "some comment about missing" .
hr:BadTwo a hr:BadOne .
hr:YetAnother a hr:Another .
hr:YetAnotherName a hr:AnotherName .
hr:Another a hr:Employee .
hr:AnotherName a hr:name .
hr:BadOne a hr:Dangling .
hr:name a rdf:Property .
schema:SchemaShape
a sh:NodeShape ;
sh:target [
a sh:SPARQLTarget ;
sh:prefixes hr: ;
sh:select """
SELECT ?this
WHERE {
?this ?p ?o .
}
""" ;
] ;
sh:property [
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:nodeKind sh:IRI ;
sh:hasValue rdfs:Class
] ;
.
@prefix hr: <http://learningsparql.com/ns/humanResources#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] a sh:ValidationReport ;
sh:conforms false ;
sh:result [ a sh:ValidationResult ;
sh:focusNode hr:BadTwo ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode hr:AnotherName ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode hr: ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode sh:IRI ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode rdfs:comment ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode sh:SPARQLTarget ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode [ a rdfs:Resource,
sh:SPARQLTarget ;
sh:prefixes hr: ;
sh:select """
SELECT ?this
WHERE {
?this ?p ?o .
}
""" ] ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode rdfs:subPropertyOf ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode sh:hasValue ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode "some comment about missing" ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode rdf:rest ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode sh:select ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode sh:target ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode rdfs:subClassOf ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode hr:Dangling ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode rdfs:Class ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode rdf:type ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode hr:YetAnotherName ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode rdf:first ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode [ a rdfs:Resource ;
sh:zeroOrMorePath rdf:type ] ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode hr:BadThree ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode schema:SchemaShape ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode ( [ a rdfs:Resource ;
sh:zeroOrMorePath rdf:type ] ) ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode () ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode [ a rdfs:Resource ;
sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ a rdfs:Resource ;
sh:zeroOrMorePath rdf:type ] ) ] ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode sh:nodeKind ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode hr:BadOne ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode sh:zeroOrMorePath ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode rdf:Property ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode sh:prefixes ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode ( rdf:type [ a rdfs:Resource ;
sh:zeroOrMorePath rdf:type ] ) ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode sh:property ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode """
SELECT ?this
WHERE {
?this ?p ?o .
}
""" ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode sh:path ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode hr:name ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ],
[ a sh:ValidationResult ;
sh:focusNode sh:NodeShape ;
sh:resultPath ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:HasValueConstraintComponent ;
sh:sourceShape [ sh:hasValue rdfs:Class ;
sh:nodeKind sh:IRI ;
sh:path ( rdf:type [ sh:zeroOrMorePath rdf:type ] ) ] ] .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment