7.1 Semantic description of services using SAREF Ontology

The Smart Applications REFerence ontology (SAREF) is intended to enable interoperability between solutions from different providers and among various activity sectors in the Internet of Things (IoT), thus contributing to the development of the global digital market. SAREF explicitly specifies the recurring core concepts in the Smart Applications domain, the main relationships between these concepts, and axioms to constrain the usage of these concepts and relationships. SAREF is based on the fundamental principles of reuse and alignment of concepts and relationships that are defined in existing assets, modularity to allow separation and recombination of different parts of the ontology depending on specific needs, extensibility to allow further growth of the ontology, and maintainability to facilitate the process of identifying and correcting defects, accommodate new requirements, and cope with changes in (parts of) SAREF. We can use the SAREF ontology to describe the services of the washing machine and the oneM2M Base Ontology to describe the oneM2M interface for the services.

The services of any clothes washing machine are fundamentally the same regardless of which model is used. Especially in this case where we are describing the same clothes washing machine. The following RDF triples describe the services and functions of our clothes washing machine.

@prefix saref: <https://saref.etsi.org/core/> .
@prefix s4bldg: <> .
@prefix xsd: <> .
@prefix rdfs: <> .
@prefix sn: <> .
@prefix m2m: <> .

sn:WASH_XYZ_RESOURCE_ID a <http://www.XYZ.com/WashingMachines#XYZ_Cool> ;
    rdfs:comment "Very cool Washing Machine" ;
    saref:hasFunction sn:WASH_XYZ-MonitoringFunction, sn:WASH_XYZ-StartStopFunction ;
    saref:hasManufacturer  "XYZ" ;
    saref:hasService       sn:WASH_XYZ-MonitorService , sn:WASH_XYZ-SwitchOnService ;
    saref:hasState         sn:WASH_XYZ-WashingMachineStatus ;
    s4bldg:isContainedIn   sn:My_Bathroom ;
    m2m:oneM2MTargetURI    "RESOURCE_ID" ;
    m2m:hasOperation sn:WASH_XYZ-SwitchOnService_RESOURCE_ID,
                      sn:WASH_XYZ-StartStopFunction-ON_Command_RESOURCE_ID,
                      sn:WASH_XYZ-StartStopFunction-OFF_Command_RESOURCE_ID,
                      sn:WASH_XYZ-StartStopFunction-TOGGLE_Command_RESOURCE_ID,
                      sn:WASH_XYZ-MonitoringFunction-WashingMachineStatus_RESOURCE_ID .

These triples will be placed into a <semanticDescription> resource in each of the models. Notice that these triples have a token "RESOURCE_ID" in several places that will be replaced at execution time with a resource identifier or resource address related to the parent of this particular <semanticDescriptor>.