diff --git a/ontologies/223p.ttl b/ontologies/223p.ttl index cd18319..94538a2 100644 --- a/ontologies/223p.ttl +++ b/ontologies/223p.ttl @@ -980,11 +980,7 @@ 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 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:property [ 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." ; @@ -997,7 +993,11 @@ 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 hasObservationLocationLow." ; sh:class s223:Connectable ; sh:maxCount 1 ; @@ -1927,25 +1927,7 @@ 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 "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:property [ 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." ; @@ -1965,7 +1947,25 @@ 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 ; @@ -2598,13 +2598,7 @@ 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 "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:property [ 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 ; @@ -2640,7 +2634,13 @@ 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 ; @@ -4857,24 +4857,7 @@ 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 [ 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 "If a contained equipment has external connections, make sure that the containing equipment has the same external connections." ; + sh:property [ rdfs:comment "If a contained equipment has external connections, make sure that the containing equipment has the same external connections." ; sh:path s223:connectedFrom ; sh:sparql [ a sh:SPARQLConstraint ; rdfs:comment "If a contained equipment has external connections, make sure that the containing equipment has the same external connections." ; @@ -4929,7 +4912,24 @@ 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 """