Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sh:icon property #207

Open
jeswr opened this issue Nov 27, 2024 · 2 comments
Open

sh:icon property #207

jeswr opened this issue Nov 27, 2024 · 2 comments
Labels
UI For SHACL 1.2 UI spec

Comments

@jeswr
Copy link
Member

jeswr commented Nov 27, 2024

Similarly to how there is reason to have the sh:name and sh:description properties for sh:NodeShapes and sh:PropertyShapes, I believe that it would be appropriate to have a sh:icon property to support displaying shapes to users / developers.

In particular; the use-case I have encountered is the creation of a catalogue of shapes for application developers, where icons could be used in displaying the shape to developers browsing shapes they want to re-use in developing applications.

Since the SHACL 1.2 work is coming up, I thought it might be an appropriate time to try and get such a property added to the spec.

@tfrancart
Copy link

I had the same need of associating icons to (node) shapes for the Sparnatural query UI .
However in a broader linked data perspective you may need to associate an icon to virtually any resource, be it an OWL class, a property, an instance, etc. I don't think this is specific to SHACL. This is why I created a small vocabulary "volipi" (VOcabulary for LInked data Presentation) containing volipi:icon to associate an icon file to a resource, volipi:iconName to associate an icon name from an icon library e.g. FontAwesome, or volipi:class to associate a CSS class to a resource.

@HolgerKnublauch
Copy link
Contributor

Yes the requirement for icons exists, and for all resources. We are supporting custom icons in TopBraid using a slight indirection, see https://datashapes.org/propertyroles.html#IconRole

This means that any ontology can declare its own "icon" properties and just mark them as dash:propertyRole dash:IconRole. As shown in the link above, this means that:

  • icons can be directly asserted as individual triples for each subject
  • icons can be set as sh:defaultValue
  • icons can be inferred using SHACL rules

If the new SHACL WG produces official SHACL inferencing support then the latter means for example that classes marked as owl:deprecated can display with a different icon than classes that are not, or cities that are capitals can display differently on a map than normal cities, or cities with more than 1 million inhabitants can render with a larger icon etc.

@HolgerKnublauch HolgerKnublauch transferred this issue from w3c/shacl Jan 20, 2025
@HolgerKnublauch HolgerKnublauch added the UI For SHACL 1.2 UI spec label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI For SHACL 1.2 UI spec
Projects
None yet
Development

No branches or pull requests

3 participants