diff --git a/ontologies/223p.ttl b/ontologies/223p.ttl index aa9e0c8..b3d0b16 100644 --- a/ontologies/223p.ttl +++ b/ontologies/223p.ttl @@ -1061,7 +1061,11 @@ s223:DifferentialSensor a s223:Class, rdfs:label "Differential sensor" ; rdfs:comment "A sensor that measures the difference of a quantity between any two points in the system." ; rdfs:subClassOf s223:AbstractSensor ; - sh:property [ rdfs:comment "A Differential Sensor must have different values for hasObservationLocationHigh and hasObservationLocationLow." ; + sh:property [ rdfs:comment "A Differential Sensor must be defined in terms of the QuantityKind that is being measured." ; + sh:class qudt:QuantityKind ; + sh:minCount 1 ; + sh:path ( s223:observes qudt:hasQuantityKind ) ], + [ rdfs:comment "A Differential Sensor must have different values for hasObservationLocationHigh and hasObservationLocationLow." ; sh:path s223:hasObservationLocationHigh ; sh:sparql [ a sh:SPARQLConstraint ; rdfs:comment "Ensure that the values of hasObservationLocationHigh and hasObservationLocationLow are distinct." ; @@ -1074,11 +1078,7 @@ WHERE { $this s223:hasObservationLocationLow ?low . FILTER (?high = ?low) . } -""" ] ], - [ rdfs:comment "A Differential Sensor must be defined in terms of the QuantityKind that is being measured." ; - sh:class qudt:QuantityKind ; - sh:minCount 1 ; - sh:path ( s223:observes qudt:hasQuantityKind ) ] ; +""" ] ] ; sh:xone ( [ sh:property [ rdfs:comment "A DifferentialSensor must be associated with exactly 1 of Connectable, Connection, or ConnectionPoint using the relation hasObservationLocationHigh." ; sh:class s223:Connectable ; sh:maxCount 1 ; @@ -1416,7 +1416,17 @@ s223:Filter a s223:Class, rdfs:label "Filter" ; rdfs:comment "A device that removes contaminants from gases or liquids." ; rdfs:subClassOf s223:Equipment ; - sh:property [ rdfs:comment "A filter should have one common constituent between the inlet and outlet" ; + sh:property [ rdfs:comment "A Filter shall have at least one inlet." ; + sh:minCount 1 ; + sh:path s223:hasConnectionPoint ; + sh:qualifiedMinCount 1 ; + sh:qualifiedValueShape [ sh:class s223:InletConnectionPoint ] ], + [ rdfs:comment "A Filter shall have at least one outlet." ; + sh:minCount 1 ; + sh:path s223:hasConnectionPoint ; + sh:qualifiedMinCount 1 ; + sh:qualifiedValueShape [ sh:class s223:OutletConnectionPoint ] ], + [ rdfs:comment "A filter should have one common constituent between the inlet and outlet" ; sh:path s223:hasConnectionPoint ; sh:severity sh:Warning ; sh:sparql [ a sh:SPARQLConstraint ; @@ -1442,17 +1452,7 @@ FILTER (NOT EXISTS { } } ) . } -""" ] ], - [ rdfs:comment "A Filter shall have at least one inlet." ; - sh:minCount 1 ; - sh:path s223:hasConnectionPoint ; - sh:qualifiedMinCount 1 ; - sh:qualifiedValueShape [ sh:class s223:InletConnectionPoint ] ], - [ rdfs:comment "A Filter shall have at least one outlet." ; - sh:minCount 1 ; - sh:path s223:hasConnectionPoint ; - sh:qualifiedMinCount 1 ; - sh:qualifiedValueShape [ sh:class s223:OutletConnectionPoint ] ] . +""" ] ] . s223:FlowSensor a s223:Class, sh:NodeShape ; @@ -1895,7 +1895,25 @@ s223:Pump a s223:Class, rdfs:label "Pump" ; rdfs:comment "A machine for imparting energy to a fluid, drawing a fluid into itself through an entrance port, and forcing the fluid out through an exhaust port." ; rdfs:subClassOf s223:Equipment ; - sh:property [ rdfs:comment "The non-electrical ConnectionPoints of a Pump must have compatible Media." ; + sh:property [ rdfs:comment "A Pump shall have at least one inlet using the medium Water, Oil or Refrigerant." ; + sh:minCount 1 ; + sh:path s223:hasConnectionPoint ; + sh:qualifiedMinCount 1 ; + sh:qualifiedValueShape [ sh:class s223:InletConnectionPoint ; + sh:node [ sh:or ( [ sh:property [ sh:class s223:Medium-Water ; + sh:path s223:hasMedium ] ] [ sh:property [ sh:class s223:Medium-Refrigerant ; + sh:path s223:hasMedium ] ] [ sh:property [ sh:class s223:Medium-Oil ; + sh:path s223:hasMedium ] ] ) ] ] ], + [ rdfs:comment "A Pump shall have at least one outlet using the medium Water, Oil or Refrigerant." ; + sh:minCount 1 ; + sh:path s223:hasConnectionPoint ; + sh:qualifiedMinCount 1 ; + sh:qualifiedValueShape [ sh:class s223:OutletConnectionPoint ; + sh:node [ sh:or ( [ sh:property [ sh:class s223:Medium-Water ; + sh:path s223:hasMedium ] ] [ sh:property [ sh:class s223:Medium-Refrigerant ; + sh:path s223:hasMedium ] ] [ sh:property [ sh:class s223:Medium-Oil ; + sh:path s223:hasMedium ] ] ) ] ] ], + [ rdfs:comment "The non-electrical ConnectionPoints of a Pump must have compatible Media." ; sh:path s223:hasConnectionPoint ; sh:sparql [ a sh:SPARQLConstraint ; rdfs:comment "The non-electrical ConnectionPoints of a Pump must have compatible Media." ; @@ -1915,25 +1933,7 @@ WHERE { FILTER (NOT EXISTS {?mediumb a/rdfs:subClassOf* ?mediuma}) . FILTER (NOT EXISTS {?mediuma a/rdfs:subClassOf* ?mediumb}) . } -""" ] ], - [ rdfs:comment "A Pump shall have at least one inlet using the medium Water, Oil or Refrigerant." ; - sh:minCount 1 ; - sh:path s223:hasConnectionPoint ; - sh:qualifiedMinCount 1 ; - sh:qualifiedValueShape [ sh:class s223:InletConnectionPoint ; - sh:node [ sh:or ( [ sh:property [ sh:class s223:Medium-Water ; - sh:path s223:hasMedium ] ] [ sh:property [ sh:class s223:Medium-Refrigerant ; - sh:path s223:hasMedium ] ] [ sh:property [ sh:class s223:Medium-Oil ; - sh:path s223:hasMedium ] ] ) ] ] ], - [ rdfs:comment "A Pump shall have at least one outlet using the medium Water, Oil or Refrigerant." ; - sh:minCount 1 ; - sh:path s223:hasConnectionPoint ; - sh:qualifiedMinCount 1 ; - sh:qualifiedValueShape [ sh:class s223:OutletConnectionPoint ; - sh:node [ sh:or ( [ sh:property [ sh:class s223:Medium-Water ; - sh:path s223:hasMedium ] ] [ sh:property [ sh:class s223:Medium-Refrigerant ; - sh:path s223:hasMedium ] ] [ sh:property [ sh:class s223:Medium-Oil ; - sh:path s223:hasMedium ] ] ) ] ] ] . +""" ] ] . s223:QuantifiableActuatableProperty a s223:Class, sh:NodeShape ; @@ -2434,28 +2434,22 @@ s223:inverseOf a rdf:Property ; rdfs:comment "The relation inverseOf is a modeling construct to associate relations that are inverses of one another, such as connectedTo and connectedFrom." . a owl:Ontology ; - sh:declare [ sh:namespace "http://data.ashrae.org/standard223#"^^xsd:anyURI ; - sh:prefix "s223" ], + sh:declare [ sh:namespace "http://qudt.org/schema/qudt/"^^xsd:anyURI ; + sh:prefix "qudt" ], + [ sh:namespace "http://qudt.org/vocab/quantitykind/"^^xsd:anyURI ; + sh:prefix "quantitykind" ], [ sh:namespace "http://www.w3.org/2000/01/rdf-schema#"^^xsd:anyURI ; sh:prefix "rdfs" ], [ sh:namespace "http://data.ashrae.org/standard223#"^^xsd:anyURI ; sh:prefix "s223" ], + [ sh:namespace "http://data.ashrae.org/standard223#"^^xsd:anyURI ; + sh:prefix "s223" ], [ sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; sh:prefix "rdf" ], [ sh:namespace "http://www.w3.org/2000/01/rdf-schema#"^^xsd:anyURI ; sh:prefix "rdfs" ], [ sh:namespace "http://www.w3.org/ns/shacl#"^^xsd:anyURI ; sh:prefix "sh" ], - [ sh:namespace "http://www.w3.org/2000/01/rdf-schema#"^^xsd:anyURI ; - sh:prefix "rdfs" ], - [ sh:namespace "http://data.ashrae.org/standard223#"^^xsd:anyURI ; - sh:prefix "s223" ], - [ sh:namespace "http://qudt.org/schema/qudt/"^^xsd:anyURI ; - sh:prefix "qudt" ], - [ sh:namespace "http://qudt.org/vocab/quantitykind/"^^xsd:anyURI ; - sh:prefix "quantitykind" ], - [ sh:namespace "http://data.ashrae.org/standard223#"^^xsd:anyURI ; - sh:prefix "s223" ], [ sh:namespace "http://data.ashrae.org/standard223#"^^xsd:anyURI ; sh:prefix "s223" ], [ sh:namespace "http://data.ashrae.org/standard223/1.0/vocab/role#"^^xsd:anyURI ; @@ -2468,8 +2462,14 @@ s223:inverseOf a rdf:Property ; sh:prefix "rdfs" ], [ sh:namespace "http://data.ashrae.org/standard223#"^^xsd:anyURI ; sh:prefix "s223" ], + [ sh:namespace "http://www.w3.org/2000/01/rdf-schema#"^^xsd:anyURI ; + sh:prefix "rdfs" ], + [ sh:namespace "http://data.ashrae.org/standard223#"^^xsd:anyURI ; + sh:prefix "s223" ], [ sh:namespace "http://qudt.org/schema/qudt/"^^xsd:anyURI ; - sh:prefix "qudt" ] . + sh:prefix "qudt" ], + [ sh:namespace "http://data.ashrae.org/standard223#"^^xsd:anyURI ; + sh:prefix "s223" ] . bacnet:device-identifier a rdf:Property ; rdfs:label "Device Identifier" ; @@ -2614,7 +2614,13 @@ s223:HeatExchanger a s223:Class, rdfs:label "Heat exchanger" ; rdfs:comment "A component intended to transfer heat from one medium to another while keeping the two media separate" ; rdfs:subClassOf s223:Equipment ; - sh:property [ rdfs:comment "Heat Exchangers should have the same number of non-electrical inlet and outlet connection points." ; + sh:property [ rdfs:comment "A heat exchanger shall have at least 4 connection points." ; + sh:minCount 4 ; + sh:path s223:hasConnectionPoint ], + [ rdfs:comment "If the relation hasRole is present it must associate the HeatExchanger with a EnumerationKind-Role." ; + sh:class s223:EnumerationKind-Role ; + sh:path s223:hasRole ], + [ rdfs:comment "Heat Exchangers should have the same number of non-electrical inlet and outlet connection points." ; sh:path s223:hasConnectionPoint ; sh:severity sh:Warning ; sh:sparql [ a sh:SPARQLConstraint ; @@ -2650,13 +2656,7 @@ GROUP BY $this } FILTER (?incount != ?outcount) } -""" ] ], - [ rdfs:comment "A heat exchanger shall have at least 4 connection points." ; - sh:minCount 4 ; - sh:path s223:hasConnectionPoint ], - [ rdfs:comment "If the relation hasRole is present it must associate the HeatExchanger with a EnumerationKind-Role." ; - sh:class s223:EnumerationKind-Role ; - sh:path s223:hasRole ] . +""" ] ] . s223:Junction a s223:Class, sh:NodeShape ; @@ -4854,7 +4854,24 @@ s223:Equipment a s223:Class, The graphical depiction of Equipment used in this standard is a rounded cornered rectangle as show in Figure 5-1. ![Graphical Depiction of Equipment.](figures/Figure_5-1Graphical_Depiciton_of_Equipment.svg)""" ; rdfs:subClassOf s223:Connectable ; - sh:property [ rdfs:comment "Disallow contained equipment from having external incoming connections." ; + sh:property [ a sh:PropertyShape ; + rdfs:comment "If the relation contains is present it must associate the Equipment with either Equipment or Junction." ; + sh:name "device contains shape" ; + sh:or ( [ sh:class s223:Equipment ] [ sh:class s223:Junction ] ) ; + sh:path s223:contains ], + [ rdfs:comment "If the relation commandedByProperty is present it must associate the Equipment with a ActuatableProperty." ; + sh:class s223:ActuatableProperty ; + sh:path s223:commandedByProperty ], + [ rdfs:comment "If the relation executes is present it must associate the Equipment with a FunctionBlock." ; + sh:class s223:FunctionBlock ; + sh:path s223:executes ], + [ rdfs:comment "If the relation hasPhysicalLocation is present it must associate the Equipment with a PhysicalSpace." ; + sh:class s223:PhysicalSpace ; + sh:path s223:hasPhysicalLocation ], + [ rdfs:comment "If the relation hasRole is present it must associate the Equipment with a EnumerationKind-Role." ; + sh:class s223:EnumerationKind-Role ; + sh:path s223:hasRole ], + [ rdfs:comment "Disallow contained equipment from having external incoming connections." ; sh:path s223:connectedFrom ; sh:sparql [ a sh:SPARQLConstraint ; rdfs:comment "Disallow contained equipment from having external incoming connections." ; @@ -4907,24 +4924,7 @@ UNION ?type1 rdfs:subClassOf* ?type2 . } } -""" ] ], - [ a sh:PropertyShape ; - rdfs:comment "If the relation contains is present it must associate the Equipment with either Equipment or Junction." ; - sh:name "device contains shape" ; - sh:or ( [ sh:class s223:Equipment ] [ sh:class s223:Junction ] ) ; - sh:path s223:contains ], - [ rdfs:comment "If the relation commandedByProperty is present it must associate the Equipment with a ActuatableProperty." ; - sh:class s223:ActuatableProperty ; - sh:path s223:commandedByProperty ], - [ rdfs:comment "If the relation executes is present it must associate the Equipment with a FunctionBlock." ; - sh:class s223:FunctionBlock ; - sh:path s223:executes ], - [ rdfs:comment "If the relation hasPhysicalLocation is present it must associate the Equipment with a PhysicalSpace." ; - sh:class s223:PhysicalSpace ; - sh:path s223:hasPhysicalLocation ], - [ rdfs:comment "If the relation hasRole is present it must associate the Equipment with a EnumerationKind-Role." ; - sh:class s223:EnumerationKind-Role ; - sh:path s223:hasRole ] ; +""" ] ] ; sh:rule [ a sh:SPARQLRule ; rdfs:comment "For equipment contained within another piece of equipment use the mapsTo relation to infer a Medium from the containing equipment." ; sh:construct """