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: 01-tree-specification.bs
+7-14Lines changed: 7 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -99,8 +99,7 @@ This is illustrated in the next example:
99
99
100
100
# Definitions # {#formalizations}
101
101
102
-
A `tree:Collection` is a set of `tree:Member`s.
103
-
The set of members MAY be empty.
102
+
A `tree:Collection` is a set of zero or more `tree:Member`s.
104
103
105
104
A `tree:Member` is a set of (at least one) quad(s) defined by the member extraction algorithm (see further).
106
105
@@ -118,21 +117,15 @@ In one tree, completeness MUST be guaranteed, unless indicated otherwise (as is
118
117
119
118
# Initialization # {#init}
120
119
121
-
A client SHOULD be initiated using a URL.
122
-
The client MUST dereference the URL, which will result in a set of [[!rdf-concepts]] triples or quads.
123
-
When the URL after all redirects, is used in a triple `?c tree:view <> .`, a client MUST assume the URL after redirects is an identifier of the intended root node of the collection in `?c`.
120
+
A TREE-based client MUST be initiated either by using the IRI of the `tree:Collection`, or by using a URL that is the IRI of the root `tree:Node` or will redirect to it.
121
+
The client MUST start by dereferencing the IRI resulting in a set of [[!rdf-concepts]] triples or quads:
124
122
125
-
Note: Dereferencing in this specification also means parsing the RDF triples or quads from the HTTP response. TREE does not limit the content-types that can be used to represent RDF triples. Client developers should do a best-effort for their community.
123
+
1. Detecting and handling a `tree:Collection`: If exactly one `<collectionIRI> tree:view ?o` triple pattern can be matched, its object identifies the root `tree:Node`. If the current page IRI is not equal to that node’s IRI, the client MUST dereference the IRI of the root node and restart the initialization process from there. This behavior ensures backward compatibility and aligns with legacy practices. More advanced discovery mechanisms (e.g., supporting multiple views or selection logic) are out of scope for this specification and will be addressed by the report on Discovery and Context Information.
124
+
2. Detecting and handling a root `tree:Node`: In this case, the final IRI after all HTTP redirects MUST correspond to the object of a `tree:view` triple linking it to a `tree:Collection`. This allows the client to verify that it has reached a valid entry point into the TREE structure.
126
125
127
-
If there is no such triple, then the client MUST check whether the URL before redirects (`E`) has been used in a pattern `<E> tree:view ?N.` where there’s exactly one `?N`, then the algorithm MUST return `?N` as the root node and `E` as the collection.
126
+
Once the root `tree:Node` is retrieved and the `tree:Collection` is known, the client can proceed to extracting members, traversing the relations, or using search forms.
128
127
129
-
The client then MUST dereference the identified root node (if it did not do that already) and merge those quads with the already found quads.
130
-
It now MUST look for a potential search forms that MAY be linked, either i) on top of the root node, or ii) on top of the entity linked through `tree:viewDescription`, using `tree:search`.
131
-
132
-
In case it is not done using an unambiguous URL, clients MAY implement the report on [Discovery and Context Information (work in progress)](https://w3id.org/tree/specification/discovery).
133
-
This report also explains how clients MAY implement support for extracting context information such as provenance, contact points, etc.
134
-
135
-
Note: Having an identifier for the collection has become mandatory: without it you can otherwise not define completeness.
128
+
Note: The report on Discovery and Context Information is currently a work in progress for which [an on-going draft is available](https://w3id.org/tree/specification/discovery).
136
129
137
130
# The member extraction algorithm # {#member-extraction-algorithm}
0 commit comments