How to generate a link to an instance?

17 vistas
Ir al primer mensaje no leído

Tim Smith

no leída,
29 mar 2023, 5:34:50 p.m.29/3/2023
para 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

no leída,
30 mar 2023, 5:01:25 a.m.30/3/2023
para 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

no leída,
2 abr 2023, 10:59:43 a.m.2/4/2023
para 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

no leída,
3 abr 2023, 4:32:26 a.m.3/4/2023
para 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


Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos