Replies: 6 comments 3 replies
-
Ok it seems I can not use example:Jack example:sniffs example:Coke here but have to define one more layer
then it works. Either I have not understood RDF properly or this is a bug :- ) So this basically means a thing that is a subclass of some other thing is not accepted by have strictly to be only rdf:type of the other thing. Not sure if this is backed by the mathematical foundation of RDFS but it feels wrong to me |
Beta Was this translation helpful? Give feedback.
-
The schema/ontology languages RDF Schema (RDFS) and OWL strictly separate ABox and TBox: https://en.wikipedia.org/wiki/Abox Usually it is not possible to use a term at the same time as class and as instance. In your case you like to express an ABox statement by saying that Jack sniffs a particular instance of the class You can solve this by using SKOS or something comparable to model drugs and their sub-concepts: The key is that you shouldn't use |
Beta Was this translation helpful? Give feedback.
-
@kenwenzel is right. The issue is that I believe you can probably solve this using a reasoner and |
Beta Was this translation helpful? Give feedback.
-
Btw. I like to use the SHACL playground to test out stuff. Here is the shape and data you provided. If you switch out:
With:
Your data becomes valid. |
Beta Was this translation helpful? Give feedback.
-
Thanks @kenwenzel for the explanation, I really thought that there is actually not really a concept of 'classes' and 'instances' after reading through a couple of university lecture slides. After you have mentioned that I searched again and found this stackoverflow post to have a couple of nice examples and graphics to explain it to dummys such as myself :) https://stackoverflow.com/questions/24817607/why-must-rdfdatatype-subclass-rdfclass-in-rdf. Not sure if SKOS is really what I am looking for (lack of expertise). In the real application I am dealing with space satellite components and how they are connected (network protocols, power supply etc. on a semi detailled level) and want to validate that the assembly is 'legal' and does not violate constraints. What I really want to achieve in the application (publicly founded project) is as follows: Our RDF4J server has a pre-defined datagraph, containing the class Components (=things that do not work/make-sense standalone)
and a couple of actual components you can buy on the market (like valves, batteries, sensors,... ). Like e.g.:
then on the lowest level we would have namedGraphs for satellite modules (assemblies of multiple components). e.g.
The ShapesGraph:
And we dont go further in this application to compose entire satellites for now. In such a namedGraph/per Module, we would then have actual instances of RW40 (1 or more of them) and other components that users can connect to each other if the interfaces defined on the Classlevel (schumann:RW40 etc. specifies the principle existence of such an interface) allows it. How does this relate to the drug example above? I was uncertain how to model the component hierarchy and if SHACL is even able to follow subclass relations as expected. Now I am still unsure if the connectivity patterns can be checked via SHACL (do I already need SPARQL sh:select/sh:sparql for this?) and computing a sum and compare it against a fixed value. I know this is already out of context of this Github issue but if any of these things are not possible with SPARQL please give me a warning : -) thank you! |
Beta Was this translation helpful? Give feedback.
-
Maybe you like to check out This is the implementation of a mathematical reasoner that can be used to calculate aggregates (e.g. mass of an assembly) and other things that need arithmetic. It is a stackable SAIL and hence can be used in combination with SHACL. I am very interested in your usage of named graphs. The NumerateWeb SAIL does also support named graphs but I am not sure if your particular case is supported. |
Beta Was this translation helpful? Give feedback.
-
Current Behavior
As pointed out in the discussions #4939 section, it seems that following the inheritance ladder in a PropertyShape's sh:Class constraint is not implemented.
Expected Behavior
I would expect that I can simply use 'Base classes' as values in the sh:class constraint.
Steps To Reproduce
Data Graph
Shapes Graph
Version
4.3.10
Are you interested in contributing a solution yourself?
Perhaps?
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions