owlready2 icon indicating copy to clipboard operation
owlready2 copied to clipboard

ontology import: classes of imported ontologies do not appear in target ontology class list

Open markdoerr opened this issue 2 years ago • 2 comments

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.

markdoerr avatar Mar 21 '22 08:03 markdoerr