-
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
What alignement with WoT TD vocabulary? #187
Comments
Our Signifiers should be aligned with TD:Affordances :-) |
To be handled here: https://github.com/HyperAgents/hmas/blob/master/src/alignment/interaction-td.ttl Check here for a reference: https://github.com/w3c/sdw-sosa-ssn/blob/gh-pages/ssn/mappings/sosa-om-mapping.ttl |
Examples of Signifiers should be provided that are "generated" based on Interaction Affordances. The translation process and information loss should be checked. |
Generic example. hMAS resource profile of an artifact: @prefix hmas: <https://purl.org/hmas/> .
@prefix onto: <https://ci.mines-stetienne.fr/kg/ontology#> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
@prefix pto: <http://www.productontology.org/id/> .
@prefix htv: <http://www.w3.org/2011/http#> .
@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 ex: <http://example.org/> .
ex:ur5Profile a hmas:ResourceProfile;
hmas:isProfileOf ex:ur5;
hmas:exposesSignifier ex:gripperMovable .
ex:ur5 a hmas:Artifact, pto:Robotic_arm ;
hmas:isContainedIn ex:manufacturingWksp .
ex:manufacturingWksp a hmas:Workspace .
ex:gripperMovable a hmas:Signifier ;
hmas:signifies ex:moveGripperShape .
ex:moveGripperShape a sh:NodeShape;
sh:class hmas:ActionExecution ;
sh:property [
sh:path prov:used ;
sh:minCount 1;
sh:maxCount 1 ;
sh:hasValue ex:httpForm ;
] ;
sh:property [
sh:path hmas:hasInput;
sh:qualifiedValueShape ex:gripperJointShape ;
sh:qualifiedMinCount 1 ;
sh:qualifiedMaxCount 1
] .
ex:gripperJointShape a sh:NodeShape ;
sh:class onto:GripperJoint ;
sh:property [
sh:path onto:hasGripperValue ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype xs:integer
] .
ex:httpForm a hctl:Form;
htv:methodName "PUT";
hctl:hasTarget <https://api.interactions.ics.unisg.ch/leubot1/v1.3.4/gripper> ;
hctl:forContentType "application/ur5+json". hMAS resource profile of a TD thing: @prefix hmas: <https://purl.org/hmas/> .
@prefix onto: <https://ci.mines-stetienne.fr/kg/ontology#> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
@prefix pto: <http://www.productontology.org/id/> .
@prefix htv: <http://www.w3.org/2011/http#> .
@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 ex: <http://example.org/> .
@prefix td: <https://www.w3.org/2019/wot/td#> .
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
ex:ur5Profile a hmas:ResourceProfile;
hmas:isProfileOf ex:ur5;
hmas:exposesSignifier ex:gripperMovable .
ex:ur5 a td:Thing, pto:Robotic_arm ;
td:title "UR5 Robotic Arm" ;
td:hasSecurityConfiguration [ a wotsec:NoSecurityScheme ];
hmas:isContainedIn ex:manufacturingWksp .
ex:manufacturingWksp a hmas:Workspace .
ex:gripperMovable a hmas:Signifier ;
hmas:signifies ex:moveGripperShape .
ex:moveGripperShape a td:ActionAffordance ;
td:hasForm ex:httpForm ;
td:hasInputSchema ex:gripperJointShape .
ex:gripperJointShape a js:ObjectSchema, onto:GripperJointSchema ;
js:properties [ a js:IntegerSchema, onto:hasGripperValueSchema ;
js:propertyName "value"
] ;
js:required "value" .
ex:httpForm a hctl:Form;
htv:methodName "PUT";
hctl:hasTarget <https://api.interactions.ics.unisg.ch/leubot1/v1.3.4/gripper> ;
hctl:forContentType "application/ur5+json". |
Example TD thing to Example hMAS artifact and integration to an hMAS resource profile: ex:ur5 a td:Thing, pto:Robotic_arm ;
td:title "UR5 Robotic Arm" ;
td:hasSecurityConfiguration [ a wotsec:NoSecurityScheme ]. ex:ur5Profile a hmas:ResourceProfile;
hmas:isProfileOf ex:ur5.
ex:ur5 a td:Thing, pto:Robotic_arm ;
td:title "UR5 Robotic Arm" ;
td:hasSecurityConfiguration [ a wotsec:NoSecurityScheme ]. |
Example exposure of TD interaction affordance and exposure of hMAS signifier. This is the simplest approach for integrating TD Affordances and hMAS signifiers: ex:ur5 td:hasInteractionAffordance ex:affordance. ex:ur5Profile a hmas:ResourceProfile;
hmas:exposesSignifier [ a hmas:Signifier ; hmas:signifies ex:affordance ];
hmas:isProfileOf ex:ur5. |
Should a TD property affordance that is readable and writable result to two hMAS action execution shapes? ex:affordance a td:PropertyAffordance, js:IntegerSchema ;
td:name "example affordance";
td:hasForm [ a hctl:Form;
hctl:hasOperationType td:readProperty, td:writeProperty ;
hctl:hasTarget <https://api.interactions.ics.unisg.ch/example> .
] . ex:behaviorShape1 a sh:NodeShape ;
sh:class hmas:ActionExecution;
sh:property [
sh:path prov:used ;
sh:minCount 1;
sh:maxCount 1 ;
sh:hasValue ex:httpForm1 ;
] ;
sh:property [
sh:path hmas:hasInput;
sh:minCount 1;
sh:maxCount 1 ;
sh:datatype xs:integer
] .
ex:httpForm1 a hctl:Form;
hctl:hasOperationType td:writeProperty;
hctl:hasTarget <https://api.interactions.ics.unisg.ch/example> . ex:behaviorShape2 a sh:NodeShape ;
sh:class hmas:ActionExecution;
sh:property [
sh:path prov:used ;
sh:minCount 1;
sh:maxCount 1 ;
sh:hasValue ex:httpForm2 ;
] ;
sh:property [
sh:path hmas:hasOutput;
sh:minCount 1;
sh:maxCount 1 ;
sh:datatype xs:integer
] .
ex:httpForm2 a hctl:Form;
hctl:hasOperationType td:readProperty;
hctl:hasTarget <https://api.interactions.ics.unisg.ch/example> . Depending on the scenario, one could use a behavior shape that combine the above alternatives: ex:alternativeBehaviorShape a sh:NodeShape ;
sh:class hmas:ActionExecution;
sh:or (ex:behaviorShape1 ex:behaviorShape2). |
See how the js Data Schemas can be combined or mapped to SHACL Shapes. |
As discussed in another thread, this issue is open and dedicated to the alignment with the Thing Description (TD) Ontology
https://www.w3.org/2019/wot/td
The text was updated successfully, but these errors were encountered: