Hi Boris,

I cannot think of a solution in SHACL Core, but SHACL-SPARQL is one option to implement this.

Holger


On 2021-07-07 2:26 am, Boris Pelakh wrote:
I am writing some basic shapes to validate that an ontology is well-formed, and one of checks I would like to add is that subPropertyOf and inverseOf only target the same type of property. For example:

gshapes:InversePropertyShape
a sh:NodeShape ;
sh:targetSubjectsOf owl:inverseOf ;
sh:property [
a sh:PropertyShape ;
sh:path ( owl:inverseOf rdf:type ) ;
sh:equals rdf:type ;
sh:message "Inverse property must be same type."
] .

gshapes:SuperPropertySameType
a sh:NodeShape ;
sh:targetSubjectsOf rdfs:subPropertyOf ;
sh:property [
a sh:PropertyShape ;
sh:path ( rdfs:subPropertyOf rdf:type ) ;
sh:equals rdf:type ;
sh:message "Super-property must be same type."
] .

The problem I run into is with additional types like owl:FunctionalProperty and owl:TransitiveProperty, which break the above shapes. Is there a nice SHACL-native way for me to ignore those and only pay attention to values such as ObjectProperty and DatatypeProperty, or will I have to drop down to SPARQL queries to handle this validation?
--
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 [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/bbe679d4-71d5-4107-aa6a-47c41432b784n%40googlegroups.com <https://groups.google.com/d/msgid/topbraid-users/bbe679d4-71d5-4107-aa6a-47c41432b784n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/fcea2c7c-afd8-5387-1001-233219fb3d9e%40topquadrant.com.

Reply via email to