Using dash:ValueTableViewer

22 views
Skip to first unread message

Tim Smith

unread,
Jan 19, 2022, 2:41:38 PM1/19/22
to topbrai...@googlegroups.com
Hi,
I am trying to do something similar to the example shown here.  I have structured my ontology following the example.  However, I cannot get the "self" link to render properly.  I would like the values of my property shape (same as ex:Concept-broader-inverse in below) to appear as links in the table instead of a text string.

When you are at the value node, I want to render the value node as an IRI, such as this:
image.png
ex:ConceptTableShape-self
    a sh:PropertyShape ;
    sh:path ex:self ;
    sh:description "This column is used to render the (narrower) concept itself." ;
    sh:name "narrower concept" ;
    sh:nodeKind sh:IRI ;
    sh:order "0"^^xsd:decimal ;
    sh:values sh:this .
What property do I use to point to the value node from the value node?  ex:self is used in the example.  Is there an ex:self property on the value node (narrower concept) that points to itself?  Maybe I'm thinking about this incorrectly.

Thanks in advance for your help,

Tim


"In this example we have used a sh:values rule to infer the values of the first column. In this case, the values are simply pointing back to the focus node of each row, using sh:this. Note that dash:applicableToClass or sh:targetClass are needed to get this inference correctly."

skos:Concept
    sh:property ex:Concept-broader-inverse .

ex:Concept-broader-inverse
    a sh:PropertyShape ;
    sh:path [ sh:inversePath skos:broader ] ;
    sh:group skos:HierarchicalRelationships ;
    sh:name "narrower (table)" ;
    dash:viewer dash:ValueTableViewer ;
    sh:node ex:ConceptTableShape .

ex:ConceptTableShape
    a sh:NodeShape ;
    dash:applicableToClass skos:Concept ;
    rdfs:comment "A node shape defining the columns for a dash:ValueTableViewer." ;
    rdfs:label "Concept table shape" ;
    sh:property ex:ConceptTableShape-self ;
    sh:property ex:ConceptTableShape-type ;
    sh:property ex:ConceptTableShape-altLabel .

ex:ConceptTableShape-self
    a sh:PropertyShape ;
    sh:path ex:self ;
    sh:description "This column is used to render the (narrower) concept itself." ;
    sh:name "narrower concept" ;
    sh:nodeKind sh:IRI ;
    sh:order "0"^^xsd:decimal ;
    sh:values sh:this .

Tim Smith

unread,
Jan 19, 2022, 3:50:46 PM1/19/22
to topbrai...@googlegroups.com
I found the document - Inferring Data with SHACL Property Value Rules (topquadrant.com) and that explained it.  It is now working for me.

Holger Knublauch

unread,
Jan 19, 2022, 5:17:19 PM1/19/22
to topbrai...@googlegroups.com

Yes, the trick is the line sh:values sh:this, which basically means that the values of ex:self are inferred/computed to be the values of the focus node (?this) itself. So it's just a dummy property with a yet unused URI (ex:self), that only exists for the purpose of creating this artificial column.

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/CAF0Wbn%2BGGajTG2ukeN9wJ-137fRyDPWdtfXA1EvHKHjm%3DEVffA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages