Try
BIND (taxonomies:depth(?node) AS ?depth) .
where the full URI of the function is
<http://evn.topbraidlive.org/evnprojects#depth> and the body of the
function is
SELECT (COUNT(DISTINCT ?parent) AS ?result)
WHERE {
?arg1 (skos:broader)+ ?parent .
}
Holger
On 21/11/2018 5:06 PM, William Ramos wrote:
Hi, community - on my project, we are trying to determine the
level/depth of a given node in order to put this on a JSON service.
By checking the EDG application, under a taxonomy (for example *geo*)
by checking the "Taxonomy statistics" under "Reports" we can see a
chart similar to this:
... which, up to some extent seems to implicitly contain the
information that we want.So we're wondering if there is a pre-built
mechanism that would allow us to retrieve the *depth of a given node*.
*Can you please help us by guiding us on how to achieve this or what
would be a good approach for this?*
*
*
The base query we have for this starts like this, but currently it
only gets the name of the node, we also would like to obtain the *depth*:
|
PREFIX g:<http://topquadrant.com/ns/examples/geography#>
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
SELECT ?nodeName ?depth
WHERE {
GRAPH <urn:x-evn-master:geo>{
BIND(g:Canadaas?node)
?node skos:prefLabel ?nodeName .FILTER (lang(?nodeName)="en").
# ...
}.
}
|
Thanks in advance. --
You received this message because you are subscribed to the Google
Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to topbraid-users+unsubscr...@googlegroups.com
<mailto:topbraid-users+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "TopBraid
Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.