diff --git a/shacl12-core/images/Makefile b/shacl12-core/images/Makefile new file mode 100644 index 00000000..32a5e100 --- /dev/null +++ b/shacl12-core/images/Makefile @@ -0,0 +1,4 @@ +all: SHACL-UML.svg path-EBNF.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/images/path-EBNF-rr.svg b/shacl12-core/images/path-EBNF-rr.svg new file mode 100644 index 00000000..2ed87cca --- /dev/null +++ b/shacl12-core/images/path-EBNF-rr.svg @@ -0,0 +1,123 @@ + + + + + + + + + + ( + + + + path + + + + ) + + + + predicate + + + + [ + + + sh:inversePath + + + sh:alternativePath + + + sh:zeroOrMorePath + + + sh:oneOrMorePath + + + + path + + + + ] + + + + diff --git a/shacl12-core/images/path-EBNF-rr.txt b/shacl12-core/images/path-EBNF-rr.txt new file mode 100644 index 00000000..9895bd0c --- /dev/null +++ b/shacl12-core/images/path-EBNF-rr.txt @@ -0,0 +1,6 @@ +/* https://www.bottlecaps.de/rr/ui : check SVG, uncheck Embedded */ + +path ::= predicate | + '(' path* ')' | + '[' ('sh:inversePath'|'sh:alternativePath'|'sh:zeroOrMorePath'|'sh:oneOrMorePath') path ']' + diff --git a/shacl12-core/images/path-EBNF.puml b/shacl12-core/images/path-EBNF.puml new file mode 100644 index 00000000..b594cd5e --- /dev/null +++ b/shacl12-core/images/path-EBNF.puml @@ -0,0 +1,3 @@ +@startEbnf +path = predicate | "(", {path}-, ")" | "[", ("sh:inversePath"|"sh:alternativePath"|"sh:zeroOrMorePath"|"sh:oneOrMorePath"), path, "]" ; +@endEbnf \ No newline at end of file diff --git a/shacl12-core/images/path-EBNF.svg b/shacl12-core/images/path-EBNF.svg new file mode 100644 index 00000000..dfe0ba7d --- /dev/null +++ b/shacl12-core/images/path-EBNF.svg @@ -0,0 +1 @@ +pathpredicate(path)[sh:inversePathsh:alternativePathsh:zeroOrMorePathsh:oneOrMorePathpath] \ No newline at end of file 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 ; ] .