From 5ac3b21e1431f859bc6af43fd2bc710bc629756c Mon Sep 17 00:00:00 2001 From: Sebastian Kaebisch Date: Wed, 23 Dec 2020 16:53:10 +0100 Subject: [PATCH] introduce observeAllProperties and unobserveAllProperties --- index.html | 17 +- ontology/td.html | 14 +- ontology/td.ttl | 21 +- validation/ext-td-json-schema-validation.json | 8 +- validation/td-json-schema-validation.json | 8 +- validation/td-validation.ttl | 7 +- visualization/hctl.svg | 110 +++--- visualization/jsonschema.svg | 320 ++++++++-------- visualization/td.svg | 350 +++++++++--------- visualization/wotsec.svg | 296 +++++++-------- 10 files changed, 590 insertions(+), 561 deletions(-) diff --git a/index.html b/index.html index f05cab2e6..618a895cf 100644 --- a/index.html +++ b/index.html @@ -1230,8 +1230,9 @@

Core Vocabulary Definitions

"MUST">MUST be one of the following operation types: readallproperties, writeallproperties, - readmultipleproperties, or - writemultipleproperties. (See + readmultipleproperties, + writemultipleproperties, observeallproperties, or + unobserveallproperties. (See an example for an usage of form in a Thing instance.)

The data schema for each of these meta-interactions is @@ -1435,10 +1436,10 @@

Data Schema Vocabulary Definitions

information based on a default language.optionalstring descriptionsCan be used to support (human-readable) information in different languages. Also see MultiLanguage.optionalMap of string +constProvides a constant value.optionalany type unitProvides unit information that is used, e.g., in international science, engineering, and business.optionalstring or Array of string -constProvides a constant value.optionalany type oneOfUsed to ensure that the data is valid against one of the specified schemas in the array.optionalArray of DataSchema enumRestricted set of values provided as an @@ -1772,7 +1773,7 @@

Hypermedia Controls Vocabulary Definitions

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.optionalany type (one of readproperty, writeproperty, observeproperty, unobserveproperty, invokeaction, subscribeevent, unsubscribeevent, readallproperties, writeallproperties, readmultipleproperties, or writemultipleproperties)

Possible values for the contentCoding + operation.optionalany type (one of readproperty, writeproperty, observeproperty, unobserveproperty, invokeaction, subscribeevent, unsubscribeevent, readallproperties, writeallproperties, readmultipleproperties, writemultipleproperties, observeAllProperties, or unobserveAllProperties)

Possible values for the contentCoding property can be found, e.g., in the IANA HTTP content coding registry.

@@ -5451,7 +5452,9 @@

JSON Schema for TD Instance Validation

"readallproperties", "writeallproperties", "readmultipleproperties", - "writemultipleproperties" + "writemultipleproperties", + "observeallproperties", + "unobserveallproperties" ] }, { @@ -5462,7 +5465,9 @@

JSON Schema for TD Instance Validation

"readallproperties", "writeallproperties", "readmultipleproperties", - "writemultipleproperties" + "writemultipleproperties", + "observeallproperties", + "unobserveallproperties" ] } } diff --git a/ontology/td.html b/ontology/td.html index 068949256..23d191f26 100644 --- a/ontology/td.html +++ b/ontology/td.html @@ -100,7 +100,7 @@

Terminology

Axiomatization

Classes

ActionAffordance

IRI: https://www.w3.org/2019/wot/td#ActionAffordance

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).
Sub-class oftd:InteractionAffordance
In the domain oftd:hasInputSchema
td:hasOutputSchema
td:isIdempotent
td:isSafe
In the range oftd:hasActionAffordance

EventAffordance

IRI: https://www.w3.org/2019/wot/td#EventAffordance

An Interaction Affordance that describes an event source, which asynchronously pushes event data to Consumers (e.g., overheating alerts).
Sub-class oftd:InteractionAffordance
In the domain oftd:hasCancellationSchema
td:hasNotificationSchema
td:hasSubscriptionSchema
In the range oftd:hasEventAffordance

InteractionAffordance

IRI: https://www.w3.org/2019/wot/td#InteractionAffordance

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.
Super-class oftd:ActionAffordance
td:EventAffordance
td:PropertyAffordance
In the domain oftd:hasForm
td:hasUriTemplateSchema
td:name
In the range oftd:hasInteractionAffordance
-

OperationType

IRI: https://www.w3.org/2019/wot/td#OperationType

Enumeration of well-known operation types necessary to implement the WoT interaction model
Enumeration memberstd:invokeAction
td:observeProperty
td:readAllProperties
td:readMultipleProperties
td:readProperty
td:subscribeEvent
td:unobserveProperty
td:unsubscribeEvent
td:writeAllProperties
td:writeMultipleProperties
td:writeProperty
+

OperationType

IRI: https://www.w3.org/2019/wot/td#OperationType

Enumeration of well-known operation types necessary to implement the WoT interaction model
Enumeration memberstd:invokeAction
td:observeAllbserveProperties
td:observeProperty
td:readAllProperties
td:readMultipleProperties
td:readProperty
td:subscribeEvent
td:unobserveAllProperties
td:unobserveProperty
td:unsubscribeEvent
td:writeAllProperties
td:writeMultipleProperties
td:writeProperty

PropertyAffordance

IRI: https://www.w3.org/2019/wot/td#PropertyAffordance

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.
Sub-class oftd:InteractionAffordance
In the domain oftd:isObservable
In the range oftd:hasPropertyAffordance

Thing

IRI: https://www.w3.org/2019/wot/td#Thing

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.
In the domain oftd:hasForm
td:hasInteractionAffordance
td:hasSecurityConfiguration

Object Properties

hasActionAffordance

IRI: https://www.w3.org/2019/wot/td#hasActionAffordance

All Action-based interaction affordance of the Thing.
Range includestd:ActionAffordance

hasCancellationSchema

IRI: https://www.w3.org/2019/wot/td#hasCancellationSchema

Defines any data that needs to be passed to cancel a subscription, e.g., a specific message to remove a Webhook
Domain includestd:EventAffordance
@@ -118,16 +118,18 @@

Terminology

isObservable

IRI: https://www.w3.org/2019/wot/td#isObservable

A hint that indicates whether Servients hosting the Thing and Intermediaries should provide a Protocol Binding that supports the observeproperty and unobserveproperty operations for this Property.
Domain includestd:PropertyAffordance
Range includesschema:Boolean

isSafe

IRI: https://www.w3.org/2019/wot/td#isSafe

Signals if the action is safe (=true) or not. Used to signal if there is no internal state (cf. resource state) is changed when invoking an Action. In that case responses can be cached as example.
Domain includestd:ActionAffordance
Range includesschema:Boolean

name

IRI: https://www.w3.org/2019/wot/td#name

Indexing property to store entity names when serializing them in a JSON-LD @index container.
Domain includestd:InteractionAffordance
Range includesschema:Text

Named Individuals

invokeAction

IRI: https://www.w3.org/2019/wot/td#invokeAction

Operation type of forms used to read a property value
Instance oftd:OperationType
-

observeProperty

IRI: https://www.w3.org/2019/wot/td#observeProperty

Operation type of forms used to read a property value
Instance oftd:OperationType
-

readAllProperties

IRI: https://www.w3.org/2019/wot/td#readAllProperties

Operation type of forms used to read a property value
Instance oftd:OperationType
+

observeAllbserveProperties

IRI: https://www.w3.org/2019/wot/td#observeAllbserveProperties

Operation type of forms used to observe all property values
Instance oftd:OperationType
+

observeProperty

IRI: https://www.w3.org/2019/wot/td#observeProperty

Operation type of forms used to observe a property value
Instance oftd:OperationType
+

readAllProperties

IRI: https://www.w3.org/2019/wot/td#readAllProperties

Operation type of forms used to read all property values
Instance oftd:OperationType

readMultipleProperties

IRI: https://www.w3.org/2019/wot/td#readMultipleProperties

Operation type of forms used to read a property value
Instance oftd:OperationType

readProperty

IRI: https://www.w3.org/2019/wot/td#readProperty

Operation type of forms used to read a property value
Instance oftd:OperationType

subscribeEvent

IRI: https://www.w3.org/2019/wot/td#subscribeEvent

Operation type of forms used to read a property value
Instance oftd:OperationType
-

unobserveProperty

IRI: https://www.w3.org/2019/wot/td#unobserveProperty

Operation type of forms used to read a property value
Instance oftd:OperationType
+

unobserveAllProperties

IRI: https://www.w3.org/2019/wot/td#unobserveAllProperties

Operation type of forms used to unobserve all property value
Instance oftd:OperationType
+

unobserveProperty

IRI: https://www.w3.org/2019/wot/td#unobserveProperty

Operation type of forms used to unobserve a property value
Instance oftd:OperationType

unsubscribeEvent

IRI: https://www.w3.org/2019/wot/td#unsubscribeEvent

Operation type of forms used to read a property value
Instance oftd:OperationType

writeAllProperties

IRI: https://www.w3.org/2019/wot/td#writeAllProperties

Operation type of forms used to read a property value
Instance oftd:OperationType
-

writeMultipleProperties

IRI: https://www.w3.org/2019/wot/td#writeMultipleProperties

Operation type of forms used to read a property value
Instance oftd:OperationType
-

writeProperty

IRI: https://www.w3.org/2019/wot/td#writeProperty

Operation type of forms used to read a property value
Instance oftd:OperationType
+

writeMultipleProperties

IRI: https://www.w3.org/2019/wot/td#writeMultipleProperties

Operation type of forms used to write a property value
Instance oftd:OperationType
+

writeProperty

IRI: https://www.w3.org/2019/wot/td#writeProperty

Operation type of forms used to write a property value
Instance oftd:OperationType

Alignments

diff --git a/ontology/td.ttl b/ontology/td.ttl index d939a159a..290a187f9 100644 --- a/ontology/td.ttl +++ b/ontology/td.ttl @@ -191,17 +191,17 @@ :writeProperty rdf:type :OperationType ; rdfs:label "writeProperty" ; - rdfs:comment """Operation type of forms used to read a property value"""@en ; + rdfs:comment """Operation type of forms used to write a property value"""@en ; rdfs:isDefinedBy : . :observeProperty rdf:type :OperationType ; rdfs:label "observeProperty" ; - rdfs:comment """Operation type of forms used to read a property value"""@en ; + rdfs:comment """Operation type of forms used to observe a property value"""@en ; rdfs:isDefinedBy : . :unobserveProperty rdf:type :OperationType ; rdfs:label "unobserveProperty" ; - rdfs:comment """Operation type of forms used to read a property value"""@en ; + rdfs:comment """Operation type of forms used to unobserve a property value"""@en ; rdfs:isDefinedBy : . :readMultipleProperties rdf:type :OperationType ; @@ -211,12 +211,12 @@ :writeMultipleProperties rdf:type :OperationType ; rdfs:label "writeMultipleProperties" ; - rdfs:comment """Operation type of forms used to read a property value"""@en ; + rdfs:comment """Operation type of forms used to write a property value"""@en ; rdfs:isDefinedBy : . :readAllProperties rdf:type :OperationType ; rdfs:label "readAllProperties" ; - rdfs:comment """Operation type of forms used to read a property value"""@en ; + rdfs:comment """Operation type of forms used to read all property values"""@en ; rdfs:isDefinedBy : . :writeAllProperties rdf:type :OperationType ; @@ -224,6 +224,17 @@ rdfs:comment """Operation type of forms used to read a property value"""@en ; rdfs:isDefinedBy : . +:observeAllbserveProperties rdf:type :OperationType ; + rdfs:label "observeAllbserveProperties" ; + rdfs:comment """Operation type of forms used to observe all property values"""@en ; + rdfs:isDefinedBy : . + +:unobserveAllProperties rdf:type :OperationType ; + rdfs:label "unobserveAllProperties" ; + rdfs:comment """Operation type of forms used to unobserve all property value"""@en ; + rdfs:isDefinedBy : . + + :invokeAction rdf:type :OperationType ; rdfs:label "invokeAction" ; rdfs:comment """Operation type of forms used to read a property value"""@en ; diff --git a/validation/ext-td-json-schema-validation.json b/validation/ext-td-json-schema-validation.json index 2b620ec43..a3b025155 100644 --- a/validation/ext-td-json-schema-validation.json +++ b/validation/ext-td-json-schema-validation.json @@ -463,7 +463,9 @@ "readallproperties", "writeallproperties", "readmultipleproperties", - "writemultipleproperties" + "writemultipleproperties", + "observeallproperties", + "unobserveallproperties" ] }, { @@ -474,7 +476,9 @@ "readallproperties", "writeallproperties", "readmultipleproperties", - "writemultipleproperties" + "writemultipleproperties", + "observeallproperties", + "unobserveallproperties" ] } } diff --git a/validation/td-json-schema-validation.json b/validation/td-json-schema-validation.json index 4a4a1ae6a..f8c0558c9 100644 --- a/validation/td-json-schema-validation.json +++ b/validation/td-json-schema-validation.json @@ -383,7 +383,9 @@ "readallproperties", "writeallproperties", "readmultipleproperties", - "writemultipleproperties" + "writemultipleproperties", + "observeallproperties", + "unobserveallproperties" ] }, { @@ -394,7 +396,9 @@ "readallproperties", "writeallproperties", "readmultipleproperties", - "writemultipleproperties" + "writemultipleproperties", + "observeallproperties", + "unobserveallproperties" ] } } diff --git a/validation/td-validation.ttl b/validation/td-validation.ttl index 75ab502c7..d6b6ceb12 100644 --- a/validation/td-validation.ttl +++ b/validation/td-validation.ttl @@ -267,8 +267,9 @@ "MUST">MUST be one of the following operation types: readallproperties, writeallproperties, - readmultipleproperties, or - writemultipleproperties. (See + readmultipleproperties, + writemultipleproperties, observeallproperties, or + unobserveallproperties. (See an example for an usage of form in a Thing instance.)

The data schema for each of these meta-interactions is @@ -566,6 +567,8 @@ td:writeAllProperties td:readMultipleProperties td:writeMultipleProperties + td:observeAllProperties + td:unobserveAllProperties ); sh:order 1 ; ] ; diff --git a/visualization/hctl.svg b/visualization/hctl.svg index e80dc27cb..ab61e25fe 100644 --- a/visualization/hctl.svg +++ b/visualization/hctl.svg @@ -4,86 +4,86 @@ - + %3 - + ExpectedResponse - - -ExpectedResponse - - -contentType - : (Array of) -string - -(mandatory) + + +ExpectedResponse + + +contentType + : (Array of) +string + +(mandatory) Form - - -Form - - -contentType - : (Array of) -string - - -contentCoding - : (Array of) -string - - -subprotocol - : -string - - -scopes - : (Array of) -string + + +Form + + +contentType + : (Array of) +string + + +contentCoding + : (Array of) +string + + +subprotocol + : +string + + +scopes + : (Array of) +string Form->ExpectedResponse - - -response -0..1 + + +response +0..1 SecurityScheme - - -SecurityScheme + + +SecurityScheme Form->SecurityScheme - - -security -0..* + + +security +0..* Link - - -Link - - -type - : (Array of) -string + + +Link + + +type + : (Array of) +string diff --git a/visualization/jsonschema.svg b/visualization/jsonschema.svg index 2b415b62b..b3b8b8fbe 100644 --- a/visualization/jsonschema.svg +++ b/visualization/jsonschema.svg @@ -4,239 +4,239 @@ - + %3 - + ArraySchema - - -ArraySchema - - -minItems - : -unsignedInt - - -maxItems - : -unsignedInt + + +ArraySchema + + +minItems + : +unsignedInt + + +maxItems + : +unsignedInt DataSchema - - -DataSchema - - -@type - : -(Array of) -string - - -title - : Map of -string -titles - : Map of -string - - -description - : Map of -string -descriptions - : Map of -string - - -unit - : (Array of) -string - - -readOnly - : -boolean - - -writeOnly - : -boolean - - -format - : -string - - -contentEncoding - : -string - - -contentMediaType - : -string + + +DataSchema + + +@type + : +(Array of) +string + + +title + : Map of +string +titles + : Map of +string + + +description + : Map of +string +descriptions + : Map of +string + + +unit + : (Array of) +string + + +readOnly + : +boolean + + +writeOnly + : +boolean + + +format + : +string + + +contentEncoding + : +string + + +contentMediaType + : +string ArraySchema->DataSchema - - -items -0..* + + +items +0..* ArraySchema->DataSchema - - + + BooleanSchema - - -BooleanSchema + + +BooleanSchema BooleanSchema->DataSchema - - + + DataSchema->DataSchema - - -oneOf -0..* + + +oneOf +0..* IntegerSchema - - -IntegerSchema - - -multipleOf - : -integer - - -minimum - : -integer - - -maximum - : -integer + + +IntegerSchema + + +minimum + : +integer + + +maximum + : +integer + + +multipleOf + : +integer IntegerSchema->DataSchema - - + + NullSchema - - -NullSchema + + +NullSchema NullSchema->DataSchema - - + + NumberSchema - - -NumberSchema - - -minimum - : -double - - -maximum - : -double - - -multipleOf - : -double + + +NumberSchema + + +minimum + : +double + + +maximum + : +double + + +multipleOf + : +double NumberSchema->DataSchema - - + + ObjectSchema - - -ObjectSchema - - -required - : Array of -string + + +ObjectSchema + + +required + : Array of +string ObjectSchema->DataSchema - - -properties -0..* + + +properties +0..* ObjectSchema->DataSchema - - + + StringSchema - - -StringSchema - - -minLength - : -unsignedInt - - -maxLength - : -unsignedInt + + +StringSchema + + +minLength + : +unsignedInt + + +maxLength + : +unsignedInt StringSchema->DataSchema - - + + diff --git a/visualization/td.svg b/visualization/td.svg index 37c8efe85..32f415d16 100644 --- a/visualization/td.svg +++ b/visualization/td.svg @@ -4,290 +4,290 @@ - + %3 - + ActionAffordance - - -ActionAffordance - - -safe - : -boolean - - -idempotent - : -boolean + + +ActionAffordance + + +safe + : +boolean + + +idempotent + : +boolean InteractionAffordance - - -InteractionAffordance - - -title - : Map of -string -titles - : Map of -string - - -description - : Map of -string -descriptions - : Map of -string + + +InteractionAffordance + + +title + : Map of +string +titles + : Map of +string + + +description + : Map of +string +descriptions + : Map of +string ActionAffordance->InteractionAffordance - - + + DataSchema - - -DataSchema + + +DataSchema ActionAffordance->DataSchema - - -input -0..1 + + +input +0..1 ActionAffordance->DataSchema - - -output -0..1 + + +output +0..1 EventAffordance - - -EventAffordance + + +EventAffordance EventAffordance->InteractionAffordance - - + + EventAffordance->DataSchema - - -subscription -0..1 + + +subscription +0..1 EventAffordance->DataSchema - - -data -0..1 + + +data +0..1 EventAffordance->DataSchema - - -cancellation -0..1 + + +cancellation +0..1 Form - - -Form + + +Form InteractionAffordance->Form - - -forms -1..* + + +forms +1..* InteractionAffordance->DataSchema - - -uriVariables -0..* + + +uriVariables +0..* PropertyAffordance - - -PropertyAffordance - - -observable - : -boolean + + +PropertyAffordance + + +observable + : +boolean PropertyAffordance->InteractionAffordance - - + + Thing - - -Thing - - -@context - : -anyURI - or Array - -(mandatory) - - -@type - : -(Array of) -string - - -id - : -anyURI - -(mandatory) - - -title - : Map of -string - -(mandatory) -titles - : Map of -string - - -created - : -dateTime - - -description - : Map of -string -descriptions - : Map of -string - - -modified - : -dateTime + + +Thing + + +@context + : +anyURI + or Array + +(mandatory) + + +@type + : +(Array of) +string + + +id + : +anyURI + +(mandatory) + + +title + : Map of +string + +(mandatory) +titles + : Map of +string + + +created + : +dateTime + + +description + : Map of +string +descriptions + : Map of +string + + +modified + : +dateTime Thing->ActionAffordance - - -actions -0..* + + +actions +0..* Thing->EventAffordance - - -events -0..* + + +events +0..* Thing->PropertyAffordance - - -properties -0..* + + +properties +0..* VersionInfo - - -VersionInfo + + +VersionInfo Thing->VersionInfo - - -version -0..* + + +version +0..* Thing->Form - - -forms -0..* + + +forms +0..* Link - - -Link + + +Link Thing->Link - - -links -0..* + + +links +0..* SecurityScheme - - -SecurityScheme + + +SecurityScheme Thing->SecurityScheme - - -security -1..* + + +security +1..* diff --git a/visualization/wotsec.svg b/visualization/wotsec.svg index 69fea0853..d743c7c5c 100644 --- a/visualization/wotsec.svg +++ b/visualization/wotsec.svg @@ -4,226 +4,226 @@ - + %3 - + APIKeySecurityScheme - - + + APIKeySecurityScheme - - + + in - : -string - - + : +string + + name - : -string + : +string SecurityScheme - - -SecurityScheme - - -@type - : -(Array of) -string - - -description - : Map of -string -descriptions - : Map of -string + + +SecurityScheme + + +@type + : +(Array of) +string + + +description + : Map of +string +descriptions + : Map of +string APIKeySecurityScheme->SecurityScheme - - + + BasicSecurityScheme - - -BasicSecurityScheme - - -in - : -string - - -name - : -string + + +BasicSecurityScheme + + +in + : +string + + +name + : +string BasicSecurityScheme->SecurityScheme - - + + BearerSecurityScheme - - -BearerSecurityScheme - - -alg - : -string - - -authorization - : -anyURI - - -format - : -string - - -in - : -string - - -name - : -string + + +BearerSecurityScheme + + +alg + : +string + + +authorization + : +anyURI + + +format + : +string + + +in + : +string + + +name + : +string BearerSecurityScheme->SecurityScheme - - + + ComboSecurityScheme - - -ComboSecurityScheme - - -oneOf - : (Array of) -string - -(mandatory) - - -allOf - : (Array of) -string - -(mandatory) + + +ComboSecurityScheme + + +oneOf + : (Array of) +string + +(mandatory) + + +allOf + : (Array of) +string + +(mandatory) ComboSecurityScheme->SecurityScheme - - + + DigestSecurityScheme - - -DigestSecurityScheme - - -qop - : -string - - -in - : -string - - -name - : -string + + +DigestSecurityScheme + + +qop + : +string + + +in + : +string + + +name + : +string DigestSecurityScheme->SecurityScheme - - + + NoSecurityScheme - - -NoSecurityScheme + + +NoSecurityScheme NoSecurityScheme->SecurityScheme - - + + OAuth2SecurityScheme - - -OAuth2SecurityScheme - - -scopes - : (Array of) -string - - -flow - : -string - -(mandatory) + + +OAuth2SecurityScheme + + +scopes + : (Array of) +string + + +flow + : +string + +(mandatory) OAuth2SecurityScheme->SecurityScheme - - + + PSKSecurityScheme - - -PSKSecurityScheme - - -identity - : -string + + +PSKSecurityScheme + + +identity + : +string PSKSecurityScheme->SecurityScheme - - + +