@prefix :      <http://www.w3.org/ns/tdo#> .
@prefix owl:   <http://www.w3.org/2002/07/owl#> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ns:    <http://www.w3.org/2003/06/sw-vocab-status/ns#> .
@prefix terms: <http://purl.org/dc/terms/> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix http:  <http://www.w3.org/2011/http#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vann:  <http://purl.org/vocab/vann/> .
@prefix tdo:   <http://www.w3.org/ns/tdo#> .
@prefix dc:    <http://purl.org/dc/elements/1.1/> .

tdo:Datashare_PowerState_Value_BooleanSchema
        a                tdo:BooleanSchema , owl:NamedIndividual ;
        tdo:description  "Boolean value defining if the light is on or off" ;
        tdo:name         "value" ;
        tdo:type         "boolean" .

tdo:mediaType  a      owl:DatatypeProperty ;
        rdfs:comment  "Assign underlying media type of the interaction pattern based on IANA (https://www.iana.org/assignments/media-types/media-types.xhtml)"@en ;
        rdfs:domain   tdo:Link , tdo:Form ;
        rdfs:label    "mediaType" ;
        rdfs:range    xsd:string .

tdo:BasicSecurityScheme
        a                owl:Class ;
        rdfs:subClassOf  tdo:SecurityScheme ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:string ;
                           owl:onProperty               tdo:format
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:string ;
                           owl:onProperty               tdo:encoding
                         ] ;
        rdfs:subClassOf  [ a                         owl:Restriction ;
                           owl:onDataRange           xsd:string ;
                           owl:onProperty            tdo:pname ;
                           owl:qualifiedCardinality  "1"^^xsd:nonNegativeInteger
                         ] ;
        rdfs:subClassOf  [ a                         owl:Restriction ;
                           owl:onDataRange           xsd:string ;
                           owl:onProperty            tdo:in ;
                           owl:qualifiedCardinality  "1"^^xsd:nonNegativeInteger
                         ] .

tdo:maximum  a       owl:DatatypeProperty ;
        rdfs:domain  tdo:NumberSchema ;
        rdfs:range   xsd:double .

tdo:Property  a          owl:Class ;
        rdfs:comment     "Properties expose internal state of a Thing that can be directly accessed (get) and optionally manipulated (set). In addition, Things can also choose to make Properties observable by pushing the new state (not an event) after a change; this must follow eventual consistency (also see CAP Theorem)."@en ;
        rdfs:label       "Property" ;
        rdfs:subClassOf  tdo:InteractionPattern ;
        rdfs:subClassOf  [ a                         owl:Restriction ;
                           owl:onDataRange           xsd:boolean ;
                           owl:onProperty            tdo:writable ;
                           owl:qualifiedCardinality  "1"^^xsd:nonNegativeInteger
                         ] ;
        rdfs:subClassOf  [ a                         owl:Restriction ;
                           owl:onDataRange           xsd:boolean ;
                           owl:onProperty            tdo:observable ;
                           owl:qualifiedCardinality  "1"^^xsd:nonNegativeInteger
                         ] .

tdo:Datashare_Value_ObjectSchema
        a                tdo:ObjectSchema , owl:NamedIndividual ;
        tdo:description  "This object contains the value" ;
        tdo:name         "value" ;
        tdo:properties   tdo:Datashare_PowerState_Value_BooleanSchema ;
        tdo:type         "object" .

tdo:powSe  a             tdo:BooleanSchema , owl:NamedIndividual ;
        tdo:description  "power state type" ;
        tdo:name         "powSe" ;
        tdo:type         "boolean" .

tdo:in  a            owl:DatatypeProperty ;
        rdfs:domain  tdo:BasicSecurityScheme .

tdo:description  a    owl:DatatypeProperty ;
        rdfs:comment  "Provides additional (human) readable information."@en ;
        rdfs:domain   tdo:Thing , tdo:InteractionPattern , tdo:DataSchema ;
        rdfs:label    "description" ;
        rdfs:range    xsd:string .

tdo:InteractionPattern
        a                owl:Class ;
        rdfs:comment     "Three interaction patterns are defined as subclasses: Property, Action and Event. When a concrete Property, Action or Event is defined in a Thing Description, it is called an \\\"interaction resource\\\". Interactions between Things can be as simple as one Thing accessing another Thing's data to get or (in the case the data is also writable) change representation of data such as metadata, status or mode. A Thing may also be interested in getting asynchronously notified of future changes in another Thing, or may want to initiate a process served in another Thing that may take some time to complete and monitor the progress. Interactions between Things may involve exchanges of data between them. This data can be either given as input by the client Thing, returned as output by the server Thing or both."@en ;
        rdfs:label       "InteractionPattern" ;
        rdfs:subClassOf  [ a                  owl:Restriction ;
                           owl:allValuesFrom  xsd:string ;
                           owl:onProperty     tdo:label
                         ] ;
        rdfs:subClassOf  [ a                  owl:Restriction ;
                           owl:allValuesFrom  xsd:string ;
                           owl:onProperty     tdo:description
                         ] ;
        rdfs:subClassOf  [ a                  owl:Restriction ;
                           owl:allValuesFrom  tdo:Form ;
                           owl:onProperty     tdo:forms
                         ] .

tdo:required  a      owl:DatatypeProperty ;
        rdfs:domain  tdo:ObjectSchema ;
        rdfs:range   xsd:string .

tdo:authorizationUrl  a  owl:DatatypeProperty ;
        rdfs:domain  tdo:OAuth2SecurityScheme .

tdo:type  a          owl:DatatypeProperty ;
        rdfs:domain  tdo:DataSchema ;
        rdfs:range   xsd:string .

tdo:Datashare_Device_Lamp_Hue
        a                tdo:Thing , owl:NamedIndividual ;
        tdo:description  "Lampe Hue géré via Datashare" ;
        tdo:id           "hue:LCT001@001788fffe16af9e#L3" ;
        tdo:name         "Lampe hue:LCT001@001788fffe16af9e#L3" ;
        tdo:properties   tdo:Datashare_Light_PowerState .

tdo:interactions  a  owl:ObjectProperty ;
        rdfs:domain  tdo:Thing ;
        rdfs:range   tdo:InteractionPattern .

tdo:Datashare_Light_PowerState
        a                tdo:Property , owl:NamedIndividual ;
        tdo:description  "PowerState parameter gives the state of the light (ie on or off)" ;
        tdo:forms        tdo:Datashare_Write_Light_State , tdo:Datashare_Read_Light_State ;
        tdo:label        "Power State parameter" ;
        tdo:observable   true ;
        tdo:writable     true .

tdo:encoding  a      owl:DatatypeProperty ;
        rdfs:domain  tdo:BasicSecurityScheme ;
        rdfs:range   xsd:string .

tdo:Form  a              owl:Class ;
        rdfs:comment     "Communication metadata indicating where a service can be accessed by a client application. An interaction might have more than one form."@en ;
        rdfs:label       "Form" ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:string ;
                           owl:onProperty               http:methodName
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onClass                  tdo:DataSchema ;
                           owl:onProperty               tdo:output
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:minQualifiedCardinality  "0"^^xsd:nonNegativeInteger ;
                           owl:onClass                  tdo:SecurityScheme ;
                           owl:onProperty               tdo:security
                         ] ;
        rdfs:subClassOf  [ a                         owl:Restriction ;
                           owl:onDataRange           xsd:string ;
                           owl:onProperty            tdo:rel ;
                           owl:qualifiedCardinality  "1"^^xsd:nonNegativeInteger
                         ] ;
        rdfs:subClassOf  [ a                         owl:Restriction ;
                           owl:onDataRange           xsd:anyURI ;
                           owl:onProperty            tdo:href ;
                           owl:qualifiedCardinality  "1"^^xsd:nonNegativeInteger
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:string ;
                           owl:onProperty               tdo:mediaType
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onClass                  tdo:DataSchema ;
                           owl:onProperty               tdo:input
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:minQualifiedCardinality  "0"^^xsd:nonNegativeInteger ;
                           owl:onClass                  tdo:DataSchema ;
                           owl:onProperty               tdo:input
                         ] .

tdo:Datashare_Write_LightState_Target_ObjectSchema
        a                tdo:ObjectSchema , owl:NamedIndividual ;
        tdo:description  "target parameter indicates the targeted device to be switched on/off" ;
        tdo:name         "target" ;
        tdo:properties   tdo:Datashare_Write_LightState_Target_ByUdi_ArraySchema ;
        tdo:required     "byUdi" ;
        tdo:type         "object" .

tdo:href  a           owl:FunctionalProperty , owl:DatatypeProperty ;
        rdfs:comment  "URI of the endpoint where an interaction pattern is provided"@en ;
        rdfs:domain   tdo:Link , tdo:Form ;
        rdfs:label    "href" ;
        rdfs:range    xsd:anyURI .

tdo:anchor  a         owl:DatatypeProperty ;
        rdfs:comment  "By default, the context of a link is the URL of the representation it is associated with, and is serialised as a URI. When present, the anchor parameter overrides this with another URI, such as a fragment of this resource, or a third resource (i.e., when the anchor value is an absolute URI)."@en ;
        rdfs:domain   tdo:Link ;
        rdfs:label    "anchor" .

tdo:observable  a     owl:FunctionalProperty , owl:DatatypeProperty ;
        rdfs:comment  "Indicates whether a remote servient can subscribe to (\"observe\") the Property, to receive change notifications or periodic updates (true/false)."@en ;
        rdfs:domain   tdo:Property ;
        rdfs:label    "observable" ;
        rdfs:range    xsd:boolean .

tdo:format  a        owl:DatatypeProperty ;
        rdfs:domain  tdo:BasicSecurityScheme ;
        rdfs:range   xsd:string .

tdo:toggle  a            tdo:Action , owl:NamedIndividual ;
        tdo:description  "this action switches the state of the binary switch module." ;
        tdo:forms        tdo:invokeToggleAction ;
        tdo:label        "Toggle action" .

tdo:Action  a            owl:Class ;
        rdfs:comment     "Actions offer functions of the Thing. These functions may manipulate the interal state of a Thing in a way that is not possible through setting Properties. Examples are changing internal state that is not exposed as Property, changing multiple Properties, changing Properties over time or with a process that shall not be disclosed. Actions may also be pure functions, that is, they do not use any internal state at all, e.g., for processing input data and returning the result directly."@en ;
        rdfs:label       "Action" ;
        rdfs:subClassOf  tdo:InteractionPattern ;
        rdfs:subClassOf  [ a                  owl:Restriction ;
                           owl:allValuesFrom  tdo:SecurityScheme ;
                           owl:onProperty     tdo:security
                         ] .

tdo:id  a            owl:DatatypeProperty ;
        rdfs:domain  tdo:Thing ;
        rdfs:range   xsd:string .

tdo:output  a         owl:ObjectProperty ;
        rdfs:comment  "Link to the n-ary class that allows the declaration of the data type returned by an action."@en ;
        rdfs:domain   tdo:Form ;
        rdfs:label    "output" ;
        rdfs:range    tdo:DataSchema .

tdo:Datashare_Write_LightState_ObjectSchema
        a                tdo:ObjectSchema , owl:NamedIndividual ;
        tdo:description  "Payload to write light state" ;
        tdo:properties   tdo:Datashare_Write_LightState_Target_ObjectSchema , tdo:Datashare_Write_LightState_Params_ObjectSchema ;
        tdo:required     "target" , "params" ;
        tdo:type         "object" .

[ owl:minQualifiedCardinality  "0"^^xsd:nonNegativeInteger ] .

tdo:const  a         owl:DatatypeProperty ;
        rdfs:domain  tdo:DataSchema .

tdo:StringSchema  a      owl:Class ;
        rdfs:subClassOf  tdo:DataSchema .

tdo:properties  a           owl:ObjectProperty ;
        rdfs:comment        "Keeps all Property-based interaction patterns of the Thing."@en ;
        rdfs:domain         tdo:Thing ;
        rdfs:label          "properties" ;
        rdfs:range          tdo:Property ;
        rdfs:subPropertyOf  tdo:interactions .

tdo:flow  a          owl:DatatypeProperty ;
        rdfs:domain  tdo:OAuth2SecurityScheme .

tdo:refreshUrl  a    owl:DatatypeProperty ;
        rdfs:domain  tdo:OAuth2SecurityScheme .

tdo:Datashare_Write_LightState_Output_Result_Message_StringSchema
        a                tdo:StringSchema , owl:NamedIndividual ;
        tdo:description  "Human readable message that inform if the Write Light state operation completed successfully" ;
        tdo:name         "message" ;
        tdo:type         "string" .

tdo:Datashare_Write_LightState_Output_ArrayObject
        a                tdo:ArraySchema , owl:NamedIndividual ;
        tdo:description  "Result of a Write Light State invocation" ;
        tdo:items        tdo:Datashare_Write_LightState_Output_ObjectSchema ;
        tdo:type         "array" .

tdo:Datashare_Write_LightState_Output_Device_Links_ObjectSchema
        a                owl:NamedIndividual , tdo:ObjectSchema ;
        tdo:description  "Set of links:\n - one for parent device\n - one for the targeted device itself\n - one for the connection" ;
        tdo:name         "links" ;
        tdo:properties   tdo:Datashare_Write_LightState_Output_Device_Links_Parent_StringSchema , tdo:Datashare_Write_LightState_Output_Device_Links_Connection_StringSchema , tdo:Datashare_Write_LightState_Output_Device_Links_Self_StringSchema ;
        tdo:required     "self" , "connection" , "parent" ;
        tdo:type         "object" .

tdo:scopes  a        owl:DatatypeProperty ;
        rdfs:domain  tdo:OAuth2SecurityScheme .

tdo:DatashareOauth2SecurityScheme
        a                     tdo:OAuth2SecurityScheme , owl:NamedIndividual ;
        tdo:authorizationUrl  "https://datashare.orange.com/oauth/token"^^xsd:anyURI ;
        tdo:flow              "password" ;
        tdo:refreshUrl        "https://datashare.orange.com/oauth/token"^^xsd:anyURI ;
        tdo:scopes            "delete_connection read_connection read_data_connection read_data_devices_battery_level read_data_indoor_air_co2 read_data_indoor_air_humidity read_data_indoor_air_pressure read_data_indoor_air_smoke_alert read_data_indoor_air_target_temperature read_data_indoor_air_temperature read_data_indoor_illuminance read_data_indoor_noise read_data_indoor_presence_motion read_data_indoor_presence_openings read_data_indoor_thermostat_mode read_data_indoor_thermostat_schedule read_data_indoor_water_leak read_data_lights_power_state read_data_lights_color read_data_me_activity_distance read_data_me_activity_elevation read_data_me_activity_energy read_data_me_activity_steps read_data_me_body_blood_o2 read_data_me_body_blood_pressure read_data_me_body_fat read_data_me_body_heart_rate read_data_me_body_weight read_data_me_nutrition_food read_data_me_sleep read_data_outdoor_air_humidity read_data_outdoor_air_temperature read_data_outdoor_rain_fall read_data_outdoor_wind_direction read_data_outdoor_wind_speed read_data_path read_data_plants_air_temperature read_data_plants_illuminance read_data_plants_soil_fertilizer read_data_plants_soil_moisture read_data_things_tracker_location read_data_things_tracker_temperature set_ecomode set_light set_thermostat set_trackermode" .

tdo:events  a               owl:ObjectProperty ;
        rdfs:comment        "Keeps all Event-based interaction patterns of the Thing."@en ;
        rdfs:domain         tdo:Thing ;
        rdfs:label          "events" ;
        rdfs:range          tdo:Event ;
        rdfs:subPropertyOf  tdo:interactions .

tdo:SecurityScheme  a  owl:Class ;
        rdfs:comment  "An optional security configuration defines metadata for a security mechanism to allow access to one or more resources.  More than one security configuration may be specified in which case they all need to be satisfied for access to be permitted.  Security configurations can be given at the level of a Thing, an Interaction pattern, or a Form.  In this case security configurations given at lower levels override security configurations given at higher levels.  Additional security schemes can be used beyond those defined here if an appropriate external vocabulary is included in the context.  See also Security and Privacy Considerations."@en ;
        rdfs:label    "SecurityScheme" .

ns:term_status  a  owl:AnnotationProperty .

tdo:Datashare_LightState_ObjectSchema
        a                owl:NamedIndividual , tdo:ObjectSchema ;
        tdo:description  "This payload contains light state attributes as well as non functional informations (timestamp, model, tags, metadata)." ;
        tdo:properties   tdo:Datashare_Value_ObjectSchema ;
        tdo:required     "value" , "metadata" , "timestamp" , "id" , "created" , "model" , "tags" , "streamId" ;
        tdo:type         "object" .

tdo:writePowerStateProperty
        a                tdo:Form , owl:NamedIndividual ;
        http:methodName  "PUT" ;
        tdo:format       "" ;
        tdo:href         "." ;
        tdo:input        tdo:binSh ;
        tdo:mediaType    "application/json" ;
        tdo:output       tdo:binSh ;
        tdo:rel          "writeProperty" ;
        tdo:security     tdo:oM2MBasicSecuritySchema .

tdo:Datashare_Write_LightState_Output_Device_Links_Connection_StringSchema
        a                tdo:StringSchema , owl:NamedIndividual ;
        tdo:description  "This url is the url of the Datashare connection hosting the device." ;
        tdo:name         "connection" ;
        tdo:type         "string" .

tdo:ArraySchema  a       owl:Class ;
        rdfs:subClassOf  tdo:DataSchema ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:unsignedInt ;
                           owl:onProperty               tdo:minItems
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:unsignedInt ;
                           owl:onProperty               tdo:maxItems
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onClass                  tdo:DataSchema ;
                           owl:onProperty               tdo:items
                         ] .

tdo:Datashare_Read_Light_State
        a                tdo:Form , owl:NamedIndividual ;
        http:methodName  "GET" ;
        tdo:href         "https://api.orange.com/datavenue/datashare/v2/users/me/data/timeseries/lights/power/state?filter={\n  \"metadata\": {\n    \"source\": {\"eq\": \"lifx:lifx_color_a19@d073d512491b\"}\n  }\n}&size=1"^^xsd:anyURI ;
        tdo:mediaType    "application/json"^^xsd:anyURI ;
        tdo:output       tdo:Datashare_Light_State_ArrayDataSchema ;
        tdo:rel          "readProperty" ;
        tdo:security     tdo:DatashareOauth2SecurityScheme .

tdo:minItems  a  owl:DatatypeProperty .

tdo:Datashare_Write_LightState_Output_Result_Code_NumberSchema
        a                tdo:NumberSchema , owl:NamedIndividual ;
        tdo:description  "This attribute indicates if the operation was performed successfully" ;
        tdo:name         "code" ;
        tdo:type         "number" .

tdo:Link  a              owl:Class ;
        rdfs:comment     "A Web link, as specified by IETF RFC 8288 (https://tools.ietf.org/html/rfc8288)."@en ;
        rdfs:label       "Link" ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:string ;
                           owl:onProperty               tdo:rel
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:string ;
                           owl:onProperty               tdo:mediaType
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:anyURI ;
                           owl:onProperty               tdo:anchor
                         ] ;
        rdfs:subClassOf  [ a                         owl:Restriction ;
                           owl:onDataRange           xsd:anyURI ;
                           owl:onProperty            tdo:href ;
                           owl:qualifiedCardinality  "1"^^xsd:nonNegativeInteger
                         ] .

tdo:Datashare_Write_Light_State
        a                tdo:Form , owl:NamedIndividual ;
        http:methodName  "PUT" ;
        tdo:href         "https://api.orange.com/datavenue/datashare/v2/users/me/commands/light/state" ;
        tdo:input        tdo:Datashare_Write_LightState_ObjectSchema ;
        tdo:mediaType    "application/json" ;
        tdo:rel          "writeProperty" .

tdo:links  a          owl:ObjectProperty ;
        rdfs:comment  "Provides Web links to arbitrary resources that relate to the specified Thing Description."@en ;
        rdfs:domain   tdo:Thing ;
        rdfs:label    "links" ;
        rdfs:range    tdo:Link .

tdo:rel  a            owl:DatatypeProperty ;
        rdfs:comment  "Indicates the expected result of performing the operation described by the form.\n\nFor example, the Property interaction allows get and set operations. The protocol binding may contain a form for the get operation and a different form for the set operation. The value of the \"rel\" attribute of the form indicates which form is which and allows the client to select the correct form for the oeration required"@en ;
        rdfs:domain   tdo:Link , tdo:Form ;
        rdfs:label    "rel" ;
        rdfs:range    xsd:string .

owl:minCardinality  a  owl:AnnotationProperty .

tdo:Datashare_Write_LightState_Output_Result_ObjectSchema
        a                tdo:ObjectSchema , owl:NamedIndividual ;
        tdo:description  "Result attribute describes the result of the operation (ie switch on/off)" ;
        tdo:name         "result" ;
        tdo:properties   tdo:Datashare_Write_LightState_Output_Result_Message_StringSchema , tdo:Datashare_Write_LightState_Output_Result_Code_NumberSchema ;
        tdo:required     "message" , "code" ;
        tdo:type         "object" .

tdo:label  a          owl:DatatypeProperty ;
        rdfs:comment  "Provides a label (e.g., display a text for UI representation) of the interaction pattern."@en ;
        rdfs:domain   tdo:InteractionPattern ;
        rdfs:label    "label" ;
        rdfs:range    xsd:string .

tdo:invokeToggleAction
        a              tdo:Form , owl:NamedIndividual ;
        tdo:href       "./org.onem2m.home.moduleclass.binarySwitch.toggle__toggle" ;
        tdo:mediaType  "application/json" ;
        tdo:rel        "invokeAction" ;
        tdo:security   tdo:oM2MBasicSecuritySchema .

tdo:readPowerStateProperty
        a                tdo:Form , owl:NamedIndividual ;
        http:methodName  "GET" ;
        tdo:href         "." ;
        tdo:mediaType    "application/json" ;
        tdo:output       tdo:binSh ;
        tdo:rel          "readProperty" ;
        tdo:security     tdo:oM2MBasicSecuritySchema .

tdo:items  a    owl:ObjectProperty .

tdo:oM2MBasicSecuritySchema
        a             tdo:BasicSecurityScheme , owl:NamedIndividual ;
        tdo:encoding  "none" ;
        tdo:format    "#login:#password" ;
        tdo:in        "header" ;
        tdo:pname     "X-M2M-Origin" .

tdo:security  a       owl:ObjectProperty ;
        rdfs:comment  "Set of security configurations that must all be satisfied for access to resources at or below the annotated level."@en ;
        rdfs:domain   tdo:Thing , tdo:Form , tdo:Action ;
        rdfs:label    "security" ;
        rdfs:range    tdo:SecurityScheme .

xsd:anyType  a  rdfs:Datatype .

tdo:forms  a          owl:ObjectProperty ;
        rdfs:comment  "Indicates one or more endpoints from which an interaction pattern is accessible"@en ;
        rdfs:domain   tdo:InteractionPattern ;
        rdfs:label    "forms" ;
        rdfs:range    tdo:Form .

tdo:tokenUrl  a      owl:DatatypeProperty ;
        rdfs:domain  tdo:OAuth2SecurityScheme .

tdo:powerState  a        tdo:Property , owl:NamedIndividual ;
        tdo:description  "Additional readable information." ;
        tdo:forms        tdo:writePowerStateProperty , tdo:readPowerStateProperty ;
        tdo:label        "powerState property gives the state of the light: either the light is on or off." ;
        tdo:observable   true ;
        tdo:writable     true .

tdo:    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 ;
        dc:publisher                   <https://www.w3.org/WoT/WG/> ;
        dc:title                       "Ontology model for Web of Things modified by Orange"@en ;
        terms:contributor              <mailto:victor.charpenay@siemens.com> , <http://www.oeg-upm.net/index.php/en/universitystaff/402-fserena/> ;
        terms:creator                  <http://www.garcia-castro.com/foaf.rdf#me> , <http://purl.org/net/mpoveda> ;
        terms:license                  <http://purl.org/NET/rdflicense/cc-by4.0> ;
        vann:preferredNamespacePrefix  "tdo" ;
        vann:preferredNamespaceUri     "http://www.w3.org/ns/tdo#" ;
        owl:versionInfo                "0.0.1" .

tdo:support  a        owl:DatatypeProperty ;
        rdfs:comment  "Provides information about TD maintainer (e.g., author, link or telephone number to get support, etc)."@en ;
        rdfs:domain   tdo:Thing ;
        rdfs:label    "support" ;
        rdfs:range    xsd:string .

tdo:maxItems  a  owl:DatatypeProperty .

tdo:DataSchema  a        owl:Class ;
        rdfs:comment     "A value specification (e.g. JSON schema)."@en ;
        rdfs:label       "DataSchema" ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:string ;
                           owl:onProperty               tdo:name
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:string ;
                           owl:onProperty               tdo:description
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:string ;
                           owl:onProperty               tdo:const
                         ] ;
        rdfs:subClassOf  [ a                         owl:Restriction ;
                           owl:onDataRange           xsd:string ;
                           owl:onProperty            tdo:type ;
                           owl:qualifiedCardinality  "1"^^xsd:nonNegativeInteger
                         ] ;
        rdfs:subClassOf  [ a                   owl:Restriction ;
                           owl:onProperty      tdo:enum ;
                           owl:someValuesFrom  xsd:anyType
                         ] .

tdo:Datashare_StreamId_StringSchema
        a                tdo:StringSchema , owl:NamedIndividual ;
        tdo:description  "streamId value" ;
        tdo:name         "streamId" ;
        tdo:type         "string" .

tdo:OAuth2SecurityScheme
        a                owl:Class ;
        rdfs:subClassOf  tdo:SecurityScheme ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:anyURI ;
                           owl:onProperty               tdo:tokenUrl
                         ] ;
        rdfs:subClassOf  [ a                         owl:Restriction ;
                           owl:onDataRange           xsd:anyURI ;
                           owl:onProperty            tdo:refreshUrl ;
                           owl:qualifiedCardinality  "1"^^xsd:nonNegativeInteger
                         ] ;
        rdfs:subClassOf  [ a                         owl:Restriction ;
                           owl:onDataRange           xsd:string ;
                           owl:onProperty            tdo:flow ;
                           owl:qualifiedCardinality  "1"^^xsd:nonNegativeInteger
                         ] ;
        rdfs:subClassOf  [ a                         owl:Restriction ;
                           owl:onDataRange           xsd:anyURI ;
                           owl:onProperty            tdo:authorizationUrl ;
                           owl:qualifiedCardinality  "1"^^xsd:nonNegativeInteger
                         ] ;
        rdfs:subClassOf  [ a                  owl:Restriction ;
                           owl:allValuesFrom  xsd:string ;
                           owl:onProperty     tdo:scopes
                         ] .

tdo:Datashare_Light_State_ArrayDataSchema
        a       tdo:ArraySchema , owl:NamedIndividual .

tdo:Datashare_Write_LightState_Params_ObjectSchema
        a                tdo:ObjectSchema , owl:NamedIndividual ;
        tdo:description  "params object contains \"on\" boolean attribute." ;
        tdo:name         "params" ;
        tdo:properties   tdo:Datashare_Write_LightState_Params_On_BooleanSchema ;
        tdo:required     "on" ;
        tdo:type         "object" .

tdo:Thing  a             owl:Class ;
        rdfs:comment     "Describes a physical and/or virtual Thing (may represent one or more physical and / or virtual Things) in the Web of Things context."@en ;
        rdfs:label       "Thing"@en ;
        rdfs:subClassOf  [ a                  owl:Restriction ;
                           owl:allValuesFrom  tdo:Event ;
                           owl:onProperty     tdo:events
                         ] ;
        rdfs:subClassOf  [ a                         owl:Restriction ;
                           owl:onDataRange           xsd:string ;
                           owl:onProperty            tdo:id ;
                           owl:qualifiedCardinality  "1"^^xsd:nonNegativeInteger
                         ] ;
        rdfs:subClassOf  [ a                  owl:Restriction ;
                           owl:allValuesFrom  tdo:Property ;
                           owl:onProperty     tdo:properties
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:minQualifiedCardinality  "0"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:string ;
                           owl:onProperty               tdo:description
                         ] ;
        rdfs:subClassOf  [ a                  owl:Restriction ;
                           owl:allValuesFrom  tdo:SecurityScheme ;
                           owl:onProperty     tdo:security
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:minQualifiedCardinality  "0"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:anyURI ;
                           owl:onProperty               tdo:base
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:anyURI ;
                           owl:onProperty               tdo:base
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:string ;
                           owl:onProperty               tdo:support
                         ] ;
        rdfs:subClassOf  [ a                  owl:Restriction ;
                           owl:allValuesFrom  tdo:Action ;
                           owl:onProperty     tdo:actions
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:string ;
                           owl:onProperty               tdo:description
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:minQualifiedCardinality  "0"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:string ;
                           owl:onProperty               tdo:support
                         ] ;
        rdfs:subClassOf  [ a                         owl:Restriction ;
                           owl:onDataRange           xsd:string ;
                           owl:onProperty            tdo:name ;
                           owl:qualifiedCardinality  "1"^^xsd:nonNegativeInteger
                         ] ;
        rdfs:subClassOf  [ a                  owl:Restriction ;
                           owl:allValuesFrom  tdo:Link ;
                           owl:onProperty     tdo:links
                         ] .

http:methodName  a   owl:DatatypeProperty ;
        rdfs:domain  tdo:Form .

tdo:Datashare_Write_LightState_Output_Device_Id_NumberSchema
        a                tdo:NumberSchema , owl:NamedIndividual ;
        tdo:description  "id of the device" ;
        tdo:name         "id" ;
        tdo:type         "number" .

tdo:input  a          owl:ObjectProperty ;
        rdfs:comment  "Link to the n-ary class that allows the declaration of the accepted data type of an action."@en ;
        rdfs:domain   tdo:Form ;
        rdfs:label    "input" ;
        rdfs:range    tdo:DataSchema .

tdo:Datashare_Write_LightState_Params_On_BooleanSchema
        a                tdo:BooleanSchema , owl:NamedIndividual ;
        tdo:description  "Set the new state of the light :\n - true -> switch on light\n - false -> switch off light" ;
        tdo:enum         true , false ;
        tdo:input        tdo:Datashare_Write_LightState_ObjectSchema ;
        tdo:name         "on" ;
        tdo:type         "boolean" .

tdo:Event  a             owl:Class ;
        rdfs:comment     "The Event Interaction Pattern describes event sources that asynchronously push messages. Here not state, but state transitions (events) are communicated (e.g., \"clicked\"). Events may be triggered by internal state changes that are not exposed as Properties. Events usually follow strong consistency, where messages need to be queued to ensure eventual delivery of all occured events."@en ;
        rdfs:label       "Event" ;
        rdfs:subClassOf  tdo:InteractionPattern .

tdo:enum  a          owl:DatatypeProperty ;
        rdfs:domain  tdo:DataSchema .

tdo:actions  a              owl:ObjectProperty ;
        rdfs:comment        "Keeps all Action-based interaction patterns of the Thing."@en ;
        rdfs:domain         tdo:Thing ;
        rdfs:label          "actions" ;
        rdfs:range          tdo:Action ;
        rdfs:subPropertyOf  tdo:interactions .

tdo:Datashare_Write_LightState_Output_ObjectSchema
        a                tdo:ObjectSchema , owl:NamedIndividual ;
        tdo:description  "Contains two objects:\n - device : describes the targeted device\n - result : inform about write light state operation completion." ;
        tdo:properties   tdo:Datashare_Write_LightState_Output_Device_ObjectSchema ;
        tdo:type         "object" .

tdo:Datashare_Id_StringSchema
        a                tdo:StringSchema , owl:NamedIndividual ;
        tdo:description  "Id of the data" ;
        tdo:name         "id" ;
        tdo:type         "string" .

tdo:Datashare_Write_LightState_Output_Device_Links_Parent_StringSchema
        a                tdo:StringSchema , owl:NamedIndividual ;
        tdo:description  "This link is the url of the parent device." ;
        tdo:name         "parent" ;
        tdo:type         "string" .

tdo:binSh  a             tdo:ObjectSchema , owl:NamedIndividual ;
        tdo:description  "BinarySwitch ObjectSchema" ;
        tdo:name         "hd:binSh" ;
        tdo:properties   tdo:powSe ;
        tdo:type         "object" .

tdo:ObjectSchema  a      owl:Class ;
        rdfs:subClassOf  tdo:DataSchema ;
        rdfs:subClassOf  [ a                   owl:Restriction ;
                           owl:onProperty      tdo:required ;
                           owl:someValuesFrom  xsd:string
                         ] ;
        rdfs:subClassOf  [ a                   owl:Restriction ;
                           owl:onProperty      tdo:properties ;
                           owl:someValuesFrom  tdo:DataSchema
                         ] .

owl:minQualifiedCardinality
        a       owl:AnnotationProperty .

tdo:name  a           owl:DatatypeProperty ;
        rdfs:comment  "Name of the Thing."@en ;
        rdfs:domain   tdo:Thing , tdo:DataSchema ;
        rdfs:label    "name" ;
        rdfs:range    xsd:string .

tdo:base  a           owl:DatatypeProperty ;
        rdfs:comment  "Define base URI that is valid for all defined local interaction resources. All other URIs in the TD must then be resolved using the algorithm defined in [[!RFC3986]]. This field is optional."@en ;
        rdfs:domain   tdo:Thing ;
        rdfs:label    "base"@en ;
        rdfs:range    xsd:anyURI .

tdo:BooleanSchema  a     owl:Class ;
        rdfs:subClassOf  tdo:DataSchema .

tdo:pname  a         owl:DatatypeProperty ;
        rdfs:domain  tdo:BasicSecurityScheme .

tdo:Datashare_Write_LightState_Target_ByUdi_Item_StringSchema
        a                tdo:StringSchema , owl:NamedIndividual ;
        tdo:const        "hue:LCT001@001788fffe16af9e#L3" ;
        tdo:description  "Udi of targetted devices" ;
        tdo:type         "string" .

tdo:Datashare_Write_LightState_Output_Device_ObjectSchema
        a                owl:NamedIndividual , tdo:ObjectSchema ;
        tdo:description  "Contains some infos related to a targeted device:\n - id: id of the device\n - udi of the device\n - links: some links pointing on device, parent device & connection" ;
        tdo:name         "device" ;
        tdo:properties   tdo:Datashare_Write_LightState_Output_Device_Id_NumberSchema , tdo:Datashare_Write_LightState_Output_Device_Udi_StringSchema , tdo:Datashare_Write_LightState_Output_Device_Links_ObjectSchema ;
        tdo:required     "id" , "links" , "udi" ;
        tdo:type         "object" .

tdo:Datashare_Write_LightState_Target_ByUdi_ArraySchema
        a                tdo:ArraySchema , owl:NamedIndividual ;
        tdo:description  "This array contains udis of targeted devices." ;
        tdo:items        tdo:Datashare_Write_LightState_Target_ByUdi_Item_StringSchema ;
        tdo:name         "byUdi" ;
        tdo:type         "array" .

tdo:writable  a       owl:FunctionalProperty , owl:DatatypeProperty ;
        rdfs:comment  "Boolean value that indicates whether a property is writable (=true) or not (=false)"@en ;
        rdfs:domain   tdo:Property ;
        rdfs:label    "writable" ;
        rdfs:range    xsd:boolean .

tdo:Datashare_Write_LightState_Output_Device_Links_Self_StringSchema
        a                tdo:StringSchema , owl:NamedIndividual ;
        tdo:description  "This link is the url of the device" ;
        tdo:name         "self" ;
        tdo:type         "string" .

[ owl:minCardinality  "0"^^xsd:nonNegativeInteger ] .

tdo:Datashare_Write_LightState_Output_Device_Udi_StringSchema
        a                tdo:StringSchema , owl:NamedIndividual ;
        tdo:description  "Udi of the device" ;
        tdo:name         "udi" ;
        tdo:type         "string" .

tdo:NumberSchema  a      owl:Class ;
        rdfs:subClassOf  tdo:DataSchema ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:double ;
                           owl:onProperty               tdo:minimum
                         ] ;
        rdfs:subClassOf  [ a                            owl:Restriction ;
                           owl:maxQualifiedCardinality  "1"^^xsd:nonNegativeInteger ;
                           owl:onDataRange              xsd:double ;
                           owl:onProperty               tdo:maximum
                         ] .

tdo:minimum  a       owl:DatatypeProperty ;
        rdfs:domain  tdo:NumberSchema ;
        rdfs:range   xsd:double .

tdo:ModuleBinarySwitch
        a                tdo:Thing , owl:NamedIndividual ;
        tdo:actions      tdo:toggle ;
        tdo:base         "http://iotdockreg.orange-labs.fr/~/in-cse/in-name/SDT_IPE/DEVICE_org.onem2m.home.device.deviceLight__001788fffe16af9e.SH.L3/org.onem2m.home.moduleclass.binarySwitch__MzkxNSoxMTI4MypodWU6TENUMDAxQDAwMTc4OGZmZmUxNmFmOWUjTDM.EQ." ;
        tdo:description  "binarySwitch ModuleClass of light 001788fffe16af9e.SH.L3" ;
        tdo:id           "/in-cse/fcnt-198812886" ;
        tdo:name         "ModuleBinarySwitch" ;
        tdo:properties   tdo:powerState .
