Skip to content

Commit

Permalink
fix query
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Sep 19, 2024
1 parent 22507f0 commit 54fe368
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions buildingmotif/api/views/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,13 @@ def get_point_names(models_id: int) -> Graph:
full_graph = m.with_imports()
response = full_graph.query(
"""
PREFIX ref: <https://brickschema.org/schema/ref#>
PREFIX bacnet: <http://data.ashrae.org/bacnet/2020#>
SELECT ?point ?label WHERE {
?point rdf:type/rdfs:subClassOf* brick:Point ;
rdfs:label ?label .
?point rdf:type/rdfs:subClassOf* brick:Point .
{ ?point rdfs:label ?label }
UNION
{ ?point ref:hasExternalReference/bacnet:object-identifier ?label }
}
"""
)
Expand Down

0 comments on commit 54fe368

Please sign in to comment.