@shaclmate/compiler 2.0.12 → 2.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/Compiler.d.ts +15 -0
  2. package/Compiler.js +20 -0
  3. package/ShapesGraphToAstTransformer.d.ts +18 -23
  4. package/ShapesGraphToAstTransformer.js +21 -447
  5. package/_ShapesGraphToAstTransformer/NodeShapeAstType.d.ts +3 -0
  6. package/_ShapesGraphToAstTransformer/NodeShapeAstType.js +2 -0
  7. package/_ShapesGraphToAstTransformer/index.d.ts +10 -0
  8. package/_ShapesGraphToAstTransformer/index.js +10 -0
  9. package/_ShapesGraphToAstTransformer/pickLiteral.d.ts +4 -0
  10. package/_ShapesGraphToAstTransformer/pickLiteral.js +18 -0
  11. package/_ShapesGraphToAstTransformer/propertyShapeNodeKinds.d.ts +4 -0
  12. package/_ShapesGraphToAstTransformer/propertyShapeNodeKinds.js +26 -0
  13. package/_ShapesGraphToAstTransformer/shapeAstName.d.ts +5 -0
  14. package/_ShapesGraphToAstTransformer/shapeAstName.js +28 -0
  15. package/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.d.ts +6 -0
  16. package/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.js +165 -0
  17. package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstCompositeType.d.ts +13 -0
  18. package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstCompositeType.js +198 -0
  19. package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstIdentifierType.d.ts +12 -0
  20. package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstIdentifierType.js +29 -0
  21. package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstLiteralType.d.ts +12 -0
  22. package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstLiteralType.js +43 -0
  23. package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.d.ts +6 -0
  24. package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.js +31 -0
  25. package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstTermType.d.ts +14 -0
  26. package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstTermType.js +21 -0
  27. package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstType.d.ts +16 -0
  28. package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstType.js +58 -0
  29. package/ast/Ast.d.ts +5 -0
  30. package/ast/CompositeType.d.ts +13 -0
  31. package/ast/CompositeType.js +2 -0
  32. package/ast/IdentifierType.d.ts +3 -6
  33. package/ast/IntersectionType.d.ts +2 -2
  34. package/ast/ListType.d.ts +53 -0
  35. package/ast/ListType.js +2 -0
  36. package/ast/LiteralType.d.ts +4 -3
  37. package/ast/Name.d.ts +1 -0
  38. package/ast/ObjectCompositeType.d.ts +22 -0
  39. package/ast/ObjectCompositeType.js +2 -0
  40. package/ast/ObjectIntersectionType.d.ts +8 -0
  41. package/ast/ObjectIntersectionType.js +2 -0
  42. package/ast/ObjectType.d.ts +92 -20
  43. package/ast/ObjectType.js +26 -1
  44. package/ast/ObjectUnionType.d.ts +19 -0
  45. package/ast/ObjectUnionType.js +2 -0
  46. package/ast/PlaceholderType.d.ts +7 -0
  47. package/ast/PlaceholderType.js +2 -0
  48. package/ast/SetType.d.ts +1 -1
  49. package/ast/TermType.d.ts +11 -0
  50. package/ast/TermType.js +2 -0
  51. package/ast/Type.d.ts +11 -3
  52. package/ast/UnionType.d.ts +3 -3
  53. package/ast/index.d.ts +6 -3
  54. package/ast/index.js +6 -3
  55. package/enums/MintingStrategy.d.ts +5 -0
  56. package/enums/MintingStrategy.js +2 -0
  57. package/enums/PropertyVisibility.d.ts +2 -0
  58. package/enums/PropertyVisibility.js +2 -0
  59. package/enums/TsFeature.d.ts +5 -0
  60. package/enums/TsFeature.js +16 -0
  61. package/enums/TsObjectDeclarationType.d.ts +5 -0
  62. package/enums/TsObjectDeclarationType.js +2 -0
  63. package/enums/index.d.ts +5 -0
  64. package/enums/index.js +5 -0
  65. package/generators/Generator.d.ts +5 -0
  66. package/generators/Generator.js +2 -0
  67. package/generators/index.d.ts +2 -2
  68. package/generators/index.js +2 -2
  69. package/generators/json/AstJsonGenerator.d.ts +4 -5
  70. package/generators/json/AstJsonGenerator.js +31 -22
  71. package/generators/ts/BooleanType.d.ts +7 -3
  72. package/generators/ts/BooleanType.js +58 -4
  73. package/generators/ts/DateTimeType.d.ts +17 -0
  74. package/generators/ts/DateTimeType.js +58 -0
  75. package/generators/ts/DeclaredType.d.ts +17 -0
  76. package/generators/ts/DeclaredType.js +10 -0
  77. package/generators/ts/IdentifierType.d.ts +7 -17
  78. package/generators/ts/IdentifierType.js +69 -60
  79. package/generators/ts/Import.d.ts +18 -0
  80. package/generators/ts/Import.js +59 -0
  81. package/generators/ts/ListType.d.ts +18 -8
  82. package/generators/ts/ListType.js +197 -43
  83. package/generators/ts/LiteralType.d.ts +13 -11
  84. package/generators/ts/LiteralType.js +36 -51
  85. package/generators/ts/NumberType.d.ts +7 -3
  86. package/generators/ts/NumberType.js +55 -4
  87. package/generators/ts/ObjectType.d.ts +47 -25
  88. package/generators/ts/ObjectType.js +222 -49
  89. package/generators/ts/ObjectUnionType.d.ts +58 -0
  90. package/generators/ts/ObjectUnionType.js +481 -0
  91. package/generators/ts/OptionType.d.ts +12 -4
  92. package/generators/ts/OptionType.js +65 -16
  93. package/generators/ts/PrimitiveType.d.ts +15 -5
  94. package/generators/ts/PrimitiveType.js +20 -29
  95. package/generators/ts/SetType.d.ts +12 -4
  96. package/generators/ts/SetType.js +103 -29
  97. package/generators/ts/StringType.d.ts +8 -3
  98. package/generators/ts/StringType.js +57 -3
  99. package/generators/ts/TermType.d.ts +52 -0
  100. package/generators/ts/TermType.js +234 -0
  101. package/generators/ts/TsGenerator.d.ts +4 -12
  102. package/generators/ts/TsGenerator.js +44 -100
  103. package/generators/ts/Type.d.ts +107 -46
  104. package/generators/ts/Type.js +78 -61
  105. package/generators/ts/TypeFactory.d.ts +4 -5
  106. package/generators/ts/TypeFactory.js +212 -89
  107. package/generators/ts/UnionType.d.ts +19 -6
  108. package/generators/ts/UnionType.js +230 -120
  109. package/generators/ts/_ObjectType/IdentifierProperty.d.ts +27 -7
  110. package/generators/ts/_ObjectType/IdentifierProperty.js +143 -31
  111. package/generators/ts/_ObjectType/Property.d.ts +125 -9
  112. package/generators/ts/_ObjectType/Property.js +25 -3
  113. package/generators/ts/_ObjectType/ShaclProperty.d.ts +23 -5
  114. package/generators/ts/_ObjectType/ShaclProperty.js +100 -26
  115. package/generators/ts/_ObjectType/TypeDiscriminatorProperty.d.ts +24 -6
  116. package/generators/ts/_ObjectType/TypeDiscriminatorProperty.js +75 -13
  117. package/generators/ts/_ObjectType/classDeclaration.d.ts +2 -1
  118. package/generators/ts/_ObjectType/classDeclaration.js +79 -111
  119. package/generators/ts/_ObjectType/createFunctionDeclaration.d.ts +5 -0
  120. package/generators/ts/_ObjectType/createFunctionDeclaration.js +60 -0
  121. package/generators/ts/_ObjectType/equalsFunctionDeclaration.d.ts +2 -1
  122. package/generators/ts/_ObjectType/equalsFunctionDeclaration.js +12 -20
  123. package/generators/ts/_ObjectType/equalsFunctionOrMethodDeclaration.d.ts +11 -0
  124. package/generators/ts/_ObjectType/equalsFunctionOrMethodDeclaration.js +70 -0
  125. package/generators/ts/_ObjectType/fromJsonFunctionDeclarations.d.ts +4 -0
  126. package/generators/ts/_ObjectType/fromJsonFunctionDeclarations.js +78 -0
  127. package/generators/ts/_ObjectType/fromRdfFunctionDeclarations.d.ts +4 -0
  128. package/generators/ts/_ObjectType/fromRdfFunctionDeclarations.js +91 -0
  129. package/generators/ts/_ObjectType/hashFunctionDeclaration.d.ts +3 -3
  130. package/generators/ts/_ObjectType/hashFunctionDeclaration.js +11 -55
  131. package/generators/ts/_ObjectType/hashFunctionOrMethodDeclaration.d.ts +11 -0
  132. package/generators/ts/_ObjectType/hashFunctionOrMethodDeclaration.js +64 -0
  133. package/generators/ts/_ObjectType/index.d.ts +8 -2
  134. package/generators/ts/_ObjectType/index.js +8 -2
  135. package/generators/ts/_ObjectType/interfaceDeclaration.d.ts +3 -2
  136. package/generators/ts/_ObjectType/interfaceDeclaration.js +11 -2
  137. package/generators/ts/_ObjectType/jsonSchemaFunctionDeclaration.d.ts +5 -0
  138. package/generators/ts/_ObjectType/jsonSchemaFunctionDeclaration.js +19 -0
  139. package/generators/ts/_ObjectType/jsonUiSchemaFunctionDeclaration.d.ts +5 -0
  140. package/generators/ts/_ObjectType/jsonUiSchemaFunctionDeclaration.js +31 -0
  141. package/generators/ts/_ObjectType/jsonZodSchemaFunctionDeclaration.d.ts +5 -0
  142. package/generators/ts/_ObjectType/jsonZodSchemaFunctionDeclaration.js +37 -0
  143. package/generators/ts/_ObjectType/rdfjsTermExpression.d.ts +6 -0
  144. package/generators/ts/{rdfjsTermExpression.js → _ObjectType/rdfjsTermExpression.js} +3 -1
  145. package/generators/ts/_ObjectType/sparqlFunctionDeclarations.d.ts +4 -0
  146. package/generators/ts/_ObjectType/sparqlFunctionDeclarations.js +101 -0
  147. package/generators/ts/_ObjectType/toJsonFunctionDeclaration.d.ts +5 -0
  148. package/generators/ts/_ObjectType/toJsonFunctionDeclaration.js +19 -0
  149. package/generators/ts/_ObjectType/toJsonFunctionOrMethodDeclaration.d.ts +10 -0
  150. package/generators/ts/_ObjectType/toJsonFunctionOrMethodDeclaration.js +59 -0
  151. package/generators/ts/_ObjectType/toJsonReturnType.d.ts +3 -0
  152. package/generators/ts/_ObjectType/toJsonReturnType.js +19 -0
  153. package/generators/ts/_ObjectType/toRdfFunctionDeclaration.d.ts +3 -2
  154. package/generators/ts/_ObjectType/toRdfFunctionDeclaration.js +11 -45
  155. package/generators/ts/_ObjectType/toRdfFunctionOrMethodDeclaration.d.ts +10 -0
  156. package/generators/ts/_ObjectType/toRdfFunctionOrMethodDeclaration.js +67 -0
  157. package/generators/ts/objectInitializer.d.ts +2 -0
  158. package/generators/ts/objectInitializer.js +14 -0
  159. package/generators/ts/tsComment.d.ts +5 -0
  160. package/generators/ts/tsComment.js +11 -0
  161. package/generators/ts/tsName.d.ts +1 -1
  162. package/generators/ts/tsName.js +1 -0
  163. package/index.d.ts +1 -1
  164. package/index.js +1 -1
  165. package/input/NodeShape.d.ts +46 -0
  166. package/input/NodeShape.js +165 -0
  167. package/input/Ontology.d.ts +13 -0
  168. package/input/Ontology.js +30 -0
  169. package/input/PropertyShape.d.ts +15 -0
  170. package/input/PropertyShape.js +34 -0
  171. package/input/Shape.d.ts +4 -0
  172. package/input/Shape.js +2 -0
  173. package/input/ShapesGraph.d.ts +9 -0
  174. package/input/ShapesGraph.js +50 -0
  175. package/input/ancestorClassIris.d.ts +4 -0
  176. package/input/ancestorClassIris.js +21 -0
  177. package/input/descendantClassIris.d.ts +4 -0
  178. package/input/descendantClassIris.js +21 -0
  179. package/input/generated.d.ts +274 -0
  180. package/input/generated.js +1420 -0
  181. package/input/index.d.ts +7 -0
  182. package/input/index.js +7 -0
  183. package/input/tsFeatures.d.ts +10 -0
  184. package/input/tsFeatures.js +42 -0
  185. package/package.json +14 -8
  186. package/ast/MintingStrategy.d.ts +0 -8
  187. package/ast/MintingStrategy.js +0 -9
  188. package/generators/ts/Configuration.d.ts +0 -29
  189. package/generators/ts/Configuration.js +0 -40
  190. package/generators/ts/IntersectionType.d.ts +0 -14
  191. package/generators/ts/IntersectionType.js +0 -26
  192. package/generators/ts/RdfjsTermType.d.ts +0 -25
  193. package/generators/ts/RdfjsTermType.js +0 -46
  194. package/generators/ts/_ObjectType/fromRdfFunctionDeclaration.d.ts +0 -4
  195. package/generators/ts/_ObjectType/fromRdfFunctionDeclaration.js +0 -72
  196. package/generators/ts/_ObjectType/sparqlGraphPatternsClassDeclaration.d.ts +0 -4
  197. package/generators/ts/_ObjectType/sparqlGraphPatternsClassDeclaration.js +0 -46
  198. package/generators/ts/rdfjsTermExpression.d.ts +0 -5
  199. package/vocabularies/dashDataset.d.ts +0 -3
  200. package/vocabularies/dashDataset.js +0 -2370
  201. package/vocabularies/index.d.ts +0 -2
  202. package/vocabularies/index.js +0 -2
  203. package/vocabularies/shaclmate.d.ts +0 -15
  204. package/vocabularies/shaclmate.js +0 -6
@@ -1,2370 +0,0 @@
1
- import { Parser, Store } from "n3";
2
- export const dashDataset = new Store(new Parser({ format: "text/turtle" }).parse(`
3
- # baseURI: http://datashapes.org/dash
4
- # imports: http://www.w3.org/ns/shacl#
5
- # prefix: dash
6
-
7
- @prefix dash: <http://datashapes.org/dash#> .
8
- @prefix owl: <http://www.w3.org/2002/07/owl#> .
9
- @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
10
- @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
11
- @prefix sh: <http://www.w3.org/ns/shacl#> .
12
- @prefix tosh: <http://topbraid.org/tosh#> .
13
- @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
14
-
15
- <http://datashapes.org/dash>
16
- a owl:Ontology ;
17
- rdfs:comment "DASH is a SHACL library for frequently needed features and design patterns. The constraint components in this library are 100% standards compliant and will work on any engine that fully supports SHACL." ;
18
- rdfs:label "DASH Data Shapes Vocabulary" ;
19
- owl:imports sh: ;
20
- sh:declare [
21
- sh:namespace "http://datashapes.org/dash#"^^xsd:anyURI ;
22
- sh:prefix "dash" ;
23
- ] ;
24
- sh:declare [
25
- sh:namespace "http://purl.org/dc/terms/"^^xsd:anyURI ;
26
- sh:prefix "dcterms" ;
27
- ] ;
28
- sh:declare [
29
- sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ;
30
- sh:prefix "rdf" ;
31
- ] ;
32
- sh:declare [
33
- sh:namespace "http://www.w3.org/2000/01/rdf-schema#"^^xsd:anyURI ;
34
- sh:prefix "rdfs" ;
35
- ] ;
36
- sh:declare [
37
- sh:namespace "http://www.w3.org/2001/XMLSchema#"^^xsd:anyURI ;
38
- sh:prefix "xsd" ;
39
- ] ;
40
- sh:declare [
41
- sh:namespace "http://www.w3.org/2002/07/owl#"^^xsd:anyURI ;
42
- sh:prefix "owl" ;
43
- ] ;
44
- sh:declare [
45
- sh:namespace "http://www.w3.org/2004/02/skos/core#"^^xsd:anyURI ;
46
- sh:prefix "skos" ;
47
- ] ;
48
- .
49
- dash:APIStatus
50
- a rdfs:Class ;
51
- a sh:NodeShape ;
52
- rdfs:comment "The class of possible values for dash:apiStatus." ;
53
- rdfs:label "API Status" ;
54
- rdfs:subClassOf rdfs:Resource ;
55
- .
56
- dash:Action
57
- a dash:ShapeClass ;
58
- dash:abstract true ;
59
- rdfs:comment "An executable command triggered by an agent, backed by a Script implementation. Actions may get deactivated using sh:deactivated." ;
60
- rdfs:label "Action" ;
61
- rdfs:subClassOf dash:Script ;
62
- rdfs:subClassOf sh:Parameterizable ;
63
- .
64
- dash:ActionGroup
65
- a dash:ShapeClass ;
66
- rdfs:comment "A group of ResourceActions, used to arrange items in menus etc. Similar to sh:PropertyGroups, they may have a sh:order and should have labels (in multiple languages if applicable)." ;
67
- rdfs:label "Action group" ;
68
- rdfs:subClassOf rdfs:Resource ;
69
- .
70
- dash:ActionTestCase
71
- a dash:ShapeClass ;
72
- rdfs:comment """A test case that evaluates a dash:Action using provided input parameters. Requires exactly one value for dash:action and will operate on the test case's graph (with imports) as both data and shapes graph.
73
-
74
- Currently only supports read-only actions, allowing the comparison of actual results with the expected results.""" ;
75
- rdfs:label "Action test case" ;
76
- rdfs:subClassOf dash:TestCase ;
77
- .
78
- dash:AllObjects
79
- a dash:AllObjectsTarget ;
80
- rdfs:comment "A reusable instance of dash:AllObjectsTarget." ;
81
- rdfs:label "All objects" ;
82
- .
83
- dash:AllObjectsTarget
84
- a sh:SPARQLTargetType ;
85
- rdfs:comment "A target containing all objects in the data graph as focus nodes." ;
86
- rdfs:label "All objects target" ;
87
- rdfs:subClassOf sh:Target ;
88
- sh:labelTemplate "All objects" ;
89
- sh:prefixes <http://datashapes.org/dash> ;
90
- sh:select """SELECT DISTINCT ?this
91
- WHERE {
92
- ?anyS ?anyP ?this .
93
- }""" ;
94
- .
95
- dash:AllSubjects
96
- a dash:AllSubjectsTarget ;
97
- rdfs:comment "A reusable instance of dash:AllSubjectsTarget." ;
98
- rdfs:label "All subjects" ;
99
- .
100
- dash:AllSubjectsTarget
101
- a sh:SPARQLTargetType ;
102
- rdfs:comment "A target containing all subjects in the data graph as focus nodes." ;
103
- rdfs:label "All subjects target" ;
104
- rdfs:subClassOf sh:Target ;
105
- sh:labelTemplate "All subjects" ;
106
- sh:prefixes <http://datashapes.org/dash> ;
107
- sh:select """SELECT DISTINCT ?this
108
- WHERE {
109
- ?this ?anyP ?anyO .
110
- }""" ;
111
- .
112
- dash:AutoCompleteEditor
113
- a dash:SingleEditor ;
114
- rdfs:comment "An auto-complete field to enter the label of instances of a class. This is the fallback editor for any URI resource if no other editors are more suitable." ;
115
- rdfs:label "Auto-complete editor" ;
116
- .
117
- dash:BlankNodeViewer
118
- a dash:SingleViewer ;
119
- rdfs:comment "A Viewer for blank nodes, rendering as the label of the blank node." ;
120
- rdfs:label "Blank node viewer" ;
121
- .
122
- dash:BooleanSelectEditor
123
- a dash:SingleEditor ;
124
- rdfs:comment """An editor for boolean literals, rendering as a select box with values true and false.
125
-
126
- Also displays the current value (such as "1"^^xsd:boolean), but only allows to switch to true or false.""" ;
127
- rdfs:label "Boolean select editor" ;
128
- .
129
- dash:ChangeScript
130
- a dash:ShapeClass ;
131
- rdfs:comment """Class of ADS scripts that are executed after edits to the data graph were made, but within the same edit.
132
-
133
- These scripts may access the current changes from the graphs with names dataset.addedGraphURI and dataset.deletedGraphURI to learn about which resource values have been added or deleted. For example query them using graph.withDataGraph(dataset.addedGraphURI, ...) or via SPARQL's GRAPH keyword.
134
-
135
- Change scripts may then perform further changes which would again become visible to other change scripts. They MUST NOT have other side effects though, because they may get executed in Preview mode, or the change may cause constraint violations and then be rejected. For side effects, after the change has been applied, use commit scripts (dash:CommitScript).
136
-
137
- Change scripts are executed by their relative sh:order, with a default value of 0. Use lower values to execute before other scripts.""" ;
138
- rdfs:label "Change script" ;
139
- rdfs:subClassOf dash:Script ;
140
- .
141
- dash:ClosedByTypesConstraintComponent
142
- a sh:ConstraintComponent ;
143
- rdfs:comment "A constraint component that can be used to declare that focus nodes are \\"closed\\" based on their rdf:types, meaning that focus nodes may only have values for the properties that are explicitly enumerated via sh:property/sh:path in property constraints at their rdf:types and the superclasses of those. This assumes that the type classes are also shapes." ;
144
- rdfs:label "Closed by types constraint component" ;
145
- sh:nodeValidator [
146
- a sh:SPARQLSelectValidator ;
147
- sh:message "Property {?path} is not among those permitted for any of the types" ;
148
- sh:prefixes <http://datashapes.org/dash> ;
149
- sh:select """SELECT $this (?predicate AS ?path) ?value
150
- WHERE {
151
- \tFILTER ($closedByTypes) .
152
- $this ?predicate ?value .
153
- \tFILTER (?predicate != rdf:type) .
154
- \tFILTER NOT EXISTS {
155
- \t\t$this rdf:type ?type .
156
- \t\t?type rdfs:subClassOf* ?class .
157
- \t\tGRAPH $shapesGraph {
158
- \t\t\t?class sh:property/sh:path ?predicate .
159
- \t\t}
160
- \t}
161
- }""" ;
162
- ] ;
163
- sh:parameter dash:ClosedByTypesConstraintComponent-closedByTypes ;
164
- .
165
- dash:ClosedByTypesConstraintComponent-closedByTypes
166
- a sh:Parameter ;
167
- sh:path dash:closedByTypes ;
168
- dash:reifiableBy dash:ConstraintReificationShape ;
169
- sh:datatype xsd:boolean ;
170
- sh:description "True to indicate that the focus nodes are closed by their types. A constraint violation is reported for each property value of the focus node where the property is not among those that are explicitly declared via sh:property/sh:path in any of the rdf:types of the focus node (and their superclasses). The property rdf:type is always permitted." ;
171
- sh:maxCount 1 ;
172
- .
173
- dash:CoExistsWithConstraintComponent
174
- a sh:ConstraintComponent ;
175
- dash:localConstraint true ;
176
- rdfs:comment "A constraint component that can be used to express a constraint on property shapes so that if the property path has any value then the given property must also have a value, and vice versa." ;
177
- rdfs:label "Co-exists-with constraint component" ;
178
- sh:message "Values must co-exist with values of {$coExistsWith}" ;
179
- sh:parameter dash:CoExistsWithConstraintComponent-coExistsWith ;
180
- sh:propertyValidator [
181
- a sh:SPARQLSelectValidator ;
182
- sh:prefixes <http://datashapes.org/dash> ;
183
- sh:select """SELECT $this
184
- WHERE {
185
- \t{
186
- \tFILTER (EXISTS { $this $PATH ?any } && NOT EXISTS { $this $coExistsWith ?any })
187
- \t}
188
- \tUNION
189
- \t{
190
- \tFILTER (NOT EXISTS { $this $PATH ?any } && EXISTS { $this $coExistsWith ?any })
191
- \t}
192
- }""" ;
193
- ] ;
194
- .
195
- dash:CoExistsWithConstraintComponent-coExistsWith
196
- a sh:Parameter ;
197
- sh:path dash:coExistsWith ;
198
- dash:editor dash:PropertyAutoCompleteEditor ;
199
- dash:reifiableBy dash:ConstraintReificationShape ;
200
- dash:viewer dash:PropertyLabelViewer ;
201
- sh:description "The properties that must co-exist with the surrounding property (path). If the surrounding property path has any value then the given property must also have a value, and vice versa." ;
202
- sh:name "co-exists with" ;
203
- sh:nodeKind sh:IRI ;
204
- .
205
- dash:CommitScript
206
- a dash:ShapeClass ;
207
- rdfs:comment """Class of ADS scripts that are executed after edits to the data graph were made and have been committed.
208
-
209
- These scripts may access the changes that have just happened from the graphs with names dataset.addedGraphURI and dataset.deletedGraphURI to learn about which resource values have been added or deleted. For example query them using graph.withDataGraph(dataset.addedGraphURI, ...) or via SPARQL's GRAPH keyword.
210
-
211
- Commit scripts may then perform side effects such as updating other graphs or sending out notifications to external systems. For edits that should be made within a finishing change, use change scripts (dash:ChangeScript).
212
-
213
- Commit scripts are executed by their relative sh:order, with a default value of 0. Use lower values to execute before other scripts.""" ;
214
- rdfs:label "Commit script" ;
215
- rdfs:subClassOf dash:Script ;
216
- .
217
- dash:ConstraintReificationShape
218
- a sh:NodeShape ;
219
- rdfs:comment "Can be used to attach sh:severity and sh:messages to individual constraints using reification." ;
220
- rdfs:label "Constraint reification shape" ;
221
- sh:property dash:ConstraintReificationShape-message ;
222
- sh:property dash:ConstraintReificationShape-severity ;
223
- .
224
- dash:ConstraintReificationShape-message
225
- a sh:PropertyShape ;
226
- sh:path sh:message ;
227
- dash:singleLine true ;
228
- sh:name "messages" ;
229
- sh:nodeKind sh:Literal ;
230
- sh:or dash:StringOrLangString ;
231
- .
232
- dash:ConstraintReificationShape-severity
233
- a sh:PropertyShape ;
234
- sh:path sh:severity ;
235
- sh:class sh:Severity ;
236
- sh:maxCount 1 ;
237
- sh:name "severity" ;
238
- sh:nodeKind sh:IRI ;
239
- .
240
- dash:Constructor
241
- a dash:ShapeClass ;
242
- rdfs:comment """A script that is executed when a new instance of the class associated via dash:constructor is created, e.g. from a New button. Such scripts typically declare one or more parameters that are collected from the user when the script starts. The values of these parameters can be used as named variables in the script for arbitrary purposes such as setting the URI or initializing some property values of the new instance.
243
-
244
- The variable focusNode will hold the named node of the selected type, for example when a constructor is associated with a superclass but the user has pressed New for a subclass.
245
-
246
- The last expression of the script will be used as result of the constructor, so that the surrounding tool knows which resource shall be navigated to next.""" ;
247
- rdfs:label "Constructor" ;
248
- rdfs:subClassOf dash:Script ;
249
- rdfs:subClassOf sh:Parameterizable ;
250
- .
251
- dash:DateOrDateTime
252
- a rdf:List ;
253
- rdf:first [
254
- sh:datatype xsd:date ;
255
- ] ;
256
- rdf:rest (
257
- [
258
- sh:datatype xsd:dateTime ;
259
- ]
260
- ) ;
261
- rdfs:comment "An rdf:List that can be used in property constraints as value for sh:or to indicate that all values of a property must be either xsd:date or xsd:dateTime." ;
262
- rdfs:label "Date or date time" ;
263
- .
264
- dash:DatePickerEditor
265
- a dash:SingleEditor ;
266
- rdfs:comment "An editor for xsd:date literals, offering a calendar-like date picker." ;
267
- rdfs:label "Date picker editor" ;
268
- .
269
- dash:DateTimePickerEditor
270
- a dash:SingleEditor ;
271
- rdfs:comment "An editor for xsd:dateTime literals, offering a calendar-like date picker and a time selector." ;
272
- rdfs:label "Date time picker editor" ;
273
- .
274
- dash:DepictionRole
275
- a dash:PropertyRole ;
276
- rdfs:comment "Depiction properties provide images representing the focus nodes. Typical examples may be a photo of an animal or the map of a country." ;
277
- rdfs:label "Depiction" ;
278
- .
279
- dash:Deprecated
280
- a dash:APIStatus ;
281
- rdfs:comment "Features that have been marked deprecated will remain in the API but should no longer be used by new code and may get deleted in the foreseeable future (e.g., with the next major release)." ;
282
- rdfs:label "deprecated" ;
283
- .
284
- dash:DescriptionRole
285
- a dash:PropertyRole ;
286
- rdfs:comment "Description properties should produce text literals that may be used as an introduction/summary of what a focus node does." ;
287
- rdfs:label "Description" ;
288
- .
289
- dash:DetailsEditor
290
- a dash:SingleEditor ;
291
- rdfs:comment "An editor for non-literal values, typically displaying a nested form where the values of the linked resource can be edited directly on the \\"parent\\" form. Implementations that do not support this (yet) could fall back to an auto-complete widget." ;
292
- rdfs:label "Details editor" ;
293
- .
294
- dash:DetailsViewer
295
- a dash:SingleViewer ;
296
- rdfs:comment "A Viewer for resources that shows the details of the value using its default view shape as a nested form-like display." ;
297
- rdfs:label "Details viewer" ;
298
- .
299
- dash:Editor
300
- a dash:ShapeClass ;
301
- dash:abstract true ;
302
- rdfs:comment "The class of widgets for editing value nodes." ;
303
- rdfs:label "Editor" ;
304
- rdfs:subClassOf dash:Widget ;
305
- .
306
- dash:EnumSelectEditor
307
- a dash:SingleEditor ;
308
- rdfs:comment "A drop-down editor for enumerated values (typically based on sh:in lists)." ;
309
- rdfs:label "Enum select editor" ;
310
- .
311
- dash:Experimental
312
- a dash:APIStatus ;
313
- rdfs:comment "Features that are marked experimental can be used by early adopters but there is no guarantee that they will reach stable state." ;
314
- rdfs:label "experimental" ;
315
- .
316
- dash:ExploreAction
317
- a dash:ShapeClass ;
318
- rdfs:comment "An action typically showing up in an Explore section of a selected resource. Cannot make changes to the data." ;
319
- rdfs:label "Explore action" ;
320
- rdfs:subClassOf dash:ResourceAction ;
321
- .
322
- dash:FailureResult
323
- a rdfs:Class ;
324
- rdfs:comment "A result representing a validation failure such as an unsupported recursion." ;
325
- rdfs:label "Failure result" ;
326
- rdfs:subClassOf sh:AbstractResult ;
327
- .
328
- dash:FailureTestCaseResult
329
- a rdfs:Class ;
330
- rdfs:comment "Represents a failure of a test case." ;
331
- rdfs:label "Failure test case result" ;
332
- rdfs:subClassOf dash:TestCaseResult ;
333
- .
334
- dash:FunctionTestCase
335
- a dash:ShapeClass ;
336
- rdfs:comment "A test case that verifies that a given SPARQL expression produces a given, expected result." ;
337
- rdfs:label "Function test case" ;
338
- rdfs:subClassOf dash:TestCase ;
339
- .
340
- dash:GraphService
341
- a dash:ShapeClass ;
342
- rdfs:comment "A service that does not apply to a specific resource (as ResourceService does) but operates on the whole graph. The focusNode variable will be the URI of the current base graph (e.g. <urn:x-evn-master:geo> as a NamedNode." ;
343
- rdfs:label "Graph service" ;
344
- rdfs:subClassOf dash:Service ;
345
- .
346
- dash:GraphStoreTestCase
347
- a dash:ShapeClass ;
348
- rdfs:comment "A test case that can be used to verify that an RDF file could be loaded (from a file) and that the resulting RDF graph is equivalent to a given TTL file." ;
349
- rdfs:label "Graph store test case" ;
350
- rdfs:subClassOf dash:TestCase ;
351
- .
352
- dash:GraphUpdate
353
- a rdfs:Class ;
354
- rdfs:comment "A suggestion consisting of added and/or deleted triples, represented as rdf:Statements via dash:addedTriple and dash:deletedTriple." ;
355
- rdfs:label "Graph update" ;
356
- rdfs:subClassOf dash:Suggestion ;
357
- .
358
- dash:GraphValidationTestCase
359
- a dash:ShapeClass ;
360
- rdfs:comment "A test case that performs SHACL constraint validation on the whole graph and compares the results with the expected validation results stored with the test case. By default this excludes meta-validation (i.e. the validation of the shape definitions themselves). If that's desired, set dash:validateShapes to true." ;
361
- rdfs:label "Graph validation test case" ;
362
- rdfs:subClassOf dash:ValidationTestCase ;
363
- .
364
- dash:HTMLOrStringOrLangString
365
- a rdf:List ;
366
- rdf:first [
367
- sh:datatype rdf:HTML ;
368
- ] ;
369
- rdf:rest (
370
- [
371
- sh:datatype xsd:string ;
372
- ]
373
- [
374
- sh:datatype rdf:langString ;
375
- ]
376
- ) ;
377
- rdfs:comment "An rdf:List that can be used in property constraints as value for sh:or to indicate that all values of a property must be either rdf:HTML, xsd:string or rdf:langString (in that order of preference)." ;
378
- rdfs:label "HTML or string or langString" ;
379
- .
380
- dash:HTMLViewer
381
- a dash:SingleViewer ;
382
- rdfs:comment "A Viewer for HTML encoded text from rdf:HTML literals, rendering as parsed HTML DOM elements. Also displays the language if the HTML has a lang attribute on its root DOM element." ;
383
- rdfs:label "HTML viewer" ;
384
- .
385
- dash:HasValueInConstraintComponent
386
- a sh:ConstraintComponent ;
387
- rdfs:comment "A constraint component that can be used to express a constraint on property shapes so that one of the values of the property path must be a member of a given list of nodes." ;
388
- rdfs:label "Has value in constraint component" ;
389
- sh:message "At least one of the values must be in {$hasValueIn}" ;
390
- sh:parameter dash:HasValueInConstraintComponent-hasValueIn ;
391
- sh:propertyValidator [
392
- a sh:SPARQLSelectValidator ;
393
- sh:prefixes <http://datashapes.org/dash> ;
394
- sh:select """SELECT $this
395
- WHERE {
396
- \tFILTER NOT EXISTS {
397
- \t$this $PATH ?value .
398
- \t\tGRAPH $shapesGraph {
399
- \t\t\t$hasValueIn rdf:rest*/rdf:first ?value .
400
- \t\t}
401
- \t}
402
- }""" ;
403
- ] ;
404
- .
405
- dash:HasValueInConstraintComponent-hasValueIn
406
- a sh:Parameter ;
407
- sh:path dash:hasValueIn ;
408
- dash:reifiableBy dash:ConstraintReificationShape ;
409
- sh:description "At least one of the value nodes must be a member of the given list." ;
410
- sh:name "has value in" ;
411
- sh:node dash:ListShape ;
412
- .
413
- dash:HasValueTarget
414
- a sh:SPARQLTargetType ;
415
- rdfs:comment "A target type for all subjects where a given predicate has a certain object value." ;
416
- rdfs:label "Has Value target" ;
417
- rdfs:subClassOf sh:Target ;
418
- sh:labelTemplate "All subjects where {$predicate} has value {$object}" ;
419
- sh:parameter [
420
- a sh:Parameter ;
421
- sh:path dash:object ;
422
- sh:description "The value that is expected to be present." ;
423
- sh:name "object" ;
424
- ] ;
425
- sh:parameter [
426
- a sh:Parameter ;
427
- sh:path dash:predicate ;
428
- sh:description "The predicate property." ;
429
- sh:name "predicate" ;
430
- sh:nodeKind sh:IRI ;
431
- ] ;
432
- sh:prefixes <http://datashapes.org/dash> ;
433
- sh:select """SELECT DISTINCT ?this
434
- WHERE {
435
- ?this $predicate $object .
436
- }""" ;
437
- .
438
- dash:HasValueWithClassConstraintComponent
439
- a sh:ConstraintComponent ;
440
- rdfs:comment "A constraint component that can be used to express a constraint on property shapes so that one of the values of the property path must be an instance of a given class." ;
441
- rdfs:label "Has value with class constraint component" ;
442
- sh:message "At least one of the values must be an instance of class {$hasValueWithClass}" ;
443
- sh:parameter dash:HasValueWithClassConstraintComponent-hasValueWithClass ;
444
- sh:propertyValidator [
445
- a sh:SPARQLSelectValidator ;
446
- sh:prefixes <http://datashapes.org/dash> ;
447
- sh:select """SELECT $this
448
- WHERE {
449
- \tFILTER NOT EXISTS {
450
- \t$this $PATH ?value .
451
- \t\t?value a ?type .
452
- \t\t?type rdfs:subClassOf* $hasValueWithClass .
453
- \t}
454
- }""" ;
455
- ] ;
456
- .
457
- dash:HasValueWithClassConstraintComponent-hasValueWithClass
458
- a sh:Parameter ;
459
- sh:path dash:hasValueWithClass ;
460
- dash:reifiableBy dash:ConstraintReificationShape ;
461
- sh:class rdfs:Class ;
462
- sh:description "One of the values of the property path must be an instance of the given class." ;
463
- sh:name "has value with class" ;
464
- sh:nodeKind sh:IRI ;
465
- .
466
- dash:HyperlinkViewer
467
- a dash:SingleViewer ;
468
- rdfs:comment """A Viewer for literals, rendering as a hyperlink to a URL.
469
-
470
- For literals it assumes the lexical form is the URL.
471
-
472
- This is often used as default viewer for xsd:anyURI literals. Unsupported for blank nodes.""" ;
473
- rdfs:label "Hyperlink viewer" ;
474
- .
475
- dash:IDRole
476
- a dash:PropertyRole ;
477
- rdfs:comment "ID properties are short strings or other literals that identify the focus node among siblings. Examples may include social security numbers." ;
478
- rdfs:label "ID" ;
479
- .
480
- dash:IconRole
481
- a dash:PropertyRole ;
482
- rdfs:comment """Icon properties produce images that are typically small and almost square-shaped, and that may be displayed in the upper left corner of a focus node's display. Values should be xsd:string or xsd:anyURI literals or IRI nodes pointing at URLs. Those URLs should ideally be vector graphics such as .svg files.
483
-
484
- Instances of the same class often have the same icon, and this icon may be computed using a sh:values rule or as sh:defaultValue.
485
-
486
- If the value is a relative URL then those should be resolved against the server that delivered the surrounding page.""" ;
487
- rdfs:label "Icon" ;
488
- .
489
- dash:ImageViewer
490
- a dash:SingleViewer ;
491
- rdfs:comment "A Viewer for URI values that are recognized as images by a browser, rendering as an image." ;
492
- rdfs:label "Image viewer" ;
493
- .
494
- dash:IncludedScript
495
- a dash:ShapeClass ;
496
- rdfs:comment """The code associated with instances of this class will get injected into the generated APIs, as global code snippets. Typically used to declare libraries of utility functions or constants that are (compared to shape scripts) not necessarily associated with specific classes or shapes.
497
-
498
- Note that the JavaScript code stored in dash:js cannot use the export keyword because the code must also work in external scripts (such as on Node.js). Instead, you need to enumerate the exported symbols via dash:exports.""" ;
499
- rdfs:label "Included script" ;
500
- rdfs:subClassOf dash:Script ;
501
- .
502
- dash:IndexedConstraintComponent
503
- a sh:ConstraintComponent ;
504
- rdfs:comment "A constraint component that can be used to mark property shapes to be indexed, meaning that each of its value nodes must carry a dash:index from 0 to N." ;
505
- rdfs:label "Indexed constraint component" ;
506
- sh:parameter dash:IndexedConstraintComponent-indexed ;
507
- .
508
- dash:IndexedConstraintComponent-indexed
509
- a sh:Parameter ;
510
- sh:path dash:indexed ;
511
- dash:reifiableBy dash:ConstraintReificationShape ;
512
- sh:datatype xsd:boolean ;
513
- sh:description "True to activate indexing for this property." ;
514
- sh:maxCount 1 ;
515
- sh:name "indexed" ;
516
- .
517
- dash:InferencingTestCase
518
- a dash:ShapeClass ;
519
- rdfs:comment "A test case to verify whether an inferencing engine is producing identical results to those stored as expected results." ;
520
- rdfs:label "Inferencing test case" ;
521
- rdfs:subClassOf dash:TestCase ;
522
- .
523
- dash:InlineViewer
524
- a dash:MultiViewer ;
525
- rdfs:comment "A multi-viewer that renders all values horizontally, in a more compact form that just a single value per row." ;
526
- rdfs:label "Inline viewer" ;
527
- .
528
- dash:InstancesSelectEditor
529
- a dash:SingleEditor ;
530
- rdfs:comment "A drop-down editor for all instances of the target class (based on sh:class of the property)." ;
531
- rdfs:label "Instances select editor" ;
532
- .
533
- dash:JSONTableViewer
534
- a dash:SingleViewer ;
535
- rdfs:comment """A tabular viewer for rdf:JSON literals with a lexical form in the following format:
536
-
537
- {
538
- \tvars: [ 'col1', 'col2' ], // These are the column keys
539
- \theaderLabels: [ 'Column 1', 'Column 2' ], // Optional, for the column headers
540
- \tbindings: [ // These become the rows
541
- \t\t{
542
- \t\t\tcol1: {
543
- \t\t\t\tlex: 'Value2',
544
- \t\t\t\tdatatype: '...#string',
545
- \t\t\t},
546
- \t\t\tcol2: {
547
- \t\t\t\turi: 'http://.../Instance',
548
- \t\t\t\tlabel: 'Example Instance',
549
- \t\t\t},
550
- \t\t},
551
- \t\t...
552
- \t],
553
- }
554
-
555
- The resulting table will use the headerLabels (if they exist) as column headers, otherwise derive the headers from the variable names. The vars must match the fields in the bindings. The table will contain one row for each binding.
556
-
557
- Using Active Data Shapes, you can construct such literals dynamically using a sh:values rule, e.g.
558
-
559
- ex:MyClass-myProperty
560
- \ta sh:PropertyShape ;
561
- \tsh:path ex:myProperty ;
562
- \tsh:values [
563
- \t\tdash:js ""\\"
564
- \t\t\tDataViewers.createTableViewerJSON(focusNode.select(\`
565
- \t\t\t\tSELECT ?col1 ?col2
566
- \t\t\t\tWHERE {
567
- \t\t\t\t\t$this ex:prop1 ?col1 .
568
- \t\t\t\t\t$this ex:prop2 ?col2 .
569
- \t\t\t\t}
570
- \t\t\t\`))""\\"
571
- \t] .
572
-
573
- You may also produce the JSON literal programmatically in JavaScript, or assert the triples by other means.""" ;
574
- rdfs:label "JSON table viewer" ;
575
- .
576
- dash:KeyInfoRole
577
- a dash:PropertyRole ;
578
- rdfs:comment "The Key info role may be assigned to properties that are likely of special interest to a reader, so that they should appear whenever a summary of a focus node is shown." ;
579
- rdfs:label "Key info" ;
580
- .
581
- dash:LabelRole
582
- a dash:PropertyRole ;
583
- rdfs:comment "Properties with this role produce strings that may serve as display label for the focus nodes. Labels should be either plain string literals or strings with a language tag. The values should also be single-line." ;
584
- rdfs:label "Label" ;
585
- .
586
- dash:LabelViewer
587
- a dash:SingleViewer ;
588
- rdfs:comment "A Viewer for URI resources, rendering as a hyperlink to that URI based on the display label of the resource. Also includes other ways of interacting with the URI such as opening a nested summary display." ;
589
- rdfs:label "Label viewer" ;
590
- .
591
- dash:LangStringViewer
592
- a dash:SingleViewer ;
593
- rdfs:comment "A Viewer for literals with a language tag, rendering as the text plus a language indicator." ;
594
- rdfs:label "LangString viewer" ;
595
- .
596
- dash:ListNodeShape
597
- a sh:NodeShape ;
598
- rdfs:comment "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." ;
599
- rdfs:label "List node shape" ;
600
- sh:or (
601
- [
602
- sh:hasValue () ;
603
- sh:property [
604
- a sh:PropertyShape ;
605
- sh:path rdf:first ;
606
- sh:maxCount 0 ;
607
- ] ;
608
- sh:property [
609
- a sh:PropertyShape ;
610
- sh:path rdf:rest ;
611
- sh:maxCount 0 ;
612
- ] ;
613
- ]
614
- [
615
- sh:not [
616
- sh:hasValue () ;
617
- ] ;
618
- sh:property [
619
- a sh:PropertyShape ;
620
- sh:path rdf:first ;
621
- sh:maxCount 1 ;
622
- sh:minCount 1 ;
623
- ] ;
624
- sh:property [
625
- a sh:PropertyShape ;
626
- sh:path rdf:rest ;
627
- sh:maxCount 1 ;
628
- sh:minCount 1 ;
629
- ] ;
630
- ]
631
- ) ;
632
- .
633
- dash:ListShape
634
- a sh:NodeShape ;
635
- rdfs:comment """Defines constraints on what it means for a node to be a well-formed RDF list.
636
-
637
- The focus node must either be rdf:nil or not recursive. Furthermore, this shape uses dash:ListNodeShape as a "helper" to walk through all members of the whole list (including itself).""" ;
638
- rdfs:label "List shape" ;
639
- sh:or (
640
- [
641
- sh:hasValue () ;
642
- ]
643
- [
644
- sh:not [
645
- sh:hasValue () ;
646
- ] ;
647
- sh:property [
648
- a sh:PropertyShape ;
649
- sh:path [
650
- sh:oneOrMorePath rdf:rest ;
651
- ] ;
652
- dash:nonRecursive true ;
653
- ] ;
654
- ]
655
- ) ;
656
- sh:property [
657
- a sh:PropertyShape ;
658
- sh:path [
659
- sh:zeroOrMorePath rdf:rest ;
660
- ] ;
661
- rdfs:comment "Each list member (including this node) must be have the shape dash:ListNodeShape." ;
662
- sh:node dash:ListNodeShape ;
663
- ] ;
664
- .
665
- dash:LiteralViewer
666
- a dash:SingleViewer ;
667
- rdfs:comment "A simple viewer for literals, rendering the lexical form of the value." ;
668
- rdfs:label "Literal viewer" ;
669
- .
670
- dash:ModifyAction
671
- a dash:ShapeClass ;
672
- rdfs:comment "An action typically showing up in a Modify section of a selected resource. May make changes to the data." ;
673
- rdfs:label "Modify action" ;
674
- rdfs:subClassOf dash:ResourceAction ;
675
- .
676
- dash:MultiEditor
677
- a dash:ShapeClass ;
678
- rdfs:comment "An editor for multiple/all value nodes at once." ;
679
- rdfs:label "Multi editor" ;
680
- rdfs:subClassOf dash:Editor ;
681
- .
682
- dash:MultiFunction
683
- a rdfs:Class ;
684
- a sh:NodeShape ;
685
- rdfs:comment """A multi-function is a function that can return zero or more result objects consisting of one or more result variables. While normal (SPARQL/SHACL) functions can only return a single result node, multi-functions may not only return multiple nodes but even multiple individual variables per solution.
686
-
687
- A common way of defining multi-functions is by wrapping a SPARQL SELECT query, using dash:SPARQLMultiFunction. However, some MultiFunctions (in TopBraid) may also be implemented natively.""" ;
688
- rdfs:label "Multi-function" ;
689
- rdfs:subClassOf sh:Parameterizable ;
690
- sh:nodeKind sh:IRI ;
691
- .
692
- dash:MultiViewer
693
- a dash:ShapeClass ;
694
- rdfs:comment "A viewer for multiple/all values at once." ;
695
- rdfs:label "Multi viewer" ;
696
- rdfs:subClassOf dash:Viewer ;
697
- .
698
- dash:NoSuitableEditor
699
- a dash:SingleEditor ;
700
- rdfs:comment "An \\"editor\\" that simply informs the user that the values cannot be edited here, but for example through source code editing." ;
701
- rdfs:label "No suitable editor" ;
702
- .
703
- dash:NodeExpressionViewer
704
- a dash:SingleViewer ;
705
- rdfs:comment "A viewer for SHACL Node Expressions."^^rdf:HTML ;
706
- rdfs:label "Node expression viewer" ;
707
- .
708
- dash:NonRecursiveConstraintComponent
709
- a sh:ConstraintComponent ;
710
- rdfs:comment "Used to state that a property or path must not point back to itself." ;
711
- rdfs:label "Non-recursive constraint component" ;
712
- sh:message "Points back at itself (recursively)" ;
713
- sh:parameter dash:NonRecursiveConstraintComponent-nonRecursive ;
714
- sh:propertyValidator [
715
- a sh:SPARQLSelectValidator ;
716
- sh:prefixes <http://datashapes.org/dash> ;
717
- sh:select """SELECT DISTINCT $this ($this AS ?value)
718
- WHERE {
719
- \t{
720
- \t\tFILTER (?nonRecursive)
721
- \t}
722
- $this $PATH $this .
723
- }""" ;
724
- ] ;
725
- .
726
- dash:NonRecursiveConstraintComponent-nonRecursive
727
- a sh:Parameter ;
728
- sh:path dash:nonRecursive ;
729
- dash:reifiableBy dash:ConstraintReificationShape ;
730
- sh:datatype xsd:boolean ;
731
- sh:description """Used to state that a property or path must not point back to itself.
732
-
733
- For example, "a person cannot have itself as parent" can be expressed by setting dash:nonRecursive=true for a given sh:path.
734
-
735
- To express that a person cannot have itself among any of its (recursive) parents, use a sh:path with the + operator such as ex:parent+.""" ;
736
- sh:maxCount 1 ;
737
- sh:name "non-recursive" ;
738
- .
739
- dash:None
740
- a sh:NodeShape ;
741
- rdfs:comment "A Shape that is no node can conform to." ;
742
- rdfs:label "None" ;
743
- sh:in () ;
744
- .
745
- dash:ParameterConstraintComponent
746
- a sh:ConstraintComponent ;
747
- rdfs:comment "A constraint component that can be used to verify that all value nodes conform to the given Parameter."@en ;
748
- rdfs:label "Parameter constraint component"@en ;
749
- sh:parameter dash:ParameterConstraintComponent-parameter ;
750
- .
751
- dash:ParameterConstraintComponent-parameter
752
- a sh:Parameter ;
753
- sh:path sh:parameter ;
754
- .
755
- dash:PrimaryKeyConstraintComponent
756
- a sh:ConstraintComponent ;
757
- dash:localConstraint true ;
758
- rdfs:comment "Enforces a constraint that the given property (sh:path) serves as primary key for all resources in the target of the shape. If a property has been declared to be the primary key then each resource must have exactly one value for that property. Furthermore, the URIs of those resources must start with a given string (dash:uriStart), followed by the URL-encoded primary key value. For example if dash:uriStart is \\"http://example.org/country-\\" and the primary key for an instance is \\"de\\" then the URI must be \\"http://example.org/country-de\\". Finally, as a result of the URI policy, there can not be any other resource with the same value under the same primary key policy." ;
759
- rdfs:label "Primary key constraint component" ;
760
- sh:labelTemplate "The property {?predicate} is the primary key and URIs start with {?uriStart}" ;
761
- sh:message "Violation of primary key constraint" ;
762
- sh:parameter dash:PrimaryKeyConstraintComponent-uriStart ;
763
- sh:propertyValidator [
764
- a sh:SPARQLSelectValidator ;
765
- sh:prefixes <http://datashapes.org/dash> ;
766
- sh:select """SELECT DISTINCT $this
767
- WHERE {
768
- FILTER (
769
- \t\t\t# Must have a value for the primary key
770
- \t\t\tNOT EXISTS { ?this $PATH ?any }
771
- \t\t\t||
772
- \t\t\t# Must have no more than one value for the primary key
773
- \t\t\tEXISTS {
774
- \t\t\t\t?this $PATH ?value1 .
775
- \t\t\t\t?this $PATH ?value2 .
776
- \t\t\t\tFILTER (?value1 != ?value2) .
777
- \t\t\t}
778
- \t\t\t||
779
- \t\t\t# The value of the primary key must align with the derived URI
780
- \t\t\tEXISTS {
781
- \t\t\t\t{
782
- \t\t\t?this $PATH ?value .
783
- \t\t\t\t\tFILTER NOT EXISTS { ?this $PATH ?value2 . FILTER (?value != ?value2) }
784
- \t\t\t\t}
785
- \t\tBIND (CONCAT($uriStart, ENCODE_FOR_URI(str(?value))) AS ?uri) .
786
- \t\tFILTER (str(?this) != ?uri) .
787
- \t\t}
788
- \t\t)
789
- }""" ;
790
- ] ;
791
- .
792
- dash:PrimaryKeyConstraintComponent-uriStart
793
- a sh:Parameter ;
794
- sh:path dash:uriStart ;
795
- dash:reifiableBy dash:ConstraintReificationShape ;
796
- sh:datatype xsd:string ;
797
- sh:description "The start of the URIs of well-formed resources. If specified then the associated property/path serves as \\"primary key\\" for all target nodes (instances). All such target nodes need to have a URI that starts with the given string, followed by the URI-encoded value of the primary key property." ;
798
- sh:maxCount 1 ;
799
- sh:name "URI start" ;
800
- .
801
- dash:PropertyAutoCompleteEditor
802
- a dash:SingleEditor ;
803
- rdfs:comment "An editor for properties that are either defined as instances of rdf:Property or used as IRI values of sh:path. The component uses auto-complete to find these properties by their rdfs:labels or sh:names." ;
804
- rdfs:label "Property auto-complete editor" ;
805
- .
806
- dash:PropertyLabelViewer
807
- a dash:SingleViewer ;
808
- rdfs:comment "A viewer for properties that renders a hyperlink using the display label or sh:name, allowing users to either navigate to the rdf:Property resource or the property shape definition. Should be used in conjunction with PropertyAutoCompleteEditor." ;
809
- rdfs:label "Property label viewer" ;
810
- .
811
- dash:PropertyRole
812
- a rdfs:Class ;
813
- a sh:NodeShape ;
814
- rdfs:comment "The class of roles that a property (shape) may take for its focus nodes." ;
815
- rdfs:label "Property role" ;
816
- rdfs:subClassOf rdfs:Resource ;
817
- .
818
- dash:QueryTestCase
819
- a dash:ShapeClass ;
820
- rdfs:comment "A test case running a given SPARQL SELECT query and comparing its results with those stored as JSON Result Set in the expected result property." ;
821
- rdfs:label "Query test case" ;
822
- rdfs:subClassOf dash:TestCase ;
823
- rdfs:subClassOf sh:SPARQLSelectExecutable ;
824
- .
825
- dash:ReifiableByConstraintComponent
826
- a sh:ConstraintComponent ;
827
- rdfs:label "Reifiable-by constraint component" ;
828
- sh:labelTemplate "Reifiable by {$reifiableBy}" ;
829
- sh:parameter dash:ReifiableByConstraintComponent-reifiableBy ;
830
- .
831
- dash:ReifiableByConstraintComponent-reifiableBy
832
- a sh:Parameter ;
833
- sh:path dash:reifiableBy ;
834
- sh:class sh:NodeShape ;
835
- sh:description "Can be used to specify the node shape that may be applied to reified statements produced by a property shape. The property shape must have a URI resource as its sh:path. The values of this property must be node shapes. User interfaces can use this information to determine which properties to present to users when reified statements are explored or edited. Also, SHACL validators can use it to determine how to validate reified triples. Use dash:None to indicate that no reification should be permitted." ;
836
- sh:maxCount 1 ;
837
- sh:name "reifiable by" ;
838
- sh:nodeKind sh:IRI ;
839
- .
840
- dash:ResourceAction
841
- a dash:ShapeClass ;
842
- dash:abstract true ;
843
- rdfs:comment "An Action that can be executed for a selected resource. Such Actions show up in context menus once they have been assigned a sh:group." ;
844
- rdfs:label "Resource action" ;
845
- rdfs:subClassOf dash:Action ;
846
- .
847
- dash:ResourceService
848
- a dash:ShapeClass ;
849
- rdfs:comment "A Service that can (and must) be applied to a given resource as focus node. Use dash:resourceService to link a class to the services that apply to its instances." ;
850
- rdfs:label "Resource service" ;
851
- rdfs:subClassOf dash:Service ;
852
- .
853
- dash:RichTextEditor
854
- a dash:SingleEditor ;
855
- rdfs:comment "A rich text editor to enter the lexical value of a literal and a drop down to select language. The selected language is stored in the HTML lang attribute of the root node in the HTML DOM tree." ;
856
- rdfs:label "Rich text editor" ;
857
- .
858
- dash:RootClassConstraintComponent
859
- a sh:ConstraintComponent ;
860
- rdfs:comment "A constraint component defining the parameter dash:rootClass, which restricts the values to be either the root class itself or one of its subclasses. This is typically used in conjunction with properties that have rdfs:Class as their type." ;
861
- rdfs:label "Root class constraint component" ;
862
- sh:labelTemplate "Root class {$rootClass}" ;
863
- sh:message "Value must be subclass of {$rootClass}" ;
864
- sh:parameter dash:RootClassConstraintComponent-rootClass ;
865
- sh:validator dash:hasRootClass ;
866
- .
867
- dash:RootClassConstraintComponent-rootClass
868
- a sh:Parameter ;
869
- sh:path dash:rootClass ;
870
- dash:reifiableBy dash:ConstraintReificationShape ;
871
- sh:class rdfs:Class ;
872
- sh:description "The root class." ;
873
- sh:name "root class" ;
874
- sh:nodeKind sh:IRI ;
875
- .
876
- dash:SPARQLConstructTemplate
877
- a rdfs:Class ;
878
- rdfs:comment "Encapsulates one or more SPARQL CONSTRUCT queries that can be parameterized. Parameters will become pre-bound variables in the queries." ;
879
- rdfs:label "SPARQL CONSTRUCT template" ;
880
- rdfs:subClassOf sh:Parameterizable ;
881
- rdfs:subClassOf sh:SPARQLConstructExecutable ;
882
- .
883
- dash:SPARQLMultiFunction
884
- a rdfs:Class ;
885
- a sh:NodeShape ;
886
- rdfs:comment "A multi-function based on a SPARQL SELECT query. The query gets executed with the arguments pre-bound to the variables declared as parameters. The results of the multi-function are all result bindings from the SPARQL result set." ;
887
- rdfs:label "SPARQL multi-function" ;
888
- rdfs:subClassOf dash:MultiFunction ;
889
- rdfs:subClassOf sh:SPARQLSelectExecutable ;
890
- .
891
- dash:SPARQLSelectTemplate
892
- a rdfs:Class ;
893
- rdfs:comment "Encapsulates a SPARQL SELECT query that can be parameterized. Parameters will become pre-bound variables in the query." ;
894
- rdfs:label "SPARQL SELECT template" ;
895
- rdfs:subClassOf sh:Parameterizable ;
896
- rdfs:subClassOf sh:SPARQLSelectExecutable ;
897
- .
898
- dash:SPARQLUpdateSuggestionGenerator
899
- a rdfs:Class ;
900
- rdfs:comment """A SuggestionGenerator based on a SPARQL UPDATE query (sh:update), producing an instance of dash:GraphUpdate. The INSERTs become dash:addedTriple and the DELETEs become dash:deletedTriple. The WHERE clause operates on the data graph with the pre-bound variables $focusNode, $predicate and $value, as well as the other pre-bound variables for the parameters of the constraint.
901
-
902
- In many cases, there may be multiple possible suggestions to fix a problem. For example, with sh:maxLength there are many ways to slice a string. In those cases, the system will first iterate through the result variables from a SELECT query (sh:select) and apply these results as pre-bound variables into the UPDATE query.""" ;
903
- rdfs:label "SPARQL UPDATE suggestion generator" ;
904
- rdfs:subClassOf dash:SuggestionGenerator ;
905
- rdfs:subClassOf sh:SPARQLSelectExecutable ;
906
- rdfs:subClassOf sh:SPARQLUpdateExecutable ;
907
- .
908
- dash:Script
909
- a dash:ShapeClass ;
910
- rdfs:comment "An executable unit implemented in one or more languages such as JavaScript." ;
911
- rdfs:label "Script" ;
912
- rdfs:subClassOf rdfs:Resource ;
913
- .
914
- dash:ScriptAPIGenerationRules
915
- a sh:PropertyGroup ;
916
- rdfs:label "Script API Generation Rules" ;
917
- .
918
- dash:ScriptAPIShape
919
- a sh:NodeShape ;
920
- rdfs:comment "Defines the properties that instruct the ADS Script API generator about what prefixes, constants and classes to generate." ;
921
- rdfs:label "Script API" ;
922
- sh:property dash:ScriptAPIShape-generateClass ;
923
- sh:property dash:ScriptAPIShape-generatePrefixClasses ;
924
- sh:property dash:ScriptAPIShape-generatePrefixConstants ;
925
- sh:targetClass owl:Ontology ;
926
- .
927
- dash:ScriptAPIShape-generateClass
928
- a sh:PropertyShape ;
929
- sh:path dash:generateClass ;
930
- sh:class sh:NodeShape ;
931
- sh:description "The API generator will produce classes for each value of this property and all its subclasses and superclasses." ;
932
- sh:group dash:ScriptAPIGenerationRules ;
933
- sh:name "generate class" ;
934
- sh:nodeKind sh:IRI ;
935
- sh:order "0"^^xsd:decimal ;
936
- .
937
- dash:ScriptAPIShape-generatePrefixClasses
938
- a sh:PropertyShape ;
939
- sh:path dash:generatePrefixClasses ;
940
- sh:datatype xsd:string ;
941
- sh:description "If a prefix (such as \\"edg\\") is listed here then the API generator will produce classes for all RDFS classes or node shapes from the associated namespace." ;
942
- sh:group dash:ScriptAPIGenerationRules ;
943
- sh:name "generate prefix classes" ;
944
- sh:order "15"^^xsd:decimal ;
945
- .
946
- dash:ScriptAPIShape-generatePrefixConstants
947
- a sh:PropertyShape ;
948
- sh:path dash:generatePrefixConstants ;
949
- sh:datatype xsd:string ;
950
- sh:description "If a prefix (such as \\"edg\\") is listed here then the API generator will produce constants for class, datatype, shape and property names." ;
951
- sh:group dash:ScriptAPIGenerationRules ;
952
- sh:name "generate prefix constants" ;
953
- sh:order "10"^^xsd:decimal ;
954
- .
955
- dash:ScriptConstraint
956
- a dash:ShapeClass ;
957
- rdfs:comment """The class of constraints that are based on Scripts. Depending on whether dash:onAllValues is set to true, these scripts can access the following pre-assigned variables:
958
-
959
- - focusNode: the focus node of the constraint (a NamedNode)
960
- - if dash:onAllValues is not true: value: the current value node (e.g. a JavaScript string for xsd:string literals, a number for numeric literals or true or false for xsd:boolean literals. All other literals become LiteralNodes, and non-literals become instances of NamedNode)
961
- - if dash:onAllValues is true: values: an array of current value nodes, as above.
962
-
963
- If the expression returns an array then each array member will be mapped to one validation result, following the mapping rules below.
964
-
965
- For string results, a validation result will use the string as sh:resultMessage.
966
- For boolean results, a validation result will be produced if the result is false (true means no violation).
967
-
968
- For object results, a validation result will be produced using the value of the field "message" of the object as result message. If the field "value" has a value then this will become the sh:value in the violation.
969
-
970
- Unless another sh:message has been directly returned, the sh:message of the dash:ScriptConstraint will be used, similar to sh:message at SPARQL Constraints. These sh:messages can access the values {$focusNode}, {$value} etc as template variables.""" ;
971
- rdfs:label "Script constraint" ;
972
- rdfs:subClassOf dash:Script ;
973
- .
974
- dash:ScriptConstraintComponent
975
- a sh:ConstraintComponent ;
976
- rdfs:label "Script constraint component" ;
977
- sh:parameter dash:ScriptConstraintComponent-scriptConstraint ;
978
- .
979
- dash:ScriptConstraintComponent-scriptConstraint
980
- a sh:Parameter ;
981
- sh:path dash:scriptConstraint ;
982
- sh:class dash:ScriptConstraint ;
983
- sh:description "The Script constraint(s) to apply." ;
984
- sh:name "script constraint" ;
985
- .
986
- dash:ScriptFunction
987
- a rdfs:Class ;
988
- a sh:NodeShape ;
989
- rdfs:comment """Script functions can be used from SPARQL queries and will be injected into the generated prefix object (in JavaScript, for ADS scripts). The dash:js will be inserted into a generated JavaScript function and therefore needs to use the return keyword to produce results. These JS snippets can access the parameter values based on the local name of the sh:Parameter's path. For example ex:value can be accessed using value.
990
-
991
- SPARQL use note: Since these functions may be used from any data graph and any shapes graph, they must not rely on any API apart from what's available in the shapes graph that holds the rdf:type triple of the function itself. In other words, at execution time from SPARQL, the ADS shapes graph will be the home graph of the function's declaration.""" ;
992
- rdfs:label "Script function" ;
993
- rdfs:subClassOf dash:Script ;
994
- rdfs:subClassOf sh:Function ;
995
- .
996
- dash:ScriptSuggestionGenerator
997
- a dash:ShapeClass ;
998
- rdfs:comment """A Suggestion Generator that is backed by an Active Data Shapes script. The script needs to return a JSON object or an array of JSON objects if it shall generate multiple suggestions. It may also return null to indicate that nothing was suggested. Note that the whole script is evaluated as a (JavaScript) expression, and those will use the last value as result. So simply putting an object at the end of your script should do. Alternatively, define the bulk of the operation as a function and simply call that function in the script.
999
-
1000
- Each response object can have the following fields:
1001
-
1002
- {
1003
- \tmessage: "The human readable message", // Defaults to the rdfs:label(s) of the suggestion generator
1004
- \tadd: [ // An array of triples to add, each triple as an array with three nodes
1005
- \t\t[ subject, predicate, object ],
1006
- \t\t[ ... ]
1007
- \t],
1008
- \tdelete: [
1009
- \t\t... like add, for the triples to delete
1010
- \t]
1011
- }
1012
-
1013
- Suggestions with neither added nor deleted triples will be discarded.
1014
-
1015
- At execution time, the script operates on the data graph as the active graph, with the following pre-bound variables:
1016
- - focusNode: the NamedNode that is the sh:focusNode of the validation result
1017
- - predicate: the NamedNode representing the predicate of the validation result, assuming sh:resultPath is a URI
1018
- - value: the value node from the validation result's sh:value, cast into the most suitable JS object
1019
- - the other pre-bound variables for the parameters of the constraint, e.g. in a sh:maxCount constraint it would be maxCount
1020
-
1021
- The script will be executed in read-only mode, i.e. it cannot modify the graph.
1022
-
1023
- Example with dash:js:
1024
-
1025
- ({
1026
- \tmessage: \`\`,
1027
- \tadd: focusNode.values(rdfs.label).map(label =>
1028
- \t\t[ focusNode, predicate, label ]
1029
- )
1030
- })""" ;
1031
- rdfs:label "Script suggestion generator" ;
1032
- rdfs:subClassOf dash:Script ;
1033
- rdfs:subClassOf dash:SuggestionGenerator ;
1034
- .
1035
- dash:ScriptTestCase
1036
- a dash:ShapeClass ;
1037
- rdfs:comment """A test case that evaluates a script. Requires exactly one value for dash:js and will operate on the test case's graph (with imports) as both data and shapes graph.
1038
-
1039
- Supports read-only scripts only at this stage.""" ;
1040
- rdfs:label "Script test case" ;
1041
- rdfs:subClassOf dash:Script ;
1042
- rdfs:subClassOf dash:TestCase ;
1043
- .
1044
- dash:ScriptValidator
1045
- a dash:ShapeClass ;
1046
- rdfs:comment """A SHACL validator based on an Active Data Shapes script.
1047
-
1048
- See the comment at dash:ScriptConstraint for the basic evaluation approach. Note that in addition to focusNode and value/values, the script can access pre-bound variables for each declared argument of the constraint component.""" ;
1049
- rdfs:label "Script validator" ;
1050
- rdfs:subClassOf dash:Script ;
1051
- rdfs:subClassOf sh:Validator ;
1052
- .
1053
- dash:Service
1054
- a dash:ShapeClass ;
1055
- dash:abstract true ;
1056
- rdfs:comment "A script that gets exposed as a web service, e.g. /tbl/service/ex/MyService" ;
1057
- rdfs:label "Service" ;
1058
- rdfs:subClassOf dash:Script ;
1059
- rdfs:subClassOf sh:Parameterizable ;
1060
- .
1061
- dash:ShapeClass
1062
- a dash:ShapeClass ;
1063
- dash:hidden true ;
1064
- rdfs:comment "A class that is also a node shape. This class can be used as rdf:type instead of the combination of rdfs:Class and sh:NodeShape." ;
1065
- rdfs:label "Shape class" ;
1066
- rdfs:subClassOf rdfs:Class ;
1067
- rdfs:subClassOf sh:NodeShape ;
1068
- .
1069
- dash:ShapeScript
1070
- a rdfs:Class ;
1071
- rdfs:comment "A shape script contains extra code that gets injected into the API for the associated node shape. In particular you can use this to define additional functions that operate on the current focus node (the this variable in JavaScript)." ;
1072
- rdfs:label "Shape script" ;
1073
- rdfs:subClassOf dash:Script ;
1074
- .
1075
- dash:SingleEditor
1076
- a dash:ShapeClass ;
1077
- rdfs:comment "An editor for individual value nodes." ;
1078
- rdfs:label "Single editor" ;
1079
- rdfs:subClassOf dash:Editor ;
1080
- .
1081
- dash:SingleLineConstraintComponent
1082
- a sh:ConstraintComponent ;
1083
- rdfs:comment """A constraint component that can be used to declare that all values that are literals must have a lexical form that contains no line breaks ('\\\\n' or '\\\\r').
1084
-
1085
- User interfaces may use the dash:singleLine flag to prefer a text field over a (multi-line) text area.""" ;
1086
- rdfs:label "Single line constraint component" ;
1087
- sh:message "Must not contain line breaks." ;
1088
- sh:parameter dash:SingleLineConstraintComponent-singleLine ;
1089
- sh:validator [
1090
- a sh:SPARQLAskValidator ;
1091
- sh:ask """ASK {
1092
- FILTER (!$singleLine || !isLiteral($value) || (!contains(str($value), '\\\\n') && !contains(str($value), '\\\\r')))
1093
- }""" ;
1094
- sh:prefixes <http://datashapes.org/dash> ;
1095
- ] ;
1096
- .
1097
- dash:SingleLineConstraintComponent-singleLine
1098
- a sh:Parameter ;
1099
- sh:path dash:singleLine ;
1100
- dash:reifiableBy dash:ConstraintReificationShape ;
1101
- sh:datatype xsd:boolean ;
1102
- sh:description "True to state that the lexical form of literal value nodes must not contain any line breaks. False to state that line breaks are explicitly permitted." ;
1103
- sh:maxCount 1 ;
1104
- sh:name "single line" ;
1105
- .
1106
- dash:SingleViewer
1107
- a dash:ShapeClass ;
1108
- rdfs:comment "A viewer for a single value." ;
1109
- rdfs:label "Single viewer" ;
1110
- rdfs:subClassOf dash:Viewer ;
1111
- .
1112
- dash:Stable
1113
- a dash:APIStatus ;
1114
- rdfs:comment "Features that have been marked stable are deemed of good quality and can be used until marked deprecated." ;
1115
- rdfs:label "stable" ;
1116
- .
1117
- dash:StemConstraintComponent
1118
- a sh:ConstraintComponent ;
1119
- dash:staticConstraint true ;
1120
- rdfs:comment "A constraint component that can be used to verify that every value node is an IRI and the IRI starts with a given string value."@en ;
1121
- rdfs:label "Stem constraint component"@en ;
1122
- sh:labelTemplate "Value needs to have stem {$stem}" ;
1123
- sh:message "Value does not have stem {$stem}" ;
1124
- sh:parameter dash:StemConstraintComponent-stem ;
1125
- sh:validator dash:hasStem ;
1126
- .
1127
- dash:StemConstraintComponent-stem
1128
- a sh:Parameter ;
1129
- sh:path dash:stem ;
1130
- dash:reifiableBy dash:ConstraintReificationShape ;
1131
- sh:datatype xsd:string ;
1132
- sh:description "If specified then every value node must be an IRI and the IRI must start with the given string value." ;
1133
- sh:maxCount 1 ;
1134
- sh:name "stem" ;
1135
- .
1136
- dash:StringOrLangString
1137
- a rdf:List ;
1138
- rdf:first [
1139
- sh:datatype xsd:string ;
1140
- ] ;
1141
- rdf:rest (
1142
- [
1143
- sh:datatype rdf:langString ;
1144
- ]
1145
- ) ;
1146
- rdfs:comment "An rdf:List that can be used in property constraints as value for sh:or to indicate that all values of a property must be either xsd:string or rdf:langString." ;
1147
- rdfs:label "String or langString" ;
1148
- .
1149
- dash:StringOrLangStringOrHTML
1150
- a rdf:List ;
1151
- rdf:first [
1152
- sh:datatype xsd:string ;
1153
- ] ;
1154
- rdf:rest (
1155
- [
1156
- sh:datatype rdf:langString ;
1157
- ]
1158
- [
1159
- sh:datatype rdf:HTML ;
1160
- ]
1161
- ) ;
1162
- rdfs:comment "An rdf:List that can be used in property constraints as value for sh:or to indicate that all values of a property must be either xsd:string, rdf:langString or rdf:HTML (in that order of preference)." ;
1163
- rdfs:label "string or langString or HTML" ;
1164
- .
1165
- dash:SubClassEditor
1166
- a dash:SingleEditor ;
1167
- rdfs:comment "An editor for properties that declare a dash:rootClass. The editor allows selecting either the class itself or one of its subclasses." ;
1168
- rdfs:label "Sub-Class editor" ;
1169
- .
1170
- dash:SubSetOfConstraintComponent
1171
- a sh:ConstraintComponent ;
1172
- dash:localConstraint true ;
1173
- rdfs:comment "A constraint component that can be used to state that the set of value nodes must be a subset of the value of a given property." ;
1174
- rdfs:label "Sub set of constraint component" ;
1175
- sh:message "Must be one of the values of {$subSetOf}" ;
1176
- sh:parameter dash:SubSetOfConstraintComponent-subSetOf ;
1177
- sh:propertyValidator [
1178
- a sh:SPARQLAskValidator ;
1179
- sh:ask """ASK {
1180
- $this $subSetOf $value .
1181
- }""" ;
1182
- sh:prefixes <http://datashapes.org/dash> ;
1183
- ] ;
1184
- .
1185
- dash:SubSetOfConstraintComponent-subSetOf
1186
- a sh:Parameter ;
1187
- sh:path dash:subSetOf ;
1188
- dash:editor dash:PropertyAutoCompleteEditor ;
1189
- dash:reifiableBy dash:ConstraintReificationShape ;
1190
- dash:viewer dash:PropertyLabelViewer ;
1191
- sh:description "Can be used to state that all value nodes must also be values of a specified other property at the same focus node." ;
1192
- sh:name "sub-set of" ;
1193
- sh:nodeKind sh:IRI ;
1194
- .
1195
- dash:SuccessResult
1196
- a rdfs:Class ;
1197
- rdfs:comment "A result representing a successfully validated constraint." ;
1198
- rdfs:label "Success result" ;
1199
- rdfs:subClassOf sh:AbstractResult ;
1200
- .
1201
- dash:SuccessTestCaseResult
1202
- a rdfs:Class ;
1203
- rdfs:comment "Represents a successful run of a test case." ;
1204
- rdfs:label "Success test case result" ;
1205
- rdfs:subClassOf dash:TestCaseResult ;
1206
- .
1207
- dash:Suggestion
1208
- a rdfs:Class ;
1209
- dash:abstract true ;
1210
- rdfs:comment "Base class of suggestions that modify a graph to \\"fix\\" the source of a validation result." ;
1211
- rdfs:label "Suggestion" ;
1212
- rdfs:subClassOf rdfs:Resource ;
1213
- .
1214
- dash:SuggestionGenerator
1215
- a rdfs:Class ;
1216
- dash:abstract true ;
1217
- rdfs:comment "Base class of objects that can generate suggestions (added or deleted triples) for a validation result of a given constraint component." ;
1218
- rdfs:label "Suggestion generator" ;
1219
- rdfs:subClassOf rdfs:Resource ;
1220
- .
1221
- dash:SuggestionResult
1222
- a rdfs:Class ;
1223
- rdfs:comment "Class of results that have been produced as suggestions, not through SHACL validation. How the actual results are produced is up to implementers. Each instance of this class should have values for sh:focusNode, sh:resultMessage, sh:resultSeverity (suggested default: sh:Info), and dash:suggestion to point at one or more suggestions." ;
1224
- rdfs:label "Suggestion result" ;
1225
- rdfs:subClassOf sh:AbstractResult ;
1226
- .
1227
- dash:SymmetricConstraintComponent
1228
- a sh:ConstraintComponent ;
1229
- rdfs:comment "A contraint component for property shapes to validate that a property is symmetric. For symmetric properties, if A relates to B then B must relate to A." ;
1230
- rdfs:label "Symmetric constraint component" ;
1231
- sh:message "Symmetric value expected" ;
1232
- sh:parameter dash:SymmetricConstraintComponent-symmetric ;
1233
- sh:propertyValidator [
1234
- a sh:SPARQLSelectValidator ;
1235
- sh:prefixes <http://datashapes.org/dash> ;
1236
- sh:select """SELECT $this ?value {
1237
- \tFILTER ($symmetric) .
1238
- \t$this $PATH ?value .
1239
- \tFILTER NOT EXISTS {
1240
- \t?value $PATH $this .
1241
- \t}
1242
- }""" ;
1243
- ] ;
1244
- .
1245
- dash:SymmetricConstraintComponent-symmetric
1246
- a sh:Parameter ;
1247
- sh:path dash:symmetric ;
1248
- dash:reifiableBy dash:ConstraintReificationShape ;
1249
- sh:datatype xsd:boolean ;
1250
- sh:description "If set to true then if A relates to B then B must relate to A." ;
1251
- sh:maxCount 1 ;
1252
- sh:name "symmetric" ;
1253
- .
1254
- dash:TestCase
1255
- a dash:ShapeClass ;
1256
- dash:abstract true ;
1257
- rdfs:comment "A test case to verify that a (SHACL-based) feature works as expected." ;
1258
- rdfs:label "Test case" ;
1259
- rdfs:subClassOf rdfs:Resource ;
1260
- .
1261
- dash:TestCaseResult
1262
- a rdfs:Class ;
1263
- dash:abstract true ;
1264
- rdfs:comment "Base class for results produced by running test cases." ;
1265
- rdfs:label "Test case result" ;
1266
- rdfs:subClassOf sh:AbstractResult ;
1267
- .
1268
- dash:TestEnvironment
1269
- a rdfs:Class ;
1270
- dash:abstract true ;
1271
- rdfs:comment "Abstract base class for test environments, holding information on how to set up a test case." ;
1272
- rdfs:label "Test environment" ;
1273
- rdfs:subClassOf rdfs:Resource ;
1274
- .
1275
- dash:TextAreaEditor
1276
- a dash:SingleEditor ;
1277
- rdfs:comment "A multi-line text area to enter the value of a literal." ;
1278
- rdfs:label "Text area editor" ;
1279
- .
1280
- dash:TextAreaWithLangEditor
1281
- a dash:SingleEditor ;
1282
- rdfs:comment "A multi-line text area to enter the value of a literal and a drop down to select a language." ;
1283
- rdfs:label "Text area with lang editor" ;
1284
- .
1285
- dash:TextFieldEditor
1286
- a dash:SingleEditor ;
1287
- rdfs:comment """A simple input field to enter the value of a literal, without the ability to change language or datatype.
1288
-
1289
- This is the fallback editor for any literal if no other editors are more suitable.""" ;
1290
- rdfs:label "Text field editor" ;
1291
- .
1292
- dash:TextFieldWithLangEditor
1293
- a dash:SingleEditor ;
1294
- rdfs:comment "A single-line input field to enter the value of a literal and a drop down to select language, which is mandatory unless xsd:string is among the permissible datatypes." ;
1295
- rdfs:label "Text field with lang editor" ;
1296
- .
1297
- dash:URIEditor
1298
- a dash:SingleEditor ;
1299
- rdfs:comment "An input field to enter the URI of a resource, e.g. rdfs:seeAlso links or images." ;
1300
- rdfs:label "URI editor" ;
1301
- .
1302
- dash:URIViewer
1303
- a dash:SingleViewer ;
1304
- rdfs:comment "A Viewer for URI resources, rendering as a hyperlink to that URI. Also includes other ways of interacting with the URI such as opening a nested summary display." ;
1305
- rdfs:label "URI viewer" ;
1306
- .
1307
- dash:UniqueValueForClassConstraintComponent
1308
- a sh:ConstraintComponent ;
1309
- rdfs:comment "A constraint component that can be used to state that the values of a property must be unique for all instances of a given class (and its subclasses)." ;
1310
- rdfs:label "Unique value for class constraint component" ;
1311
- sh:labelTemplate "Values must be unique among all instances of {?uniqueValueForClass}" ;
1312
- sh:parameter dash:UniqueValueForClassConstraintComponent-uniqueValueForClass ;
1313
- sh:propertyValidator [
1314
- a sh:SPARQLSelectValidator ;
1315
- sh:message "Value {?value} must be unique but is also used by {?other}" ;
1316
- sh:prefixes <http://datashapes.org/dash> ;
1317
- sh:select """SELECT DISTINCT $this ?value ?other
1318
- WHERE {
1319
- \t{
1320
- \t$this $PATH ?value .
1321
- \t\t?other $PATH ?value .
1322
- \t\tFILTER (?other != $this) .
1323
- \t}
1324
- \t?other a ?type .
1325
- \t?type rdfs:subClassOf* $uniqueValueForClass .
1326
- }""" ;
1327
- ] ;
1328
- .
1329
- dash:UniqueValueForClassConstraintComponent-uniqueValueForClass
1330
- a sh:Parameter ;
1331
- sh:path dash:uniqueValueForClass ;
1332
- dash:reifiableBy dash:ConstraintReificationShape ;
1333
- sh:class rdfs:Class ;
1334
- sh:description "States that the values of the property must be unique for all instances of a given class (and its subclasses)." ;
1335
- sh:name "unique value for class" ;
1336
- sh:nodeKind sh:IRI ;
1337
- .
1338
- dash:UntrustedHTMLViewer
1339
- a dash:SingleViewer ;
1340
- rdfs:comment "A Viewer for HTML content from untrusted sources. This viewer will sanitize the HTML before rendering. Any a, button, checkbox, form, hidden, input, img, script, select, style and textarea tags and class and style attributes will be removed." ;
1341
- rdfs:label "Untrusted HTML viewer" ;
1342
- .
1343
- dash:ValidationTestCase
1344
- a dash:ShapeClass ;
1345
- dash:abstract true ;
1346
- rdfs:comment "Abstract superclass for test cases concerning SHACL constraint validation. Future versions may add new kinds of validatin test cases, e.g. to validate a single resource only." ;
1347
- rdfs:label "Validation test case" ;
1348
- rdfs:subClassOf dash:TestCase ;
1349
- .
1350
- dash:ValueTableViewer
1351
- a dash:MultiViewer ;
1352
- rdfs:comment "A viewer that renders all values of a given property as a table, with one value per row, and the columns defined by the shape that is the sh:node or sh:class of the property." ;
1353
- rdfs:label "Value table viewer" ;
1354
- .
1355
- dash:Viewer
1356
- a dash:ShapeClass ;
1357
- dash:abstract true ;
1358
- rdfs:comment "The class of widgets for viewing value nodes." ;
1359
- rdfs:label "Viewer" ;
1360
- rdfs:subClassOf dash:Widget ;
1361
- .
1362
- dash:Widget
1363
- a dash:ShapeClass ;
1364
- dash:abstract true ;
1365
- rdfs:comment "Base class of user interface components that can be used to display or edit value nodes." ;
1366
- rdfs:label "Widget" ;
1367
- rdfs:subClassOf rdfs:Resource ;
1368
- .
1369
- dash:abstract
1370
- a rdf:Property ;
1371
- rdfs:comment "Indicates that a class is \\"abstract\\" and cannot be used in asserted rdf:type triples. Only non-abstract subclasses of abstract classes should be instantiated directly." ;
1372
- rdfs:domain rdfs:Class ;
1373
- rdfs:label "abstract" ;
1374
- rdfs:range xsd:boolean ;
1375
- .
1376
- dash:actionGroup
1377
- a rdf:Property ;
1378
- rdfs:comment "Links an Action with the ActionGroup that it should be arranged in." ;
1379
- rdfs:domain dash:Action ;
1380
- rdfs:label "action group" ;
1381
- rdfs:range dash:ActionGroup ;
1382
- .
1383
- dash:actionIconClass
1384
- a rdf:Property ;
1385
- rdfs:comment "The (CSS) class of an Action for display purposes alongside the label." ;
1386
- rdfs:domain dash:Action ;
1387
- rdfs:label "action icon class" ;
1388
- rdfs:range xsd:string ;
1389
- .
1390
- dash:addedTriple
1391
- a rdf:Property ;
1392
- rdfs:comment "May link a dash:GraphUpdate with one or more triples (represented as instances of rdf:Statement) that should be added to fix the source of the result." ;
1393
- rdfs:domain dash:GraphUpdate ;
1394
- rdfs:label "added triple" ;
1395
- rdfs:range rdf:Statement ;
1396
- .
1397
- dash:all
1398
- a rdfs:Resource ;
1399
- rdfs:comment "Represents all users/roles, for example as a possible value of the default view for role property." ;
1400
- rdfs:label "all" ;
1401
- .
1402
- dash:apiStatus
1403
- a rdf:Property ;
1404
- rdfs:comment "Defines how and whether the associated feature is part of an external API. APIs may be implemented as (REST) web services, via GraphQL or ADS Script APIs." ;
1405
- rdfs:label "API status" ;
1406
- rdfs:range dash:APIStatus ;
1407
- .
1408
- dash:applicableToClass
1409
- a rdf:Property ;
1410
- rdfs:comment "Can be used to state that a shape is applicable to instances of a given class. This is a softer statement than \\"target class\\": a target means that all instances of the class must conform to the shape. Being applicable to simply means that the shape may apply to (some) instances of the class. This information can be used by algorithms or humans." ;
1411
- rdfs:domain sh:Shape ;
1412
- rdfs:label "applicable to class" ;
1413
- rdfs:range rdfs:Class ;
1414
- .
1415
- dash:cachable
1416
- a rdf:Property ;
1417
- rdfs:comment "If set to true then the results of the SHACL function can be cached in between invocations with the same arguments. In other words, they are stateless and do not depend on triples in any graph, or the current time stamp etc." ;
1418
- rdfs:domain sh:Function ;
1419
- rdfs:label "cachable" ;
1420
- rdfs:range xsd:boolean ;
1421
- .
1422
- dash:closedByTypes
1423
- a rdf:Property ;
1424
- rdfs:label "closed by types" ;
1425
- .
1426
- dash:coExistsWith
1427
- a rdf:Property ;
1428
- rdfs:comment "Specifies a property that must have a value whenever the property path has a value, and must have no value whenever the property path has no value." ;
1429
- rdfs:label "co-exists with" ;
1430
- rdfs:range rdf:Property ;
1431
- .
1432
- dash:composite
1433
- a rdf:Property ;
1434
- rdfs:comment "Can be used to indicate that a property/path represented by a property constraint represents a composite relationship. In a composite relationship, the life cycle of a \\"child\\" object (value of the property/path) depends on the \\"parent\\" object (focus node). If the parent gets deleted, then the child objects should be deleted, too. Tools may use dash:composite (if set to true) to implement cascading delete operations." ;
1435
- rdfs:domain sh:PropertyShape ;
1436
- rdfs:label "composite" ;
1437
- rdfs:range xsd:boolean ;
1438
- .
1439
- dash:contextFree
1440
- a rdf:Property ;
1441
- rdfs:comment "Used to mark certain parameterizables as context-free, meaning that the outcome of a process does not depend on the currently active query graph." ;
1442
- rdfs:label "context-free" ;
1443
- rdfs:range xsd:boolean ;
1444
- .
1445
- dash:defaultLang
1446
- a rdf:Property ;
1447
- rdfs:comment "Can be used to annotate a graph (usually the owl:Ontology) with the default language that tools should suggest for new literal values. For example, predominantly English graphs should have \\"en\\" as default language." ;
1448
- rdfs:domain owl:Ontology ;
1449
- rdfs:label "default language" ;
1450
- rdfs:range xsd:string ;
1451
- .
1452
- dash:defaultViewForRole
1453
- a rdf:Property ;
1454
- rdfs:comment "Links a node shape with the roles for which it shall be used as default view. User interfaces can use these values to select how to present a given RDF resource. The values of this property are URIs representing a group of users or agents. There is a dedicated URI dash:all representing all users." ;
1455
- rdfs:domain sh:NodeShape ;
1456
- rdfs:label "default view for role" ;
1457
- .
1458
- dash:deletedTriple
1459
- a rdf:Property ;
1460
- rdfs:comment "May link a dash:GraphUpdate result with one or more triples (represented as instances of rdf:Statement) that should be deleted to fix the source of the result." ;
1461
- rdfs:domain dash:GraphUpdate ;
1462
- rdfs:label "deleted triple" ;
1463
- rdfs:range rdf:Statement ;
1464
- .
1465
- dash:dependencyPredicate
1466
- a rdf:Property ;
1467
- rdfs:comment "Can be used in dash:js node expressions to enumerate the predicates that the computation of the values may depend on. This can be used by clients to determine whether an edit requires re-computation of values on a form or elsewhere. For example, if the dash:js is something like \\"focusNode.firstName + focusNode.lastName\\" then the dependency predicates should be ex:firstName and ex:lastName." ;
1468
- rdfs:label "dependency predicate" ;
1469
- rdfs:range rdf:Property ;
1470
- .
1471
- dash:detailsEndpoint
1472
- a rdf:Property ;
1473
- rdfs:comment """Can be used to link a SHACL property shape with the URL of a SPARQL endpoint that may contain further RDF triples for the value nodes delivered by the property. This can be used to inform a processor that it should switch to values from an external graph when the user wants to retrieve more information about a value.
1474
-
1475
- This property should be regarded as an "annotation", i.e. it does not have any impact on validation or other built-in SHACL features. However, selected tools may want to use this information. One implementation strategy would be to periodically fetch the values specified by the sh:node or sh:class shape associated with the property, using the property shapes in that shape, and add the resulting triples into the main query graph.
1476
-
1477
- An example value is "https://query.wikidata.org/sparql".""" ;
1478
- rdfs:label "details endpoint" ;
1479
- .
1480
- dash:detailsGraph
1481
- a rdf:Property ;
1482
- rdfs:comment """Can be used to link a SHACL property shape with a SHACL node expression that produces the URIs of one or more graphs that contain further RDF triples for the value nodes delivered by the property. This can be used to inform a processor that it should switch to another data graph when the user wants to retrieve more information about a value.
1483
-
1484
- The node expressions are evaluated with the focus node as input. (It is unclear whether there are also cases where the result may be different for each specific value, in which case the node expression would need a second input argument).
1485
-
1486
- This property should be regarded as an "annotation", i.e. it does not have any impact on validation or other built-in SHACL features. However, selected tools may want to use this information.""" ;
1487
- rdfs:label "details graph" ;
1488
- .
1489
- dash:editor
1490
- a rdf:Property ;
1491
- rdfs:comment "Can be used to link a property shape with an editor, to state a preferred editing widget in user interfaces." ;
1492
- rdfs:domain sh:PropertyShape ;
1493
- rdfs:label "editor" ;
1494
- rdfs:range dash:Editor ;
1495
- .
1496
- dash:expectedResult
1497
- a rdf:Property ;
1498
- rdfs:comment "The expected result(s) of a test case. The value range of this property is different for each kind of test cases." ;
1499
- rdfs:domain dash:TestCase ;
1500
- rdfs:label "expected result" ;
1501
- .
1502
- dash:expectedResultIsJSON
1503
- a rdf:Property ;
1504
- rdfs:comment "A flag to indicate that the expected result represents a JSON string. If set to true, then tests would compare JSON structures (regardless of whitespaces) instead of actual syntax." ;
1505
- rdfs:label "expected result is JSON" ;
1506
- rdfs:range xsd:boolean ;
1507
- .
1508
- dash:expectedResultIsTTL
1509
- a rdf:Property ;
1510
- rdfs:comment "A flag to indicate that the expected result represents an RDF graph encoded as a Turtle file. If set to true, then tests would compare graphs instead of actual syntax." ;
1511
- rdfs:domain dash:TestCase ;
1512
- rdfs:label "expected result is Turtle" ;
1513
- rdfs:range xsd:boolean ;
1514
- .
1515
- dash:fixed
1516
- a rdf:Property ;
1517
- rdfs:comment "Can be used to mark that certain validation results have already been fixed." ;
1518
- rdfs:domain sh:ValidationResult ;
1519
- rdfs:label "fixed" ;
1520
- rdfs:range xsd:boolean ;
1521
- .
1522
- dash:hasClass
1523
- a sh:SPARQLAskValidator ;
1524
- rdfs:label "has class" ;
1525
- sh:ask """
1526
- \t\tASK {
1527
- \t\t\t$value rdf:type/rdfs:subClassOf* $class .
1528
- \t\t}
1529
- \t\t""" ;
1530
- sh:message "Value does not have class {$class}" ;
1531
- sh:prefixes <http://datashapes.org/dash> ;
1532
- .
1533
- dash:hasMaxExclusive
1534
- a sh:SPARQLAskValidator ;
1535
- rdfs:comment "Checks whether a given node (?value) has a value less than (<) the provided ?maxExclusive. Returns false if this cannot be determined, e.g. because values do not have comparable types." ;
1536
- rdfs:label "has max exclusive" ;
1537
- sh:ask "ASK { FILTER ($value < $maxExclusive) }" ;
1538
- sh:prefixes <http://datashapes.org/dash> ;
1539
- .
1540
- dash:hasMaxInclusive
1541
- a sh:SPARQLAskValidator ;
1542
- rdfs:comment "Checks whether a given node (?value) has a value less than or equal to (<=) the provided ?maxInclusive. Returns false if this cannot be determined, e.g. because values do not have comparable types." ;
1543
- rdfs:label "has max inclusive" ;
1544
- sh:ask "ASK { FILTER ($value <= $maxInclusive) }" ;
1545
- sh:prefixes <http://datashapes.org/dash> ;
1546
- .
1547
- dash:hasMaxLength
1548
- a sh:SPARQLAskValidator ;
1549
- rdfs:comment "Checks whether a given string (?value) has a length within a given maximum string length." ;
1550
- rdfs:label "has max length" ;
1551
- sh:ask """
1552
- \t\tASK {
1553
- \t\t\tFILTER (STRLEN(str($value)) <= $maxLength) .
1554
- \t\t}
1555
- \t\t""" ;
1556
- sh:prefixes <http://datashapes.org/dash> ;
1557
- .
1558
- dash:hasMinExclusive
1559
- a sh:SPARQLAskValidator ;
1560
- rdfs:comment "Checks whether a given node (?value) has value greater than (>) the provided ?minExclusive. Returns false if this cannot be determined, e.g. because values do not have comparable types." ;
1561
- rdfs:label "has min exclusive" ;
1562
- sh:ask "ASK { FILTER ($value > $minExclusive) }" ;
1563
- sh:prefixes <http://datashapes.org/dash> ;
1564
- .
1565
- dash:hasMinInclusive
1566
- a sh:SPARQLAskValidator ;
1567
- rdfs:comment "Checks whether a given node (?value) has value greater than or equal to (>=) the provided ?minInclusive. Returns false if this cannot be determined, e.g. because values do not have comparable types." ;
1568
- rdfs:label "has min inclusive" ;
1569
- sh:ask "ASK { FILTER ($value >= $minInclusive) }" ;
1570
- sh:prefixes <http://datashapes.org/dash> ;
1571
- .
1572
- dash:hasMinLength
1573
- a sh:SPARQLAskValidator ;
1574
- rdfs:comment "Checks whether a given string (?value) has a length within a given minimum string length." ;
1575
- rdfs:label "has min length" ;
1576
- sh:ask """
1577
- \t\tASK {
1578
- \t\t\tFILTER (STRLEN(str($value)) >= $minLength) .
1579
- \t\t}
1580
- \t\t""" ;
1581
- sh:prefixes <http://datashapes.org/dash> ;
1582
- .
1583
- dash:hasNodeKind
1584
- a sh:SPARQLAskValidator ;
1585
- rdfs:comment "Checks whether a given node (?value) has a given sh:NodeKind (?nodeKind). For example, sh:hasNodeKind(42, sh:Literal) = true." ;
1586
- rdfs:label "has node kind" ;
1587
- sh:ask """
1588
- \t\tASK {
1589
- \t\t\tFILTER ((isIRI($value) && $nodeKind IN ( sh:IRI, sh:BlankNodeOrIRI, sh:IRIOrLiteral ) ) ||
1590
- \t\t\t\t(isLiteral($value) && $nodeKind IN ( sh:Literal, sh:BlankNodeOrLiteral, sh:IRIOrLiteral ) ) ||
1591
- \t\t\t\t(isBlank($value) && $nodeKind IN ( sh:BlankNode, sh:BlankNodeOrIRI, sh:BlankNodeOrLiteral ) )) .
1592
- \t\t}
1593
- \t\t""" ;
1594
- sh:prefixes <http://datashapes.org/dash> ;
1595
- .
1596
- dash:hasPattern
1597
- a sh:SPARQLAskValidator ;
1598
- rdfs:comment "Checks whether the string representation of a given node (?value) matches a given regular expression (?pattern). Returns false if the value is a blank node." ;
1599
- rdfs:label "has pattern" ;
1600
- sh:ask "ASK { FILTER (!isBlank($value) && IF(bound($flags), regex(str($value), $pattern, $flags), regex(str($value), $pattern))) }" ;
1601
- sh:prefixes <http://datashapes.org/dash> ;
1602
- .
1603
- dash:hasRootClass
1604
- a sh:SPARQLAskValidator ;
1605
- rdfs:label "has root class" ;
1606
- sh:ask """ASK {
1607
- $value rdfs:subClassOf* $rootClass .
1608
- }""" ;
1609
- sh:prefixes <http://datashapes.org/dash> ;
1610
- .
1611
- dash:hasStem
1612
- a sh:SPARQLAskValidator ;
1613
- rdfs:comment "Checks whether a given node is an IRI starting with a given stem." ;
1614
- rdfs:label "has stem" ;
1615
- sh:ask "ASK { FILTER (isIRI($value) && STRSTARTS(str($value), $stem)) }" ;
1616
- sh:prefixes <http://datashapes.org/dash> ;
1617
- .
1618
- dash:hasValueIn
1619
- a rdf:Property ;
1620
- rdfs:comment "Specifies a constraint that at least one of the value nodes must be a member of the given list." ;
1621
- rdfs:label "has value in" ;
1622
- rdfs:range rdf:List ;
1623
- .
1624
- dash:hasValueWithClass
1625
- a rdf:Property ;
1626
- rdfs:comment "Specifies a constraint that at least one of the value nodes must be an instance of a given class." ;
1627
- rdfs:label "has value with class" ;
1628
- rdfs:range rdfs:Class ;
1629
- .
1630
- dash:height
1631
- a rdf:Property ;
1632
- rdfs:comment "The height." ;
1633
- rdfs:label "height" ;
1634
- rdfs:range xsd:integer ;
1635
- .
1636
- dash:hidden
1637
- a rdf:Property ;
1638
- rdfs:comment "Properties marked as hidden do not appear in user interfaces, yet remain part of the shape for other purposes such as validation and scripting or GraphQL schema generation." ;
1639
- rdfs:domain sh:PropertyShape ;
1640
- rdfs:label "hidden" ;
1641
- rdfs:range xsd:boolean ;
1642
- .
1643
- dash:index
1644
- a rdf:Property ;
1645
- rdfs:label "index" ;
1646
- rdfs:range xsd:integer ;
1647
- .
1648
- dash:indexed
1649
- a rdf:Property ;
1650
- rdfs:domain sh:PropertyShape ;
1651
- rdfs:range xsd:boolean ;
1652
- .
1653
- dash:isDeactivated
1654
- a sh:SPARQLFunction ;
1655
- dash:apiStatus dash:Stable ;
1656
- rdfs:comment "Checks whether a given shape or constraint has been marked as \\"deactivated\\" using sh:deactivated." ;
1657
- rdfs:label "is deactivated" ;
1658
- sh:ask """ASK {
1659
- ?constraintOrShape sh:deactivated true .
1660
- }""" ;
1661
- sh:parameter [
1662
- a sh:Parameter ;
1663
- sh:path dash:constraintOrShape ;
1664
- sh:description "The sh:Constraint or sh:Shape to test." ;
1665
- sh:name "constraint or shape" ;
1666
- ] ;
1667
- sh:prefixes <http://datashapes.org/dash> ;
1668
- sh:returnType xsd:boolean ;
1669
- .
1670
- dash:isIn
1671
- a sh:SPARQLAskValidator ;
1672
- rdfs:label "is in" ;
1673
- sh:ask """
1674
- \t\tASK {
1675
- \t\t\tGRAPH $shapesGraph {
1676
- \t\t\t\t$in (rdf:rest*)/rdf:first $value .
1677
- \t\t\t}
1678
- \t\t}
1679
- \t\t""" ;
1680
- sh:prefixes <http://datashapes.org/dash> ;
1681
- .
1682
- dash:isLanguageIn
1683
- a sh:SPARQLAskValidator ;
1684
- rdfs:label "is language in" ;
1685
- sh:ask """
1686
- \t\tASK {
1687
- \t\t\tBIND (lang($value) AS ?valueLang) .
1688
- \t\t\tFILTER EXISTS {
1689
- \t\t\t\tGRAPH $shapesGraph {
1690
- \t\t\t\t\t$languageIn (rdf:rest*)/rdf:first ?lang .
1691
- \t\t\t\t FILTER (langMatches(?valueLang, ?lang))
1692
- \t\t\t\t} }
1693
- \t\t}
1694
- \t\t""" ;
1695
- sh:prefixes <http://datashapes.org/dash> ;
1696
- .
1697
- dash:isNodeKindBlankNode
1698
- a sh:SPARQLFunction ;
1699
- dash:apiStatus dash:Stable ;
1700
- dash:cachable true ;
1701
- dash:contextFree true ;
1702
- rdfs:comment "Checks if a given sh:NodeKind is one that includes BlankNodes." ;
1703
- rdfs:label "is NodeKind BlankNode" ;
1704
- sh:ask """ASK {
1705
- \tFILTER ($nodeKind IN ( sh:BlankNode, sh:BlankNodeOrIRI, sh:BlankNodeOrLiteral ))
1706
- }""" ;
1707
- sh:parameter [
1708
- a sh:Parameter ;
1709
- sh:path dash:nodeKind ;
1710
- sh:class sh:NodeKind ;
1711
- sh:description "The sh:NodeKind to check." ;
1712
- sh:name "node kind" ;
1713
- sh:nodeKind sh:IRI ;
1714
- ] ;
1715
- sh:prefixes <http://datashapes.org/dash> ;
1716
- sh:returnType xsd:boolean ;
1717
- .
1718
- dash:isNodeKindIRI
1719
- a sh:SPARQLFunction ;
1720
- dash:apiStatus dash:Stable ;
1721
- dash:cachable true ;
1722
- dash:contextFree true ;
1723
- rdfs:comment "Checks if a given sh:NodeKind is one that includes IRIs." ;
1724
- rdfs:label "is NodeKind IRI" ;
1725
- sh:ask """ASK {
1726
- \tFILTER ($nodeKind IN ( sh:IRI, sh:BlankNodeOrIRI, sh:IRIOrLiteral ))
1727
- }""" ;
1728
- sh:parameter [
1729
- a sh:Parameter ;
1730
- sh:path dash:nodeKind ;
1731
- sh:class sh:NodeKind ;
1732
- sh:description "The sh:NodeKind to check." ;
1733
- sh:name "node kind" ;
1734
- sh:nodeKind sh:IRI ;
1735
- ] ;
1736
- sh:prefixes <http://datashapes.org/dash> ;
1737
- sh:returnType xsd:boolean ;
1738
- .
1739
- dash:isNodeKindLiteral
1740
- a sh:SPARQLFunction ;
1741
- dash:apiStatus dash:Stable ;
1742
- dash:cachable true ;
1743
- dash:contextFree true ;
1744
- rdfs:comment "Checks if a given sh:NodeKind is one that includes Literals." ;
1745
- rdfs:label "is NodeKind Literal" ;
1746
- sh:ask """ASK {
1747
- \tFILTER ($nodeKind IN ( sh:Literal, sh:BlankNodeOrLiteral, sh:IRIOrLiteral ))
1748
- }""" ;
1749
- sh:parameter [
1750
- a sh:Parameter ;
1751
- sh:path dash:nodeKind ;
1752
- sh:class sh:NodeKind ;
1753
- sh:description "The sh:NodeKind to check." ;
1754
- sh:name "node kind" ;
1755
- sh:nodeKind sh:IRI ;
1756
- ] ;
1757
- sh:prefixes <http://datashapes.org/dash> ;
1758
- sh:returnType xsd:boolean ;
1759
- .
1760
- dash:isSubClassOf
1761
- a sh:SPARQLFunction ;
1762
- dash:apiStatus dash:Stable ;
1763
- rdfs:comment "Returns true if a given class (first argument) is a subclass of a given other class (second argument), or identical to that class. This is equivalent to an rdfs:subClassOf* check." ;
1764
- rdfs:label "is subclass of" ;
1765
- sh:ask """ASK {
1766
- $subclass rdfs:subClassOf* $superclass .
1767
- }""" ;
1768
- sh:parameter dash:isSubClassOf-subclass ;
1769
- sh:parameter dash:isSubClassOf-superclass ;
1770
- sh:prefixes <http://datashapes.org/dash> ;
1771
- sh:returnType xsd:boolean ;
1772
- .
1773
- dash:isSubClassOf-subclass
1774
- a sh:Parameter ;
1775
- sh:path dash:subclass ;
1776
- sh:class rdfs:Class ;
1777
- sh:description "The (potential) subclass." ;
1778
- sh:name "subclass" ;
1779
- .
1780
- dash:isSubClassOf-superclass
1781
- a sh:Parameter ;
1782
- sh:path dash:superclass ;
1783
- sh:class rdfs:Class ;
1784
- sh:description "The (potential) superclass." ;
1785
- sh:name "superclass" ;
1786
- sh:order "1"^^xsd:decimal ;
1787
- .
1788
- dash:js
1789
- a rdf:Property ;
1790
- rdfs:comment "The JavaScript source code of a Script." ;
1791
- rdfs:domain dash:Script ;
1792
- rdfs:label "JavaScript source code" ;
1793
- rdfs:range xsd:string ;
1794
- .
1795
- dash:localConstraint
1796
- a rdf:Property ;
1797
- rdfs:comment """Can be set to true for those constraint components where the validation does not require to visit any other triples than the shape definitions and the direct property values of the focus node mentioned in the property constraints. Examples of this include sh:minCount and sh:hasValue.
1798
-
1799
- Constraint components that are marked as such can be optimized by engines, e.g. they can be evaluated client-side at form submission time, without having to make a round-trip to a server, assuming the client has downloaded a complete snapshot of the resource.
1800
-
1801
- Any component marked with dash:staticConstraint is also a dash:localConstraint.""" ;
1802
- rdfs:domain sh:ConstraintComponent ;
1803
- rdfs:label "local constraint" ;
1804
- rdfs:range xsd:boolean ;
1805
- .
1806
- dash:mimeTypes
1807
- a rdf:Property ;
1808
- rdfs:comment """For file-typed properties, this can be used to specify the expected/allowed mime types of its values. This can be used, for example, to limit file input boxes or file selectors. If multiple values are allowed then they need to be separated by commas.
1809
-
1810
- Example values are listed at https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types""" ;
1811
- rdfs:domain sh:PropertyShape ;
1812
- rdfs:label "mime types" ;
1813
- rdfs:range xsd:string ;
1814
- .
1815
- dash:neverMaterialize
1816
- a rdf:Property ;
1817
- rdfs:comment "If set to true at a property shape then any sh:values and sh:defaultValue rules of this property will be ignored when 'all inferences' are computed. This is useful for property values that shall only be computed for individual focus nodes (e.g. when a user visits a resource) but not for large inference runs." ;
1818
- rdfs:domain sh:PropertyShape ;
1819
- rdfs:label "never materialize" ;
1820
- rdfs:range xsd:boolean ;
1821
- .
1822
- dash:onAllValues
1823
- a rdf:Property ;
1824
- rdfs:comment "If set to true for a ScriptConstraint or ScriptValidator, then the associated script will receive all value nodes at once, as a value of the variable values. By default (or false), the script is called for each value node individually." ;
1825
- rdfs:label "on all values" ;
1826
- rdfs:range xsd:boolean ;
1827
- .
1828
- dash:propertySuggestionGenerator
1829
- a rdf:Property ;
1830
- rdfs:comment "Links the constraint component with instances of dash:SuggestionGenerator that may be used to produce suggestions for a given validation result that was produced by a property constraint." ;
1831
- rdfs:domain sh:ConstraintComponent ;
1832
- rdfs:label "property suggestion generator" ;
1833
- rdfs:range dash:SuggestionGenerator ;
1834
- .
1835
- dash:readOnly
1836
- a rdf:Property ;
1837
- rdfs:comment "Used as a hint for user interfaces that values of the associated property should not be editable. The values of this may be the boolean literals true or false or, more generally, a SHACL node expression that must evaluate to true or false." ;
1838
- rdfs:domain sh:PropertyShape ;
1839
- rdfs:label "read only" ;
1840
- .
1841
- dash:reifiableBy
1842
- a rdf:Property ;
1843
- rdfs:comment "Can be used to specify the node shape that may be applied to reified statements produced by a property shape. The property shape must have a URI resource as its sh:path. The values of this property must be node shapes. User interfaces can use this information to determine which properties to present to users when reified statements are explored or edited. Use dash:None to indicate that no reification should be permitted." ;
1844
- rdfs:domain sh:PropertyShape ;
1845
- rdfs:label "reifiable by" ;
1846
- rdfs:range sh:NodeShape ;
1847
- .
1848
- dash:resourceAction
1849
- a rdf:Property ;
1850
- rdfs:comment "Links a class with the Resource Actions that can be applied to instances of that class." ;
1851
- rdfs:domain rdfs:Class ;
1852
- rdfs:label "resource action" ;
1853
- rdfs:range dash:ResourceAction ;
1854
- .
1855
- dash:rootClass
1856
- a rdf:Property ;
1857
- rdfs:label "root class" ;
1858
- .
1859
- dash:shape
1860
- a rdf:Property ;
1861
- rdfs:comment "States that a subject resource has a given shape. This property can, for example, be used to capture results of SHACL validation on static data." ;
1862
- rdfs:label "shape" ;
1863
- rdfs:range sh:Shape ;
1864
- .
1865
- dash:shapeScript
1866
- a rdf:Property ;
1867
- rdfs:domain sh:NodeShape ;
1868
- rdfs:label "shape script" ;
1869
- .
1870
- dash:singleLine
1871
- a rdf:Property ;
1872
- rdfs:label "single line" ;
1873
- rdfs:range xsd:boolean ;
1874
- .
1875
- dash:staticConstraint
1876
- a rdf:Property ;
1877
- rdfs:comment """Can be set to true for those constraint components where the validation does not require to visit any other triples than the parameters. Examples of this include sh:datatype or sh:nodeKind, where no further triples need to be queried to determine the result.
1878
-
1879
- Constraint components that are marked as such can be optimized by engines, e.g. they can be evaluated client-side at form submission time, without having to make a round-trip to a server.""" ;
1880
- rdfs:domain sh:ConstraintComponent ;
1881
- rdfs:label "static constraint" ;
1882
- rdfs:range xsd:boolean ;
1883
- .
1884
- dash:stem
1885
- a rdf:Property ;
1886
- rdfs:comment "Specifies a string value that the IRI of the value nodes must start with."@en ;
1887
- rdfs:label "stem"@en ;
1888
- rdfs:range xsd:string ;
1889
- .
1890
- dash:subSetOf
1891
- a rdf:Property ;
1892
- rdfs:label "sub set of" ;
1893
- .
1894
- dash:suggestion
1895
- a rdf:Property ;
1896
- rdfs:comment "Can be used to link a result with one or more suggestions on how to address or improve the underlying issue." ;
1897
- rdfs:domain sh:AbstractResult ;
1898
- rdfs:label "suggestion" ;
1899
- rdfs:range dash:Suggestion ;
1900
- .
1901
- dash:suggestionConfidence
1902
- a rdf:Property ;
1903
- rdfs:comment "An optional confidence between 0% and 100%. Suggestions with 100% confidence are strongly recommended. Can be used to sort recommended updates." ;
1904
- rdfs:domain dash:Suggestion ;
1905
- rdfs:label "suggestion confidence" ;
1906
- rdfs:range xsd:decimal ;
1907
- .
1908
- dash:suggestionGenerator
1909
- a rdf:Property ;
1910
- rdfs:comment "Links a sh:SPARQLConstraint or sh:JSConstraint with instances of dash:SuggestionGenerator that may be used to produce suggestions for a given validation result that was produced by the constraint." ;
1911
- rdfs:label "suggestion generator" ;
1912
- rdfs:range dash:SuggestionGenerator ;
1913
- .
1914
- dash:suggestionGroup
1915
- a rdf:Property ;
1916
- rdfs:comment "Can be used to link a suggestion with the group identifier to which it belongs. By default this is a link to the dash:SuggestionGenerator, but in principle this could be any value." ;
1917
- rdfs:domain dash:Suggestion ;
1918
- rdfs:label "suggestion" ;
1919
- .
1920
- dash:symmetric
1921
- a rdf:Property ;
1922
- rdfs:comment "True to declare that the associated property path is symmetric." ;
1923
- rdfs:label "symmetric" ;
1924
- .
1925
- dash:toString
1926
- a sh:SPARQLFunction ;
1927
- dash:cachable true ;
1928
- rdfs:comment "Returns a literal with datatype xsd:string that has the input value as its string. If the input value is an (URI) resource then its URI will be used." ;
1929
- rdfs:label "to string" ;
1930
- sh:labelTemplate "Convert {$arg} to xsd:string" ;
1931
- sh:parameter [
1932
- a sh:Parameter ;
1933
- sh:path dash:arg ;
1934
- sh:description "The input value." ;
1935
- sh:name "arg" ;
1936
- sh:nodeKind sh:IRIOrLiteral ;
1937
- ] ;
1938
- sh:prefixes <http://datashapes.org/dash> ;
1939
- sh:returnType xsd:string ;
1940
- sh:select """SELECT (xsd:string($arg) AS ?result)
1941
- WHERE {
1942
- }""" ;
1943
- .
1944
- dash:uniqueValueForClass
1945
- a rdf:Property ;
1946
- rdfs:label "unique value for class" ;
1947
- .
1948
- dash:uriTemplate
1949
- a sh:SPARQLFunction ;
1950
- dash:apiStatus dash:Stable ;
1951
- dash:cachable true ;
1952
- dash:contextFree true ;
1953
- rdfs:comment """Inserts a given value into a given URI template, producing a new xsd:anyURI literal.
1954
-
1955
- In the future this should support RFC 6570 but for now it is limited to simple {...} patterns.""" ;
1956
- rdfs:label "URI template" ;
1957
- sh:parameter [
1958
- a sh:Parameter ;
1959
- sh:path dash:template ;
1960
- sh:datatype xsd:string ;
1961
- sh:description "The URI template, e.g. \\"http://example.org/{symbol}\\"." ;
1962
- sh:name "template" ;
1963
- sh:order 0 ;
1964
- ] ;
1965
- sh:parameter [
1966
- a sh:Parameter ;
1967
- sh:path dash:value ;
1968
- sh:description "The literal value to insert into the template. Will use the URI-encoded string of the lexical form (for now)." ;
1969
- sh:name "value" ;
1970
- sh:nodeKind sh:Literal ;
1971
- sh:order 1 ;
1972
- ] ;
1973
- sh:prefixes <http://datashapes.org/dash> ;
1974
- sh:returnType xsd:anyURI ;
1975
- sh:select """SELECT ?result
1976
- WHERE {
1977
- \tBIND (xsd:anyURI(REPLACE(?template, "\\\\\\\\{[a-zA-Z]+\\\\\\\\}", $value)) AS ?result)
1978
- }""" ;
1979
- .
1980
- dash:validateShapes
1981
- a rdf:Property ;
1982
- rdfs:comment "True to also validate the shapes itself (i.e. parameter declarations)." ;
1983
- rdfs:domain dash:GraphValidationTestCase ;
1984
- rdfs:label "validate shapes" ;
1985
- rdfs:range xsd:boolean ;
1986
- .
1987
- dash:valueCount
1988
- a sh:SPARQLFunction ;
1989
- dash:apiStatus dash:Stable ;
1990
- rdfs:comment "Computes the number of objects for a given subject/predicate combination." ;
1991
- rdfs:label "value count" ;
1992
- sh:parameter [
1993
- a sh:Parameter ;
1994
- sh:path dash:predicate ;
1995
- sh:class rdfs:Resource ;
1996
- sh:description "The predicate to get the number of objects of." ;
1997
- sh:name "predicate" ;
1998
- sh:order 1 ;
1999
- ] ;
2000
- sh:parameter [
2001
- a sh:Parameter ;
2002
- sh:path dash:subject ;
2003
- sh:class rdfs:Resource ;
2004
- sh:description "The subject to get the number of objects of." ;
2005
- sh:name "subject" ;
2006
- sh:order 0 ;
2007
- ] ;
2008
- sh:prefixes <http://datashapes.org/dash> ;
2009
- sh:returnType xsd:integer ;
2010
- sh:select """
2011
- \t\tSELECT (COUNT(?object) AS ?result)
2012
- \t\tWHERE {
2013
- \t\t$subject $predicate ?object .
2014
- \t\t}
2015
- """ ;
2016
- .
2017
- dash:viewer
2018
- a rdf:Property ;
2019
- rdfs:comment "Can be used to link a property shape with a viewer, to state a preferred viewing widget in user interfaces." ;
2020
- rdfs:domain sh:PropertyShape ;
2021
- rdfs:label "viewer" ;
2022
- rdfs:range dash:Viewer ;
2023
- .
2024
- dash:width
2025
- a rdf:Property ;
2026
- rdfs:comment "The width." ;
2027
- rdfs:label "width" ;
2028
- rdfs:range xsd:integer ;
2029
- .
2030
- dash:x
2031
- a rdf:Property ;
2032
- rdfs:comment "The x position." ;
2033
- rdfs:label "x" ;
2034
- rdfs:range xsd:integer ;
2035
- .
2036
- dash:y
2037
- a rdf:Property ;
2038
- rdfs:comment "The y position." ;
2039
- rdfs:label "y" ;
2040
- rdfs:range xsd:integer ;
2041
- .
2042
- owl:Class
2043
- a rdfs:Class ;
2044
- rdfs:subClassOf rdfs:Class ;
2045
- .
2046
- sh:AbstractResult
2047
- dash:abstract true ;
2048
- .
2049
- sh:ClassConstraintComponent
2050
- sh:labelTemplate "Value needs to have class {$class}" ;
2051
- sh:validator dash:hasClass ;
2052
- .
2053
- sh:ClosedConstraintComponent
2054
- dash:localConstraint true ;
2055
- sh:labelTemplate "Closed shape: only the enumerated properties can be used" ;
2056
- sh:nodeValidator [
2057
- a sh:SPARQLSelectValidator ;
2058
- sh:message "Predicate {?path} is not allowed (closed shape)" ;
2059
- sh:prefixes <http://datashapes.org/dash> ;
2060
- sh:select """
2061
- \t\tSELECT $this (?predicate AS ?path) ?value
2062
- \t\tWHERE {
2063
- \t\t\t{
2064
- \t\t\t\tFILTER ($closed) .
2065
- \t\t\t}
2066
- \t\t\t$this ?predicate ?value .
2067
- \t\t\tFILTER (NOT EXISTS {
2068
- \t\t\t\tGRAPH $shapesGraph {
2069
- \t\t\t\t\t$currentShape sh:property/sh:path ?predicate .
2070
- \t\t\t\t}
2071
- \t\t\t} && (!bound($ignoredProperties) || NOT EXISTS {
2072
- \t\t\t\tGRAPH $shapesGraph {
2073
- \t\t\t\t\t$ignoredProperties rdf:rest*/rdf:first ?predicate .
2074
- \t\t\t\t}
2075
- \t\t\t}))
2076
- \t\t}
2077
- """ ;
2078
- ] ;
2079
- .
2080
- sh:DatatypeConstraintComponent
2081
- dash:staticConstraint true ;
2082
- sh:labelTemplate "Values must have datatype {$datatype}" ;
2083
- sh:message "Value does not have datatype {$datatype}" ;
2084
- .
2085
- sh:DisjointConstraintComponent
2086
- dash:localConstraint true ;
2087
- sh:validator [
2088
- a sh:SPARQLAskValidator ;
2089
- sh:ask """
2090
- \t\tASK {
2091
- \t\t\tFILTER NOT EXISTS {
2092
- \t\t\t\t$this $disjoint $value .
2093
- \t\t\t}
2094
- \t\t}
2095
- \t\t""" ;
2096
- sh:message "Property must not share any values with {$disjoint}" ;
2097
- sh:prefixes <http://datashapes.org/dash> ;
2098
- ] ;
2099
- .
2100
- sh:EqualsConstraintComponent
2101
- dash:localConstraint true ;
2102
- sh:message "Must have same values as {$equals}" ;
2103
- sh:nodeValidator [
2104
- a sh:SPARQLSelectValidator ;
2105
- sh:prefixes <http://datashapes.org/dash> ;
2106
- sh:select """
2107
- \t\tSELECT DISTINCT $this ?value
2108
- \t\tWHERE {
2109
- \t\t\t{
2110
- \t\t\t\tFILTER NOT EXISTS { $this $equals $this }
2111
- \t\t\t\tBIND ($this AS ?value) .
2112
- \t\t\t}
2113
- \t\t\tUNION
2114
- \t\t\t{
2115
- \t\t\t\t$this $equals ?value .
2116
- \t\t\t\tFILTER (?value != $this) .
2117
- \t\t\t}
2118
- \t\t}
2119
- \t\t""" ;
2120
- ] ;
2121
- sh:propertyValidator [
2122
- a sh:SPARQLSelectValidator ;
2123
- sh:prefixes <http://datashapes.org/dash> ;
2124
- sh:select """
2125
- \t\tSELECT DISTINCT $this ?value
2126
- \t\tWHERE {
2127
- \t\t\t{
2128
- \t\t\t\t$this $PATH ?value .
2129
- \t\t\t\tMINUS {
2130
- \t\t\t\t\t$this $equals ?value .
2131
- \t\t\t\t}
2132
- \t\t\t}
2133
- \t\t\tUNION
2134
- \t\t\t{
2135
- \t\t\t\t$this $equals ?value .
2136
- \t\t\t\tMINUS {
2137
- \t\t\t\t\t$this $PATH ?value .
2138
- \t\t\t\t}
2139
- \t\t\t}
2140
- \t\t}
2141
- \t\t""" ;
2142
- ] ;
2143
- .
2144
- sh:Function
2145
- dash:abstract true ;
2146
- .
2147
- sh:HasValueConstraintComponent
2148
- dash:localConstraint true ;
2149
- sh:labelTemplate "Must have value {$hasValue}" ;
2150
- sh:nodeValidator [
2151
- a sh:SPARQLAskValidator ;
2152
- sh:ask """ASK {
2153
- FILTER ($value = $hasValue)
2154
- }""" ;
2155
- sh:message "Value must be {$hasValue}" ;
2156
- sh:prefixes <http://datashapes.org/dash> ;
2157
- ] ;
2158
- sh:propertyValidator [
2159
- a sh:SPARQLSelectValidator ;
2160
- sh:message "Missing expected value {$hasValue}" ;
2161
- sh:prefixes <http://datashapes.org/dash> ;
2162
- sh:select """
2163
- \t\tSELECT $this
2164
- \t\tWHERE {
2165
- \t\t\tFILTER NOT EXISTS { $this $PATH $hasValue }
2166
- \t\t}
2167
- \t\t""" ;
2168
- ] ;
2169
- .
2170
- sh:InConstraintComponent
2171
- dash:localConstraint true ;
2172
- sh:labelTemplate "Value must be in {$in}" ;
2173
- sh:message "Value is not in {$in}" ;
2174
- sh:validator dash:isIn ;
2175
- .
2176
- sh:LanguageInConstraintComponent
2177
- dash:localConstraint true ;
2178
- sh:labelTemplate "Language must match any of {$languageIn}" ;
2179
- sh:message "Language does not match any of {$languageIn}" ;
2180
- sh:validator dash:isLanguageIn ;
2181
- .
2182
- sh:LessThanConstraintComponent
2183
- dash:localConstraint true ;
2184
- sh:message "Value is not < value of {$lessThan}" ;
2185
- sh:propertyValidator [
2186
- a sh:SPARQLSelectValidator ;
2187
- sh:prefixes <http://datashapes.org/dash> ;
2188
- sh:select """
2189
- \t\tSELECT $this ?value
2190
- \t\tWHERE {
2191
- \t\t\t$this $PATH ?value .
2192
- \t\t\t$this $lessThan ?otherValue .
2193
- \t\t\tBIND (?value < ?otherValue AS ?result) .
2194
- \t\t\tFILTER (!bound(?result) || !(?result)) .
2195
- \t\t}
2196
- \t\t""" ;
2197
- ] ;
2198
- .
2199
- sh:LessThanOrEqualsConstraintComponent
2200
- dash:localConstraint true ;
2201
- sh:message "Value is not <= value of {$lessThanOrEquals}" ;
2202
- sh:propertyValidator [
2203
- a sh:SPARQLSelectValidator ;
2204
- sh:prefixes <http://datashapes.org/dash> ;
2205
- sh:select """
2206
- \t\tSELECT DISTINCT $this ?value
2207
- \t\tWHERE {
2208
- \t\t\t$this $PATH ?value .
2209
- \t\t\t$this $lessThanOrEquals ?otherValue .
2210
- \t\t\tBIND (?value <= ?otherValue AS ?result) .
2211
- \t\t\tFILTER (!bound(?result) || !(?result)) .
2212
- \t\t}
2213
- """ ;
2214
- ] ;
2215
- .
2216
- sh:MaxCountConstraintComponent
2217
- dash:localConstraint true ;
2218
- sh:labelTemplate "Must not have more than {$maxCount} values" ;
2219
- sh:message "More than {$maxCount} values" ;
2220
- sh:propertyValidator [
2221
- a sh:SPARQLSelectValidator ;
2222
- sh:prefixes <http://datashapes.org/dash> ;
2223
- sh:select """
2224
- \t\tSELECT $this
2225
- \t\tWHERE {
2226
- \t\t\t$this $PATH ?value .
2227
- \t\t}
2228
- \t\tGROUP BY $this
2229
- \t\tHAVING (COUNT(DISTINCT ?value) > $maxCount)
2230
- \t\t""" ;
2231
- ] ;
2232
- .
2233
- sh:MaxExclusiveConstraintComponent
2234
- dash:staticConstraint true ;
2235
- sh:labelTemplate "Value must be < {$maxExclusive}" ;
2236
- sh:message "Value is not < {$maxExclusive}" ;
2237
- sh:validator dash:hasMaxExclusive ;
2238
- .
2239
- sh:MaxInclusiveConstraintComponent
2240
- dash:staticConstraint true ;
2241
- sh:labelTemplate "Value must be <= {$maxInclusive}" ;
2242
- sh:message "Value is not <= {$maxInclusive}" ;
2243
- sh:validator dash:hasMaxInclusive ;
2244
- .
2245
- sh:MaxLengthConstraintComponent
2246
- dash:staticConstraint true ;
2247
- sh:labelTemplate "Value must not have more than {$maxLength} characters" ;
2248
- sh:message "Value has more than {$maxLength} characters" ;
2249
- sh:validator dash:hasMaxLength ;
2250
- .
2251
- sh:MinCountConstraintComponent
2252
- dash:localConstraint true ;
2253
- sh:labelTemplate "Must have at least {$minCount} values" ;
2254
- sh:message "Fewer than {$minCount} values" ;
2255
- sh:propertyValidator [
2256
- a sh:SPARQLSelectValidator ;
2257
- sh:prefixes <http://datashapes.org/dash> ;
2258
- sh:select """
2259
- \t\tSELECT $this
2260
- \t\tWHERE {
2261
- \t\t\tOPTIONAL {
2262
- \t\t\t\t$this $PATH ?value .
2263
- \t\t\t}
2264
- \t\t}
2265
- \t\tGROUP BY $this
2266
- \t\tHAVING (COUNT(DISTINCT ?value) < $minCount)
2267
- \t\t""" ;
2268
- ] ;
2269
- .
2270
- sh:MinExclusiveConstraintComponent
2271
- dash:staticConstraint true ;
2272
- sh:labelTemplate "Value must be > {$minExclusive}" ;
2273
- sh:message "Value is not > {$minExclusive}" ;
2274
- sh:validator dash:hasMinExclusive ;
2275
- .
2276
- sh:MinInclusiveConstraintComponent
2277
- dash:staticConstraint true ;
2278
- sh:labelTemplate "Value must be >= {$minInclusive}" ;
2279
- sh:message "Value is not >= {$minInclusive}" ;
2280
- sh:validator dash:hasMinInclusive ;
2281
- .
2282
- sh:MinLengthConstraintComponent
2283
- dash:staticConstraint true ;
2284
- sh:labelTemplate "Value must have less than {$minLength} characters" ;
2285
- sh:message "Value has less than {$minLength} characters" ;
2286
- sh:validator dash:hasMinLength ;
2287
- .
2288
- sh:NodeConstraintComponent
2289
- sh:message "Value does not have shape {$node}" ;
2290
- .
2291
- sh:NodeKindConstraintComponent
2292
- dash:staticConstraint true ;
2293
- sh:labelTemplate "Value must have node kind {$nodeKind}" ;
2294
- sh:message "Value does not have node kind {$nodeKind}" ;
2295
- sh:validator dash:hasNodeKind ;
2296
- .
2297
- sh:NotConstraintComponent
2298
- sh:labelTemplate "Value must not have shape {$not}" ;
2299
- sh:message "Value does have shape {$not}" ;
2300
- .
2301
- sh:Parameterizable
2302
- dash:abstract true ;
2303
- .
2304
- sh:PatternConstraintComponent
2305
- dash:staticConstraint true ;
2306
- sh:labelTemplate "Value must match pattern \\"{$pattern}\\"" ;
2307
- sh:message "Value does not match pattern \\"{$pattern}\\"" ;
2308
- sh:validator dash:hasPattern ;
2309
- .
2310
- sh:QualifiedMaxCountConstraintComponent
2311
- sh:labelTemplate "No more than {$qualifiedMaxCount} values can have shape {$qualifiedValueShape}" ;
2312
- sh:message "More than {$qualifiedMaxCount} values have shape {$qualifiedValueShape}" ;
2313
- .
2314
- sh:QualifiedMinCountConstraintComponent
2315
- sh:labelTemplate "No fewer than {$qualifiedMinCount} values can have shape {$qualifiedValueShape}" ;
2316
- sh:message "Fewer than {$qualifiedMinCount} values have shape {$qualifiedValueShape}" ;
2317
- .
2318
- sh:Rule
2319
- dash:abstract true ;
2320
- .
2321
- sh:Rules
2322
- a rdfs:Resource ;
2323
- rdfs:comment "The SHACL rules entailment regime." ;
2324
- rdfs:label "SHACL Rules" ;
2325
- rdfs:seeAlso <https://www.w3.org/TR/shacl-af/#Rules> ;
2326
- .
2327
- sh:SPARQLExecutable
2328
- dash:abstract true ;
2329
- .
2330
- sh:Shape
2331
- dash:abstract true ;
2332
- .
2333
- sh:Target
2334
- dash:abstract true ;
2335
- .
2336
- sh:TargetType
2337
- dash:abstract true ;
2338
- .
2339
- sh:UniqueLangConstraintComponent
2340
- dash:localConstraint true ;
2341
- sh:labelTemplate "No language can be used more than once" ;
2342
- sh:message "Language \\"{?lang}\\" used more than once" ;
2343
- sh:propertyValidator [
2344
- a sh:SPARQLSelectValidator ;
2345
- sh:prefixes <http://datashapes.org/dash> ;
2346
- sh:select """
2347
- \t\tSELECT DISTINCT $this ?lang
2348
- \t\tWHERE {
2349
- \t\t\t{
2350
- \t\t\t\tFILTER sameTerm($uniqueLang, true) .
2351
- \t\t\t}
2352
- \t\t\t$this $PATH ?value .
2353
- \t\t\tBIND (lang(?value) AS ?lang) .
2354
- \t\t\tFILTER (bound(?lang) && ?lang != "") .
2355
- \t\t\tFILTER EXISTS {
2356
- \t\t\t\t$this $PATH ?otherValue .
2357
- \t\t\t\tFILTER (?otherValue != ?value && ?lang = lang(?otherValue)) .
2358
- \t\t\t}
2359
- \t\t}
2360
- \t\t""" ;
2361
- ] ;
2362
- .
2363
- sh:Validator
2364
- dash:abstract true ;
2365
- .
2366
- sh:order
2367
- rdfs:range xsd:decimal ;
2368
- .
2369
- `));
2370
- //# sourceMappingURL=dashDataset.js.map