You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ap.md
+52-52Lines changed: 52 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ The following information MUST be provided for an application profile resource:
43
43
The following information MAY be provided:
44
44
45
45
* A description / definition expressed via the property `sh:description`
46
-
* A usage note expressed via the property `vann:usageNote`
46
+
* A usage note expressed via the property `skos:scopeNote`
47
47
* A reference to another application profile that expresses that it is a
48
48
* "subprofile" of another profile via `prof:isProfileOf`
49
49
* "variant of" another profile via the `inspec:variant`
@@ -69,7 +69,7 @@ The following information MAY be provided:
69
69
70
70
* A class it corresponds to via the target declaration `sh:targetClass`
71
71
* A description / definition expressed via the property `sh:description`
72
-
* A usage note expressed via the property `vann:usageNote`
72
+
* A usage note expressed via the property `skos:scopeNote`
73
73
* A reference to another node shape it
74
74
* "refines" via `inspec:refines` AND `sh:and` with a SHACL list containing the refined node shape (see [section on refinement](#node_refinement)), OR
75
75
* "is a variant of" via the `inspec:variant` property (see [section on variants](#node_variant))
@@ -93,7 +93,7 @@ The following information MAY be provided:
93
93
*`sh:minCount "-1"^^xsd:integer` for optional (or, if left out it should be interpreted as -1)
94
94
*`sh:maxCount "N"^^xsd:integer` for a maximum cardinality of `N`
95
95
* A description / definition expressed via the property `sh:description`
96
-
* A usage note expressed via the property `vann:usageNote`
96
+
* A usage note expressed via the property `skos:scopeNote`
97
97
* That a datatype is required on literals by using `sh:datatype` (if several datatypes are allowed, a construction with several property shapes with individual `sh:datatype` joined together via `sh:or` is necessary)
98
98
* That a language is required on literals by setting `sh:datatype` to `rdf:langString`
99
99
* Constraints on which literals that is allowed by:
@@ -270,7 +270,7 @@ ex:ns2 a sh:NodeShape ;
270
270
sh:path dcterms:identifier ;
271
271
sh:order "0.5"^^xsd:decimal ;
272
272
sh:and ( ex:ps-identifier ) .
273
-
], ex:ps-title.
273
+
], ex:ps-title.
274
274
```
275
275
276
276
Note that you have to repeat the `sh:path` due to SHACL rules. We have chosen to not give the new property shape a URI since it does not provide any additional value beyond the order, which is specific to the node shape. This is possible since it does not fall under the [Rule AP-3](rules.md#ap3) rule since `sh:and` is excluded, `sh:path` is not a constraint and an `sh:order` is a characteristic (i.e. a non-validating property). The property shape should therefore be considered **private** (as opposed to public).
@@ -287,18 +287,18 @@ To restrict to concepts in a terminology you should specify:
@@ -321,19 +321,19 @@ The section was purposefully kept very similar to the section on Restricting to
321
321
322
322
```turtle
323
323
ex:ps1 a sh:PropertyShape ;
324
-
sh:path dcterms:subject ;
325
-
sh:node [
326
-
a sh:NodeShape ;
327
-
sh:severity sh:Info ;
328
-
sh:property [
329
-
sh:path rdf:type ;
330
-
sh:hasValue skos:Concept
331
-
], [
332
-
sh:path [
333
-
sh:inversePath skos:member
334
-
] ;
335
-
sh:hasValue ex:collectionA
336
-
]
324
+
sh:path dcterms:subject ;
325
+
sh:node [
326
+
a sh:NodeShape ;
327
+
sh:severity sh:Info ;
328
+
sh:property [
329
+
sh:path rdf:type ;
330
+
sh:hasValue skos:Concept
331
+
], [
332
+
sh:path [
333
+
sh:inversePath skos:member
334
+
] ;
335
+
sh:hasValue ex:collectionA
336
+
]
337
337
]
338
338
```
339
339
@@ -347,46 +347,46 @@ SHACL allows a node shape to include multiple property shapes that together cons
347
347
348
348
```turtle
349
349
ex:ns1 a sh:NodeShape ;
350
-
sh:label "Person" ;
351
-
sh:property ex:ps1, ex:ps2 .
350
+
sh:label "Person" ;
351
+
sh:property ex:ps1, ex:ps2 .
352
352
ex:ps1 a sh:PropertyShape ;
353
-
sh:label "Name" ;
354
-
sh:path foaf:givenName ;
355
-
sh:nodeKind sh:Literal .
353
+
sh:label "Name" ;
354
+
sh:path foaf:givenName ;
355
+
sh:nodeKind sh:Literal .
356
356
ex:ps2 a sh:PropertyShape ;
357
-
sh:path foaf:givenName ;
358
-
sh:minCount "1" .
357
+
sh:path foaf:givenName ;
358
+
sh:minCount "1" .
359
359
```
360
360
361
361
Instead the expression should be done via a single property shape:
362
362
363
363
```turtle
364
364
ex:ns1 a sh:NodeShape ;
365
-
sh:label "Person" ;
366
-
sh:property ex:ps1 .
365
+
sh:label "Person" ;
366
+
sh:property ex:ps1 .
367
367
ex:ps1 a sh:PropertyShape ;
368
-
sh:label "Name" ;
369
-
sh:path foaf:givenName ;
370
-
sh:minCount "1" .
371
-
sh:nodeKind sh:Literal .
368
+
sh:label "Name" ;
369
+
sh:path foaf:givenName ;
370
+
sh:minCount "1" .
371
+
sh:nodeKind sh:Literal .
372
372
```
373
373
374
374
However, there are situations where the same property is reused on the same node for different reasons. But then the constraints should be made in such a way that the triples matched for each property shape are disjoint. Mechanism to ensure that they match different sets of triples includes `sh:nodeKind` and `sh:pattern`. The following example shows how to point to two different sets of concepts using the same property (`foaf:topic_interests`):
375
375
376
376
```turtle
377
377
ex:ns1 a sh:NodeShape ;
378
-
sh:label "Person" ;
379
-
sh:property ex:ps1, ex:ps2 .
378
+
sh:label "Person" ;
379
+
sh:property ex:ps1, ex:ps2 .
380
380
ex:ps1 a sh:PropertyShape ;
381
-
sh:label "Hobbies" ;
382
-
sh:path foaf:topic_interests ;
383
-
sh:nodeKind sh:URI ;
384
-
sh:pattern "^http://example.com/hobbies/.*$";
381
+
sh:label "Hobbies" ;
382
+
sh:path foaf:topic_interests ;
383
+
sh:nodeKind sh:URI ;
384
+
sh:pattern "^http://example.com/hobbies/.*$";
385
385
ex:ps2 a sh:PropertyShape ;
386
-
sh:label "Professional interests in computer science" ;
Read the chapter "[Using the same property for different purposes](property-reuse.md)" for a longer background and recommendations on when it is suitable to reuse properties in this manner.
0 commit comments