Model / Display External URL in EDG

15 views
Skip to first unread message

Fan Li

unread,
Aug 5, 2022, 10:43:22 AM8/5/22
to TopBraid Suite Users
In the following thread, Irene mentioned two approaches to display clickable URL in EDG: xsd:anyURI or ref:HTML

https://groups.google.com/g/topbraid-users/c/IX9XLMMchPw/m/wZeTOfUqAgAJ

 if you want to see on a form a hyperlink to a document on a web, use xsd:anyURI or, if values are text that includes links, use ref:HTML.

But I feel there are limitations in both. Using xsd:anyURI, I cannot control the displayed text and the hover text in the HTML hyperlink tag (e.g. <a href=".." text="Link to ABC">ABC</a>). Using ref:HTML, I can customize both but the content can be any html with no semantic meaning.

Is there a built-in URL class (or allow me to create one) and have it rendered as a clickable link? It would also give me the ability to attach additional metadata to each URL.

Thanks!

Holger Knublauch

unread,
Aug 8, 2022, 1:22:41 AM8/8/22
to topbrai...@googlegroups.com
Hi Fan Li,

(you are probably using Mac with auto-correction, which will replace rdf:... with ref:... - I have switched off auto-correction as this was biting me all the time).

If you want to attach metadata and also customize the display text, why not simply create proper instances of a class of your choice, e.g. ex:URL which has rdfs:label as a declared property and any other metadata property too? I.e. instead of using datatype properties just make them proper object properties linking to an instance instead of a literal?

Holger


--
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/1342be77-43f6-45fc-a76c-3f0ee010b02fn%40googlegroups.com.

Fan Li

unread,
Aug 8, 2022, 8:21:49 AM8/8/22
to topbrai...@googlegroups.com
Hi Holger, thanks for your response.That was indeed something I tried (a custom URL class). However, in the data graph tabular view, clicking on the url field will display the URL instance in EDG, instead of opening the URL directly. This is not the behavior our users wanted here. Is there a way I can customize it? 

2022-08-08 081252.png

David Price

unread,
Aug 8, 2022, 8:31:16 AM8/8/22
to topbrai...@googlegroups.com
This makes a link as a simple hyperlink property work, in EDG 7.2 at least, when used in a Data Graph.

play:TestClass-seeLink
  a sh:PropertyShape ;
  sh:path play:seeLink ;
  dash:viewer dash:HyperlinkViewer ;
  sh:datatype xsd:anyURI ;
  sh:maxCount 1 ;
  sh:name "see link" ;
.

Cheers,
David

On 8 Aug 2022, at 13:21, Fan Li <lifa...@gmail.com> wrote:

Hi Holger, thanks for your response.That was indeed something I tried (a custom URL class). However, in the data graph tabular view, clicking on the url field will display the URL instance in EDG, instead of opening the URL directly. This is not the behavior our users wanted here. Is there a way I can customize it? 

<2022-08-08 081252.png>

On Mon, Aug 8, 2022 at 1:22 AM Holger Knublauch <hol...@topquadrant.com> wrote:
Hi Fan Li,

(you are probably using Mac with auto-correction, which will replace rdf:... with ref:... - I have switched off auto-correction as this was biting me all the time).

If you want to attach metadata and also customize the display text, why not simply create proper instances of a class of your choice, e.g. ex:URL which has rdfs:label as a declared property and any other metadata property too? I.e. instead of using datatype properties just make them proper object properties linking to an instance instead of a literal?

Holger


On 5 Aug 2022, at 4:43 pm, Fan Li <lifa...@gmail.com> wrote:

In the following thread, Irene mentioned two approaches to display clickable URL in EDG: xsd:anyURI or ref:HTML

https://groups.google.com/g/topbraid-users/c/IX9XLMMchPw/m/wZeTOfUqAgAJ

 if you want to see on a form a hyperlink to a document on a web, use xsd:anyURI or, if values are text that includes links, use ref:HTML.

But I feel there are limitations in both. Using xsd:anyURI, I cannot control the displayed text and the hover text in the HTML hyperlink tag (e.g. <a href=".." text="Link to ABC">ABC</a>). Using ref:HTML, I can customize both but the content can be any html with no semantic meaning.

Is there a built-in URL class (or allow me to create one) and have it rendered as a clickable link? It would also give me the ability to attach additional metadata to each URL.

Thanks!

--
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/1342be77-43f6-45fc-a76c-3f0ee010b02fn%40googlegroups.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/6D57EA84-E78C-4164-8D77-D89A185256AC%40topquadrant.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.

Holger Knublauch

unread,
Aug 8, 2022, 8:38:19 AM8/8/22
to topbrai...@googlegroups.com
I guess you need to make a decision here. When a user clicks on one of those (annotated) resources, should they directly go to the URL represented by that resource or should they first see the metadata/annotations instance? 

I suspect the latter as how else would users ever see that data. Then, from within those resources, assuming they have the URL that you want to go to, you could add a proper hyperlink to the URL itself by adding an inferred property that points to itself but shows up as dash:HyperlinkViewer

ex:URL
  a owl:Class ;
  a sh:NodeShape ;
  rdfs:label "URL" ;
  rdfs:subClassOf owl:Thing ;
  sh:property ex:URL-label ;
  sh:property ex:URL-url ;
.
ex:URL-label
  a sh:PropertyShape ;
  sh:path rdfs:label ;
  dash:singleLine true ;
  graphql:name "labels" ;
  sh:name "labels" ;
  sh:or dash:StringOrLangString ;
.
ex:URL-url
  a sh:PropertyShape ;
  sh:path ex:url ;
  dash:viewer dash:HyperlinkViewer ;
  sh:description "The URL itself, this time as a clickable link." ;
  sh:maxCount 1 ;
  sh:name "url" ;
  sh:nodeKind sh:IRI ;
  sh:values sh:this ;
.

I just notice that David sent a similar suggestion but I believe the difference is that in his design a separate property is used while above the assumption is that the ex:URL instance itself has the target URL. The trick with sh:values sh:this is an inference pointing at itself, just so that a clickable URL shows up on forms. But using a separate datatype property would of course also work.

Holger


On 8 Aug 2022, at 2:21 pm, Fan Li <lifa...@gmail.com> wrote:

Hi Holger, thanks for your response.That was indeed something I tried (a custom URL class). However, in the data graph tabular view, clicking on the url field will display the URL instance in EDG, instead of opening the URL directly. This is not the behavior our users wanted here. Is there a way I can customize it? 

<2022-08-08 081252.png>

On Mon, Aug 8, 2022 at 1:22 AM Holger Knublauch <hol...@topquadrant.com> wrote:
Hi Fan Li,

(you are probably using Mac with auto-correction, which will replace rdf:... with ref:... - I have switched off auto-correction as this was biting me all the time).

If you want to attach metadata and also customize the display text, why not simply create proper instances of a class of your choice, e.g. ex:URL which has rdfs:label as a declared property and any other metadata property too? I.e. instead of using datatype properties just make them proper object properties linking to an instance instead of a literal?

Holger


On 5 Aug 2022, at 4:43 pm, Fan Li <lifa...@gmail.com> wrote:

In the following thread, Irene mentioned two approaches to display clickable URL in EDG: xsd:anyURI or ref:HTML

https://groups.google.com/g/topbraid-users/c/IX9XLMMchPw/m/wZeTOfUqAgAJ

 if you want to see on a form a hyperlink to a document on a web, use xsd:anyURI or, if values are text that includes links, use ref:HTML.

But I feel there are limitations in both. Using xsd:anyURI, I cannot control the displayed text and the hover text in the HTML hyperlink tag (e.g. <a href=".." text="Link to ABC">ABC</a>). Using ref:HTML, I can customize both but the content can be any html with no semantic meaning.

Is there a built-in URL class (or allow me to create one) and have it rendered as a clickable link? It would also give me the ability to attach additional metadata to each URL.

Thanks!

--
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/1342be77-43f6-45fc-a76c-3f0ee010b02fn%40googlegroups.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/6D57EA84-E78C-4164-8D77-D89A185256AC%40topquadrant.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.

Holger Knublauch

unread,
Aug 8, 2022, 8:40:31 AM8/8/22
to topbrai...@googlegroups.com
I should have attached an example instance to demonstrate how this will look like:


HTH
Holger

Fan Li

unread,
Aug 8, 2022, 8:47:42 AM8/8/22
to TopBraid Suite Users
Thank you, David and Holger! It's great to have both options to meet different user requirements.

David Price

unread,
Aug 8, 2022, 8:56:51 AM8/8/22
to topbrai...@googlegroups.com
FYI the full list of available Edit and View options for property shapes is here:


Cheers,
David

Reply all
Reply to author
Forward
0 new messages