Exact release
QUDT Schema
@erden/qudt-schema-3-4 3.4.0
Canonical IRI: http://qudt.org/3.4.0/schema/facade/qudt
Install: erden add @erden/qudt-schema-3-4@3.4.0
Public release. Its published content is available without signing in.
COLLECTION_QUDT_USER_TESTS.ttl
1 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .2 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .3 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .4 @prefix owl: <http://www.w3.org/2002/07/owl#> .5 @prefix qudt: <http://qudt.org/schema/qudt/> .6 @prefix sh: <http://www.w3.org/ns/shacl#> .78 <http://qudt.org/3.4.0/collection/usertest>9 a owl:Ontology ;10 rdfs:isDefinedBy <http://qudt.org/3.4.0/collection/usertest> ;11 rdfs:label "QUDT Collection - USER TESTS - v 3.4.0" .1213 <http://qudt.org/3.4.0/collection/usertestPrefixes>14 sh:declare [15 a sh:PrefixDeclaration ;16 sh:namespace "http://purl.org/dc/terms/"^^xsd:anyURI ;17 sh:prefix "dcterms" ;18 ] ;19 sh:declare [20 a sh:PrefixDeclaration ;21 sh:namespace "http://qudt.org/schema/qudt/"^^xsd:anyURI ;22 sh:prefix "qudt" ;23 ] ;24 sh:declare [25 a sh:PrefixDeclaration ;26 sh:namespace "http://qudt.org/vocab/dimensionvector/"^^xsd:anyURI ;27 sh:prefix "qkdv" ;28 ] ;29 sh:declare [30 a sh:PrefixDeclaration ;31 sh:namespace "http://qudt.org/vocab/quantitykind/"^^xsd:anyURI ;32 sh:prefix "quantitykind" ;33 ] ;34 sh:declare [35 a sh:PrefixDeclaration ;36 sh:namespace "http://qudt.org/vocab/unit/"^^xsd:anyURI ;37 sh:prefix "unit" ;38 ] ;39 sh:declare [40 a sh:PrefixDeclaration ;41 sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ;42 sh:prefix "rdf" ;43 ] ;44 sh:declare [45 a sh:PrefixDeclaration ;46 sh:namespace "http://www.w3.org/2000/01/rdf-schema#"^^xsd:anyURI ;47 sh:prefix "rdfs" ;48 ] ;49 sh:declare [50 a sh:PrefixDeclaration ;51 sh:namespace "http://www.w3.org/2002/07/owl#"^^xsd:anyURI ;52 sh:prefix "owl" ;53 ] ;54 sh:declare [55 a sh:PrefixDeclaration ;56 sh:namespace "http://www.w3.org/2004/02/skos/core#"^^xsd:anyURI ;57 sh:prefix "skos" ;58 ] ;59 sh:declare [60 a sh:PrefixDeclaration ;61 sh:namespace "http://www.w3.org/ns/shacl#"^^xsd:anyURI ;62 sh:prefix "sh" ;63 ] ;64 sh:declare [65 a sh:PrefixDeclaration ;66 sh:namespace "http://www.w3.org/2001/XMLSchema#"^^xsd:anyURI ;67 sh:prefix "xsd" ;68 ] .6970 qudt:AllValuesMustHaveSameDataTypeShape71 a sh:NodeShape ;72 rdfs:isDefinedBy <http://qudt.org/3.4.0/collection/usertest> ;73 rdfs:label "All Values must have same DataType Shape" ;74 sh:severity sh:Violation ;75 sh:sparql [76 sh:message "Data Item {$this} has type {?valueType}." ;77 sh:prefixes <http://qudt.org/3.4.0/collection/usertestPrefixes> ;78 sh:select """79 SELECT $this ?valueType80 WHERE {81 $this qudt:datatype/qudt:rdfsDatatype ?datatype .82 $this qudt:value ?valueList.83 ?valueList rdf:rest*/rdf:first ?value .84 BIND(datatype(?value) as ?valueType) .85 FILTER(?valueType != ?datatype)86 }87 """ ;88 ] ;89 sh:targetClass qudt:HomogeneousArray .9091 qudt:ConsistentDimensionVectorConstraint92 a sh:NodeShape ;93 rdfs:isDefinedBy <http://qudt.org/3.4.0/collection/usertest> ;94 rdfs:label "Consistent Dimension Vector Constraint" ;95 sh:sparql [96 a sh:SPARQLConstraint ;97 rdfs:comment "Checks for consistent dimension vectors for a QuantityKind and the Unit" ;98 sh:message "s223: Inconsistent dimensionalities for a Quantity's Unit and Quantity Kind" ;99 sh:prefixes <http://qudt.org/3.4.0/collection/usertestPrefixes> ;100 sh:select """101 SELECT $this102 WHERE103 {104 $this qudt:hasQuantityKind/qudt:hasDimensionVector ?qkdv1 .105 $this qudt:hasUnit/qudt:hasDimensionVector ?qkdv2 .106 FILTER (?qkdv1 != ?qkdv2) .107 }108 """ ;109 ] ;110 sh:targetClass qudt:Quantity .111112 qudt:DimensionalityShape113 a sh:NodeShape ;114 rdfs:isDefinedBy <http://qudt.org/3.4.0/collection/usertest> ;115 rdfs:label "Dimensions Shape" ;116 sh:severity sh:Warning ;117 sh:sparql [118 sh:message "\"{$this}\" has {$actualDimensions} dimensions extent and needs to have {$specifiedDimensions}" ;119 sh:prefixes <http://qudt.org/3.4.0/collection/usertestPrefixes> ;120 sh:select """121 SELECT $this $actualDimensions $specifiedDimensions122 WHERE {123 $this qudt:dimensionality $dimensionality .124 $this qudt:dimensions ?dimensions .125 ?dimensions rdf:rest*/rdf:first $specifiedDimensions .126 { SELECT $this (COUNT(?listValue )AS $actualDimensions)127 WHERE {128 $this qudt:value/rdf:rest*/rdf:first ?listValue .129 } GROUP BY $this130 }131 FILTER ($actualDimensions != $specifiedDimensions)132 }133 """ ;134 ] ;135 sh:targetClass qudt:Array ;136 sh:targetClass qudt:List .137138 qudt:DontReferToDeprecatedConceptConstraint139 a sh:NodeShape ;140 rdfs:isDefinedBy <http://qudt.org/3.4.0/collection/usertest> ;141 rdfs:label "Warning about use of a deprecated QUDT resource" ;142 sh:severity sh:Warning ;143 sh:sparql [144 a sh:SPARQLConstraint ;145 rdfs:comment "Warns if a deprecated QUDT resource is used" ;146 sh:message "Resource '{?s}' refers to deprecated resource '{$this}', which will be removed in the next major version of QUDT. {?replacementMessage}" ;147 sh:prefixes <http://qudt.org/3.4.0/collection/usertestPrefixes> ;148 sh:select """149 SELECT ?s $this ?replacementMessage150 WHERE {151 $this qudt:deprecated true .152 ?s ?p $this .153 FILTER NOT EXISTS {?s qudt:deprecated true} .154 OPTIONAL {155 $this dcterms:isReplacedBy ?replacement .156 }157 BIND(IF(158 BOUND(?replacement),159 CONCAT("Please refer to ", STR(?replacement), " instead."),160 "Please do not refer to this resource any longer - it will be removed without replacement.")161 AS ?replacementMessage)162 }163 """ ;164 ] ;165 sh:targetClass qudt:Concept .166167 qudt:DontUseDeprecatedPropertyConstraint168 a sh:NodeShape ;169 rdfs:isDefinedBy <http://qudt.org/3.4.0/collection/usertest> ;170 rdfs:label "Warning about use of a deprecated QUDT property" ;171 sh:severity sh:Warning ;172 sh:sparql [173 a sh:SPARQLConstraint ;174 rdfs:comment "Warns if a deprecated QUDT property is used" ;175 sh:message "Resource '{?s}' uses the deprecated property '{$this}', which will be removed in the next major version of QUDT.{?replacementMessage}" ;176 sh:prefixes <http://qudt.org/3.4.0/collection/usertestPrefixes> ;177 sh:select """178 SELECT ?s $this ?replacementMessage179 WHERE {180 $this qudt:deprecated true .181 ?s $this ?o .182 OPTIONAL {183 $this dcterms:isReplacedBy ?replacement .184 }185 BIND(IF(186 BOUND(?replacement),187 CONCAT(" Please use ", STR(?replacement), " instead."),188 " Please do not use this property any longer - it will be removed without replacement.")189 AS ?replacementMessage)190 }""" ;191 ] ;192 sh:targetClass rdf:Property .193194195