@prefix xsd: 	   <http://www.w3.org/2001/XMLSchema#> . 
@prefix rdf: 	   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . 
@prefix rdfs: 	   <http://www.w3.org/2000/01/rdf-schema#> . 
@prefix owl: 	   <http://www.w3.org/2002/07/owl#> . 

@prefix skos: 	   <http://www.w3.org/2004/02/skos/core#> . 
@prefix vann: 	   <http://purl.org/vocab/vann/> . 
@prefix dc: 	   <http://purl.org/dc/elements/1.1/> . 
@prefix foaf: 	   <http://xmlns.com/foaf/0.1/> . 
@prefix dcterms:   <http://purl.org/dc/terms/> . 
@prefix cc:        <http://creativecommons.org/ns#> .
@prefix sh: 	   <http://www.w3.org/ns/shacl#> . 
@prefix shsh:      <http://www.w3.org/ns/shacl-shacl#> .

@prefix ex: 	   <http://example.net/ns#> . 

@prefix ottr: 	   <http://ns.ottr.xyz/0.4/> . 

@prefix o-wottr:   <http://spec.ottr.xyz/wOTTR/0.4.4/tpl/> . 


_:SHACLVocabularyTokenShape a sh:NodeShape ;
  sh:targetNode ex:ANY_NODE ; ## matches any node
  sh:name "SHACL vocabulary element." ;
  sh:message "Unrecognised SHACL vocabulary element. Check spelling." ;
  sh:sparql [ a sh:SPARQLConstraint ;
    sh:select """
      PREFIX sh: <http://www.w3.org/ns/shacl#> 
      SELECT ?value
      WHERE { { ?value ?p ?o }
        UNION { ?s ?value ?o }
        UNION { ?s ?p ?value }
      FILTER (isIRI(?value) && STRSTARTS(STR(?value), "http://www.w3.org/ns/shacl#"))
      FILTER (?value NOT IN ( sh:AbstractResult, sh:AndConstraintComponent, sh:AndConstraintComponent-and, sh:BlankNode, sh:BlankNodeOrIRI, sh:BlankNodeOrLiteral, sh:ClassConstraintComponent, sh:ClassConstraintComponent-class, sh:ClosedConstraintComponent, sh:ClosedConstraintComponent-closed, sh:ClosedConstraintComponent-ignoredProperties, sh:ConstraintComponent, sh:DatatypeConstraintComponent, sh:DatatypeConstraintComponent-datatype, sh:DisjointConstraintComponent, sh:DisjointConstraintComponent-disjoint, sh:EqualsConstraintComponent, sh:EqualsConstraintComponent-equals, sh:ExpressionConstraintComponent, sh:ExpressionConstraintComponent-expression, sh:Function, sh:HasValueConstraintComponent, sh:HasValueConstraintComponent-hasValue, sh:IRI, sh:IRIOrLiteral, sh:InConstraintComponent, sh:InConstraintComponent-in, sh:Info, sh:JSConstraint, sh:JSConstraint-js, sh:JSConstraintComponent, sh:JSExecutable, sh:JSFunction, sh:JSLibrary, sh:JSRule, sh:JSTarget, sh:JSTargetType, sh:JSValidator, sh:LanguageInConstraintComponent, sh:LanguageInConstraintComponent-languageIn, sh:LessThanConstraintComponent, sh:LessThanConstraintComponent-lessThan, sh:LessThanOrEqualsConstraintComponent, sh:LessThanOrEqualsConstraintComponent-lessThanOrEquals, sh:Literal, sh:MaxCountConstraintComponent, sh:MaxCountConstraintComponent-maxCount, sh:MaxExclusiveConstraintComponent, sh:MaxExclusiveConstraintComponent-maxExclusive, sh:MaxInclusiveConstraintComponent, sh:MaxInclusiveConstraintComponent-maxInclusive, sh:MaxLengthConstraintComponent, sh:MaxLengthConstraintComponent-maxLength, sh:MinCountConstraintComponent, sh:MinCountConstraintComponent-minCount, sh:MinExclusiveConstraintComponent, sh:MinExclusiveConstraintComponent-minExclusive, sh:MinInclusiveConstraintComponent, sh:MinInclusiveConstraintComponent-minInclusive, sh:MinLengthConstraintComponent, sh:MinLengthConstraintComponent-minLength, sh:NodeConstraintComponent, sh:NodeConstraintComponent-node, sh:NodeKind, sh:NodeKindConstraintComponent, sh:NodeKindConstraintComponent-nodeKind, sh:NodeShape, sh:NotConstraintComponent, sh:NotConstraintComponent-not, sh:OrConstraintComponent, sh:OrConstraintComponent-or, sh:Parameter, sh:Parameterizable, sh:PatternConstraintComponent, sh:PatternConstraintComponent-flags, sh:PatternConstraintComponent-pattern, sh:PrefixDeclaration, sh:PropertyConstraintComponent, sh:PropertyConstraintComponent-property, sh:PropertyGroup, sh:PropertyShape, sh:QualifiedMaxCountConstraintComponent, sh:QualifiedMaxCountConstraintComponent-qualifiedMaxCount, sh:QualifiedMaxCountConstraintComponent-qualifiedValueShape, sh:QualifiedMaxCountConstraintComponent-qualifiedValueShapesDisjoint, sh:QualifiedMinCountConstraintComponent, sh:QualifiedMinCountConstraintComponent-qualifiedMinCount, sh:QualifiedMinCountConstraintComponent-qualifiedValueShape, sh:QualifiedMinCountConstraintComponent-qualifiedValueShapesDisjoint, sh:ResultAnnotation, sh:Rule, sh:SPARQLAskExecutable, sh:SPARQLAskValidator, sh:SPARQLConstraint, sh:SPARQLConstraintComponent, sh:SPARQLConstraintComponent-sparql, sh:SPARQLConstructExecutable, sh:SPARQLExecutable, sh:SPARQLFunction, sh:SPARQLRule, sh:SPARQLSelectExecutable, sh:SPARQLSelectValidator, sh:SPARQLTarget, sh:SPARQLTargetType, sh:SPARQLUpdateExecutable, sh:Severity, sh:Shape, sh:Target, sh:TargetType, sh:TripleRule, sh:UniqueLangConstraintComponent, sh:UniqueLangConstraintComponent-uniqueLang, sh:ValidationReport, sh:ValidationResult, sh:Validator, sh:Violation, sh:Warning, sh:XoneConstraintComponent, sh:XoneConstraintComponent-xone, sh:alternativePath, sh:and, sh:annotationProperty, sh:annotationValue, sh:annotationVarName, sh:ask, sh:class, sh:closed, sh:condition, sh:conforms, sh:construct, sh:datatype, sh:deactivated, sh:declare, sh:defaultValue, sh:description, sh:detail, sh:disjoint, sh:entailment, sh:equals, sh:expression, sh:filterShape, sh:flags, sh:focusNode, sh:group, sh:hasValue, sh:ignoredProperties, sh:in, sh:intersection, sh:inversePath, sh:js, sh:jsFunctionName, sh:jsLibrary, sh:jsLibraryURL, sh:labelTemplate, sh:languageIn, sh:lessThan, sh:lessThanOrEquals, sh:maxCount, sh:maxExclusive, sh:maxInclusive, sh:maxLength, sh:message, sh:minCount, sh:minExclusive, sh:minInclusive, sh:minLength, sh:name, sh:namespace, sh:node, sh:nodeKind, sh:nodeValidator, sh:nodes, sh:not, sh:object, sh:oneOrMorePath, sh:optional, sh:or, sh:order, sh:parameter, sh:path, sh:pattern, sh:predicate, sh:prefix, sh:prefixes, sh:property, sh:propertyValidator, sh:qualifiedMaxCount, sh:qualifiedMinCount, sh:qualifiedValueShape, sh:qualifiedValueShapesDisjoint, sh:result, sh:resultAnnotation, sh:resultMessage, sh:resultPath, sh:resultSeverity, sh:returnType, sh:rule, sh:select, sh:severity, sh:shapesGraph, sh:shapesGraphWellFormed, sh:sourceConstraint, sh:sourceConstraintComponent, sh:sourceShape, sh:sparql, sh:subject, sh:suggestedShapesGraph, sh:target, sh:targetClass, sh:targetNode, sh:targetObjectsOf, sh:targetSubjectsOf, sh:this, sh:union, sh:uniqueLang, sh:update, sh:validator, sh:value, sh:xone, sh:zeroOrMorePath, sh:zeroOrOnePath ) ) } """ ]
.

_:OWLVocabularyTokenShape a sh:NodeShape ;
  sh:targetNode ex:ANY_NODE ; ## matches any node
  sh:name "OWL vocabulary element." ;
  sh:message "Unrecognised OWL vocabulary element. Check spelling." ;
  sh:sparql [ a sh:SPARQLConstraint ;
    sh:select """
      PREFIX owl: <http://www.w3.org/2002/07/owl#> 
      SELECT ?value 
      WHERE { { ?value ?p ?o }
        UNION { ?s ?value ?o }
        UNION { ?s ?p ?value }
      FILTER (isIRI(?value) && STRSTARTS(STR(?value), "http://www.w3.org/2002/07/owl#"))
      FILTER (?value NOT IN ( owl:AllDifferent, owl:AllDisjointClasses, owl:AllDisjointProperties, owl:Annotation, owl:AnnotationProperty, owl:AsymmetricProperty, owl:Axiom, owl:Class, owl:DataRange, owl:DatatypeProperty, owl:DeprecatedClass, owl:DeprecatedProperty, owl:FunctionalProperty, owl:InverseFunctionalProperty, owl:IrreflexiveProperty, owl:NamedIndividual, owl:NegativePropertyAssertion, owl:Nothing, owl:ObjectProperty, owl:Ontology, owl:OntologyProperty, owl:ReflexiveProperty, owl:Restriction, owl:SymmetricProperty, owl:Thing, owl:TransitiveProperty, owl:allValuesFrom, owl:annotatedProperty, owl:annotatedSource, owl:annotatedTarget, owl:assertionProperty, owl:backwardCompatibleWith, owl:bottomDataProperty, owl:bottomObjectProperty, owl:cardinality, owl:complementOf, owl:datatypeComplementOf, owl:deprecated, owl:differentFrom, owl:disjointUnionOf, owl:disjointWith, owl:distinctMembers, owl:equivalentClass, owl:equivalentProperty, owl:hasKey, owl:hasSelf, owl:hasValue, owl:imports, owl:incompatibleWith, owl:intersectionOf, owl:inverseOf, owl:maxCardinality, owl:maxQualifiedCardinality, owl:members, owl:minCardinality, owl:minQualifiedCardinality, owl:onClass, owl:onDataRange, owl:onDatatype, owl:onProperties, owl:onProperty, owl:oneOf, owl:priorVersion, owl:propertyChainAxiom, owl:propertyDisjointWith, owl:qualifiedCardinality, owl:sameAs, owl:someValuesFrom, owl:sourceIndividual, owl:targetIndividual, owl:targetValue, owl:topDataProperty, owl:topObjectProperty, owl:unionOf, owl:versionIRI, owl:versionInfo, owl:withRestrictions, owl:real, owl:rational ) ) } """ ]
.

_:RDFVocabularyTokenShape a sh:NodeShape ;
  sh:targetNode ex:ANY_NODE ; ## matches any node
  sh:name "RDF vocabulary element." ;
  sh:message "Unrecognised RDF vocabulary element. Check spelling." ;
  sh:sparql [ a sh:SPARQLConstraint ;
    sh:select """
      PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      SELECT ?value
      WHERE { { ?value ?p ?o }
        UNION { ?s ?value ?o }
        UNION { ?s ?p ?value }
      FILTER (isIRI(?value) && STRSTARTS(STR(?value), "http://www.w3.org/1999/02/22-rdf-syntax-ns#"))
      FILTER (?value NOT IN ( rdf:Alt, rdf:Bag, rdf:HTML, rdf:List, rdf:PlainLiteral, rdf:Property, rdf:Seq, rdf:Statement, rdf:XMLLiteral, rdf:first, rdf:langString, rdf:nil, rdf:object, rdf:predicate, rdf:rest, rdf:subject, rdf:type, rdf:value ) ) 
}""" ]
.

_:RDFSVocabularyTokenShape a sh:NodeShape ;
  sh:targetNode ex:ANY_NODE ; ## matches any node
  sh:name "RDFS vocabulary element." ;
  sh:message "Unrecognised RDFS vocabulary element. Check spelling." ;
  sh:sparql [ a sh:SPARQLConstraint ;
    sh:select """
      PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      SELECT ?value 
      WHERE { { ?value ?p ?o }
        UNION { ?s ?value ?o }
        UNION { ?s ?p ?value }
      FILTER (isIRI(?value) && STRSTARTS(STR(?value), "http://www.w3.org/2000/01/rdf-schema#"))
      FILTER (?value NOT IN ( rdfs:Class, rdfs:Container, rdfs:ContainerMembershipProperty, rdfs:Datatype, rdfs:Literal, rdfs:Resource, rdfs:comment, rdfs:domain, rdfs:isDefinedBy, rdfs:label, rdfs:member, rdfs:range, rdfs:seeAlso, rdfs:subClassOf, rdfs:subPropertyOf ) ) }  """ ]
.
