Skip to content

Commit fa0dedf

Browse files
committed
correct usage note property and indentation
1 parent 18642d3 commit fa0dedf

1 file changed

Lines changed: 52 additions & 52 deletions

File tree

docs/ap.md

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The following information MUST be provided for an application profile resource:
4343
The following information MAY be provided:
4444

4545
* 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`
4747
* A reference to another application profile that expresses that it is a
4848
* "subprofile" of another profile via `prof:isProfileOf`
4949
* "variant of" another profile via the `inspec:variant`
@@ -69,7 +69,7 @@ The following information MAY be provided:
6969

7070
* A class it corresponds to via the target declaration `sh:targetClass`
7171
* 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`
7373
* A reference to another node shape it
7474
* "refines" via `inspec:refines` AND `sh:and` with a SHACL list containing the refined node shape (see [section on refinement](#node_refinement)), OR
7575
* "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:
9393
* `sh:minCount "-1"^^xsd:integer` for optional (or, if left out it should be interpreted as -1)
9494
* `sh:maxCount "N"^^xsd:integer` for a maximum cardinality of `N`
9595
* 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`
9797
* 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)
9898
* That a language is required on literals by setting `sh:datatype` to `rdf:langString`
9999
* Constraints on which literals that is allowed by:
@@ -270,7 +270,7 @@ ex:ns2 a sh:NodeShape ;
270270
sh:path dcterms:identifier ;
271271
sh:order "0.5"^^xsd:decimal ;
272272
sh:and ( ex:ps-identifier ) .
273-
], ex:ps-title.
273+
], ex:ps-title .
274274
```
275275

276276
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:
287287

288288
```turtle
289289
ex:ps1 a sh:PropertyShape ;
290-
sh:path dcterms:subject ;
291-
sh:pattern "^http://example.com/terminologyA/.*$" ;
292-
sh:node [
293-
a sh:NodeShape ;
294-
sh:severity sh:Info ;
295-
sh:property [
296-
sh:path rdf:type ;
297-
sh:hasValue skos:Concept
298-
], [
299-
sh:path skos:inScheme ;
300-
sh:hasValue ex:terminologyA
301-
]
290+
sh:path dcterms:subject ;
291+
sh:pattern "^http://example.com/terminologyA/.*$" ;
292+
sh:node [
293+
a sh:NodeShape ;
294+
sh:severity sh:Info ;
295+
sh:property [
296+
sh:path rdf:type ;
297+
sh:hasValue skos:Concept
298+
], [
299+
sh:path skos:inScheme ;
300+
sh:hasValue ex:terminologyA
301+
]
302302
]
303303
```
304304

@@ -321,19 +321,19 @@ The section was purposefully kept very similar to the section on Restricting to
321321

322322
```turtle
323323
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+
]
337337
]
338338
```
339339

@@ -347,46 +347,46 @@ SHACL allows a node shape to include multiple property shapes that together cons
347347

348348
```turtle
349349
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 .
352352
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 .
356356
ex:ps2 a sh:PropertyShape ;
357-
sh:path foaf:givenName ;
358-
sh:minCount "1" .
357+
sh:path foaf:givenName ;
358+
sh:minCount "1" .
359359
```
360360

361361
Instead the expression should be done via a single property shape:
362362

363363
```turtle
364364
ex:ns1 a sh:NodeShape ;
365-
sh:label "Person" ;
366-
sh:property ex:ps1 .
365+
sh:label "Person" ;
366+
sh:property ex:ps1 .
367367
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 .
372372
```
373373

374374
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`):
375375

376376
```turtle
377377
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 .
380380
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/.*$";
385385
ex:ps2 a sh:PropertyShape ;
386-
sh:label "Professional interests in computer science" ;
387-
sh:path foaf:topic_interests ;
388-
sh:nodeKind sh:URI ;
389-
sh:pattern "^http://example.com/computer_science/.*$";
386+
sh:label "Professional interests in computer science" ;
387+
sh:path foaf:topic_interests ;
388+
sh:nodeKind sh:URI ;
389+
sh:pattern "^http://example.com/computer_science/.*$";
390390
```
391391

392392
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

Comments
 (0)