Skip to content

Commit

Permalink
Merge pull request #1208 from benfrancis/action-semantics
Browse files Browse the repository at this point in the history
Add queryaction and cancelaction operations - closes #302
  • Loading branch information
sebastiankb authored Sep 15, 2021
2 parents 8e8d452 + 6cdcefb commit d6410c9
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 31 deletions.
2 changes: 2 additions & 0 deletions context/hypermedia-context.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"unobserveproperty": "td:unobserveProperty",
"unobserveallproperties": "td:unobserveAllProperties",
"invokeaction": "td:invokeAction",
"queryaction": "td:queryAction",
"cancelaction": "td:cancelAction",
"subscribeevent": "td:subscribeEvent",
"subscribeallevents": "td:subscribeAllEvents",
"unsubscribeevent": "td:unsubscribeEvent",
Expand Down
4 changes: 4 additions & 0 deletions context/td-context-1.1.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@
"unobserveproperty": "td:unobserveProperty",
"unobserveallproperties": "td:unobserveAllProperties",
"invokeaction": "td:invokeAction",
"queryaction": "td:queryAction",
"cancelaction": "td:cancelAction",
"subscribeevent": "td:subscribeEvent",
"subscribeallevents": "td:subscribeAllEvents",
"unsubscribeevent": "td:unsubscribeEvent",
Expand Down Expand Up @@ -496,6 +498,8 @@
"unobserveproperty": "td:unobserveProperty",
"unobserveallproperties": "td:unobserveAllProperties",
"invokeaction": "td:invokeAction",
"queryaction": "td:queryAction",
"cancelaction": "td:cancelAction",
"subscribeevent": "td:subscribeEvent",
"subscribeallevents": "td:subscribeAllEvents",
"unsubscribeevent": "td:unsubscribeEvent",
Expand Down
16 changes: 16 additions & 0 deletions context/td-context.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,14 @@ _:hasForm-context <http://www.w3.org/ns/json-ld#definition> _:hasForm-invokeacti
_:hasForm-invokeaction <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/json-ld#Mapping> .
_:hasForm-invokeaction <http://www.w3.org/ns/json-ld#term> "invokeaction" .
_:hasForm-invokeaction <http://www.w3.org/ns/json-ld#iri> <https://www.w3.org/2019/wot/td#invokeAction> .
_:hasForm-context <http://www.w3.org/ns/json-ld#definition> _:hasForm-queryaction .
_: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-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" .
_:hasForm-cancelaction <http://www.w3.org/ns/json-ld#iri> <https://www.w3.org/2019/wot/td#cancelAction> .
_:hasForm-context <http://www.w3.org/ns/json-ld#definition> _:hasForm-subscribeevent .
_:hasForm-subscribeevent <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/json-ld#Mapping> .
_:hasForm-subscribeevent <http://www.w3.org/ns/json-ld#term> "subscribeevent" .
Expand Down Expand Up @@ -856,6 +864,14 @@ _:hasLink-context <http://www.w3.org/ns/json-ld#definition> _:hasLink-invokeacti
_:hasLink-invokeaction <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/json-ld#Mapping> .
_:hasLink-invokeaction <http://www.w3.org/ns/json-ld#term> "invokeaction" .
_:hasLink-invokeaction <http://www.w3.org/ns/json-ld#iri> <https://www.w3.org/2019/wot/td#invokeAction> .
_:hasLink-context <http://www.w3.org/ns/json-ld#definition> _:hasLink-queryaction .
_: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-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" .
_:hasLink-cancelaction <http://www.w3.org/ns/json-ld#iri> <https://www.w3.org/2019/wot/td#cancelAction> .
_:hasLink-context <http://www.w3.org/ns/json-ld#definition> _:hasLink-subscribeevent .
_:hasLink-subscribeevent <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/json-ld#Mapping> .
_:hasLink-subscribeevent <http://www.w3.org/ns/json-ld#term> "subscribeevent" .
Expand Down
53 changes: 31 additions & 22 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,11 @@ <h2>Core Vocabulary Definitions</h2>
<span class="rfc2119-assertion" id="td-op-for-action">When a Form instance is within an
<code>ActionAffordance</code> instance, the value
assigned to op <em class="rfc2119" title="MUST">MUST</em>
be <code>invokeaction</code>.</span></p></section>
either be <code>invokeaction</code>, <code>queryaction</code>,
<code>cancelaction</code> or an
<a href="#dfn-array" class="internalDFN" data-link-type="dfn">Array</a>
containing a combination of these terms.
</span></p></section>
<section><h3><code>EventAffordance</code></h3><p>An Interaction Affordance that describes an event
source, which asynchronously pushes event data to
<a href="#dfn-consumer" class="internalDFN" data-link-type="dfn">Consumers</a> (e.g., overheating
Expand Down Expand Up @@ -2136,7 +2140,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>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>, or <code>unsubscribeallevents</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 @@ -6776,14 +6780,7 @@ <h1>JSON Schema for TD Instance Validation</h1>
"minimum": 0
},
"multipleOf": {
"oneOf": [
{
"type": "integer"
},
{
"type": "number"
}
]
"$ref": "#/definitions/multipleOfDefinition"
},
"properties": {
"additionalProperties": {
Expand Down Expand Up @@ -6815,6 +6812,18 @@ <h1>JSON Schema for TD Instance Validation</h1>
}
}
},
"multipleOfDefinition": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0
},
{
"type": "number",
"exclusiveMinimum": 0
}
]
},
"form_element_property": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -6886,15 +6895,19 @@ <h1>JSON Schema for TD Instance Validation</h1>
{
"type": "string",
"enum": [
"invokeaction"
"invokeaction",
"queryaction",
"cancelaction"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"invokeaction"
"invokeaction",
"queryaction",
"cancelaction"
]
}
}
Expand Down Expand Up @@ -7171,14 +7184,7 @@ <h1>JSON Schema for TD Instance Validation</h1>
"minimum": 0
},
"multipleOf": {
"oneOf": [
{
"type": "integer"
},
{
"type": "number"
}
]
"$ref": "#/definitions/multipleOfDefinition"
},
"properties": {
"additionalProperties": {
Expand Down Expand Up @@ -7966,7 +7972,10 @@ <h2 id="changes-from-fpwd">Changes from First Public Working Draft 24 November 2
<!-- 5.3.1.2 -->
<li>In section <a href="#interactionaffordance"></a>, the description for <code>uriVariables</code> was clarified.</li>
<!-- 5.3.1.3 -->
<li>In section <a href="#propertyaffordance"></a>, the description for <code>observable</code> was clarified.</li> <!-- 5.3.1.6 -->
<li>In section <a href="#propertyaffordance"></a>, the description for <code>observable</code> was clarified.</li>
<!-- 5.3.1.4 -->
<li>In section <a href="#actionaffordance"></a>, the allowed values of the <code>op</code> member of a <code>Form</code> were expanded to include <code>queryaction</code> and <code>cancelaction</code>.</li>
<!-- 5.3.1.6 -->
<li>In section <a href="#versioninfo"></a>, a new term <code>model</code> was added.</li>
<!-- 5.3.2.1 -->
<li>In section <a href="#dataschema"></a>:
Expand Down Expand Up @@ -8005,7 +8014,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>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>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
7 changes: 5 additions & 2 deletions index.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -5671,7 +5671,10 @@ <h2 id="changes-from-fpwd">Changes from First Public Working Draft 24 November 2
<!-- 5.3.1.2 -->
<li>In section <a href="#interactionaffordance"></a>, the description for <code>uriVariables</code> was clarified.</li>
<!-- 5.3.1.3 -->
<li>In section <a href="#propertyaffordance"></a>, the description for <code>observable</code> was clarified.</li> <!-- 5.3.1.6 -->
<li>In section <a href="#propertyaffordance"></a>, the description for <code>observable</code> was clarified.</li>
<!-- 5.3.1.4 -->
<li>In section <a href="#actionaffordance"></a>, the allowed values of the <code>op</code> member of a <code>Form</code> were expanded to include <code>queryaction</code> and <code>cancelaction</code>.</li>
<!-- 5.3.1.6 -->
<li>In section <a href="#versioninfo"></a>, a new term <code>model</code> was added.</li>
<!-- 5.3.2.1 -->
<li>In section <a href="#dataschema"></a>:
Expand Down Expand Up @@ -5710,7 +5713,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>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>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
Loading

0 comments on commit d6410c9

Please sign in to comment.