@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix : <https://www.w3.org/2019/wot/td#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix schema: <http://schema.org/> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .

<https://www.w3.org/2019/wot/td#>
    dc:publisher [
        schema:name "W3C Web of Things Working Group" ;
        schema:url <https://www.w3.org/WoT/WG/> ;
        a schema:Organization
    ] ;
    dc:title "Thing Description Ontology"@en ;
    dcterms:author <https://vcharpenay.link/#me> ;
    dcterms:contributor <http://maxime-lefrancois.info/me#>, <http://purl.org/net/mpoveda> ;
    dcterms:license <http://purl.org/NET/rdflicense/cc-by4.0> ;
    vann:preferredNamespacePrefix "td" ;
    vann:preferredNamespaceUri "https://www.w3.org/2019/wot/td#" ;
    a owl:Ontology ;
    rdfs:comment "This ontology aims to model the Web of Things domain according to the W3C Interest Group (http://w3c.github.io/wot/)"@en ;
    owl:versionInfo "0.9.0" .

:ActionAffordance
    a rdfs:Class, owl:Class ;
    rdfs:comment "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)."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "ActionAffordance" ;
    rdfs:subClassOf :InteractionAffordance .

:EventAffordance
    a rdfs:Class, owl:Class ;
    rdfs:comment "An Interaction Affordance that describes an event source, which asynchronously pushes event data to Consumers (e.g., overheating alerts)."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "EventAffordance" ;
    rdfs:subClassOf :InteractionAffordance .

:InteractionAffordance
    a rdfs:Class, owl:Class ;
    rdfs:comment "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."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "InteractionAffordance" .

:OperationType
    a rdfs:Class, owl:Class ;
    rdfs:comment "Enumeration of well-known operation types necessary to implement the WoT interaction model"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "OperationType" ;
    rdfs:subClassOf schema:Enumeration .

:PropertyAffordance
    a rdfs:Class, owl:Class ;
    rdfs:comment "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."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "PropertyAffordance" ;
    rdfs:subClassOf :InteractionAffordance .

:Thing
    a rdfs:Class, owl:Class ;
    rdfs:comment "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."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "Thing"@en .

:baseURI
    a owl:AnnotationProperty ;
    rdfs:comment "Define the base URI that is used for all relative URI references throughout a TD document. In TD instances, all relative URIs are resolved relative to the base URI using the algorithm defined in [RFC3986]. base does not affect the URIs used in @context and the IRIs used within Linked Data [LINKED-DATA] graphs that are relevant when semantic processing is applied to TD instances."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "baseURI" .

:cancelAction
    a :OperationType ;
    rdfs:comment "Operation type of forms used to cancel an action"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "cancelAction" .

:followsProfile
    a owl:AnnotationProperty ;
    rdfs:comment "Indicates the WoT Profile mechanisms followed by this Thing Description and the corresponding Thing implementation."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "followsProfile" .

:hasActionAffordance
    schema:rangeIncludes :ActionAffordance ;
    a owl:ObjectProperty ;
    rdfs:comment "All Action-based interaction affordance of the Thing."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "hasActionAffordance" ;
    rdfs:subPropertyOf :hasInteractionAffordance .

:hasCancellationSchema
    schema:domainIncludes :EventAffordance ;
    a owl:ObjectProperty ;
    rdfs:comment "Defines any data that needs to be passed to cancel a subscription, e.g., a specific message to remove a Webhook"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "hasCancellationSchema" .

:hasEventAffordance
    schema:rangeIncludes :EventAffordance ;
    a owl:ObjectProperty ;
    rdfs:comment "All Event-based interaction affordance of the Thing."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "hasEventAffordance" ;
    rdfs:subPropertyOf :hasInteractionAffordance .

:hasForm
    schema:domainIncludes :InteractionAffordance, :Thing ;
    schema:rangeIncludes hctl:Form ;
    a owl:ObjectProperty ;
    rdfs:comment "Set of form hypermedia controls that describe how an operation can be performed. Forms are serializations of Protocol Bindings."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "hasForm" .

:hasInputSchema
    schema:domainIncludes :ActionAffordance ;
    a owl:ObjectProperty ;
    rdfs:comment "Used to define the input data schema of the action."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "hasInputSchema" .

:hasInteractionAffordance
    schema:domainIncludes :Thing ;
    schema:rangeIncludes :InteractionAffordance ;
    a owl:ObjectProperty ;
    rdfs:comment "Offers an affordance to interact with the Thing"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "hasInteractionAffordance" .

:hasLink
    schema:rangeIncludes hctl:Link ;
    a owl:ObjectProperty ;
    rdfs:comment "Provides Web links to arbitrary resources that relate to the specified Thing Description."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "hasLink" .

:hasNotificationSchema
    schema:domainIncludes :EventAffordance ;
    a owl:ObjectProperty ;
    rdfs:comment "Defines the data schema of the Event instance messages pushed by the Thing."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "hasNotificationSchema" .

:hasOutputSchema
    schema:domainIncludes :ActionAffordance ;
    a owl:ObjectProperty ;
    rdfs:comment "Used to define the output data schema of the action."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "hasOutputSchema" .

:hasPropertyAffordance
    schema:rangeIncludes :PropertyAffordance ;
    a owl:ObjectProperty ;
    rdfs:comment "All Property-based interaction affordance of the Thing."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "hasPropertyAffordance" ;
    rdfs:subPropertyOf :hasInteractionAffordance .

:hasSecurityConfiguration
    schema:domainIncludes :Thing ;
    a owl:ObjectProperty ;
    rdfs:comment "Set of security definition names, chosen from those defined in securityDefinitions.  These must all be satisfied for access to resources.  Note: multiple values are deprecated.  Use a <a href=\"#combosecurityscheme\"><code>ComboSecurityScheme</code></a> if necessary."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "hasSecurityConfiguration" .

:hasSubscriptionSchema
    schema:domainIncludes :EventAffordance ;
    a owl:ObjectProperty ;
    rdfs:comment "Defines data that needs to be passed upon subscription, e.g., filters or message format for setting up Webhooks."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "hasSubscriptionSchema" .

:hasUriTemplateSchema
    schema:domainIncludes :InteractionAffordance ;
    a owl:ObjectProperty ;
    rdfs:comment "Define URI query template variables as collection based on schema specifications. The individual variables DataSchema cannot be an ObjectSchema or an ArraySchema."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "hasUriTemplateSchema" .

:instance
    a owl:AnnotationProperty ;
    rdfs:comment "Provides a version identicator of this TD instance."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "instance" .

:invokeAction
    a :OperationType ;
    rdfs:comment "Operation type of forms used to read a property value"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "invokeAction" .

:isIdempotent
    schema:domainIncludes :ActionAffordance ;
    schema:rangeIncludes schema:Boolean ;
    a owl:DatatypeProperty ;
    rdfs:comment "Indicates whether the action is idempotent (=true) or not. Informs whether the action can be called repeatedly with the same result, if present, based on the same input."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "isIdempotent" .

:isObservable
    schema:domainIncludes :PropertyAffordance ;
    schema:rangeIncludes schema:Boolean ;
    a owl:DatatypeProperty ;
    rdfs:comment "A hint that indicates whether Servients hosting the Thing and Intermediaries should provide a Protocol Binding that supports the <code>observeproperty</code> and <code>unobserveproperty</code> operations for this Property."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "isObservable" .

:isSafe
    schema:domainIncludes :ActionAffordance ;
    schema:rangeIncludes schema:Boolean ;
    a owl:DatatypeProperty ;
    rdfs:comment "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."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "isSafe" .

:model
    a owl:AnnotationProperty ;
    rdfs:comment "Provides a version indicator of the underlying TM."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "instance" .

:name
    schema:domainIncludes :InteractionAffordance ;
    schema:rangeIncludes schema:Text ;
    a owl:DatatypeProperty ;
    rdfs:comment "Indexing property to store entity names when serializing them in a JSON-LD @index container."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "name" .

:observeAllProperties
    a :OperationType ;
    rdfs:comment "Operation type of forms used to observe all property values"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "observeAllProperties" .

:observeProperty
    a :OperationType ;
    rdfs:comment "Operation type of forms used to observe a property value"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "observeProperty" .

:queryAction
    a :OperationType ;
    rdfs:comment "Operation type of forms used to query the status of an action"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "queryAction" .

:queryAllActions
    a :OperationType ;
    rdfs:comment "Operation type of forms used to query the status of all actions"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "queryAllActions" .

:readAllProperties
    a :OperationType ;
    rdfs:comment "Operation type of forms used to read all property values"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "readAllProperties" .

:readMultipleProperties
    a :OperationType ;
    rdfs:comment "Operation type of forms used to read a property value"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "readMultipleProperties" .

:readProperty
    a :OperationType ;
    rdfs:comment "Operation type of forms used to read a property value"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "readProperty" .

:subscribeAllEvents
    a :OperationType ;
    rdfs:comment "Operation type of forms used to subscribe to all event types"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "subscribeAllEvents" .

:subscribeEvent
    a :OperationType ;
    rdfs:comment "Operation type of forms used to read a property value"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "subscribeEvent" .

:supportContact
    a owl:AnnotationProperty ;
    rdfs:comment "Provides information about the TD maintainer as URI scheme (e.g., mailto [[RFC6068]], tel [[RFC3966]], https)."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "supportContact" ;
    rdfs:seeAlso schema:contactPoint .

:unobserveAllProperties
    a :OperationType ;
    rdfs:comment "Operation type of forms used to unobserve all property value"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "unobserveAllProperties" .

:unobserveProperty
    a :OperationType ;
    rdfs:comment "Operation type of forms used to unobserve a property value"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "unobserveProperty" .

:unsubscribeAllEvents
    a :OperationType ;
    rdfs:comment "Operation type of forms used to unsubscribe from all event types"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "unsubscribeAllEvents" .

:unsubscribeEvent
    a :OperationType ;
    rdfs:comment "Operation type of forms used to read a property value"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "unsubscribeEvent" .

:versionInfo
    a owl:AnnotationProperty ;
    rdfs:comment "Provides version information."@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "versionInfo" ;
    rdfs:seeAlso schema:version .

:writeAllProperties
    a :OperationType ;
    rdfs:comment "Operation type of forms used to read a property value"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "writeAllProperties" .

:writeMultipleProperties
    a :OperationType ;
    rdfs:comment "Operation type of forms used to write a property value"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "writeMultipleProperties" .

:writeProperty
    a :OperationType ;
    rdfs:comment "Operation type of forms used to write a property value"@en ;
    rdfs:isDefinedBy <https://www.w3.org/2019/wot/td#> ;
    rdfs:label "writeProperty" .

