{ "project": { "title": "BOT: The basics", "creator": "Mads Holten Rasmussen" }, "tabs": [ { "title": "1.0: Zones in a building", "query": "PREFIX inst: \nPREFIX bot: \n\nCONSTRUCT\nWHERE {\n ?site a bot:Site ; ?a ?b .\n ?building a bot:Building ; ?c ?d .\n ?storey a bot:Storey ; ?e ?f .\n ?space a bot:Space ; ?g ?h .\n}", "triples": "@prefix bot: .\n@prefix rdf: .\n@prefix owl: .\n@prefix rdfs: .\n@prefix inst: .\n\n##############\n# ABOX\n##############\ninst:SiteA\n\ta bot:Site ;\n\tbot:hasBuilding inst:BuildingA .\n\ninst:BuildingA\n\ta bot:Building ;\n\tbot:hasStorey inst:Storey00 , inst:Storey01 .\n\ninst:Storey00\n\ta bot:Storey ;\n\tbot:hasSpace inst:SpaceA , inst:SpaceB .\n\ninst:Storey01\n\ta bot:Storey ;\n\tbot:hasSpace inst:SpaceC , inst:SpaceD .\n\ninst:SpaceA\n\ta bot:Space .\n\ninst:SpaceB\n\ta bot:Space .\n\ninst:SpaceC\n\ta bot:Space .\n\ninst:SpaceD\n\ta bot:Space .\n\n##############\n# BOT SIMPLIFIED\n##############\nbot:Zone \n\ta owl:Class .\nbot:Site \n\ta owl:Class ;\n\trdfs:subClassOf bot:Zone .\nbot:Building \n\ta owl:Class ;\n\trdfs:subClassOf bot:Zone .\nbot:Storey \n\ta owl:Class ;\n\trdfs:subClassOf\tbot:Zone .\nbot:Space \n\ta owl:Class ;\n\trdfs:subClassOf\tbot:Zone .\nbot:Element \n\ta owl:Class .\nbot:Interface \n\ta owl:Class .\n\nbot:containsZone \n\ta owl:ObjectProperty , owl:TransitiveProperty ;\n\trdfs:domain\tbot:Zone ;\n rdfs:range bot:Zone .\nbot:adjacentZone \n\ta owl:ObjectProperty , owl:SymmetricProperty ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Zone .\nbot:hasBuilding \n\ta owl:ObjectProperty ;\n\trdfs:subPropertyOf bot:containsZone ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Building .\t\t\t\t\nbot:hasStorey \n\ta owl:ObjectProperty ;\n\trdfs:subPropertyOf bot:containsZone ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Storey .\nbot:hasSpace \n\ta owl:ObjectProperty ;\n\trdfs:subPropertyOf bot:containsZone ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Space .\t\nbot:adjacentElement \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Element .\nbot:containsElement \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Element ;\n\towl:propertyChainAxiom ( bot:containsZone bot:containsElement ) .\nbot:hostsElement \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Element ;\n rdfs:range bot:Element .\nbot:interfaceOf \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Interface .\n\n[] a owl:AllDisjointClasses ;\n owl:members\n ( \n\t\tbot:Site\n\t\tbot:Element\n bot:Space\n bot:Storey\n bot:Building ) .\n[] a owl:AllDisjointClasses ;\n owl:members\n ( \n\t\tbot:Zone\n\t\tbot:Element ) .\nbot:Interface rdfs:subClassOf [\n a owl:Restriction ;\n owl:onProperty bot:interfaceOf ;\n owl:cardinality 2\n] .", "description": "In BOT every conceptual object that can be spatially defined is a `bot:Zone`\n\nThe simple dataset in this example contains a building site, a building, two storeys and four spaces.\n\n#### ABox\n`inst:SiteA` is a `bot:Site` and it `bot:hasBuilding` `inst:BuildingA` which is a `bot:Building`. There are two storeys `inst:Storey00` and `inst:Storey01` and they are related to the building by the `bot:hasStorey` relationship.\n\n#### TBox\nThe TBox is the full BOT ontology without human readable labels and comments.\n\nOverall, BOT describes relationships between zones as illustrated below. There are 4 predefined subclasses of `bot:Zone`:\n\n* `bot:Site`\n* `bot:Building`\n* `bot:Storey`\n* `bot:Space`\n\nZones can be related to other zones using the property `bot:adjacentZone` or `bot:containsZone`. The latter is a transitive property meaning that if ` bot:containsZone ` AND ` bot:containsZone ` THEN ` bot:containsZone ` - Just like Matryoshka dolls.\n\nThere are 3 predefined subproperties of `bot:containsZone`:\n\n* `bot:hasBuilding` (range is a `bot:Building`)\n* `bot:hasStorey` (range is a `bot:Storey`)\n* `bot:hasSpace` (range is a `bot:Space`)\n\n![alt text](./assets/zones.png \"Zones can be contained in other zones transitively\")" }, { "title": "1.1: Zones in a building", "query": "PREFIX inst: \nPREFIX bot: \n\nCONSTRUCT\nWHERE {\n inst:SiteA ?p ?o\n}", "triples": "@prefix bot: .\n@prefix rdf: .\n@prefix owl: .\n@prefix rdfs: .\n@prefix inst: .\n\n##############\n# ABOX\n##############\ninst:SiteA\n\ta bot:Site ;\n\tbot:hasBuilding inst:BuildingA .\n\ninst:BuildingA\n\ta bot:Building ;\n\tbot:hasStorey inst:Storey00 , inst:Storey01 .\n\ninst:Storey00\n\ta bot:Storey ;\n\tbot:hasSpace inst:SpaceA , inst:SpaceB .\n\ninst:Storey01\n\ta bot:Storey ;\n\tbot:hasSpace inst:SpaceC , inst:SpaceD .\n\ninst:SpaceA\n\ta bot:Space .\n\ninst:SpaceB\n\ta bot:Space .\n\ninst:SpaceC\n\ta bot:Space .\n\ninst:SpaceD\n\ta bot:Space .\n\n##############\n# BOT SIMPLIFIED\n##############\nbot:Zone \n\ta owl:Class .\nbot:Site \n\ta owl:Class ;\n\trdfs:subClassOf bot:Zone .\nbot:Building \n\ta owl:Class ;\n\trdfs:subClassOf bot:Zone .\nbot:Storey \n\ta owl:Class ;\n\trdfs:subClassOf\tbot:Zone .\nbot:Space \n\ta owl:Class ;\n\trdfs:subClassOf\tbot:Zone .\nbot:Element \n\ta owl:Class .\nbot:Interface \n\ta owl:Class .\n\nbot:containsZone \n\ta owl:ObjectProperty , owl:TransitiveProperty ;\n\trdfs:domain\tbot:Zone ;\n rdfs:range bot:Zone .\nbot:adjacentZone \n\ta owl:ObjectProperty , owl:SymmetricProperty ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Zone .\nbot:hasBuilding \n\ta owl:ObjectProperty ;\n\trdfs:subPropertyOf bot:containsZone ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Building .\t\t\t\t\nbot:hasStorey \n\ta owl:ObjectProperty ;\n\trdfs:subPropertyOf bot:containsZone ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Storey .\nbot:hasSpace \n\ta owl:ObjectProperty ;\n\trdfs:subPropertyOf bot:containsZone ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Space .\t\nbot:adjacentElement \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Element .\nbot:containsElement \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Element ;\n\towl:propertyChainAxiom ( bot:containsZone bot:containsElement ) .\nbot:hostsElement \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Element ;\n rdfs:range bot:Element .\nbot:interfaceOf \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Interface .\n\n[] a owl:AllDisjointClasses ;\n owl:members\n ( \n\t\tbot:Site\n\t\tbot:Element\n bot:Space\n bot:Storey\n bot:Building ) .\n[] a owl:AllDisjointClasses ;\n owl:members\n ( \n\t\tbot:Zone\n\t\tbot:Element ) .\nbot:Interface rdfs:subClassOf [\n a owl:Restriction ;\n owl:onProperty bot:interfaceOf ;\n owl:cardinality 2\n] .", "description": "In this example, we perform a query to retrieve all properties of the `bot:Site`-instance.\n\n### Query\nPerforming the query without reasoning returns the facts about the site that are explicitly given in the dataset, but try toggeling reasoning on to find that the following information is inferred in addition:\n\n* The site is not only a `bot:Site` but also a `bot:Zone` as `bot:Site` is a sub-class of `bot:Zone`.\n* The site not only `bot:hasBuilding` `inst:BuildingA`, but it also `bot:containsZone` `inst:BuildingA` as `bot:hasBuilding` is a sub-property of `bot:containsZone`\n* Since `bot:containsZone` is a transitive property the zones contained within these zones and so on are also indirectly contained in th zone. Therefore the site not only contains `inst:BuildingA` but also `inst:Storey00` and `inst:Storey01` (that are contained in `inst:BuildingA` and the spaces that are contained in these storeys." }, { "title": "2.0: Building elements", "query": "PREFIX inst: \nPREFIX bot: \n\nCONSTRUCT\nWHERE {\n ?a bot:adjacentElement ?b .\n ?a a ?aType .\n ?b a ?bType .\n}", "triples": "@prefix bot: .\n@prefix rdf: .\n@prefix owl: .\n@prefix rdfs: .\n@prefix inst: .\n\n##############\n# ABOX\n##############\ninst:A bot:adjacentElement inst:B .\ninst:X bot:containsElement inst:Y .\n\n##############\n# BOT SIMPLIFIED\n##############\nbot:Zone \n\ta owl:Class .\nbot:Site \n\ta owl:Class ;\n\trdfs:subClassOf bot:Zone .\nbot:Building \n\ta owl:Class ;\n\trdfs:subClassOf bot:Zone .\nbot:Storey \n\ta owl:Class ;\n\trdfs:subClassOf\tbot:Zone .\nbot:Space \n\ta owl:Class ;\n\trdfs:subClassOf\tbot:Zone .\nbot:Element \n\ta owl:Class .\nbot:Interface \n\ta owl:Class .\n\nbot:containsZone \n\ta owl:ObjectProperty , owl:TransitiveProperty ;\n\trdfs:domain\tbot:Zone ;\n rdfs:range bot:Zone .\nbot:adjacentZone \n\ta owl:ObjectProperty , owl:SymmetricProperty ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Zone .\nbot:hasBuilding \n\ta owl:ObjectProperty ;\n\trdfs:subPropertyOf bot:containsZone ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Building .\t\t\t\t\nbot:hasStorey \n\ta owl:ObjectProperty ;\n\trdfs:subPropertyOf bot:containsZone ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Storey .\nbot:hasSpace \n\ta owl:ObjectProperty ;\n\trdfs:subPropertyOf bot:containsZone ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Space .\t\nbot:adjacentElement \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Element .\nbot:containsElement \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Element ;\n\towl:propertyChainAxiom ( bot:containsZone bot:containsElement ) .\nbot:hostsElement \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Element ;\n rdfs:range bot:Element .\nbot:interfaceOf \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Interface .\n\n[] a owl:AllDisjointClasses ;\n owl:members\n ( \n\t\tbot:Site\n\t\tbot:Element\n bot:Space\n bot:Storey\n bot:Building ) .\n[] a owl:AllDisjointClasses ;\n owl:members\n ( \n\t\tbot:Zone\n\t\tbot:Element ) .\nbot:Interface rdfs:subClassOf [\n a owl:Restriction ;\n owl:onProperty bot:interfaceOf ;\n owl:cardinality 2\n] .", "description": "BOT describes a building element (`bot:Element`) as a *\"Constituent of a construction entity with a characteristic technical function, form or position [12006-2, 3.4.7]\"*\n\nThe following two relationships can exist between a zone and an element according to the BOT definitions:\n\n* ` bot:containsElement `\n* ` bot:adjacentElement `\n\nBOT defines the domain of both of the two to be a `bot:Zone` and the range to be a `bot:Element`.\n\n#### ABox\nThe ABox simply contains two triples stating that `inst:A` has a `bot:adjacentElement`, `inst:B` and that `inst:X bot:containsElement inst:Y`.\n\n#### TBox\nThe TBox is the full BOT ontology without human readable labels and comments.\n\n### Query\nThe query asks for any ?a and ?b having the relationship `bot:adjacentElement` as a connection. ?a and ?b must further have a class specified.\n\nWhen performing the query without reasoning it will not return any result as inst:A and inst:B has no types explicitly assigned. The reasoner will infer these types based on the domain and range of `bot:adjacentElement`\n\nTry changing the query to ask for the `bot:containsElement` property instead to confirm that the same logigs are valid for this property.", "reasoning": true }, { "title": "2.1: Building elements", "query": "PREFIX inst: \nPREFIX bot: \n\nCONSTRUCT\nWHERE {\n ?site a bot:Site ; ?a ?b .\n}", "triples": "@prefix bot: .\n@prefix rdf: .\n@prefix owl: .\n@prefix rdfs: .\n@prefix inst: .\n\n##############\n# ABOX\n##############\ninst:SiteA\n\ta bot:Site ;\n\tbot:hasBuilding inst:BuildingA .\n\ninst:BuildingA\n\ta bot:Building ;\n\tbot:hasStorey inst:Storey00 , inst:Storey01 .\n\ninst:Storey00\n\ta bot:Storey ;\n\tbot:hasSpace inst:SpaceA , inst:SpaceB .\n\ninst:Storey01\n\ta bot:Storey ;\n\tbot:hasSpace inst:SpaceC , inst:SpaceD .\n\ninst:SpaceA\n\ta bot:Space ;\n\tbot:adjacentElement inst:Wall ;\n\tbot:containsElement inst:Chair1 , inst:Chair2 , inst:Chair3 , inst:Chair4 .\n\ninst:SpaceB\n\ta bot:Space .\n\ninst:SpaceC\n\ta bot:Space .\n\ninst:SpaceD\n\ta bot:Space .\n\ninst:Chair1\n\ta bot:Element.\ninst:Chair2\n\ta bot:Element .\ninst:Chair3\n\ta bot:Element .\ninst:Chair4\n\ta bot:Element .\n\ninst:Wall\n\ta bot:Element .\n\n##############\n# BOT SIMPLIFIED\n##############\nbot:Zone \n\ta owl:Class .\nbot:Site \n\ta owl:Class ;\n\trdfs:subClassOf bot:Zone .\nbot:Building \n\ta owl:Class ;\n\trdfs:subClassOf bot:Zone .\nbot:Storey \n\ta owl:Class ;\n\trdfs:subClassOf\tbot:Zone .\nbot:Space \n\ta owl:Class ;\n\trdfs:subClassOf\tbot:Zone .\nbot:Element \n\ta owl:Class .\nbot:Interface \n\ta owl:Class .\n\nbot:containsZone \n\ta owl:ObjectProperty , owl:TransitiveProperty ;\n\trdfs:domain\tbot:Zone ;\n rdfs:range bot:Zone .\nbot:adjacentZone \n\ta owl:ObjectProperty , owl:SymmetricProperty ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Zone .\nbot:hasBuilding \n\ta owl:ObjectProperty ;\n\trdfs:subPropertyOf bot:containsZone ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Building .\t\t\t\t\nbot:hasStorey \n\ta owl:ObjectProperty ;\n\trdfs:subPropertyOf bot:containsZone ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Storey .\nbot:hasSpace \n\ta owl:ObjectProperty ;\n\trdfs:subPropertyOf bot:containsZone ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Space .\t\nbot:adjacentElement \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Element .\nbot:containsElement \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Zone ;\n rdfs:range bot:Element ;\n\towl:propertyChainAxiom ( bot:containsZone bot:containsElement ) .\nbot:hostsElement \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Element ;\n rdfs:range bot:Element .\nbot:interfaceOf \n\ta owl:ObjectProperty ;\n\trdfs:domain bot:Interface .\n\n[] a owl:AllDisjointClasses ;\n owl:members\n ( \n\t\tbot:Site\n\t\tbot:Element\n bot:Space\n bot:Storey\n bot:Building ) .\n[] a owl:AllDisjointClasses ;\n owl:members\n ( \n\t\tbot:Zone\n\t\tbot:Element ) .\nbot:Interface rdfs:subClassOf [\n a owl:Restriction ;\n owl:onProperty bot:interfaceOf ;\n owl:cardinality 2\n] .", "description": "BOT has a property chain axiom stating that if ` bot:containsZone ` AND ` bot:containsElement ` THEN ` containsElement `.\n\n#### ABox\nSame as tab 1.0 but with the following additions:\n* `inst:SpaceA` contains 4 chairs: `inst:Chair1`, `inst:Chair2`, `inst:Chair3` and `inst:Chair4`\n* `inst:SpaceA` has an adjacent element, `inst:Wall`\n\n### Query\nThe query is the same as in tab 1.1, but the elements contained in the space contained at the storey contained in the building contained at the site are also indirectly contained in the site (because of the axiom explained above). The site will hence also contain the four chairs contained in `inst:SpaceA`.", "reasoning": true }, { "title": "3.0: Interfaces", "query": "PREFIX inst: \nPREFIX bot: \n\nCONSTRUCT\nWHERE {\n ?space a bot:Space ;\n bot:adjacentElement ?element .\n ?element a bot:Element .\n ?interface a bot:Interface ;\n bot:interfaceOf ?x .\n}", "triples": "@prefix bot: .\n@prefix rdf: .\n@prefix owl: .\n@prefix rdfs: .\n@prefix inst: .\n\n##############\n# ABOX\n##############\ninst:SpaceA12\n\ta bot:Space ;\n\tbot:adjacentElement inst:Wall22 .\ninst:ZoneB\n\ta bot:Space ;\n\tbot:adjacentElement inst:Wall22 .\ninst:Wall22\n\ta bot:Element .\n\ninst:InterfaceA\n\ta bot:Interface ;\n\tbot:interfaceOf inst:SpaceA12 , inst:Wall .\ninst:InterfaceB\n\ta bot:Interface ;\n\tbot:interfaceOf inst:ZoneB , inst:Wall .", "description": "Interfaces between two zones, an element and a zone or two elements can be quantified using the `bot:Interface` class.\n\nIn this example, interfaces are used to define heat transmission areas as an interface between a zone and it's adjacent building element.\n\n![alt text](./assets/interfaces.png \"Zones can be contained in other zones transitively\")" }, { "title": "3.1: Interfaces", "query": "PREFIX inst: \nPREFIX bot: \n\nCONSTRUCT\nWHERE {\n ?space bot:adjacentElement ?el .\n ?interface bot:interfaceOf ?x .\n ?space ?sProp ?sVal .\n ?el ?eProp ?eVal .\n ?interface ?iProp ?iVal .\n}", "triples": "@prefix bot: .\n@prefix rdf: .\n@prefix cdt: .\n@prefix owl: .\n@prefix rdfs: .\n@prefix inst: .\n@prefix props: .\n\n##############\n# ABOX\n##############\ninst:SpaceA12\n\ta bot:Space ;\n\tbot:adjacentElement inst:Wall22 ;\n\tprops:ambientDesignDryBulbTemperature \"20 Cel\"^^cdt:temperature .\ninst:ZoneB\n\ta bot:Space ;\n\tbot:adjacentElement inst:Wall22 ;\n\tprops:ambientDesignDryBulbTemperature \"20 Cel\"^^cdt:temperature .\ninst:Wall22\n\ta bot:Element ;\n\tprops:nominalHeatTransferCoefficient \"0.21 W/(m2.K)\"^^cdt:ucum .\n\ninst:InterfaceA\n\ta bot:Interface ;\n\tbot:interfaceOf inst:SpaceA12 , inst:Wall ;\n\tprops:heatExchangeSurfaceArea \"5.3 m2\"^^cdt:area .\ninst:InterfaceB\n\ta bot:Interface ;\n\tbot:interfaceOf inst:ZoneB , inst:Wall ;\n\tprops:heatExchangeSurfaceArea \"12.1 m2\"^^cdt:area .", "description": "This is a further development of the dataset from the previous tab where we used interfaces to quantify heat transmission areas. We further add properties to the zones, elements and interfaces using properties from the preliminary [props](https://raw.githubusercontent.com/w3c-lbd-cg/props/master/IFC4-output.ttl) parsed from IFC4 by Maxime Lefrançois.\n\nUnits are specified using custom datatypes for the [Unified Code of Units of Measures](http://unitsofmeasure.org/trac). Please see the [specification](https://ci.mines-stetienne.fr/lindt/v2/custom_datatypes.html#) and test its capabilities using this [playground](https://ci.mines-stetienne.fr/lindt/playground.html). CDT allows the user to query for a property in the desired unit. The following query would, for instance, return the heat transfer coefficient of all building elements in BTU/(h.ft2.K) if the SPARQL engine supported this functionality.\n\n```\nSELECT * \nWHERE {\n # get heat transfer coefficient in whatever unit given as an ucum custom datatype\n ?el props:nominalHeatTransferCoefficient ?value .\n # Convert to BTU/(h.ft2.K) by adding \"0 [Btu]/(h.[ft_i]2.K)\" to the initial value\n BIND(\"0 [Btu]/(h.[ft_i]2.K)\"^^cdt:ucum + ?value AS ?normalized )\n}\n```\n\nFor UCUM codes, please see [The Unified Code for Units of Measure code system](http://unitsofmeasure.org/ucum.html).\n\nTry the following query with the [playground tool ](https://ci.mines-stetienne.fr/lindt/playground.html) to get an idea of its capabilities when working with units:\n```\nSELECT ?u ?a ?dt ?heatLoss\nWHERE{ \n BIND(\"0.21 W/(m2.K)\"^^cdt:ucum as ?u)\n BIND(\"5.3 m2\"^^cdt:ucum as ?a)\n BIND(\"32 K\"^^cdt:ucum as ?dt)\n # normalize\n BIND(?u * ?a * ?dt AS ?heatLoss )\n}\n```" } ] }