|
Hello,
Thank you for your work, it's great to have a Python API for dealing with ontologies.
I have no problem so far to load an ontology created with Protégé (the base_iri is valid) and to populate it. I specifically used the following commands to create a new instance (in a class already existing):
1) className = IRIS(onto.base_iri + "name of the class")
2) instance = className("name of the instance")
Then I saved the ontology. So far, everything was ok, I checked with Owlready2 that the instance was created where it should.
The problem is that when I open the saved ontology with Protégé, the new instance is created, but is linked to a new class which has the same name as my existing class before using Owlready2. They however are different since the new created class has the right IRI (with base_iri at the beginning) but all the other classes, which were present before I loaded the ontology with Owlready2, have now a different IRI name (no more base_iri, only "#class name").
Did I do something wrong?
KayJay
|