Skip to content

Commit 4b3b299

Browse files
committed
Update 04-tests.bs
1 parent 6d213be commit 4b3b299

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

04-tests.bs

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,33 @@ Each conformance point is described in detail, including the expected behavior o
6060
- When there is a `tree:member` in the payload of the current HTTP response, the subject of the `tree:member` must be a `tree:Collection` or a `tree:RootNode`
6161
- When there is a `tree:Relation` in the payload of the current HTTP response, the subject of the `tree:Relation` must also point to a `tree:path`
6262

63-
### Initialization ### {#1.2}
63+
### Search TREE ### {#1.2}
64+
- During the construction of the complete RDF graph of the search tree at any point in the traversal, the inbound link to any tree:Node via a tree:Relation can originate from only one other tree:Node.
65+
66+
```turtle
67+
@prefix sh: <http://www.w3.org/ns/shacl#> .
68+
@prefix tree: <https://w3id.org/tree#> .
69+
@prefix ex: <http://example.org/> .
70+
71+
ex:NodeInboundUniquenessShape
72+
a sh:NodeShape ;
73+
sh:targetClass tree:Node ;
74+
sh:sparql [
75+
a sh:SPARQLConstraint ;
76+
sh:message "Each tree:Node must not be the target of more than one tree:Relation.tree:node link from another node." ;
77+
sh:select """
78+
SELECT ?this (COUNT(?sourceNode) AS ?inboundCount)
79+
WHERE {
80+
?sourceNode tree:relation ?relation .
81+
?relation tree:node ?this .
82+
FILTER (?sourceNode != ?this)
83+
}
84+
GROUP BY ?this
85+
HAVING (COUNT(?sourceNode) > 1)
86+
""" ;
87+
] .
88+
89+
````
6490
### The member extraction algorithm ### {#1.3}
6591
### Traversing the search tree ### {#1.4}
6692
### Pruning branches ### {#1.5}

0 commit comments

Comments
 (0)