"skos+shacl"-only question....

51 views
Skip to first unread message

Bohms, H.M. (Michel)

unread,
Dec 29, 2023, 7:22:45 AM12/29/23
to topbrai...@googlegroups.com

I encounter an existing ontology that:

  • Uses skos for terms
  • Use shacl for shapes on instances that has a certain skos item as dct:subject
  • No use of rdfs/owl

 

Like:

    otl-patroon:Aalgoot a sh:NodeShape ;

        sh:closed true ;

        sh:description "Basispatroon voor het vastleggen van Aalgoot"@nl ;

        sh:ignoredProperties ( dct:subject dct:coverage rdf:type bs:hasPart otl:isBeschrevenDoor geo:hasGeometry ) ;

        sh:name "Aalgoot"@nl ;

        sh:property otl-patroon:bouwdatum,

            otl-patroon:bouwjaar,

            otl-patroon:discipline-Element,

            otl-patroon:isFaalkanskritisch,

            otl-patroon:omschrijving,

            otl-patroon:theoretischeLevensduur,

            otl-patroon:vervultFaunavoorzieningsfunctie ;

        sh:target [ a sh:SPARQLTarget ;

                sh:select """SELECT ?this WHERE {

                    ?this http://purl.org/dc/terms/subject https://data.rws.nl/def/otl/Aalgoot

                }""" ] .

 

Where:

 

    otl:Aalgoot a skos:Concept ;

        skos:broaderTransitive nen2660-term:DiscreteObject ;

        skos:definition "Goot waarin een klimsubstraat is aangebracht zoals bijvoorbeeld kokosmatten waarover een klein waterstroompje loopt."@nl ;

        skos:prefLabel "Aalgoot"@nl .

 

 

Technically it works (well you can sparql anything…), but is it a right approach?

 

(they use dct:subject for classifying instances towards the skos topic…).

 

Thx for advice,

Michel

 

 

 

Michel Böhms
Data Scientist

 


Mobile +31 630381220
E-mail  
michel...@tno.nl

Location

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.

 

 

 

 

David Price

unread,
Dec 29, 2023, 10:53:23 AM12/29/23
to 'Felix Sasaki' via TopBraid Suite Users
Hi Michel,

As usual, the following are just personal comments - not an agreed TQ perspective. Also, I did not do any actual testing of SHACL using this pattern to see how it behaves.

Whether this is “right” or not depends a lot on the use case. 

If it is purely for data validation, then perhaps - assuming it actually behaves as you expect (i.e. produces violations when, and only when, it should).

If they are trying to do “data modelling”, then perhaps not. e.g. skos broader transitive does not mean properties are “inherited” in the same way that they are with <i> rdf:type <x>  and <x> subClassOf <y>.

If it is meant to drive a model-driven UI, then making Aalgoot a subclass of Concept is the preferred approach. It is far harder to go query around every node shape to calculate the possible properties to show a user entering data.

As an aside, I cannot imagine when ignoring rdf:type is a good idea in an RDF-based use case. Again though, maybe this is a use case that I don’t quite understand.

Nit picking … but URIs in SPARQL require < and > so I guess this is not a copy and paste of working SHACL?

I imagine this is trying to allow users to create catalogs of “parts” in mechanical engineering/building designs, for example, and folks don’t like having 30K classes but for some reason 30K concepts is fine. Note that in that case you’ll probably want to do some more modeling and have subclasses of Concept so users do not have to search thru 30K labels to find the “subject”. I’m also sure that not all of the 30K would make sense for a specific instance. Of course, if the data is only ever generated via a data translator, for example, rather than a human then that concern probably does not matter as much.

Cheers,
David


On 29 Dec 2023, at 13:22, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:

I encounter an existing ontology that:
  • Uses skos for terms
  • Use shacl for shapes on instances that has a certain skos item as dct:subject
  • No use of rdfs/owl
 
Like:
    otl-patroon:Aalgoot a sh:NodeShape ;
        sh:closed true ;
        sh:description "Basispatroon voor het vastleggen van Aalgoot"@nl ;
        sh:ignoredProperties ( dct:subject dct:coverage rdf:type bs:hasPart otl:isBeschrevenDoor geo:hasGeometry ) ;
        sh:name "Aalgoot"@nl ;
        sh:property otl-patroon:bouwdatum,
            otl-patroon:bouwjaar,
            otl-patroon:discipline-Element,
            otl-patroon:isFaalkanskritisch,
            otl-patroon:omschrijving,
            otl-patroon:theoretischeLevensduur,
            otl-patroon:vervultFaunavoorzieningsfunctie ;
        sh:target [ a sh:SPARQLTarget ;
                sh:select """SELECT ?this WHERE {
                    ?this http://purl.org/dc/terms/subjecthttps://data.rws.nl/def/otl/Aalgoot
                }""" ] .
 
Where:
 
    otl:Aalgoot a skos:Concept ;
        skos:broaderTransitive nen2660-term:DiscreteObject ;
        skos:prefLabel "Aalgoot"@nl .
 
 
Technically it works (well you can sparql anything…), but is it a right approach?
 
(they use dct:subject for classifying instances towards the skos topic…).
 
Thx for advice,
Michel
 
 
 
Michel Böhms
Data Scientist
 
<image001.png>
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
 
 
 
 

-- 
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/8630a24974e34bfcb1951721239331f4%40tno.nl.

Bohms, H.M. (Michel)

unread,
Dec 29, 2023, 11:01:32 AM12/29/23
to topbrai...@googlegroups.com

Thank you David for your valuable input as always.

The <> seem to have disappeared when copying, they are in the source…..

 

Thanks again and wishing you a happy and moreover semantic new year!

Michel

Reply all
Reply to author
Forward
0 new messages