NREL / BuildingMOTIF

Building Metadata OnTology Interoperability Framework (BuildingMOTIF)
https://buildingmotif.readthedocs.io/
Other
48 stars 6 forks source link

Generate SPARQL Queries from SHACL shapes #273

Closed gtfierro closed 6 months ago

gtfierro commented 1 year ago

This is code that I wrote for our intern to use in his project, and it actually ended up being pretty useful. It gives ShapeCollection objects a shape_to_query method which takes the name of a shape and generates a SPARQL query which returns the "verifying" elements of that shape. There are a few extra pieces that allow you to choose variable names, etc.

gtfierro commented 6 months ago

@TShapinsky I've added algorithm documentation here: https://github.com/NREL/BuildingMOTIF/pull/273/files#diff-585e5d48241037d71a50f280e739817622dabc31f45271b5c772f586a8099301 . Let me know what you think and I can merge today/Monday