How to generate a link to an instance?

16 views
Skip to first unread message

Tim Smith

unread,
Mar 29, 2023, 5:34:50 PM3/29/23
to TopBraid Suite Users
Hi,
I am using the EDG SPARQL endpoint to provide data to a graph visualization engine.  Within that application, I would like for a user to be able to select a node or edge of the graph and click a link that will open the corresponding instance, etc... in EDG.  Thus, part of the data I need to pull via the SPARQL endpoint is a "deep link" to the specific object.  I want to be able to generate this link at runtime for everything in EDG.  I cannot assert the link because EDG and Explorer run on different servers so there can be no hard-coding of server names, ports, etc...

Is there a function in EDG that will create such a deep link?  If not, what is the best way to get access to the server name, the port and graph for all classes, properties and intances?  Here is an example deep link from the Northwind Data Asset example running in EDG Studio.


Thanks in advance for your help,

Tim

Holger Knublauch

unread,
Mar 30, 2023, 5:01:25 AM3/30/23
to topbrai...@googlegroups.com
TopBraid doesn't know at which URL its server can be accessed from the outside. You would need to tell this to the application that creates the links, or store such a URL as a property in EDG which your external app could then query. There is for example a field "Explorer Configuration > Editor Server" where you could enter the absolute base URL and query it as value of cfg:editorServer using

BIND (smf:configParam('editorServer') AS ?url)

The relative URL of the resource in its surrounding editor can be produced using

BIND (teamwork:editorLink(<urn:x-evn-master:northwind>, ?resource) AS ?link) 

Concat both and you'd have a suitable URL for deep links.

HTH
Holger


--
The topics of this mailing list include TopBraid EDG and related technologies such as SHACL.
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/fe56d6f4-09e9-420c-9192-f49db96dfa2en%40googlegroups.com.

Tim Smith

unread,
Apr 2, 2023, 10:59:43 AM4/2/23
to TopBraid Suite Users
Hi Holger,

This is very helpful!  Thank you.  

An additional use case I am working against is to build HTML strings that become contents of a table cell.  These strings will contain raw text and multiple links to resources.  The table is displayed in EDG.  Will teamwork:editorLink create a suitable link for this use?  

Tim

Holger Knublauch

unread,
Apr 3, 2023, 4:32:26 AM4/3/23
to topbrai...@googlegroups.com
Yes, within EDG you should be able to use teamwork:editorLink with relative URLs. Parts of EDG use that function internally.

Holger


Reply all
Reply to author
Forward
0 new messages