Skip to content

Commit

Permalink
Merge pull request #1232 from benfrancis/action-semantics
Browse files Browse the repository at this point in the history
Add `queryallactions` operation
  • Loading branch information
sebastiankb authored Sep 22, 2021
2 parents 37a0a29 + ca6c192 commit d2d6ce0
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 7 deletions.
1 change: 1 addition & 0 deletions context/hypermedia-context.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"unobserveallproperties": "td:unobserveAllProperties",
"invokeaction": "td:invokeAction",
"queryaction": "td:queryAction",
"queryallactions": "td:queryAllActions",
"cancelaction": "td:cancelAction",
"subscribeevent": "td:subscribeEvent",
"subscribeallevents": "td:subscribeAllEvents",
Expand Down
2 changes: 2 additions & 0 deletions context/td-context-1.1.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@
"unobserveallproperties": "td:unobserveAllProperties",
"invokeaction": "td:invokeAction",
"queryaction": "td:queryAction",
"queryallactions": "td:queryAllActions",
"cancelaction": "td:cancelAction",
"subscribeevent": "td:subscribeEvent",
"subscribeallevents": "td:subscribeAllEvents",
Expand Down Expand Up @@ -499,6 +500,7 @@
"unobserveallproperties": "td:unobserveAllProperties",
"invokeaction": "td:invokeAction",
"queryaction": "td:queryAction",
"queryallactions": "td:queryAllActions",
"cancelaction": "td:cancelAction",
"subscribeevent": "td:subscribeEvent",
"subscribeallevents": "td:subscribeAllEvents",
Expand Down
8 changes: 8 additions & 0 deletions context/td-context.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,10 @@ _:hasForm-context <http://www.w3.org/ns/json-ld#definition> _:hasForm-queryactio
_:hasForm-queryaction <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/json-ld#Mapping> .
_:hasForm-queryaction <http://www.w3.org/ns/json-ld#term> "queryaction" .
_:hasForm-queryaction <http://www.w3.org/ns/json-ld#iri> <https://www.w3.org/2019/wot/td#queryAction> .
_:hasForm-context <http://www.w3.org/ns/json-ld#definition> _:hasForm-queryallactions .
_:hasForm-queryallactions <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/json-ld#Mapping> .
_:hasForm-queryallactions <http://www.w3.org/ns/json-ld#term> "queryallactions" .
_:hasForm-queryallactions <http://www.w3.org/ns/json-ld#iri> <https://www.w3.org/2019/wot/td#queryAllActions> .
_:hasForm-context <http://www.w3.org/ns/json-ld#definition> _:hasForm-cancelaction .
_:hasForm-cancelaction <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/json-ld#Mapping> .
_:hasForm-cancelaction <http://www.w3.org/ns/json-ld#term> "cancelaction" .
Expand Down Expand Up @@ -868,6 +872,10 @@ _:hasLink-context <http://www.w3.org/ns/json-ld#definition> _:hasLink-queryactio
_:hasLink-queryaction <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/json-ld#Mapping> .
_:hasLink-queryaction <http://www.w3.org/ns/json-ld#term> "queryaction" .
_:hasLink-queryaction <http://www.w3.org/ns/json-ld#iri> <https://www.w3.org/2019/wot/td#queryAction> .
_:hasLink-context <http://www.w3.org/ns/json-ld#definition> _:hasLink-queryallactions .
_:hasLink-queryallactions <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/json-ld#Mapping> .
_:hasLink-queryallactions <http://www.w3.org/ns/json-ld#term> "queryallactions" .
_:hasLink-queryallactions <http://www.w3.org/ns/json-ld#iri> <https://www.w3.org/2019/wot/td#queryAllActions> .
_:hasLink-context <http://www.w3.org/ns/json-ld#definition> _:hasLink-cancelaction .
_:hasLink-cancelaction <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/json-ld#Mapping> .
_:hasLink-cancelaction <http://www.w3.org/ns/json-ld#term> "cancelaction" .
Expand Down
9 changes: 6 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,8 @@ <h2>Core Vocabulary Definitions</h2>
<code>writeallproperties</code>,
<code>readmultipleproperties</code>,
<code>writemultipleproperties</code>, <code>observeallproperties</code>,
<code>unobserveallproperties</code>, <code>subscribeallevents</code>, or
<code>unobserveallproperties</code>, <code>queryallactions</code>,
<code>subscribeallevents</code>, or
<code>unsubscribeallevents</code>.</span> (See
<a href="#td-forms-readall-example">an example</a> for an
usage of <code>form</code> in a Thing instance.)</p>
Expand Down Expand Up @@ -2140,7 +2141,7 @@ <h2>Hypermedia Controls Vocabulary Definitions</h2>
the correct form for the operation required. op can
be assigned one or more interaction verb(s) each
representing a semantic intention of an
operation.</td><td>optional</td><td><a href="http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a> or <a>Array</a> of <a href="http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a> (one of <code>readproperty</code>, <code>writeproperty</code>, <code>observeproperty</code>, <code>unobserveproperty</code>, <code>invokeaction</code>, <code>queryaction</code>, <code>cancelaction</code>, <code>subscribeevent</code>, <code>unsubscribeevent</code>, <code>readallproperties</code>, <code>writeallproperties</code>, <code>readmultipleproperties</code>, <code>writemultipleproperties</code>, <code>observeallproperties</code>, <code>unobserveallproperties</code>, <code>subscribeallevents</code>, or <code>unsubscribeallevents</code>)</td></tr></tbody></table><p>Possible values for the <code>contentCoding</code>
operation.</td><td>optional</td><td><a href="http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a> or <a>Array</a> of <a href="http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a> (one of <code>readproperty</code>, <code>writeproperty</code>, <code>observeproperty</code>, <code>unobserveproperty</code>, <code>invokeaction</code>, <code>queryaction</code>, <code>cancelaction</code>, <code>subscribeevent</code>, <code>unsubscribeevent</code>, <code>readallproperties</code>, <code>writeallproperties</code>, <code>readmultipleproperties</code>, <code>writemultipleproperties</code>, <code>observeallproperties</code>, <code>unobserveallproperties</code>, <code>subscribeallevents</code>, <code>unsubscribeallevents</code>, or <code>queryallactions</code>)</td></tr></tbody></table><p>Possible values for the <code>contentCoding</code>
property can be found, e.g., in the <a href=
"https://www.iana.org/assignments/http-parameters/http-parameters.xhtml#content-coding">
IANA HTTP content coding registry</a>.</p>
Expand Down Expand Up @@ -7020,6 +7021,7 @@ <h1>JSON Schema for TD Instance Validation</h1>
"writemultipleproperties",
"observeallproperties",
"unobserveallproperties",
"queryallactions",
"subscribeallevents",
"unsubscribeallevents"
]
Expand All @@ -7035,6 +7037,7 @@ <h1>JSON Schema for TD Instance Validation</h1>
"writemultipleproperties",
"observeallproperties",
"unobserveallproperties",
"queryallactions",
"subscribeallevents",
"unsubscribeallevents"
]
Expand Down Expand Up @@ -8013,7 +8016,7 @@ <h2 id="changes-from-fpwd">Changes from First Public Working Draft 24 November 2
<li>In section <a href="#form"></a>:
<ul>
<li>A new term <code>additionalResponses</code> was added. It can be used to define error responses.</li>
<li><code>queryaction</code>, <code>cancelaction</code>, <code>observeallproperties</code>, <code>unobserveallproperties</code>, <code>subscribeallevents</code> and <code>unsubscribeallevents</code> were added to the definition of <code>op</code>.</li>
<li><code>queryaction</code>, <code>cancelaction</code>, <code>observeallproperties</code>, <code>unobserveallproperties</code>, <code>queryallactions</code>, <code>subscribeallevents</code> and <code>unsubscribeallevents</code> were added to the definition of <code>op</code>.</li>
<li>Type definitions for terms <code>contentType</code>, <code>contentCoding</code>, <code>security</code>, <code>op</code> were changed.</li>
<li>A paragraph was added to describe how a Consumer can behave given multiple form choices.</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion index.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -5712,7 +5712,7 @@ <h2 id="changes-from-fpwd">Changes from First Public Working Draft 24 November 2
<li>In section <a href="#form"></a>:
<ul>
<li>A new term <code>additionalResponses</code> was added. It can be used to define error responses.</li>
<li><code>queryaction</code>, <code>cancelaction</code>, <code>observeallproperties</code>, <code>unobserveallproperties</code>, <code>subscribeallevents</code> and <code>unsubscribeallevents</code> were added to the definition of <code>op</code>.</li>
<li><code>queryaction</code>, <code>cancelaction</code>, <code>observeallproperties</code>, <code>unobserveallproperties</code>, <code>queryallactions</code>, <code>subscribeallevents</code> and <code>unsubscribeallevents</code> were added to the definition of <code>op</code>.</li>
<li>Type definitions for terms <code>contentType</code>, <code>contentCoding</code>, <code>security</code>, <code>op</code> were changed.</li>
<li>A paragraph was added to describe how a Consumer can behave given multiple form choices.</li>
</ul>
Expand Down
3 changes: 2 additions & 1 deletion ontology/td.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h2>Terminology</h2>
<section><h2>Axiomatization</h2><section><h3>Classes</h3><section id="ActionAffordance"><h4>ActionAffordance</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#ActionAffordance</code></p><span>An Interaction Affordance that allows to invoke a function of the Thing, which manipulates state (e.g., toggling a lamp on or off) or triggers a process on the Thing (e.g., dim a lamp over time).</span><table class="def"><tbody><tr><td>Sub-class of</td><td><code><a href="#InteractionAffordance">td:InteractionAffordance</a></code></td></tr><tr><td>In the domain of</td><td><code><a href="#hasInputSchema">td:hasInputSchema</a></code><br><code><a href="#hasOutputSchema">td:hasOutputSchema</a></code><br><code><a href="#isIdempotent">td:isIdempotent</a></code><br><code><a href="#isSafe">td:isSafe</a></code></td></tr><tr><td>In the range of</td><td><code><a href="#hasActionAffordance">td:hasActionAffordance</a></code></td></tr></tbody></table></section>
<section id="EventAffordance"><h4>EventAffordance</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#EventAffordance</code></p><span>An Interaction Affordance that describes an event source, which asynchronously pushes event data to Consumers (e.g., overheating alerts).</span><table class="def"><tbody><tr><td>Sub-class of</td><td><code><a href="#InteractionAffordance">td:InteractionAffordance</a></code></td></tr><tr><td>In the domain of</td><td><code><a href="#hasCancellationSchema">td:hasCancellationSchema</a></code><br><code><a href="#hasNotificationSchema">td:hasNotificationSchema</a></code><br><code><a href="#hasSubscriptionSchema">td:hasSubscriptionSchema</a></code></td></tr><tr><td>In the range of</td><td><code><a href="#hasEventAffordance">td:hasEventAffordance</a></code></td></tr></tbody></table></section>
<section id="InteractionAffordance"><h4>InteractionAffordance</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#InteractionAffordance</code></p><span>Metadata of a Thing that shows the possible choices to Consumers, thereby suggesting how Consumers may interact with the Thing. There are many types of potential affordances, but W3C WoT defines three types of Interaction Affordances: Properties, Actions, and Events.</span><table class="def"><tbody><tr><td>Super-class of</td><td><code><a href="#ActionAffordance">td:ActionAffordance</a></code><br><code><a href="#EventAffordance">td:EventAffordance</a></code><br><code><a href="#PropertyAffordance">td:PropertyAffordance</a></code></td></tr><tr><td>In the domain of</td><td><code><a href="#hasForm">td:hasForm</a></code><br><code><a href="#hasUriTemplateSchema">td:hasUriTemplateSchema</a></code><br><code><a href="#name">td:name</a></code></td></tr><tr><td>In the range of</td><td><code><a href="#hasInteractionAffordance">td:hasInteractionAffordance</a></code></td></tr></tbody></table></section>
<section id="OperationType"><h4>OperationType</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#OperationType</code></p><span>Enumeration of well-known operation types necessary to implement the WoT interaction model</span><table class="def"><tbody><tr><td>Enumeration members</td><td><code><a href="#cancelAction">td:cancelAction</a></code><br><code><a href="#invokeAction">td:invokeAction</a></code><br><code><a href="#observeAllProperties">td:observeAllProperties</a></code><br><code><a href="#observeProperty">td:observeProperty</a></code><br><code><a href="#queryAction">td:queryAction</a></code><br><code><a href="#readAllProperties">td:readAllProperties</a></code><br><code><a href="#readMultipleProperties">td:readMultipleProperties</a></code><br><code><a href="#readProperty">td:readProperty</a></code><br><code><a href="#subscribeAllEvents">td:subscribeAllEvents</a></code><br><code><a href="#subscribeEvent">td:subscribeEvent</a></code><br><code><a href="#unobserveAllProperties">td:unobserveAllProperties</a></code><br><code><a href="#unobserveProperty">td:unobserveProperty</a></code><br><code><a href="#unsubscribeAllEvents">td:unsubscribeAllEvents</a></code><br><code><a href="#unsubscribeEvent">td:unsubscribeEvent</a></code><br><code><a href="#writeAllProperties">td:writeAllProperties</a></code><br><code><a href="#writeMultipleProperties">td:writeMultipleProperties</a></code><br><code><a href="#writeProperty">td:writeProperty</a></code></td></tr></tbody></table></section>
<section id="OperationType"><h4>OperationType</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#OperationType</code></p><span>Enumeration of well-known operation types necessary to implement the WoT interaction model</span><table class="def"><tbody><tr><td>Enumeration members</td><td><code><a href="#cancelAction">td:cancelAction</a></code><br><code><a href="#invokeAction">td:invokeAction</a></code><br><code><a href="#observeAllProperties">td:observeAllProperties</a></code><br><code><a href="#observeProperty">td:observeProperty</a></code><br><code><a href="#queryAction">td:queryAction</a></code><br><code><a href="#queryAllActions">td:queryAllActions</a></code><br><code><a href="#readAllProperties">td:readAllProperties</a></code><br><code><a href="#readMultipleProperties">td:readMultipleProperties</a></code><br><code><a href="#readProperty">td:readProperty</a></code><br><code><a href="#subscribeAllEvents">td:subscribeAllEvents</a></code><br><code><a href="#subscribeEvent">td:subscribeEvent</a></code><br><code><a href="#unobserveAllProperties">td:unobserveAllProperties</a></code><br><code><a href="#unobserveProperty">td:unobserveProperty</a></code><br><code><a href="#unsubscribeAllEvents">td:unsubscribeAllEvents</a></code><br><code><a href="#unsubscribeEvent">td:unsubscribeEvent</a></code><br><code><a href="#writeAllProperties">td:writeAllProperties</a></code><br><code><a href="#writeMultipleProperties">td:writeMultipleProperties</a></code><br><code><a href="#writeProperty">td:writeProperty</a></code></td></tr></tbody></table></section>
<section id="PropertyAffordance"><h4>PropertyAffordance</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#PropertyAffordance</code></p><span>An Interaction Affordance that exposes state of the Thing. This state can then be retrieved (read) and optionally updated (write). Things can also choose to make Properties observable by pushing the new state after a change.</span><table class="def"><tbody><tr><td>Sub-class of</td><td><code><a href="#InteractionAffordance">td:InteractionAffordance</a></code></td></tr><tr><td>In the domain of</td><td><code><a href="#isObservable">td:isObservable</a></code></td></tr><tr><td>In the range of</td><td><code><a href="#hasPropertyAffordance">td:hasPropertyAffordance</a></code></td></tr></tbody></table></section>
<section id="Thing"><h4>Thing</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#Thing</code></p><span>An abstraction of a physical or a virtual entity whose metadata and interfaces are described by a WoT Thing Description, whereas a virtual entity is the composition of one or more Things.</span><table class="def"><tbody><tr><td>In the domain of</td><td><code><a href="#hasForm">td:hasForm</a></code><br><code><a href="#hasInteractionAffordance">td:hasInteractionAffordance</a></code><br><code><a href="#hasSecurityConfiguration">td:hasSecurityConfiguration</a></code></td></tr></tbody></table></section></section><section><h3>Object Properties</h3><section id="hasActionAffordance"><h4>hasActionAffordance</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#hasActionAffordance</code></p><span>All Action-based interaction affordance of the Thing.</span><table class="def"><tbody><tr><td>Range includes</td><td><code><a href="#ActionAffordance">td:ActionAffordance</a></code></td></tr></tbody></table></section>
<section id="hasCancellationSchema"><h4>hasCancellationSchema</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#hasCancellationSchema</code></p><span>Defines any data that needs to be passed to cancel a subscription, e.g., a specific message to remove a Webhook</span><table class="def"><tbody><tr><td>Domain includes</td><td><code><a href="#EventAffordance">td:EventAffordance</a></code></td></tr></tbody></table></section>
Expand All @@ -123,6 +123,7 @@ <h2>Terminology</h2>
<section id="observeAllProperties"><h4>observeAllProperties</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#observeAllProperties</code></p><span>Operation type of forms used to observe all property values</span><table class="def"><tbody><tr><td>Instance of</td><td><code><a href="#OperationType">td:OperationType</a></code></td></tr></tbody></table></section>
<section id="observeProperty"><h4>observeProperty</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#observeProperty</code></p><span>Operation type of forms used to observe a property value</span><table class="def"><tbody><tr><td>Instance of</td><td><code><a href="#OperationType">td:OperationType</a></code></td></tr></tbody></table></section>
<section id="queryAction"><h4>queryAction</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#queryAction</code></p><span>Operation type of forms used to query the status of an action</span><table class="def"><tbody><tr><td>Instance of</td><td><code><a href="#OperationType">td:OperationType</a></code></td></tr></tbody></table></section>
<section id="queryAllActions"><h4>queryAllActions</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#queryAllActions</code></p><span>Operation type of forms used to query the status of all actions</span><table class="def"><tbody><tr><td>Instance of</td><td><code><a href="#OperationType">td:OperationType</a></code></td></tr></tbody></table></section>
<section id="readAllProperties"><h4>readAllProperties</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#readAllProperties</code></p><span>Operation type of forms used to read all property values</span><table class="def"><tbody><tr><td>Instance of</td><td><code><a href="#OperationType">td:OperationType</a></code></td></tr></tbody></table></section>
<section id="readMultipleProperties"><h4>readMultipleProperties</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#readMultipleProperties</code></p><span>Operation type of forms used to read a property value</span><table class="def"><tbody><tr><td>Instance of</td><td><code><a href="#OperationType">td:OperationType</a></code></td></tr></tbody></table></section>
<section id="readProperty"><h4>readProperty</h4><p>IRI: <code>https://www.w3.org/2019/wot/td#readProperty</code></p><span>Operation type of forms used to read a property value</span><table class="def"><tbody><tr><td>Instance of</td><td><code><a href="#OperationType">td:OperationType</a></code></td></tr></tbody></table></section>
Expand Down
Loading

0 comments on commit d2d6ce0

Please sign in to comment.