diff --git a/cli/standalone-constraint-constraint.ttl b/cli/standalone-constraint-constraint.ttl deleted file mode 100644 index 0766ddeed..000000000 --- a/cli/standalone-constraint-constraint.ttl +++ /dev/null @@ -1,217 +0,0 @@ -@base . -@prefix dash: . -@prefix rdf: . -@prefix rdfs: . -@prefix schema: . -@prefix sh: . -@prefix xsd: . -@prefix cube: . -@prefix meta: . -@prefix qudt: . - -# -# This is the bare minimal SHACL shape for validating a Cube Constraint. -# All Cube Constraints should pass this validation. -# - - - a sh:NodeShape ; - sh:targetClass cube:Constraint ; - sh:property [ - # we assume at least 3 dimensions, otherwise we would have an empty list of dimensions - # one for cube:observedBy, one for rdf:type and at least one cube dimension - sh:path sh:property ; - sh:minCount 3 ; - sh:message "cube:Constraint needs at least a certain amount of sh:properties" - ] ; - sh:property [ - sh:path sh:property ; - sh:node ; - sh:message "The constraints do not validate" - ] ; - sh:property [ - sh:path sh:closed; - sh:hasValue true; - ] ; - sh:property [ - sh:path meta:inHierarchy; - sh:node ; - sh:message "meta:inHierarchy does not validate" - ] ; - . - - a sh:NodeShape; - sh:property [ - sh:path qudt:scaleType; - sh:in ( qudt:IntervalScale qudt:NominalScale qudt:EnumerationScale qudt:RatioScale qudt:OrdinalScale) ; - sh:maxCount 1; - sh:message "If qudt:scaleType is used it needs to be within ( qudt:IntervalScale qudt:NominalScale qudt:EnumerationScale qudt:RatioScale qudt:OrdinalScale )" - ]; - sh:property [ - sh:path sh:path; - sh:minCount 1; - sh:maxCount 1; - sh:message "a sh:path is needed on a property" - ]; - sh:property [ - sh:path sh:minInclusive; - sh:nodeType sh:Literal; - sh:message "sh:minInclusive needs to be a literal" - ]; - sh:property [ - sh:path sh:in; - sh:node ; - sh:message "sh:in needs to be a list" - ]; - sh:property [ - sh:path sh:maxInclusive; - sh:nodeType sh:Literal; - sh:message "sh:maxInclusive needs to be a literal" - ]; - sh:property [ - sh:path meta:dimensionRelation; - sh:node ; - sh:message "meta:dimensionRelation does not validate" - ]; - - sh:property [ - sh:message "needs a schema:name" ; - sh:or( - [ - sh:path schema:name; - sh:minCount 1; - sh:or ( [ sh:datatype xsd:string ] [ sh:datatype rdf:langString ] ) ; - ] - [ - sh:path sh:path; - sh:in (rdf:type cube:observedBy); - ] - ); - ]; - - sh:property [ - sh:message "needs a sh:datatype, sh:nodeKind or sh:datatype within sh:or (...)" ; - sh:or( - [ - sh:path sh:datatype; - sh:minCount 1; - ] - [ - sh:path sh:nodeKind; - sh:minCount 1; - ] - [ - sh:path sh:or; - sh:minCount 1; - sh:node ; - sh:node [ - sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ; # all list elements - sh:property [ sh:path sh:datatype ; sh:minCount 1 ] ; # have at least one datatype - ] - ] - ); - ] ; - -. - - - a sh:NodeShape ; - sh:property [ - sh:path meta:relatesTo; - sh:nodeKind sh:IRI ; - sh:minCount 1; - sh:message "meta:dimensionRelation requires at least one meta:relatesTo"; - ] . - - -# Testing proper rdf:list construction - a sh:NodeShape ; - sh:targetClass rdf:List ; - sh:property [ - sh:path rdf:first; - sh:minCount 1; - sh:maxCount 1; - ]; - sh:property [ - sh:path rdf:rest; - sh:minCount 1; - sh:maxCount 1; - sh:or ( - [ - sh:node ; - ] - [ - sh:hasValue rdf:nil; - ] - ) ; - sh:message "a rdf:List can only have one rdf:rest node, multiples nodes need to be linked" - #sh:node ; - ] - . - - a sh:NodeShape ; - sh:property [ - sh:path sh:inversePath; - sh:nodeKind sh:IRI; - sh:minCount 1; - sh:maxCount 1; - sh:message "nextInHierarchy requires sh:path to be IRI or [ sh:inversePath ... ]" - ] . - - a sh:NodeShape ; - sh:property [ - sh:path sh:path; - sh:minCount 1; - sh:maxCount 1; - sh:message "nextInHierarchy requires exactly one sh:path" - ], - [ - sh:path schema:name; - sh:minCount 1; - sh:message "nextInHierarchy requires schema:name" - ], - [ - sh:path sh:targetClass; - sh:nodeKind sh:IRI; - sh:message "meta:nextInHierarchy/sh:targetClass must be an IRI" - ], - [ - sh:path meta:nextInHierarchy; - sh:node ; - sh:severity sh:Info; - sh:message "nextInHierarchy can have nested nodes" - ] ; - sh:or ( - [ - sh:path sh:path; - sh:nodeKind sh:IRI; - sh:message "nextInHierarchy requires sh:path to be IRI or [ sh:inversePath ... ]" - ] - [ - sh:path sh:path; - sh:nodeKind sh:BlankNode; - sh:node ; - sh:message "nextInHierarchy requires sh:path to be IRI or [ sh:inversePath ... ]" - ] - ) - . - - a sh:NodeShape ; - sh:targetClass meta:Hierarchy ; - sh:property [ - sh:path meta:hierarchyRoot; - sh:minCount 1; - sh:nodeKind sh:IRI; - sh:message "inHierarchy requires hierarchyRoot"; - ], - [ - sh:path schema:name; - sh:minCount 1; - sh:message "inHierarchy requires schema:name" - ], - [ - sh:path meta:nextInHierarchy; - sh:node ; - sh:minCount 1; - sh:message "inHierarchy requires a conform nextInHierarchy" - ] . \ No newline at end of file