Unverified Commit ad8f1824 authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

finalized services and operations

parent c1bdc6dc
Loading
Loading
Loading
Loading
+108 −36
Original line number Diff line number Diff line
@@ -1089,7 +1089,7 @@ saref:hasCommand
saref:hasInput a owl:ObjectProperty ;
    rdfs:label "has input"@en ;
    rdfs:comment "Links a command to one of its input parameters."@en ;
    rdfs:domain [ a owl:Class ; owl:unionOf ( saref:Command saref:CommandOfInterest ) ] ;
    rdfs:domain [ a owl:Class ; owl:unionOf ( saref:Command saref:CommandOfInterest saref:Operation ) ] ;
    skos:example "Different complementary commands can be defined for controlling a light. Turn on or off the light based on a desired state, toggle the light status of a specific light, set the luminosity level with a transition time, set the default transition time, start comfort."@en .

## A command may be described in terms of its outputs using OP saref:hasOutput. Typically, outputs are properties or states.
@@ -1097,7 +1097,7 @@ saref:hasInput a owl:ObjectProperty ;
saref:hasOutput a owl:ObjectProperty ;
    rdfs:label "has output"@en ;
    rdfs:comment "Links a command to one of its output parameters."@en ;
    rdfs:domain [ a owl:Class ; owl:unionOf ( saref:Command saref:CommandOfInterest ) ] ;
    rdfs:domain [ a owl:Class ; owl:unionOf ( saref:Command saref:CommandOfInterest saref:Operation ) ] ;
    skos:example "Different complementary commands can be defined for measuring and observing a smart home. Measure the temperature once will output the indoor temperature property; observe status of the entry door will output an open/close state."@en .


@@ -1271,47 +1271,119 @@ saref:OffCommand a owl:Class ;
saref:ProcedureExecution a owl:Class .
 

# # ETSI TS 103264 Clause 5.10: Services and Operations
# ETSI TS 103264 Clause 5.10: Services and Operations

# saref:Service a owl:Class ;
#     rdfs:subClassOf [ a owl:Restriction ;
#         owl:onProperty saref:isOfferedBy ;
#         owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
#         owl:onClass saref:Device
#         ] ,
#         [ a owl:Restriction ;
#         owl:onProperty saref:represents ;
#         owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
#         owl:onClass saref:Function
#         ] ;
#     rdfs:comment "A service is a representation of a function to a network that makes the function discoverable, registerable, remotely controllable by other devices in the network. A service can represent one or more functions. A Service is offered by a device that wants (a certain set of) its function(s) to be discoverable, registerable, remotely controllable by other devices in the network. A Service must specify the device that is offering the service and the function(s) to be represented."@en ;
#     rdfs:label "Service"@en .
## A saref:Service is a digital representation of a function in a network, making it discoverable, registerable and remotely controllable in the network.

# saref:offers a owl:ObjectProperty ;
#     rdfs:comment "Links a device and a service"@en ;
#     rdfs:domain saref:Device ;
#     rdfs:range saref:Service ;
#     rdfs:label "offers"@en .
saref:Service a owl:Class ;
    rdfs:label "Service"@en ;
    rdfs:comment "A saref:Service is a digital representation of a function in a network, making it discoverable, registerable and remotely controllable in the network."@en ;
    skos:note "Typically, a device connected to a given network offers one service for each of its functions of interest."@en ;
    skos:example "For example, a light switch can offer the service of remotely switching the lights in a home through mobile phone devices that are connected to the local network (ex:SwitchOnService class). This \"remote switching\" service represents the ex:OnOffFunction."@en .
    
# saref:isOfferedBy a owl:ObjectProperty ;
#     owl:inverseOf saref:offers ;
#     rdfs:comment "Links a service and a device that offers the service"@en ;
#     rdfs:domain saref:Service ;
#     rdfs:range saref:Device ;
#     rdfs:label "is offered by"@en .
## OP saref:represents links a service to some function or function of interest it exposes to the network.

saref:represents a owl:ObjectProperty ;
    rdfs:label "represents"@en ;
    rdfs:comment "Links a service to some function or function of interest it exposes to the network. Also links an operation to some command or command of interest it exposes to the network."@en ;
    rdfs:domain [ a owl:Class ; owl:unionOf ( saref:Service saref:Operation ) ] ;
    rdfs:range [ a owl:Class ; owl:unionOf ( saref:Function saref:FunctionOfInterest saref:Command saref:CommandOfInterest ) ] .

saref:Service
    rdfs:subClassOf [
        a owl:Restriction ; 
        owl:onProperty saref:represents ;
        owl:allValuesFrom [ a owl:Class ; owl:unionOf ( saref:Function saref:FunctionOfInterest ) ]
        ] .    

## A service represents at least one function of interest.

saref:Service
    rdfs:subClassOf [
        a owl:Restriction ; 
        owl:onProperty saref:represents ;
        owl:onClass saref:FunctionOfInterest ;
        owl:minQualifiedCardinality 1
        ] .

## OP saref:offers links a device to a service it exposes to a network. Its inverse if saref:isOfferedBy.

saref:offers a owl:ObjectProperty ;
    owl:inverseOf saref:isOfferedBy ;
    rdfs:label "offers"@en ;
    rdfs:comment "Links a device to a service it exposes to a network."@en ;
    rdfs:domain saref:Device ;
    rdfs:range saref:Service .

saref:isOfferedBy a owl:ObjectProperty , owl:FunctionalProperty ;
    owl:inverseOf saref:offers ;
    rdfs:label "is offered by"@en ;
    rdfs:comment "Links a service to the device that exposes it to a network"@en ;
    rdfs:domain saref:Service ;
    rdfs:range saref:Device .

## A service is offered by exactly one device. 

saref:Service
    rdfs:subClassOf [
        a owl:Restriction ; 
        owl:onProperty saref:isOfferedBy ;
        owl:cardinality 1
        ] .

## A saref:Operation is the means of a service to communicate in a procedure-type manner over the network (i.e. transmit data to/from other devices). It is the –machine interpretable– exposure of a –human understandable– command to a network.

saref:Operation a owl:Class ;
    rdfs:label "Operation"@en ;
    rdfs:comment "A saref:Operation is the means of a service to communicate in a procedure-type manner over the network (i.e. transmit data to/from other devices). It is the –machine interpretable– exposure of a –human understandable– command to a network."@en ;
    skos:note "Typically, a device connected to a given network offers one service for each of its functions of interest, and each service has one operation per command of interest of the function of interest it represents."@en ;
    skos:example "To turn on a light, send a CoAP PUT request with CBOR content 0xf5 (true)"@en ;
    skos:example "In the set of operations exposed by a smart light bulb on a given network, one may be dedicated to turn on and off the light and expect a boolean as input. Another one may be dedicated to set the luminosity status and expect a target luminosity level (a byte) and a transition time (encoded on two bytes)."@en ;
    skos:example "In the set of operations exposed by a smart washing machine on a given network, one may be dedicated to set the water temperature for the washing cycle, and expected as input a enumerated value. Another one may be dedicated to start, pause, or stop the washing cycle."@en .

## OP saref:represents also links an operation to some command or command of interest it exposes to the network. 

saref:Operation
    rdfs:subClassOf [
        a owl:Restriction ; 
        owl:onProperty saref:represents ;
        owl:allValuesFrom [ a owl:Class ; owl:unionOf ( saref:Command saref:CommandOfInterest ) ]
        ] .    

## An operation represents at least one command of interest.

saref:Operation
    rdfs:subClassOf [
        a owl:Restriction ; 
        owl:onProperty saref:represents ;
        owl:onClass saref:CommandOfInterest ;
        owl:minQualifiedCardinality 1
        ] .

## OP saref:hasOperation links a service to its operations. Its inverse is saref:isOperationOf.

saref:hasOperation a owl:ObjectProperty ;
    owl:inverseOf saref:isOperationOf ;
    rdfs:label "has operation"@en ;
    rdfs:comment "Links a service to one of its operations."@en ;
    rdfs:domain saref:Service ;
    rdfs:range saref:Operation .

# saref:offers # feature kinds inherit the services of their broader feature kind
#     owl:propertyChainAxiom ( skos:broader saref:offers ) .
saref:isOperationOf a owl:ObjectProperty , owl:FunctionalProperty ;
    owl:inverseOf saref:hasOperation ;
    rdfs:label "is operation of"@en ;
    rdfs:comment "Links an operation to the service it belongs to."@en ;
    rdfs:domain saref:Operation ;
    rdfs:range saref:Service .

# saref:offers # devices inherit the services of their kind
#     owl:propertyChainAxiom ( saref:hasDeviceKind saref:offers ) .
## An operation belongs to exactly one service. 

# saref:represents a owl:ObjectProperty ;
#     rdfs:comment "Links a service and a function."@en ;
#     rdfs:domain saref:Service ;
#     rdfs:range saref:Function ;
#     rdfs:label "represents"@en .
saref:Operation
    rdfs:subClassOf [
        a owl:Restriction ; 
        owl:onProperty saref:isOperationOf ;
        owl:cardinality 1
        ] .

# # ETSI TS 103264 Clause 5.11: Procedure executions