-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Range of is signifies relation #176
Comments
Hi @YoucTagh, could you provide an example where |
Hi @danaivach, I tested with the shape and data suggested in the comment: #116 (comment) To get an invalid graph, I simply removed the If I replace |
Thanks @YoucTagh. As far as I understand you used the following: @prefix ex: <http://example.org/> .
@prefix hmas: <https://purl.org/hmas/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix xs: <https://www.w3.org/2001/XMLSchema#> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
ex:moveGripper a sh:PropertyShape;
sh:targetClass hmas:ActionExecution ;
sh:property [
sh:path prov:used ;
sh:minCount 1;
sh:maxCount 1 ;
sh:or (
[ sh:hasValue ex:httpForm ]
[ sh:hasValue ex:coapForm ]
) ;
] ;
sh:property [
sh:path hmas:hasInput;
sh:qualifiedValueShape ex:gripperJointShape ;
sh:qualifiedMinCount 1 ;
sh:qualifiedMaxCount 1
] .
ex:gripperJointShape a sh:NodeShape ;
sh:targetClass ex:GripperJoint ;
sh:property [
sh:path ex:hasGripperValue ;
sh:minCount 1;
sh:maxCount 1 ;
sh:datatype xs:integer
] . I am concerned with the following: |
I agree with you @danaivach, yet it seems to be valid against the shape to validate shapes (cf. C. SHACL Shapes to Validate Shapes Graphs) After some investigation, it seems that this is indeed a problem (cf. w3c/data-shapes#121) and the version of Jena I was using did not include the updated shape. I think a shape like this one is needed: shsh:PropertyShapeShapee
a sh:NodeShape ;
sh:targetClass sh:PropertyShape;
sh:property [
sh:path sh:path ;
sh:maxCount 1 ; # path-maxCount
sh:minCount 1 ; # PropertyShape-path-minCount
sh:or ( shsh:PathShape [ sh:nodeKind sh:IRI ] ) ; # path-node
] . As far as we are concerned, even if a ...
ex:moveGripper
a sh:NodeShape ;
sh:targetClass hmas:ActionExecution ;
sh:property [ sh:path prov:used ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:or ( [ sh:hasValue ex:httpForm ]
[ sh:hasValue ex:coapForm ] ) ; ] ;
sh:property [ sh:path hmas:hasInput ;
sh:qualifiedValueShape ex:gripperJointShape ;
sh:qualifiedMinCount 1 ;
sh:qualifiedMaxCount 1 ] . becomes: ex:moveGripper
a sh:PropertyShape ;
sh:targetClass hmas:ActionExecution ;
sh:path prov:used ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:or ( [ sh:hasValue ex:httpForm ]
[ sh:hasValue ex:coapForm ] ) ;
sh:property [ sh:path hmas:hasInput ;
sh:qualifiedValueShape ex:gripperJointShape ;
sh:qualifiedMinCount 1 ;
sh:qualifiedMaxCount 1 ] . Do you think it is acceptable in this form? |
The latter form shouldn't be acceptable because the Other than this, and assuming that there is no second ex:moveGripper
a sh:NodeShape ;
sh:targetClass hmas:ActionExecution ;
sh:property [ sh:path prov:used ;
sh:minCount 1 ;
sh:maxCount 1 ] . ex:moveGripper
a sh:PropertyShape ;
sh:targetClass hmas:ActionExecution ;
sh:path prov:used ;
sh:minCount 1 ;
sh:maxCount 1 . |
According to the links you provided the range of sh:property
a rdf:Property ;
rdfs:label "property"@en ;
rdfs:comment "Links a shape to its property shapes."@en ;
rdfs:domain sh:Shape ;
rdfs:range sh:PropertyShape ;
rdfs:isDefinedBy sh: . According to the definition, yes, only one value is possible. But additional If there are any subtle differences, I am afraid I am not aware of them. In this case, if it is also possible to use |
Sorry, I meant that the domain of In this case, I will suggest to update the range of |
Thank you @danaivach for your quick reaction and great feedback. |
One possibility discussed at heartbeat meeting 24/10/2023 is to remove the range of |
In addition to the proposal mentioned by @FabienGandon, the Recommendations section within the scenario on the Discovery of Behavior Specification could be extended to explicitly state that the use of SHACL shapes in the scenario represents a specific implementation choice. |
@FabienGandon, @danaivach this option also addresses the issue. |
I support this (i.e., the removal of the range of :signifies together with the extension of the scenario description) but in addition propose that the comment of :signifies is then extended to reflect that "For instance, SHACL shapes (i.e., sh:Shape) can be used to specify descriptions of expected behavior executions". My point is that I don't want' to make the interactions ontology seem detached from practical deployments. |
this removal of the range is now addressed in PR #186 ; @danaivach you may want to open an issue for the extension of the scenario description |
Why is the range of
:signifies
sh:NodeShape
and notsh:Shape
?With the examples given in the motivating scenario
sh:NodeShape
,sh:Shape
andsh:PropertyShape
seem to work fine.The text was updated successfully, but these errors were encountered: