owlready2
owlready2 copied to clipboard
ontology import: classes of imported ontologies do not appear in target ontology class list
When importing an additional
onto = get_ontology("my_ontology.owl").load()
list(onto.classes())
... classes of onto are listed
# check imported ontologies - should be empty
onto.imported_ontologies
>> []
another_onto = get_ontology("my_other_ontology.owl").load()
list(onto.classes())
... classes of another_onto are listed
onto.imported_ontologies.append(another_onto)
# checking ontology import
onto.imported_ontologies
>>[get_ontology("my_other_ontology")]
list(onto.classes())
... still only classes of onto appear, but not of another_onto
Intuitive behavior would be: here all classes should appear.