diff --git a/shacl12-core/images/Class-Diagram-Arrows.png b/shacl12-core/images/Class-Diagram-Arrows.png deleted file mode 100644 index 7145e83f..00000000 Binary files a/shacl12-core/images/Class-Diagram-Arrows.png and /dev/null differ diff --git a/shacl12-core/images/Makefile b/shacl12-core/images/Makefile new file mode 100644 index 00000000..0a74db0f --- /dev/null +++ b/shacl12-core/images/Makefile @@ -0,0 +1,4 @@ +all: SHACL-UML.svg + +%.svg: %.puml + plantuml -Tsvg $^ diff --git a/shacl12-core/images/SHACL-UML.puml b/shacl12-core/images/SHACL-UML.puml new file mode 100644 index 00000000..feea87ea --- /dev/null +++ b/shacl12-core/images/SHACL-UML.puml @@ -0,0 +1,53 @@ +@startuml +hide circles +hide empty members +skinparam pathHoverColor red ' on cover, highlight blue links as red +' skinparam topurl https://raw.githack.com/w3c/data-shapes/master/shacl12-core/index.html ' links resolve to anchors in current HTML page, when the SVG is embedded + +class "sh:Shape" as Shape [[#shapes]] { + [[#targetClass sh:targetClass]] : rdfs:Class + [[#targetNode sh:targetNode]] : any + [[#targetSubjectsOf sh:targetSubjectsOf]] : rdf:Property + [[#targetObjectsOf sh:targetObjectsOf]] : rdf:Property + .... + [[#deactivated sh:deactivated]] : xsd:boolean + [[#message sh:message]] : xsd:string or rdf:langString + [[#severity sh:severity]] : sh:Severity +} + +class "sh:NodeShape" as NodeShape [[#node-shapes]] { + [[#constraints Constraint parameters]], for example: + [[#NodeKindConstraintComponent sh:nodeKind]] a sh:NodeKind + [[#ClosedConstraintComponent sh:closed]] : xsd:boolean or [[#syntax-rule-closed-datatype sh:ByTypes]] + [[#ClosedConstraintComponent sh:ignoredProperties]] : list + [[#OrConstraintComponent sh:or]], [[#AndConstraintComponent sh:and]], [[#XoneConstraintComponent sh:xone]] : list of Shape + [[#NotConstraintComponent sh:not]] : [[#shapes sh:Shape]] + ... +} + +class "sh:PropertyShape" as PropertyShape [[#property-shapes]] { + [[#constraints Constraint parameters]], for example: + [[#MinCountConstraintComponent sh:minCount]], [[#MaxCountConstraintComponent sh:maxCount]] : xsd:integer + [[#MinLengthConstraintComponent sh:minLength]], [[#MaxLengthConstraintComponent sh:maxLength]] : xsd:integer + [[#ClassConstraintComponent sh:class]] or [[#DatatypeConstraintComponent sh:datatype]] : IRI or list of IRIs + [[#NodeConstraintComponent sh:node]] : [[#node-shapes sh:NodeShape]] + ... + .... + [[#name sh:name]] : xsd:string or rdf:langString + [[#description sh:description]] : xsd:string or rdf:langString + [[#syntax-rule-path-defaultValue sh:defaultValue]] : any + [[#syntax-rule-path-defaultValue sh:values]] : any + [[#order sh:order]] : xsd:integer or xsd:decimal + [[#property-paths sh:path]] : predicate or list or blank node +} + +class "sh:PropertyGroup" as PropertyGroup [[#group sh:group]] { + [[#group sh:order]] : xsd:integer or xsd:decimal + ... eg rdfs:label +} + +Shape <|-- NodeShape +Shape <|-- PropertyShape +NodeShape -> PropertyShape : [[#property-shapes sh:property]] * +PropertyShape --> PropertyGroup : [[#group sh:group]] +@enduml diff --git a/shacl12-core/images/SHACL-UML.svg b/shacl12-core/images/SHACL-UML.svg new file mode 100644 index 00000000..2a34e1d6 --- /dev/null +++ b/shacl12-core/images/SHACL-UML.svg @@ -0,0 +1 @@ +sh:Shapesh:targetClass: rdfs:Classsh:targetNode: anysh:targetSubjectsOf: rdf:Propertysh:targetObjectsOf: rdf:Propertysh:deactivated: xsd:booleansh:message: xsd:string or rdf:langStringsh:severity: sh:Severitysh:NodeShapeConstraint parameters, for example:sh:nodeKinda sh:NodeKindsh:closed: xsd:boolean orsh:ByTypessh:ignoredProperties: listsh:or,sh:and,sh:xone: list of Shapesh:not:sh:Shape...sh:PropertyShapeConstraint parameters, for example:sh:minCount,sh:maxCount: xsd:integersh:minLength,sh:maxLength: xsd:integersh:classorsh:datatype: IRI or list of IRIssh:node:sh:NodeShape...sh:name: xsd:string or rdf:langStringsh:description: xsd:string or rdf:langStringsh:defaultValue: anysh:values: anysh:order: xsd:integer or xsd:decimalsh:path: predicate or list or blank nodesh:PropertyGroupsh:order: xsd:integer or xsd:decimal... eg rdfs:labelsh:property*sh:group \ No newline at end of file diff --git a/shacl12-core/index.html b/shacl12-core/index.html index f2e51773..274f5bce 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -1115,70 +1115,15 @@

Shapes and Constraints

The following introduction is non-normative.

- The following informal diagram provides an overview of some of the key classes in the SHACL vocabulary. + The following UML diagram provides an overview of some of the key classes and properties in the SHACL vocabulary. Each box represents a class. The content of the boxes under the class name lists some of the properties that instances of these classes may have, together with their value types. - The arrows indicate rdfs:subClassOf triples. + Empty arrowheads indicate inheritance (rdfs:subClassOf) and normal arrowheads indicate RDF relations. +

+
+

+ The Turtle serialization of the SHACL vocabulary contains the complete SHACL vocabulary.

-
-
- -
-
-
sh:targetClass : rdfs:Class
- -
sh:targetObjectsOf : rdf:Property
-
sh:targetSubjectsOf : rdf:Property
-
-
-
sh:deactivated : xsd:boolean
-
sh:message : xsd:string or rdf:langString
-
sh:severity : sh:Severity
-
-
-
-
- Class Diagram Arrows -
-
-
- -
-
-
Constraint parameters, for example:
-
sh:closed : xsd:boolean or sh:ByTypes
-
sh:or : rdf:List
-
sh:not : sh:Shape
-
sh:property : sh:PropertyShape
-
-
-
-
- -
-
-
Constraint parameters, for example:
-
sh:minCount, sh:maxCount : xsd:integer
-
sh:class or sh:datatype : rdfs:Resource
-
sh:node : sh:NodeShape
-
-
-
sh:name : xsd:string or rdf:langString
-
sh:description : xsd:string or rdf:langString
- -
sh:group : sh:PropertyGroup
-
-
-
sh:path : rdfs:Resource
-
-
-
-
-
-

- The Turtle serialization of the SHACL vocabulary contains the complete SHACL vocabulary. -

-
@@ -7976,12 +7921,20 @@

Changes between SHACL 1.0 Core and SHACL 1.2 Core

diff --git a/shacl12-vocabularies/shacl-shacl.ttl b/shacl12-vocabularies/shacl-shacl.ttl index 31f7e7a5..fc0536f3 100644 --- a/shacl12-vocabularies/shacl-shacl.ttl +++ b/shacl12-vocabularies/shacl-shacl.ttl @@ -23,11 +23,11 @@ shsh: shsh:ListShape a sh:NodeShape ; rdfs:label "List shape"@en ; - rdfs:comment "A shape describing well-formed RDF lists. Currently does not check for non-recursion. This could be expressed using SHACL-SPARQL."@en ; + rdfs:comment "A shape describing well-formed RDF lists. Currently does not check for non-recursion (this could be expressed using SHACL-SPARQL)."@en ; rdfs:seeAlso ; sh:property [ sh:path [ sh:zeroOrMorePath rdf:rest ] ; - rdfs:comment "Each list member (including this node) must be have the shape shsh:ListNodeShape."@en ; + rdfs:comment "Each list member (including this node) must have the shape shsh:ListNodeShape."@en ; sh:hasValue rdf:nil ; sh:node shsh:ListNodeShape ; ] .