Skip to content

Commit

Permalink
more rec changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Jan 15, 2024
1 parent 154ce3b commit 16a44e1
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bricksrc/namespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
SOSA = Namespace("http://www.w3.org/ns/sosa/")
VCARD = Namespace("http://www.w3.org/2006/vcard/ns#")
S223 = Namespace("http://data.ashrae.org/standard223#")
REC = Namespace("https://w3id.org/rec")
REC = Namespace("https://w3id.org/rec#")

# QUDT namespaces
QUDT = Namespace("http://qudt.org/schema/qudt/")
Expand Down
10 changes: 6 additions & 4 deletions examples/last_known_value/last_known_value.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@prefix unit: <http://qudt.org/vocab/unit/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix bacnet: <http://data.ashrae.org/bacnet/2020#> .
@prefix rec: <https://w3id.org/rec#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

bldg: a owl:Ontology ;
Expand All @@ -20,8 +21,9 @@ bldg:sensor1 a brick:Air_Temperature_Sensor ;
bacnet:object-name "BLDG-Z410-ZATS" ;
bacnet:objectOf bldg:sample-device ;
] ;
brick:lastKnownValue [
brick:value "72.0"^^xsd:float ;
brick:lastKnownValue bldg:sensor1_reading1 .

bldg:sensor1_reading1 a rec:TemperatureObservation ;
brick:value "72.0"^^xsd:double ;
brick:timestamp "2020-01-01T00:00:00Z"^^xsd:dateTime ;
] ;
.
rec:sourcePoint bldg:sensor1 .
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ flake8>=6.0
semver>=2.10.1
pytest-xdist[psutil]
html5lib
ontoenv>=0.4.0a5
ontoenv>=0.4.0a6
28 changes: 25 additions & 3 deletions support/brickpatches.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
@prefix rec: <https://w3id.org/rec#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix bsh: <https://brickschema.org/schema/BrickShape#> .

brick:Ablutions_Room
owl:deprecated "true"^^xsd:boolean ;
Expand Down Expand Up @@ -170,7 +171,7 @@ brick:Cold_Box
]
.
brick:Collection
owl:deprecated "true"^^xsd:boolean ;
rdfs:subClassOf rec:Collection ;
.
brick:Command
sh:property [
Expand Down Expand Up @@ -902,12 +903,15 @@ brick:Studio
brick:Switch_Room
owl:deprecated "true"^^xsd:boolean ;
.
brick:System
brick:Collection
rdfs:subClassOf rec:Collection ;
sh:property [
rdf:type sh:PropertyShape ;
sh:path rec:includes ;
sh:class brick:Equipment ;
sh:or (
[ sh:class brick:Equipment ]
[ sh:class brick:Collection ]
) ;
sh:minCount 1 ;
sh:name "includes" ;
sh:nodeKind sh:IRI ;
Expand Down Expand Up @@ -1311,3 +1315,21 @@ rec:substance
owl:imports <https://w3id.org/rec> ;
owl:versionInfo "Created with TopBraid Composer" ;
.

brick:value rdfs:subPropertyOf rec:value .

bsh:InferRecValue a sh:NodeShape ;
sh:targetSubjectsOf brick:value ;
sh:rule [
a sh:SPARQLRule ;
sh:construct """
CONSTRUCT {
$this rec:value ?v
}
WHERE {
$this brick:value ?v
}
""" ;
sh:prefixes <https://brickschema.org/schema/1.3/Brick> ;
] ;
.

0 comments on commit 16a44e1

Please sign in to comment.