rdfs:comment"""Instances of this class are used as server callbacks to drive an app:Tree.
A TreeDataProvider is backed by two SELECT queries - one to get the roots, and one to get the children of a given node. Optionally, a root resource can be supplied to overload the default root(s)."""^^xsd:string;
A TreeDataProvider is backed by two SELECT queries - one to get the roots, and one to get the children of a given node. Optionally, a root resource can be supplied to overload the default root(s).
Another operation that trees must support is finding an expansion path from a root to a given node. To support this, each TreeDataProvider points to a SPIN template that delivers a path. This typically uses the spif:shortestObjectsPath function."""^^xsd:string;
rdfs:label"Tree data provider"^^xsd:string;
rdfs:subClassOfapp:TreeElements;
spin:constraint
...
...
@@ -5492,6 +5521,12 @@ A TreeDataProvider is backed by two SELECT queries - one to get the roots, and o
];
spin:constraint
[rdf:typespl:Argument;
rdfs:comment"This SPIN template is called with the variable ?node pre-bound to a node in the tree and ?root possibly pointing to a root resource. The template must return a single result variable containing a path from a root to that node. See spif:shortestObjectsPath for a default implementation. The path must be a space-separated string concatenation of URIs."^^xsd:string;
spl:predicatearg:treePathTemplate;
spl:valueTypespin:Template
];
spin:constraint
[rdf:typespl:Argument;
rdfs:comment"A subclass of app:TreeRootsTemplates that delivers the roots of the tree. Will be bypassed if the tree itself defined an arg:rootResource."^^xsd:string;
spl:optional"true"^^xsd:boolean;
spl:predicatearg:treeRootsTemplate;
...
...
@@ -5583,6 +5618,25 @@ app:TreeElements
rdfs:label"Tree elements"^^xsd:string;
rdfs:subClassOfapp:Elements.
app:TreePathTemplates
rdf:typespin:SelectTemplate;
rdfs:comment"An abstract superclass for SPIN templates used by TreeDataProviders to find a path from a node to a root."^^xsd:string;
rdfs:label"Tree path templates"^^xsd:string;
rdfs:subClassOfspin:SelectTemplates;
spin:constraint
[rdf:typespl:Argument;
rdfs:comment"The node to start traversal at."^^xsd:string;
spl:predicatearg:node;
spl:valueTyperdfs:Resource
];
spin:constraint
[rdf:typespl:Argument;
rdfs:comment"An optional root resource to stop traversal at."^^xsd:string;
spl:optional"true"^^xsd:boolean;
spl:predicatearg:root;
spl:valueTyperdfs:Resource
].
app:TreeRootsTemplates
rdf:typespin:SelectTemplate;
rdfs:comment"Abstract superclass for queries that can deliver the roots of a tree."^^xsd:string;
...
...
@@ -5596,6 +5650,115 @@ app:TreeRootsTemplates
spl:valueTyperdfs:Resource
].
app:TreeShortestPathCallback
rdf:typeui:NodeClass;
rdfs:comment"An element building a JSON array with URIs based on spif:shortestObjectsPath. Called using uispin?_viewClass=app:TreeShortestPathCallback&_format=json&subject=...&dataProvider=..."^^xsd:string;