Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Icons are not coloring consistantly in tree

91 views
Skip to first unread message

Ad Reuijl

unread,
Jan 31, 2024, 9:58:40 PM1/31/24
to TopBraid Suite Users
Hi, 

I was wondering why the icons in the tree dont assume the same color, 
i did see that it is possible in the example found here: https://datashapes.org/propertyroles.html#IconRole 

Hope that anyone has an answer! thanks in advance!

Regards, Ad
Capture.PNG

Holger Knublauch

unread,
Feb 1, 2024, 4:18:14 AM2/1/24
to topbrai...@googlegroups.com
What is the complete definition (source code) of that resource, including the imported triples?

And does it have a metaclass that would declare the dash:IconRole, i.e. does IconRole have any References?

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/501e2255-08c9-4fb2-bf70-2107237de037n%40googlegroups.com.
<Capture.PNG>

Ad Reuijl

unread,
Feb 5, 2024, 3:20:14 AM2/5/24
to TopBraid Suite Users
Hi Holger, 

Thanks for your fast reply :)

I wrote this code:

rdfs:Class sh:property werkwijzeFrontend:Asset-icon .
tosh:Class-classIcon sh:deactivated true .



werkwijzeFrontend:Asset-icon
a sh:PropertyShape ;
  sh:path werkwijzeFrontend:assetIcon ;
  #sh:group werkwijzeFrontend:LabelsEnDefinitionPropertyGroup ;
  #dash:hidden true ;
  sh:deactivated false ;
  dash:propertyRole dash:IconRole ;
  sh:datatype xsd:anyURI ;
  #sh:defaultValue "https://cdn-icons-png.freepik.com/512/1458/1458528.png"^^xsd:anyURI ;
  #sh:defaultValue "http://localhost:8083/tbl/lib/testimages/asset.png"^^xsd:anyURI ;
  sh:values [
      dash:js """
          focusNode.wisseltGegevensUit == true ?
              null; // Fall back to default icon
      """ ;
  ] ;
  sh:maxCount 1 ;
  sh:name "asset icon" ;
.

So it is working fine in in the form tab, only the tree doest apply the same colors.
I haven't done anything else on the icon part. I'm only including other ontologies i made, those all have their own uri's and don't mess with any dash or sh properties.
I', using EDG 7.7.1 studio

Regards,
Ad

Op donderdag 1 februari 2024 om 10:18:14 UTC+1 schreef Holger Knublauch:

Holger Knublauch

unread,
Feb 5, 2024, 4:11:57 AM2/5/24
to 'Branson, GaBriella C' via TopBraid Suite Users
Hi Ad,

thanks for the details. I now understand that the Classes tree does indeed not use the custom icons.
We did the extra icon handling for the Taxonomy tree, but not yet for the class tree.

I have recorded a development ticket to try to address this in the future.

Thanks for the report
Holger


Ad Reuijl

unread,
Feb 5, 2024, 10:38:03 AM2/5/24
to TopBraid Suite Users
Hi Holger,

Thanks for the support :) then it will solve itself in future versions of EDG

regards, Ad

Op maandag 5 februari 2024 om 10:11:57 UTC+1 schreef Holger Knublauch:

Ad Reuijl

unread,
Feb 28, 2024, 5:50:51 AM2/28/24
to TopBraid Suite Users
Hi Holger, 

Just wanted to let you know that i tried this within the concepts tree, and the same error occured, it only worked within the form tab and not on the tree. 
Could it have to do with the use of the test version of topbraid edg studio?

regards, Ad

Op maandag 5 februari 2024 om 10:11:57 UTC+1 schreef Holger Knublauch:
Hi Ad,

Holger Knublauch

unread,
Feb 28, 2024, 6:36:12 AM2/28/24
to 'Richard Nagelmaeker' via TopBraid Suite Users
Hi Ad,

but in the Geography Taxonomy that is bundled with the standard samples for EDG, the Concept Hierarchy does render custom icons:

PastedGraphic-1.png

This is implemented using dash:IconRole as:

g:Country-flag
a sh:PropertyShape ;
sh:path g:flag ;
dash:propertyRole dash:IconRole ;
rdfs:comment "The values of this property are basically copied over from the corresponding property P41 at the Wikidata entity that is linked to this country." ;
sh:nodeKind sh:IRI ;
sh:order "100"^^xsd:decimal ;
sh:values [
sh:path wdt:P41 ;
sh:nodes [
sh:path g:wikidataCountry ;
] ;
] ;
.

Does this look different from your declarations? (You may need to reload the browser after making changes as the presence of icons is cached).

Holger



Ad

unread,
Feb 29, 2024, 1:27:58 AM2/29/24
to topbrai...@googlegroups.com
Hi Holger, 

Thanks for your response, this is probably a caching problem indeed then.  My implementation is the same except for the use of dash:js to select the image but that part works. 
Thanks for the advice! Wil try today.

Regards
Ad

Op wo 28 feb 2024 12:36 schreef Holger Knublauch <hol...@topquadrant.com>:
PastedGraphic-1.png

Ad

unread,
Feb 29, 2024, 2:24:30 PM2/29/24
to topbrai...@googlegroups.com
Hi Holger, 

You were right :) worked very nicely in the Taxonomy, very handy functionality! 

Regards, 
Ad

Op do 29 feb 2024 07:27 schreef Ad <adre...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages