-
Notifications
You must be signed in to change notification settings - Fork 18
Description
I'm trying to validate a model that I created based on the s223p ontology. I tried a few ways to do this, but they all gave me errors.
I first tried to validate using:
buildingmotif_s223 = Library.load(ontology_graph=r"../BuildingMOTIF/libraries/ashrae/223p/ontology/223p.ttl")
constraints = Library.load(ontology_graph="../BuildingMOTIF/buildingmotif/libraries/constraints/constraints.ttl")
model.validate([buildingmotif_s223, constraints])
But this raised the error:
compiled_model = self.compile(shape_collections or [self.get_manifest()])
ontology_graph += shape_collection.graph
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Library' object has no attribute 'graph'
Then I tried:
model.update_manifest(buildingmotif_s223.get_shape_collection())
model.update_manifest(constraints.get_shape_collection())
model.validate()
But this raised the error:
Exception: ('Could not resolve import of %s', rdflib.term.URIRef('http://data.ashrae.org/standard223/1.0/model/equipment'))
Since the first validation seemed to fail because it could not find shape graph in after compiling model, I tried to manually compile model with:
compiled_model = model.compile([s223.get_shape_collection()])
# and
compiled_model = model.compile([s223.get_shape_collection(), constraints.get_shape_collection()])
both of which raised:
I also tried this with
s223 = Library.load(ontology_graph="https://open223.info/223p.ttl")
and
Exception: ('Could not resolve import of %s', rdflib.term.URIRef('http://qudt.org/2.1/vocab/currency'))
Are these exceptions - being unable to resolve import - due to these ontologies being out of date? Or buildingMOTIF being unable to find the updated ontologies?