Closed zhurui0509 closed 2 years ago
This version also does not work: @shirlysteph
sosa-shacl:madeActuationConstraint
a sh:NodeShape ;
sh:targetSubjectsOf sh:madeActuation ;
sh:property [
rdfs:comment "The domain of sh:madeActuation is always an instance of sosa:Actuator."@en ;
sh:path sosa:madeActuation ;
sh:hasValue sosa:Actuator ;
] .
@zhurui0509 could you please share your testing data? and what is the error message?
I just create a toy sample to test these shapes in https://shacl.org/playground/. None of the property shapes works.
One example:
shape:
sosa-shacl:madeByActuatorDomainConstraint
a sh:NodeShape ;
sh:targetSubjectsOf sosa:madeByActuator ;
rdfs:comment "We restrict the domain of sosa:madeByActuator to sosa:Actuation" ;
sh:class sosa:Actuation .
data:
ex:obs a sosa:Observation .
ex:obs sosa:madeByActuator sosa:abc .
The data should violate the shape. But nothing returned from the validation.
Meanwhile, I also don't have good ideas of how to write those domain and range in SHACL.
@ling-cai and I had discussed about it and we agreed that sh:targetSubjectsOf and sh:targetObjectsOf might not work (based on the example showed in SHACL W3C document).
Probably, we need SHACL-SPARQL.
Btw, aren't we more interested in scoped domain and range, which is more complicated in SHACL?
@zhurui0509 unfortunately, it looks like you did not do your testing on a fully pulled repository.
Actually, from what I can tell, you reverted these shapes back into node shapes, why did you do that?
Unfortunately, it looks like you accidentally overwrote many changes. For example, https://github.com/KnowWhereGraph/KWG-SHACL/issues/7#issuecomment-923650436 this version came from your typo fix commit. Technically, the previous version would not have worked either, but this one is the original one that we found to be incorrect in an earlier discussion on slack.
The current shapes regarding predicate domain and range are wrong (tested in https://shacl.org/playground/) @cogan-shimizu @kbzhoulu