Use of ui:setContext and ui:unionOfGraphs

39 views
Skip to first unread message

Adam Kimball

unread,
Oct 11, 2016, 2:55:14 PM10/11/16
to TopBraid Suite Users
Hi all,

I'm looking for a example of how to change the default graph to be a union of graphs from within an SWP call.  From the docs I can see I want to be using ui:setContext and ui:unionOfGraphs, but I haven't been able to figure out the syntax.  Any help would be greatly appreciated.

Thanks,
Adam

Holger Knublauch

unread,
Oct 11, 2016, 8:19:54 PM10/11/16
to topbrai...@googlegroups.com
Hi Adam,

the source code of the TopBraid applications itself is sometimes useful to explore such examples. For example, open teamwork.ui.ttlx and navigate to ui:unionOfGraphs, then use the Find References button to get examples. One of them is

<ui:setContext ui:queryGraph="{= ui:unionOfGraphs(ui:currentQueryGraph(), &lt;urn:x-tb-authgraph&gt;) }">
    <...>
</ui:setContext>

So: ui:setContext ui:queryGraph="..." takes any graph IRI as value, and the children of that setContext element will then have the given graph as default query graph. The function ui:unionOfGraphs takes a list of other graph URIs and builds a new IRI that is recognized by TopBraid to be the union of all the given subgraphs. In the case above, the first subgraph is the previous query graph, i.e. it's basically expanded the field of view to the triples from the names graph <urn:x-tb-authgraph> (whatever that does)...

HTH
Holger
--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include the TopBraid Suite family of products and its base technologies such as SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbrai...@googlegroups.com
---
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-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages