Skip to content

Commit

Permalink
Fix issue 632 (BrickSchema#635)
Browse files Browse the repository at this point in the history
* Use pyontoenv package for environment management

This is faster and more rigorously tested than the old environment
management package.

* update bacnet ontology

* make sure aliases also have subclasses

* add test for issue 632

* fix the sparql query

* got the logic backwards

* remove the "root" classes
  • Loading branch information
gtfierro authored Jun 16, 2024
1 parent 586bb90 commit 3a61095
Show file tree
Hide file tree
Showing 3 changed files with 10,617 additions and 9,551 deletions.
4 changes: 4 additions & 0 deletions generate_brick.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,10 @@ def define_classes(definitions, parent, pun_classes=False, graph=G):
graph.add((alias, A, OWL.Class))
graph.add((alias, A, SH.NodeShape))
graph.add((alias, OWL.equivalentClass, classname))
# find parent class of what the alias is equivalent to, add the RDFS subClassOf properties
parent_classes = list(graph.objects(subject=classname, predicate=RDFS.subClassOf))
for pc in parent_classes:
graph.add((alias, RDFS.subClassOf, pc))
graph.add((alias, BRICK.aliasOf, classname))

# all other key-value pairs in the definition are
Expand Down
Loading

0 comments on commit 3a61095

Please sign in to comment.