Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow extensions with 223 #533

Merged
merged 15 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions bricksrc/relationships.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib import Literal
from .namespaces import A, OWL, RDFS, BRICK, VCARD, UNIT, QUDT, SDO, RDF, S223, BSH, XSD
from .namespaces import A, OWL, RDFS, BRICK, VCARD, UNIT, QUDT, SDO, RDF, BSH, XSD

"""
Defining Brick relationships
Expand All @@ -25,7 +25,7 @@
"domain": BRICK.Point,
},
"value": {
RDFS.subPropertyOf: [QUDT.value, S223.hasValue],
RDFS.subPropertyOf: QUDT.value,
RDFS.label: Literal("Value"),
A: [RDF.Property],
"range": RDFS.Resource,
Expand Down Expand Up @@ -107,10 +107,6 @@
"range": [
BRICK.Equipment,
BRICK.Location,
S223.ConnectionPoint,
S223.Connection,
S223.Connectable,
S223.Segment,
],
RDFS.label: Literal("Is point of"),
},
Expand Down
5 changes: 2 additions & 3 deletions bricksrc/rules.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ $this ?invP ?o .
}
WHERE {
?o ?p $this .
{?invP owl:inverseOf ?p} UNION {?invP s223:inverseOf ?p} .
?invP owl:inverseOf ?p .
}
""" ;
sh:prefixes <https://brickschema.org/schema/1.3/Brick> ;
] ;
sh:targetClass brick:Entity ;
sh:targetClass s223:Concept ;
.

bsh:InferSymmetricProperties
Expand All @@ -51,7 +50,7 @@ $this ?prop ?o .
}
WHERE {
{ $this ?prop ?o } UNION { ?o ?prop $this } .
{?prop a owl:SymmetricProperty} UNION {?prop a s223:SymmetricProperty} .
?prop a owl:SymmetricProperty .
}
""" ;
sh:prefixes <https://brickschema.org/schema/1.3/Brick> ;
Expand Down
104 changes: 104 additions & 0 deletions extensions/brick_extension_G36-rules_SP223-v1.0.shapes.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# baseURI: http://data.ashrae.org/standard223/1.0/extension/g36-rules
# imports: http://data.ashrae.org/standard223/1.0/model/all
# prefix: g36

@prefix g36: <http://data.ashrae.org/standard223/1.0/extension/g36#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix s223: <http://data.ashrae.org/standard223#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://data.ashrae.org/standard223/1.0/extension/g36-rules>
a owl:Ontology ;
owl:imports <http://data.ashrae.org/standard223/1.0/model/all> ;
owl:versionInfo "Created with TopBraid Composer" ;
.
g36:FPU_4-3
a sh:NodeShape ;
sh:targetClass g36:FanPoweredUnit ;

.
g36:VAV_4-2
a sh:NodeShape ;
sh:targetClass g36:VAVWithReheat;
rdfs:comment "This could just be a rule, rather than a subclass of VAVWithReheat. Not sure which pattern is more sensible" ;
rdfs:label "VAV with reheat" ;
sh:property [
sh:path s223:connectedTo ;
sh:class s223:DomainSpace ;
sh:minCount 1 ;
sh:node [
sh:property [
sh:path [
sh:inversePath s223:contains ;
] ;
sh:class g36:Zone ;
sh:minCount 1 ;
] ;
] ;
sh:severity s223:g36 ;
] ;
.
g36:VAV_4-1
a sh:NodeShape ;
rdfs:label "VAV with Cooling Only" ;
rdfs:label "VAV_4-1" ;
sh:targetClass g36:VAV ;
sh:property [
sh:path s223:connectedTo ;
sh:class s223:DomainSpace ;
sh:minCount 1 ;
sh:node [
sh:property [
sh:path [
sh:inversePath s223:contains ;
] ;
sh:class g36:Zone ;
sh:minCount 1 ;
] ;
] ;
] ;
sh:property [
sh:path s223:hasObservationLocation ;
rdfs:comment "The Air Flow Station must hasObservationLocation the Damper InletConnectionPoint." ;
sh:class s223:InletConnectionPoint ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:node [
sh:property [
sh:path [
sh:inversePath s223:hasConnectionPoint ;
] ;
sh:class s223:Damper ;
sh:minCount 1 ;
] ;
] ;
] ;
sh:property [
sh:path s223:hasConnectionPoint ;
rdfs:comment "VAV outlet connection point maps to the Damper connection point" ;
sh:qualifiedMinCount 1 ;
sh:qualifiedValueShape [
sh:class s223:OutletConnectionPoint ;
sh:node [
sh:property [
sh:path s223:mapsTo ;
sh:class s223:OutletConnectionPoint ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:node [
sh:property [
sh:path [
sh:inversePath s223:hasConnectionPoint ;
] ;
sh:class g36:VAV ;
sh:minCount 1 ;
] ;
] ;
] ;
] ;
] ;
] ;
.
Loading