# A pressure mat under the mattress of an assisted-living apartment senses whether
# the bed is occupied: the sensing process, the sensor that implements it, the
# reading it produced at 23:14, and the bedroom it is a feature of interest in.

@prefix dul: <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#> .
@prefix smarthomefeatureofinterest: <http://ecareathome-ontology.mpi.aass.oru.se/patterns/SmartHome_FeatureOfInterest.owl#> .
@prefix smarthomeproperty: <http://ecareathome-ontology.mpi.aass.oru.se/patterns/SmartHome_Property.owl#> .
@prefix smarthomesensing: <http://ecareathome-ontology.mpi.aass.oru.se/patterns/SmartHome_Sensing.owl#> .
@prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#> .
@prefix ex: <https://w3id.org/ontoboard/example/smarthome-sensing#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

ex:Bed a owl:NamedIndividual , dul:PhysicalObject ;
    rdfs:label "the bed in the bedroom" ;
    ssn:hasProperty ex:BedOccupancy .

ex:BedOccupancy a owl:NamedIndividual , smarthomeproperty:SmartHomeProperty ;
    rdfs:label "whether someone is lying in the bed" ;
    ssn:isPropertyOf ex:Bed .

ex:BedOccupancySensing a owl:NamedIndividual , smarthomesensing:SensingProcess ;
    rdfs:label "sensing whether the bed is occupied" ;
    ssn:implementedBy ex:PressureMat ;
    dul:describes ex:Bedroom ;
    dul:hasSetting ex:PressureMatConfiguration .

ex:PressureMat a owl:NamedIndividual , smarthomesensing:SmartHomeSensor ;
    rdfs:label "the pressure mat under the mattress" ;
    ssn:hasOutput ex:BedOccupiedAt2314 ;
    dul:isPartOf ex:BedroomSensorGateway ;
    smarthomesensing:outputDataType "boolean" .

ex:BedOccupiedAt2314 a owl:NamedIndividual , smarthomesensing:SmartHomeSensorOutput ;
    rdfs:label "the reading 'bed occupied' taken at 23:14" ;
    dul:isObservableAt ex:NightOf23March ;
    dul:hasDataValue "1"^^xsd:long .

ex:PressureMatConfiguration a owl:NamedIndividual , smarthomesensing:SensorConfiguration ;
    rdfs:label "how the pressure mat was set up to sample" ;
    ssn:hasMeasurementProperty ex:OccupancyObservation , ex:OneSamplePerSecond .

ex:OccupancyObservation a owl:NamedIndividual , smarthomesensing:ObservationType ;
    rdfs:label "occupancy, observed as present or absent" .

ex:OneSamplePerSecond a owl:NamedIndividual , ssn:Frequency ;
    rdfs:label "one sample per second" .

ex:Bedroom a owl:NamedIndividual , smarthomefeatureofinterest:SmartHomeFeatureOfInterest ;
    rdfs:label "the bedroom of the apartment" .

ex:BedroomSensorGateway a owl:NamedIndividual , ssn:Device ;
    rdfs:label "the sensor gateway on the bedroom wall" .

ex:NightOf23March a owl:NamedIndividual , dul:TimeInterval ;
    rdfs:label "the night of 23 March, 22:00 to 07:00" .
