Replies: 1 comment
-
Could be that it's not picking up the rdfs statements. You could try to add them together with your shapes instead to see if that helps. Are you adding the shapes to the correct graph? Also, what version of RDF4J are you using? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @ all
(sorry that it is me again :) )
I'm slightly confused whether my SPARQLConstraint (see below) is wrong or if there is a bug in RDF4J because the constraint does not fail.... but when the same query executed as a regular SPARQL query against the repository/connection API, it delivers valid results. In my understanding (correct me if this is wrong) results should result in violations.
In my app, you can assemble satellites and here I want to check if the maximum Voltage delivered by a PowerSupply-Component is sufficient to cover the demand (as a sum) of all connected Components which are subClasses of PowerSupplySink. PowerSupply and PowerSink instances both have exactly one :hasProperty/hasMaximumValue (for suppliers) and :hasProperty/hasFixedValue (for Sink) each, respectively.
The generic SPARQL-query that actually works looks like this:
In SHACL this did not work, for debugging purposes then I just pulled out the first subquery to see if at least this works and tried this in SHACL -> it does not deliver any result -> no violation.
Here the shapeClass:
So, the propertyPath clearly exists (successfully validated in vanilla SPARQL as well). In my understanding $this should be bound to instances of schumann:PowerSupplyInterface. Therefore, I do not understand what is wrong here ... or is this a bug? I have tried to debug it but as the constraint does not fail -> no report and the global logging as described on the website was not showing the variable configurations.
The full data graph is as follows:
Shapes (reduced):
Some code snippet to verify that there is an output for maxVoltage:
Beta Was this translation helpful? Give feedback.
All reactions