From f4e350a4c9897d8e452e872dccd8b3d98497a875 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Thu, 12 Oct 2023 21:22:39 +0200 Subject: [PATCH 1/7] feat: terms from SHACL-AF draft --- ontologies/sh/meta.nt | 1 + ontologies/sh/package.json | 10 +- ontologies/sh/sh.nq | 94 ++++++++++++++ ontologies/sh/src/shacl-af.ttl | 230 +++++++++++++++++++++++++++++++++ 4 files changed, 334 insertions(+), 1 deletion(-) create mode 100644 ontologies/sh/src/shacl-af.ttl diff --git a/ontologies/sh/meta.nt b/ontologies/sh/meta.nt index 1f88cf9b..d8706a63 100644 --- a/ontologies/sh/meta.nt +++ b/ontologies/sh/meta.nt @@ -2,6 +2,7 @@ "This vocabulary defines terms used in SHACL, the W3C Shapes Constraint Language." . "W3C Shapes Constraint Language (SHACL) Vocabulary" . . + . . "sh" . . diff --git a/ontologies/sh/package.json b/ontologies/sh/package.json index ea7d195c..5bd96a1d 100644 --- a/ontologies/sh/package.json +++ b/ontologies/sh/package.json @@ -15,7 +15,15 @@ "homepage": "https://prefix.zazuko.com/prefix/sh:", "vocabulary": { "prefix": "sh", - "namespace": "http://www.w3.org/ns/shacl#" + "namespace": "http://www.w3.org/ns/shacl#", + "files": [ + { + "file": "http://www.w3.org/ns/shacl#" + }, + { + "file": "file:src/shacl-af.ttl" + } + ] }, "license": "MIT", "files": [ diff --git a/ontologies/sh/sh.nq b/ontologies/sh/sh.nq index f48ec9fd..0447e870 100644 --- a/ontologies/sh/sh.nq +++ b/ontologies/sh/sh.nq @@ -56,6 +56,9 @@ . "Constraint component"@en . . + "A count expression is a blank node with exactly one value for the property sh:count which is a well-formed node expression." . + "Count Expression" . + . . . "1"^^ . @@ -75,6 +78,9 @@ . "Disjoint constraint component"@en . . + "A distinct expression is a blank node with exactly one value for the property sh:distinct which is a well-formed node expression." . + "Distinct Expression" . + . . . . @@ -84,6 +90,9 @@ . "Equals constraint component"@en . . + "An exists expression is a blank node with exactly one value for sh:exists (which is a well-formed shape)." . + "Exists Expression" . + . . . . @@ -92,11 +101,20 @@ . "Expression constraint component"@en . . + "A filter shape expression is a blank node with exactly one value for sh:filterShape (which is a well-formed shape) and at most one value for sh:nodes (which is a well-formed node expression)." . + "Filter Shape Expression" . + . . "The class of SHACL functions."@en . . "Function"@en . . + "A function expression is a blank node that does not fulfill any of the syntax rules of the other node expression types and which is the subject of exactly one triple T where the object is a well-formed SHACL list, and each member of that list is a well-formed node expression." . + "Function Expression" . + . + "A group concat expression is a blank node with exactly one value for the property sh:groupConcat which is a well-formed node expression. A group concat expression can have a single value for the property sh:separator which is literal with datatype xsd:string." . + "Group Concat Expression" . + . . . . @@ -113,6 +131,9 @@ "The node kind of all IRIs or literals."@en . . "IRI or literal"@en . + "An if expression is a blank node with exactly one value for sh:if (which is a well-formed node expression), at most one value for sh:then (which is a well-formed node expression) and at most one value for sh:else (which is a well-formed node expression)." . + "If Expression" . + . . . "1"^^ . @@ -126,6 +147,9 @@ "The severity for an informational validation result."@en . . "Info"@en . + "An intersection expression is a blank node with exactly one value for the property sh:intersection which is a well-formed SHACL list with at least two members (which are well-formed node expressions)." . + "Intersection Expression" . + . . . . @@ -206,6 +230,9 @@ . "less-than-or-equals constraint component"@en . . + "A limit expression is a blank node with exactly one value for the property sh:limit which is a literal with datatype xsd:integer and with exactly one value for the property sh:nodes which is a well-formed node expression." . + "Limit Expression" . + . . "The node kind of all literals."@en . . @@ -230,6 +257,9 @@ . "Max-exclusive constraint component"@en . . + "A max expression is a blank node with exactly one value for the property sh:max which is a well-formed node expression." . + "Max Expression" . + . . . "1"^^ . @@ -270,6 +300,9 @@ . "Min-exclusive constraint component"@en . . + "A min expression is a blank node with exactly one value for the property sh:min which is a well-formed node expression." . + "Min Expression" . + . . . "1"^^ . @@ -290,6 +323,9 @@ . "Min-length constraint component"@en . . + "A minus expression is a blank node with exactly one value for the property sh:minus which is a well-formed node expression and exactly one value for the property sh:nodes which is a well-formed node expression." . + "Minus Expression" . + . . . . @@ -298,6 +334,7 @@ . "Node constraint component"@en . . + . . "The class of all node kinds, including sh:BlankNode, sh:IRI, sh:Literal or the combinations of these: sh:BlankNodeOrIRI, sh:BlankNodeOrLiteral, sh:IRIOrLiteral."@en . . @@ -326,6 +363,9 @@ . "Not constraint component"@en . . + "An offset expression is a blank node with exactly one value for the property sh:offset which is a literal with datatype xsd:integer and with exactly one value for the property sh:nodes which is a well-formed node expression." . + "Offset Expression" . + . . . . @@ -334,6 +374,9 @@ . "Or constraint component"@en . . + "An orderBy expression is a blank node with exactly one value for the property sh:orderBy which is a well-formed node expression and with exactly one value for the property sh:nodes which is a well-formed node expression. An orderBy expression can have one value for the property sh:desc which is either true or false." . + "OrderBy Expression" . + . . "The class of parameter declarations, consisting of a path predicate and (possibly) information about allowed value type, cardinality and other characteristics."@en . . @@ -344,6 +387,9 @@ . "Parameterizable"@en . . + "A path expression is a blank node with exactly one value of the property sh:path (which are well-formed property paths) and at most one value for sh:nodes (which is a well-formed node expression)." . + "Path Expression" . + . . . . @@ -435,6 +481,9 @@ . "SPARQL ASK executable"@en . . + "A SPARQL ASK expression is a blank node with exactly one value for the property sh:ask which is string literal. The blank node may have values for the property sh:prefixes and these values are IRIs or blank nodes. Using the values of sh:prefixes as defined by 5.2.1 Prefix Declarations for SPARQL Queries, the value of sh:ask must be valid SPARQL 1.1 ASK query. The blank node may also have exactly one value for the property sh:nodes which is a well-formed node expression." . + "SPARQL ASK Expression" . + . . "The class of validators based on SPARQL ASK queries. The queries are evaluated for each value node and are supposed to return true if the given node conforms."@en . . @@ -482,6 +531,9 @@ . "SPARQL SELECT executable"@en . . + "A SPARQL SELECT expression is a blank node with exactly one value for the property sh:select which is string literal. The blank node may have values for the property sh:prefixes and these values are IRIs or blank nodes. Using the values of sh:prefixes as defined by 5.2.1 Prefix Declarations for SPARQL Queries, the value of sh:select must be valid SPARQL 1.1 SELECT query with exactly one result variable. The blank node may also have exactly one value for the property sh:nodes which is a well-formed node expression." . + "SPARQL SELECT Expression" . + . . "The class of validators based on SPARQL SELECT queries. The queries are evaluated for each focus node and are supposed to produce bindings for all focus nodes that do not conform."@en . . @@ -517,6 +569,9 @@ . "Shape"@en . . + "A sum expression is a blank node with exactly one value for the property sh:sum which is a well-formed node expression." . + "Sum Expression" . + . . "The base class of targets such as those based on SPARQL queries."@en . . @@ -532,6 +587,9 @@ . "A rule based on triple (subject, predicate, object) pattern."@en . . + "A union expression is a blank node with exactly one value for the property sh:union which is a well-formed SHACL list with at least two members (which are well-formed node expressions)." . + "Union Expression" . + . . . . @@ -634,6 +692,8 @@ . "construct"@en . . + . + . . "Specifies an RDF datatype that all value nodes must have."@en . . @@ -655,6 +715,8 @@ . . "default value"@en . + . + . . "Human-readable descriptions for the property in the context of the surrounding shape."@en . . @@ -671,6 +733,10 @@ . "disjoint"@en . . + . + . + . + . . "An entailment regime that indicates what kind of inferencing is required by a shapes graph."@en . . @@ -682,10 +748,13 @@ . "equals"@en . . + . + . . "The node expression that must return true for the value nodes."@en . . "expression"@en . + . . "The shape that all input nodes of the expression need to conform to."@en . . @@ -707,10 +776,14 @@ . "group"@en . . + . + . . "Specifies a value that must be among the value nodes."@en . . "has value"@en . + . + . . "An optional RDF list of properties that are also permitted in addition to those explicitly enumerated via sh:property/sh:path."@en . . @@ -772,6 +845,10 @@ . "less than or equals"@en . . + . + . + . + . . "Specifies the maximum number of values in the set of value nodes."@en . . @@ -794,6 +871,8 @@ "A human-readable message (possibly with placeholders for variables) explaining the cause of the result."@en . . "message"@en . + . + . . "Specifies the minimum number of values in the set of value nodes."@en . . @@ -812,6 +891,8 @@ . "min length"@en . . + . + . . "Human-readable labels for the property in the context of the surrounding shape."@en . . @@ -843,6 +924,7 @@ "The node expression producing the input nodes of a filter shape expression."@en . . "nodes"@en . + . . "Specifies a shape that the value nodes must not conform to."@en . . @@ -853,6 +935,8 @@ . . "object"@en . + . + . . "The (single) value of this property represents a path that is matched one or more times."@en . . @@ -873,6 +957,8 @@ "Specifies the relative order of this compared to its siblings. For example use 0 for the first, 1 for the second."@en . . "order"@en . + . + . . "The parameters of a function or constraint component."@en . . @@ -986,6 +1072,8 @@ . "select"@en . . + . + . . "Defines the severity that validation results produced by a shape must have. Defaults to sh:Violation."@en . . @@ -1038,6 +1126,8 @@ . "suggested shapes graph"@en . . + . + . . "Links a shape to a target specified by an extension language, for example instances of sh:SPARQLTarget."@en . . @@ -1067,6 +1157,8 @@ . "target subjects of"@en . . + . + . . "A node expression that represents the current focus node."@en . . @@ -1097,6 +1189,8 @@ . . "value"@en . + . + . . "Specifies a list of shapes so that the value nodes must conform to exactly one of the shapes."@en . . diff --git a/ontologies/sh/src/shacl-af.ttl b/ontologies/sh/src/shacl-af.ttl new file mode 100644 index 00000000..9201ecbe --- /dev/null +++ b/ontologies/sh/src/shacl-af.ttl @@ -0,0 +1,230 @@ +@prefix xsd: . +@prefix rdfs: . +@prefix rdf: . +@prefix sh: . + +sh:NodeExpression + a rdfs:Class ; +. + +sh:nodes rdfs:range sh:NodeExpression . + +sh:ExistsExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Exists Expression" ; + rdfs:comment + "An exists expression is a blank node with exactly one value for sh:exists (which is a well-formed shape)." ; +. + +sh:exists + a rdf:Property ; + rdfs:range sh:Shape ; +. + +sh:IfExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "If Expression" ; + rdfs:comment + "An if expression is a blank node with exactly one value for sh:if (which is a well-formed node expression), at most one value for sh:then (which is a well-formed node expression) and at most one value for sh:else (which is a well-formed node expression)." ; +. + +sh:if + a rdf:Property ; + rdfs:range sh:NodeExpression ; +. + +sh:then + a rdf:Property ; + rdfs:range sh:NodeExpression ; +. + +sh:else + a rdf:Property ; + rdfs:range sh:NodeExpression ; +. + +sh:FilterShapeExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Filter Shape Expression" ; + rdfs:comment + "A filter shape expression is a blank node with exactly one value for sh:filterShape (which is a well-formed shape) and at most one value for sh:nodes (which is a well-formed node expression)." ; +. + +sh:FunctionExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Function Expression" ; + rdfs:comment + "A function expression is a blank node that does not fulfill any of the syntax rules of the other node expression types and which is the subject of exactly one triple T where the object is a well-formed SHACL list, and each member of that list is a well-formed node expression." ; +. + +sh:PathExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Path Expression" ; + rdfs:comment + "A path expression is a blank node with exactly one value of the property sh:path (which are well-formed property paths) and at most one value for sh:nodes (which is a well-formed node expression)." ; +. + +sh:IntersectionExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Intersection Expression" ; + rdfs:comment + "An intersection expression is a blank node with exactly one value for the property sh:intersection which is a well-formed SHACL list with at least two members (which are well-formed node expressions)." ; +. + +sh:UnionExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Union Expression" ; + rdfs:comment + "A union expression is a blank node with exactly one value for the property sh:union which is a well-formed SHACL list with at least two members (which are well-formed node expressions)." ; +. + +sh:MinusExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Minus Expression" ; + rdfs:comment + "A minus expression is a blank node with exactly one value for the property sh:minus which is a well-formed node expression and exactly one value for the property sh:nodes which is a well-formed node expression." ; +. + +sh:minus + a rdf:Property ; + rdfs:range sh:NodeExpression ; +. + +sh:DistinctExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Distinct Expression" ; + rdfs:comment + "A distinct expression is a blank node with exactly one value for the property sh:distinct which is a well-formed node expression." ; +. + +sh:distinct + a rdf:Property ; + rdfs:range sh:NodeExpression ; +. + +sh:CountExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Count Expression" ; + rdfs:comment + "A count expression is a blank node with exactly one value for the property sh:count which is a well-formed node expression." ; +. + +sh:count + a rdf:Property ; + rdfs:range sh:NodeExpression ; +. + +sh:MinExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Min Expression" ; + rdfs:comment + "A min expression is a blank node with exactly one value for the property sh:min which is a well-formed node expression." ; +. + +sh:min + a rdf:Property ; + rdfs:range sh:NodeExpression ; +. + +sh:MaxExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Max Expression" ; + rdfs:comment + "A max expression is a blank node with exactly one value for the property sh:max which is a well-formed node expression." ; +. + +sh:max + a rdf:Property ; + rdfs:range sh:NodeExpression ; +. + +sh:SumExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Sum Expression" ; + rdfs:comment + "A sum expression is a blank node with exactly one value for the property sh:sum which is a well-formed node expression." ; +. + +sh:sum + a rdf:Property ; + rdfs:range sh:NodeExpression ; +. + +sh:GroupConcatExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Group Concat Expression" ; + rdfs:comment + "A group concat expression is a blank node with exactly one value for the property sh:groupConcat which is a well-formed node expression. A group concat expression can have a single value for the property sh:separator which is literal with datatype xsd:string." ; +. + +sh:groupConcat + a rdf:Property ; + rdfs:subClassOf sh:NodeExpression ; +. + +sh:separator + a rdf:Property ; + rdfs:range xsd:string ; +. + +sh:OrderByExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "OrderBy Expression" ; + rdfs:comment + "An orderBy expression is a blank node with exactly one value for the property sh:orderBy which is a well-formed node expression and with exactly one value for the property sh:nodes which is a well-formed node expression. An orderBy expression can have one value for the property sh:desc which is either true or false." ; +. + +sh:orderBy + a rdf:Property ; + rdfs:subClassOf sh:NodeExpression ; +. + +sh:desc + a rdf:Property ; + rdfs:range xsd:boolean ; +. + +sh:LimitExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Limit Expression" ; + rdfs:comment + "A limit expression is a blank node with exactly one value for the property sh:limit which is a literal with datatype xsd:integer and with exactly one value for the property sh:nodes which is a well-formed node expression." ; +. + +sh:limit + a rdf:Property ; + rdfs:range xsd:integer ; +. + +sh:OffsetExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "Offset Expression" ; + rdfs:comment + "An offset expression is a blank node with exactly one value for the property sh:offset which is a literal with datatype xsd:integer and with exactly one value for the property sh:nodes which is a well-formed node expression." ; +. + +sh:offset + a rdf:Property ; + rdfs:range xsd:integer ; +. + +sh:SPARQLAskExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "SPARQL ASK Expression" ; + rdfs:comment "A SPARQL ASK expression is a blank node with exactly one value for the property sh:ask which is string literal. The blank node may have values for the property sh:prefixes and these values are IRIs or blank nodes. Using the values of sh:prefixes as defined by 5.2.1 Prefix Declarations for SPARQL Queries, the value of sh:ask must be valid SPARQL 1.1 ASK query. The blank node may also have exactly one value for the property sh:nodes which is a well-formed node expression." ; +. + +sh:SPARQLSelectExpression + rdfs:subClassOf sh:NodeExpression ; + rdfs:label "SPARQL SELECT Expression" ; + rdfs:comment "A SPARQL SELECT expression is a blank node with exactly one value for the property sh:select which is string literal. The blank node may have values for the property sh:prefixes and these values are IRIs or blank nodes. Using the values of sh:prefixes as defined by 5.2.1 Prefix Declarations for SPARQL Queries, the value of sh:select must be valid SPARQL 1.1 SELECT query with exactly one result variable. The blank node may also have exactly one value for the property sh:nodes which is a well-formed node expression." ; +. + +sh:expression + rdfs:range sh:NodeExpression ; +. + +sh:values + a rdf:Property ; + rdfs:range sh:NodeExpression ; +. From 7f046b8a8cab9cb92bf3189f01ea9dd2bd30f925 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Fri, 13 Oct 2023 15:20:20 +0200 Subject: [PATCH 2/7] refactor: expressions as shapes --- ontologies/sh/sh.nq | 376 +++++++++++++++++++++---- ontologies/sh/src/shacl-af.ttl | 499 +++++++++++++++++++++++++-------- 2 files changed, 709 insertions(+), 166 deletions(-) diff --git a/ontologies/sh/sh.nq b/ontologies/sh/sh.nq index 0447e870..410e2b20 100644 --- a/ontologies/sh/sh.nq +++ b/ontologies/sh/sh.nq @@ -1,7 +1,7 @@ . "This vocabulary defines terms used in SHACL, the W3C Shapes Constraint Language."@en . "W3C Shapes Constraint Language (SHACL) Vocabulary"@en . - _:c14n4 . + _:c14n25 . . . "The base class of validation results, typically not instantiated directly."@en . @@ -56,9 +56,12 @@ . "Constraint component"@en . . + . "A count expression is a blank node with exactly one value for the property sh:count which is a well-formed node expression." . "Count Expression" . - . + . + _:c14n30 . + . . . "1"^^ . @@ -78,9 +81,12 @@ . "Disjoint constraint component"@en . . + . "A distinct expression is a blank node with exactly one value for the property sh:distinct which is a well-formed node expression." . "Distinct Expression" . - . + . + _:c14n37 . + . . . . @@ -90,9 +96,12 @@ . "Equals constraint component"@en . . + . "An exists expression is a blank node with exactly one value for sh:exists (which is a well-formed shape)." . "Exists Expression" . - . + . + _:c14n62 . + . . . . @@ -101,20 +110,31 @@ . "Expression constraint component"@en . . + . "A filter shape expression is a blank node with exactly one value for sh:filterShape (which is a well-formed shape) and at most one value for sh:nodes (which is a well-formed node expression)." . "Filter Shape Expression" . - . + . + _:c14n0 . + _:c14n23 . + . + . + . . "The class of SHACL functions."@en . . "Function"@en . . + . "A function expression is a blank node that does not fulfill any of the syntax rules of the other node expression types and which is the subject of exactly one triple T where the object is a well-formed SHACL list, and each member of that list is a well-formed node expression." . "Function Expression" . - . + . + . "A group concat expression is a blank node with exactly one value for the property sh:groupConcat which is a well-formed node expression. A group concat expression can have a single value for the property sh:separator which is literal with datatype xsd:string." . "Group Concat Expression" . - . + . + _:c14n52 . + _:c14n67 . + . . . . @@ -131,9 +151,16 @@ "The node kind of all IRIs or literals."@en . . "IRI or literal"@en . + . "An if expression is a blank node with exactly one value for sh:if (which is a well-formed node expression), at most one value for sh:then (which is a well-formed node expression) and at most one value for sh:else (which is a well-formed node expression)." . "If Expression" . - . + . + _:c14n20 . + _:c14n65 . + _:c14n72 . + . + . + . . . "1"^^ . @@ -147,9 +174,12 @@ "The severity for an informational validation result."@en . . "Info"@en . + . "An intersection expression is a blank node with exactly one value for the property sh:intersection which is a well-formed SHACL list with at least two members (which are well-formed node expressions)." . "Intersection Expression" . - . + . + _:c14n64 . + . . . . @@ -230,9 +260,13 @@ . "less-than-or-equals constraint component"@en . . + . "A limit expression is a blank node with exactly one value for the property sh:limit which is a literal with datatype xsd:integer and with exactly one value for the property sh:nodes which is a well-formed node expression." . "Limit Expression" . - . + . + _:c14n31 . + _:c14n34 . + . . "The node kind of all literals."@en . . @@ -257,9 +291,12 @@ . "Max-exclusive constraint component"@en . . + . "A max expression is a blank node with exactly one value for the property sh:max which is a well-formed node expression." . "Max Expression" . - . + . + _:c14n57 . + . . . "1"^^ . @@ -300,9 +337,12 @@ . "Min-exclusive constraint component"@en . . + . "A min expression is a blank node with exactly one value for the property sh:min which is a well-formed node expression." . "Min Expression" . - . + . + _:c14n28 . + . . . "1"^^ . @@ -323,9 +363,13 @@ . "Min-length constraint component"@en . . + . "A minus expression is a blank node with exactly one value for the property sh:minus which is a well-formed node expression and exactly one value for the property sh:nodes which is a well-formed node expression." . "Minus Expression" . - . + . + _:c14n10 . + _:c14n73 . + . . . . @@ -334,7 +378,10 @@ . "Node constraint component"@en . . - . + . + . + . + _:c14n27 . . "The class of all node kinds, including sh:BlankNode, sh:IRI, sh:Literal or the combinations of these: sh:BlankNodeOrIRI, sh:BlankNodeOrLiteral, sh:IRIOrLiteral."@en . . @@ -342,7 +389,7 @@ . . . - _:c14n2 . + _:c14n13 . "1"^^ . . . @@ -363,9 +410,13 @@ . "Not constraint component"@en . . + . "An offset expression is a blank node with exactly one value for the property sh:offset which is a literal with datatype xsd:integer and with exactly one value for the property sh:nodes which is a well-formed node expression." . "Offset Expression" . - . + . + _:c14n41 . + _:c14n55 . + . . . . @@ -374,9 +425,14 @@ . "Or constraint component"@en . . + . "An orderBy expression is a blank node with exactly one value for the property sh:orderBy which is a well-formed node expression and with exactly one value for the property sh:nodes which is a well-formed node expression. An orderBy expression can have one value for the property sh:desc which is either true or false." . "OrderBy Expression" . - . + . + _:c14n46 . + _:c14n54 . + _:c14n60 . + . . "The class of parameter declarations, consisting of a path predicate and (possibly) information about allowed value type, cardinality and other characteristics."@en . . @@ -387,9 +443,12 @@ . "Parameterizable"@en . . + . "A path expression is a blank node with exactly one value of the property sh:path (which are well-formed property paths) and at most one value for sh:nodes (which is a well-formed node expression)." . "Path Expression" . - . + . + _:c14n17 . + _:c14n50 . . . . @@ -481,9 +540,14 @@ . "SPARQL ASK executable"@en . . + . "A SPARQL ASK expression is a blank node with exactly one value for the property sh:ask which is string literal. The blank node may have values for the property sh:prefixes and these values are IRIs or blank nodes. Using the values of sh:prefixes as defined by 5.2.1 Prefix Declarations for SPARQL Queries, the value of sh:ask must be valid SPARQL 1.1 ASK query. The blank node may also have exactly one value for the property sh:nodes which is a well-formed node expression." . "SPARQL ASK Expression" . - . + . + _:c14n43 . + _:c14n44 . + _:c14n47 . + . . "The class of validators based on SPARQL ASK queries. The queries are evaluated for each value node and are supposed to return true if the given node conforms."@en . . @@ -521,19 +585,27 @@ . . . + . "The class of SHACL rules based on SPARQL CONSTRUCT queries."@en . . "SPARQL CONSTRUCT rule"@en . . . + _:c14n3 . + _:c14n8 . . "The class of SPARQL executables based on a SELECT query."@en . . "SPARQL SELECT executable"@en . . + . "A SPARQL SELECT expression is a blank node with exactly one value for the property sh:select which is string literal. The blank node may have values for the property sh:prefixes and these values are IRIs or blank nodes. Using the values of sh:prefixes as defined by 5.2.1 Prefix Declarations for SPARQL Queries, the value of sh:select must be valid SPARQL 1.1 SELECT query with exactly one result variable. The blank node may also have exactly one value for the property sh:nodes which is a well-formed node expression." . "SPARQL SELECT Expression" . - . + . + _:c14n11 . + _:c14n32 . + _:c14n39 . + . . "The class of validators based on SPARQL SELECT queries. The queries are evaluated for each focus node and are supposed to produce bindings for all focus nodes that do not conform."@en . . @@ -569,9 +641,12 @@ . "Shape"@en . . + . "A sum expression is a blank node with exactly one value for the property sh:sum which is a well-formed node expression." . "Sum Expression" . - . + . + _:c14n61 . + . . "The base class of targets such as those based on SPARQL queries."@en . . @@ -584,12 +659,19 @@ . . . + . . "A rule based on triple (subject, predicate, object) pattern."@en . . + _:c14n36 . + _:c14n63 . + _:c14n7 . + . "A union expression is a blank node with exactly one value for the property sh:union which is a well-formed SHACL list with at least two members (which are well-formed node expressions)." . "Union Expression" . - . + . + _:c14n70 . + . . . . @@ -693,7 +775,6 @@ "construct"@en . . . - . . "Specifies an RDF datatype that all value nodes must have."@en . . @@ -716,7 +797,6 @@ . "default value"@en . . - . . "Human-readable descriptions for the property in the context of the surrounding shape."@en . . @@ -734,9 +814,7 @@ "disjoint"@en . . . - . . - . . "An entailment regime that indicates what kind of inferencing is required by a shapes graph."@en . . @@ -749,12 +827,10 @@ "equals"@en . . . - . . "The node expression that must return true for the value nodes."@en . . "expression"@en . - . . "The shape that all input nodes of the expression need to conform to."@en . . @@ -777,13 +853,11 @@ "group"@en . . . - . . "Specifies a value that must be among the value nodes."@en . . "has value"@en . . - . . "An optional RDF list of properties that are also permitted in addition to those explicitly enumerated via sh:property/sh:path."@en . . @@ -846,9 +920,7 @@ "less than or equals"@en . . . - . . - . . "Specifies the maximum number of values in the set of value nodes."@en . . @@ -872,7 +944,6 @@ . "message"@en . . - . . "Specifies the minimum number of values in the set of value nodes."@en . . @@ -892,7 +963,6 @@ "min length"@en . . . - . . "Human-readable labels for the property in the context of the surrounding shape."@en . . @@ -924,7 +994,6 @@ "The node expression producing the input nodes of a filter shape expression."@en . . "nodes"@en . - . . "Specifies a shape that the value nodes must not conform to."@en . . @@ -936,7 +1005,6 @@ . "object"@en . . - . . "The (single) value of this property represents a path that is matched one or more times."@en . . @@ -958,7 +1026,6 @@ . "order"@en . . - . . "The parameters of a function or constraint component."@en . . @@ -1073,7 +1140,6 @@ "select"@en . . . - . . "Defines the severity that validation results produced by a shape must have. Defaults to sh:Violation."@en . . @@ -1127,7 +1193,6 @@ "suggested shapes graph"@en . . . - . . "Links a shape to a target specified by an extension language, for example instances of sh:SPARQLTarget."@en . . @@ -1158,7 +1223,6 @@ "target subjects of"@en . . . - . . "A node expression that represents the current focus node."@en . . @@ -1189,8 +1253,6 @@ . . "value"@en . - . - . . "Specifies a list of shapes so that the value nodes must conform to exactly one of the shapes."@en . . @@ -1206,17 +1268,219 @@ . "zero or one path"@en . . -_:c14n0 . -_:c14n0 . -_:c14n1 . -_:c14n1 _:c14n0 . -_:c14n2 . -_:c14n2 _:c14n3 . -_:c14n3 . -_:c14n3 _:c14n5 . -_:c14n4 "http://www.w3.org/ns/shacl#" . -_:c14n4 "sh" . -_:c14n5 . -_:c14n5 _:c14n6 . -_:c14n6 . -_:c14n6 _:c14n1 . +_:c14n0 "1"^^ . +_:c14n0 "1"^^ . +_:c14n0 . +_:c14n0 . +_:c14n1 . +_:c14n1 _:c14n48 . +_:c14n10 "1"^^ . +_:c14n10 "1"^^ . +_:c14n10 . +_:c14n10 . +_:c14n11 . +_:c14n11 "1"^^ . +_:c14n11 "1"^^ . +_:c14n11 . +_:c14n12 . +_:c14n12 _:c14n9 . +_:c14n13 . +_:c14n13 _:c14n21 . +_:c14n14 . +_:c14n14 _:c14n2 . +_:c14n16 . +_:c14n16 _:c14n49 . +_:c14n17 "1"^^ . +_:c14n17 "1"^^ . +_:c14n17 . +_:c14n17 . +_:c14n18 . +_:c14n18 _:c14n56 . +_:c14n19 . +_:c14n19 _:c14n66 . +_:c14n2 . +_:c14n2 _:c14n58 . +_:c14n20 "1"^^ . +_:c14n20 . +_:c14n20 . +_:c14n21 . +_:c14n21 _:c14n53 . +_:c14n22 . +_:c14n23 "1"^^ . +_:c14n23 . +_:c14n23 . +_:c14n24 _:c14n4 . +_:c14n24 . +_:c14n25 "http://www.w3.org/ns/shacl#" . +_:c14n25 "sh" . +_:c14n26 . +_:c14n26 _:c14n35 . +_:c14n27 . +_:c14n27 _:c14n59 . +_:c14n28 "1"^^ . +_:c14n28 "1"^^ . +_:c14n28 . +_:c14n28 . +_:c14n29 _:c14n22 . +_:c14n29 _:c14n5 . +_:c14n3 "1"^^ . +_:c14n3 . +_:c14n3 . +_:c14n30 "1"^^ . +_:c14n30 "1"^^ . +_:c14n30 . +_:c14n30 . +_:c14n31 "1"^^ . +_:c14n31 "1"^^ . +_:c14n31 . +_:c14n31 . +_:c14n32 "1"^^ . +_:c14n32 . +_:c14n32 . +_:c14n33 "1"^^ . +_:c14n33 "1"^^ . +_:c14n33 . +_:c14n33 . +_:c14n33 _:c14n45 . +_:c14n34 . +_:c14n34 "1"^^ . +_:c14n34 "1"^^ . +_:c14n34 . +_:c14n35 . +_:c14n35 _:c14n1 . +_:c14n36 "1"^^ . +_:c14n36 "1"^^ . +_:c14n36 . +_:c14n36 . +_:c14n37 "1"^^ . +_:c14n37 "1"^^ . +_:c14n37 . +_:c14n37 . +_:c14n38 . +_:c14n38 _:c14n71 . +_:c14n39 "1"^^ . +_:c14n39 . +_:c14n39 . +_:c14n4 _:c14n35 . +_:c14n40 . +_:c14n40 _:c14n6 . +_:c14n41 "1"^^ . +_:c14n41 "1"^^ . +_:c14n41 . +_:c14n41 . +_:c14n42 _:c14n33 . +_:c14n43 . +_:c14n43 "1"^^ . +_:c14n43 "1"^^ . +_:c14n43 . +_:c14n44 "1"^^ . +_:c14n44 . +_:c14n44 . +_:c14n45 "2"^^ . +_:c14n45 . +_:c14n45 _:c14n29 . +_:c14n46 . +_:c14n46 "1"^^ . +_:c14n46 . +_:c14n47 "1"^^ . +_:c14n47 . +_:c14n47 . +_:c14n48 . +_:c14n48 _:c14n69 . +_:c14n49 . +_:c14n49 . +_:c14n5 . +_:c14n5 . +_:c14n50 "1"^^ . +_:c14n50 . +_:c14n50 . +_:c14n51 . +_:c14n51 _:c14n14 . +_:c14n52 "1"^^ . +_:c14n52 "1"^^ . +_:c14n52 . +_:c14n52 . +_:c14n53 . +_:c14n53 _:c14n68 . +_:c14n54 "1"^^ . +_:c14n54 "1"^^ . +_:c14n54 . +_:c14n54 . +_:c14n55 . +_:c14n55 "1"^^ . +_:c14n55 "1"^^ . +_:c14n55 . +_:c14n56 . +_:c14n56 _:c14n51 . +_:c14n57 "1"^^ . +_:c14n57 "1"^^ . +_:c14n57 . +_:c14n57 . +_:c14n58 . +_:c14n58 _:c14n40 . +_:c14n59 _:c14n26 . +_:c14n59 _:c14n24 . +_:c14n6 . +_:c14n6 _:c14n19 . +_:c14n60 "1"^^ . +_:c14n60 "1"^^ . +_:c14n60 . +_:c14n60 . +_:c14n61 "1"^^ . +_:c14n61 "1"^^ . +_:c14n61 . +_:c14n61 . +_:c14n62 "1"^^ . +_:c14n62 "1"^^ . +_:c14n62 . +_:c14n62 . +_:c14n63 "1"^^ . +_:c14n63 "1"^^ . +_:c14n63 . +_:c14n63 . +_:c14n64 _:c14n74 . +_:c14n64 "1"^^ . +_:c14n64 "1"^^ . +_:c14n64 . +_:c14n64 . +_:c14n65 "1"^^ . +_:c14n65 "1"^^ . +_:c14n65 . +_:c14n65 . +_:c14n66 . +_:c14n66 _:c14n16 . +_:c14n67 . +_:c14n67 "1"^^ . +_:c14n67 . +_:c14n68 . +_:c14n68 _:c14n12 . +_:c14n69 . +_:c14n69 _:c14n38 . +_:c14n7 "1"^^ . +_:c14n7 "1"^^ . +_:c14n7 . +_:c14n7 . +_:c14n70 _:c14n75 . +_:c14n70 "1"^^ . +_:c14n70 "1"^^ . +_:c14n70 . +_:c14n70 . +_:c14n71 . +_:c14n71 _:c14n18 . +_:c14n72 "1"^^ . +_:c14n72 . +_:c14n72 . +_:c14n73 "1"^^ . +_:c14n73 "1"^^ . +_:c14n73 . +_:c14n73 . +_:c14n74 _:c14n15 . +_:c14n74 . +_:c14n75 _:c14n15 . +_:c14n75 . +_:c14n8 . +_:c14n8 "1"^^ . +_:c14n8 "1"^^ . +_:c14n8 . +_:c14n9 . +_:c14n9 . diff --git a/ontologies/sh/src/shacl-af.ttl b/ontologies/sh/src/shacl-af.ttl index 9201ecbe..1f0c2c6b 100644 --- a/ontologies/sh/src/shacl-af.ttl +++ b/ontologies/sh/src/shacl-af.ttl @@ -2,229 +2,508 @@ @prefix rdfs: . @prefix rdf: . @prefix sh: . +@prefix shsh: . +@prefix dash: . sh:NodeExpression - a rdfs:Class ; + a sh:NodeShape ; + sh:targetObjectsOf sh:expression, sh:values ; + sh:xone + ( + sh:FocusNodeOrConstantTermExpression + [ + sh:nodeKind sh:BlankNode ; + sh:not _:builtInExpression ; + ] + [ + sh:xone _:builtInExpression ; + ] + ) +. + +_:builtInExpression + rdf:first sh:ExistsExpression ; + rdf:rest + ( + sh:IfExpression + sh:FilterShapeExpression + sh:PathExpression + sh:IntersectionExpression + sh:UnionExpression + sh:MinusExpression + sh:DistinctExpression + sh:CountExpression + sh:MinExpression + sh:MaxExpression + sh:SumExpression + sh:GroupConcatExpression + sh:OrderByExpression + sh:LimitExpression + sh:OffsetExpression + sh:SPARQLAskExpression + sh:SPARQLSelectExpression + ) . + +sh:FocusNodeOrConstantTermExpression + a sh:NodeShape ; + sh:nodeKind sh:IRIOrLiteral ; . -sh:nodes rdfs:range sh:NodeExpression . - sh:ExistsExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:exists ; rdfs:label "Exists Expression" ; rdfs:comment "An exists expression is a blank node with exactly one value for sh:exists (which is a well-formed shape)." ; + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:exists ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node shsh:ShapeShape ; + ] ; . -sh:exists - a rdf:Property ; - rdfs:range sh:Shape ; -. +sh:exists a rdf:Property . sh:IfExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:if, sh:then, sh:else ; rdfs:label "If Expression" ; rdfs:comment "An if expression is a blank node with exactly one value for sh:if (which is a well-formed node expression), at most one value for sh:then (which is a well-formed node expression) and at most one value for sh:else (which is a well-formed node expression)." ; -. - -sh:if - a rdf:Property ; - rdfs:range sh:NodeExpression ; -. - -sh:then - a rdf:Property ; - rdfs:range sh:NodeExpression ; -. - -sh:else - a rdf:Property ; - rdfs:range sh:NodeExpression ; -. + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:if ; + sh:node sh:NodeExpression ; + sh:minCount 1 ; + sh:maxCount 1 ; + ], + [ + sh:path sh:then ; + sh:node sh:NodeExpression ; + sh:maxCount 1 ; + ], + [ + sh:path sh:else ; + sh:node sh:NodeExpression ; + sh:maxCount 1 ; + ] ; +. + +sh:if a rdf:Property . + +sh:then a rdf:Property . + +sh:else a rdf:Property . sh:FilterShapeExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:filterShape ; rdfs:label "Filter Shape Expression" ; rdfs:comment "A filter shape expression is a blank node with exactly one value for sh:filterShape (which is a well-formed shape) and at most one value for sh:nodes (which is a well-formed node expression)." ; + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:filterShape ; + sh:node shsh:ShapeShape ; + sh:minCount 1 ; + sh:maxCount 1 ; + ], + [ + sh:path sh:nodes ; + sh:node sh:NodeExpression ; + sh:maxCount 1 ; + ] ; . sh:FunctionExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; rdfs:label "Function Expression" ; rdfs:comment "A function expression is a blank node that does not fulfill any of the syntax rules of the other node expression types and which is the subject of exactly one triple T where the object is a well-formed SHACL list, and each member of that list is a well-formed node expression." ; + sh:nodeKind sh:BlankNode ; +# TODO: which is the subject of exactly one triple T where the object is a well-formed SHACL list . sh:PathExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; rdfs:label "Path Expression" ; rdfs:comment "A path expression is a blank node with exactly one value of the property sh:path (which are well-formed property paths) and at most one value for sh:nodes (which is a well-formed node expression)." ; + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:path ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node shsh:PathShape ; + ], + [ + sh:path sh:nodes ; + sh:node sh:NodeExpression ; + sh:maxCount 1 ; + ] ; . sh:IntersectionExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:intersection ; rdfs:label "Intersection Expression" ; rdfs:comment "An intersection expression is a blank node with exactly one value for the property sh:intersection which is a well-formed SHACL list with at least two members (which are well-formed node expressions)." ; + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:intersection ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node dash:ListShape ; + sh:and ( _:hasAtLeastTwoNodeExpressions ) ; + ] ; . sh:UnionExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:union ; rdfs:label "Union Expression" ; rdfs:comment "A union expression is a blank node with exactly one value for the property sh:union which is a well-formed SHACL list with at least two members (which are well-formed node expressions)." ; + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:union ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node dash:ListShape ; + sh:and ( _:hasAtLeastTwoNodeExpressions ) ; + ] ; . sh:MinusExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:minus ; rdfs:label "Minus Expression" ; rdfs:comment "A minus expression is a blank node with exactly one value for the property sh:minus which is a well-formed node expression and exactly one value for the property sh:nodes which is a well-formed node expression." ; -. - -sh:minus - a rdf:Property ; - rdfs:range sh:NodeExpression ; -. + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:minus ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ], + [ + sh:path sh:nodes ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ] ; +. + +sh:minus a rdf:Property . sh:DistinctExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:distinct ; rdfs:label "Distinct Expression" ; rdfs:comment "A distinct expression is a blank node with exactly one value for the property sh:distinct which is a well-formed node expression." ; + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:distinct ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ] ; . -sh:distinct - a rdf:Property ; - rdfs:range sh:NodeExpression ; -. +sh:distinct a rdf:Property . sh:CountExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:count ; rdfs:label "Count Expression" ; rdfs:comment "A count expression is a blank node with exactly one value for the property sh:count which is a well-formed node expression." ; + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:count ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ] ; . -sh:count - a rdf:Property ; - rdfs:range sh:NodeExpression ; -. +sh:count a rdf:Property . sh:MinExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:min ; rdfs:label "Min Expression" ; rdfs:comment "A min expression is a blank node with exactly one value for the property sh:min which is a well-formed node expression." ; + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:min ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ] ; . -sh:min - a rdf:Property ; - rdfs:range sh:NodeExpression ; -. +sh:min a rdf:Property . sh:MaxExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:max ; rdfs:label "Max Expression" ; rdfs:comment "A max expression is a blank node with exactly one value for the property sh:max which is a well-formed node expression." ; + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:max ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ] ; . -sh:max - a rdf:Property ; - rdfs:range sh:NodeExpression ; -. +sh:max a rdf:Property . sh:SumExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:sum ; rdfs:label "Sum Expression" ; rdfs:comment "A sum expression is a blank node with exactly one value for the property sh:sum which is a well-formed node expression." ; + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:sum ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ] ; . -sh:sum - a rdf:Property ; - rdfs:range sh:NodeExpression ; -. +sh:sum a rdf:Property . sh:GroupConcatExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:groupConcat ; rdfs:label "Group Concat Expression" ; rdfs:comment "A group concat expression is a blank node with exactly one value for the property sh:groupConcat which is a well-formed node expression. A group concat expression can have a single value for the property sh:separator which is literal with datatype xsd:string." ; + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:groupConcat ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ], + [ + sh:path sh:separator ; + sh:maxCount 1 ; + sh:datatype sh:string ; + ] ; . -sh:groupConcat - a rdf:Property ; - rdfs:subClassOf sh:NodeExpression ; -. +sh:groupConcat a rdf:Property . -sh:separator - a rdf:Property ; - rdfs:range xsd:string ; -. +sh:separator a rdf:Property . sh:OrderByExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:orderBy ; rdfs:label "OrderBy Expression" ; rdfs:comment "An orderBy expression is a blank node with exactly one value for the property sh:orderBy which is a well-formed node expression and with exactly one value for the property sh:nodes which is a well-formed node expression. An orderBy expression can have one value for the property sh:desc which is either true or false." ; -. - -sh:orderBy - a rdf:Property ; - rdfs:subClassOf sh:NodeExpression ; -. - -sh:desc - a rdf:Property ; - rdfs:range xsd:boolean ; -. + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:orderBy ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ], + [ + sh:path sh:nodes ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ], + [ + sh:path sh:desc ; + sh:maxCount 1 ; + sh:datatype xsd:boolean ; + ] ; +. + +sh:orderBy a rdf:Property . + +sh:desc a rdf:Property . sh:LimitExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:limit ; rdfs:label "Limit Expression" ; rdfs:comment "A limit expression is a blank node with exactly one value for the property sh:limit which is a literal with datatype xsd:integer and with exactly one value for the property sh:nodes which is a well-formed node expression." ; -. - -sh:limit - a rdf:Property ; - rdfs:range xsd:integer ; -. + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:limit ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:integer ; + ], + [ + sh:path sh:nodes ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ] ; +. + +sh:limit a rdf:Property . sh:OffsetExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:offset ; rdfs:label "Offset Expression" ; rdfs:comment "An offset expression is a blank node with exactly one value for the property sh:offset which is a literal with datatype xsd:integer and with exactly one value for the property sh:nodes which is a well-formed node expression." ; -. - -sh:offset - a rdf:Property ; - rdfs:range xsd:integer ; -. + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:offset ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:integer ; + ], + [ + sh:path sh:nodes ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ] ; +. + +sh:offset a rdf:Property . sh:SPARQLAskExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:ask ; rdfs:label "SPARQL ASK Expression" ; - rdfs:comment "A SPARQL ASK expression is a blank node with exactly one value for the property sh:ask which is string literal. The blank node may have values for the property sh:prefixes and these values are IRIs or blank nodes. Using the values of sh:prefixes as defined by 5.2.1 Prefix Declarations for SPARQL Queries, the value of sh:ask must be valid SPARQL 1.1 ASK query. The blank node may also have exactly one value for the property sh:nodes which is a well-formed node expression." ; + rdfs:comment + "A SPARQL ASK expression is a blank node with exactly one value for the property sh:ask which is string literal. The blank node may have values for the property sh:prefixes and these values are IRIs or blank nodes. Using the values of sh:prefixes as defined by 5.2.1 Prefix Declarations for SPARQL Queries, the value of sh:ask must be valid SPARQL 1.1 ASK query. The blank node may also have exactly one value for the property sh:nodes which is a well-formed node expression." ; + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:ask ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:string ; + ], + [ + sh:path sh:prefixes ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + ], + [ + sh:path sh:nodes ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ] ; . sh:SPARQLSelectExpression - rdfs:subClassOf sh:NodeExpression ; + a sh:NodeShape ; + sh:targetSubjectsOf sh:select ; rdfs:label "SPARQL SELECT Expression" ; - rdfs:comment "A SPARQL SELECT expression is a blank node with exactly one value for the property sh:select which is string literal. The blank node may have values for the property sh:prefixes and these values are IRIs or blank nodes. Using the values of sh:prefixes as defined by 5.2.1 Prefix Declarations for SPARQL Queries, the value of sh:select must be valid SPARQL 1.1 SELECT query with exactly one result variable. The blank node may also have exactly one value for the property sh:nodes which is a well-formed node expression." ; -. - -sh:expression - rdfs:range sh:NodeExpression ; -. - -sh:values - a rdf:Property ; - rdfs:range sh:NodeExpression ; + rdfs:comment + "A SPARQL SELECT expression is a blank node with exactly one value for the property sh:select which is string literal. The blank node may have values for the property sh:prefixes and these values are IRIs or blank nodes. Using the values of sh:prefixes as defined by 5.2.1 Prefix Declarations for SPARQL Queries, the value of sh:select must be valid SPARQL 1.1 SELECT query with exactly one result variable. The blank node may also have exactly one value for the property sh:nodes which is a well-formed node expression." ; + sh:nodeKind sh:BlankNode ; + sh:property + [ + sh:path sh:select ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:string ; + ], + [ + sh:path sh:prefixes ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + ], + [ + sh:path sh:nodes ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ] ; +. + +_:atLeastTwoNodeExpressions + sh:property + [ + sh:path sh:intersection ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node dash:ListShape ; + sh:property + [ + sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ; + sh:node sh:NodeExpression ; + sh:minCount 2 ; + ] ; + ] ; +. + +sh:TripleRule + a sh:NodeShape ; + sh:property + [ + sh:path sh:subject ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ], + [ + sh:path sh:predicate ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ], + [ + sh:path sh:object ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:node sh:NodeExpression ; + ] ; +. + +sh:SPARQLRule + a sh:NodeShape ; + sh:property + [ + sh:path sh:construct ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:string ; + ], + [ + sh:path sh:prefixes ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + ] ; . From 8d17feba2cf6570c767752e362f470e4dde32b3d Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Fri, 13 Oct 2023 15:34:48 +0200 Subject: [PATCH 3/7] feat: shsh --- .changeset/beige-flies-melt.md | 5 + .changeset/curly-brooms-repeat.md | 5 + ontologies/sh/package.json | 3 + ontologies/shsh/meta.nt | 5 + ontologies/shsh/package.json | 31 +++ ontologies/shsh/shsh.nq | 415 ++++++++++++++++++++++++++++++ ontologies/shsh/tsconfig.json | 4 + package-lock.json | 29 ++- packages/prefixes/prefixes.ts | 1 + 9 files changed, 490 insertions(+), 8 deletions(-) create mode 100644 .changeset/beige-flies-melt.md create mode 100644 .changeset/curly-brooms-repeat.md create mode 100644 ontologies/shsh/meta.nt create mode 100644 ontologies/shsh/package.json create mode 100644 ontologies/shsh/shsh.nq create mode 100644 ontologies/shsh/tsconfig.json diff --git a/.changeset/beige-flies-melt.md b/.changeset/beige-flies-melt.md new file mode 100644 index 00000000..6fe94557 --- /dev/null +++ b/.changeset/beige-flies-melt.md @@ -0,0 +1,5 @@ +--- +"@vocabulary/sh": patch +--- + +Added `bugs` link to package diff --git a/.changeset/curly-brooms-repeat.md b/.changeset/curly-brooms-repeat.md new file mode 100644 index 00000000..97a1b8b9 --- /dev/null +++ b/.changeset/curly-brooms-repeat.md @@ -0,0 +1,5 @@ +--- +"@vocabulary/shsh": major +--- + +Imported shacl-shacl diff --git a/ontologies/sh/package.json b/ontologies/sh/package.json index 5bd96a1d..8ae171fc 100644 --- a/ontologies/sh/package.json +++ b/ontologies/sh/package.json @@ -25,6 +25,9 @@ } ] }, + "bugs": { + "url": "https://github.com/zazuko/rdf-vocabularies/issues" + }, "license": "MIT", "files": [ "*.js", diff --git a/ontologies/shsh/meta.nt b/ontologies/shsh/meta.nt new file mode 100644 index 00000000..3e59a816 --- /dev/null +++ b/ontologies/shsh/meta.nt @@ -0,0 +1,5 @@ + "@vocabulary/shsh/shsh.nq" . + . + . + "shsh" . + . diff --git a/ontologies/shsh/package.json b/ontologies/shsh/package.json new file mode 100644 index 00000000..7add5a2e --- /dev/null +++ b/ontologies/shsh/package.json @@ -0,0 +1,31 @@ +{ + "name": "@vocabulary/shsh", + "version": "0.0.0", + "type": "module", + "main": "index.js", + "description": "This shapes graph can be used to validate SHACL shapes graphs against a subset of the syntax rules.", + "scripts": { + "fetch": "npx --node-options='--loader=ts-node/esm' vocab-build datasets", + "prebuild": "npx --node-options='--loader=ts-node/esm' vocab-build module", + "build": "tsc", + "prepack": "npm run build" + }, + "devDependencies": { + "@vocabulary/builder": "^1.0.2" + }, + "homepage": "https://www.w3.org/TR/shacl/#shacl-shacl", + "vocabulary": { + "prefix": "shsh", + "namespace": "https://www.w3.org/ns/shacl-shacl#" + }, + "bugs": { + "url": "https://github.com/zazuko/rdf-vocabularies/issues" + }, + "license": "MIT", + "files": [ + "*.js", + "*.d.ts", + "*.nq", + "*.nt" + ] +} diff --git a/ontologies/shsh/shsh.nq b/ontologies/shsh/shsh.nq new file mode 100644 index 00000000..3215f49c --- /dev/null +++ b/ontologies/shsh/shsh.nq @@ -0,0 +1,415 @@ + "This shapes graph can be used to validate SHACL shapes graphs against a subset of the syntax rules."@en . + "SHACL for SHACL"@en . + _:c14n33 . + . + . + . + . + "Defines constraints on what it means for a node to be a node within a well-formed RDF list. Note that this does not check whether the rdf:rest items are also well-formed lists as this would lead to unsupported recursion."@en . + "List node shape"@en . + _:c14n55 . + . + "A shape describing well-formed RDF lists. Currently does not check for non-recursion. This could be expressed using SHACL-SPARQL."@en . + "List shape"@en . + . + _:c14n1 . + . + _:c14n19 . + _:c14n22 . + _:c14n39 . + _:c14n56 . + _:c14n6 . + _:c14n82 . + _:c14n91 . + . + . + . + _:c14n48 . + _:c14n43 . + . + "A shape that can be used to validate the syntax rules of well-formed SHACL paths."@en . + "Path shape"@en . + . + _:c14n29 . + . + _:c14n31 . + . + . + "A shape that can be used to validate syntax rules for other shapes."@en . + "Shape shape"@en . + _:c14n26 . + _:c14n12 . + _:c14n13 . + _:c14n15 . + _:c14n17 . + _:c14n23 . + _:c14n24 . + _:c14n30 . + _:c14n32 . + _:c14n36 . + _:c14n38 . + _:c14n41 . + _:c14n45 . + _:c14n46 . + _:c14n47 . + _:c14n5 . + _:c14n52 . + _:c14n53 . + _:c14n54 . + _:c14n63 . + _:c14n64 . + _:c14n66 . + _:c14n67 . + _:c14n68 . + _:c14n7 . + _:c14n70 . + _:c14n72 . + _:c14n75 . + _:c14n78 . + _:c14n79 . + _:c14n8 . + _:c14n81 . + _:c14n84 . + _:c14n86 . + _:c14n88 . + _:c14n9 . + _:c14n93 . + _:c14n94 . + _:c14n95 . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + _:c14n42 . + . + . + . + . + _:c14n80 . + . + . + . +_:c14n0 . +_:c14n0 _:c14n35 . +_:c14n1 "Each list member (including this node) must be have the shape shsh:ListNodeShape."@en . +_:c14n1 . +_:c14n1 . +_:c14n1 _:c14n77 . +_:c14n10 . +_:c14n10 _:c14n27 . +_:c14n100 . +_:c14n101 _:c14n100 . +_:c14n101 _:c14n102 . +_:c14n102 . +_:c14n102 . +_:c14n103 . +_:c14n104 _:c14n103 . +_:c14n104 _:c14n105 . +_:c14n105 . +_:c14n105 . +_:c14n106 . +_:c14n107 . +_:c14n108 . +_:c14n109 _:c14n108 . +_:c14n109 . +_:c14n11 "false"^^ . +_:c14n11 . +_:c14n110 . +_:c14n111 _:c14n85 . +_:c14n111 _:c14n112 . +_:c14n112 _:c14n113 . +_:c14n112 _:c14n114 . +_:c14n113 "true"^^ . +_:c14n113 . +_:c14n113 _:c14n65 . +_:c14n114 _:c14n115 . +_:c14n114 _:c14n116 . +_:c14n115 "true"^^ . +_:c14n115 . +_:c14n115 _:c14n96 . +_:c14n116 _:c14n117 . +_:c14n116 _:c14n118 . +_:c14n117 "true"^^ . +_:c14n117 . +_:c14n117 _:c14n87 . +_:c14n118 _:c14n119 . +_:c14n118 _:c14n120 . +_:c14n119 "true"^^ . +_:c14n119 . +_:c14n119 _:c14n76 . +_:c14n12 "1"^^ . +_:c14n12 . +_:c14n12 . +_:c14n120 _:c14n121 . +_:c14n120 . +_:c14n121 "true"^^ . +_:c14n121 . +_:c14n121 _:c14n59 . +_:c14n122 _:c14n40 . +_:c14n122 _:c14n0 . +_:c14n123 _:c14n83 . +_:c14n123 . +_:c14n124 _:c14n57 . +_:c14n124 _:c14n123 . +_:c14n125 _:c14n74 . +_:c14n125 . +_:c14n126 _:c14n90 . +_:c14n126 _:c14n125 . +_:c14n127 _:c14n51 . +_:c14n127 . +_:c14n128 . +_:c14n128 . +_:c14n129 . +_:c14n129 . +_:c14n13 "1"^^ . +_:c14n13 . +_:c14n13 . +_:c14n14 . +_:c14n14 . +_:c14n15 . +_:c14n15 "1"^^ . +_:c14n15 . +_:c14n16 . +_:c14n16 _:c14n10 . +_:c14n17 . +_:c14n17 "1"^^ . +_:c14n17 . +_:c14n18 . +_:c14n19 "0"^^ . +_:c14n19 . +_:c14n2 . +_:c14n2 _:c14n89 . +_:c14n20 _:c14n106 . +_:c14n20 _:c14n129 . +_:c14n21 "0"^^ . +_:c14n21 . +_:c14n22 "0"^^ . +_:c14n22 . +_:c14n23 . +_:c14n23 . +_:c14n24 . +_:c14n24 . +_:c14n25 _:c14n60 . +_:c14n26 _:c14n69 . +_:c14n26 _:c14n109 . +_:c14n27 . +_:c14n27 _:c14n2 . +_:c14n28 . +_:c14n28 . +_:c14n29 . +_:c14n29 _:c14n3 . +_:c14n3 _:c14n25 . +_:c14n30 _:c14n126 . +_:c14n30 . +_:c14n31 "1"^^ . +_:c14n31 "1"^^ . +_:c14n31 . +_:c14n31 . +_:c14n32 . +_:c14n32 "1"^^ . +_:c14n32 . +_:c14n33 "http://www.w3.org/ns/shacl-shacl#" . +_:c14n33 "shsh" . +_:c14n34 . +_:c14n34 _:c14n104 . +_:c14n35 . +_:c14n35 _:c14n62 . +_:c14n36 . +_:c14n36 . +_:c14n37 "1"^^ . +_:c14n37 "1"^^ . +_:c14n37 . +_:c14n38 . +_:c14n38 . +_:c14n39 "0"^^ . +_:c14n39 . +_:c14n4 _:c14n107 . +_:c14n4 _:c14n128 . +_:c14n40 . +_:c14n40 _:c14n101 . +_:c14n41 . +_:c14n41 "1"^^ . +_:c14n41 . +_:c14n42 . +_:c14n42 _:c14n73 . +_:c14n43 _:c14n110 . +_:c14n43 _:c14n111 . +_:c14n44 "1"^^ . +_:c14n44 "1"^^ . +_:c14n44 . +_:c14n45 . +_:c14n45 . +_:c14n46 "1"^^ . +_:c14n46 . +_:c14n46 . +_:c14n47 . +_:c14n47 . +_:c14n48 "2"^^ . +_:c14n48 _:c14n58 . +_:c14n49 . +_:c14n49 _:c14n98 . +_:c14n5 . +_:c14n5 . +_:c14n50 . +_:c14n50 _:c14n124 . +_:c14n51 _:c14n18 . +_:c14n51 _:c14n37 . +_:c14n51 _:c14n44 . +_:c14n52 "1"^^ . +_:c14n52 . +_:c14n52 . +_:c14n53 . +_:c14n53 . +_:c14n54 . +_:c14n54 . +_:c14n55 _:c14n71 . +_:c14n55 _:c14n127 . +_:c14n56 "0"^^ . +_:c14n56 . +_:c14n57 . +_:c14n58 . +_:c14n59 "1"^^ . +_:c14n59 "1"^^ . +_:c14n59 . +_:c14n6 "0"^^ . +_:c14n6 . +_:c14n60 _:c14n20 . +_:c14n60 _:c14n122 . +_:c14n61 "0"^^ . +_:c14n61 . +_:c14n62 . +_:c14n62 _:c14n14 . +_:c14n63 _:c14n16 . +_:c14n63 "1"^^ . +_:c14n63 . +_:c14n64 "1"^^ . +_:c14n64 . +_:c14n64 . +_:c14n65 "1"^^ . +_:c14n65 "1"^^ . +_:c14n65 . +_:c14n65 . +_:c14n66 _:c14n92 . +_:c14n66 "1"^^ . +_:c14n66 . +_:c14n67 . +_:c14n67 "1"^^ . +_:c14n67 . +_:c14n68 . +_:c14n68 "1"^^ . +_:c14n68 . +_:c14n69 _:c14n50 . +_:c14n7 . +_:c14n7 _:c14n49 . +_:c14n70 "1"^^ . +_:c14n70 . +_:c14n70 . +_:c14n71 . +_:c14n71 _:c14n21 . +_:c14n71 _:c14n61 . +_:c14n72 "1"^^ . +_:c14n72 . +_:c14n72 . +_:c14n73 . +_:c14n73 . +_:c14n74 . +_:c14n75 "1"^^ . +_:c14n75 . +_:c14n75 . +_:c14n76 "1"^^ . +_:c14n76 "1"^^ . +_:c14n76 . +_:c14n77 . +_:c14n78 . +_:c14n78 "1"^^ . +_:c14n78 . +_:c14n79 . +_:c14n79 "1"^^ . +_:c14n79 . +_:c14n8 "1"^^ . +_:c14n8 . +_:c14n8 . +_:c14n80 . +_:c14n80 _:c14n4 . +_:c14n81 . +_:c14n81 . +_:c14n82 "0"^^ . +_:c14n82 . +_:c14n83 . +_:c14n84 "1"^^ . +_:c14n84 . +_:c14n85 . +_:c14n85 . +_:c14n86 . +_:c14n86 "1"^^ . +_:c14n86 . +_:c14n87 "1"^^ . +_:c14n87 "1"^^ . +_:c14n87 . +_:c14n88 . +_:c14n88 "1"^^ . +_:c14n88 . +_:c14n89 . +_:c14n89 _:c14n28 . +_:c14n9 . +_:c14n9 . +_:c14n90 . +_:c14n91 "0"^^ . +_:c14n91 . +_:c14n92 "true"^^ . +_:c14n92 _:c14n11 . +_:c14n93 . +_:c14n93 . +_:c14n94 . +_:c14n94 "1"^^ . +_:c14n94 . +_:c14n95 . +_:c14n95 _:c14n34 . +_:c14n96 "1"^^ . +_:c14n96 "1"^^ . +_:c14n96 . +_:c14n97 . +_:c14n98 _:c14n97 . +_:c14n98 _:c14n99 . +_:c14n99 . +_:c14n99 . diff --git a/ontologies/shsh/tsconfig.json b/ontologies/shsh/tsconfig.json new file mode 100644 index 00000000..e3d4e50a --- /dev/null +++ b/ontologies/shsh/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig", + "files": ["index.ts"] +} diff --git a/package-lock.json b/package-lock.json index d6618246..847cc92b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1857,6 +1857,10 @@ "resolved": "ontologies/shex", "link": true }, + "node_modules/@vocabulary/shsh": { + "resolved": "ontologies/shsh", + "link": true + }, "node_modules/@vocabulary/sioc": { "resolved": "ontologies/sioc", "link": true @@ -10295,10 +10299,10 @@ }, "ontologies/m4i": { "name": "@vocabulary/m4i", - "version": "1.0.0", + "version": "1.1.0", "license": "MIT", "devDependencies": { - "@vocabulary/builder": "^1.0.1" + "@vocabulary/builder": "^1.0.4" } }, "ontologies/ma": { @@ -10549,6 +10553,13 @@ "@vocabulary/builder": "^1.0.2" } }, + "ontologies/shsh": { + "version": "0.0.0", + "license": "MIT", + "devDependencies": { + "@vocabulary/builder": "^1.0.2" + } + }, "ontologies/sioc": { "name": "@vocabulary/sioc", "version": "1.0.1", @@ -10727,7 +10738,7 @@ }, "packages/builder": { "name": "@vocabulary/builder", - "version": "1.0.3", + "version": "1.0.4", "license": "MIT", "dependencies": { "@rdfjs/fetch-lite": "^3.2.1", @@ -10758,7 +10769,8 @@ } }, "packages/loader": { - "version": "0.0.0", + "name": "@zazuko/vocabulary-loader", + "version": "1.0.0", "dependencies": { "@rdfjs/parser-n3": "^2.0.1", "@types/rdfjs__environment": "^0.1", @@ -10768,14 +10780,15 @@ }, "packages/prefixes": { "name": "@zazuko/prefixes", - "version": "2.0.0", + "version": "2.0.1", "license": "MIT" }, "packages/vocabularies": { "name": "@zazuko/vocabularies", - "version": "2.0.1", + "version": "2.0.2", "license": "MIT", "dependencies": { + "@rdfjs/parser-n3": "^2.0.1", "@vocabulary/acl": "^1.0.0", "@vocabulary/as": "^1.0.0", "@vocabulary/bibo": "^1.0.0", @@ -10879,8 +10892,8 @@ "@vocabulary/xkos": "^1.0.0", "@vocabulary/xsd": "^1.0.0", "@zazuko/env": "^1.3.0", - "@zazuko/prefixes": "^2.0.0", - "@zazuko/vocabulary-loader": "^0.0.0", + "@zazuko/prefixes": "^2.0.1", + "@zazuko/vocabulary-loader": "^1.0.0", "commander": "^10.0.0", "rdf-dataset-ext": "^1", "readable-stream": "^4.3.0" diff --git a/packages/prefixes/prefixes.ts b/packages/prefixes/prefixes.ts index 5a33129b..e222a203 100644 --- a/packages/prefixes/prefixes.ts +++ b/packages/prefixes/prefixes.ts @@ -81,6 +81,7 @@ const packagedPrefixes = { sf: 'http://www.opengis.net/ont/sf#', sh: 'http://www.w3.org/ns/shacl#', shex: 'http://www.w3.org/ns/shex#', + shsh: 'https://www.w3.org/ns/shacl-shacl#', sioc: 'http://rdfs.org/sioc/ns#', skos: 'http://www.w3.org/2004/02/skos/core#', skosxl: 'http://www.w3.org/2008/05/skos-xl#', From 4c3da2dd8e24e1957e84566e22c12c6a199fd093 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Fri, 13 Oct 2023 15:41:54 +0200 Subject: [PATCH 4/7] build(deps): add shsh to main package --- package-lock.json | 2 ++ packages/vocabularies/package.json | 1 + 2 files changed, 3 insertions(+) diff --git a/package-lock.json b/package-lock.json index 847cc92b..c5805169 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10554,6 +10554,7 @@ } }, "ontologies/shsh": { + "name": "@vocabulary/shsh", "version": "0.0.0", "license": "MIT", "devDependencies": { @@ -10869,6 +10870,7 @@ "@vocabulary/sf": "^1.0.0", "@vocabulary/sh": "^1.0.0", "@vocabulary/shex": "^1.0.0", + "@vocabulary/shsh": "^0.0.0", "@vocabulary/sioc": "^1.0.0", "@vocabulary/skos": "^1.0.0", "@vocabulary/skosxl": "^1.0.0", diff --git a/packages/vocabularies/package.json b/packages/vocabularies/package.json index 16e0cf29..e789bf21 100644 --- a/packages/vocabularies/package.json +++ b/packages/vocabularies/package.json @@ -100,6 +100,7 @@ "@vocabulary/set": "^1.0.0", "@vocabulary/sf": "^1.0.0", "@vocabulary/sh": "^1.0.0", + "@vocabulary/shsh": "^0.0.0", "@vocabulary/shex": "^1.0.0", "@vocabulary/sioc": "^1.0.0", "@vocabulary/skos": "^1.0.0", From b13956fb6299c55dfe85de87d3fec2664f998284 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Fri, 13 Oct 2023 15:43:49 +0200 Subject: [PATCH 5/7] build: prefix --- .changeset/sixty-hairs-build.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/sixty-hairs-build.md diff --git a/.changeset/sixty-hairs-build.md b/.changeset/sixty-hairs-build.md new file mode 100644 index 00000000..da6d6006 --- /dev/null +++ b/.changeset/sixty-hairs-build.md @@ -0,0 +1,5 @@ +--- +"@zazuko/prefixes": minor +--- + +New prefix: `shsh` (SHACL shapes to validate SHACL shapes) From d123904884bf2a05532b629e80044611a3ff5e03 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Fri, 13 Oct 2023 16:43:48 +0200 Subject: [PATCH 6/7] docs: add readme --- ontologies/sh/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ontologies/sh/README.md diff --git a/ontologies/sh/README.md b/ontologies/sh/README.md new file mode 100644 index 00000000..080f2dd5 --- /dev/null +++ b/ontologies/sh/README.md @@ -0,0 +1,15 @@ +# @vocabulary/sh + +This package contains a snapshot of the SHACL vocabulary with the addition of +an unofficial rendition of the latest [SHACL Advanced Features](https://w3c.github.io/shacl/shacl-af/) +draft. + +## SHACL Advanced Features + +SHACL-AF adds a handful of properties and node expressions. The latter are expressed here as +node shapes. + +### Known issues + +The node shape `sh:FunctionExpression` currently does not work and will cause false negatives when +validation a shape which uses function expressions. From 80f01324bc263ea0eeeb43cd674de9feef5618f5 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Fri, 13 Oct 2023 16:45:17 +0200 Subject: [PATCH 7/7] docs: add changeset --- .changeset/light-dots-poke.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/light-dots-poke.md diff --git a/.changeset/light-dots-poke.md b/.changeset/light-dots-poke.md new file mode 100644 index 00000000..0b65da6c --- /dev/null +++ b/.changeset/light-dots-poke.md @@ -0,0 +1,5 @@ +--- +"@vocabulary/sh": minor +--- + +Added triples which describe the new terms from [SHACL Advanced Features](https://w3c.github.io/shacl/shacl-af/) 1.1 draft