# The layout of one flat, as this pattern sees it: furniture and rooms are all spatial
# objects, and every spatial fact between them is a hasSpatialRelation edge. The pattern
# specialises that one property into the GeoSPARQL relations (sfWithin, sfTouches,
# sfContains) and the descriptive ones (nextTo, leftOf, northOf, insideOf); the comment on
# each edge below names the relation it stands for.

@prefix geo: <http://www.opengis.net/ont/geosparql#> .
@prefix geometry: <https://w3id.org/smartenvironment/patterns/geometry.owl#> .
@prefix ex: <https://w3id.org/ontoboard/example/smarthome#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

ex:Couch a owl:NamedIndividual , geometry:SpatialObject ;
    rdfs:label "the three-seat couch in the living room of flat 3B" ;
    geometry:hasSpatialRelation ex:CoffeeTable ,   # next to
        ex:LivingRoom .                            # inside of

ex:CoffeeTable a owl:NamedIndividual , geometry:SpatialObject ;
    rdfs:label "the coffee table in front of the couch" ;
    geometry:hasSpatialRelation ex:Television .    # faces, so: in front of

ex:Television a owl:NamedIndividual , geometry:SpatialObject ;
    rdfs:label "the 48-inch television on the living-room wall" ;
    geometry:hasSpatialRelation ex:LivingRoom .    # inside of

ex:LivingRoom a owl:NamedIndividual , geometry:SpatialObject ;
    rdfs:label "the living room of flat 3B" ;
    geometry:hasSpatialRelation ex:Hallway .       # shares a wall with, so: touches

ex:Hallway a owl:NamedIndividual , geometry:SpatialObject ;
    rdfs:label "the hallway joining the living room and the kitchen" ;
    geometry:hasSpatialRelation ex:Kitchen .       # touches

ex:Kitchen a owl:NamedIndividual , geometry:SpatialObject ;
    rdfs:label "the kitchen of flat 3B" .
